Skip to content
GitHub

Assets

An asset represents an item of value that can be transferred via the Interledger Protocol. Assets in Rafiki are added through the Backend Admin API or the Rafiki Admin application.

Permissions

Operators can create, view, edit, and delete both their own assets and those that belong to any tenant.

Tenants can view, edit, and delete only their own assets. They cannot create assets.

Use the createAsset mutation to register a new asset with your Rafiki instance.

mutation CreateAsset($input: CreateAssetInput!) {
createAsset(input: $input) {
code
success
message
asset {
id
code
scale
tenantId
}
}
}

Once an asset has been created, you may need to adjust its operational threshold values. You can use the updateAsset mutation to modify the withdrawalThreshold and liquidityThreshold.

These thresholds influence when Rafiki triggers low‑liquidity notifications but do not directly deposit or withdraw asset liquidity.

For information about adding or removing liquidity, see Asset liquidity.

mutation UpdateAsset($input: UpdateAssetInput!) {
updateAsset(input: $input) {
asset {
id
code
scale
withdrawalThreshold
liquidityThreshold
tenantId
}
}
}

Deleting an asset removes it from active use within a Rafiki instance.

You can only delete an asset if it’s not associated with any peers or wallet addresses. Rafiki prevents deleting any asset that’s still in use.

mutation DeleteAsset($input: DeleteAssetInput!) {
deleteAsset(input: $input) {
asset {
id
code
scale
tenantId
}
}
}