@okxweb3/coin-kaia
Version:
An kaia SDK for building Web3 wallets and applications.
60 lines (59 loc) • 2.2 kB
TypeScript
import { CalcTxHashParams, GetAddressParams, HardwareRawTransactionParam, MpcMessageParam, MpcRawTransactionParam, MpcTransactionParam, NewAddressParams, SignTxParams, ValidAddressParams, ValidPrivateKeyParams, ValidSignedTransactionParams } from '@okxweb3/coin-base';
import { EthWallet } from '@okxweb3/coin-ethereum';
export type KaiaTxParams = {
kaiaTxType?: number;
senderRawTx?: string;
from?: string;
to: string;
value: string;
useValue?: boolean;
nonce: number;
contractAddress?: string;
gasPrice: string;
gasLimit: string;
data?: string;
humanReadable?: boolean;
codeFormat?: any;
key?: any;
chainId: string;
type: number;
feeRatio?: number;
maxPriorityFeePerGas: string;
maxFeePerGas: string;
};
export type EthTxParams = {
from: string;
to: string;
value: string;
useValue?: boolean;
nonce: number;
contractAddress?: string;
gasPrice: string;
gasLimit: string;
data?: string;
humanReadable?: boolean;
codeFormat?: any;
key?: any;
chainId: string;
type: number;
feeRatio?: number;
maxPriorityFeePerGas: string;
maxFeePerGas: string;
};
export declare class KaiaWallet extends EthWallet {
getNewAddress(param: NewAddressParams): Promise<any>;
validPrivateKey(param: ValidPrivateKeyParams): Promise<any>;
validAddress(param: ValidAddressParams): Promise<any>;
convert2HexString(data: any): string;
convert2KaiaTxParam(data: any): KaiaTxParams;
signTransaction(param: SignTxParams): Promise<any>;
getAddressByPublicKey(param: GetAddressParams): Promise<string>;
getMPCRawTransaction(param: MpcRawTransactionParam): Promise<any>;
getMPCTransaction(param: MpcTransactionParam): Promise<any>;
getMPCRawMessage(param: MpcRawTransactionParam): Promise<any>;
getMPCSignedMessage(param: MpcMessageParam): Promise<any>;
getHardWareRawTransaction(param: SignTxParams): Promise<any>;
getHardWareSignedTransaction(param: HardwareRawTransactionParam): Promise<any>;
calcTxHash(param: CalcTxHashParams): Promise<string>;
validSignedTransaction(param: ValidSignedTransactionParams): Promise<any>;
}