@keplr-wallet/types 0.10.24 → 0.11.0-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.
- package/build/chain-info.d.ts +2 -12
- package/build/currency.d.ts +12 -0
- package/package.json +2 -2
- package/src/chain-info.ts +2 -13
- package/src/currency.ts +14 -0
package/build/chain-info.d.ts
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import { Currency, AppCurrency } from "./currency";
|
1
|
+
import { Currency, AppCurrency, FeeCurrency } from "./currency";
|
2
2
|
import { BIP44 } from "./bip44";
|
3
3
|
import { AxiosRequestConfig } from "axios";
|
4
4
|
import { Bech32Config } from "./bech32";
|
@@ -24,7 +24,7 @@ export interface ChainInfo {
|
|
24
24
|
* This indicates which coin or token can be used for fee to send transaction.
|
25
25
|
* You can get actual currency information from Currencies.
|
26
26
|
*/
|
27
|
-
readonly feeCurrencies:
|
27
|
+
readonly feeCurrencies: FeeCurrency[];
|
28
28
|
/**
|
29
29
|
* This is the coin type in slip-044.
|
30
30
|
* This is used for fetching address from ENS if this field is set.
|
@@ -34,16 +34,6 @@ export interface ChainInfo {
|
|
34
34
|
* @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.
|
35
35
|
*/
|
36
36
|
readonly coinType?: number;
|
37
|
-
/**
|
38
|
-
* This is used to set the fee of the transaction.
|
39
|
-
* If this field is empty, it just use the default gas price step (low: 0.01, average: 0.025, high: 0.04).
|
40
|
-
* And, set field's type as primitive number because it is hard to restore the prototype after deserialzing if field's type is `Dec`.
|
41
|
-
*/
|
42
|
-
readonly gasPriceStep?: {
|
43
|
-
low: number;
|
44
|
-
average: number;
|
45
|
-
high: number;
|
46
|
-
};
|
47
37
|
/**
|
48
38
|
* Indicate the features supported by this chain. Ex) cosmwasm, secretwasm ...
|
49
39
|
*/
|
package/build/currency.d.ts
CHANGED
@@ -53,3 +53,15 @@ export interface FiatCurrency {
|
|
53
53
|
readonly maxDecimals: number;
|
54
54
|
readonly locale: string;
|
55
55
|
}
|
56
|
+
export declare type WithGasPriceStep<T> = T & {
|
57
|
+
/**
|
58
|
+
* This is used to set the fee of the transaction.
|
59
|
+
* If this field is empty, it just use the default gas price step (low: 0.01, average: 0.025, high: 0.04).
|
60
|
+
*/
|
61
|
+
readonly gasPriceStep?: {
|
62
|
+
readonly low: number;
|
63
|
+
readonly average: number;
|
64
|
+
readonly high: number;
|
65
|
+
};
|
66
|
+
};
|
67
|
+
export declare type FeeCurrency = WithGasPriceStep<AppCurrency>;
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@keplr-wallet/types",
|
3
|
-
"version": "0.
|
3
|
+
"version": "0.11.0-rc.0",
|
4
4
|
"main": "build/index.js",
|
5
5
|
"author": "chainapsis",
|
6
6
|
"license": "Apache-2.0",
|
@@ -23,5 +23,5 @@
|
|
23
23
|
"long": "^4.0.0",
|
24
24
|
"secretjs": "^0.17.0"
|
25
25
|
},
|
26
|
-
"gitHead": "
|
26
|
+
"gitHead": "98a787fe9907ec402e5d70adcdee4cb759ede8e4"
|
27
27
|
}
|
package/src/chain-info.ts
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import { Currency, AppCurrency } from "./currency";
|
1
|
+
import { Currency, AppCurrency, FeeCurrency } from "./currency";
|
2
2
|
import { BIP44 } from "./bip44";
|
3
3
|
import { AxiosRequestConfig } from "axios";
|
4
4
|
import { Bech32Config } from "./bech32";
|
@@ -26,7 +26,7 @@ export interface ChainInfo {
|
|
26
26
|
* This indicates which coin or token can be used for fee to send transaction.
|
27
27
|
* You can get actual currency information from Currencies.
|
28
28
|
*/
|
29
|
-
readonly feeCurrencies:
|
29
|
+
readonly feeCurrencies: FeeCurrency[];
|
30
30
|
/**
|
31
31
|
* This is the coin type in slip-044.
|
32
32
|
* This is used for fetching address from ENS if this field is set.
|
@@ -37,17 +37,6 @@ export interface ChainInfo {
|
|
37
37
|
*/
|
38
38
|
readonly coinType?: number;
|
39
39
|
|
40
|
-
/**
|
41
|
-
* This is used to set the fee of the transaction.
|
42
|
-
* If this field is empty, it just use the default gas price step (low: 0.01, average: 0.025, high: 0.04).
|
43
|
-
* And, set field's type as primitive number because it is hard to restore the prototype after deserialzing if field's type is `Dec`.
|
44
|
-
*/
|
45
|
-
readonly gasPriceStep?: {
|
46
|
-
low: number;
|
47
|
-
average: number;
|
48
|
-
high: number;
|
49
|
-
};
|
50
|
-
|
51
40
|
/**
|
52
41
|
* Indicate the features supported by this chain. Ex) cosmwasm, secretwasm ...
|
53
42
|
*/
|
package/src/currency.ts
CHANGED
@@ -66,3 +66,17 @@ export interface FiatCurrency {
|
|
66
66
|
readonly maxDecimals: number;
|
67
67
|
readonly locale: string;
|
68
68
|
}
|
69
|
+
|
70
|
+
export type WithGasPriceStep<T> = T & {
|
71
|
+
/**
|
72
|
+
* This is used to set the fee of the transaction.
|
73
|
+
* If this field is empty, it just use the default gas price step (low: 0.01, average: 0.025, high: 0.04).
|
74
|
+
*/
|
75
|
+
readonly gasPriceStep?: {
|
76
|
+
readonly low: number;
|
77
|
+
readonly average: number;
|
78
|
+
readonly high: number;
|
79
|
+
};
|
80
|
+
};
|
81
|
+
|
82
|
+
export type FeeCurrency = WithGasPriceStep<AppCurrency>;
|