@bithomp/xrpl-api
Version:
A Bithomp JavaScript/TypeScript library for interacting with the XRP Ledger
35 lines (34 loc) • 1.78 kB
TypeScript
import { Wallet, Transaction, ECDSA } from "xrpl";
import { XrplDefinitionsBase, XrplDefinitions, DEFAULT_DEFINITIONS } from "ripple-binary-codec";
interface GenerateAddressInterface {
publicKey: string;
privateKey: string;
address: string;
seed: string;
}
export interface VerifySignatureInterface {
signedBy?: string;
signatureValid?: boolean;
signatureMultiSign?: boolean;
error?: string;
}
export declare function isValidSecret(secret: string): boolean;
export interface WalletFromSeedInterface {
masterAddress?: string;
algorithm?: ECDSA;
seedAddress?: string;
ignoreSeedPayload?: boolean;
}
export declare function walletFromSeed(seed: string, options?: WalletFromSeedInterface): Wallet;
export declare function generateAddress(): GenerateAddressInterface;
export declare function isValidClassicAddress(address: string): boolean;
export declare function checksumClassicAddress(buffer: Buffer): Buffer;
export declare function signTransaction(wallet: Wallet, transaction: Transaction, multisign?: boolean | string, definitions?: XrplDefinitionsBase, validateTx?: boolean): {
tx_blob: string;
hash: string;
};
export declare function verifyTransaction(signedTransaction: Transaction | string, definitions?: XrplDefinitionsBase): boolean;
export declare function verifySignature(signedTransaction: Transaction | string, explicitMultiSigner?: string | null, definitions?: XrplDefinitionsBase): VerifySignatureInterface;
declare function hashSignedTx(tx: Transaction | string, definitions?: XrplDefinitionsBase, validateTx?: boolean): string;
declare function getXahauDefinitions(): XrplDefinitionsBase | undefined;
export { XrplDefinitionsBase, XrplDefinitions, DEFAULT_DEFINITIONS, hashSignedTx, getXahauDefinitions };