@airgap/ethereum 0.13.45-beta.2 → 0.13.45-beta.3

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.
Files changed (82) hide show
  1. package/package.json +5 -5
  2. package/v0/index.js +10 -10
  3. package/v0/index.js.map +1 -1
  4. package/v0/protocol/BaseEthereumProtocol.d.ts +0 -1
  5. package/v0/protocol/BaseEthereumProtocol.js +460 -872
  6. package/v0/protocol/BaseEthereumProtocol.js.map +1 -1
  7. package/v0/protocol/EthereumAddress.d.ts +0 -1
  8. package/v0/protocol/EthereumAddress.js +26 -17
  9. package/v0/protocol/EthereumAddress.js.map +1 -1
  10. package/v0/protocol/EthereumClassicProtocol.js +6 -23
  11. package/v0/protocol/EthereumClassicProtocol.js.map +1 -1
  12. package/v0/protocol/EthereumCryptoClient.js +66 -125
  13. package/v0/protocol/EthereumCryptoClient.js.map +1 -1
  14. package/v0/protocol/EthereumProtocol.js +9 -28
  15. package/v0/protocol/EthereumProtocol.js.map +1 -1
  16. package/v0/protocol/EthereumProtocolOptions.d.ts +1 -1
  17. package/v0/protocol/EthereumProtocolOptions.js +36 -117
  18. package/v0/protocol/EthereumProtocolOptions.js.map +1 -1
  19. package/v0/protocol/EthereumRopstenProtocol.js +6 -23
  20. package/v0/protocol/EthereumRopstenProtocol.js.map +1 -1
  21. package/v0/protocol/clients/info-clients/EtherscanInfoClient.js +86 -186
  22. package/v0/protocol/clients/info-clients/EtherscanInfoClient.js.map +1 -1
  23. package/v0/protocol/clients/info-clients/InfoClient.js +3 -4
  24. package/v0/protocol/clients/info-clients/InfoClient.js.map +1 -1
  25. package/v0/protocol/clients/node-clients/AirGapNodeClient.js +126 -298
  26. package/v0/protocol/clients/node-clients/AirGapNodeClient.js.map +1 -1
  27. package/v0/protocol/clients/node-clients/NodeClient.js +3 -4
  28. package/v0/protocol/clients/node-clients/NodeClient.js.map +1 -1
  29. package/v0/protocol/erc20/ERC20.js +4 -4
  30. package/v0/protocol/erc20/ERC20.js.map +1 -1
  31. package/v0/protocol/erc20/GenericERC20.js +161 -300
  32. package/v0/protocol/erc20/GenericERC20.js.map +1 -1
  33. package/v0/protocol/utils/utils.js +52 -55
  34. package/v0/protocol/utils/utils.js.map +1 -1
  35. package/v0/serializer/validators/transaction-validator.js +23 -31
  36. package/v0/serializer/validators/transaction-validator.js.map +1 -1
  37. package/v0/serializer/validators/validators.js +25 -73
  38. package/v0/serializer/validators/validators.js.map +1 -1
  39. package/v1/block-explorer/EtherscanBlockExplorer.js +12 -61
  40. package/v1/block-explorer/EtherscanBlockExplorer.js.map +1 -1
  41. package/v1/clients/crypto/EthereumCryptoClient.js +69 -124
  42. package/v1/clients/crypto/EthereumCryptoClient.js.map +1 -1
  43. package/v1/clients/info/EthereumInfoClient.d.ts +1 -1
  44. package/v1/clients/info/EthereumInfoClient.js +3 -4
  45. package/v1/clients/info/EthereumInfoClient.js.map +1 -1
  46. package/v1/clients/info/EtherscanInfoClient.js +84 -162
  47. package/v1/clients/info/EtherscanInfoClient.js.map +1 -1
  48. package/v1/clients/node/HttpEthereumNodeClient.d.ts +2 -2
  49. package/v1/clients/node/HttpEthereumNodeClient.js +164 -375
  50. package/v1/clients/node/HttpEthereumNodeClient.js.map +1 -1
  51. package/v1/data/EthereumAddress.js +29 -20
  52. package/v1/data/EthereumAddress.js.map +1 -1
  53. package/v1/index.js +14 -14
  54. package/v1/index.js.map +1 -1
  55. package/v1/module/EthereumModule.js +43 -112
  56. package/v1/module/EthereumModule.js.map +1 -1
  57. package/v1/module.js +2 -3
  58. package/v1/module.js.map +1 -1
  59. package/v1/protocol/EthereumBaseProtocol.js +467 -788
  60. package/v1/protocol/EthereumBaseProtocol.js.map +1 -1
  61. package/v1/protocol/EthereumProtocol.js +15 -46
  62. package/v1/protocol/EthereumProtocol.js.map +1 -1
  63. package/v1/protocol/erc20/ERC20Protocol.js +213 -360
  64. package/v1/protocol/erc20/ERC20Protocol.js.map +1 -1
  65. package/v1/protocol/erc20/ERC20Token.d.ts +1 -1
  66. package/v1/protocol/erc20/ERC20Token.js +35 -113
  67. package/v1/protocol/erc20/ERC20Token.js.map +1 -1
  68. package/v1/serializer/v3/schemas/converter/transaction-converter.js +25 -42
  69. package/v1/serializer/v3/schemas/converter/transaction-converter.js.map +1 -1
  70. package/v1/serializer/v3/serializer-companion.js +71 -148
  71. package/v1/serializer/v3/serializer-companion.js.map +1 -1
  72. package/v1/serializer/v3/validators/transaction-validator.js +14 -17
  73. package/v1/serializer/v3/validators/transaction-validator.js.map +1 -1
  74. package/v1/types/crypto.d.ts +1 -1
  75. package/v1/types/protocol.d.ts +1 -1
  76. package/v1/types/transaction.d.ts +1 -1
  77. package/v1/utils/EthereumUtils.js +57 -60
  78. package/v1/utils/EthereumUtils.js.map +1 -1
  79. package/v1/utils/key.js +28 -19
  80. package/v1/utils/key.js.map +1 -1
  81. package/v1/utils/protocol.js +33 -21
  82. package/v1/utils/protocol.js.map +1 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@airgap/ethereum",
