Skip to main content

transaction.proto

path sdk/transaction/transaction.proto

package m10.sdk.transaction


Messages​

Action​

NameTypeDescription
tx_iduint64Transaction ID of the action.
namestringName of the action.
context_idbytes[optional] unique Context ID, allowing linking of multiple requests
from_accountbytesInvoking account ID.
targetTargetTarget acount ID of the action.
payloadbytesAction payload.

Actions​

NameTypeDescription
actionsrepeated ActionList of actions.

CommitTransfer​

NameTypeDescription
pending_tx_iduint64Transaction ID of the pending transfer.
new_stateCommitTransfer.TransferStateNew state of the transfer.

CreateLedgerAccount​

NameTypeDescription
parent_idbytesParent account ID.
issuanceboolWhether this is an issuance account.
frozenboolWhether the account is initially frozen.
instrumentInstrumentInstrument associated with the account.
balance_limituint64Balance limit for the account.

CreateLedgerTransfer​

NameTypeDescription
ledger_idstringLedger identifier.
nonceuint64Nonce for replay protection.
transferCreateTransferTransfer details.

CreateLedgerTransfers​

NameTypeDescription
transfersrepeated CreateLedgerTransferLedger transfers
valid_untiluint64UTC timestamp defining the end date of the contract Interpret as microseconds since the UNIX_EPOCH

CreateToken​

NameTypeDescription
addressbytesAddress for the token.
account_idbytesAccount ID associated with the token.
valueuint64Value of the token.

CreateTransfer​

NameTypeDescription
transfer_stepsrepeated TransferStepList of transfer steps.

FinalizedTransfer​

NameTypeDescription
tx_iduint64Transaction ID of the finalized transfer.
context_idbytesContext ID associated with the transfer.
transfer_stepsrepeated TransferStepList of transfer steps.
errorTransactionErrorError information, if any.
timestampfixed64Timestamp of the transfer.
stateFinalizedTransfer.TransferStateState of the transfer.

FinalizedTransfers​

NameTypeDescription
transfersrepeated FinalizedTransferList of finalized transfers.

GetAccountRequest​

NameTypeDescription
idbytesID of the account to retrieve.

GetActionRequest​

NameTypeDescription
tx_iduint64Transaction ID of the action to retrieve.

GetTransferRequest​

NameTypeDescription
tx_iduint64Transaction ID of the transfer.

IndexedAccount​

NameTypeDescription
idbytesAccount ID.
issuanceIndexedAccount.IssuanceIssuance information.
balanceuint64Account balance.
frozenboolWhether the account is frozen.
instrumentInstrumentInstrument associated with the account.
balance_limituint64Balance limit of the account.

IndexedAccount.Issuance​

NameTypeDescription
issued_balanceuint64Issued balance of the account.
non_leaf_childrenuint64Number of non-leaf child accounts.
leaf_childrenuint64Number of leaf child accounts.

Instrument​

NameTypeDescription
codestringInstrument code (e.g., currency code).
decimal_placesuint32Number of decimal places for the instrument.
descriptionstringDescription of the instrument.

InvokeAction​

Invokes a registered action by sending an opaque payload to a Target

NameTypeDescription
namestringUnique name of the action to invoke
from_accountbytesInvoking account ID
targetTargetSpecifies the identity/identities who have permission to see & be notified of the invoked action
payloadbytesOpaque payload

ListActionsRequest​

NameTypeDescription
namestringName of the action to filter by.
account_idbytesAccount ID to filter by.
context_idbytesContext ID to filter by.
limituint64Maximum number of actions to return.
min_tx_iduint64Minimum transaction ID to include.
max_tx_iduint64default = maximum possible tx id / Maximum transaction ID to include.

ListTransferRequest​

Transfers are returned in descending order from max_tx_id to min_tx_id

NameTypeDescription
account_idbytesAccount ID to filter transfers by.
context_idbytesContext ID to filter transfers by.
limituint64Maximum number of transfers to return.
include_child_accountsboolWhether to include transfers from child accounts.
min_tx_iduint64Minimum transaction ID to include.
max_tx_iduint64default = maximum possible tx id / Maximum transaction ID to include.

OfflineToken​

NameTypeDescription
dataOfflineToken.DataToken data.
signatureSignatureSignature for the token.

OfflineToken.Data​

