Options
All
  • Public
  • Public/Protected
  • All
Menu

Class CruxClient

Hierarchy

  • CruxClient

Index

Constructors

constructor

Properties

getAssetMapping

getAssetMapping: getAssetMap = this.getAssetMap

walletClientName

walletClientName: string

Methods

getAddressMap

getAssetMap

  • getAssetMap(): Promise<IResolvedClientAssetMap>
  • Returns Promise<IResolvedClientAssetMap>

getCruxIDState

getPayIDClaim

hasPayIDClaim

  • hasPayIDClaim(): boolean

init

  • init(): Promise<void>

isCruxIDAvailable

  • isCruxIDAvailable(cruxIDSubdomain: string): Promise<boolean>
  • Parameters

    • cruxIDSubdomain: string

    Returns Promise<boolean>

putAddressMap

registerCruxID

  • registerCruxID(cruxIDSubdomain: string): Promise<void>
  •  const sampleAddressMap: IAddressMapping = {
         'BTC': {
             addressHash: '1F1tAaz5x1HUXrCNLbtMDqcw6o5GNn4xqX'
         },
         'ETH': {
             addressHash: '0x7cB57B5A97eAbe94205C07890BE4c1aD31E486A8'
         },
     }
     // Advised to pipe the method putAddressMap to registerCruxID call
     await cruxClient.registerCruxID("bob")
         .then(() => {
             return cruxClient.putAddressMap(sampleAddressMap)
                 .catch((addressUpdationError) => {
                     // Handling addressUpdation error
                 })
         })
         .catch((registrationError) => {
             // Handling registration error
         })

    Parameters

    • cruxIDSubdomain: string

    Returns Promise<void>

resolveCurrencyAddressForCruxID

  • resolveCurrencyAddressForCruxID(fullCruxID: string, walletCurrencySymbol: string): Promise<IAddress>
  • Parameters

    • fullCruxID: string
    • walletCurrencySymbol: string

    Returns Promise<IAddress>

Static validateCruxIDByWallet

  • validateCruxIDByWallet(walletClientName: string, cruxIDString: string): void
  • Parameters

    • walletClientName: string
    • cruxIDString: string

    Returns void

Generated using TypeDoc