@airgap/tezos 0.13.8-beta.0 → 0.13.8-beta.4

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 (53) hide show
  1. package/airgap-coinlib-tezos.min.js +13 -2
  2. package/package.json +2 -2
  3. package/v0/protocol/TezosAddress.js +1 -0
  4. package/v0/protocol/TezosAddress.js.map +1 -1
  5. package/v0/protocol/TezosCryptoClient.js +2 -0
  6. package/v0/protocol/TezosCryptoClient.js.map +1 -1
  7. package/v0/protocol/TezosProtocol.js +2 -0
  8. package/v0/protocol/TezosProtocol.js.map +1 -1
  9. package/v0/protocol/TezosUtils.js +1 -0
  10. package/v0/protocol/TezosUtils.js.map +1 -1
  11. package/v0/protocol/domains/TezosDomains.js +1 -0
  12. package/v0/protocol/domains/TezosDomains.js.map +1 -1
  13. package/v0/protocol/kt/TezosKtProtocol.js +1 -1
  14. package/v0/protocol/kt/TezosKtProtocol.js.map +1 -1
  15. package/v0/protocol/sapling/TezosSaplingAddress.js +1 -0
  16. package/v0/protocol/sapling/TezosSaplingAddress.js.map +1 -1
  17. package/v0/protocol/sapling/TezosSaplingProtocol.js +1 -0
  18. package/v0/protocol/sapling/TezosSaplingProtocol.js.map +1 -1
  19. package/v0/protocol/sapling/TezosShieldedTezProtocol.js +3 -1
  20. package/v0/protocol/sapling/TezosShieldedTezProtocol.js.map +1 -1
  21. package/v0/protocol/types/michelson/MichelsonTypeMeta.js.map +1 -1
  22. package/v0/serializer/validators/transaction-validator.js.map +1 -1
  23. package/v0/serializer/validators/transaction-xtz-btc-validator.js.map +1 -1
  24. package/v1/crypto/TezosCryptoClient.js +1 -0
  25. package/v1/crypto/TezosCryptoClient.js.map +1 -1
  26. package/v1/index.d.ts +1 -2
  27. package/v1/index.js +1 -3
  28. package/v1/index.js.map +1 -1
  29. package/v1/module/TezosModule.d.ts +8 -6
  30. package/v1/module/TezosModule.js +118 -10
  31. package/v1/module/TezosModule.js.map +1 -1
  32. package/v1/protocol/TezosProtocol.js +1 -0
  33. package/v1/protocol/TezosProtocol.js.map +1 -1
  34. package/v1/protocol/fa/TezosFAProtocol.d.ts +3 -2
  35. package/v1/protocol/fa/TezosFAProtocol.js +18 -10
  36. package/v1/protocol/fa/TezosFAProtocol.js.map +1 -1
  37. package/v1/protocol/kt/TezosKtProtocol.js +8 -1
  38. package/v1/protocol/kt/TezosKtProtocol.js.map +1 -1
  39. package/v1/protocol/sapling/TezosShieldedTezProtocol.d.ts +0 -2
  40. package/v1/protocol/sapling/TezosShieldedTezProtocol.js +6 -6
  41. package/v1/protocol/sapling/TezosShieldedTezProtocol.js.map +1 -1
  42. package/v1/serializer/v3/validators/transaction-validator.js.map +1 -1
  43. package/v1/types/michelson/MichelsonTypeMeta.js.map +1 -1
  44. package/v1/utils/bip.js +1 -0
  45. package/v1/utils/bip.js.map +1 -1
  46. package/v1/utils/encoding.js +1 -0
  47. package/v1/utils/encoding.js.map +1 -1
  48. package/v1/module/TezosKtModule.d.ts +0 -8
  49. package/v1/module/TezosKtModule.js +0 -87
  50. package/v1/module/TezosKtModule.js.map +0 -1
  51. package/v1/module/TezosShieldedTezModule.d.ts +0 -8
  52. package/v1/module/TezosShieldedTezModule.js +0 -86
  53. package/v1/module/TezosShieldedTezModule.js.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"file":"TezosKtModule.js","sourceRoot":"","sources":["../../../src/v1/module/TezosKtModule.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qDAA6C;AAC7C,sDAAqE;AACrE,iDAO2B;AAE3B,qDAAoE;AACpE,kEAAsE;AACtE,2DAA0E;AAG1E;IAAA;QACmB,oBAAe,GAAgD,IAAI,kCAAqB,CAAC;YACxG,iBAAiB,EAAE,CAAC,8CAA8B,CAAC;SACpD,CAAC,CAAA;QAEc,sBAAiB,GAAoC,IAAI,CAAC,eAAe,CAAC,iBAAiB,CAAA;IAuB7G,CAAC;IArBc,6CAAqB,GAAlC;;;gBACE,sBAAO,IAAA,uCAAqB,GAAE,EAAA;;;KAC/B;IAEY,4CAAoB,GAAjC,UAAkC,SAAkB;;;;gBAC5C,OAAO,GAAqC,IAAI,CAAC,eAAe,CAAC,WAAW,CAAC,SAAS,CAAC,CAAA;gBAC7F,IAAI,OAAO,KAAK,SAAS,EAAE;oBACzB,MAAM,IAAI,gCAAuB,CAAC,qBAAM,CAAC,KAAK,EAAE,sCAAsC,CAAC,CAAA;iBACxF;gBAED,sBAAO,IAAA,uCAAqB,EAAC,EAAE,OAAO,SAAA,EAAE,CAAC,EAAA;;;KAC1C;IAEY,2CAAmB,GAAhC,UAAiC,SAAkB;;;;gBAC3C,OAAO,GAAqC,IAAI,CAAC,eAAe,CAAC,WAAW,CAAC,SAAS,CAAC,CAAA;gBAC7F,IAAI,OAAO,KAAK,SAAS,EAAE;oBACzB,MAAM,IAAI,gCAAuB,CAAC,qBAAM,CAAC,KAAK,EAAE,4CAA4C,CAAC,CAAA;iBAC9F;gBAED,sBAAO,IAAA,kCAAwB,EAAC,OAAO,CAAC,aAAa,CAAC,EAAA;;;KACvD;IACH,oBAAC;AAAD,CAAC,AA5BD,IA4BC;AA5BY,sCAAa"}
