UNPKG

@xchainjs/xchain-radix

Version:

Custom Radix client and utilities used by XChainJS clients

35 lines (34 loc) 1.32 kB
import { Address, Asset, TokenAsset } from '@xchainjs/xchain-util'; /** * Returns the resource id of an asset * @param {Asset | TokenAsset} asset asset * @returns Resource id */ export declare const getAssetResource: (asset: Asset | TokenAsset) => string; /** * Generates a address param for a call method * @param {Address} addr Address to transform to Radix Address parameter * @returns the address in the Radix Address parameter format */ export declare const generateAddressParam: (addr: Address) => { kind: import("@radixdlt/radix-engine-toolkit").ValueKind.Address; value: import("@radixdlt/radix-engine-toolkit").ManifestAddress; }; /** * Generates a string param for a call method * @param {string} s Address to transform to Radix string parameter * @returns the string in the Radix String parameter format */ export declare const generateStringParam: (s: string) => { kind: import("@radixdlt/radix-engine-toolkit").ValueKind.String; value: string; }; /** * Generates a bucket param for a call method * @param {number} value Value to transform to Radix Bucket parameter * @returns the value in the Radix Bucket parameter format */ export declare const generateBucketParam: (value: number) => { kind: import("@radixdlt/radix-engine-toolkit").ValueKind.Bucket; value: number; };