TrustWallet

wallet-core/src/proto at master · trustwallet/wallet-core

如何生成 Google Protocol Buffers 文件

pseudomuto/protoc-gen-doc: Documentation generator plugin for Google Protocol Buffers

git clone https://github.com/trustwallet/wallet-core.git /tmp/src/trustwallet-core
bash tc.sh --gen-proto-doc /tmp/src/trustwallet-core/src/proto /tmp/output.md

Generated Date:2019-09-12T11:57:39+08:00

Protocol Documentation

Table of Contents

Top

Ethereum.proto

SigningInput

Input data necessary to create a signed transaction.

FieldTypeLabelDescription
chain_idbytesChain identifier (256-bit number)
noncebytesNonce (256-bit number)
gas_pricebytesGas price (256-bit number)
gas_limitbytesGas limit (256-bit number)
to_addressstringRecipient's address.
amountbytesAmount to send in wei (256-bit number)
payloadbytesOptional payload
private_keybytesPrivate key.

SigningOutput

Transaction signing output.

FieldTypeLabelDescription
encodedbytesSigned and encoded transaction bytes.
vbytes
rbytes
sbytes

Top

Semux.proto

SigningInput

Input data necessary to create a signed transaction.

FieldTypeLabelDescription
private_keybytes
destinationstring
valueuint64
feeuint64
nonceuint64current latest transaction serial number
timestampuint64current timestamp in millisecond

SigningOutput

Transaction signing output.

FieldTypeLabelDescription
encodedbytes

Top

Aion.proto

SigningInput

Input data necessary to create a signed transaction.

FieldTypeLabelDescription
noncebytesNonce (256-bit number)
gas_pricebytesGas price (256-bit number)
gas_limitbytesGas limit (256-bit number)
to_addressstringRecipient's address.
amountbytesAmount to send in wei (256-bit number)
payloadbytesOptional payload
private_keybytesPrivate key.

SigningOutput

Transaction signing output.

FieldTypeLabelDescription
encodedbytesSigned and encoded transaction bytes.
signaturebytesSignature.

Top

Cosmos.proto

Amount

Amount

FieldTypeLabelDescription
denomstring
amountint64

Fee

Fee

FieldTypeLabelDescription
amountsAmountrepeated
gasuint64

SendCoinsMessage

Message for sending coins.

FieldTypeLabelDescription
from_addressstring
to_addressstring
amountsAmountrepeated
type_prefixstringdefault is cosmos-sdk/MsgSend

Signature

Signature

FieldTypeLabelDescription
public_keybytes
signaturebytes

SigningInput

Input data necessary to create a signed order.

FieldTypeLabelDescription
account_numberuint64
chain_idstring
feeFee
memostring
sequenceuint64
private_keybytes
send_coins_messageSendCoinsMessage
stake_messageStakeMessage
unstake_messageStakeMessage
withdraw_stake_reward_messageWithdrawStakeRewardMessage
type_prefixstringdefault is cosmos-sdk/MsgSend

SigningOutput

Transaction signing output.

FieldTypeLabelDescription
signaturebytesSignature
jsonstringSigned transaction in JSON.

StakeMessage

Message for staking.

FieldTypeLabelDescription
delegator_addressstring
validator_addressstring
amountAmount
type_prefixstringcosmos-sdk/MsgDelegate to stake and cosmos-sdk/MsgUndelegate to unstake

Transaction

Transaction

FieldTypeLabelDescription
feeFee
memostring
signatureSignature
send_coins_messageSendCoinsMessage
stake_messageStakeMessage
unstake_messageStakeMessage
withdraw_stake_reward_messageWithdrawStakeRewardMessage

WithdrawStakeRewardMessage

Message for staking.

FieldTypeLabelDescription
delegator_addressstring
validator_addressstring
type_prefixstringdefault is cosmos-sdk/MsgWithdrawDelegationReward

Top

ARK.proto

SigningInput

Input data necessary to create a signed transaction.

FieldTypeLabelDescription
typeTransactionTypeTransaction type
amountuint64Amount to send
feeuint64Fee
to_addressstringRecipient's address.
timestampuint32Timestamp
private_keybytesPrivate key.

SigningOutput

FieldTypeLabelDescription
encodedstringJSON-encoded transaction parameters.
signaturebytesSignature.

TransactionType

NameNumberDescription
Transfer0

Top

IoTeX.proto

Action

FieldTypeLabelDescription
coreActionCore
senderPubKeybytes
signaturebytes

ActionCore

FieldTypeLabelDescription
versionuint32
nonceuint64
gasLimituint64
gasPricestring
transferTransfer
executionExecution

Execution

FieldTypeLabelDescription
amountstring
contractstring
databytes

SigningInput

transaction signing input

FieldTypeLabelDescription
versionuint32
nonceuint64
gasLimituint64
gasPricestring
privateKeybytes
transferTransfer
executionExecution

SigningOutput

transaction signing output

FieldTypeLabelDescription
encodedbytesSigned and encoded Action bytes
hashbytesSigned Action hash

Transfer

FieldTypeLabelDescription
amountstring
recipientstring
payloadbytes

Top

Bitcoin.proto

OutPoint

Bitcoin transaction out-point reference.

FieldTypeLabelDescription
hashbytesThe hash of the referenced transaction.
indexuint32The index of the specific output in the transaction.
sequenceuint32Transaction version as defined by the sender.

SigningInput

Input data necessary to create a signed transaction.

FieldTypeLabelDescription
hash_typeuint32Hash type to use when signing.
amountint64Amount to send.
byte_feeint64Transaction fee per byte.
to_addressstringRecipient's address.
change_addressstringChange address.
private_keybytesrepeatedAvailable private keys.
scriptsSigningInput.ScriptsEntryrepeatedAvailable redeem scripts indexed by script hash.
utxoUnspentTransactionrepeatedAvailable unspent transaction outputs.
use_max_amountboolIf sending max amount.
coin_typeuint32Coin type (forks).

SigningInput.ScriptsEntry

FieldTypeLabelDescription
keystring
valuebytes

SigningOutput

Transaction signing output.

FieldTypeLabelDescription
transactionTransactionResulting transaction. Note that the amount may be different than the requested amount to account for fees and available funds.
encodedbytesSigned and encoded transaction bytes.
feeint64Total transaction fees.
max_amountint64Maximum spendable amount.
transaction_idstringTransaction id

Transaction

FieldTypeLabelDescription
versionsint32Transaction data format version.
lockTimeuint32The block number or timestamp at which this transaction is unlocked.
inputsTransactionInputrepeatedA list of 1 or more transaction inputs or sources for coins.
outputsTransactionOutputrepeatedA list of 1 or more transaction outputs or destinations for coins

TransactionInput

Bitcoin transaction input.

FieldTypeLabelDescription
previousOutputOutPointReference to the previous transaction's output.
sequenceuint32Transaction version as defined by the sender.
scriptbytesComputational script for confirming transaction authorization.

TransactionOutput

Bitcoin transaction output.

FieldTypeLabelDescription
valueint64Transaction amount.
scriptbytesUsually contains the public key as a Bitcoin script setting up conditions to claim this output.

TransactionPlan

Describes a preliminary transaction plan.

FieldTypeLabelDescription
amountint64Amount to be received at the other end.
available_amountint64Maximum available amount.
feeint64Estimated transaction fee.
changeint64Change.
utxosUnspentTransactionrepeatedSelected unspent transaction outputs.

UnspentTransaction

FieldTypeLabelDescription
out_pointOutPoint
scriptbytes
amountint64

Top

Decred.proto

SigningOutput

Transaction signing output.

FieldTypeLabelDescription
transactionTransactionResulting transaction. Note that the amount may be different than the requested amount to account for fees and available funds.
encodedbytesSigned and encoded transaction bytes.
feeint64Total transaction fees.
max_amountint64Maximum spendable amount.
transaction_idstringTransaction id

Transaction

FieldTypeLabelDescription
serializeTypeuint32Serialization format
versionuint32Transaction data format version
inputsTransactionInputrepeatedA list of 1 or more transaction inputs or sources for coins.
outputsTransactionOutputrepeatedA list of 1 or more transaction outputs or destinations for coins
lockTimeuint32The time when a transaction can be spent (usually zero, in which case it has no effect).
expiryuint32The block height at which the transaction expires and is no longer valid.

TransactionInput

Decred transaction input.

FieldTypeLabelDescription
previousOutputTW.Bitcoin.Proto.OutPointReference to the previous transaction's output.
sequenceuint32Transaction version as defined by the sender.
valueInint64
blockHeightuint32
blockIndexuint32
scriptbytesComputational script for confirming transaction authorization.

TransactionOutput

Decred transaction output.

