Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • Wallet

Index

Constructors

constructor

Properties

baseCoin

baseCoin: BaseCoin

bitgo

bitgo: BitGo

Methods

accelerateTransaction

  • accelerateTransaction(params?: any, callback?: NodeCallback<any>): Bluebird<any>
  • Accelerate a transaction's confirmation using Child-Pays-For-Parent (CPFP)

    Parameters

    • Default value params: any = {}
    • Optional callback: NodeCallback<any>

    Returns Bluebird<any>

addWebhook

  • addWebhook(params?: any, callback?: NodeCallback<any>): Bluebird<any>
  • Add a webhook to this wallet

    Parameters

    • Default value params: any = {}
    • Optional callback: NodeCallback<any>

    Returns Bluebird<any>

addresses

  • addresses(params?: any, callback?: NodeCallback<any>): Bluebird<any>
  • List the addresses for a given wallet

    Parameters

    • Default value params: any = {}
    • Optional callback: NodeCallback<any>

    Returns Bluebird<any>

approvalsRequired

  • approvalsRequired(): number
  • Get the number of approvals required for spending funds from this wallet

    Returns number

balance

  • balance(): number

balanceString

  • balanceString(): string
  • Get a string representation of the balance of this wallet

    This is useful when balances have the potential to overflow standard javascript numbers

    Returns string

changeFee

  • changeFee(params?: any, callback?: NodeCallback<any>): Bluebird<any>
  • Change the fee on the pending transaction that corresponds to the given txid to the given new fee

    Parameters

    • Default value params: any = {}
    • Optional callback: NodeCallback<any>

    Returns Bluebird<any>

    The transaction ID of the new transaction that contains the new fee rate

coin

  • coin(): string
  • Get the coin identifier for the type of coin this wallet holds

    Returns string

coinSpecific

confirmedBalance

  • confirmedBalance(): number

confirmedBalanceString

  • confirmedBalanceString(): string
  • Get a string representation of the confirmed balance of this wallet

    This is useful when balances have the potential to overflow standard javascript numbers

    Returns string

consolidateUnspents

  • consolidateUnspents(params?: any, callback?: NodeCallback<any>): Bluebird<any>
  • Consolidate unspents on a wallet

    Parameters

    • Default value params: any = {}

      parameters object

    • Optional callback: NodeCallback<any>

    Returns Bluebird<any>

    txHex {String} the txHex of the incomplete transaction that needs to be signed by the user in the SDK

createAddress

  • createAddress(__namedParameters?: object, callback?: NodeCallback<any>): Bluebird<any>
  • Create one or more new address(es) for use with this wallet.

    If the count field is defined and greater than 1, an object with a single array property named addresses containing count address objects will be returned. Otherwise, a single address object is returned.

    Parameters

    • Default value __namedParameters: object = {}
    • Optional callback: NodeCallback<any>

    Returns Bluebird<any>

createPolicyRule

  • createPolicyRule(params?: any, callback?: NodeCallback<any>): Bluebird<any>

createShare

  • createShare(params?: any, callback?: NodeCallback<any>): Bluebird<any>
  • Send an encrypted wallet share to BitGo.

    Parameters

    • Default value params: any = {}
    • Optional callback: NodeCallback<any>

    Returns Bluebird<any>

downloadKeycard

  • downloadKeycard(params?: any): void
  • Creates and downloads PDF keycard for wallet (requires response from wallets.generateWallet)

    Note: this is example code and is not the version used on bitgo.com

    Parameters

    • Default value params: any = {}
      • jsPDF - an instance of the jsPDF library
      • QRCode - an instance of the QRious library
      • userKeychain - a wallet's private user keychain
      • backupKeychain - a wallet's private backup keychain
      • bitgoKeychain - a wallet's private bitgo keychain
      • passphrase - the wallet passphrase
      • passcodeEncryptionCode - the encryption secret used for Box D
      • activationCode - a randomly generated six-digit activation code
      • walletKeyID - the Key ID used for deriving a cold wallet's signing key
      • backupKeyID - the Key ID used for deriving a cold wallet's backup key

    Returns void

fanoutUnspents

  • fanoutUnspents(params?: any, callback?: NodeCallback<any>): Bluebird<any>
  • Fanout unspents for a wallet

    Parameters

    • Default value params: any = {}

      parameters object

    • Optional callback: NodeCallback<any>

    Returns Bluebird<any>

    txHex {String} the txHex of the incomplete transaction that needs to be signed by the user in the SDK

freeze

  • freeze(params?: any, callback?: NodeCallback<any>): Bluebird<any>

getAddress

  • getAddress(params?: any, callback?: NodeCallback<any>): Bluebird<any>
  • Get a single wallet address by its id

    Parameters

    • Default value params: any = {}
    • Optional callback: NodeCallback<any>

    Returns Bluebird<any>

