Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

Index

Constructors

constructor

  • new Tbtc(bitgo: any): Tbtc

Properties

altScriptHash

altScriptHash: number

supportAltScriptDestination

supportAltScriptDestination: boolean

Accessors

defaultSigHashType

  • get defaultSigHashType(): number

network

type

  • get type(): string

Static coinTokenPatternSeparator

  • get coinTokenPatternSeparator(): string

Static validAddressTypes

  • get validAddressTypes(): UnspentType[]

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

calculateFeeAmount

  • calculateFeeAmount(params: object, callback?: NodeCallback<number>): Bluebird<number>

calculateRecoveryAddress

  • calculateRecoveryAddress(scriptHashScript: Buffer): any

calculateSignatureHash

  • calculateSignatureHash(transaction: any, inputIndex: number, pubScript: Buffer, amount: number, hashType: number, isSegwitInput: boolean): Buffer

createMultiSigAddress

  • createMultiSigAddress(addressType: string, signatureThreshold: number, keys: Buffer[]): MultiSigAddress

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

explainTransaction

feeEstimate

formatForOfflineVault

generateAddress

generateKeyPair

  • generateKeyPair(seed: Buffer): object

getAddressInfoFromExplorer

  • getAddressInfoFromExplorer(addressBase58: string): Bluebird<any>

getBaseFactor

  • getBaseFactor(): number

getChain

  • getChain(): string

getCoinLibrary

  • getCoinLibrary(): any

getExtraPrebuildParams

getFamily

  • getFamily(): string

getFullName

  • getFullName(): string

getLatestBlockHeight

getRecoveryFeePerBytes

  • getRecoveryFeePerBytes(): Bluebird<number>

getRecoveryFeeRecommendationApiBaseUrl

  • getRecoveryFeeRecommendationApiBaseUrl(): Bluebird<string>

getRecoveryMarketPrice

  • getRecoveryMarketPrice(): Bluebird<string>

getUnspentInfoFromExplorer

  • getUnspentInfoFromExplorer(addressBase58: string): Bluebird<any>

initiateRecovery

isBitGoTaintedUnspent

  • isBitGoTaintedUnspent(unspent: Unspent): boolean

isValidAddress

  • isValidAddress(address: string, forceAltScriptSupport?: boolean): boolean

isValidMofNSetup

  • isValidMofNSetup(__namedParameters: object): boolean

isValidPub

  • isValidPub(pub: string): boolean

keyIdsForSigning

  • keyIdsForSigning(): number[]

keychains

markets

newWalletObject

  • newWalletObject(walletParams: any): Wallet

parseSignatureScript

parseTransaction

pendingApprovals

postProcessPrebuild

preCreateBitGo

prepareTransactionBuilder

  • prepareTransactionBuilder(txBuilder: any): any

presignTransaction

recover

  • Builds a funds recovery transaction without BitGo

    Parameters

    • params: RecoverParams
      • userKey: [encrypted] xprv, or xpub
      • backupKey: [encrypted] xprv, or xpub if the xprv is held by a KRS provider
      • walletPassphrase: necessary if one of the xprvs is encrypted
      • bitgoKey: xpub
      • krsProvider: necessary if backup key is held by KRS
      • recoveryDestination: target address to send recovered funds to
      • scan: the amount of consecutive addresses without unspents to scan through before stopping
      • ignoreAddressTypes: (optional) array of AddressTypes to ignore, these are strings defined in Codes.UnspentTypeTcomb
         for example: ['p2shP2wsh', 'p2wsh'] will prevent code from checking for wrapped-segwit and native-segwit chains on the public block explorers
    • Optional callback: NodeCallback<any>

    Returns Bluebird<any>

recoverFromWrongChain

recoveryBlockchainExplorerUrl

  • recoveryBlockchainExplorerUrl(url: string): string

signMessage

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

signRecoveryTransaction

  • signRecoveryTransaction(txb: any, unspents: Output[], addresses: any, cosign: boolean): any
  • Apply signatures to a funds recovery transaction using user + backup key

    Parameters

    • txb: any

      a transaction builder object (with inputs and outputs)

    • unspents: Output[]

      the unspents to use in the transaction

    • addresses: any

      the address and redeem script info for the unspents

    • cosign: boolean

      whether to cosign this transaction with the user's backup key (false if KRS recovery)

    Returns any

    the transaction builder originally passed in as the first argument

signTransaction

supplementGenerateWallet

supportsBlockTarget

  • supportsBlockTarget(): boolean

supportsP2shP2wsh

  • supportsP2shP2wsh(): boolean

supportsP2wsh

  • supportsP2wsh(): boolean

transactionDataAllowed

  • transactionDataAllowed(): boolean

url

  • url(suffix: string): string

valuelessTransferAllowed

  • valuelessTransferAllowed(): boolean

verifyAddress

verifyRecoveryTransaction

verifySignature

  • verifySignature(transaction: any, inputIndex: number, amount: number, verificationSettings?: object): boolean
  • Verify the signature on a (half-signed) transaction

    Parameters

    • transaction: any

      bitcoinjs-lib tx object

    • inputIndex: number

      The input whererfore to check the signature

    • amount: number

      For segwit and BCH, the input amount needs to be known for signature verification

    • Default value verificationSettings: object = {}

    Returns boolean

verifyTransaction

wallets

webhooks

Static createInstance

Static inferAddressType

  • inferAddressType(addressDetails: object): string | null

Generated using TypeDoc