FieldTypeLabelDescription
valueint64Transaction amount.
versionuint32Transaction output version.
scriptbytesUsually contains the public key as a Decred script setting up conditions to claim this output.

Top

Zilliqa.proto

SigningInput

Input data necessary to create a signed transaction.

FieldTypeLabelDescription
versionuint32Transaction version
nonceuint64Nonce
to_addressstringRecipient's address.
amountbytesAmount to send (256-bit number)
gas_pricebytesGasPrice (256-bit number)
gas_limituint64GasLimit
private_keybytesPrivate Key
codebytesSmart contract code
databytesString-ified JSON object specifying the transition parameter

SigningOutput

Transaction signing output.

FieldTypeLabelDescription
signaturebytesSigned signature bytes.

Top

Solana.proto

DeactivateStake

FieldTypeLabelDescription
private_keybytesThe stake account private key
vote_pubkeystring

SigningInput

Input data necessary to create a signed transaction.

FieldTypeLabelDescription
transfer_transactionTransfer
stake_transactionStake
deactivate_stake_transactionDeactivateStake
withdraw_transactionWithdrawStake
recent_blockhashstring

SigningOutput

Transaction signing output.

FieldTypeLabelDescription
encodedbytes

Stake

FieldTypeLabelDescription
from_private_keybytes
stake_private_keybytes
vote_pubkeystring
valueuint64

Transfer

FieldTypeLabelDescription
private_keybytes
recipientstring
valueuint64

WithdrawStake

FieldTypeLabelDescription
private_keybytesThe stake account private key
recipientstring
valueuint64

Top

Ontology.proto

SigningInput

Input data necessary to create a signed transaction.

FieldTypeLabelDescription
contractstring
methodstring
owner_private_keybytes
to_addressstringbase58 encode address string (160-bit number)
amountuint64
payer_private_keybytes
gas_priceuint64
gas_limituint64
query_addressstringbase58 encode address string (160-bit number)
nonceuint32

SigningOutput

Transaction signing output.

FieldTypeLabelDescription
encodedbytesSigned and encoded transaction bytes.

Top

Stellar.proto

MemoHash

FieldTypeLabelDescription
hashbytes

MemoId

FieldTypeLabelDescription
idint64

MemoText

FieldTypeLabelDescription
textstring

MemoVoid

SigningInput

Input data necessary to create a signed transaction.

FieldTypeLabelDescription
amountint64
feeint32
sequenceint64
accountstring
destinationstring
private_keybytesPrivate key.
memo_voidMemoVoid
memo_textMemoText
memo_idMemoId
memo_hashMemoHash
memo_return_hashMemoHash
operation_typeSigningInput.OperationType
passphrasestring

SigningOutput

Transaction signing output.

FieldTypeLabelDescription
signaturestringSignature.

SigningInput.OperationType

NameNumberDescription
CREATE_ACCOUNT0
PAYMENT1

Top

Waves.proto

SigningInput

Input data necessary to create a signed transaction.

FieldTypeLabelDescription
amountint64
assetstring
feeint64minimum 0.001 Waves (100000 Wavelets) for now
fee_assetstring
tostring
attachmentbytesany 140 bytes payload, will be displayed to the client as utf-8 string
timestampint64in millis
private_keybytes

SigningOutput

Transaction signing output.

FieldTypeLabelDescription
signaturebytes
jsonstring

Top

Common.proto

Result

Result type.

FieldTypeLabelDescription
successboolWhether the operation was successful.
errorstringOptional error message, only present if success is false.
objectsgoogle.protobuf.AnyrepeatedResult objects, if any.

Top

Ripple.proto

SigningInput

Input data necessary to create a signed transaction.

FieldTypeLabelDescription
amountint64
feeint64
sequenceint32
last_ledger_sequenceint32
accountstring
destinationstring
destination_tagint64
flagsint64
private_keybytes

SigningOutput

Transaction signing output.

FieldTypeLabelDescription
encodedbytes

Top

Binance.proto

CancelTradeOrder

FieldTypeLabelDescription
senderbytes0x166E681B // prefix

originating address | | symbol | string | | symbol for trading pair in full name of the tokens | | refid | string | | order id to cancel |

ClaimHTLOrder

FieldTypeLabelDescription
frombytes0xC1665300 // prefix

signer address | | swap_id | bytes | | | | random_number | bytes | | |

DepositHTLTOrder

FieldTypeLabelDescription
frombytes0xB33F9A24 // prefix

signer address | | amount | SendOrder.Token | repeated | | | swap_id | bytes | | |

HTLTOrder

FieldTypeLabelDescription
frombytes0xB33F9A24 // prefix

signer address | | to | bytes | | recipient address | | recipient_other_chain | string | | | | sender_other_chain | string | | | | random_number_hash | bytes | | hash of a random number and timestamp, based on SHA256 | | timestamp | int64 | | | | amount | SendOrder.Token | repeated | | | expected_income | string | | expected gained token on the other chain | | height_span | int64 | | | | cross_chain | bool | | |

RefundHTLTOrder

FieldTypeLabelDescription
frombytes0x3454A27C // prefix

signer address | | swap_id | bytes | | |

SendOrder

FieldTypeLabelDescription
inputsSendOrder.Inputrepeated
outputsSendOrder.Outputrepeated

SendOrder.Input

FieldTypeLabelDescription
addressbytes
coinsSendOrder.Tokenrepeated

SendOrder.Output

FieldTypeLabelDescription
addressbytes
coinsSendOrder.Tokenrepeated

SendOrder.Token

0x2A2C87FA

FieldTypeLabelDescription
denomstring
amountint64

Signature

FieldTypeLabelDescription
pub_keybytespublic key bytes of the signer address
signaturebytessignature bytes, please check chain access section for signature generation
account_numberint64another identifier of signer, which can be read from chain by account REST API or RPC
sequenceint64sequence number for the next transaction

Signature.PubKey

0xEB5AE987 // prefix bytes // public key bytes

SigningInput

Input data necessary to create a signed order.

FieldTypeLabelDescription
chain_idstring
account_numberint64
sequenceint64
sourceint64
memostring
private_keybytes
trade_orderTradeOrder
cancel_trade_orderCancelTradeOrder
send_orderSendOrder
freeze_orderTokenFreezeOrder
unfreeze_orderTokenUnfreezeOrder
htlt_orderHTLTOrder
depositHTLT_orderDepositHTLTOrder
claimHTLT_orderClaimHTLOrder
refundHTLT_orderRefundHTLTOrder

SigningOutput

Transaction signing output.

FieldTypeLabelDescription
encodedbytesSigned and encoded transaction bytes.

TokenFreezeOrder

FieldTypeLabelDescription
frombytes0xE774B32D // prefix

owner address | | symbol | string | | token symbol, in full name with "-" suffix | | amount | int64 | | amount of token to freeze |

TokenUnfreezeOrder

FieldTypeLabelDescription
frombytes0x6515FF0D // prefix

owner address | | symbol | string | | token symbol, in full name with "-" suffix | | amount | int64 | | amount of token to unfreeze |

TradeOrder

FieldTypeLabelDescription
senderbytes0xCE6DC043 // prefix

originating address | | id | string | | order id, optional | | symbol | string | | symbol for trading pair in full name of the tokens | | ordertype | int64 | | only accept 2 for now, meaning limit order | | side | int64 | | 1 for buy and 2 fory sell | | price | int64 | | price of the order, which is the real price multiplied by 1e8 (10^8) and rounded to integer | | quantity | int64 | | quantity of the order, which is the real price multiplied by 1e8 (10^8) and rounded to integer | | timeinforce | int64 | | 1 for Good Till Expire(GTE) order and 3 for Immediate Or Cancel (IOC) |

Transaction

FieldTypeLabelDescription
msgsbytesrepeatedint64 SIZE-OF-ENCODED // varint encoded length of the structure after encoding 0xF0625DEE // prefix

array of size 1, containing the transaction message, which are one of the transaction type below | | signatures | bytes | repeated | array of size 1, containing the standard signature structure of the transaction sender | | memo | string | | a short sentence of remark for the transaction, only for Transfer transactions. | | source | int64 | | an identifier for tools triggerring this transaction, set to zero if unwilling to disclose. | | data | bytes | | reserved for future use |

Top

Icon.proto

SigningInput

Input data necessary to create a signed transaction.

FieldTypeLabelDescription
from_addressstringSender address.
to_addressstringRecipient address.
valuebytesTransfer amount.
step_limitbytesThe amount of step to send with the transaction.
timestampint64UNIX epoch time (from 1970.1.1 00:00:00) in microseconds
noncebytesInteger value increased by request to avoid replay attacks.
network_idbytesNetwork identifier
private_keybytesPrivate key.

SigningOutput

