Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

Index

Properties

Static batchMethodTypes

batchMethodTypes: string[] = ['address[]', 'uint256[]']

Static batcherFunctionSignature

batcherFunctionSignature: "cf4c58e2" = "cf4c58e2"

Static hopTransactionSalt

hopTransactionSalt: "bitgoHopAddressRequestSalt" = "bitgoHopAddressRequestSalt"

Accessors

type

  • get type(): string

Static coinTokenPatternSeparator

  • get coinTokenPatternSeparator(): string

Methods

baseUnitsToBigUnits

  • baseUnitsToBigUnits(baseUnits: string | number): string
  • Convert a currency amount represented in base units (satoshi, wei, atoms, drops, stroops) to big units (btc, eth, rmg, xrp, xlm)

    Parameters

    • baseUnits: string | number

    Returns string

bigUnitsToBaseUnits

  • bigUnitsToBaseUnits(bigUnits: string | number): string
  • Convert a currency amount represented in big units (btc, eth, rmg, xrp, xlm) to base units (satoshi, wei, atoms, drops, stroops)

    Parameters

    • bigUnits: string | number

    Returns string

createHopTransactionParams

  • createHopTransactionParams(buildParams: HopTransactionBuildOptions, callback?: NodeCallback<HopParams>): Bluebird<HopParams>
  • Creates the extra parameters needed to build a hop transaction

    Parameters

    • buildParams: HopTransactionBuildOptions

      The original build parameters

    • Optional callback: NodeCallback<HopParams>

    Returns Bluebird<HopParams>

    extra parameters object to merge with the original build parameters object and send to the platform

deriveKeyWithSeed

  • deriveKeyWithSeed(__namedParameters: object): object
  • The cold wallet tool uses this function to derive an extended key that is based on the passed key and seed

    Parameters

    • __namedParameters: object

    Returns object

enterprises

feeEstimate

formatForOfflineVault

  • formatForOfflineVault(txInfo: UnformattedTxInfo, ethTx: any, userKey: string, backupKey: string, gasPrice: Buffer, gasLimit: number, callback?: NodeCallback<OfflineVaultTxInfo>): Bluebird<OfflineVaultTxInfo>
  • Helper function for recover() This transforms the unsigned transaction information into a format the BitGo offline vault expects

    Parameters

    • txInfo: UnformattedTxInfo
    • ethTx: any
    • userKey: string
    • backupKey: string
    • gasPrice: Buffer
    • gasLimit: number
    • Optional callback: NodeCallback<OfflineVaultTxInfo>

    Returns Bluebird<OfflineVaultTxInfo>

    |{address: ({address, amount}|string), amount: string}|string)[]}}

generateKeyPair

  • generateKeyPair(seed: Buffer): KeyPair

getAddressNonce

  • getAddressNonce(address: string, callback?: NodeCallback<number>): Bluebird<number>
  • Queries public block explorer to get the next ETH nonce that should be used for the given ETH address

    Parameters

    Returns Bluebird<number>

getBaseFactor

  • getBaseFactor(): string

getChain

  • getChain(): string

getDefaultExpireTime

  • getDefaultExpireTime(): number
  • Default expire time for a contract call (1 week)

    Returns number

    Time in seconds

getExtraPrebuildParams

  • getExtraPrebuildParams(buildParams: BuildOptions, callback?: NodeCallback<BuildOptions>): Bluebird<BuildOptions>

getFamily

  • getFamily(): string

getFullName

  • getFullName(): string

getOperation

  • getOperation(recipient: EthRecipient, expireTime: number, contractSequenceId: number): (string | Buffer)[][]
  • Get transfer operation for coin

    Parameters

    • recipient: EthRecipient

      recipient info

    • expireTime: number

      expiry time

    • contractSequenceId: number

      sequence id

    Returns (string | Buffer)[][]

    operation array

getOperationSha3ForExecuteAndConfirm

  • getOperationSha3ForExecuteAndConfirm(recipients: EthRecipient[], expireTime: number, contractSequenceId: number): string
  • Parameters

    • recipients: EthRecipient[]
    • expireTime: number
    • contractSequenceId: number

    Returns string

getRecoveryGasLimit

  • getRecoveryGasLimit(): any

getRecoveryGasPrice

  • getRecoveryGasPrice(): any

getSendMethodArgs

  • getSendMethodArgs(txInfo: GetSendMethodArgsOptions): SendMethodArgs[]
  • Build arguments to call the send method on the wallet contract

    Parameters

    • txInfo: GetSendMethodArgsOptions

    Returns SendMethodArgs[]

initiateRecovery