getEncryptedUserKeychain

  • getEncryptedUserKeychain(params?: any, callback?: NodeCallback<any>): Bluebird<any>
  • Gets the user key chain for this wallet

    The user key chain is the first keychain of the wallet and usually has the encrypted prv stored on BitGo. Useful when trying to get the users' keychain from the server before decrypting to sign a transaction.

    Parameters

    • Default value params: any = {}
    • Optional callback: NodeCallback<any>

    Returns Bluebird<any>

getFirstPendingTransaction

  • getFirstPendingTransaction(params?: any, callback?: NodeCallback<any>): Bluebird<any>
  • Get transaction metadata for the oldest transaction that is still pending or attempted

    Parameters

    • Default value params: any = {}
    • Optional callback: NodeCallback<any>

    Returns Bluebird<any>

    Object with txid, walletId, tx, and fee (if supported for coin)

getPaymentInfo

  • getPaymentInfo(params?: any, callback?: NodeCallback<any>): Bluebird<any>
  • Fetch info from merchant server

    Parameters

    • Default value params: any = {}

      The params passed into the function

    • Optional callback: NodeCallback<any>

    Returns Bluebird<any>

    The info returned from the merchant server

getPrv

  • getPrv(params?: any, callback?: NodeCallback<any>): Bluebird<any>
  • Gets the unencrypted private key for this wallet (be careful!) Requires wallet passphrase

    Parameters

    • Default value params: any = {}
    • Optional callback: NodeCallback<any>

    Returns Bluebird<any>

getTransaction

  • getTransaction(params?: object, callback?: NodeCallback<any>): Bluebird<any>
  • List the transactions for a given wallet

    Parameters

    • Default value params: object = {}
      • txHash the transaction hash to search for
    • Optional callback: NodeCallback<any>

    Returns Bluebird<any>

getTransfer

  • getTransfer(params?: any, callback?: NodeCallback<any>): Bluebird<any>
  • Get transfers on this wallet

    Parameters

    • Default value params: any = {}
    • Optional callback: NodeCallback<any>

    Returns Bluebird<any>

getUserPrv

id

  • id(): string

keyIds

  • keyIds(): string[]
  • Get the public object ids for the keychains on this wallet.

    Returns string[]

label

  • label(): string

listWebhooks

  • listWebhooks(params?: any, callback?: NodeCallback<any>): Bluebird<any>
  • List webhooks on this wallet

    Parameters

    • Default value params: any = {}
    • Optional callback: NodeCallback<any>

    Returns Bluebird<any>

maximumSpendable

migratedFrom

  • migratedFrom(): string | undefined
  • Get the wallet id of the wallet that this wallet was migrated from.

    For example, if this is a BCH wallet that was created from a BTC wallet, the BCH wallet migrated from field would have the BTC wallet id.

    Returns string | undefined

pendingApprovals

prebuildAndSignTransaction

prebuildTransaction

receiveAddress

  • receiveAddress(): string

recoverToken

  • recoverToken(params?: any, callback?: NodeCallback<any>): Bluebird<any>
  • Recover an unsupported token from a BitGo multisig wallet params are validated in Eth.prototype.recoverToken

    Parameters

    • Default value params: any = {}
    • Optional callback: NodeCallback<any>

    Returns Bluebird<any>

refresh

remove

  • remove(params?: any, callback?: NodeCallback<any>): Bluebird<any>

removePolicyRule

  • removePolicyRule(params?: any, callback?: NodeCallback<any>): Bluebird<any>

removeUser

  • removeUser(params?: any, callback?: NodeCallback<any>): Bluebird<any>
  • Remove user from wallet

    Parameters

    • Default value params: any = {}
      • userId Id of the user to remove
    • Optional callback: NodeCallback<any>

    Returns Bluebird<any>

removeWebhook

  • removeWebhook(params?: any, callback?: NodeCallback<any>): Bluebird<any>
  • Remove a webhook from this wallet

    Parameters

    • Default value params: any = {}
    • Optional callback: NodeCallback<any>

    Returns Bluebird<any>

send

  • send(params?: any, callback?: NodeCallback<any>): Bluebird<any>

sendMany

  • sendMany(params?: any, callback?: NodeCallback<any>): Bluebird<any>
  • Send money to multiple recipients

    1. Gets the user keychain by checking the wallet for a key which has an encrypted prv
    2. Decrypts user key
    3. Creates the transaction with default fee
    4. Signs transaction with decrypted user key
    5. Sends the transaction to BitGo

    Parameters

    • Default value params: any = {}
    • Optional callback: NodeCallback<any>

    Returns Bluebird<any>

