# Onroad
# On-road Module
The definition of "OnRoad" is actually used to describe the state of a transaction. It specifically refers to request transaction which has not been received and has open, pending receive status. The BlockType of on-road transaction is usually represented as 1, 2, 3 or 6, which in turn correspond to 'send a transaction to create a contract', 'make a transfer or call contract', 'send a transaction to get reward' and 'send a transaction to refund.'
This concept is often confusing with unconfirmed transactions. The latter are actually transactions not snapshoted. All transactions are stored in ledger, including request transactions and respond transactions, while the terms "onroad" and "unconfirmed" are just used to describe the different states of transactions. All onroad are request transactions, while an unconfirmed transaction can be either request or respond.
# onroad_getOnroadBlocksByAddress
Return all open transactions waiting to be received by specified account
Parameters:
Address
: Account addressuint64
: Page indexuint64
: Page size up to 256
Return:
[]AccountBlock
Account block list
Example:
# onroad_getOnroadInfoByAddress
Return the information of tokens in all open transactions waiting to be received by specified account
Parameters:
Address
- Account address
Return:
[]Object
:accountAddress
:Address
Account addresstotalNumber
:string
Total open transaction numbertokenBalanceInfoMap
:Map[tokenId]Object
tokenInfo
:Object
Token informationtokenName
:string
Token nametokenSymbol
:string
Token symboltokenId
:TokenId
Token IdtotalSupply
:*string
Total supplydecimals
:uint8
Decimal digitsowner
:Address
Owner's addressmaxSupply
:*string
Max supplyownerBurnOnly
:bool
Whether the token can be burned by the owner onlyisReIssuable
:bool
Whether the token can be re-issuedindex
:uint16
index
totalAmount
:*string
Total pending amount in this tokennumber
:string
Total open transaction number in this token
Example:
# onroad_getOnroadBlocksInBatch
Return all open transactions waiting to be received by a list of specified accounts
- Parameters:
[]Object
: Up to 10 accounts
Address
: Account addressuint64
: Page indexuint64
: Page size up to 256
Return:
map[Address][]AccountBlock
Example:
# onroad_getOnroadInfoInBatch
Return the information of tokens in all open transactions waiting to be received by a list of specified accounts
Parameters:
[]Address
- Account addresses, up to 10
Return:
[]Object
:accountAddress
:Address
Account addresstotalNumber
:string
Total numbertokenBalanceInfoMap
:Map[tokenId]Object
tokenInfo
:Object
Token informationtokenName
:string
Token nametokenSymbol
:string
Token symboltokenId
:TokenId
Token IdtotalSupply
:*string
Total supplydecimals
:uint8
Decimal digitsowner
:Address
Owner's addressmaxSupply
:*string
Max supplyownerBurnOnly
:bool
Whether the token can be burned by the owner onlyisReIssuable
:bool
Whether the token can be re-issuedindex
:uint16
index
totalAmount
:*string
Total pending amount in this tokennumber
:string
Total open transaction number in this token
Example: