@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.
- package/build/chain-info.d.ts +1 -19
- package/build/currency.d.ts +3 -3
- package/build/index.d.ts +1 -0
- package/build/index.js +6 -1
- package/build/index.js.map +1 -1
- package/build/settled.d.ts +8 -0
- package/build/settled.js +3 -0
- package/build/settled.js.map +1 -0
- package/build/wallet/index.js +5 -1
- package/build/wallet/index.js.map +1 -1
- package/build/wallet/keplr.d.ts +4 -2
- package/package.json +2 -4
- package/src/chain-info.ts +0 -18
- package/src/index.ts +1 -0
- package/src/settled.ts +11 -0
- package/src/wallet/keplr.ts +2 -0
package/build/chain-info.d.ts
CHANGED
@@ -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
|
42
|
+
export type ChainInfoWithoutEndpoints = Omit<ChainInfo, "rest" | "rpc" | "nodeProvider">;
|
package/build/currency.d.ts
CHANGED
@@ -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
|
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
|
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
|
67
|
+
export type FeeCurrency = WithGasPriceStep<AppCurrency>;
|
package/build/index.d.ts
CHANGED
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.
|
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
|
package/build/index.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
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"}
|
package/build/settled.js
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"settled.js","sourceRoot":"","sources":["../src/settled.ts"],"names":[],"mappings":""}
|
package/build/wallet/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.
|
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":"
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/wallet/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0CAAwB"}
|
package/build/wallet/keplr.d.ts
CHANGED
@@ -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
|
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
|
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.
|
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": "
|
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
package/src/settled.ts
ADDED
package/src/wallet/keplr.ts
CHANGED
@@ -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,
|