@ledgerhq/hw-app-multiversx
Version:
Ledger Hardware Wallet MultiversX Application API
56 lines • 2.09 kB
TypeScript
/// <reference types="node" />
/// <reference types="node" />
import type Transport from "@ledgerhq/hw-transport";
/**
* MultiversX API
*
* @example
* import MultiversX from "@ledgerhq/hw-app-multiversx";
* const multiversx = new MultiversX(transport)
*/
export default class MultiversX {
transport: Transport;
constructor(transport: Transport, scrambleKey?: string);
/**
* Get MultiversX app configuration.
*
* @return an object with a contractData, accountIndex, addressIndex, version
* @example
* const result = await multiversx.getAppConfiguration();
* const { contractData, accountIndex, addressIndex, version } = result;
*/
getAppConfiguration(): Promise<any>;
serializePath(path: Array<number>): Buffer;
/**
* Get MultiversX address for a given BIP 32 path.
*
* @param path a path in BIP 32 format
* @param boolDisplay optionally enable or not the display
* @return an object with a address
* @example
* const result = await multiversx.getAddress("44'/508'/0'/0'/0'");
* const { publicKey, address } = result;
*/
getAddress(path: string, boolDisplay?: boolean): Promise<{
publicKey: string;
address: string;
}>;
/**
* Set MultiversX address for a given BIP 32 path.
*
* @param path a path in BIP 32 format
* @param display optionally enable or not the display
* @return an object with a address
* @example
* const result = await multiversx.setAddress("44'/508'/0'/0/0");
* result : Buffer;
*/
setAddress(path: string, display?: boolean): Promise<void>;
signTransaction(path: string, message: string): Promise<string>;
sign(path: string, message: string): Promise<{
signature: null | Buffer;
}>;
serializeESDTInfo(ticker: string, id: string, decimals: number, chainId: string, signature: string): Buffer;
provideESDTInfo(ticker?: string, id?: string, decimals?: number, chainId?: string, signature?: string): Promise<any>;
}
//# sourceMappingURL=MultiversX.d.ts.map