Change some typings

This commit is contained in:
Thunnini 2022-12-12 17:50:40 +09:00
parent 1ea85324aa
commit 7ae09a0c11
3 changed files with 29 additions and 21 deletions

View File

@ -21,8 +21,12 @@ export interface IcnsVerificationResponse {
value: { value: {
errors: Error[]; errors: Error[];
data: { data: {
// JSON string
verifying_msg: string; verifying_msg: string;
signature: number[]; // Base64 encoded
public_key: string;
// Base64 encoded
signature: string;
algorithm: string; algorithm: string;
}; };
}; };

View File

@ -54,7 +54,7 @@ export class KeplrWallet implements Wallet {
getKey(chainId: string): Promise<{ getKey(chainId: string): Promise<{
readonly name: string; readonly name: string;
readonly pubKey: Uint8Array; readonly pubKey: Uint8Array;
readonly address: Uint8Array; readonly bech32Address: string;
}> { }> {
return this.keplr.getKey(chainId); return this.keplr.getKey(chainId);
} }
@ -77,7 +77,8 @@ export class KeplrWallet implements Wallet {
owner: string, owner: string,
username: string, username: string,
addressChainIds: string[], addressChainIds: string[],
): Promise<{ ): Promise<
{
chainId: string; chainId: string;
bech32Prefix: string; bech32Prefix: string;
bech32Address: string; bech32Address: string;
@ -85,7 +86,8 @@ export class KeplrWallet implements Wallet {
pubKey: Uint8Array; pubKey: Uint8Array;
signatureSalt: number; signatureSalt: number;
signature: Uint8Array; signature: Uint8Array;
}> { }[]
> {
// TODO: Update @keplr-wallet/types // TODO: Update @keplr-wallet/types
return (this.keplr as any).signICNSAdr36( return (this.keplr as any).signICNSAdr36(
chainId, chainId,

View File

@ -10,7 +10,7 @@ export interface Wallet {
getKey(chainId: string): Promise<{ getKey(chainId: string): Promise<{
readonly name: string; readonly name: string;
readonly pubKey: Uint8Array; readonly pubKey: Uint8Array;
readonly address: Uint8Array; readonly bech32Address: string;
}>; }>;
signAmino( signAmino(
chainId: string, chainId: string,
@ -25,7 +25,8 @@ export interface Wallet {
owner: string, owner: string,
username: string, username: string,
addressChainIds: string[], addressChainIds: string[],
): Promise<{ ): Promise<
{
chainId: string; chainId: string;
bech32Prefix: string; bech32Prefix: string;
bech32Address: string; bech32Address: string;
@ -33,5 +34,6 @@ export interface Wallet {
pubKey: Uint8Array; pubKey: Uint8Array;
signatureSalt: number; signatureSalt: number;
signature: Uint8Array; signature: Uint8Array;
}>; }[]
>;
} }