3
- "version": "0.13.45-beta.2",
3
+ "version": "0.13.45-beta.3",
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,10 +30,10 @@
30
30
  },
31
31
  "author": "Papers AG <contact@papers.ch> (https://papers.ch)",
32
32
  "dependencies": {
33
- "@airgap/coinlib-core": "^0.13.45-beta.2",
34
- "@airgap/crypto": "^0.13.45-beta.2",
35
- "@airgap/module-kit": "^0.13.45-beta.2",
36
- "@airgap/serializer": "^0.13.45-beta.2",
33
+ "@airgap/coinlib-core": "^0.13.45-beta.3",
34
+ "@airgap/crypto": "^0.13.45-beta.3",
35
+ "@airgap/module-kit": "^0.13.45-beta.3",
36
+ "@airgap/serializer": "^0.13.45-beta.3",
37
37
  "@ethereumjs/common": "2.6.5",
38
38
  "@ethereumjs/tx": "3.4.0",
39
39
  "@metamask/eth-sig-util": "4.0.0"
package/v0/index.js CHANGED
@@ -1,19 +1,19 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.EthereumAddress = exports.EthereumERC20ProtocolOptions = exports.EthereumERC20ProtocolConfig = exports.EthereumProtocolOptions = exports.EthereumProtocolConfig = exports.EthereumProtocolNetwork = exports.EtherscanBlockExplorer = exports.EthereumProtocolNetworkExtras = exports.EthereumCryptoClient = exports.GenericERC20 = exports.EthereumClassicProtocol = exports.EthereumRopstenProtocol = exports.EthereumProtocol = void 0;
4
- var coinlib_core_1 = require("@airgap/coinlib-core");
5
- var serializer_1 = require("@airgap/serializer");
6
- var GenericERC20_1 = require("./protocol/erc20/GenericERC20");
4
+ const coinlib_core_1 = require("@airgap/coinlib-core");
5
+ const serializer_1 = require("@airgap/serializer");
6
+ const GenericERC20_1 = require("./protocol/erc20/GenericERC20");
7
7
  Object.defineProperty(exports, "GenericERC20", { enumerable: true, get: function () { return GenericERC20_1.GenericERC20; } });
8
- var EthereumAddress_1 = require("./protocol/EthereumAddress");
8
+ const EthereumAddress_1 = require("./protocol/EthereumAddress");
9
9
  Object.defineProperty(exports, "EthereumAddress", { enumerable: true, get: function () { return EthereumAddress_1.EthereumAddress; } });
10
- var EthereumClassicProtocol_1 = require("./protocol/EthereumClassicProtocol");
10
+ const EthereumClassicProtocol_1 = require("./protocol/EthereumClassicProtocol");
11
11
  Object.defineProperty(exports, "EthereumClassicProtocol", { enumerable: true, get: function () { return EthereumClassicProtocol_1.EthereumClassicProtocol; } });
12
- var EthereumCryptoClient_1 = require("./protocol/EthereumCryptoClient");
12
+ const EthereumCryptoClient_1 = require("./protocol/EthereumCryptoClient");
13
13
  Object.defineProperty(exports, "EthereumCryptoClient", { enumerable: true, get: function () { return EthereumCryptoClient_1.EthereumCryptoClient; } });
14
- var EthereumProtocol_1 = require("./protocol/EthereumProtocol");
14
+ const EthereumProtocol_1 = require("./protocol/EthereumProtocol");
15
15
  Object.defineProperty(exports, "EthereumProtocol", { enumerable: true, get: function () { return EthereumProtocol_1.EthereumProtocol; } });
16
- var EthereumProtocolOptions_1 = require("./protocol/EthereumProtocolOptions");
16
+ const EthereumProtocolOptions_1 = require("./protocol/EthereumProtocolOptions");
17
17
  Object.defineProperty(exports, "EthereumERC20ProtocolConfig", { enumerable: true, get: function () { return EthereumProtocolOptions_1.EthereumERC20ProtocolConfig; } });
18
18
  Object.defineProperty(exports, "EthereumERC20ProtocolOptions", { enumerable: true, get: function () { return EthereumProtocolOptions_1.EthereumERC20ProtocolOptions; } });
19
19
  Object.defineProperty(exports, "EthereumProtocolConfig", { enumerable: true, get: function () { return EthereumProtocolOptions_1.EthereumProtocolConfig; } });
@@ -21,9 +21,9 @@ Object.defineProperty(exports, "EthereumProtocolNetwork", { enumerable: true, ge
21
21
  Object.defineProperty(exports, "EthereumProtocolNetworkExtras", { enumerable: true, get: function () { return EthereumProtocolOptions_1.EthereumProtocolNetworkExtras; } });
22
22
  Object.defineProperty(exports, "EthereumProtocolOptions", { enumerable: true, get: function () { return EthereumProtocolOptions_1.EthereumProtocolOptions; } });
23
23
  Object.defineProperty(exports, "EtherscanBlockExplorer", { enumerable: true, get: function () { return EthereumProtocolOptions_1.EtherscanBlockExplorer; } });
24
- var EthereumRopstenProtocol_1 = require("./protocol/EthereumRopstenProtocol");
24
+ const EthereumRopstenProtocol_1 = require("./protocol/EthereumRopstenProtocol");
25
25
  Object.defineProperty(exports, "EthereumRopstenProtocol", { enumerable: true, get: function () { return EthereumRopstenProtocol_1.EthereumRopstenProtocol; } });
26
- var transaction_validator_1 = require("./serializer/validators/transaction-validator");
26
+ const transaction_validator_1 = require("./serializer/validators/transaction-validator");
27
27
  // Serializer
28
28
  serializer_1.Serializer.addSchema(serializer_1.IACMessageType.TransactionSignRequest, { schema: require('./serializer/schemas/v2/transaction-sign-request-ethereum.json') }, coinlib_core_1.MainProtocolSymbols.ETH);
29
29
  serializer_1.Serializer.addSchema(serializer_1.IACMessageType.TransactionSignResponse, { schema: require('./serializer/schemas/v2/transaction-sign-response-ethereum.json') }, coinlib_core_1.MainProtocolSymbols.ETH);
package/v0/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/v0/index.ts"],"names":[],"mappings":";;;AAAA,qDAA8E;AAC9E,iDAA6E;AAE7E,8DAA4D;AAyB1D,6FAzBO,2BAAY,OAyBP;AAxBd,8DAA4D;AAiC1D,gGAjCO,iCAAe,OAiCP;AAhCjB,8EAA4E;AAsB1E,wGAtBO,iDAAuB,OAsBP;AArBzB,wEAAsE;AAuBpE,qGAvBO,2CAAoB,OAuBP;AAtBtB,gEAA8D;AAkB5D,iGAlBO,mCAAgB,OAkBP;AAjBlB,8EAQ2C;AAmBzC,4GA1BA,qDAA2B,OA0BA;AAC3B,6GA1BA,sDAA4B,OA0BA;AAH5B,uGAtBA,gDAAsB,OAsBA;AADtB,wGApBA,iDAAuB,OAoBA;AAFvB,8GAjBA,uDAA6B,OAiBA;AAI7B,wGApBA,iDAAuB,OAoBA;AAHvB,uGAhBA,gDAAsB,OAgBA;AAdxB,8EAA4E;AAS1E,wGATO,iDAAuB,OASP;AARzB,uFAA0I;AA0B1I,aAAa;AAEb,uBAAU,CAAC,SAAS,CAClB,2BAAc,CAAC,sBAAsB,EACrC,EAAE,MAAM,EAAE,OAAO,CAAC,gEAAgE,CAAC,EAAE,EACrF,kCAAmB,CAAC,GAAG,CACxB,CAAA;AACD,uBAAU,CAAC,SAAS,CAClB,2BAAc,CAAC,uBAAuB,EACtC,EAAE,MAAM,EAAE,OAAO,CAAC,iEAAiE,CAAC,EAAE,EACtF,kCAAmB,CAAC,GAAG,CACxB,CAAA;AAED,yBAAY,CAAC,SAAS,CACpB,2BAAc,CAAC,sBAAsB,EACrC,EAAE,MAAM,EAAE,OAAO,CAAC,gEAAgE,CAAC,EAAE,EACrF,kCAAmB,CAAC,GAAG,CACxB,CAAA;AACD,yBAAY,CAAC,SAAS,CACp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C,sBAAsB,EACrC,EAAE,MAAM,EAAE,OAAO,CAAC,gEAAgE,CAAC,EAAE,EACrF,iCAAkB,CAAC,SAAS,CAC7B,CAAA;AACD,uBAAU,CAAC,SAAS,CAClB,2BAAc,CAAC,uBAAuB,EACtC,EAAE,MAAM,EAAE,OAAO,CAAC,iEAAiE,CAAC,EAAE,EACtF,iCAAkB,CAAC,SAAS,CAC7B,CAAA;AAED,yBAAY,CAAC,SAAS,CACpB,2BAAc,CAAC,sBAAsB,EACrC,EAAE,MAAM,EAAE,OAAO,CAAC,gEAAgE,CAAC,EAAE,EACrF,iCAAkB,CAAC,SAAS,CAC7B,CAAA;AACD,yBAAY,CAAC,SAAS,CACpB,2BAAc,CAAC,uBAAuB,EACtC,EAAE,MAAM,EAAE,OAAO,CAAC,iEAAiE,CAAC,EAAE,EACtF,iCAAkB,CAAC,SAAS,CAC7B,CAAA;AAED,uBAAU,CAAC,YAAY,CAAC,kCAAmB,CAAC,GAAG,EAAE,IAAI,6DAAqC,EAAE,CAAC,CAAA;AAC7F,yBAAY,CAAC,YAAY,CAAC,kCAAmB,CAAC,GAAG,EAAE,IAAI,2DAAmC,EAAE,CAAC,CAAA"}
@@ -1,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  import { UnsignedTransaction } from '@airgap/coinlib-core';
3
2
  import { IAirGapSignedTransaction } from '@airgap/coinlib-core/interfaces/IAirGapSignedTransaction';
4
3
  import { AirGapTransactionStatus, IAirGapTransaction } from '@airgap/coinlib-core/interfaces/IAirGapTransaction';