NameTypeDescription
iduint64Token ID.
addressbytesToken address.
account_idbytesAccount ID associated with the token.
valueuint64Token value.
currencystringCurrency of the token.

RedeemToken​

NameTypeDescription
tokenRedeemableTokenRedeemable token.
account_idbytesAccount ID for redemption.

RedeemableToken​

NameTypeDescription
dataRedeemableToken.DataToken data.
signatureSignatureSignature for the token.

RedeemableToken.Data​

NameTypeDescription
idbytesToken ID.
addressbytesToken address.
inputsrepeated RedeemableToken.TokenInputList of token inputs.
currencystringToken currency.

RedeemableToken.TokenInput​

NameTypeDescription
inputuint64Input value.
valueuint64Value associated with the input.

SetBalanceLimit​

NameTypeDescription
account_idbytesAccount ID to set the balance limit for.
balance_limituint64New balance limit.

SetFreezeState​

NameTypeDescription
account_idbytesAccount ID to set freeze state for.
frozenboolWhether to freeze the account.

SetInstrument​

NameTypeDescription
account_idbytesAccount ID to set the instrument for.
codestringInstrument code.
decimal_placesuint32Number of decimal places.
descriptionstringInstrument description.

Signature​

NameTypeDescription
public_keybytesPublic key used for the signature.
signaturebytesSignature data.
algorithmSignature.AlgorithmSignature algorithm.

Target​

NameTypeDescription
account_idbytesAccount ID
any_accountgoogle.protobuf.EmptyAny Account

TransactionData​

NameTypeDescription
transferCreateTransfer
create_ledger_accountCreateLedgerAccount
set_freeze_stateSetFreezeState
document_operationsm10.sdk.DocumentOperations
invoke_actionInvokeAction
initiate_transferCreateTransfer
commit_transferCommitTransfer
set_instrumentSetInstrument
set_balance_limitSetBalanceLimit
create_tokenCreateToken
redeem_tokenRedeemToken

TransactionError​

NameTypeDescription
codeTransactionError.CodeError code.
messagestringError message.

TransactionRequestPayload​

Decoded `LedgerRequest.payload` message data for requests related to transactions and ledger state.

NameTypeDescription
nonceuint64Replay protection
timestampuint64UNIX timestamp in microseconds
context_idbytes[optional] unique Context ID, allowing linking of multiple requests
dataTransactionDataRequest payload data.

TransactionResponse​

NameTypeDescription
tx_iduint64Unique transaction ID.
errorTransactionErrorError information, if any.
timestampfixed64Transaction timestamp.
account_createdbytesResponses / account ID.
transfer_committedCreateTransferCommitted transfer details.
tokenOfflineToken

TransferStep​

NameTypeDescription
from_account_idbytesSource account ID.
to_account_idbytesDestination account ID.
amountuint64Amount to transfer.
metadatarepeated google.protobuf.AnyMetadata associated with the transfer step.

Enums​

CommitTransfer.TransferState​

NameNumberDescription
ACCEPTED0
REJECTED1

FinalizedTransfer.TransferState​

NameNumberDescription
ACCEPTED0
REJECTED1
PENDING2
EXPIRED3

Signature.Algorithm​

NameNumberDescription
P256_SHA256_ASN10
ED255191

TransactionError.Code​

NameNumberDescription
UNKNOWN0Generic status codes
UNIMPLEMENTED1
NOT_FOUND2
ALREADY_EXISTS3
UNAUTHORIZED4
BAD_REQUEST5Request is malformed
INVALID_REQUEST_TYPE6Invalid/unsupported transaction request type
INVALID_ACCOUNT_ID7Invalid account ID
INVALID_TRANSFER8Invalid transfer parameters (amount, accounts, etc)
MESSAGE_TOO_LARGE10The request message was too large to be processed.
INVALID_SIGNATURE11The request signature does not match the request payload
VERIFICATION_FAILED12Signature verification failed
REPLAY_PROTECTION20Replay protection was triggered, e.g. nonce reuse, bad block window
INVALID_EXPRESSION21Invalid expression used
INCORRECT_TYPE22
ACCOUNT_FROZEN23Ledger-specific status codes
UNMODIFIED_STATE24
INSUFFICIENT_BALANCE25
BALANCE_OVERFLOW26
ACCOUNT_DEPTH_EXCEEDED27
HOLDING_LIMIT_EXCEEDED28
INVALID_TARGET30Action specific status codes