Transaction signing output.

FieldTypeLabelDescription
encodedstringJSON-encoded transaction parameters.
signaturebytesSignature.

Top

VeChain.proto

Clause

FieldTypeLabelDescription
tostringRecipient address.
valuebytesTransaction amount.
databytesPayload data.

SigningInput

Input data necessary to create a signed transaction.

FieldTypeLabelDescription
chain_taguint32Last byte of the genesis block ID which is used to identify a blockchain to prevent the cross-chain replay attack.
block_refuint64Reference to a specific block.
expirationuint32How long, in terms of the number of blocks, the transaction will be allowed to be mined in VeChainThor.
clausesClauserepeatedAn array of Clause objects. / / Each clause contains fields To, Value and Data to enable a single transaction to carry multiple tasks issued / by the transaction sender.
gas_price_coefuint32Coefficient used to calculate the gas price for the transaction.
gasuint64Maximum amount of gas allowed to pay for the transaction.
depends_onbytesID of the transaction on which the current transaction depends.
nonceuint64Number set by user.
private_keybytesPrivate key.

SigningOutput

Transaction signing output.

FieldTypeLabelDescription
encodedbytesSigned and encoded transaction bytes.
signaturebytesSignature.

Top

Tezos.proto

DelegationOperationData

Delegation operation specific data. Next field: 2

FieldTypeLabelDescription
delegatestring

Operation

An operation that can be applied to the Tezos blockchain. Next field: 12

FieldTypeLabelDescription
counterint64
sourcestring
feeint64
gas_limitint64
storage_limitint64
kindOperation.OperationKind
reveal_operation_dataRevealOperationData
transaction_operation_dataTransactionOperationData
origination_operation_dataOriginationOperationData
delegation_operation_dataDelegationOperationData

OperationList

A list of operations and a branch. Next field: 3

FieldTypeLabelDescription
branchstring
operationsOperationrepeated

OriginationOperationData

Origination operation specific data. Next field: 3

FieldTypeLabelDescription
manager_pubkeystring
balanceint64

RevealOperationData

Reveal operation specific data. Next field: 2

FieldTypeLabelDescription
public_keybytes

SigningInput

Input data necessary to create a signed Tezos transaction. Next field: 3

FieldTypeLabelDescription
operation_listOperationList
private_keybytes

SigningOutput

Transaction signing output. Next field: 2

FieldTypeLabelDescription
signed_bytesbytes

TransactionOperationData

Transaction operation specific data. Next field: 3

FieldTypeLabelDescription
destinationstring
amountint64

Operation.OperationKind

NameNumberDescription
ENDORSEMENT0Note: Proto3 semantics require a zero value.
REVEAL7
TRANSACTION8
ORIGINATION9
DELEGATION10

Top

Any.proto

SigningInput

FieldTypeLabelDescription
coin_typeuint32BIP44 network ID
transactionstringJSON transaction
private_keystringPrivate Key in HEX format

SigningOutput

FieldTypeLabelDescription
errorSigningOutput.Error
successbool
outputstring

SigningOutput.Error

FieldTypeLabelDescription
codeuint32Error code
descriptionstringError description

Top

Nebulas.proto

Data

FieldTypeLabelDescription
typestring
payloadbytes

RawTransaction

Raw transaction data

FieldTypeLabelDescription
hashbytes
frombytes
tobytes
valuebytes
nonceuint64
timestampint64
dataData
chain_iduint32
gas_pricebytes
gas_limitbytes
alguint32
signbytes

SigningInput

Input data necessary to create a signed transaction.

FieldTypeLabelDescription
from_addressstringsender's address.
chain_idbytesChain identifier (256-bit number)
noncebytesNonce (256-bit number)
gas_pricebytesGas price (256-bit number)
gas_limitbytesGas limit (256-bit number)
to_addressstringRecipient's address.
amountbytesAmount to send in wei, 1 NAS = 10^18 Wei (256-bit number)
timestampbytesTimestamp to create transaction (256-bit number)
payloadstringOptional payload
private_keybytesPrivate key.

SigningOutput

Transaction signing output.

FieldTypeLabelDescription
algorithmuint32
signaturebytes
rawstring

Top

Bravo.proto

SigningInput

Input data necessary to create a signed transaction.

FieldTypeLabelDescription
chain_idbytesChain id (256-bit number)
senderstringSender's username
recipientstringRecipient's username
amountdoubleAmount in "BRAVO" or "TEST"
testnetboolWhether the transaction is for testnet
memostringMemo to attach to the transaction
reference_block_idbytesReference Block Id (160-bits)
reference_block_timesfixed32Timestamp on the reference block
private_keybytesSender's private key's raw bytes

SigningOutput

Transaction signing output.

FieldTypeLabelDescription
json_encodedstringJSON of the signed transaction.

Top

Tron.proto

BlockHeader

FieldTypeLabelDescription
timestampint64
tx_trie_rootbytes
parent_hashbytes
numberint64
witness_addressbytes
versionint32

FreezeBalanceContract

FieldTypeLabelDescription
owner_addressstringSender address.
frozen_balanceint64Frozen balance. Minimum 1
frozen_durationint64Frozen duration
resourcestringResource type: BANDWIDTH
receiver_addressstringReceiver address

SigningInput

FieldTypeLabelDescription
transactionTransactionTransaction.
private_keybytesPrivate key.

SigningOutput

Transaction signing output.

FieldTypeLabelDescription
idbytesTransaction identifier.
signaturebytesSignature.
ref_block_bytesbytes
ref_block_hashbytes

Transaction

FieldTypeLabelDescription
timestampint64Transaction timestamp in milliseconds.
expirationint64Transaction expiration time in milliseconds.
block_headerBlockHeaderTransaction block header.
fee_limitint64Transaction fee limit
transferTransferContract
transfer_assetTransferAssetContract
freeze_balanceFreezeBalanceContract
unfreeze_balanceUnfreezeBalanceContract
unfreeze_assetUnfreezeAssetContract
withdraw_balanceWithdrawBalanceContract
vote_assetVoteAssetContract
vote_witnessVoteWitnessContract
trigger_smart_contractTriggerSmartContract

TransferAssetContract

FieldTypeLabelDescription
asset_namestringAsset name.
owner_addressstringSender address.
to_addressstringRecipient address.
amountint64Amount to send.

TransferContract

FieldTypeLabelDescription
owner_addressstringSender address.
to_addressstringRecipient address.
amountint64Amount to send.

TriggerSmartContract

FieldTypeLabelDescription
owner_addressstring
contract_addressstring
call_valueint64
databytes
call_token_valueint64
token_idint64

UnfreezeAssetContract

FieldTypeLabelDescription
owner_addressstringSender address

UnfreezeBalanceContract

FieldTypeLabelDescription
owner_addressstringSender address
resourcestringResource type: BANDWIDTH
receiver_addressstringReceiver address

VoteAssetContract

FieldTypeLabelDescription
owner_addressstringSender address
vote_addressstringrepeatedVote addresses
supportbool
countint32

VoteWitnessContract

FieldTypeLabelDescription
owner_addressstring
votesVoteWitnessContract.Voterepeated
supportbool

VoteWitnessContract.Vote

FieldTypeLabelDescription
vote_addressstring
vote_countint64

WithdrawBalanceContract

FieldTypeLabelDescription
owner_addressstringSender address

Top

Theta.proto

SigningInput

Input data necessary to create a signed transaction

FieldTypeLabelDescription
chain_idstringChain ID string, mainnet, testnet and privatenet
to_addressstringRecipient address
theta_amountbytesTheta token amount to send in wei (256-bit number)
tfuel_amountbytesTFuel token amount to send in wei (256-bit number)
sequenceuint64Sequence number of the transaction for the sender address
feebytesFee amount in TFuel wei for the transaction (256-bit number)
private_keybytesPrivate key

SigningOutput

Transaction signing output

FieldTypeLabelDescription
encodedbytesSigned and encoded transaction bytes
signaturebytesSignature

Top

Aeternity.proto

SigningInput

Input data necessary to create a signed transaction.

FieldTypeLabelDescription
from_addressstringAddress of the sender with "ak_" prefix
to_addressstringAddress of the recipient with "ak_" prefix
amountbytes
feebytes
payloadstringMessage, optional
ttluint64Time to live until block height
nonceuint64
private_keybytes

SigningOutput

Transaction signing output.

FieldTypeLabelDescription
encodedstringSigned and encoded transaction bytes, Base64 with checksum
signaturestringSignature, Base58 with checksum

Top

Nimiq.proto

SigningInput

Input data necessary to create a signed transaction.

FieldTypeLabelDescription
private_keybytes
destinationstring
valueuint64
feeuint64
validity_start_heightuint32

