@xchainjs/xchain-radix
Version:
Custom Radix client and utilities used by XChainJS clients
34 lines (33 loc) • 1.56 kB
TypeScript
import { GatewayApiClient, TransactionSubmitResponse } from '@radixdlt/babylon-gateway-api-sdk';
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 innerGatewayClient;
constructor(networkId: number);
set networkId(networkId: number);
get networkId(): number;
get gatewayClient(): GatewayApiClient;
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 createGatewayClient;
private static createSimpleTransferManifest;
private static createCustomTransferManifest;
private constructIntent;
private previewIntent;
private static retPublicKeyToGatewayPublicKey;
}