path sdk/transaction/transaction.proto
package m10.sdk.transaction
Messages
Action
Name | Type | Description |
---|
tx_id | uint64 | Transaction ID of the action. |
name | string | Name of the action. |
context_id | bytes | [optional] unique Context ID, allowing linking of multiple requests |
from_account | bytes | Invoking account ID. |
target | Target | Target acount ID of the action. |
payload | bytes | Action payload. |
Actions
CommitTransfer
Name | Type | Description |
---|
pending_tx_id | uint64 | Transaction ID of the pending transfer. |
new_state | CommitTransfer.TransferState | New state of the transfer. |
CreateLedgerAccount
Name | Type | Description |
---|
parent_id | bytes | Parent account ID. |
issuance | bool | Whether this is an issuance account. |
frozen | bool | Whether the account is initially frozen. |
instrument | Instrument | Instrument associated with the account. |
balance_limit | uint64 | Balance limit for the account. |
CreateLedgerTransfer
Name | Type | Description |
---|
ledger_id | string | Ledger identifier. |
nonce | uint64 | Nonce for replay protection. |
transfer | CreateTransfer | Transfer details. |
CreateLedgerTransfers
Name | Type | Description |
---|
transfers | repeated CreateLedgerTransfer | Ledger transfers |
valid_until | uint64 | UTC timestamp defining the end date of the contract
Interpret as microseconds since the UNIX_EPOCH |
CreateToken
Name | Type | Description |
---|
address | bytes | Address for the token. |
account_id | bytes | Account ID associated with the token. |
value | uint64 | Value of the token. |
CreateTransfer
FinalizedTransfer
FinalizedTransfers
GetAccountRequest
Name | Type | Description |
---|
id | bytes | ID of the account to retrieve. |
GetActionRequest
Name | Type | Description |
---|
tx_id | uint64 | Transaction ID of the action to retrieve. |
GetTransferRequest
Name | Type | Description |
---|
tx_id | uint64 | Transaction ID of the transfer. |
IndexedAccount
Name | Type | Description |
---|
id | bytes | Account ID. |
issuance | IndexedAccount.Issuance | Issuance information. |
balance | uint64 | Account balance. |
frozen | bool | Whether the account is frozen. |
instrument | Instrument | Instrument associated with the account. |
balance_limit | uint64 | Balance limit of the account. |
IndexedAccount.Issuance
Name | Type | Description |
---|
issued_balance | uint64 | Issued balance of the account. |
non_leaf_children | uint64 | Number of non-leaf child accounts. |
leaf_children | uint64 | Number of leaf child accounts. |
Instrument
Name | Type | Description |
---|
code | string | Instrument code (e.g., currency code). |
decimal_places | uint32 | Number of decimal places for the instrument. |
description | string | Description of the instrument. |
InvokeAction
Invokes a registered action by sending an opaque payload to a Target
Name | Type | Description |
---|
name | string | Unique name of the action to invoke |
from_account | bytes | Invoking account ID |
target | Target | Specifies the identity/identities who have permission to see & be notified
of the invoked action |
payload | bytes | Opaque payload |
ListActionsRequest
Name | Type | Description |
---|
name | string | Name of the action to filter by. |
account_id | bytes | Account ID to filter by. |
context_id | bytes | Context ID to filter by. |
limit | uint64 | Maximum number of actions to return. |
min_tx_id | uint64 | Minimum transaction ID to include. |
max_tx_id | uint64 | default = maximum possible tx id
/ Maximum transaction ID to include. |
ListTransferRequest
Transfers are returned in descending order from max_tx_id to min_tx_id
Name | Type | Description |
---|
account_id | bytes | Account ID to filter transfers by. |
context_id | bytes | Context ID to filter transfers by. |
limit | uint64 | Maximum number of transfers to return. |
include_child_accounts | bool | Whether to include transfers from child accounts. |
min_tx_id | uint64 | Minimum transaction ID to include. |
max_tx_id | uint64 | default = maximum possible tx id
/ Maximum transaction ID to include. |
OfflineToken
OfflineToken.Data
Name | Type | Description |
---|
id | uint64 | Token ID. |
address | bytes | Token address. |
account_id | bytes | Account ID associated with the token. |
value | uint64 | Token value. |
currency | string | Currency of the token. |
RedeemToken
Name | Type | Description |
---|
token | RedeemableToken | Redeemable token. |
account_id | bytes | Account ID for redemption. |
RedeemableToken
RedeemableToken.Data
Name | Type | Description |
---|
input | uint64 | Input value. |
value | uint64 | Value associated with the input. |
SetBalanceLimit
Name | Type | Description |
---|
account_id | bytes | Account ID to set the balance limit for. |
balance_limit | uint64 | New balance limit. |
SetFreezeState
Name | Type | Description |
---|
account_id | bytes | Account ID to set freeze state for. |
frozen | bool | Whether to freeze the account. |
SetInstrument
Name | Type | Description |
---|
account_id | bytes | Account ID to set the instrument for. |
code | string | Instrument code. |
decimal_places | uint32 | Number of decimal places. |
description | string | Instrument description. |
Signature
Name | Type | Description |
---|
public_key | bytes | Public key used for the signature. |
signature | bytes | Signature data. |
algorithm | Signature.Algorithm | Signature algorithm. |
Target
Name | Type | Description |
---|
account_id | bytes | Account ID |
any_account | google.protobuf.Empty | Any Account |
TransactionData
TransactionError
TransactionRequestPayload
Decoded `LedgerRequest.payload` message data for requests related to
transactions and ledger state.
Name | Type | Description |
---|
nonce | uint64 | Replay protection |
timestamp | uint64 | UNIX timestamp in microseconds |
context_id | bytes | [optional] unique Context ID, allowing linking of multiple requests |
data | TransactionData | Request payload data. |
TransactionResponse
Name | Type | Description |
---|
tx_id | uint64 | Unique transaction ID. |
error | TransactionError | Error information, if any. |
timestamp | fixed64 | Transaction timestamp. |
account_created | bytes | Responses
/ account ID. |
transfer_committed | CreateTransfer | Committed transfer details. |
token | OfflineToken | |
TransferStep
Name | Type | Description |
---|
from_account_id | bytes | Source account ID. |
to_account_id | bytes | Destination account ID. |
amount | uint64 | Amount to transfer. |
metadata | repeated google.protobuf.Any | Metadata associated with the transfer step. |
Enums
CommitTransfer.TransferState
Name | Number | Description |
---|
ACCEPTED | 0 | |
REJECTED | 1 | |
FinalizedTransfer.TransferState
Name | Number | Description |
---|
ACCEPTED | 0 | |
REJECTED | 1 | |
PENDING | 2 | |
EXPIRED | 3 | |
Signature.Algorithm
Name | Number | Description |
---|
P256_SHA256_ASN1 | 0 | |
ED25519 | 1 | |
TransactionError.Code
Name | Number | Description |
---|
UNKNOWN | 0 | Generic status codes |
UNIMPLEMENTED | 1 | |
NOT_FOUND | 2 | |
ALREADY_EXISTS | 3 | |
UNAUTHORIZED | 4 | |
BAD_REQUEST | 5 | Request is malformed |
INVALID_REQUEST_TYPE | 6 | Invalid/unsupported transaction request type |
INVALID_ACCOUNT_ID | 7 | Invalid account ID |
INVALID_TRANSFER | 8 | Invalid transfer parameters (amount, accounts, etc) |
MESSAGE_TOO_LARGE | 10 | The request message was too large to be processed. |
INVALID_SIGNATURE | 11 | The request signature does not match the request payload |
VERIFICATION_FAILED | 12 | Signature verification failed |
REPLAY_PROTECTION | 20 | Replay protection was triggered, e.g. nonce reuse, bad block window |
INVALID_EXPRESSION | 21 | Invalid expression used |
INCORRECT_TYPE | 22 | |
ACCOUNT_FROZEN | 23 | Ledger-specific status codes |
UNMODIFIED_STATE | 24 | |
INSUFFICIENT_BALANCE | 25 | |
BALANCE_OVERFLOW | 26 | |
ACCOUNT_DEPTH_EXCEEDED | 27 | |
HOLDING_LIMIT_EXCEEDED | 28 | |
INVALID_TARGET | 30 | Action specific status codes |