SigningOutput

Transaction signing output.

FieldTypeLabelDescription
encodedbytes

Top

Harmony.proto

SigningInput

Input data necessary to create a signed transaction.

FieldTypeLabelDescription
chain_idbytesChain identifier (256-bit number)
noncebytesNonce (256-bit number)
gas_pricebytesGas price (256-bit number)
gas_limitbytesGas limit (256-bit number)
to_addressstringRecipient's address.
amountbytesAmount to send in wei (256-bit number)
payloadbytesOptional payload
private_keybytesPrivate key.
from_shard_idbytesFrom shard ID (256-bit number)
to_shard_idbytesTo Shard ID (256-bit number)

SigningOutput

Transaction signing output.

FieldTypeLabelDescription
encodedbytesSigned and encoded transaction bytes.
vbytes
rbytes
sbytes

Top

EOS.proto

Asset

Values for an Asset object.

FieldTypeLabelDescription
amountint64
decimalsuint32
symbolstring

SigningInput

Input data necessary to create a signed transaction.

FieldTypeLabelDescription
chain_idbytesChain id (256-bit number)
reference_block_idbytesReference Block Id (256-bits)
reference_block_timesfixed32Timestamp on the reference block
currencystringCurrency (e.g. "eosio.token")
senderstringSender's username
recipientstringRecipient's username
memostringMemo attached to the transaction
assetAssetAsset details and amount
private_keybytesSender's private key's raw bytes
private_key_typeKeyTypeType of the private key

SigningOutput

Transaction signing output.

FieldTypeLabelDescription
json_encodedstringJSON of the packed transaction.

KeyType

NameNumberDescription
LEGACY0
MODERNK11
MODERNR12

Top

Nano.proto

SigningInput

Input data necessary to create a signed transaction.

FieldTypeLabelDescription
private_keybytesPrivate key
parent_blockbytesOptional parent block hash
link_blockbytesHash of a block to receive from
link_recipientstringRecipient address to send coins to
representativestringRepresentative address
balancestringAccount balance (128-bit unsigned integer, as a string)

SigningOutput

Transaction signing output.

FieldTypeLabelDescription
signaturebytesSignature
block_hashbytesBlock hash

Top

IOST.proto

AccountInfo

FieldTypeLabelDescription
namestring
active_keybytes
owner_keybytes

Action

The message defines transaction action struct.

FieldTypeLabelDescription
contractstringcontract name
action_namestringaction name
datastringdata

AmountLimit

The message defines transaction amount limit struct.

FieldTypeLabelDescription
tokenstringtoken name
valuestringlimit value

Signature

The message defines signature struct.

FieldTypeLabelDescription
algorithmAlgorithmsignature algorithm
signaturebytessignature bytes
public_keybytespublic key

SigningInput

Input data necessary to create a signed transaction.

FieldTypeLabelDescription
accountAccountInfo
transaction_templateTransaction
transfer_destinationstring
transfer_amountstring
transfer_memostring

SigningOutput

Transaction signing output.

FieldTypeLabelDescription
transactionTransactionSigned transaction

Transaction

The message defines the transaction request.

FieldTypeLabelDescription
timeint64transaction timestamp
expirationint64expiration timestamp
gas_ratiodoublegas price
gas_limitdoublegas limit
delayint64delay nanoseconds
chain_iduint32chain id
actionsActionrepeatedaction list
amount_limitAmountLimitrepeatedamount limit
signersstringrepeatedsigner list
signaturesSignaturerepeatedsignatures of signers
publisherstringpublisher
publisher_sigsSignaturerepeatedsignatures of publisher

Algorithm

The enumeration defines the signature algorithm.

NameNumberDescription
UNKNOWN0unknown
SECP256K11secp256k1
ED255192ed25519

Scalar Value Types

.proto TypeNotesC++ TypeJava TypePython Type
doubledoubledoublefloat
floatfloatfloatfloat
int32Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead.int32intint
int64Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead.int64longint/long
uint32Uses variable-length encoding.uint32intint/long
uint64Uses variable-length encoding.uint64longint/long
sint32Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s.int32intint
sint64Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s.int64longint/long
fixed32Always four bytes. More efficient than uint32 if values are often greater than 2^28.uint32intint
fixed64Always eight bytes. More efficient than uint64 if values are often greater than 2^56.uint64longint/long
sfixed32Always four bytes.int32intint
sfixed64Always eight bytes.int64longint/long
boolboolbooleanboolean
stringA string must always contain UTF-8 encoded or 7-bit ASCII text.stringStringstr/unicode
bytesMay contain any arbitrary sequence of bytes.stringByteStringstr

Protos File Tree


.
├── Aeternity.proto
├── Aion.proto
├── Any.proto
├── ARK.proto
├── Binance.proto
├── Bitcoin.proto
├── Bravo.proto
├── Common.proto
├── Cosmos.proto
├── Decred.proto
├── EOS.proto
├── Ethereum.proto
├── Harmony.proto
├── Icon.proto
├── IOST.proto
├── IoTeX.proto
├── Nano.proto
├── Nebulas.proto
├── Nimiq.proto
├── Ontology.proto
├── Ripple.proto
├── Semux.proto
├── Solana.proto
├── Stellar.proto
├── Tezos.proto
├── Theta.proto
├── Tron.proto
├── VeChain.proto
├── Waves.proto
└── Zilliqa.proto

0 directories, 30 files

Protobuf sources

src:./Ethereum.proto


syntax = "proto3";

package TW.Ethereum.Proto;
option java_package = "wallet.core.jni.proto";

// Input data necessary to create a signed transaction.
message SigningInput {
    // Chain identifier (256-bit number)
    bytes chain_id = 1;

    // Nonce (256-bit number)
    bytes nonce = 2;

    // Gas price (256-bit number)
    bytes gas_price = 3;

    // Gas limit (256-bit number)
    bytes gas_limit = 4;

    // Recipient's address.
    string to_address = 5;

    // Amount to send in wei (256-bit number)
    bytes amount = 6;

    // Optional payload
    bytes payload = 7;

    // Private key.
    bytes private_key = 8;
}

// Transaction signing output.
message SigningOutput {
    // Signed and encoded transaction bytes.
    bytes encoded = 1;

    bytes v = 2;
    bytes r = 3;
    bytes s = 4;
}

src:./Semux.proto


syntax = "proto3";

package TW.Semux.Proto;
option java_package = "wallet.core.jni.proto";

// Input data necessary to create a signed transaction.
message SigningInput {
    bytes private_key = 1;

    string destination = 2;

    uint64 value = 3;

    uint64 fee = 4;

    // current latest transaction serial number
    uint64 nonce = 5;

    // current timestamp in millisecond
    uint64 timestamp = 6;
}

// Transaction signing output.
message SigningOutput {
    bytes encoded = 1;
}

src:./Aion.proto


syntax = "proto3";

package TW.Aion.Proto;
option java_package = "wallet.core.jni.proto";

// Input data necessary to create a signed transaction.
message SigningInput {
    // Nonce (256-bit number)
    bytes nonce = 1;

    // Gas price (256-bit number)
    bytes gas_price = 2;

    // Gas limit (256-bit number)
    bytes gas_limit = 3;

    // Recipient's address.
    string to_address = 4;

    // Amount to send in wei (256-bit number)
    bytes amount = 5;

    // Optional payload
    bytes payload = 6;

    // Private key.
    bytes private_key = 7;
}

// Transaction signing output.
message SigningOutput {
    // Signed and encoded transaction bytes.
    bytes encoded = 1;

    // Signature.
    bytes signature = 2;
}

src:./Cosmos.proto


syntax = "proto3";

package TW.Cosmos.Proto;
option java_package = "wallet.core.jni.proto";

// Amount
message Amount {
    string denom = 1;
    int64 amount = 2;
}

// Fee
message Fee {
    repeated Amount amounts = 1;
    uint64 gas = 2;
}

// Message for sending coins.
message SendCoinsMessage {
    string from_address = 1;
    string to_address = 2;
    repeated Amount amounts = 3;
    // default is cosmos-sdk/MsgSend
    string type_prefix = 4;
}

// Message for staking.
message StakeMessage {
    string delegator_address = 1;
    string validator_address = 2;
    Amount amount = 3;
    // cosmos-sdk/MsgDelegate to stake and cosmos-sdk/MsgUndelegate to unstake
    string type_prefix = 4;
}

// Message for staking.
message WithdrawStakeRewardMessage {
    string delegator_address = 1;
    string validator_address = 2;
    // default is cosmos-sdk/MsgWithdrawDelegationReward
    string type_prefix = 3;
}

// Signature
message Signature {
    bytes public_key = 1;
    bytes signature = 2;
}

