Ir al contenido
GitHub

Assets

Esta página aún no está disponible en tu idioma.

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 create, view, edit, and delete their own assets only.

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 liquidityThreshold.

This threshold determines when Rafiki triggers low‑liquidity notifications or webhooks, but does 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
}
}
}