Interface IChainDriverWithHelpers<T>

This interface extends the IChainDriver interface with some helper functions that are useful for signing and verifying challenges and other miscellaneous functions.

Type Parameters

  • T extends NumberType

Hierarchy

Properties

getAllAssetsForAddress: IGetAssets

Gets all asset data for an address. Be cautious when using this. It may be more efficient to query address' balances for each asset individually.

getAssetDetails: IGetAssetDetails

Gets the metadata about a specific asset

getLastBlockIndex: IGetLastBlockIndex

Gets the last block hash or index.

getPublicKeyFromAddress: IGetPublicKey

Gets the public key from an address

getTimestampForBlock: IGetTimestampForBlock

Gets the latest block's timestamp.

isValidAddress: IIsValidAddress

Checks if an address is well-formed.

lookupTransactionById: ILookupTransactionById

Gets the metadata about a specific transaction ID

makeAssetTransferTxn: IMakeAssetTransferTxn

Transfers an asset to a specified address. Asset must be transferable.

makeAssetTxn: IMakeAssetTxn

Creates an authorization asset on-chain.

sendTxn: ISendTx

Sends a signed transaction to the blockchain network

verifyAssets: IVerifyAssets<T>

Verifies user owns enough of certain assets by querying the public blockchain.

Note that resources can be either URIs or prefixed with 'Asset ID: '. This implementation must parse and only look at the assets, not URIs.

Verifies an address owns enough of all specified resources. Should ignore every resource that doesn't start with 'Asset ID: '. Defaults to succeeding if user has a balance of >= 1 for every asset.

assetMinimumBalancesRequiredMap is optional, but here, one can define a JSON object mapping of 'assetIDs' => minimumBalances. If assetMinimumBalancesRequiredMap[assetId] exists, it will check that the user owns more than the specified minimum balance. If not defined, will use the default.

defaultMinimum is optional, but here, you can specify a new default minimum for all assets to fallback on if not defined in assetMinimumBalancesRequiredMap. Default is normally set to check if user owns >= 1.

verifySignature: IVerifySignature

Verifies a signature is signed correctly by an address

Generated using TypeDoc