// Transaction
message Transaction {
    Fee fee = 1;
    string memo = 2;
    Signature signature = 3;

    oneof message_oneof {
        SendCoinsMessage send_coins_message = 4;
        StakeMessage stake_message = 5;
        StakeMessage unstake_message = 6;
        WithdrawStakeRewardMessage withdraw_stake_reward_message = 7;
    }
}

// Input data necessary to create a signed order.
message SigningInput {
    uint64 account_number = 1;
    string chain_id = 2;
    Fee fee = 3;
    string memo = 4;
    uint64 sequence = 5; 

    bytes private_key = 6;

    oneof message_oneof {
        SendCoinsMessage send_coins_message = 7;
        StakeMessage stake_message = 8;
        StakeMessage unstake_message = 9;
        WithdrawStakeRewardMessage withdraw_stake_reward_message = 10;
    }
    // default is cosmos-sdk/MsgSend
    string type_prefix = 11;
}

// Transaction signing output.
message SigningOutput {
    // Signature
    bytes signature = 1;
    // Signed transaction in JSON.
    string json = 2;
}

src:./ARK.proto


syntax = "proto3";

package TW.ARK.Proto;
option java_package = "wallet.core.jni.proto";

enum TransactionType {
    Transfer = 0;
}

// Input data necessary to create a signed transaction.
message SigningInput {
    // Transaction type
    TransactionType type = 1;

    // Amount to send
    uint64 amount = 2;

    // Fee
    uint64 fee = 3;

    // Recipient's address.
    string to_address = 4;

    // Timestamp
    uint32 timestamp = 5;

    // Private key.
    bytes private_key = 6;
}

message SigningOutput {
    // JSON-encoded transaction parameters.
    string encoded = 1;

    // Signature.
    bytes signature = 2;
}

src:./IoTeX.proto


syntax = "proto3";

package TW.IoTeX.Proto;
option java_package = "wallet.core.jni.proto";

message Transfer {
    string amount  = 1;
    string recipient = 2;
    bytes payload  = 3;
}

message Execution {
    string amount  = 1;
    string contract = 2;
    bytes data = 3;
}

message ActionCore {
    uint32 version = 1;
    uint64 nonce = 2;
    uint64 gasLimit = 3;
    string gasPrice = 4;
    oneof action {
        Transfer transfer = 10;
        Execution execution = 12;
  }
}

message Action {
    ActionCore core = 1;
    bytes senderPubKey = 2;
    bytes signature = 3;
}

// transaction signing input
message SigningInput {
    uint32 version = 1;
    uint64 nonce = 2;
    uint64 gasLimit = 3;
    string gasPrice = 4;
    bytes privateKey = 5;
    oneof action {
        Transfer transfer = 10;
        Execution execution = 12;
  }
}

// transaction signing output
message SigningOutput {
    // Signed and encoded Action bytes
    bytes encoded = 1;

    // Signed Action hash
    bytes hash = 2;
}

src:./Bitcoin.proto


syntax = "proto3";

package TW.Bitcoin.Proto;
option java_package = "wallet.core.jni.proto";

message Transaction {
    // Transaction data format version.
    sint32 version = 1;

    // The block number or timestamp at which this transaction is unlocked.
    uint32 lockTime = 2;

    // A list of 1 or more transaction inputs or sources for coins.
    repeated TransactionInput inputs = 3;

    // A list of 1 or more transaction outputs or destinations for coins
    repeated TransactionOutput outputs = 4;
}

// Bitcoin transaction input.
message TransactionInput {
    // Reference to the previous transaction's output.
    OutPoint previousOutput = 1;

    // Transaction version as defined by the sender.
    uint32 sequence = 2;

    // Computational script for confirming transaction authorization.
    bytes script = 3;
}

// Bitcoin transaction out-point reference.
message OutPoint {
    // The hash of the referenced transaction.
    bytes hash = 1;

    // The index of the specific output in the transaction.
    uint32 index = 2;

    // Transaction version as defined by the sender.
    uint32 sequence = 3;
}

// Bitcoin transaction output.
message TransactionOutput {
    // Transaction amount.
    int64 value = 1;

    // Usually contains the public key as a Bitcoin script setting up conditions to claim this output.
    bytes script = 2;
}

message UnspentTransaction {
    OutPoint out_point = 1;
    bytes script = 2;
    int64 amount = 3;
}

// Input data necessary to create a signed transaction.
message SigningInput {
    // Hash type to use when signing.
    uint32 hash_type = 1;

    // Amount to send.
    int64 amount = 2;

    // Transaction fee per byte.
    int64 byte_fee = 3;

    // Recipient's address.
    string to_address = 4;

    // Change address.
    string change_address = 5;

    // Available private keys.
    repeated bytes private_key = 10;

    // Available redeem scripts indexed by script hash.
    map<string, bytes> scripts = 11;

    // Available unspent transaction outputs.
    repeated UnspentTransaction utxo = 12;

    // If sending max amount.
    bool use_max_amount = 13;

    // Coin type (forks).
    uint32 coin_type = 14;
}

// Describes a preliminary transaction plan.
message TransactionPlan {
    // Amount to be received at the other end.
    int64 amount = 1;

    // Maximum available amount.
    int64 available_amount = 2;

    // Estimated transaction fee.
    int64 fee = 3;

    // Change.
    int64 change = 4;

    // Selected unspent transaction outputs.
    repeated UnspentTransaction utxos = 5;
};

// Transaction signing output.
message SigningOutput {
    // Resulting transaction. Note that the amount may be different than the requested amount to account for fees and available funds.
    Transaction transaction = 1;

    // Signed and encoded transaction bytes.
    bytes encoded = 2;

    // Total transaction fees.
    int64 fee = 3;

    // Maximum spendable amount.
    int64 max_amount = 4;

    // Transaction id
    string transaction_id = 5;
}

src:./Decred.proto


syntax = "proto3";

package TW.Decred.Proto;
option java_package = "wallet.core.jni.proto";

import "Bitcoin.proto";

message Transaction {
    /// Serialization format
    uint32 serializeType = 1;

    /// Transaction data format version
    uint32 version = 2;

    // A list of 1 or more transaction inputs or sources for coins.
    repeated TransactionInput inputs = 3;

    // A list of 1 or more transaction outputs or destinations for coins
    repeated TransactionOutput outputs = 4;

    /// The time when a transaction can be spent (usually zero, in which case it has no effect).
    uint32 lockTime = 5;

    /// The block height at which the transaction expires and is no longer valid.
    uint32 expiry = 6;
}

// Decred transaction input.
message TransactionInput {
    // Reference to the previous transaction's output.
    Bitcoin.Proto.OutPoint previousOutput = 1;

    // Transaction version as defined by the sender.
    uint32 sequence = 2;

	int64 valueIn = 3;
	uint32 blockHeight = 4;
	uint32 blockIndex = 5;

    // Computational script for confirming transaction authorization.
    bytes script = 6;
}

// Decred transaction output.
message TransactionOutput {
    // Transaction amount.
    int64 value = 1;

    /// Transaction output version.
    uint32 version = 2;

    // Usually contains the public key as a Decred script setting up conditions to claim this output.
    bytes script = 3;
}

// Transaction signing output.
message SigningOutput {
    // Resulting transaction. Note that the amount may be different than the requested amount to account for fees and available funds.
    Transaction transaction = 1;

    // Signed and encoded transaction bytes.
    bytes encoded = 2;

    // Total transaction fees.
    int64 fee = 3;

    // Maximum spendable amount.
    int64 max_amount = 4;

    // Transaction id
    string transaction_id = 5;
}

src:./Zilliqa.proto


syntax = "proto3";

package TW.Zilliqa.Proto;
option java_package = "wallet.core.jni.proto";

// Input data necessary to create a signed transaction.
message SigningInput {
    // Transaction version
    uint32 version         = 1;

    // Nonce
    uint64 nonce           = 2;

    // Recipient's address.
    string to_address      = 3;

    // Amount to send (256-bit number)
    bytes amount           = 4;

    // GasPrice (256-bit number)
    bytes gas_price        = 5;

    // GasLimit
    uint64 gas_limit        = 6;

    // Private Key
    bytes private_key      = 7;

    // Smart contract code
    bytes code             = 10;

    // String-ified JSON object specifying the transition parameter
    bytes data             = 11;
}

// Transaction signing output.
message SigningOutput {
    // Signed signature bytes.
    bytes signature = 1;
}

src:./Solana.proto


syntax = "proto3";

package TW.Solana.Proto;
option java_package = "wallet.core.jni.proto";

message Transfer {
    bytes private_key = 1;
    string recipient = 2;
    uint64 value = 3;
}

message Stake {
    bytes from_private_key = 1;
    bytes stake_private_key = 2;
    string vote_pubkey = 3;
    uint64 value = 4;
}

