Block and transaction
Block information
Path parameters
blockstringRequired
Block number or Block HASH
Responses
200
successful operation
*/*
sninteger · integerOptional
Block number
idstringOptional
block unique id
timestampinteger · UnixTimestamp (UTC)Optional
block generation time.
404
Block not found
get/block/{block}
GET /block/{block} HTTP/1.1
Host: rest.metacoin.network:20923
Accept: */*
{
"sn": 1,
"id": "text",
"timestamp": 1,
"transaction": [
{
"id": "text",
"timestamp": 1
}
]
}Path parameters
transaction_idstringRequired
Transaction ID
Responses
200
successful operation
*/*
addressstring · Metacoin AddressOptional
db_idstringOptional
Contain this transaction's block_id
db_snstring · integerOptional
Contain this transaction's block no
idstringOptional
Transaction's unique id
parametersstring[]Optional
-
Transaction parameters
-
diffrent by type
timestampinteger · UnixTimestamp (UTC)Optional
transaction generation time.
tokeninteger · UnixTimestamp (UTC)Optional
transaction generation time.
typestring · enumOptionalPossible values:
Meaning of parameters by type
- Chaincode Install or Update
- Chaincode upgrade
- DataMigration
- Hyperledger Data format or value fix
- MRC020
- Delayed open
- NewWallet
- Create new address
- SetBase
- Set base token for MRC040 protocol
- base token id
- target token id
- exchange, exchangePair, exchangeFee, exchangeFeePair
- token exchange
- from address
- Amount "from address" sent to "to address"
- Token id "from address" sent to "to address"
- Address receiving fee of from address
- Fee paid by from address
- Token ID of fee paid by from address
- from address's tag
- from address's memo
- from address's signature
- from address
- Amount "from address" sent to "to address"
- Token id "from address" sent to "to address"
- Address receiving fee of to address
- Fee paid by to address
- Token ID of fee paid by to address
- to address's tag
- to address's memo
- to address's signature
- tokenUpdate
- token update
- token id
- url
- info
- image
- signature
- ownerBurning, tokenBurning
- token burning
- token id
- Burning amount
- Signature
- ownerIncrease, tokenIncrease
- token increase
- token id
- Increase amount
- Signature
- tokenRegister
- same as token create.
-
token_reserve
- token receive at token create
- token sender(token owner)
- receive address
- receive amount
- token id
- token receive at token create
-
transfer
- token transfer
- from address
- to address
- amount
- token id
- signature
- unlock date
- tag
- memo
- token transfer
-
stodexExchange, stodexExchangePending, stodexExchangeRequest, stodexRegister, stodexRequest, stodexUnRegister
- for MRC040
- sorry, not yet fixed
validationCodestring · int32Optional
- 0 : success transaction
- not 0 : Ignore this transaction(see detail - https://github.com/hyperledger/fabric/blob/v1.0.0/protos/peer/transaction.proto#L125)
404
Transaction not found
get/transaction/{transaction_id}
GET /transaction/{transaction_id} HTTP/1.1
Host: rest.metacoin.network:20923
Accept: */*
{
"address": "text",
"db_id": "text",
"db_sn": "text",
"id": "text",
"parameters": [
"text"
],
"timestamp": 1,
"token": 1,
"type": "Chaincode Install or Update",
"validationCode": "text",
"values": {
"addinfo": "text",
"balance": [
{
"token": "text",
"balance": "text",
"unlockdate": 1
}
],
"password": "text",
"pending": [
{}
],
"regdate": 1
}
}Last updated