@airgap/ethereum 0.13.20-beta.7 → 0.13.21-beta.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/package.json +7 -7
- package/v1/clients/info/EthereumInfoClient.d.ts +7 -9
- package/v1/clients/info/EthereumInfoClient.js.map +1 -1
- package/v1/clients/info/EtherscanInfoClient.d.ts +1 -2
- package/v1/clients/info/EtherscanInfoClient.js +2 -0
- package/v1/clients/info/EtherscanInfoClient.js.map +1 -1
- package/v1/index.d.ts +5 -18
- package/v1/index.js +1 -16
- package/v1/index.js.map +1 -1
- package/v1/module/ERC20Tokens.d.ts +1 -1
- package/v1/module/EthereumModule.d.ts +4 -4
- package/v1/module/EthereumModule.js.map +1 -1
- package/v1/protocol/EthereumBaseProtocol.d.ts +8 -84
- package/v1/protocol/EthereumBaseProtocol.js +7 -777
- package/v1/protocol/EthereumBaseProtocol.js.map +1 -1
- package/v1/protocol/EthereumProtocol.d.ts +7 -6
- package/v1/protocol/EthereumProtocol.js +3 -3
- package/v1/protocol/EthereumProtocol.js.map +1 -1
- package/v1/protocol/erc20/ERC20Token.d.ts +10 -15
- package/v1/protocol/erc20/ERC20Token.js +35 -26
- package/v1/protocol/erc20/ERC20Token.js.map +1 -1
- package/v1/serializer/v3/serializer-companion.js +9 -10
- package/v1/serializer/v3/serializer-companion.js.map +1 -1
- package/v1/utils/protocol.d.ts +5 -4
- package/v1/utils/protocol.js.map +1 -1
- package/v1/clients/crypto/EthereumCryptoClient.d.ts +0 -7
- package/v1/clients/crypto/EthereumCryptoClient.js +0 -147
- package/v1/clients/crypto/EthereumCryptoClient.js.map +0 -1
- package/v1/clients/node/EthereumNodeClient.d.ts +0 -18
- package/v1/clients/node/EthereumNodeClient.js +0 -3
- package/v1/clients/node/EthereumNodeClient.js.map +0 -1
- package/v1/clients/node/HttpEthereumNodeClient.d.ts +0 -66
- package/v1/clients/node/HttpEthereumNodeClient.js +0 -443
- package/v1/clients/node/HttpEthereumNodeClient.js.map +0 -1
- package/v1/data/EthereumAddress.d.ts +0 -7
- package/v1/data/EthereumAddress.js +0 -46
- package/v1/data/EthereumAddress.js.map +0 -1
- package/v1/protocol/EthereumChainIds.d.ts +0 -1
- package/v1/protocol/EthereumChainIds.js +0 -340
- package/v1/protocol/EthereumChainIds.js.map +0 -1
- package/v1/protocol/erc20/ERC20Protocol.d.ts +0 -32
- package/v1/protocol/erc20/ERC20Protocol.js +0 -397
- package/v1/protocol/erc20/ERC20Protocol.js.map +0 -1
- package/v1/serializer/v3/schemas/converter/transaction-converter.d.ts +0 -8
- package/v1/serializer/v3/schemas/converter/transaction-converter.js +0 -76
- package/v1/serializer/v3/schemas/converter/transaction-converter.js.map +0 -1
- package/v1/serializer/v3/schemas/definitions/transaction-sign-request-ethereum-typed.d.ts +0 -10
- package/v1/serializer/v3/schemas/definitions/transaction-sign-request-ethereum-typed.js +0 -3
- package/v1/serializer/v3/schemas/definitions/transaction-sign-request-ethereum-typed.js.map +0 -1
- package/v1/serializer/v3/schemas/definitions/transaction-sign-request-ethereum.d.ts +0 -14
- package/v1/serializer/v3/schemas/definitions/transaction-sign-request-ethereum.js +0 -3
- package/v1/serializer/v3/schemas/definitions/transaction-sign-request-ethereum.js.map +0 -1
- package/v1/serializer/v3/schemas/definitions/transaction-sign-response-ethereum.d.ts +0 -3
- package/v1/serializer/v3/schemas/definitions/transaction-sign-response-ethereum.js +0 -3
- package/v1/serializer/v3/schemas/definitions/transaction-sign-response-ethereum.js.map +0 -1
- package/v1/serializer/v3/schemas/generated/transaction-sign-request-ethereum-typed.json +0 -41
- package/v1/serializer/v3/schemas/generated/transaction-sign-request-ethereum.json +0 -58
- package/v1/serializer/v3/schemas/generated/transaction-sign-response-ethereum.json +0 -19
- package/v1/serializer/v3/validators/transaction-validator.d.ts +0 -7
- package/v1/serializer/v3/validators/transaction-validator.js +0 -71
- package/v1/serializer/v3/validators/transaction-validator.js.map +0 -1
- package/v1/types/crypto.d.ts +0 -2
- package/v1/types/crypto.js +0 -3
- package/v1/types/crypto.js.map +0 -1
- package/v1/types/protocol.d.ts +0 -35
- package/v1/types/protocol.js +0 -3
- package/v1/types/protocol.js.map +0 -1
- package/v1/types/transaction.d.ts +0 -24
- package/v1/types/transaction.js +0 -3
- package/v1/types/transaction.js.map +0 -1
- package/v1/utils/EthereumUtils.d.ts +0 -16
- package/v1/utils/EthereumUtils.js +0 -155
- package/v1/utils/EthereumUtils.js.map +0 -1
- package/v1/utils/key.d.ts +0 -5
- package/v1/utils/key.js +0 -101
- package/v1/utils/key.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@airgap/ethereum",
|
|
3
|
-
"version": "0.13.
|
|
3
|
+
"version": "0.13.21-beta.0",
|
|
4
4
|
"description": "The @airgap/ethereum is an Ethereum implementation of the ICoinProtocol interface from @airgap/coinlib-core.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"airgap",
|
|
@@ -30,13 +30,13 @@
|
|
|
30
30
|
},
|
|
31
31
|
"author": "Papers AG <contact@papers.ch> (https://papers.ch)",
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@airgap/coinlib-core": "^0.13.
|
|
34
|
-
"@airgap/crypto": "^0.13.
|
|
35
|
-
"@airgap/
|
|
36
|
-
"@airgap/
|
|
33
|
+
"@airgap/coinlib-core": "^0.13.21-beta.0",
|
|
34
|
+
"@airgap/crypto": "^0.13.21-beta.0",
|
|
35
|
+
"@airgap/evm": "^0.13.21-beta.0",
|
|
36
|
+
"@airgap/module-kit": "^0.13.21-beta.0",
|
|
37
|
+
"@airgap/serializer": "^0.13.21-beta.0",
|
|
37
38
|
"@ethereumjs/common": "2.6.5",
|
|
38
|
-
"@ethereumjs/tx": "3.4.0"
|
|
39
|
-
"@metamask/eth-sig-util": "4.0.0"
|
|
39
|
+
"@ethereumjs/tx": "3.4.0"
|
|
40
40
|
},
|
|
41
41
|
"localDependencies": {
|
|
42
42
|
"ethereumjs-tx": "1.3.7",
|
|
@@ -1,13 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
export
|
|
4
|
-
|
|
5
|
-
transactions: EthereumInfoClientTransaction[];
|
|
6
|
-
cursor: {
|
|
7
|
-
page: number;
|
|
8
|
-
};
|
|
1
|
+
import { EvmInfoClient, EvmInfoClientTransactionsResult } from '@airgap/evm';
|
|
2
|
+
import { TransactionCursor } from '@airgap/module-kit';
|
|
3
|
+
export interface EthereumTransactionCursor extends TransactionCursor {
|
|
4
|
+
page?: number;
|
|
9
5
|
}
|
|
10
|
-
export
|
|
6
|
+
export interface EthereumInfoClientTransactionsResult extends EvmInfoClientTransactionsResult<EthereumTransactionCursor> {
|
|
7
|
+
}
|
|
8
|
+
export declare abstract class EthereumInfoClient implements EvmInfoClient<EthereumTransactionCursor, EthereumInfoClientTransactionsResult> {
|
|
11
9
|
baseURL: string;
|
|
12
10
|
constructor(baseURL: string);
|
|
13
11
|
abstract fetchTransactions(address: string, limit: number, cursor?: EthereumTransactionCursor): Promise<EthereumInfoClientTransactionsResult>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EthereumInfoClient.js","sourceRoot":"","sources":["../../../../src/v1/clients/info/EthereumInfoClient.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"EthereumInfoClient.js","sourceRoot":"","sources":["../../../../src/v1/clients/info/EthereumInfoClient.ts"],"names":[],"mappings":";;;AASA;IAGE,4BAAY,OAAe;QACzB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAA;IACxB,CAAC;IAaH,yBAAC;AAAD,CAAC,AAlBD,IAkBC;AAlBqB,gDAAkB"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { EthereumTransactionCursor } from '
|
|
2
|
-
import { EthereumInfoClient, EthereumInfoClientTransactionsResult } from './EthereumInfoClient';
|
|
1
|
+
import { EthereumInfoClient, EthereumInfoClientTransactionsResult, EthereumTransactionCursor } from './EthereumInfoClient';
|
|
3
2
|
export declare class EtherscanInfoClient extends EthereumInfoClient {
|
|
4
3
|
private readonly apiKey?;
|
|
5
4
|
constructor(baseURL: string, apiKey?: string | undefined);
|
|
@@ -111,6 +111,7 @@ var EtherscanInfoClient = /** @class */ (function (_super) {
|
|
|
111
111
|
return [2 /*return*/, {
|
|
112
112
|
transactions: airGapTransactions,
|
|
113
113
|
cursor: {
|
|
114
|
+
hasNext: limit == airGapTransactions.length,
|
|
114
115
|
page: page + 1
|
|
115
116
|
}
|
|
116
117
|
}];
|
|
@@ -160,6 +161,7 @@ var EtherscanInfoClient = /** @class */ (function (_super) {
|
|
|
160
161
|
return [2 /*return*/, {
|
|
161
162
|
transactions: airGapTransactions,
|
|
162
163
|
cursor: {
|
|
164
|
+
hasNext: limit == airGapTransactions.length,
|
|
163
165
|
page: page + 1
|
|
164
166
|
}
|
|
165
167
|
}];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EtherscanInfoClient.js","sourceRoot":"","sources":["../../../../src/v1/clients/info/EtherscanInfoClient.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,oGAAsE;AACtE,gGAA8F;AAC9F,8FAA2F;AAC3F,sDAA0D;AAC1D,2EAAkE;AAClE,iDAA8C;
|
|
1
|
+
{"version":3,"file":"EtherscanInfoClient.js","sourceRoot":"","sources":["../../../../src/v1/clients/info/EtherscanInfoClient.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,oGAAsE;AACtE,gGAA8F;AAC9F,8FAA2F;AAC3F,sDAA0D;AAC1D,2EAAkE;AAClE,iDAA8C;AAG9C,2DAA0H;AAE1H;IAAyC,uCAAkB;IACzD,6BAAY,OAAe,EAAmB,MAAe;QAA7D,YACE,kBAAM,OAAO,CAAC,SACf;QAF6C,YAAM,GA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E,WAAW,CAAC,IAAI;oCACtB,KAAK,EAAE,WAAW,CAAC,WAAW;iCAC/B;6BACF,CAAA;4BAED,kBAAkB,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAA;yBAC3C;wBAED,sBAAO;gCACL,YAAY,EAAE,kBAAkB;gCAChC,MAAM,EAAE;oCACN,OAAO,EAAE,KAAK,IAAI,kBAAkB,CAAC,MAAM;oCAC3C,IAAI,EAAE,IAAI,GAAG,CAAC;iCACf;6BACF,EAAA;;;;KACF;IACH,0BAAC;AAAD,CAAC,AAvGD,CAAyC,uCAAkB,GAuG1D;AAvGY,kDAAmB"}
|
package/v1/index.d.ts
CHANGED
|
@@ -1,30 +1,17 @@
|
|
|
1
1
|
import { EtherscanBlockExplorer } from './block-explorer/EtherscanBlockExplorer';
|
|
2
2
|
import { EthereumInfoClient } from './clients/info/EthereumInfoClient';
|
|
3
3
|
import { EtherscanInfoClient } from './clients/info/EtherscanInfoClient';
|
|
4
|
-
import { HttpEthereumNodeClient, EthereumRPCBody, EthereumRPCData, EthereumRPCResponse } from './clients/node/HttpEthereumNodeClient';
|
|
5
|
-
import { EthereumNodeClient } from './clients/node/EthereumNodeClient';
|
|
6
4
|
import { erc20Tokens } from './module/ERC20Tokens';
|
|
7
5
|
import { EthereumModule } from './module/EthereumModule';
|
|
8
|
-
import { ERC20Protocol, ERC20ProtocolImpl } from './protocol/erc20/ERC20Protocol';
|
|
9
6
|
import { createERC20Token, ERC20Token, ERC20TokenImpl } from './protocol/erc20/ERC20Token';
|
|
10
|
-
import { DEFAULT_ETHEREUM_UNITS_METADATA, EthereumBaseProtocol, EthereumBaseProtocolImpl } from './protocol/EthereumBaseProtocol';
|
|
7
|
+
import { DEFAULT_ETHEREUM_UNITS_METADATA, EthereumBaseProtocol, EthereumBaseProtocolImpl, EthereumUnits } from './protocol/EthereumBaseProtocol';
|
|
11
8
|
import { createEthereumProtocol, createEthereumProtocolOptions, EthereumProtocol } from './protocol/EthereumProtocol';
|
|
12
|
-
import { ethereumSignedTransactionToResponse, ethereumTransactionSignRequestToUnsigned, ethereumTransactionSignResponseToSigned, ethereumUnsignedTransactionToRequest } from './serializer/v3/schemas/converter/transaction-converter';
|
|
13
|
-
import { EthereumTransactionValidator } from './serializer/v3/validators/transaction-validator';
|
|
14
|
-
import { EthereumTransactionSignRequest } from './serializer/v3/schemas/definitions/transaction-sign-request-ethereum';
|
|
15
|
-
import { EthereumTypedTransactionSignRequest } from './serializer/v3/schemas/definitions/transaction-sign-request-ethereum-typed';
|
|
16
|
-
import { EthereumTransactionSignResponse } from './serializer/v3/schemas/definitions/transaction-sign-response-ethereum';
|
|
17
|
-
import { EthereumCryptoConfiguration } from './types/crypto';
|
|
18
|
-
import { ERC20TokenMetadata, ERC20TokenOptions, EthereumBaseProtocolOptions, EthereumProtocolNetwork, EthereumProtocolOptions, EthereumUnits } from './types/protocol';
|
|
19
|
-
import { EthereumRawUnsignedTransaction, EthereumSignedTransaction, EthereumTransactionCursor, EthereumTypedUnsignedTransaction, EthereumUnsignedTransaction } from './types/transaction';
|
|
20
|
-
import { EthereumUtils } from './utils/EthereumUtils';
|
|
21
9
|
import { isAnyEthereumProtocol, isEthereumERC20Protocol, isEthereumERC20Token, isEthereumProtocol } from './utils/protocol';
|
|
22
10
|
export { EthereumModule };
|
|
23
|
-
export { EthereumBaseProtocol, EthereumBaseProtocolImpl, EthereumProtocol, createEthereumProtocol, createEthereumProtocolOptions,
|
|
11
|
+
export { EthereumBaseProtocol, EthereumBaseProtocolImpl, EthereumProtocol, createEthereumProtocol, createEthereumProtocolOptions, ERC20Token, ERC20TokenImpl, createERC20Token };
|
|
24
12
|
export { EtherscanBlockExplorer };
|
|
25
13
|
export { DEFAULT_ETHEREUM_UNITS_METADATA };
|
|
26
|
-
export {
|
|
27
|
-
export {
|
|
28
|
-
export {
|
|
29
|
-
export { EthereumUtils, isAnyEthereumProtocol, isEthereumProtocol, isEthereumERC20Protocol, isEthereumERC20Token };
|
|
14
|
+
export { EthereumInfoClient, EtherscanInfoClient };
|
|
15
|
+
export { EthereumUnits };
|
|
16
|
+
export { isAnyEthereumProtocol, isEthereumProtocol, isEthereumERC20Protocol, isEthereumERC20Token };
|
|
30
17
|
export { erc20Tokens };
|
package/v1/index.js
CHANGED
|
@@ -1,22 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.erc20Tokens = exports.isEthereumERC20Token = exports.isEthereumERC20Protocol = exports.isEthereumProtocol = exports.isAnyEthereumProtocol = exports.
|
|
3
|
+
exports.erc20Tokens = exports.isEthereumERC20Token = exports.isEthereumERC20Protocol = exports.isEthereumProtocol = exports.isAnyEthereumProtocol = exports.EtherscanInfoClient = exports.EthereumInfoClient = exports.DEFAULT_ETHEREUM_UNITS_METADATA = exports.EtherscanBlockExplorer = exports.createERC20Token = exports.ERC20TokenImpl = exports.createEthereumProtocolOptions = exports.createEthereumProtocol = exports.EthereumBaseProtocolImpl = exports.EthereumModule = void 0;
|
|
4
4
|
var EtherscanBlockExplorer_1 = require("./block-explorer/EtherscanBlockExplorer");
|
|
5
5
|
Object.defineProperty(exports, "EtherscanBlockExplorer", { enumerable: true, get: function () { return EtherscanBlockExplorer_1.EtherscanBlockExplorer; } });
|
|
6
6
|
var EthereumInfoClient_1 = require("./clients/info/EthereumInfoClient");
|
|
7
7
|
Object.defineProperty(exports, "EthereumInfoClient", { enumerable: true, get: function () { return EthereumInfoClient_1.EthereumInfoClient; } });
|
|
8
8
|
var EtherscanInfoClient_1 = require("./clients/info/EtherscanInfoClient");
|
|
9
9
|
Object.defineProperty(exports, "EtherscanInfoClient", { enumerable: true, get: function () { return EtherscanInfoClient_1.EtherscanInfoClient; } });
|
|
10
|
-
var HttpEthereumNodeClient_1 = require("./clients/node/HttpEthereumNodeClient");
|
|
11
|
-
Object.defineProperty(exports, "HttpEthereumNodeClient", { enumerable: true, get: function () { return HttpEthereumNodeClient_1.HttpEthereumNodeClient; } });
|
|
12
|
-
Object.defineProperty(exports, "EthereumRPCBody", { enumerable: true, get: function () { return HttpEthereumNodeClient_1.EthereumRPCBody; } });
|
|
13
|
-
Object.defineProperty(exports, "EthereumRPCData", { enumerable: true, get: function () { return HttpEthereumNodeClient_1.EthereumRPCData; } });
|
|
14
10
|
var ERC20Tokens_1 = require("./module/ERC20Tokens");
|
|
15
11
|
Object.defineProperty(exports, "erc20Tokens", { enumerable: true, get: function () { return ERC20Tokens_1.erc20Tokens; } });
|
|
16
12
|
var EthereumModule_1 = require("./module/EthereumModule");
|
|
17
13
|
Object.defineProperty(exports, "EthereumModule", { enumerable: true, get: function () { return EthereumModule_1.EthereumModule; } });
|
|
18
|
-
var ERC20Protocol_1 = require("./protocol/erc20/ERC20Protocol");
|
|
19
|
-
Object.defineProperty(exports, "ERC20ProtocolImpl", { enumerable: true, get: function () { return ERC20Protocol_1.ERC20ProtocolImpl; } });
|
|
20
14
|
var ERC20Token_1 = require("./protocol/erc20/ERC20Token");
|
|
21
15
|
Object.defineProperty(exports, "createERC20Token", { enumerable: true, get: function () { return ERC20Token_1.createERC20Token; } });
|
|
22
16
|
Object.defineProperty(exports, "ERC20TokenImpl", { enumerable: true, get: function () { return ERC20Token_1.ERC20TokenImpl; } });
|
|
@@ -26,15 +20,6 @@ Object.defineProperty(exports, "EthereumBaseProtocolImpl", { enumerable: true, g
|
|
|
26
20
|
var EthereumProtocol_1 = require("./protocol/EthereumProtocol");
|
|
27
21
|
Object.defineProperty(exports, "createEthereumProtocol", { enumerable: true, get: function () { return EthereumProtocol_1.createEthereumProtocol; } });
|
|
28
22
|
Object.defineProperty(exports, "createEthereumProtocolOptions", { enumerable: true, get: function () { return EthereumProtocol_1.createEthereumProtocolOptions; } });
|
|
29
|
-
var transaction_converter_1 = require("./serializer/v3/schemas/converter/transaction-converter");
|
|
30
|
-
Object.defineProperty(exports, "ethereumSignedTransactionToResponse", { enumerable: true, get: function () { return transaction_converter_1.ethereumSignedTransactionToResponse; } });
|
|
31
|
-
Object.defineProperty(exports, "ethereumTransactionSignRequestToUnsigned", { enumerable: true, get: function () { return transaction_converter_1.ethereumTransactionSignRequestToUnsigned; } });
|
|
32
|
-
Object.defineProperty(exports, "ethereumTransactionSignResponseToSigned", { enumerable: true, get: function () { return transaction_converter_1.ethereumTransactionSignResponseToSigned; } });
|
|
33
|
-
Object.defineProperty(exports, "ethereumUnsignedTransactionToRequest", { enumerable: true, get: function () { return transaction_converter_1.ethereumUnsignedTransactionToRequest; } });
|
|
34
|
-
var transaction_validator_1 = require("./serializer/v3/validators/transaction-validator");
|
|
35
|
-
Object.defineProperty(exports, "EthereumTransactionValidator", { enumerable: true, get: function () { return transaction_validator_1.EthereumTransactionValidator; } });
|
|
36
|
-
var EthereumUtils_1 = require("./utils/EthereumUtils");
|
|
37
|
-
Object.defineProperty(exports, "EthereumUtils", { enumerable: true, get: function () { return EthereumUtils_1.EthereumUtils; } });
|
|
38
23
|
var protocol_1 = require("./utils/protocol");
|
|
39
24
|
Object.defineProperty(exports, "isAnyEthereumProtocol", { enumerable: true, get: function () { return protocol_1.isAnyEthereumProtocol; } });
|
|
40
25
|
Object.defineProperty(exports, "isEthereumERC20Protocol", { enumerable: true, get: function () { return protocol_1.isEthereumERC20Protocol; } });
|
package/v1/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/v1/index.ts"],"names":[],"mappings":";;;AAAA,kFAAgF;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/v1/index.ts"],"names":[],"mappings":";;;AAAA,kFAAgF;AAkCvE,uGAlCA,+CAAsB,OAkCA;AAjC/B,wEAAsE;AAyC7D,mGAzCA,uCAAkB,OAyCA;AAxC3B,0EAAwE;AAwC3C,oGAxCpB,yCAAmB,OAwCoB;AAvChD,oDAAkD;AAmDzC,4FAnDA,yBAAW,OAmDA;AAlDpB,0DAAwD;AAa/C,+FAbA,+BAAc,OAaA;AAZvB,0DAA0F;AAwBxF,iGAxBO,6BAAgB,OAwBP;AADhB,+FAvBqC,2BAAc,OAuBrC;AAtBhB,wEAKwC;AA2B/B,gHA/BP,sDAA+B,OA+BO;AAftC,yGAdA,+CAAwB,OAcA;AAX1B,gEAAqH;AAanH,uGAbO,yCAAsB,OAaP;AACtB,8GAd+B,gDAA6B,OAc/B;AAb/B,6CAA2H;AAqClH,sGArCA,gCAAqB,OAqCA;AAAsB,wGArCpB,kCAAuB,OAqCoB;AAAE,qGArCpB,+BAAoB,OAqCoB;AAAjE,mGArC+C,6BAAkB,OAqC/C"}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { AirGapModule, AirGapV3SerializerCompanion, ProtocolConfiguration } from '@airgap/module-kit';
|
|
2
2
|
import { BlockExplorer } from '@airgap/module-kit/block-explorer/block-explorer';
|
|
3
3
|
import { OfflineProtocol, OnlineProtocol } from '@airgap/module-kit/protocol/protocol';
|
|
4
|
-
import {
|
|
4
|
+
import { EvmProtocolNetwork } from '@airgap/evm';
|
|
5
5
|
export declare class EthereumModule implements AirGapModule<{
|
|
6
|
-
ProtocolNetwork:
|
|
6
|
+
ProtocolNetwork: EvmProtocolNetwork;
|
|
7
7
|
}> {
|
|
8
8
|
private readonly networkRegistries;
|
|
9
9
|
readonly supportedProtocols: Record<string, ProtocolConfiguration>;
|
|
10
10
|
constructor();
|
|
11
11
|
createOfflineProtocol(identifier: string): Promise<OfflineProtocol | undefined>;
|
|
12
|
-
createOnlineProtocol(identifier: string, networkOrId?:
|
|
13
|
-
createBlockExplorer(identifier: string, networkOrId?:
|
|
12
|
+
createOnlineProtocol(identifier: string, networkOrId?: EvmProtocolNetwork | string): Promise<OnlineProtocol | undefined>;
|
|
13
|
+
createBlockExplorer(identifier: string, networkOrId?: EvmProtocolNetwork | string): Promise<BlockExplorer | undefined>;
|
|
14
14
|
createV3SerializerCompanion(): Promise<AirGapV3SerializerCompanion>;
|
|
15
15
|
private createProtocol;
|
|
16
16
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EthereumModule.js","sourceRoot":"","sources":["../../../src/v1/module/EthereumModule.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qDAAkE;AAClE,sDAAqE;AACrE,iDAO2B;AAI3B,mFAAiF;AACjF,2DAAwG;AACxG,iEAAwG;AACxG,8EAAqF;AAGrF,6CAAmE;AAEnE;IAIE;;QACE,IAAM,eAAe,GAA0B,IAAI,kCAAqB,CAAC;YACvE,iBAAiB,EAAE,CAAC,oDAAiC,CAAC;SACvD,CAAC,CAAA;QACF,IAAM,oBAAoB,GAA0B,IAAI,kCAAqB,CAAC;YAC5E,iBAAiB,EAAE,CAAC,oDAAuC,CAAC;SAC7D,CAAC,CAAA;QAEF,IAAI,CAAC,iBAAiB,yBACnB,kCAAmB,CAAC,GAAG,IAAG,eAAe,OACvC,oCAAsB,CAAC,MAAM,CAC9B,UAAC,GAA0C,EAAE,IAAY;;YAAK,OAAA,MAAM,CAAC,MAAM,CAAC,GAAG,YAAI,GAAC,IAAI,IAAG,oBAAoB,MAAG;QAApD,CAAoD,EAClH,EAAE,CACH,CACF,CAAA;QACD,IAAI,CAAC,kBAAkB,GAAG,IAAA,qCAAwB,EAAC,IAAI,CAAC,iBAAiB,CAAC,CAAA;IAC5E,CAAC;IAEY,8CAAqB,GAAlC,UAAmC,UAAkB;;;gBACnD,sBAAO,IAAI,CAAC,cAAc,CAAC,UAAU,CAAC,EAAA;;;KACvC;IAEY,6CAAoB,GAAjC,
|
|
1
|
+
{"version":3,"file":"EthereumModule.js","sourceRoot":"","sources":["../../../src/v1/module/EthereumModule.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qDAAkE;AAClE,sDAAqE;AACrE,iDAO2B;AAI3B,mFAAiF;AACjF,2DAAwG;AACxG,iEAAwG;AACxG,8EAAqF;AAG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,CAAC,CAAC,CAAC,MAAA,IAAI,CAAC,iBAAiB,CAAC,UAAU,CAAC,0CAAE,WAAW,CAAC,WAAW,CAAC,CAAA;gBAE9G,IAAI,OAAO,KAAK,SAAS,EAAE;oBACzB,MAAM,IAAI,gCAAuB,CAAC,qBAAM,CAAC,QAAQ,EAAE,4CAA4C,CAAC,CAAA;iBACjG;gBAED,sBAAO,IAAI,+CAAsB,CAAC,OAAO,CAAC,gBAAgB,CAAC,EAAA;;;KAC5D;IAEY,oDAA2B,GAAxC;;;gBACE,sBAAO,IAAI,oDAA6B,EAAE,EAAA;;;KAC3C;IAEO,uCAAc,GAAtB,UAAuB,UAAkB,EAAE,OAAyB;QAClE,IAAI,UAAU,KAAK,kCAAmB,CAAC,GAAG,EAAE;YAC1C,OAAO,IAAA,yCAAsB,EAAC,EAAE,OAAO,SAAA,EAAE,CAAC,CAAA;SAC3C;QAED,IAAI,yBAAW,CAAC,UAAU,CAAC,KAAK,SAAS,EAAE;YACzC,IAAM,aAAa,GAAuB,yBAAW,CAAC,UAAU,CAAC,CAAA;YAEjE,OAAO,IAAA,6BAAgB,EAAC,aAAa,EAAE,EAAE,OAAO,SAAA,EAAE,CAAC,CAAA;SACpD;QAED,MAAM,IAAI,gCAAuB,CAAC,qBAAM,CAAC,QAAQ,EAAE,mBAAY,UAAU,oBAAiB,CAAC,CAAA;IAC7F,CAAC;IACH,qBAAC;AAAD,CAAC,AAjED,IAiEC;AAjEY,wCAAc"}
|
|
@@ -1,87 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
import { EthereumNodeClient } from '../clients/node/EthereumNodeClient';
|
|
6
|
-
import { EthereumCryptoConfiguration } from '../types/crypto';
|
|
7
|
-
import { EthereumBaseProtocolOptions, EthereumProtocolNetwork, EthereumProtocolOptions, EthereumUnits } from '../types/protocol';
|
|
8
|
-
import { EthereumRawUnsignedTransaction, EthereumSignedTransaction, EthereumTransactionCursor, EthereumTypedUnsignedTransaction, EthereumUnsignedTransaction } from '../types/transaction';
|
|
9
|
-
export interface EthereumBaseProtocol<_Units extends string = EthereumUnits, _ProtocolNetwork extends EthereumProtocolNetwork = EthereumProtocolNetwork> extends AirGapProtocol<{
|
|
10
|
-
AddressResult: Address;
|
|
11
|
-
ProtocolNetwork: _ProtocolNetwork;
|
|
12
|
-
CryptoConfiguration: EthereumCryptoConfiguration;
|
|
13
|
-
Units: _Units;
|
|
14
|
-
FeeUnits: EthereumUnits;
|
|
15
|
-
FeeEstimation: FeeDefaults<EthereumUnits>;
|
|
16
|
-
SignedTransaction: EthereumSignedTransaction;
|
|
17
|
-
UnsignedTransaction: EthereumUnsignedTransaction;
|
|
18
|
-
TransactionCursor: EthereumTransactionCursor;
|
|
19
|
-
}, 'Bip32', 'Crypto', 'FetchDataForAddress', 'FetchDataForMultipleAddresses', 'GetTokenBalances', 'TransactionStatusChecker', 'WalletConnect'> {
|
|
20
|
-
}
|
|
1
|
+
import { AirGapTransactionsWithCursor, ProtocolUnitsMetadata } from '@airgap/module-kit';
|
|
2
|
+
import { EthNodeClient, EvmBaseProtocol, EvmBaseProtocolImpl, EvmBaseProtocolOptions, EvmProtocolNetwork, EvmProtocolOptions } from '@airgap/evm';
|
|
3
|
+
import { EthereumInfoClient, EthereumInfoClientTransactionsResult, EthereumTransactionCursor } from '../clients/info/EthereumInfoClient';
|
|
4
|
+
export declare type EthereumUnits = 'ETH' | 'GWEI' | 'WEI';
|
|
21
5
|
export declare const DEFAULT_ETHEREUM_UNITS_METADATA: ProtocolUnitsMetadata<EthereumUnits>;
|
|
22
|
-
export
|
|
23
|
-
protected readonly options: EthereumProtocolOptions<_ProtocolNetwork>;
|
|
24
|
-
protected readonly nodeClient: EthereumNodeClient;
|
|
25
|
-
protected readonly infoClient: EthereumInfoClient;
|
|
26
|
-
protected readonly cryptoClient: EthereumCryptoClient;
|
|
27
|
-
protected readonly bitcoinJS: {
|
|
28
|
-
lib: any;
|
|
29
|
-
config: {
|
|
30
|
-
network: any;
|
|
31
|
-
};
|
|
32
|
-
};
|
|
33
|
-
constructor(nodeClient: EthereumNodeClient, infoClient: EthereumInfoClient, options: EthereumBaseProtocolOptions<_Units, _ProtocolNetwork>);
|
|
34
|
-
readonly units: ProtocolUnitsMetadata<_Units>;
|
|
35
|
-
readonly feeUnits: ProtocolUnitsMetadata<EthereumUnits>;
|
|
36
|
-
protected readonly feeDefaults: FeeDefaults<EthereumUnits>;
|
|
37
|
-
protected readonly metadata: ProtocolMetadata<_Units, EthereumUnits>;
|
|
38
|
-
getMetadata(): Promise<ProtocolMetadata<_Units, EthereumUnits>>;
|
|
39
|
-
getAddressFromPublicKey(publicKey: PublicKey | ExtendedPublicKey): Promise<string>;
|
|
40
|
-
deriveFromExtendedPublicKey(extendedPublicKey: ExtendedPublicKey, visibilityIndex: number, addressIndex: number): Promise<PublicKey>;
|
|
41
|
-
getDetailsFromTransaction(transaction: EthereumSignedTransaction | EthereumUnsignedTransaction, publicKey: PublicKey | ExtendedPublicKey): Promise<AirGapTransaction<_Units, EthereumUnits>[]>;
|
|
42
|
-
private getDetailsFromTransactionWithPublicKey;
|
|
43
|
-
private getDetailsFromTransactionWithExtendedPublicKey;
|
|
44
|
-
protected getDetailsFromSignedTransaction(transaction: EthereumSignedTransaction): Promise<AirGapTransaction<_Units, EthereumUnits>[]>;
|
|
45
|
-
protected getDetailsFromTypedUnsignedTransaction(transaction: EthereumTypedUnsignedTransaction, ownAddress: string): Promise<AirGapTransaction<_Units, EthereumUnits>[]>;
|
|
46
|
-
protected getDetailsFromRawUnsignedTransaction(transaction: EthereumRawUnsignedTransaction, ownAddress: string): Promise<AirGapTransaction<_Units, EthereumUnits>[]>;
|
|
47
|
-
verifyMessageWithPublicKey(message: string, signature: Signature, publicKey: PublicKey | ExtendedPublicKey): Promise<boolean>;
|
|
48
|
-
encryptAsymmetricWithPublicKey(payload: string, publicKey: PublicKey | ExtendedPublicKey): Promise<string>;
|
|
49
|
-
private readonly cryptoConfiguration;
|
|
50
|
-
getCryptoConfiguration(): Promise<EthereumCryptoConfiguration>;
|
|
51
|
-
getKeyPairFromDerivative(derivative: CryptoDerivative): Promise<KeyPair>;
|
|
52
|
-
getExtendedKeyPairFromDerivative(derivative: CryptoDerivative): Promise<ExtendedKeyPair>;
|
|
53
|
-
deriveFromExtendedSecretKey(extendedSecretKey: ExtendedSecretKey, visibilityIndex: number, addressIndex: number): Promise<SecretKey>;
|
|
54
|
-
signTransactionWithSecretKey(transaction: EthereumUnsignedTransaction, secretKey: SecretKey | ExtendedSecretKey): Promise<EthereumSignedTransaction>;
|
|
55
|
-
private signTypedUnsignedTransactionWithSecretKey;
|
|
56
|
-
private signRawUnsignedTransactionWithSecretKey;
|
|
57
|
-
private signTypedTransactionWithSecretKey;
|
|
58
|
-
signMessageWithKeyPair(message: string, keyPair: KeyPair | ExtendedKeyPair): Promise<Signature>;
|
|
59
|
-
decryptAsymmetricWithKeyPair(payload: string, keyPair: KeyPair | ExtendedKeyPair): Promise<string>;
|
|
60
|
-
encryptAESWithSecretKey(payload: string, secretKey: SecretKey | ExtendedSecretKey): Promise<string>;
|
|
61
|
-
decryptAESWithSecretKey(payload: string, secretKey: SecretKey | ExtendedSecretKey): Promise<string>;
|
|
62
|
-
getNetwork(): Promise<_ProtocolNetwork>;
|
|
63
|
-
getTransactionsForPublicKey(publicKey: PublicKey | ExtendedPublicKey, limit: number, cursor?: EthereumTransactionCursor): Promise<AirGapTransactionsWithCursor<EthereumTransactionCursor, _Units, EthereumUnits>>;
|
|
64
|
-
getTransactionsForAddress(address: string, limit: number, cursor?: EthereumTransactionCursor): Promise<AirGapTransactionsWithCursor<EthereumTransactionCursor, _Units, EthereumUnits>>;
|
|
65
|
-
getTransactionsForAddresses(addresses: string[], limit: number, cursor?: EthereumTransactionCursor): Promise<AirGapTransactionsWithCursor<EthereumTransactionCursor, _Units, EthereumUnits>>;
|
|
66
|
-
getTransactionStatus(transactionIds: string[]): Promise<Record<string, AirGapTransactionStatus>>;
|
|
67
|
-
getBalanceOfPublicKey(publicKey: PublicKey | ExtendedPublicKey): Promise<Balance<_Units>>;
|
|
68
|
-
getBalanceOfAddress(address: string): Promise<Balance<_Units>>;
|
|
69
|
-
getBalanceOfAddresses(addresses: string[]): Promise<Balance<_Units>>;
|
|
70
|
-
getTokenBalancesOfPublicKey(publicKey: PublicKey | ExtendedPublicKey, tokens: TokenDetails[]): Promise<Record<string, Amount>>;
|
|
71
|
-
getTransactionMaxAmountWithPublicKey(publicKey: PublicKey | ExtendedPublicKey, to: string[], configuration?: TransactionFullConfiguration<EthereumUnits>): Promise<Amount<_Units>>;
|
|
72
|
-
getTransactionFeeWithPublicKey(publicKey: PublicKey | ExtendedPublicKey, details: TransactionDetails<_Units>[], configuration?: TransactionSimpleConfiguration): Promise<FeeDefaults<EthereumUnits>>;
|
|
73
|
-
prepareTransactionWithPublicKey(publicKey: PublicKey | ExtendedPublicKey, details: TransactionDetails<_Units>[], configuration?: TransactionFullConfiguration<EthereumUnits>): Promise<EthereumUnsignedTransaction>;
|
|
74
|
-
getWalletConnectChain(): Promise<string>;
|
|
75
|
-
prepareWalletConnectTransactionWithPublicKey(publicKey: PublicKey | ExtendedPublicKey, request: WalletConnectRequest): Promise<EthereumUnsignedTransaction>;
|
|
76
|
-
broadcastTransaction(transaction: EthereumSignedTransaction): Promise<string>;
|
|
77
|
-
private nonExtendedPublicKey;
|
|
78
|
-
private nonExtendedSecretKey;
|
|
79
|
-
private getPublicKeyFromExtendedPublicKey;
|
|
80
|
-
private getSecretKeyFromExtendedSecretKey;
|
|
81
|
-
private deriveNode;
|
|
82
|
-
protected estimateGas(fromAddress: string, toAddress: string, amount: string | number | BigNumber | Amount<_Units>, data?: string): Promise<BigNumber>;
|
|
83
|
-
private derivativeToBip32Node;
|
|
6
|
+
export interface EthereumBaseProtocol<_Units extends string = EthereumUnits, _ProtocolNetwork extends EvmProtocolNetwork = EvmProtocolNetwork> extends EvmBaseProtocol<EthereumTransactionCursor, _Units, EthereumUnits, _ProtocolNetwork> {
|
|
84
7
|
}
|
|
85
|
-
export declare
|
|
86
|
-
|
|
8
|
+
export declare class EthereumBaseProtocolImpl<_ProtocolNetwork extends EvmProtocolNetwork = EvmProtocolNetwork> extends EvmBaseProtocolImpl<EthereumTransactionCursor, EthereumInfoClientTransactionsResult, EthereumInfoClient, EthereumUnits, EthereumUnits, _ProtocolNetwork> implements EthereumBaseProtocol<EthereumUnits, _ProtocolNetwork> {
|
|
9
|
+
constructor(nodeClient: EthNodeClient, infoClient: EthereumInfoClient, options: EvmProtocolOptions<_ProtocolNetwork> & Partial<EvmBaseProtocolOptions<EthereumUnits>>);
|
|
10
|
+
getTransactionsForAddresses(addresses: string[], limit: number, cursor?: EthereumTransactionCursor): Promise<AirGapTransactionsWithCursor<EthereumTransactionCursor, EthereumUnits, EthereumUnits>>;
|
|
87
11
|
}
|