message DeactivateStake {
    // The stake account private key
    bytes private_key = 1;
    string vote_pubkey = 2;
}

message WithdrawStake {
    // The stake account private key
    bytes private_key = 1;
    string recipient = 2;
    uint64 value = 3;
}

// Input data necessary to create a signed transaction.
message SigningInput {
    oneof transaction_type {
        Transfer transfer_transaction = 1;
        Stake stake_transaction = 2;
        DeactivateStake deactivate_stake_transaction = 3;
        WithdrawStake withdraw_transaction = 4;
    }
    string recent_blockhash = 5;
}

// Transaction signing output.
message SigningOutput {
    bytes encoded = 1;
}

src:./Ontology.proto


syntax = "proto3";

package TW.Ontology.Proto;
option java_package = "wallet.core.jni.proto";

// Input data necessary to create a signed transaction.
message SigningInput {

    string contract = 1;

    string method = 2;

    bytes owner_private_key = 3;

    // base58 encode address string (160-bit number)
    string to_address = 4;

    uint64 amount = 5;

    bytes payer_private_key = 6;

    uint64 gas_price = 7;

    uint64 gas_limit = 8;

    // base58 encode address string (160-bit number)
    string query_address = 9;

    uint32 nonce = 10;

}

// Transaction signing output.
message SigningOutput {
    // Signed and encoded transaction bytes.
    bytes encoded = 1;
}

src:./Stellar.proto


syntax = "proto3";

package TW.Stellar.Proto;
option java_package = "wallet.core.jni.proto";

message MemoVoid {
}

message MemoText {
    string text = 1;
}

message MemoId {
    int64 id = 1;
}

message MemoHash {
    bytes hash = 1;
}

// Input data necessary to create a signed transaction.
message SigningInput {
    int64 amount = 1;

    int32 fee = 2;

    int64 sequence = 3;

    string account = 4;

    string destination = 5;

    // Private key.
    bytes private_key = 6;

    oneof memo_type_oneof {
        MemoVoid memo_void = 7;
        MemoText memo_text = 8;
        MemoId memo_id = 9;
        MemoHash memo_hash = 10;
        MemoHash memo_return_hash = 11;
    }

    enum OperationType {
        CREATE_ACCOUNT = 0;
        PAYMENT = 1;
    }
    OperationType operation_type = 12;

    string passphrase = 13;
}

// Transaction signing output.
message SigningOutput {
    // Signature.
    string signature = 1;
}

src:./Waves.proto


syntax = "proto3";

package TW.Waves.Proto;
option java_package = "wallet.core.jni.proto";

// Input data necessary to create a signed transaction.
message SigningInput {
    int64 amount = 1;

    string asset = 2;

    // minimum 0.001 Waves (100000 Wavelets) for now
    int64 fee = 3;

    string fee_asset = 4;

    string to = 5;

    // any 140 bytes payload, will be displayed to the client as utf-8 string
    bytes attachment = 6;

    // in millis
    int64 timestamp = 7;

    bytes private_key = 8;
}

// Transaction signing output.
message SigningOutput {
    bytes signature = 1;
    string json = 2;
}

src:./Common.proto


syntax = "proto3";
import "google/protobuf/any.proto";

package TW.Proto;
option java_package = "wallet.core.jni.proto";

// Result type.
message Result {
    // Whether the operation was successful.
    bool success = 1;

    // Optional error message, only present if success is false.
    string error = 2;

    // Result objects, if any.
    repeated google.protobuf.Any objects = 3;
}

src:./Ripple.proto


syntax = "proto3";

package TW.Ripple.Proto;
option java_package = "wallet.core.jni.proto";

// Input data necessary to create a signed transaction.
message SigningInput {
    int64 amount = 1;

    int64 fee = 2;

    int32 sequence = 3;

    int32 last_ledger_sequence = 4;

    string account = 5;

    string destination = 6;

    int64 destination_tag = 7;

    int64 flags = 8;

    bytes private_key = 9;
}

// Transaction signing output.
message SigningOutput {
    bytes encoded = 1;
}

src:./Binance.proto


syntax = "proto3";

package TW.Binance.Proto;
option java_package = "wallet.core.jni.proto";

message Transaction {
    // int64 SIZE-OF-ENCODED      // varint encoded length of the structure after encoding
    // 0xF0625DEE                  // prefix
    repeated bytes msgs = 1;       // array of size 1, containing the transaction message, which are one of the transaction type below
    repeated bytes signatures = 2; // array of size 1, containing the standard signature structure of the transaction sender
    string memo = 3;               // a short sentence of remark for the transaction, only for `Transfer` transactions.
    int64 source = 4;              // an identifier for tools triggerring this transaction, set to zero if unwilling to disclose.
    bytes data = 5;                // reserved for future use
}

message Signature {
    message PubKey {
        // 0xEB5AE987          // prefix
        // bytes               // public key bytes
    }
    bytes pub_key = 1;         // public key bytes of the signer address
    bytes signature = 2;       // signature bytes, please check chain access section for signature generation
    int64 account_number = 3;  // another identifier of signer, which can be read from chain by account REST API or RPC
    int64 sequence = 4;        // sequence number for the next transaction
}

message TradeOrder {
    // 0xCE6DC043           // prefix
    bytes sender = 1;       // originating address
    string id = 2;          // order id, optional
    string symbol = 3;      // symbol for trading pair in full name of the tokens
    int64 ordertype = 4;    // only accept 2 for now, meaning limit order
    int64 side = 5;         // 1 for buy and 2 fory sell
    int64 price = 6;        // price of the order, which is the real price multiplied by 1e8 (10^8) and rounded to integer
    int64 quantity = 7;     // quantity of the order, which is the real price multiplied by 1e8 (10^8) and rounded to integer
    int64 timeinforce = 8;  // 1 for Good Till Expire(GTE) order and 3 for Immediate Or Cancel (IOC)
}

message CancelTradeOrder {
    // 0x166E681B      // prefix
    bytes sender = 1;  // originating address
    string symbol = 2; // symbol for trading pair in full name of the tokens
    string refid = 3;  // order id to cancel
}

message SendOrder {
    // 0x2A2C87FA
    message Token {
        string denom = 1;
        int64 amount = 2;
    }
    message Input {
        bytes address = 1;
        repeated Token coins = 2;
    }
    message Output {
        bytes address = 1;
        repeated Token coins = 2;
    }
    repeated Input inputs = 1;
    repeated Output outputs = 2;
}

message TokenFreezeOrder {
    // 0xE774B32D      // prefix
    bytes from = 1;    // owner address
    string symbol = 2; // token symbol, in full name with "-" suffix
    int64 amount = 3;  // amount of token to freeze
}

message TokenUnfreezeOrder {
    // 0x6515FF0D      // prefix
    bytes from = 1;    // owner address
    string symbol = 2; // token symbol, in full name with "-" suffix
    int64 amount = 3;  // amount of token to unfreeze
}

message HTLTOrder {
    // 0xB33F9A24      // prefix
    bytes from = 1;    // signer address
    bytes to = 2;    // recipient address
    string recipient_other_chain = 3;
    string sender_other_chain = 4;
    bytes random_number_hash = 5; //hash of a random number and timestamp, based on SHA256
    int64 timestamp = 6;
    repeated SendOrder.Token amount = 7;
    string expected_income = 8; // expected gained token on the other chain
    int64 height_span = 9;
    bool cross_chain = 10;
}

message DepositHTLTOrder {
    // 0xB33F9A24      // prefix
    bytes from = 1;    // signer address
    repeated SendOrder.Token amount = 2;
    bytes swap_id = 3;
}

message ClaimHTLOrder {
    // 0xC1665300      // prefix
    bytes from = 1;    // signer address
    bytes swap_id = 2;
    bytes random_number = 3;
}

message RefundHTLTOrder {
    // 0x3454A27C      // prefix
    bytes from = 1;    // signer address
    bytes swap_id = 2;
}

// Input data necessary to create a signed order.
message SigningInput {
    string chain_id = 1;
    int64 account_number = 2;
    int64 sequence = 3;
    int64 source = 4;
    string memo = 5;
    bytes private_key = 6;

    oneof order_oneof {
        TradeOrder trade_order = 8;
        CancelTradeOrder cancel_trade_order = 9;
        SendOrder send_order = 10;
        TokenFreezeOrder freeze_order = 11;
        TokenUnfreezeOrder unfreeze_order = 12;
        HTLTOrder htlt_order = 13;
        DepositHTLTOrder depositHTLT_order = 14;
        ClaimHTLOrder claimHTLT_order = 15;
        RefundHTLTOrder refundHTLT_order = 16;
    }
}

