@xchainjs/xchain-cosmos
Version:
Custom Cosmos client and utilities used by XChainJS clients
36 lines (35 loc) • 1.38 kB
TypeScript
import CosmosApp from '@ledgerhq/hw-app-cosmos';
import type Transport from '@ledgerhq/hw-transport';
import { TxHash } from '@xchainjs/xchain-client';
import { Address } from '@xchainjs/xchain-util';
import BigNumber from 'bignumber.js';
import { Client, CosmosClientParams } from './client';
import { TxParams } from './types';
export declare class ClientLedger extends Client {
private transport;
private app;
constructor(params: CosmosClientParams & {
transport: Transport;
});
getAddress(): string;
getApp(): Promise<CosmosApp>;
getAddressAsync(index?: number, verify?: boolean): Promise<Address>;
/**
* Transfer Cosmos.
*
* @param {TxParams} params The transfer options including the fee rate.
* @returns {Promise<TxHash|string>} A promise that resolves to the transaction hash or an error message.
*/
transfer({ walletIndex, asset, amount, recipient, memo, }: TxParams & {
gasLimit?: BigNumber;
}): Promise<TxHash>;
/**
* Sign a transaction making a round robin over the clients urls provided to the client
*
* @param {string} sender Sender address
* @param {DecodedTxRaw} unsignedTx Unsigned transaction
* @param {OfflineAminoSigner} signer Signer
* @returns {DeliverTxResponse} The transaction broadcasted
*/
private roundRobinSignAndBroadcast;
}