@keplr-wallet/types 0.12.73 → 0.12.74-rc.1
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 +4 -0
- package/build/currency.d.ts +8 -1
- package/build/ethereum.d.ts +34 -0
- package/build/ethereum.js +6 -1
- package/build/ethereum.js.map +1 -1
- package/build/wallet/keplr.d.ts +2 -0
- package/package.json +2 -2
- package/src/chain-info.ts +5 -0
- package/src/currency.ts +10 -1
- package/src/ethereum.ts +37 -0
- package/src/wallet/keplr.ts +4 -0
package/build/chain-info.d.ts
CHANGED
@@ -38,5 +38,9 @@ export interface ChainInfo {
|
|
38
38
|
*/
|
39
39
|
readonly beta?: boolean;
|
40
40
|
readonly chainSymbolImageUrl?: string;
|
41
|
+
readonly evm?: {
|
42
|
+
chainId: number;
|
43
|
+
rpc: string;
|
44
|
+
};
|
41
45
|
}
|
42
46
|
export type ChainInfoWithoutEndpoints = Omit<ChainInfo, "rest" | "rpc" | "nodeProvider">;
|
package/build/currency.d.ts
CHANGED
@@ -46,10 +46,17 @@ export interface IBCCurrency extends Currency {
|
|
46
46
|
readonly originChainId: string | undefined;
|
47
47
|
readonly originCurrency: Currency | CW20Currency | Secret20Currency | undefined;
|
48
48
|
}
|
49
|
+
/**
|
50
|
+
* The currency that is supported on the EVM.
|
51
|
+
*/
|
52
|
+
export interface ERC20Currency extends Currency {
|
53
|
+
readonly type: "erc20";
|
54
|
+
readonly contractAddress: string;
|
55
|
+
}
|
49
56
|
/**
|
50
57
|
* Any type of currency that Kepler applications can support.
|
51
58
|
*/
|
52
|
-
export type AppCurrency = Currency | CW20Currency | Secret20Currency | IBCCurrency;
|
59
|
+
export type AppCurrency = Currency | CW20Currency | Secret20Currency | IBCCurrency | ERC20Currency;
|
53
60
|
export interface FiatCurrency {
|
54
61
|
readonly currency: string;
|
55
62
|
readonly symbol: string;
|
package/build/ethereum.d.ts
CHANGED
@@ -3,3 +3,37 @@ export declare enum EthSignType {
|
|
3
3
|
TRANSACTION = "transaction",
|
4
4
|
EIP712 = "eip-712"
|
5
5
|
}
|
6
|
+
export interface EthTxLog {
|
7
|
+
blockNumber: number;
|
8
|
+
blockHash: string;
|
9
|
+
transactionIndex: number;
|
10
|
+
removed: boolean;
|
11
|
+
address: string;
|
12
|
+
data: string;
|
13
|
+
topics: Array<string>;
|
14
|
+
transactionHash: string;
|
15
|
+
logIndex: number;
|
16
|
+
}
|
17
|
+
export declare enum EthTxStatus {
|
18
|
+
Success = "0x1",
|
19
|
+
Failure = "0x0"
|
20
|
+
}
|
21
|
+
export interface EthTxReceipt {
|
22
|
+
to: string;
|
23
|
+
from: string;
|
24
|
+
contractAddress: string;
|
25
|
+
transactionIndex: number;
|
26
|
+
root?: string;
|
27
|
+
gasUsed: string | number | bigint | BigInteger;
|
28
|
+
logsBloom: string;
|
29
|
+
blockHash: string;
|
30
|
+
transactionHash: string;
|
31
|
+
logs: Array<EthTxLog>;
|
32
|
+
blockNumber: number;
|
33
|
+
confirmations: number;
|
34
|
+
cumulativeGasUsed: string | number | bigint | BigInteger;
|
35
|
+
effectiveGasPrice: string | number | bigint | BigInteger;
|
36
|
+
byzantium: boolean;
|
37
|
+
type: number;
|
38
|
+
status?: EthTxStatus;
|
39
|
+
}
|
package/build/ethereum.js
CHANGED
@@ -1,10 +1,15 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.EthSignType = void 0;
|
3
|
+
exports.EthTxStatus = exports.EthSignType = void 0;
|
4
4
|
var EthSignType;
|
5
5
|
(function (EthSignType) {
|
6
6
|
EthSignType["MESSAGE"] = "message";
|
7
7
|
EthSignType["TRANSACTION"] = "transaction";
|
8
8
|
EthSignType["EIP712"] = "eip-712";
|
9
9
|
})(EthSignType = exports.EthSignType || (exports.EthSignType = {}));
|
10
|
+
var EthTxStatus;
|
11
|
+
(function (EthTxStatus) {
|
12
|
+
EthTxStatus["Success"] = "0x1";
|
13
|
+
EthTxStatus["Failure"] = "0x0";
|
14
|
+
})(EthTxStatus = exports.EthTxStatus || (exports.EthTxStatus = {}));
|
10
15
|
//# sourceMappingURL=ethereum.js.map
|
package/build/ethereum.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ethereum.js","sourceRoot":"","sources":["../src/ethereum.ts"],"names":[],"mappings":";;;AAAA,IAAY,WAIX;AAJD,WAAY,WAAW;IACrB,kCAAmB,CAAA;IACnB,0CAA2B,CAAA;IAC3B,iCAAkB,CAAA;AACpB,CAAC,EAJW,WAAW,GAAX,mBAAW,KAAX,mBAAW,QAItB"}
|
1
|
+
{"version":3,"file":"ethereum.js","sourceRoot":"","sources":["../src/ethereum.ts"],"names":[],"mappings":";;;AAAA,IAAY,WAIX;AAJD,WAAY,WAAW;IACrB,kCAAmB,CAAA;IACnB,0CAA2B,CAAA;IAC3B,iCAAkB,CAAA;AACpB,CAAC,EAJW,WAAW,GAAX,mBAAW,KAAX,mBAAW,QAItB;AAcD,IAAY,WAGX;AAHD,WAAY,WAAW;IACrB,8BAAe,CAAA;IACf,8BAAe,CAAA;AACjB,CAAC,EAHW,WAAW,GAAX,mBAAW,KAAX,mBAAW,QAGtB"}
|
package/build/wallet/keplr.d.ts
CHANGED
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@keplr-wallet/types",
|
3
|
-
"version": "0.12.
|
3
|
+
"version": "0.12.74-rc.1",
|
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": "
|
21
|
+
"gitHead": "e8019daf36e6b131dd9aa37ad2b2f40a0d86a899"
|
22
22
|
}
|
package/src/chain-info.ts
CHANGED
package/src/currency.ts
CHANGED
@@ -55,6 +55,14 @@ export interface IBCCurrency extends Currency {
|
|
55
55
|
| undefined;
|
56
56
|
}
|
57
57
|
|
58
|
+
/**
|
59
|
+
* The currency that is supported on the EVM.
|
60
|
+
*/
|
61
|
+
export interface ERC20Currency extends Currency {
|
62
|
+
readonly type: "erc20";
|
63
|
+
readonly contractAddress: string;
|
64
|
+
}
|
65
|
+
|
58
66
|
/**
|
59
67
|
* Any type of currency that Kepler applications can support.
|
60
68
|
*/
|
@@ -62,7 +70,8 @@ export type AppCurrency =
|
|
62
70
|
| Currency
|
63
71
|
| CW20Currency
|
64
72
|
| Secret20Currency
|
65
|
-
| IBCCurrency
|
73
|
+
| IBCCurrency
|
74
|
+
| ERC20Currency;
|
66
75
|
|
67
76
|
export interface FiatCurrency {
|
68
77
|
readonly currency: string;
|
package/src/ethereum.ts
CHANGED
@@ -3,3 +3,40 @@ export enum EthSignType {
|
|
3
3
|
TRANSACTION = "transaction",
|
4
4
|
EIP712 = "eip-712",
|
5
5
|
}
|
6
|
+
|
7
|
+
export interface EthTxLog {
|
8
|
+
blockNumber: number;
|
9
|
+
blockHash: string;
|
10
|
+
transactionIndex: number;
|
11
|
+
removed: boolean;
|
12
|
+
address: string;
|
13
|
+
data: string;
|
14
|
+
topics: Array<string>;
|
15
|
+
transactionHash: string;
|
16
|
+
logIndex: number;
|
17
|
+
}
|
18
|
+
|
19
|
+
export enum EthTxStatus {
|
20
|
+
Success = "0x1",
|
21
|
+
Failure = "0x0",
|
22
|
+
}
|
23
|
+
|
24
|
+
export interface EthTxReceipt {
|
25
|
+
to: string;
|
26
|
+
from: string;
|
27
|
+
contractAddress: string;
|
28
|
+
transactionIndex: number;
|
29
|
+
root?: string;
|
30
|
+
gasUsed: string | number | bigint | BigInteger;
|
31
|
+
logsBloom: string;
|
32
|
+
blockHash: string;
|
33
|
+
transactionHash: string;
|
34
|
+
logs: Array<EthTxLog>;
|
35
|
+
blockNumber: number;
|
36
|
+
confirmations: number;
|
37
|
+
cumulativeGasUsed: string | number | bigint | BigInteger;
|
38
|
+
effectiveGasPrice: string | number | bigint | BigInteger;
|
39
|
+
byzantium: boolean;
|
40
|
+
type: number;
|
41
|
+
status?: EthTxStatus;
|
42
|
+
}
|
package/src/wallet/keplr.ts
CHANGED
@@ -231,4 +231,8 @@ export interface Keplr {
|
|
231
231
|
defaultName: string;
|
232
232
|
editable?: boolean;
|
233
233
|
}): Promise<string>;
|
234
|
+
|
235
|
+
sendEthereumTx(chainId: string, tx: Uint8Array): Promise<string>;
|
236
|
+
|
237
|
+
suggestERC20(chainId: string, contractAddress: string): Promise<void>;
|
234
238
|
}
|