@keplr-wallet/types 0.12.114 → 0.12.115-rc.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -21,7 +21,7 @@ export interface ChainInfo {
21
21
  readonly walletUrlForStaking?: string;
22
22
  readonly bip44: BIP44;
23
23
  readonly alternativeBIP44s?: BIP44[];
24
- readonly bech32Config: Bech32Config;
24
+ readonly bech32Config?: Bech32Config;
25
25
  readonly currencies: AppCurrency[];
26
26
  /**
27
27
  * This indicates which coin or token can be used for fee to send transaction.
@@ -40,6 +40,7 @@ export interface EthTxReceipt {
40
40
  export interface EVMInfo {
41
41
  chainId: number;
42
42
  rpc: string;
43
+ websocket?: string;
43
44
  }
44
45
  export interface EthereumSignResponse {
45
46
  signingData: Uint8Array;
@@ -0,0 +1,15 @@
1
+ import { IEthereumProvider } from "./keplr";
2
+ export declare enum EIP6963EventNames {
3
+ Announce = "eip6963:announceProvider",
4
+ Request = "eip6963:requestProvider"
5
+ }
6
+ export type EIP6963ProviderInfo = {
7
+ uuid: string;
8
+ name: string;
9
+ icon: string;
10
+ rdns: string;
11
+ };
12
+ export type EIP6963ProviderDetail = {
13
+ info: EIP6963ProviderInfo;
14
+ provider: IEthereumProvider;
15
+ };
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.EIP6963EventNames = void 0;
4
+ var EIP6963EventNames;
5
+ (function (EIP6963EventNames) {
6
+ EIP6963EventNames["Announce"] = "eip6963:announceProvider";
7
+ EIP6963EventNames["Request"] = "eip6963:requestProvider";
8
+ })(EIP6963EventNames = exports.EIP6963EventNames || (exports.EIP6963EventNames = {}));
9
+ //# sourceMappingURL=eip6963.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"eip6963.js","sourceRoot":"","sources":["../../src/wallet/eip6963.ts"],"names":[],"mappings":";;;AAEA,IAAY,iBAGX;AAHD,WAAY,iBAAiB;IAC3B,0DAAqC,CAAA;IACrC,wDAAmC,CAAA;AACrC,CAAC,EAHW,iBAAiB,GAAjB,yBAAiB,KAAjB,yBAAiB,QAG5B"}
@@ -1 +1,2 @@
1
1
  export * from "./keplr";
2
+ export * from "./eip6963";
@@ -15,4 +15,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./keplr"), exports);
18
+ __exportStar(require("./eip6963"), exports);
18
19
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/wallet/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0CAAwB"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/wallet/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0CAAwB;AACxB,4CAA0B"}
@@ -139,9 +139,10 @@ export interface IEthereumProvider extends EventEmitter {
139
139
  readonly isKeplr: boolean;
140
140
  readonly isMetaMask: boolean;
141
141
  isConnected(): boolean;
142
- request<T>({ method, params, }: {
142
+ request<T = unknown>({ method, params, chainId, }: {
143
143
  method: string;
144
- params?: unknown[] | Record<string, unknown>;
144
+ params?: readonly unknown[] | Record<string, unknown>;
145
+ chainId?: string;
145
146
  }): Promise<T>;
146
147
  enable(): Promise<string[]>;
147
148
  net_version(): Promise<string>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@keplr-wallet/types",
3
- "version": "0.12.114",
3
+ "version": "0.12.115-rc.0",
4
4
  "main": "build/index.js",
5
5
  "author": "chainapsis",
6
6
  "license": "Apache-2.0",
@@ -18,5 +18,5 @@
18
18
  "dependencies": {
19
19
  "long": "^4.0.0"
20
20
  },
21
- "gitHead": "e5f409c5ea52ca353f50c670b53ad3078c08930b"
21
+ "gitHead": "7ca33dd8744560426aac4ffdf19dd63b255df91b"
22
22
  }
package/src/chain-info.ts CHANGED
@@ -22,7 +22,7 @@ export interface ChainInfo {
22
22
  readonly walletUrlForStaking?: string;
23
23
  readonly bip44: BIP44;
24
24
  readonly alternativeBIP44s?: BIP44[];
25
- readonly bech32Config: Bech32Config;
25
+ readonly bech32Config?: Bech32Config;
26
26
 
27
27
  readonly currencies: AppCurrency[];
28
28
  /**
package/src/ethereum.ts CHANGED
@@ -44,6 +44,7 @@ export interface EthTxReceipt {
44
44
  export interface EVMInfo {
45
45
  chainId: number;
46
46
  rpc: string;
47
+ websocket?: string;
47
48
  }
48
49
 
49
50
  export interface EthereumSignResponse {
@@ -0,0 +1,18 @@
1
+ import { IEthereumProvider } from "./keplr";
2
+
3
+ export enum EIP6963EventNames {
4
+ Announce = "eip6963:announceProvider",
5
+ Request = "eip6963:requestProvider",
6
+ }
7
+
8
+ export type EIP6963ProviderInfo = {
9
+ uuid: string;
10
+ name: string;
11
+ icon: string;
12
+ rdns: string;
13
+ };
14
+
15
+ export type EIP6963ProviderDetail = {
16
+ info: EIP6963ProviderInfo;
17
+ provider: IEthereumProvider;
18
+ };
@@ -1 +1,2 @@
1
1
  export * from "./keplr";
2
+ export * from "./eip6963";
@@ -259,12 +259,14 @@ export interface IEthereumProvider extends EventEmitter {
259
259
 
260
260
  isConnected(): boolean;
261
261
 
262
- request<T>({
262
+ request<T = unknown>({
263
263
  method,
264
264
  params,
265
+ chainId,
265
266
  }: {
266
267
  method: string;
267
- params?: unknown[] | Record<string, unknown>;
268
+ params?: readonly unknown[] | Record<string, unknown>;
269
+ chainId?: string;
268
270
  }): Promise<T>;
269
271
 
270
272
  enable(): Promise<string[]>;