Express

POST

Sign transactions for multisignature wallets using external-signing mode. You must maintain your keys, in the clear, on a separate Express server. BitGo doesn't decrypt your private keys.

Path Params

  • coin string required
    A cryptocurrency or token ticker symbol.
  • walletId string required
    The wallet ID.

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

Body Params

object

  • keychain object
    The user's keychain object with an encryptedPrv property. The walletPassphrase parameter is required when using keychain. Any request must include either keychain or prv.
    keychain object
    • encryptedPrv string
      Encrypted user private key
  • prv string

    User private key

    Note: The request must include either prv or keychain

  • txPrebuild object
    The transaction description object as created by 'Build Transaction'
    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

      ONE OF

      • size integer
        Estimated size of the transaction in bytes
      • fee integer
        Estimated fee in base unit for the transaction
      • feeRate string or integer
        Custom minimum fee rate in a coin's base unit per kilobyte (or virtual kilobyte)--for example, satoshis per kvByte or microAlgos per kByte. If the applied feeRate does not meet a coin's required minimum transaction fee amount, the minimum is still applied (for example, 1000 sat/kvByte or a flat 1000 microAlgos).
      • payGoFee integer
        BitGo fee of the transaction (in base units)
      • payGoFeeString integer
        BitGo fee of the transaction (in base units) represented as a String
  • coldDerivationSeed string
    A seed used to create a deterministic BIP-32 path which is then used to derive a private key. This is useful when one wants to create multiple BitGo cold wallets but only protect a single master private key. Using the seed one can create a child key for a specific wallet, for instance an Ethereum wallet could use the "eth" seed while an XRP wallet could use "xrp" as a seed. Both of these child keys would be derived from a single master key and so only the master key needs to be stored and protected.
  • walletPassphrase string
    Passphrase to decrypt the user keychain. walletPassphrase is a required parameter when the parameter keychain is provided.
  • recipients array of objects
    Array of objects describing the recipients. See buildTransaction for more detail. Required on ETH.

Responses

200
OK

Response Body

object

  • txInfo object

    ONE OF

    • txHex string
      Serialized transaction hex
400
Bad Request

Response Body

ONE OF

  • error string required
    Human-readable error message
  • requestId string required
    Client request id
  • context object
    Properties that apply to a specific error name
  • name string required
    Error code