// Transaction signing output.
message SigningOutput {
    // Signed and encoded transaction bytes.
    bytes encoded = 1;
}

src:./Icon.proto


syntax = "proto3";

package TW.Icon.Proto;
option java_package = "wallet.core.jni.proto";

// Input data necessary to create a signed transaction.
message SigningInput {
    // Sender address.
    string from_address = 1;

    // Recipient address.
    string to_address = 2;

    // Transfer amount.
    bytes value = 3;

    // The amount of step to send with the transaction.
    bytes step_limit = 4;

    // UNIX epoch time (from 1970.1.1 00:00:00) in microseconds
    int64 timestamp = 5;

    // Integer value increased by request to avoid replay attacks.
    bytes nonce = 6;

    // Network identifier
    bytes network_id = 7;

    // Private key.
    bytes private_key = 8;
}

// Transaction signing output.
message SigningOutput {
    // JSON-encoded transaction parameters.
    string encoded = 1;

    // Signature.
    bytes signature = 2;
}

src:./VeChain.proto


syntax = "proto3";

package TW.VeChain.Proto;
option java_package = "wallet.core.jni.proto";

message Clause {
    /// Recipient address.
    string to = 1;

    /// Transaction amount.
    bytes value = 2;

    /// Payload data.
    bytes data = 3;
}

// Input data necessary to create a signed transaction.
message SigningInput {
    /// Last byte of the genesis block ID which is used to identify a blockchain to prevent the cross-chain replay attack.
    uint32 chain_tag = 1;

    /// Reference to a specific block.
    uint64 block_ref = 2;

    /// How long, in terms of the number of blocks, the transaction will be allowed to be mined in VeChainThor.
    uint32 expiration = 3;

    /// An array of Clause objects.
    ///
    /// Each clause contains fields To, Value and Data to enable a single transaction to carry multiple tasks issued
    /// by the transaction sender.
    repeated Clause clauses = 4;

    /// Coefficient used to calculate the gas price for the transaction.
    uint32 gas_price_coef = 5;

    /// Maximum amount of gas allowed to pay for the transaction.
    uint64 gas = 6;

    /// ID of the transaction on which the current transaction depends.
    bytes depends_on = 7;

    /// Number set by user.
    uint64 nonce = 8;

    // Private key.
    bytes private_key = 9;
}

// Transaction signing output.
message SigningOutput {
    // Signed and encoded transaction bytes.
    bytes encoded = 1;

    // Signature.
    bytes signature = 2;
}

src:./Tezos.proto


syntax = "proto3";

package TW.Tezos.Proto;
option java_package = "wallet.core.jni.proto";

// Input data necessary to create a signed Tezos transaction.
// Next field: 3
message SigningInput {
  OperationList operation_list = 1;
  bytes private_key = 2;
}

// Transaction signing output.
// Next field: 2
message SigningOutput {
  bytes signed_bytes = 1;
}

// A list of operations and a branch.
// Next field: 3
message OperationList {
  string branch = 1;
  repeated Operation operations = 2;
}

// An operation that can be applied to the Tezos blockchain.
// Next field: 12
message Operation {
  int64 counter = 1;
  string source = 2;
  int64 fee = 3;
  int64 gas_limit = 4;
  int64 storage_limit = 5;

  enum OperationKind {
    // Note: Proto3 semantics require a zero value.
    ENDORSEMENT = 0;

    REVEAL = 7;
    TRANSACTION = 8;
    ORIGINATION = 9;
    DELEGATION = 10;
  }
  OperationKind kind = 7;

  // Operation specific data depending on the type of the operation.
  oneof operation_data {
    RevealOperationData reveal_operation_data = 8;
    TransactionOperationData transaction_operation_data = 9;
    OriginationOperationData origination_operation_data = 10;
    DelegationOperationData delegation_operation_data = 11;
  }
}

// Transaction operation specific data.
// Next field: 3
message TransactionOperationData {
  string destination = 1;
  int64 amount = 2;
}

// Reveal operation specific data.
// Next field: 2
message RevealOperationData {
  bytes public_key = 1;
}

// Origination operation specific data.
// Next field: 3
message OriginationOperationData {
  string manager_pubkey = 1;
  int64 balance = 2;
}

// Delegation operation specific data.
// Next field: 2
message DelegationOperationData {
  string delegate = 1;
}

src:./Any.proto


syntax = "proto3";

package TW.Any.Proto;
option java_package = "wallet.core.jni.proto";

message SigningInput {
    // BIP44 network ID
    uint32 coin_type   = 1;
    // JSON transaction
    string transaction = 2;
    // Private Key in HEX format
    string  private_key = 3;
}

message SigningOutput {
    message Error {
        // Error code
        uint32 code        = 1;
        // Error description
        string description = 2;
    }

    oneof result {
        Error error = 1;
        bool success = 2;
    }

    string output = 4;
}

src:./Nebulas.proto


syntax = "proto3";

package TW.Nebulas.Proto;
option java_package = "wallet.core.jni.proto";

// Input data necessary to create a signed transaction.
message SigningInput {
    // sender's address.
    string from_address = 1;

    // Chain identifier (256-bit number)
    bytes chain_id = 2;

    // Nonce (256-bit number)
    bytes nonce = 3;

    // Gas price (256-bit number)
    bytes gas_price = 4;

    
    // Gas limit (256-bit number)
    bytes gas_limit = 5;

    // Recipient's address.
    string to_address = 6;

    // Amount to send in wei, 1 NAS = 10^18 Wei (256-bit number)
    bytes amount = 7;

    // Timestamp to create transaction (256-bit number)
    bytes timestamp = 8;

    // Optional payload
    string payload = 9;

    // Private key.
    bytes private_key = 10;
}

// Transaction signing output.
message SigningOutput {
    uint32 algorithm = 1;
    bytes signature = 2;
    string raw = 3;
}

//
message Data {
    string type = 1;
    bytes payload = 2;
}

// Raw transaction data
message RawTransaction {
    bytes hash  = 1;
    bytes from = 2;
    bytes to = 3;
    bytes value = 4;
    uint64 nonce = 5;
    int64 timestamp = 6;
    Data data = 7;
    uint32 chain_id = 8;
    bytes gas_price = 9;
    bytes gas_limit = 10;

    uint32 alg = 11;
    bytes sign = 12;
}

src:./Bravo.proto


syntax = "proto3";

package TW.Bravo.Proto;
option java_package = "wallet.core.jni.proto";

// Input data necessary to create a signed transaction.
message SigningInput {
    // Chain id (256-bit number)
    bytes chain_id = 1;

    // Sender's username
    string sender = 2;

    // Recipient's username
    string recipient = 3;

    // Amount in "BRAVO" or "TEST"
    double amount = 4;

    // Whether the transaction is for testnet
    bool testnet = 5;

    // Memo to attach to the transaction
    string memo = 6;

    // Reference Block Id (160-bits)
    bytes reference_block_id = 7;

    // Timestamp on the reference block
    sfixed32 reference_block_time = 8;

    // Sender's private key's raw bytes
    bytes private_key = 9;
}

// Transaction signing output.
message SigningOutput {
    // JSON of the signed transaction.
    string json_encoded = 1;
}

src:./Tron.proto


syntax = "proto3";

package TW.Tron.Proto;
option java_package = "wallet.core.jni.proto";

message TransferContract {
    // Sender address.
    string owner_address = 1;

    // Recipient address.
    string to_address = 2;

    // Amount to send.
    int64 amount = 3;
}

message TransferAssetContract {
    // Asset name.
    string asset_name = 1;

    // Sender address.
    string owner_address = 2;

    // Recipient address.
    string to_address = 3;

    // Amount to send.
    int64 amount = 4;
}

message FreezeBalanceContract {
    // Sender address.
    string owner_address = 1;
    // Frozen balance. Minimum 1
    int64 frozen_balance = 2;
    // Frozen duration
    int64 frozen_duration = 3;
    // Resource type: BANDWIDTH | ENERGY
    string resource = 10;
    // Receiver address
    string receiver_address = 15;
}

message UnfreezeBalanceContract {
    // Sender address
    string owner_address = 1;
    // Resource type: BANDWIDTH | ENERGY
    string resource = 10;
    // Receiver address
    string receiver_address = 15;
}

message UnfreezeAssetContract {
    // Sender address
    string owner_address = 1;
}

message VoteAssetContract {
    // Sender address
    string owner_address = 1;
    // Vote addresses
    repeated string vote_address = 2;
    bool support = 3;
    int32 count = 5;
}

message VoteWitnessContract {
    message Vote {
        string vote_address = 1;
        int64 vote_count = 2;
    }
    string owner_address = 1;
    repeated Vote votes = 2;
    bool support = 3;
}

