Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • Wallet

Index

Constructors

constructor

Properties

baseCoin

baseCoin: BaseCoin

bitgo

bitgo: BitGo

Methods

accelerateTransaction

addWebhook

addresses

approvalsRequired

  • approvalsRequired(): 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

buildAccountConsolidations

changeFee

coin

  • coin(): 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

createAddress

  • 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

    Returns Bluebird<any>

createPolicyRule

createShare

downloadKeycard

  • 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: DownloadKeycardOptions = {}
      • 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

freeze

getAddress

getEncryptedUserKeychain

  • getEncryptedUserKeychain(params?: __type, 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: __type = {}
    • Optional callback: NodeCallback<any>

    Returns Bluebird<any>

getFirstPendingTransaction

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

    Parameters

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

    Returns Bluebird<any>

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

getPaymentInfo

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

    deprecated

    Parameters

    • Default value params: object = {}

      The params passed into the function

    • Optional callback: NodeCallback<any>

    Returns Bluebird<any>

    The info returned from the merchant server

getPrv

getTransaction

getTransfer

getUserPrv

id

  • id(): string

keyIds

  • keyIds(): string[]

label

  • label(): string

listWebhooks

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

prebuildConsolidateTransactionParams

  • prebuildConsolidateTransactionParams(): string[]

prebuildTransaction

prebuildWhitelistedParams

  • prebuildWhitelistedParams(): string[]

receiveAddress

  • receiveAddress(): string

recoverToken

refresh

remove

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

removePolicyRule

removeUser

removeWebhook

send

sendAccountConsolidation

sendAccountConsolidations

sendMany

  • 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

    Returns Bluebird<any>

sendPaymentResponse

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

    deprecated

    Parameters

    • Default value params: __type = {}

      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>): Bluebird<unknown>

shareWallet

signTransaction

simulateWebhook

  • Simulate wallet webhook, currently for webhooks of type transfer and pending approval

    Parameters

    • Default value params: SimulateWebhookOptions = {}
      • 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

sweep

toTradingAccount

tokenFlushThresholds

  • tokenFlushThresholds(): any

transactions

transferBySequenceId

transferComment

transfers

unspents

updateAddress

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