@keplr-wallet/types 0.11.64 → 0.12.0-alpha.2

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.
@@ -1,18 +1,9 @@
1
1
  import { Currency, AppCurrency, FeeCurrency } from "./currency";
2
2
  import { BIP44 } from "./bip44";
3
- import { AxiosRequestConfig } from "axios";
4
3
  import { Bech32Config } from "./bech32";
5
4
  export interface ChainInfo {
6
5
  readonly rpc: string;
7
- /**
8
- * @deprecated Do not use
9
- */
10
- readonly rpcConfig?: AxiosRequestConfig;
11
6
  readonly rest: string;
12
- /**
13
- * @deprecated Do not use
14
- */
15
- readonly restConfig?: AxiosRequestConfig;
16
7
  readonly nodeProvider?: {
17
8
  readonly name: string;
18
9
  readonly email: string;
@@ -36,15 +27,6 @@ export interface ChainInfo {
36
27
  * You can get actual currency information from Currencies.
37
28
  */
38
29
  readonly feeCurrencies: FeeCurrency[];
39
- /**
40
- * This is the coin type in slip-044.
41
- * This is used for fetching address from ENS if this field is set.
42
- *
43
- * ** Use the `bip44.coinType` field to set the coin type to generate the address. **
44
- *
45
- * @deprecated This field is likely to be changed. ENS will continue to be supported, but will change in the future to use other methods than this field. Because of the low usage of the ENS feature, the change is a low priority and it is not yet clear how it will change.
46
- */
47
- readonly coinType?: number;
48
30
  /**
49
31
  * Indicate the features supported by this chain. Ex) cosmwasm, secretwasm ...
50
32
  */
@@ -57,4 +39,4 @@ export interface ChainInfo {
57
39
  readonly beta?: boolean;
58
40
  readonly chainSymbolImageUrl?: string;
59
41
  }
60
- export declare type ChainInfoWithoutEndpoints = Omit<ChainInfo, "rest" | "rpc" | "nodeProvider">;
42
+ export type ChainInfoWithoutEndpoints = Omit<ChainInfo, "rest" | "rpc" | "nodeProvider">;
@@ -46,14 +46,14 @@ export interface IBCCurrency extends Currency {
46
46
  /**
47
47
  * Any type of currency that Kepler applications can support.
48
48
  */
49
- export declare type AppCurrency = Currency | CW20Currency | Secret20Currency | IBCCurrency;
49
+ export type AppCurrency = Currency | CW20Currency | Secret20Currency | IBCCurrency;
50
50
  export interface FiatCurrency {
51
51
  readonly currency: string;
52
52
  readonly symbol: string;
53
53
  readonly maxDecimals: number;
54
54
  readonly locale: string;
55
55
  }
56
- export declare type WithGasPriceStep<T> = T & {
56
+ export type WithGasPriceStep<T> = T & {
57
57
  /**
58
58
  * This is used to set the fee of the transaction.
59
59
  * If this field is empty, it just use the default gas price step (low: 0.01, average: 0.025, high: 0.04).
@@ -64,4 +64,4 @@ export declare type WithGasPriceStep<T> = T & {
64
64
  readonly high: number;
65
65
  };
66
66
  };
67
- export declare type FeeCurrency = WithGasPriceStep<AppCurrency>;
67
+ export type FeeCurrency = WithGasPriceStep<AppCurrency>;
package/build/index.d.ts CHANGED
@@ -7,3 +7,4 @@ export * from "./window";
7
7
  export * from "./ethereum";
8
8
  export * from "./cosmjs";
9
9
  export * from "./secretjs";
10
+ export * from "./settled";
package/build/index.js CHANGED
@@ -1,7 +1,11 @@
1
1
  "use strict";
2
2
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
3
  if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
5
9
  }) : (function(o, m, k, k2) {
6
10
  if (k2 === undefined) k2 = k;
7
11
  o[k2] = m[k];
@@ -19,4 +23,5 @@ __exportStar(require("./window"), exports);
19
23
  __exportStar(require("./ethereum"), exports);
20
24
  __exportStar(require("./cosmjs"), exports);
21
25
  __exportStar(require("./secretjs"), exports);
26
+ __exportStar(require("./settled"), exports);
22
27
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAA2B;AAC3B,2CAAyB;AACzB,0CAAwB;AACxB,+CAA6B;AAC7B,2CAAyB;AACzB,2CAAyB;AACzB,6CAA2B;AAC3B,2CAAyB;AACzB,6CAA2B"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,6CAA2B;AAC3B,2CAAyB;AACzB,0CAAwB;AACxB,+CAA6B;AAC7B,2CAAyB;AACzB,2CAAyB;AACzB,6CAA2B;AAC3B,2CAAyB;AACzB,6CAA2B;AAC3B,4CAA0B"}
@@ -0,0 +1,8 @@
1
+ export type SettledResponse<T> = {
2
+ status: "fulfilled";
3
+ value: T;
4
+ } | {
5
+ status: "rejected";
6
+ reason: Error;
7
+ };
8
+ export type SettledResponses<T> = SettledResponse<T>[];
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=settled.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"settled.js","sourceRoot":"","sources":["../src/settled.ts"],"names":[],"mappings":""}
@@ -1,7 +1,11 @@
1
1
  "use strict";
2
2
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
3
  if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
5
9
  }) : (function(o, m, k, k2) {
6
10
  if (k2 === undefined) k2 = k;
7
11
  o[k2] = m[k];
@@ -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"}
@@ -3,6 +3,7 @@ import { EthSignType } from "../ethereum";
3
3
  import { BroadcastMode, AminoSignResponse, StdSignDoc, OfflineAminoSigner, StdSignature, DirectSignResponse, OfflineDirectSigner } from "../cosmjs";
4
4
  import { SecretUtils } from "../secretjs";
5
5
  import Long from "long";
6
+ import { SettledResponses } from "../settled";
6
7
  export interface Key {
7
8
  readonly name: string;
8
9
  readonly algo: string;
@@ -12,7 +13,7 @@ export interface Key {
12
13
  readonly isNanoLedger: boolean;
13
14
  readonly isKeystone: boolean;
14
15
  }
15
- export declare type ICNSAdr36Signatures = {
16
+ export type ICNSAdr36Signatures = {
16
17
  chainId: string;
17
18
  bech32Prefix: string;
18
19
  bech32Address: string;
@@ -21,7 +22,7 @@ export declare type ICNSAdr36Signatures = {
21
22
  signatureSalt: number;
22
23
  signature: Uint8Array;
23
24
  }[];
24
- export declare type KeplrMode = "core" | "extension" | "mobile-web" | "walletconnect";
25
+ export type KeplrMode = "core" | "extension" | "mobile-web" | "walletconnect";
25
26
  export interface KeplrIntereactionOptions {
26
27
  readonly sign?: KeplrSignOptions;
27
28
  }
@@ -50,6 +51,7 @@ export interface Keplr {
50
51
  */
51
52
  disable(chainIds?: string | string[]): Promise<void>;
52
53
  getKey(chainId: string): Promise<Key>;
54
+ getKeysSettled(chainIds: string[]): Promise<SettledResponses<Key>>;
53
55
  signAmino(chainId: string, signer: string, signDoc: StdSignDoc, signOptions?: KeplrSignOptions): Promise<AminoSignResponse>;
54
56
  signDirect(chainId: string, signer: string, signDoc: {
55
57
  /** SignDoc bodyBytes */
package/package.json CHANGED
@@ -1,10 +1,9 @@
1
1
  {
2
2
  "name": "@keplr-wallet/types",
3
- "version": "0.11.64",
3
+ "version": "0.12.0-alpha.2",
4
4
  "main": "build/index.js",
5
5
  "author": "chainapsis",
6
6
  "license": "Apache-2.0",
7
- "private": false,
8
7
  "publishConfig": {
9
8
  "access": "public"
10
9
  },
@@ -17,8 +16,7 @@
17
16
  "lint-fix": "eslint --fix \"src/**/*\" && prettier --write \"src/**/*\""
18
17
  },
19
18
  "dependencies": {
20
- "axios": "^0.27.2",
21
19
  "long": "^4.0.0"
22
20
  },
23
- "gitHead": "97e77b314c58e0c7379f48a880972dfbb481df26"
21
+ "gitHead": "ac984666c53de8f9325d02ff62f1a0febcafa310"
24
22
  }
package/src/chain-info.ts CHANGED
@@ -1,19 +1,10 @@
1
1
  import { Currency, AppCurrency, FeeCurrency } from "./currency";
2
2
  import { BIP44 } from "./bip44";
3
- import { AxiosRequestConfig } from "axios";
4
3
  import { Bech32Config } from "./bech32";
5
4
 
6
5
  export interface ChainInfo {
7
6
  readonly rpc: string;
8
- /**
9
- * @deprecated Do not use
10
- */
11
- readonly rpcConfig?: AxiosRequestConfig;
12
7
  readonly rest: string;
13
- /**
14
- * @deprecated Do not use
15
- */
16
- readonly restConfig?: AxiosRequestConfig;
17
8
  readonly nodeProvider?: {
18
9
  readonly name: string;
19
10
  readonly email: string;
@@ -38,15 +29,6 @@ export interface ChainInfo {
38
29
  * You can get actual currency information from Currencies.
39
30
  */
40
31
  readonly feeCurrencies: FeeCurrency[];
41
- /**
42
- * This is the coin type in slip-044.
43
- * This is used for fetching address from ENS if this field is set.
44
- *
45
- * ** Use the `bip44.coinType` field to set the coin type to generate the address. **
46
- *
47
- * @deprecated This field is likely to be changed. ENS will continue to be supported, but will change in the future to use other methods than this field. Because of the low usage of the ENS feature, the change is a low priority and it is not yet clear how it will change.
48
- */
49
- readonly coinType?: number;
50
32
 
51
33
  /**
52
34
  * Indicate the features supported by this chain. Ex) cosmwasm, secretwasm ...
package/src/index.ts CHANGED
@@ -7,3 +7,4 @@ export * from "./window";
7
7
  export * from "./ethereum";
8
8
  export * from "./cosmjs";
9
9
  export * from "./secretjs";
10
+ export * from "./settled";
package/src/settled.ts ADDED
@@ -0,0 +1,11 @@
1
+ export type SettledResponse<T> =
2
+ | {
3
+ status: "fulfilled";
4
+ value: T;
5
+ }
6
+ | {
7
+ status: "rejected";
8
+ reason: Error;
9
+ };
10
+
11
+ export type SettledResponses<T> = SettledResponse<T>[];
@@ -11,6 +11,7 @@ import {
11
11
  } from "../cosmjs";
12
12
  import { SecretUtils } from "../secretjs";
13
13
  import Long from "long";
14
+ import { SettledResponses } from "../settled";
14
15
 
15
16
  export interface Key {
16
17
  // Name of the selected key store.
@@ -71,6 +72,7 @@ export interface Keplr {
71
72
  disable(chainIds?: string | string[]): Promise<void>;
72
73
 
73
74
  getKey(chainId: string): Promise<Key>;
75
+ getKeysSettled(chainIds: string[]): Promise<SettledResponses<Key>>;
74
76
  signAmino(
75
77
  chainId: string,
76
78
  signer: string,