message WithdrawBalanceContract {
    // Sender address
    string owner_address = 1;
}

message TriggerSmartContract {
    string owner_address = 1;
    string contract_address = 2;
    int64 call_value = 3;
    bytes data = 4;
    int64 call_token_value = 5;
    int64 token_id = 6;
}

message BlockHeader {
    int64 timestamp = 1;
    bytes tx_trie_root = 2;
    bytes parent_hash = 3;
    int64 number = 7;
    bytes witness_address = 9;
    int32 version = 10;
}

message Transaction {
    // Transaction timestamp in milliseconds.
    int64 timestamp = 1;

    // Transaction expiration time in milliseconds.
    int64 expiration = 2;

    // Transaction block header.
    BlockHeader block_header = 3;

    // Transaction fee limit
    int64 fee_limit = 4;

    // Contract.
    oneof contract_oneof {
        TransferContract transfer = 10;
        TransferAssetContract transfer_asset = 11;
        FreezeBalanceContract freeze_balance = 12;
        UnfreezeBalanceContract unfreeze_balance = 13;
        UnfreezeAssetContract unfreeze_asset = 14;
        WithdrawBalanceContract withdraw_balance = 15;
        VoteAssetContract vote_asset = 16;
        VoteWitnessContract vote_witness = 17;
        TriggerSmartContract trigger_smart_contract = 18;
    }
}

message SigningInput {
    // Transaction.
    Transaction transaction = 1;

    // Private key.
    bytes private_key = 2;
}

// Transaction signing output.
message SigningOutput {
    // Transaction identifier.
    bytes id = 1;

    // Signature.
    bytes signature = 2;

    bytes ref_block_bytes = 3;
    bytes ref_block_hash = 4;
}

src:./Theta.proto


syntax = "proto3";

package TW.Theta.Proto;
option java_package = "wallet.core.jni.proto";

/// Input data necessary to create a signed transaction
message SigningInput {
    /// Chain ID string, mainnet, testnet and privatenet
    string chain_id = 1;

    /// Recipient address
    string to_address = 2;

    /// Theta token amount to send in wei (256-bit number)
    bytes theta_amount = 3;

    /// TFuel token amount to send in wei (256-bit number)
    bytes tfuel_amount = 4;

    /// Sequence number of the transaction for the sender address
    uint64 sequence = 5;

    /// Fee amount in TFuel wei for the transaction (256-bit number)
    bytes fee = 6;

    /// Private key
    bytes private_key = 7;
}

/// Transaction signing output
message SigningOutput {
    /// Signed and encoded transaction bytes
    bytes encoded = 1;

    /// Signature
    bytes signature = 2;
}

src:./Aeternity.proto


syntax = "proto3";

package TW.Aeternity.Proto;
option java_package = "wallet.core.jni.proto";

// Input data necessary to create a signed transaction.
message SigningInput {
    // Address of the sender with "ak_" prefix
    string from_address = 1;

    // Address of the recipient with "ak_" prefix
    string to_address = 2;

    bytes amount = 3;

    bytes fee = 4;

    // Message, optional
    string payload = 5;

    // Time to live until block height
    uint64 ttl = 6;

    uint64 nonce = 7;

    bytes private_key = 8;
}

// Transaction signing output.
message SigningOutput {
    // Signed and encoded transaction bytes, Base64 with checksum
    string encoded = 1;
    // Signature, Base58 with checksum
    string signature = 2;
}

src:./Nimiq.proto


syntax = "proto3";

package TW.Nimiq.Proto;
option java_package = "wallet.core.jni.proto";

// Input data necessary to create a signed transaction.
message SigningInput {
    bytes private_key = 1;

    string destination = 2;

    uint64 value = 3;

    uint64 fee = 4;

    uint32 validity_start_height = 5;
}

// Transaction signing output.
message SigningOutput {
    bytes encoded = 1;
}

src:./Harmony.proto


syntax = "proto3";

package TW.Harmony.Proto;
option java_package = "wallet.core.jni.proto";

// Input data necessary to create a signed transaction.
message SigningInput {
    // Chain identifier (256-bit number)
    bytes chain_id = 1;

    // Nonce (256-bit number)
    bytes nonce = 2;

    // Gas price (256-bit number)
    bytes gas_price = 3;

    // Gas limit (256-bit number)
    bytes gas_limit = 4;

    // Recipient's address.
    string to_address = 5;

    // Amount to send in wei (256-bit number)
    bytes amount = 6;

    // Optional payload
    bytes payload = 7;

    // Private key.
    bytes private_key = 8;

    // From shard ID (256-bit number)
    bytes from_shard_id = 9;

    // To Shard ID (256-bit number)
    bytes to_shard_id = 10;
}

// Transaction signing output.
message SigningOutput {
    // Signed and encoded transaction bytes.
    bytes encoded = 1;

    bytes v = 2;
    bytes r = 3;
    bytes s = 4;
}

src:./EOS.proto


syntax = "proto3";

package TW.EOS.Proto;
option java_package = "wallet.core.jni.proto";

enum KeyType {
    LEGACY = 0;
    MODERNK1 = 1;
    MODERNR1 = 2;
}

// Values for an Asset object.
message Asset {
    int64 amount = 1;
    uint32 decimals = 2;
    string symbol = 3;
}

// Input data necessary to create a signed transaction.
message SigningInput {
    // Chain id (256-bit number)
    bytes chain_id = 1;

    // Reference Block Id (256-bits)
    bytes reference_block_id = 2;

    // Timestamp on the reference block
    sfixed32 reference_block_time = 3;
    
    // Currency (e.g. "eosio.token")
    string currency = 4;

    // Sender's username
    string sender = 5;

    // Recipient's username
    string recipient = 6;

    // Memo attached to the transaction
    string memo = 7;

    // Asset details and amount
    Asset asset = 8;

    // Sender's private key's raw bytes
    bytes private_key = 9;

    // Type of the private key
    KeyType private_key_type = 10;
}

// Transaction signing output.
message SigningOutput {
    // JSON of the packed transaction.
    string json_encoded = 1;
}

src:./Nano.proto


syntax = "proto3";

package TW.Nano.Proto;
option java_package = "wallet.core.jni.proto";

// Input data necessary to create a signed transaction.
message SigningInput {
    // Private key
    bytes private_key = 1;

    // Optional parent block hash
    bytes parent_block = 2;

    oneof link_oneof {
        // Hash of a block to receive from
        bytes link_block = 3;
        // Recipient address to send coins to
        string link_recipient = 4;
    }

    // Representative address
    string representative = 5;

    // Account balance (128-bit unsigned integer, as a string)
    string balance = 6;
}

// Transaction signing output.
message SigningOutput {
    // Signature
    bytes signature = 1;
    // Block hash
    bytes block_hash = 2;
}

src:./IOST.proto


syntax = "proto3";

package TW.IOST.Proto;
option java_package = "wallet.core.jni.proto";

// The message defines transaction action struct.
message Action {
    // contract name
    string contract = 1;
    // action name
    string action_name = 2;
    // data
    string data = 3;
}

// The message defines transaction amount limit struct.
message AmountLimit {
    // token name
    string token = 1;
    // limit value
    string value = 2;
}

// The enumeration defines the signature algorithm.
enum Algorithm {
    // unknown
    UNKNOWN = 0;
    // secp256k1
    SECP256K1 = 1;
    // ed25519
    ED25519 = 2;
}

// The message defines signature struct.
message Signature {
    // signature algorithm
    Algorithm algorithm = 1;
    // signature bytes
    bytes signature = 2;
    // public key
    bytes public_key = 3;
}

// The message defines the transaction request.
message Transaction {
    // transaction timestamp
    int64 time = 1;
    // expiration timestamp
    int64 expiration = 2;
    // gas price
    double gas_ratio = 3;
    // gas limit
    double gas_limit = 4;
    // delay nanoseconds
    int64 delay = 5;
    // chain id
    uint32 chain_id = 6;
    // action list
    repeated Action actions = 7;
    // amount limit
    repeated AmountLimit amount_limit = 8;
    // signer list
    repeated string signers = 9;
    // signatures of signers
    repeated Signature signatures = 10;
    // publisher
    string publisher = 11;
    // signatures of publisher
    repeated Signature publisher_sigs = 12;
}

message AccountInfo {
    string name = 1;
    bytes active_key = 2;
    bytes owner_key = 3;
}

// Input data necessary to create a signed transaction.
message SigningInput {
    AccountInfo account = 1;
    Transaction transaction_template = 2;
    string transfer_destination = 3;
    string transfer_amount = 4;
    string transfer_memo = 5;
}

// Transaction signing output.
message SigningOutput {
    // Signed transaction
    Transaction transaction = 1;
}