/collateral/v1/settlement/tx/build
Build an unsigned transaction acording the settlementId and assetId (the transfer amount will be filled by the user confirmed settlement details)
Request Body required
Unique identifier for a settlement batch
Sinohope-defined currency identifier
If this field is not empty, it means that we need to build a new transaction (usually with a higher transaction fee) to replace the existing specified transaction.
- 200
Successful response
Schema
- Array [
- ]
- Array [
- ]
Status of the transaction build, False/True (failed/success)
tx object
Not null if the status is true
A unique identifier of this transaction( not a transaction hash)
the network of this transaction
Transaction type. Different block chains have different logics, and there may be different transaction types/formats within a same block chain.
Unsigned transaction hash. Note that this is not the final transaction hash.
data object required
Unsigned transaction detail data, which needs to determine the data fields based on network, and txType. If it's an UTXO transaction, then the data should be a map , which key is a vinId
that identifies the TransactionInput and the value is the TransactionInput.
asset type in the transaction details
asset decimal needed in the transaction details
unix timestamp in milliseconds
expire timestamp in milliseconds
expire block height
expire block height
from address
from tag
to address
to tag
the transfer amount
vin object
the input of an UTXO transaction. It's a map which key is a vinId
and vaule is an object.
property name* object
the hash of the input transaction
index of the input transaction
vout object[]
the output of an UTXO transaction.
contract type, e.g. erc20
, erc721
, erc1155
params object[]
the parameters array of a contract call.
the parameter value
the type of the parameter value
fromAccount object
The information about the "from" account of the current transaction. Not null if the status is true.
A data needed for initiating an mpc signing
The public key to identifies an mpc key share
The path to derive the "from" account.
Either "ecdsa-secp256k1" or "eddsa-ed25519", determined by the network
The failed reason if the status is False
{
"status": true,
"tx": {
"transactionId": "string",
"network": "string",
"txType": "string",
"hashToBeSigned": "string",
"data": {
"asset": "string",
"decimal": 0,
"currentTime": 0,
"expireTime": 0,
"expireBlockHeight": 0,
"referBlockHeight": 0,
"from": "string",
"fromTag": "string",
"to": "string",
"toTag": "string",
"amount": "string",
"fee": "string",
"feeAsset": "string",
"feePrice": "string",
"feeStep": "string",
"chainId": "string",
"nonce": 0,
"vin": {},
"vout": [
{
"asset": "string",
"address": "string",
"amount": "string"
}
],
"funName": "string",
"params": [
{
"value": "string",
"type": "string"
}
]
}
},
"fromAccount": {
"userId": "string",
"cmrkPK": "string",
"path": "string",
"cryptography": "ecdsa-secp256k1"
},
"failedReason": "string"
}