isValidAddress

  • isValidAddress(address: string): boolean

isValidMofNSetup

  • isValidMofNSetup(__namedParameters: object): boolean

isValidPub

  • isValidPub(pub: string): boolean
  • Return boolean indicating whether input is valid public key for the coin.

    Parameters

    • pub: string

      the pub to be checked

    Returns boolean

    is it valid?

keyIdsForSigning

  • keyIdsForSigning(): number[]

keychains

markets

newWalletObject

  • newWalletObject(walletParams: any): Wallet

parseTransaction

pendingApprovals

postProcessPrebuild

  • postProcessPrebuild(params: TransactionPrebuild, callback?: NodeCallback<TransactionPrebuild>): Bluebird<TransactionPrebuild>

preCreateBitGo

  • preCreateBitGo(params: PrecreateBitGoOptions): void
  • Ensure either enterprise or newFeeAddress is passed, to know whether to create new key or use enterprise key

    Parameters

    • params: PrecreateBitGoOptions

    Returns void

presignTransaction

  • presignTransaction(params: TransactionPrebuild, callback?: NodeCallback<TransactionPrebuild>): Bluebird<TransactionPrebuild>

queryAddressBalance

  • queryAddressBalance(address: string, callback?: NodeCallback<any>): Bluebird<any>
  • Query Etherscan for the balance of an address

    Parameters

    • address: string

      the ETH address

    • Optional callback: NodeCallback<any>

    Returns Bluebird<any>

    address balance

queryAddressTokenBalance

  • queryAddressTokenBalance(tokenContractAddress: string, walletContractAddress: string, callback?: NodeCallback<any>): Bluebird<any>
  • Query Etherscan for the balance of an address for a token

    Parameters

    • tokenContractAddress: string

      address where the token smart contract is hosted

    • walletContractAddress: string

      address of the wallet

    • Optional callback: NodeCallback<any>

    Returns Bluebird<any>

    token balaance in base units

querySequenceId

  • querySequenceId(address: string, callback?: NodeCallback<number>): Bluebird<number>
  • Queries the contract (via Etherscan) for the next sequence ID

    Parameters

    • address: string

      address of the contract

    • Optional callback: NodeCallback<number>

    Returns Bluebird<number>

    sequence ID

recover

recoverToken

  • recoverToken(params: RecoverTokenOptions, callback?: NodeCallback<RecoverTokenTransaction>): Bluebird<RecoverTokenTransaction>
  • Recover an unsupported token from a BitGo multisig wallet This builds a half-signed transaction, for which there will be an admin route to co-sign and broadcast. Optionally the user can set params.broadcast = true and the half-signed tx will be sent to BitGo for cosigning and broadcasting

    Parameters

    • params: RecoverTokenOptions
    • Optional callback: NodeCallback<RecoverTokenTransaction>

    Returns Bluebird<RecoverTokenTransaction>

recoveryBlockchainExplorerQuery

  • recoveryBlockchainExplorerQuery(query: any, callback?: NodeCallback<any>): Bluebird<any>
  • Make a query to Etherscan for information such as balance, token balance, solidity calls

    Parameters

    • query: any

      key-value pairs of parameters to append after /api

    • Optional callback: NodeCallback<any>

    Returns Bluebird<any>

    response from Etherscan

signFinal

  • Helper function for signTransaction for the rare case that SDK is doing the second signature Note: we are expecting this to be called from the offline vault

    Parameters

    • params: SignFinalOptions

    Returns FullySignedTransaction

signMessage

  • signMessage(key: object, message: string): Buffer

signTransaction

supplementGenerateWallet

supportsBlockTarget

  • supportsBlockTarget(): boolean

transactionDataAllowed

  • transactionDataAllowed(): boolean

url

  • url(suffix: string): string

validateHopPrebuild

  • validateHopPrebuild(wallet: Wallet, hopPrebuild: HopPrebuild, originalParams?: undefined | object, callback?: NodeCallback<void>): Bluebird<void>
  • Validates that the hop prebuild from the HSM is valid and correct

    throws

    Error if The prebuild is invalid

    Parameters

    • wallet: Wallet

      The wallet that the prebuild is for

    • hopPrebuild: HopPrebuild

      The prebuild to validate

    • Optional originalParams: undefined | object

      The original parameters passed to prebuildTransaction

    • Optional callback: NodeCallback<void>

    Returns Bluebird<void>

    void

valuelessTransferAllowed

  • valuelessTransferAllowed(): boolean

verifyAddress

verifyRecoveryTransaction

verifyTransaction

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

wallets

webhooks

Static createInstance

Generated using TypeDoc