@keplr-wallet/types
Advanced tools
Comparing version
import { Currency, AppCurrency, FeeCurrency } from "./currency"; | ||
import { BIP44 } from "./bip44"; | ||
import { Bech32Config } from "./bech32"; | ||
import { EVMInfo } from "./ethereum"; | ||
export interface ChainInfo { | ||
@@ -43,11 +42,11 @@ readonly rpc: string; | ||
readonly hideInUI?: boolean; | ||
readonly evm?: EVMInfo; | ||
readonly evm?: { | ||
chainId: number; | ||
rpc: string; | ||
}; | ||
} | ||
export type ChainInfoWithoutEndpoints = Omit<ChainInfo, "rest" | "rpc" | "nodeProvider" | "evm"> & { | ||
readonly rest: undefined; | ||
readonly rpc: undefined; | ||
readonly nodeProvider: undefined; | ||
readonly evm?: Omit<EVMInfo, "rpc"> & { | ||
readonly rpc: undefined; | ||
evm?: { | ||
chainId: number; | ||
}; | ||
}; |
@@ -40,9 +40,1 @@ export declare enum EthSignType { | ||
} | ||
export interface EVMInfo { | ||
chainId: number; | ||
rpc: string; | ||
} | ||
export interface EthereumSignResponse { | ||
signingData: Uint8Array; | ||
signature: Uint8Array; | ||
} |
@@ -1,2 +0,1 @@ | ||
/// <reference types="node" /> | ||
import { ChainInfo, ChainInfoWithoutEndpoints } from "../chain-info"; | ||
@@ -9,3 +8,2 @@ import { EthSignType } from "../ethereum"; | ||
import { DirectAuxSignResponse } from "../cosmjs-alt"; | ||
import EventEmitter from "events"; | ||
export interface Key { | ||
@@ -17,3 +15,2 @@ readonly name: string; | ||
readonly bech32Address: string; | ||
readonly ethereumHexAddress: string; | ||
readonly isNanoLedger: boolean; | ||
@@ -127,3 +124,2 @@ readonly isKeystone: boolean; | ||
getChainInfosWithoutEndpoints(): Promise<ChainInfoWithoutEndpoints[]>; | ||
getChainInfoWithoutEndpoints(chainId: string): Promise<ChainInfoWithoutEndpoints>; | ||
/** Change wallet extension user name **/ | ||
@@ -136,17 +132,2 @@ changeKeyRingName(opts: { | ||
suggestERC20(chainId: string, contractAddress: string): Promise<void>; | ||
readonly ethereum: IEthereumProvider; | ||
} | ||
export interface IEthereumProvider extends EventEmitter { | ||
readonly chainId: string | null; | ||
readonly networkVersion: string | null; | ||
readonly selectedAddress: string | null; | ||
readonly isKeplr: boolean; | ||
readonly isMetaMask: boolean; | ||
isConnected(): boolean; | ||
request<T>({ method, params, }: { | ||
method: string; | ||
params?: unknown[] | Record<string, unknown>; | ||
}): Promise<T>; | ||
enable(): Promise<string[]>; | ||
net_version(): Promise<string>; | ||
} |
{ | ||
"name": "@keplr-wallet/types", | ||
"version": "0.12.96-rc.1", | ||
"version": "0.12.96", | ||
"main": "build/index.js", | ||
@@ -21,3 +21,3 @@ "author": "chainapsis", | ||
}, | ||
"gitHead": "2fe1608d6c0696c65a2df053d2ccc72c97dd3144" | ||
"gitHead": "b0a96c2c713d8163ce840fcd5abbac4eb612607c" | ||
} |
import { Currency, AppCurrency, FeeCurrency } from "./currency"; | ||
import { BIP44 } from "./bip44"; | ||
import { Bech32Config } from "./bech32"; | ||
import { EVMInfo } from "./ethereum"; | ||
@@ -50,3 +49,6 @@ export interface ChainInfo { | ||
readonly evm?: EVMInfo; | ||
readonly evm?: { | ||
chainId: number; | ||
rpc: string; | ||
}; | ||
} | ||
@@ -58,8 +60,5 @@ | ||
> & { | ||
readonly rest: undefined; | ||
readonly rpc: undefined; | ||
readonly nodeProvider: undefined; | ||
readonly evm?: Omit<EVMInfo, "rpc"> & { | ||
readonly rpc: undefined; | ||
evm?: { | ||
chainId: number; | ||
}; | ||
}; |
@@ -43,11 +43,1 @@ export enum EthSignType { | ||
} | ||
export interface EVMInfo { | ||
chainId: number; | ||
rpc: string; | ||
} | ||
export interface EthereumSignResponse { | ||
signingData: Uint8Array; | ||
signature: Uint8Array; | ||
} |
@@ -16,3 +16,2 @@ import { ChainInfo, ChainInfoWithoutEndpoints } from "../chain-info"; | ||
import { DirectAuxSignResponse } from "../cosmjs-alt"; | ||
import EventEmitter from "events"; | ||
@@ -26,3 +25,2 @@ export interface Key { | ||
readonly bech32Address: string; | ||
readonly ethereumHexAddress: string; | ||
// Indicate whether the selected account is from the nano ledger. | ||
@@ -234,5 +232,2 @@ // Because current cosmos app in the nano ledger doesn't support the direct (proto) format msgs, | ||
getChainInfosWithoutEndpoints(): Promise<ChainInfoWithoutEndpoints[]>; | ||
getChainInfoWithoutEndpoints( | ||
chainId: string | ||
): Promise<ChainInfoWithoutEndpoints>; | ||
@@ -248,29 +243,2 @@ /** Change wallet extension user name **/ | ||
suggestERC20(chainId: string, contractAddress: string): Promise<void>; | ||
readonly ethereum: IEthereumProvider; | ||
} | ||
export interface IEthereumProvider extends EventEmitter { | ||
// It must be in the hexadecimal format used in EVM-based chains, not the format used in Tendermint nodes. | ||
readonly chainId: string | null; | ||
// It must be in the decimal format of chainId. | ||
readonly networkVersion: string | null; | ||
readonly selectedAddress: string | null; | ||
readonly isKeplr: boolean; | ||
readonly isMetaMask: boolean; | ||
isConnected(): boolean; | ||
request<T>({ | ||
method, | ||
params, | ||
}: { | ||
method: string; | ||
params?: unknown[] | Record<string, unknown>; | ||
}): Promise<T>; | ||
enable(): Promise<string[]>; | ||
net_version(): Promise<string>; | ||
} |
55675
-3.72%1212
-4.87%