@xchainjs/xchain-radix
Version:
Custom Radix client and utilities used by XChainJS clients
33 lines (32 loc) • 1.49 kB
TypeScript
import { RadixGatewayApi, TransactionSubmitResponse } from './gateway-api';
import { Intent, NotarizedTransaction, PublicKey, TransactionHash } from '@radixdlt/radix-engine-toolkit';
import { Balance, MethodToCall } from './types/radix';
/**
* The main client for the Radix network which is then wrapped by the {Client} adapting it to have
* a {BaseXChainClient} interface.
*/
export declare class RadixSpecificClient {
private innerNetwork;
private innerGateway;
constructor(networkId: number);
set networkId(networkId: number);
get networkId(): number;
get gateway(): RadixGatewayApi;
currentEpoch(): Promise<number>;
currentStateVersion(): Promise<number>;
fetchBalances(address: string): Promise<Balance[]>;
fetchNFTBalances(address: string): Promise<Balance[]>;
private convertResourcesToBalances;
private fetchNonFungibleResources;
private fetchFungibleResources;
constructTransferIntent(from: string, to: string, resourceAddress: string, amount: number, notaryPublicKey: PublicKey, message?: string, methodsToCall?: MethodToCall): Promise<{
intent: Intent;
fees: number;
}>;
submitTransaction(notarizedTransaction: NotarizedTransaction): Promise<[TransactionSubmitResponse, TransactionHash]>;
private static createSimpleTransferManifest;
private static createCustomTransferManifest;
private constructIntent;
private previewIntent;
private static retPublicKeyToGatewayPublicKey;
}