Skip to main content

/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
    settlementId string required

    Unique identifier for a settlement batch

    assetId string required

    Sinohope-defined currency identifier

    replacedTxId string nullable

    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.

Responses

Successful response


Schema
    status boolean required

    Status of the transaction build, False/True (failed/success)

    tx object

    Not null if the status is true

    transactionId string required

    A unique identifier of this transaction( not a transaction hash)

    network string required

    the network of this transaction

    txType string required

    Transaction type. Different block chains have different logics, and there may be different transaction types/formats within a same block chain.

    hashToBeSigned string required

    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 string

    asset type in the transaction details

    decimal number

    asset decimal needed in the transaction details

    currentTime number

    unix timestamp in milliseconds

    expireTime number

    expire timestamp in milliseconds

    expireBlockHeight number

    expire block height

    referBlockHeight number

    expire block height

    from string

    from address

    fromTag string

    from tag

    to string

    to address

    toTag string

    to tag

    amount string

    the transfer amount

    fee string
    feeAsset string
    feePrice string
    feeStep string
    chainId string
    nonce number
    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
    hash string

    the hash of the input transaction

    voutIndex number

    index of the input transaction

    address string
    amount string
    asset string
    vout object[]

    the output of an UTXO transaction.

  • Array [
  • asset string
    address string
    amount string
  • ]
  • funName string

    contract type, e.g. erc20, erc721, erc1155

    params object[]

    the parameters array of a contract call.

  • Array [
  • value string

    the parameter value

    type string

    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.

    userId string required

    A data needed for initiating an mpc signing

    cmrkPK string required

    The public key to identifies an mpc key share

    path string required

    The path to derive the "from" account.

    cryptography string required

    Either "ecdsa-secp256k1" or "eddsa-ed25519", determined by the network

    failedReason string nullable

    The failed reason if the status is False

Loading...