Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

Index

Constructors

constructor

Properties

homeDomain

homeDomain: string

Static maxMemoId

maxMemoId: string = "0xFFFFFFFFFFFFFFFF"

Static tokenPatternSeparator

tokenPatternSeparator: "-" = "-"

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

deriveKeyWithSeed

  • deriveKeyWithSeed(__namedParameters: object): object
  • Derive a hardened child public key from a master key seed using an additional seed for randomness.

    Due to technical differences between keypairs on the ed25519 curve and the secp256k1 curve, only hardened private key derivation is supported.

    Parameters

    • __namedParameters: object

    Returns object

enterprises

explainTransaction

  • explainTransaction(params: ExplainTransactionOptions, callback?: NodeCallback<TransactionExplanation>): Bluebird<TransactionExplanation>

federationLookupByAccountId

  • federationLookupByAccountId(accountId: string): Bluebird<Record>
  • Attempt to resolve an account id into a stellar account Only works for accounts that can be resolved by our federation server

    Parameters

    • accountId: string

      stellar account id

    Returns Bluebird<Record>

federationLookupByName

  • federationLookupByName(address: string): Bluebird<Record>
  • Attempt to resolve a stellar address into a stellar account If address domain matches bitgo's then resolve on our federation server Else, make the request to the federation server hosting the address

    Parameters

    • address: string

      stellar address to look for

    Returns Bluebird<Record>

feeEstimate

generateKeyPair

  • generateKeyPair(seed: Buffer): KeyPair

getAddressDetails

  • getAddressDetails(address: string): AddressDetails

getBaseFactor

  • getBaseFactor(): number

getBaseTransactionFee

  • getBaseTransactionFee(): Bluebird<number>

getBitGoFederationServer

  • getBitGoFederationServer(): FederationServer

getChain

  • getChain(): string

getExtraPrebuildParams

getFamily

  • getFamily(): string

getFederationServerUrl

  • getFederationServerUrl(): string

getFullName

  • getFullName(): string

getHorizonUrl

  • getHorizonUrl(): string

getMinimumReserve

  • getMinimumReserve(): Bluebird<number>

getPrvFromRaw

  • getPrvFromRaw(prv: string): string

getPubFromRaw

  • getPubFromRaw(pub: string): string

getTokenNameFromStellarAsset

  • getTokenNameFromStellarAsset(asset: Asset): string

initiateRecovery

  • initiateRecovery(params: RecoveryOptions): Bluebird<Keypair[]>

isValidAddress

  • isValidAddress(address: string): boolean

isValidMemo

  • isValidMemo(__namedParameters: object): boolean
  • Evaluates whether a memo is valid

    Parameters

    • __namedParameters: object

    Returns boolean

    true if value and type are a valid

isValidMemoId

  • isValidMemoId(memoId: string): boolean
  • Return boolean indicating whether a memo id is valid

    Parameters

    • memoId: string

      memo id

    Returns boolean

    true if memo id is valid

isValidMofNSetup

  • isValidMofNSetup(__namedParameters: object): boolean

isValidPrv

  • isValidPrv(prv: string): boolean
  • Return boolean indicating whether input is valid private key for the coin

    Parameters

    • prv: string

      the prv to be checked

    Returns boolean

    is it valid?

isValidPub

  • isValidPub(pub: string): boolean

isValidStellarUsername

  • isValidStellarUsername(username: string): boolean
  • Evaluate whether a stellar username has valid format This method is used by the client when a stellar address is being added to a wallet Example of a common stellar username: foo@bar.baz The above example would result in the Stellar address: foo@bar.baz*bitgo.com

    Parameters

    • username: string

      stellar username

    Returns boolean

    true if stellar username is valid

keyIdsForSigning

  • keyIdsForSigning(): number[]

keychains

markets

newWalletObject

  • newWalletObject(walletParams: any): Wallet

normalizeAddress

  • normalizeAddress(__namedParameters: object): string

parseTransaction

pendingApprovals

postProcessPrebuild

preCreateBitGo

presignTransaction

recover

  • recover(params: RecoveryOptions, callback: NodeCallback<RecoveryTransaction>): Bluebird<RecoveryTransaction>
  • Builds a funds recovery transaction without BitGo

    Parameters

    • params: RecoveryOptions
      • userKey: [encrypted] Stellar private key
      • backupKey: [encrypted] Stellar private key, or public key if the private key is held by a KRS provider
      • walletPassphrase: necessary if one of the private keys is encrypted
      • rootAddress: base address of the wallet to recover funds from
      • krsProvider: necessary if backup key is held by KRS
      • recoveryDestination: target address to send recovered funds to
    • callback: NodeCallback<RecoveryTransaction>

    Returns Bluebird<RecoveryTransaction>

signMessage

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

signTransaction

  • signTransaction(params: SignTransactionOptions): HalfSignedTransaction

supplementGenerateWallet

  • supplementGenerateWallet(walletParams: SupplementGenerateWalletOptions): Bluebird<SupplementGenerateWalletOptions>
  • Extend walletParams with extra params required for generating an XLM wallet

    Stellar wallets have three keychains on them. Two are generated by the platform, and the last is generated by the user. Initially, we need a root prv to generate the account, which must be distinct from all three keychains on the wallet. If a root prv is not provided, a random one is generated.

    Parameters

    • walletParams: SupplementGenerateWalletOptions

    Returns Bluebird<SupplementGenerateWalletOptions>

supportsBlockTarget

  • supportsBlockTarget(): boolean

transactionDataAllowed

  • transactionDataAllowed(): boolean

url

  • url(suffix: string): string

valuelessTransferAllowed

  • valuelessTransferAllowed(): boolean

verifyAddress

  • verifyAddress(__namedParameters: object): boolean

verifyRecoveryTransaction

verifySignature

  • verifySignature(pub: string, message: string | Buffer, signature: Buffer): boolean
  • Verifies if signature for message is valid.

    Parameters

    • pub: string

      public key

    • message: string | Buffer

      signed message

    • signature: Buffer

      signature to verify

    Returns boolean

    true if signature is valid.

verifyTransaction

wallets

webhooks

Static createInstance

Generated using TypeDoc