sendPaymentResponse

  • sendPaymentResponse(params?: any, callback?: NodeCallback<any>): Bluebird<any>
  • Send json payment response

    Parameters

    • Default value params: any = {}

      The params passed into the function

    • Optional callback: NodeCallback<any>

    Returns Bluebird<any>

    The info returned from the merchant server Payment Ack

setPolicyRule

  • setPolicyRule(params?: any, callback?: NodeCallback<any>): any

shareWallet

  • shareWallet(params?: any, callback?: NodeCallback<any>): Bluebird<any>
  • Share this wallet with another BitGo user.

    Parameters

    • Default value params: any = {}
    • Optional callback: NodeCallback<any>

    Returns Bluebird<any>

signTransaction

simulateWebhook

  • simulateWebhook(params?: any, callback?: NodeCallback<any>): Bluebird<any>
  • Simulate wallet webhook, currently for webhooks of type transfer and pending approval

    Parameters

    • Default value params: any = {}
      • webhookId (required) id of the webhook to be simulated
      • transferId (optional but required for transfer webhooks) id of the simulated transfer
      • pendingApprovalId (optional but required for pending approval webhooks) id of the simulated pending approval
    • Optional callback: NodeCallback<any>

    Returns Bluebird<any>

spendableBalance

  • spendableBalance(): number

spendableBalanceString

  • spendableBalanceString(): string
  • Get a string representation of the spendable balance of this wallet

    This is useful when balances have the potential to overflow standard javascript numbers

    Returns string

submitTransaction

  • submitTransaction(params?: any, callback?: NodeCallback<any>): Bluebird<any>
  • Submit a half-signed transaction to BitGo

    Parameters

    • Default value params: any = {}
      • txHex: transaction hex to submit
      • halfSigned: object containing transaction (txHex or txBase64) to submit
    • Optional callback: NodeCallback<any>

    Returns Bluebird<any>

sweep

  • sweep(params?: any, callback?: NodeCallback<any>): Bluebird<any>
  • Sweep funds for a wallet

    Parameters

    • Default value params: any = {}

      parameters object

    • Optional callback: NodeCallback<any>

    Returns Bluebird<any>

    txHex {String} the txHex of the signed transaction

toTradingAccount

  • toTradingAccount(): TradingAccount

tokenFlushThresholds

  • tokenFlushThresholds(): any
  • Return the token flush thresholds for this wallet

    Returns any

    pairs of { [tokenName]: thresholds } base units

transactions

  • transactions(params?: object, callback?: NodeCallback<any>): Bluebird<any>
  • List the transactions for a given wallet

    Parameters

    • Default value params: object = {}
    • Optional callback: NodeCallback<any>

    Returns Bluebird<any>

transferBySequenceId

  • transferBySequenceId(params?: any, callback?: NodeCallback<any>): Bluebird<any>
  • Get a transaction by sequence id for a given wallet

    Parameters

    • Default value params: any = {}
    • Optional callback: NodeCallback<any>

    Returns Bluebird<any>

transferComment

  • transferComment(params?: any, callback?: NodeCallback<any>): Bluebird<any>
  • Update comment of a transfer

    Parameters

    • Default value params: any = {}
    • Optional callback: NodeCallback<any>

    Returns Bluebird<any>

transfers

  • transfers(params?: any, callback?: NodeCallback<any>): Bluebird<any>
  • List the transfers for a given wallet

    Parameters

    • Default value params: any = {}
    • Optional callback: NodeCallback<any>

    Returns Bluebird<any>

unspents

  • unspents(params?: any, callback?: NodeCallback<any>): Bluebird<any>
  • List the unspents for a given wallet

    Parameters

    • Default value params: any = {}
    • Optional callback: NodeCallback<any>

    Returns Bluebird<any>

updateAddress

  • updateAddress(params?: any, callback?: NodeCallback<any>): Bluebird<any>
  • Update properties on an address

    Parameters

    • Default value params: any = {}
    • Optional callback: NodeCallback<any>

    Returns Bluebird<any>

updateTokenFlushThresholds

  • updateTokenFlushThresholds(thresholds?: any, callback?: NodeCallback<any>): Bluebird<any>
  • Set the token flush thresholds for the wallet. Updates the wallet. Tokens will only be flushed from forwarder contracts if the balance is greater than the threshold defined here.

    Parameters

    • Default value thresholds: any = {}

      pairs of { [tokenName]: threshold } (base units)

    • Optional callback: NodeCallback<any>

    Returns Bluebird<any>

url

  • url(extra?: string): string
  • Build a URL using this wallet's id which can be used for BitGo API operations

    Parameters

    • Default value extra: string = ""

      API specific string to append to the wallet id

    Returns string

Generated using TypeDoc