-
Notifications
You must be signed in to change notification settings - Fork 105
docs: update tenants, assets, and admin user guide #3774
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 2 commits
5f39519
06ae714
cde116b
5266333
072d911
a33c887
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -22,6 +22,8 @@ An asset represents an item of value that can be transferred via the Interledger | |
|
|
||
| ## Add an asset | ||
|
|
||
| Use the `createAsset` mutation to register a new asset with your Rafiki instance. | ||
|
|
||
| <Tabs> | ||
| <TabItem label="Operation"> | ||
| ```graphql | ||
|
|
@@ -81,3 +83,152 @@ The `asset` object in the response will include the `tenantId` of the tenant to | |
|
|
||
| </TabItem> | ||
| </Tabs> | ||
|
|
||
| ## Update an asset | ||
|
|
||
| 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](/admin/liquidity/asset-liquidity). | ||
|
|
||
| <Tabs> | ||
| <TabItem label="Operation"> | ||
| ```graphql | ||
| mutation UpdateAsset($input: UpdateAssetInput!) { | ||
| updateAsset(input: $input) { | ||
| asset { | ||
| id | ||
| code | ||
| scale | ||
| withdrawalThreshold | ||
| liquidityThreshold | ||
| tenantId | ||
| } | ||
| } | ||
| } | ||
| ``` | ||
| </TabItem> | ||
|
|
||
| <TabItem label="Variables"> | ||
| The input object for the update operation requires the asset `id`. | ||
| Only the threshold fields are editable; all other fields are immutable. | ||
|
|
||
| ```json | ||
| { | ||
| "input": { | ||
| "id": "b3dffeda-1e0e-47d4-82a3-69b1a622eeb9", | ||
| "withdrawalThreshold": 100, | ||
| "liquidityThreshold": 500 | ||
| } | ||
| } | ||
| ``` | ||
|
|
||
| For more information about this mutation’s input object, see [`UpdateAssetInput`](/apis/graphql/backend/#definition-UpdateAssetInput). | ||
|
|
||
| :::note[Tenant ID and HMAC-signed request headers] | ||
| <TenantIdHmacNote /> | ||
| ::: | ||
|
|
||
| </TabItem> | ||
|
|
||
| <TabItem label="Response"> | ||
| ```json | ||
| { | ||
| "data": { | ||
| "updateAsset": { | ||
| "asset": { | ||
| "id": "b3dffeda-1e0e-47d4-82a3-69b1a622eeb9", | ||
| "code": "USD", | ||
| "scale": 2, | ||
| "withdrawalThreshold": 100, | ||
| "liquidityThreshold": 500, | ||
| "tenantId": "3fa85f64-5717-4562-b3fc-2c963f66afa6" | ||
| } | ||
| } | ||
| } | ||
| } | ||
| ``` | ||
|
|
||
| :::note[Tenant ID in the asset response] | ||
| The `asset` object in the response will include the `tenantId` of the tenant to which the asset belongs. This `tenantId` is used to identify the tenant when processing requests related to the asset. | ||
| ::: | ||
|
|
||
| </TabItem> | ||
| </Tabs> | ||
|
|
||
| --- | ||
|
|
||
| ## Delete an asset | ||
|
|
||
| Deleting an asset removes it from active use within a Rafiki instance. | ||
|
|
||
| This operation succeeds only if the asset is **not** referenced by any peers or wallet addresses. | ||
|
||
|
|
||
| :::danger | ||
brad-dow marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| Deleting an asset is permanent and cannot be reversed. | ||
|
|
||
| You can only delete an asset if: | ||
|
|
||
| - No peers reference the asset | ||
| - No wallet addresses are associated with it | ||
|
|
||
| If the asset is still in use, the backend prevents deletion and returns an error. | ||
| ::: | ||
|
|
||
| <Tabs> | ||
| <TabItem label="Operation"> | ||
| ```graphql | ||
| mutation DeleteAsset($input: DeleteAssetInput!) { | ||
| deleteAsset(input: $input) { | ||
| asset { | ||
| id | ||
| code | ||
| scale | ||
| tenantId | ||
| } | ||
| } | ||
| } | ||
| ``` | ||
| </TabItem> | ||
|
|
||
| <TabItem label="Variables"> | ||
| ```json | ||
| { | ||
| "input": { | ||
| "id": "b3dffeda-1e0e-47d4-82a3-69b1a622eeb9" | ||
| } | ||
| } | ||
| ``` | ||
|
|
||
| For more information about this mutation’s input object, see [`DeleteAssetInput`](/apis/graphql/backend/#definition-DeleteAssetInput). | ||
|
|
||
| :::note[Tenant ID and HMAC-signed request headers] | ||
| <TenantIdHmacNote /> | ||
| ::: | ||
|
|
||
| </TabItem> | ||
|
|
||
| <TabItem label="Response"> | ||
| ```json | ||
| { | ||
| "data": { | ||
| "deleteAsset": { | ||
| "asset": { | ||
| "id": "b3dffeda-1e0e-47d4-82a3-69b1a622eeb9", | ||
| "code": "USD", | ||
| "scale": 2, | ||
| "tenantId": "3fa85f64-5717-4562-b3fc-2c963f66afa6" | ||
| } | ||
| } | ||
| } | ||
| } | ||
| ``` | ||
|
|
||
| :::note[Tenant ID in the asset response] | ||
| The `asset` object in the response will include the `tenantId` of the tenant to which the asset belongs. This `tenantId` is used to identify the tenant when processing requests related to the asset. | ||
| ::: | ||
|
|
||
| </TabItem> | ||
| </Tabs> | ||
Uh oh!
There was an error while loading. Please reload this page.