@@ -1,8 +0,0 @@
1
- import { AirGapBlockExplorer, AirGapModule, AirGapOfflineProtocol, AirGapOnlineProtocol, ProtocolNetwork } from '@airgap/module-kit';
2
- export declare class TezosShieldedModule implements AirGapModule {
3
- private readonly networkRegistry;
4
- readonly supportedNetworks: Record<string, ProtocolNetwork>;
5
- createOfflineProtocol(): Promise<AirGapOfflineProtocol | undefined>;
6
- createOnlineProtocol(networkId?: string): Promise<AirGapOnlineProtocol | undefined>;
7
- createBlockExplorer(networkId?: string): Promise<AirGapBlockExplorer | undefined>;
8
- }
@@ -1,86 +0,0 @@
1
- "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
- var __generator = (this && this.__generator) || function (thisArg, body) {
12
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
13
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
14
- function verb(n) { return function (v) { return step([n, v]); }; }
15
- function step(op) {
16
- if (f) throw new TypeError("Generator is already executing.");
17
- while (_) try {
18
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
19
- if (y = 0, t) op = [op[0] & 2, t.value];
20
- switch (op[0]) {
21
- case 0: case 1: t = op; break;
22
- case 4: _.label++; return { value: op[1], done: false };
23
- case 5: _.label++; y = op[1]; op = [0]; continue;
24
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
25
- default:
26
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
27
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
28
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
29
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
30
- if (t[2]) _.ops.pop();
31
- _.trys.pop(); continue;
32
- }
33
- op = body.call(thisArg, _);
34
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
35
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
36
- }
37
- };
38
- Object.defineProperty(exports, "__esModule", { value: true });
39
- exports.TezosShieldedModule = void 0;
40
- var coinlib_core_1 = require("@airgap/coinlib-core");
41
- var errors_1 = require("@airgap/coinlib-core/errors");
42
- var module_kit_1 = require("@airgap/module-kit");
43
- var factory_1 = require("../block-explorer/factory");
44
- var TezosShieldedTezProtocol_1 = require("../protocol/sapling/TezosShieldedTezProtocol");
45
- var TezosShieldedModule = /** @class */ (function () {
46
- function TezosShieldedModule() {
47
- this.networkRegistry = new module_kit_1.ModuleNetworkRegistry({
48
- supportedNetworks: [TezosShieldedTezProtocol_1.SHIELDED_TEZ_MAINNET_PROTOCOL_NETWORK, TezosShieldedTezProtocol_1.SHIELDED_TEZ_GHOSTNET_PROTOCOL_NETWORK]
49
- });
50
- this.supportedNetworks = this.networkRegistry.supportedNetworks;
51
- }
52
- TezosShieldedModule.prototype.createOfflineProtocol = function () {
53
- return __awaiter(this, void 0, void 0, function () {
54
- return __generator(this, function (_a) {
55
- return [2 /*return*/, (0, TezosShieldedTezProtocol_1.createTezosShieldedTezProtocol)()];
56
- });
57
- });
58
- };
59
- TezosShieldedModule.prototype.createOnlineProtocol = function (networkId) {
60
- return __awaiter(this, void 0, void 0, function () {
61
- var network;
62
- return __generator(this, function (_a) {
63
- network = this.networkRegistry.findNetwork(networkId);
64
- if (network === undefined) {
65
- throw new errors_1.ConditionViolationError(coinlib_core_1.Domain.TEZOS, 'Protocol network type not supported.');
66
- }
67
- return [2 /*return*/, (0, TezosShieldedTezProtocol_1.createTezosShieldedTezProtocol)({ network: network })];
68
- });
69
- });
70
- };
71
- TezosShieldedModule.prototype.createBlockExplorer = function (networkId) {
72
- return __awaiter(this, void 0, void 0, function () {
73
- var network;
74
- return __generator(this, function (_a) {
75
- network = this.networkRegistry.findNetwork(networkId);
76
- if (network === undefined) {
77
- throw new errors_1.ConditionViolationError(coinlib_core_1.Domain.TEZOS, 'Block Explorer network type not supported.');
78
- }
79
- return [2 /*return*/, (0, factory_1.createTezosBlockExplorer)(network.blockExplorer)];
80
- });
81
- });
82
- };
83
- return TezosShieldedModule;
84
- }());
85
- exports.TezosShieldedModule = TezosShieldedModule;
86
- //# sourceMappingURL=TezosShieldedTezModule.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TezosShieldedTezModule.js","sourceRoot":"","sources":["../../../src/v1/module/TezosShieldedTezModule.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qDAA6C;AAC7C,sDAAqE;AACrE,iDAO2B;AAE3B,qDAAoE;AACpE,yFAIqD;AAGrD;IAAA;QACmB,oBAAe,GAAuD,IAAI,kCAAqB,CAAC;YAC/G,iBAAiB,EAAE,CAAC,gEAAqC,EAAE,iEAAsC,CAAC;SACnG,CAAC,CAAA;QAEc,sBAAiB,GAAoC,IAAI,CAAC,eAAe,CAAC,iBAAiB,CAAA;IAuB7G,CAAC;IArBc,mDAAqB,GAAlC;;;gBACE,sBAAO,IAAA,yDAA8B,GAAE,EAAA;;;KACxC;IAEY,kDAAoB,GAAjC,UAAkC,SAAkB;;;;gBAC5C,OAAO,GAA4C,IAAI,CAAC,eAAe,CAAC,WAAW,CAAC,SAAS,CAAC,CAAA;gBACpG,IAAI,OAAO,KAAK,SAAS,EAAE;oBACzB,MAAM,IAAI,gCAAuB,CAAC,qBAAM,CAAC,KAAK,EAAE,sCAAsC,CAAC,CAAA;iBACxF;gBAED,sBAAO,IAAA,yDAA8B,EAAC,EAAE,OAAO,SAAA,EAAE,CAAC,EAAA;;;KACnD;IAEY,iDAAmB,GAAhC,UAAiC,SAAkB;;;;gBAC3C,OAAO,GAA4C,IAAI,CAAC,eAAe,CAAC,WAAW,CAAC,SAAS,CAAC,CAAA;gBACpG,IAAI,OAAO,KAAK,SAAS,EAAE;oBACzB,MAAM,IAAI,gCAAuB,CAAC,qBAAM,CAAC,KAAK,EAAE,4CAA4C,CAAC,CAAA;iBAC9F;gBAED,sBAAO,IAAA,kCAAwB,EAAC,OAAO,CAAC,aAAa,CAAC,EAAA;;;KACvD;IACH,0BAAC;AAAD,CAAC,AA5BD,IA4BC;AA5BY,kDAAmB"}