Appearance
Accounts Calls
Calls on the blink_accounts module, submitted Borsh-encoded to the single Submit Transaction endpoint. Fields are listed in Borsh serialization order; see Encoding and Data Structures & Constants.
Add Delegation
blink_accounts.add_delegation
Add a delegation to a subaccount
| Field | Type | Required | Description |
|---|---|---|---|
subaccount_id | SubAccountId | yes | The subaccount to add delegation to |
delegate | EthereumAddress | yes | The address to delegate to |
permissions | uint32 | yes | Permissions to grant (raw u32 bitflags) |
expiry | Option<uint64> | no | Optional expiry timestamp (Unix ms) |
name | Option<SizedSafeString_for_12> | no | Optional user-defined name (max 12 chars, printable ASCII) |
Update Delegation
blink_accounts.update_delegation
Update an existing delegation
| Field | Type | Required | Description |
|---|---|---|---|
subaccount_id | SubAccountId | yes | The subaccount the delegation belongs to |
delegate | EthereumAddress | yes | The delegate address to update |
permissions | uint32 | yes | New permissions (raw u32 bitflags) |
expiry | Option<uint64> | no | New expiry (replaces old) |
name | Option<SizedSafeString_for_12> | no | New name (replaces old) |
Remove Delegation
blink_accounts.remove_delegation
Remove a delegation from a subaccount
| Field | Type | Required | Description |
|---|---|---|---|
subaccount_id | SubAccountId | yes | The subaccount to remove delegation from |
delegate | EthereumAddress | yes | The delegate address to remove |
Deposit
blink_accounts.deposit
Deposit tokens to a subaccount's spot balance
| Field | Type | Required | Description |
|---|---|---|---|
subaccount_id | SubAccountId | yes | The subaccount to deposit to |
token_id | TokenId | yes | The token to deposit |
amount | uint64 | yes | Amount to deposit (in atoms) |
address | Option<EthereumAddress> | no | Optional address to credit. Defaults to the transaction sender. |
Withdraw
blink_accounts.withdraw
Withdraw tokens from a subaccount's spot balance
| Field | Type | Required | Description |
|---|---|---|---|
subaccount_id | SubAccountId | yes | The subaccount to withdraw from |
token_id | TokenId | yes | The token to withdraw |
amount | uint64 | yes | Amount to withdraw (in atoms) |
Internal Transfer
blink_accounts.internal_transfer
Transfer tokens between subaccounts of the same owner
| Field | Type | Required | Description |
|---|---|---|---|
owner | Option<EthereumAddress> | no | Optional owner when signed by a delegate |
from_subaccount_id | SubAccountId | yes | Source subaccount |
to_subaccount_id | SubAccountId | yes | Destination subaccount |
token_id | TokenId | yes | Token to transfer |
amount | uint64 | yes | Amount to transfer (in atoms) |
External Transfer
blink_accounts.external_transfer
Transfer tokens to another user's subaccount
| Field | Type | Required | Description |
|---|---|---|---|
from_owner | Option<EthereumAddress> | no | Optional owner address when signed by a delegate |
from_subaccount_id | SubAccountId | yes | Source subaccount (caller must be owner or delegate with EXTERNAL_TRANSFER) |
to_owner | EthereumAddress | yes | Destination owner address |
to_subaccount_id | SubAccountId | yes | Destination subaccount |
token_id | TokenId | yes | Token to transfer |
amount | uint64 | yes | Amount to transfer (in atoms) |
Set Limits
blink_accounts.set_limits
Update account limits (admin only)
Protocol / admin operation.
| Field | Type | Required | Description |
|---|---|---|---|
max_subaccounts_per_owner | uint16 | yes | Maximum subaccounts per owner |
max_delegations_per_subaccount | uint8 | yes | Maximum delegations per subaccount |
max_spot_open_orders | uint16 | yes | Maximum spot open orders per subaccount |
Create Spot Asset
blink_accounts.create_spot_asset
Register a new spot asset (admin only)
Protocol / admin operation.
| Field | Type | Required | Description |
|---|---|---|---|
token_id | TokenId | yes | The token id to register |