2022-12-12 05:25:47 +00:00
|
|
|
import { AminoSignResponse, ChainInfo, StdSignDoc } from "@keplr-wallet/types";
|
|
|
|
|
|
|
|
export interface Wallet {
|
|
|
|
init(chainIds: string[]): Promise<void>;
|
|
|
|
|
|
|
|
getChainInfosWithoutEndpoints(): Promise<
|
2022-12-17 11:24:17 +00:00
|
|
|
(Pick<ChainInfo, "chainId" | "chainName" | "bech32Config"> & {
|
|
|
|
readonly isEthermintLike?: boolean;
|
|
|
|
})[]
|
2022-12-12 05:25:47 +00:00
|
|
|
>;
|
|
|
|
|
|
|
|
getKey(chainId: string): Promise<{
|
|
|
|
readonly name: string;
|
|
|
|
readonly pubKey: Uint8Array;
|
2022-12-12 08:50:40 +00:00
|
|
|
readonly bech32Address: string;
|
2022-12-17 11:24:17 +00:00
|
|
|
readonly isLedgerNano?: boolean;
|
2022-12-12 05:25:47 +00:00
|
|
|
}>;
|
|
|
|
signAmino(
|
|
|
|
chainId: string,
|
|
|
|
signer: string,
|
|
|
|
signDoc: StdSignDoc,
|
|
|
|
): Promise<AminoSignResponse>;
|
|
|
|
broadcastTxSync(chainId: string, tx: Uint8Array): Promise<Uint8Array>;
|
|
|
|
|
|
|
|
signICNSAdr36(
|
|
|
|
chainId: string,
|
|
|
|
contractAddress: string,
|
|
|
|
owner: string,
|
|
|
|
username: string,
|
|
|
|
addressChainIds: string[],
|
2022-12-12 08:50:40 +00:00
|
|
|
): Promise<
|
|
|
|
{
|
|
|
|
chainId: string;
|
|
|
|
bech32Prefix: string;
|
|
|
|
bech32Address: string;
|
|
|
|
addressHash: "cosmos" | "ethereum";
|
|
|
|
pubKey: Uint8Array;
|
|
|
|
signatureSalt: number;
|
|
|
|
signature: Uint8Array;
|
|
|
|
}[]
|
|
|
|
>;
|
2022-12-12 05:25:47 +00:00
|
|
|
}
|