Express

POST

This route is for users who would like to maintain their own keys, or otherwise would not like BitGo to decrypt their key, and instead provide it in the clear themselves

Path Params

  • coin string required
    A cryptocurrency or token ticker symbol.

Body Params

object

  • prv string
    user private key
  • txPrebuild object
    txPrebuild object
    • wallet string

      matches ^[0-9a-f]{32}$

    • txHex string
      Serialized transaction hex
    • txBase64 string
      Serialized transaction base64 (applies to XLM only) The request must include this or a txHex
    • txInfo object

      ONE OF

      • changeAddresses array of strings
      • nOutputs integer
        Number of outputs
      • nP2SHInputs integer
      • nSegwitInputs integer
      • unspents array of objects
        unspents object
        • id string
          The id of the unspent in the form :<tx_index>
        • address string
          The address of this unspent
        • value integer
        • valueString string

          matches ^-?\d+$

        • blockHeight integer
          The block this Unspent was created in
        • date string date-time
          The date this unspent was created
        • coinbase boolean
          True if this unspent came from the coinbase transaction
        • wallet string

          matches ^[0-9a-f]{32}$

        • fromWallet string

          matches ^[0-9a-f]{32}$

        • chain integer
          The type of this unspent's address (P2SH, P2WSH, etc...)
        • index integer
          A monotonic counter used when creating new addresses
        • redeemScript string
          The Script program used to cryptographically verify spending this unspent
        • witnessScript string
          The segwit Script program used to cryptographically verify spending this unspent
        • isSegwit boolean
      • walletAddressDetails object
        walletAddressDetails object
        • id string
          platform public id for an address
        • address string

          up to 500 characters

        • chain integer enum
          011011202130314041
        • index integer
        • coin string
        • lastNonce integer

          Defaults to -1

        • wallet string
          The wallet which contains this address
        • coinSpecific object
          Properties which are specific to certain coin types
          coinSpecific object
          • xlm object
            xlm object
            • memoId string
              Latest memo id generated for the wallet
            • rootAddress string
              Root address of the wallet
          • txlm object
            txlm object
            • memoId string
              Latest memo id generated for the wallet
            • rootAddress string
              Root address of the wallet
        • balance object
          Balance of the address. In case of Eth and Celo, if returnBalancesForToken is passed with includeBalances, then it will return token balance in the address object. This field will be present only when includeBalances query param is passed as true.
          balance object
          • updated string date-time
            The last time a transaction affected the balance of this address
          • balance integer
            The cleared balance of the address
          • balanceString string
            String representation of balance. Guaranteed to not lose precision.
          • totalReceived integer
            The total amount received on this address (in the chain's base unit)
          • totalSent integer
            The total amount send from this address (in the chain's base unit)
          • confirmedBalanceString string
            The total balance of confirmed transactions for the address (in the chain's base unit). Guaranteed to not lose precision.
          • spendableBalanceString string
            The total balance of the address (in the chain's base unit) which may be used as inputs for creating new transactions in string representation. Guaranteed to not lose precision.
        • label string nullable
          A human-readable label for the address.

          up to 250 characters

        • addressType string enum
          p2shp2shP2wshp2wshp2trp2trMusig2
    • feeInfo object
      feeInfo object
      • size integer
        Estimated size of the transaction in bytes
      • fee integer
        Estimated fee in base units for the transaction
      • feeRate string or integer

        Custom fee rate (in base units) per kilobyte (or virtual kilobyte). For example, satoshis per kvByte.

        If the feeRate is less than the minimum required network fee, then the minimum fee applies. For example, 1000 sat/kvByte, a flat 1000 microAlgos, or a flat 10 drops of xrp. For XRP, the actual fee is usually 4.5 times the open ledger fee.

        Note: The feeRate overrides the maxFeeRate and minFeeRate.

      • payGoFee integer
        BitGo fee of the transaction (in base units)
      • payGoFeeString integer
        BitGo fee of the transaction (in base units) represented as a String
  • isLastSignature boolean
    Should be set to true if you are signing the second time, attaching the final signature. Default to false.
  • pubs array of strings
    Public Keys (user, backup, bitgo) for the wallet (UTXO coins only)

Responses

200
OK

Response Body

object

  • txInfo object

    ONE OF

    • txHex string
      Serialized transaction hex