@airgap/icp 0.13.11-beta.0 → 0.13.11-beta.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.
Files changed (118) hide show
  1. package/package.json +17 -15
  2. package/airgap-coinlib-icp.min.js +0 -91775
  3. package/index.d.ts +0 -1
  4. package/index.js +0 -18
  5. package/index.js.map +0 -1
  6. package/v1/block-explorer/ICPBlockExplorer.d.ts +0 -9
  7. package/v1/block-explorer/ICPBlockExplorer.js +0 -74
  8. package/v1/block-explorer/ICPBlockExplorer.js.map +0 -1
  9. package/v1/index.d.ts +0 -12
  10. package/v1/index.js +0 -11
  11. package/v1/index.js.map +0 -1
  12. package/v1/module/ICPModule.d.ts +0 -15
  13. package/v1/module/ICPModule.js +0 -107
  14. package/v1/module/ICPModule.js.map +0 -1
  15. package/v1/module.d.ts +0 -3
  16. package/v1/module.js +0 -24
  17. package/v1/module.js.map +0 -1
  18. package/v1/protocol/ICPImplementation.d.ts +0 -26
  19. package/v1/protocol/ICPImplementation.js +0 -342
  20. package/v1/protocol/ICPImplementation.js.map +0 -1
  21. package/v1/protocol/ICPProtocol.d.ts +0 -38
  22. package/v1/protocol/ICPProtocol.js +0 -414
  23. package/v1/protocol/ICPProtocol.js.map +0 -1
  24. package/v1/serializer/v3/schemas/converter/transaction-converter.d.ts +0 -7
  25. package/v1/serializer/v3/schemas/converter/transaction-converter.js +0 -21
  26. package/v1/serializer/v3/schemas/converter/transaction-converter.js.map +0 -1
  27. package/v1/serializer/v3/schemas/definitions/transaction-sign-request-icp.d.ts +0 -4
  28. package/v1/serializer/v3/schemas/definitions/transaction-sign-request-icp.js +0 -3
  29. package/v1/serializer/v3/schemas/definitions/transaction-sign-request-icp.js.map +0 -1
  30. package/v1/serializer/v3/schemas/definitions/transaction-sign-response-icp.d.ts +0 -3
  31. package/v1/serializer/v3/schemas/definitions/transaction-sign-response-icp.js +0 -3
  32. package/v1/serializer/v3/schemas/definitions/transaction-sign-response-icp.js.map +0 -1
  33. package/v1/serializer/v3/schemas/generated/transaction-sign-request-icp.json +0 -32
  34. package/v1/serializer/v3/schemas/generated/transaction-sign-response-icp.json +0 -19
  35. package/v1/serializer/v3/serializer-companion.d.ts +0 -14
  36. package/v1/serializer/v3/serializer-companion.js +0 -174
  37. package/v1/serializer/v3/serializer-companion.js.map +0 -1
  38. package/v1/serializer/v3/validators/transaction-validator.d.ts +0 -10
  39. package/v1/serializer/v3/validators/transaction-validator.js +0 -100
  40. package/v1/serializer/v3/validators/transaction-validator.js.map +0 -1
  41. package/v1/serializer/v3/validators/validators.d.ts +0 -5
  42. package/v1/serializer/v3/validators/validators.js +0 -106
  43. package/v1/serializer/v3/validators/validators.js.map +0 -1
  44. package/v1/types/governance.d.ts +0 -580
  45. package/v1/types/governance.js +0 -796
  46. package/v1/types/governance.js.map +0 -1
  47. package/v1/types/ledger.d.ts +0 -143
  48. package/v1/types/ledger.js +0 -146
  49. package/v1/types/ledger.js.map +0 -1
  50. package/v1/types/management_idl.d.ts +0 -7
  51. package/v1/types/management_idl.js +0 -72
  52. package/v1/types/management_idl.js.map +0 -1
  53. package/v1/types/protocol.d.ts +0 -8
  54. package/v1/types/protocol.js +0 -3
  55. package/v1/types/protocol.js.map +0 -1
  56. package/v1/types/transaction.d.ts +0 -11
  57. package/v1/types/transaction.js +0 -3
  58. package/v1/types/transaction.js.map +0 -1
  59. package/v1/utils/account.d.ts +0 -24
  60. package/v1/utils/account.js +0 -112
  61. package/v1/utils/account.js.map +0 -1
  62. package/v1/utils/actor.d.ts +0 -246
  63. package/v1/utils/actor.js +0 -458
  64. package/v1/utils/actor.js.map +0 -1
  65. package/v1/utils/agent.d.ts +0 -156
  66. package/v1/utils/agent.js +0 -16
  67. package/v1/utils/agent.js.map +0 -1
  68. package/v1/utils/auth.d.ts +0 -110
  69. package/v1/utils/auth.js +0 -261
  70. package/v1/utils/auth.js.map +0 -1
  71. package/v1/utils/bls.d.ts +0 -38
  72. package/v1/utils/bls.js +0 -204
  73. package/v1/utils/bls.js.map +0 -1
  74. package/v1/utils/buffer.d.ts +0 -70
  75. package/v1/utils/buffer.js +0 -216
  76. package/v1/utils/buffer.js.map +0 -1
  77. package/v1/utils/cbor.d.ts +0 -9
  78. package/v1/utils/cbor.js +0 -178
  79. package/v1/utils/cbor.js.map +0 -1
  80. package/v1/utils/certificate.d.ts +0 -74
  81. package/v1/utils/certificate.js +0 -396
  82. package/v1/utils/certificate.js.map +0 -1
  83. package/v1/utils/convert.d.ts +0 -8
  84. package/v1/utils/convert.js +0 -80
  85. package/v1/utils/convert.js.map +0 -1
  86. package/v1/utils/crypto.d.ts +0 -0
  87. package/v1/utils/crypto.js +0 -104
  88. package/v1/utils/crypto.js.map +0 -1
  89. package/v1/utils/der.d.ts +0 -35
  90. package/v1/utils/der.js +0 -176
  91. package/v1/utils/der.js.map +0 -1
  92. package/v1/utils/errors.d.ts +0 -7
  93. package/v1/utils/errors.js +0 -38
  94. package/v1/utils/errors.js.map +0 -1
  95. package/v1/utils/hdkey.d.ts +0 -13
  96. package/v1/utils/hdkey.js +0 -242
  97. package/v1/utils/hdkey.js.map +0 -1
  98. package/v1/utils/http.d.ts +0 -284
  99. package/v1/utils/http.js +0 -614
  100. package/v1/utils/http.js.map +0 -1
  101. package/v1/utils/idl.d.ts +0 -515
  102. package/v1/utils/idl.js +0 -2103
  103. package/v1/utils/idl.js.map +0 -1
  104. package/v1/utils/leb128.d.ts +0 -63
  105. package/v1/utils/leb128.js +0 -224
  106. package/v1/utils/leb128.js.map +0 -1
  107. package/v1/utils/polling.d.ts +0 -59
  108. package/v1/utils/polling.js +0 -325
  109. package/v1/utils/polling.js.map +0 -1
  110. package/v1/utils/principal.d.ts +0 -58
  111. package/v1/utils/principal.js +0 -543
  112. package/v1/utils/principal.js.map +0 -1
  113. package/v1/utils/secp256k1.d.ts +0 -79
  114. package/v1/utils/secp256k1.js +0 -254
  115. package/v1/utils/secp256k1.js.map +0 -1
  116. package/v1/utils/transaction.d.ts +0 -3
  117. package/v1/utils/transaction.js +0 -56
  118. package/v1/utils/transaction.js.map +0 -1
package/index.d.ts DELETED
@@ -1 +0,0 @@
1
- export * from './v1';
package/index.js DELETED
@@ -1,18 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./v1"), exports);
18
- //# sourceMappingURL=index.js.map
package/index.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,uCAAoB"}
@@ -1,9 +0,0 @@
1
- import { AirGapBlockExplorer, BlockExplorerMetadata } from '@airgap/module-kit';
2
- export declare class ICPBlockExplorer implements AirGapBlockExplorer {
3
- readonly url: string;
4
- constructor(url?: string);
5
- private readonly metadata;
6
- getMetadata(): Promise<BlockExplorerMetadata>;
7
- createAddressUrl(address: string): Promise<string>;
8
- createTransactionUrl(transactionId: string): Promise<string>;
9
- }
@@ -1,74 +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.ICPBlockExplorer = void 0;
40
- var BLOCK_EXPLORER_URL = 'https://dashboard.internetcomputer.org/';
41
- var ICPBlockExplorer = /** @class */ (function () {
42
- function ICPBlockExplorer(url) {
43
- if (url === void 0) { url = BLOCK_EXPLORER_URL; }
44
- this.url = url;
45
- this.metadata = {
46
- name: 'ICP Explorer',
47
- url: this.url
48
- };
49
- }
50
- ICPBlockExplorer.prototype.getMetadata = function () {
51
- return __awaiter(this, void 0, void 0, function () {
52
- return __generator(this, function (_a) {
53
- return [2 /*return*/, this.metadata];
54
- });
55
- });
56
- };
57
- ICPBlockExplorer.prototype.createAddressUrl = function (address) {
58
- return __awaiter(this, void 0, void 0, function () {
59
- return __generator(this, function (_a) {
60
- return [2 /*return*/, "".concat(this.url, "/account/").concat(address)];
61
- });
62
- });
63
- };
64
- ICPBlockExplorer.prototype.createTransactionUrl = function (transactionId) {
65
- return __awaiter(this, void 0, void 0, function () {
66
- return __generator(this, function (_a) {
67
- return [2 /*return*/, "".concat(this.url, "/transaction/").concat(transactionId)];
68
- });
69
- });
70
- };
71
- return ICPBlockExplorer;
72
- }());
73
- exports.ICPBlockExplorer = ICPBlockExplorer;
74
- //# sourceMappingURL=ICPBlockExplorer.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ICPBlockExplorer.js","sourceRoot":"","sources":["../../../src/v1/block-explorer/ICPBlockExplorer.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,IAAM,kBAAkB,GAAW,yCAAyC,CAAA;AAE5E;IACE,0BAAmC,GAAgC;QAAhC,oBAAA,EAAA,wBAAgC;QAAhC,QAAG,GAAH,GAAG,CAA6B;QAElD,aAAQ,GAA0B;YACjD,IAAI,EAAE,cAAc;YACpB,GAAG,EAAE,IAAI,CAAC,GAAG;SACd,CAAA;IALqE,CAAC;IAO1D,sCAAW,GAAxB;;;gBACE,sBAAO,IAAI,CAAC,QAAQ,EAAA;;;KACrB;IAEY,2CAAgB,GAA7B,UAA8B,OAAe;;;gBAC3C,sBAAO,UAAG,IAAI,CAAC,GAAG,sBAAY,OAAO,CAAE,EAAA;;;KACxC;IACY,+CAAoB,GAAjC,UAAkC,aAAqB;;;gBACrD,sBAAO,UAAG,IAAI,CAAC,GAAG,0BAAgB,aAAa,CAAE,EAAA;;;KAClD;IACH,uBAAC;AAAD,CAAC,AAlBD,IAkBC;AAlBY,4CAAgB"}
package/v1/index.d.ts DELETED
@@ -1,12 +0,0 @@
1
- import { ICPBlockExplorer } from './block-explorer/ICPBlockExplorer';
2
- import { ICPModule } from './module/ICPModule';
3
- import { ICPProtocol, createICPProtocol, createICPProtocolOptions } from './protocol/ICPProtocol';
4
- import { ICPTransactionSignRequest } from './serializer/v3/schemas/definitions/transaction-sign-request-icp';
5
- import { ICPTransactionSignResponse } from './serializer/v3/schemas/definitions/transaction-sign-response-icp';
6
- import { ICPProtocolNetwork, ICPProtocolOptions, ICPUnits } from './types/protocol';
7
- import { ICPSignedTransaction, ICPUnsignedTransaction } from './types/transaction';
8
- export { ICPModule };
9
- export { ICPProtocol, createICPProtocol, createICPProtocolOptions };
10
- export { ICPBlockExplorer };
11
- export { ICPUnits, ICPProtocolOptions, ICPProtocolNetwork, ICPUnsignedTransaction, ICPSignedTransaction };
12
- export { ICPTransactionSignRequest, ICPTransactionSignResponse };
package/v1/index.js DELETED
@@ -1,11 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ICPBlockExplorer = exports.createICPProtocolOptions = exports.createICPProtocol = exports.ICPModule = void 0;
4
- var ICPBlockExplorer_1 = require("./block-explorer/ICPBlockExplorer");
5
- Object.defineProperty(exports, "ICPBlockExplorer", { enumerable: true, get: function () { return ICPBlockExplorer_1.ICPBlockExplorer; } });
6
- var ICPModule_1 = require("./module/ICPModule");
7
- Object.defineProperty(exports, "ICPModule", { enumerable: true, get: function () { return ICPModule_1.ICPModule; } });
8
- var ICPProtocol_1 = require("./protocol/ICPProtocol");
9
- Object.defineProperty(exports, "createICPProtocol", { enumerable: true, get: function () { return ICPProtocol_1.createICPProtocol; } });
10
- Object.defineProperty(exports, "createICPProtocolOptions", { enumerable: true, get: function () { return ICPProtocol_1.createICPProtocolOptions; } });
11
- //# sourceMappingURL=index.js.map
package/v1/index.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/v1/index.ts"],"names":[],"mappings":";;;AAAA,sEAAoE;AAkB3D,iGAlBA,mCAAgB,OAkBA;AAjBzB,gDAA8C;AASrC,0FATA,qBAAS,OASA;AARlB,sDAAiG;AAY3E,kGAZA,+BAAiB,OAYA;AAAE,yGAZA,sCAAwB,OAYA"}
@@ -1,15 +0,0 @@
1
- import { MainProtocolSymbols } from '@airgap/coinlib-core';
2
- import { AirGapBlockExplorer, AirGapModule, AirGapOfflineProtocol, AirGapOnlineProtocol, AirGapV3SerializerCompanion, ProtocolConfiguration } from '@airgap/module-kit';
3
- declare type SupportedProtocols = MainProtocolSymbols.ICP;
4
- export declare class ICPModule implements AirGapModule<{
5
- Protocols: SupportedProtocols;
6
- }> {
7
- private readonly networkRegistries;
8
- readonly supportedProtocols: Record<SupportedProtocols, ProtocolConfiguration>;
9
- createV3SerializerCompanion(): Promise<AirGapV3SerializerCompanion>;
10
- createOfflineProtocol(identifier: SupportedProtocols): Promise<AirGapOfflineProtocol | undefined>;
11
- createOnlineProtocol(identifier: SupportedProtocols, networkId?: string): Promise<AirGapOnlineProtocol | undefined>;
12
- createBlockExplorer(identifier: SupportedProtocols, networkId?: string): Promise<AirGapBlockExplorer | undefined>;
13
- private createProtocol;
14
- }
15
- export {};
@@ -1,107 +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.ICPModule = 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 ICPBlockExplorer_1 = require("../block-explorer/ICPBlockExplorer");
44
- var ICPProtocol_1 = require("../protocol/ICPProtocol");
45
- var serializer_companion_1 = require("../serializer/v3/serializer-companion");
46
- var ICPModule = /** @class */ (function () {
47
- function ICPModule() {
48
- var _a;
49
- this.networkRegistries = (_a = {},
50
- _a[coinlib_core_1.MainProtocolSymbols.ICP] = new module_kit_1.ModuleNetworkRegistry({
51
- supportedNetworks: [ICPProtocol_1.ICP_MAINNET_PROTOCOL_NETWORK]
52
- }),
53
- _a);
54
- this.supportedProtocols = (0, module_kit_1.createSupportedProtocols)(this.networkRegistries);
55
- }
56
- ICPModule.prototype.createV3SerializerCompanion = function () {
57
- return __awaiter(this, void 0, void 0, function () {
58
- return __generator(this, function (_a) {
59
- return [2 /*return*/, new serializer_companion_1.ICPV3SerializerCompanion()];
60
- });
61
- });
62
- };
63
- ICPModule.prototype.createOfflineProtocol = function (identifier) {
64
- return __awaiter(this, void 0, void 0, function () {
65
- return __generator(this, function (_a) {
66
- return [2 /*return*/, this.createProtocol(identifier)];
67
- });
68
- });
69
- };
70
- ICPModule.prototype.createOnlineProtocol = function (identifier, networkId) {
71
- var _a;
72
- return __awaiter(this, void 0, void 0, function () {
73
- var network;
74
- return __generator(this, function (_b) {
75
- network = (_a = this.networkRegistries[identifier]) === null || _a === void 0 ? void 0 : _a.findNetwork(networkId);
76
- if (network === undefined) {
77
- throw new errors_1.ConditionViolationError(coinlib_core_1.Domain.ICP, 'Protocol network not supported.');
78
- }
79
- return [2 /*return*/, this.createProtocol(identifier, network)];
80
- });
81
- });
82
- };
83
- ICPModule.prototype.createBlockExplorer = function (identifier, networkId) {
84
- var _a;
85
- return __awaiter(this, void 0, void 0, function () {
86
- var network;
87
- return __generator(this, function (_b) {
88
- network = (_a = this.networkRegistries[identifier]) === null || _a === void 0 ? void 0 : _a.findNetwork(networkId);
89
- if ((network === null || network === void 0 ? void 0 : network.type) !== 'mainnet') {
90
- throw new errors_1.ConditionViolationError(coinlib_core_1.Domain.ICP, 'Block Explorer network not supported.');
91
- }
92
- return [2 /*return*/, new ICPBlockExplorer_1.ICPBlockExplorer()];
93
- });
94
- });
95
- };
96
- ICPModule.prototype.createProtocol = function (identifier, network) {
97
- switch (identifier) {
98
- case coinlib_core_1.MainProtocolSymbols.ICP:
99
- return (0, ICPProtocol_1.createICPProtocol)({ network: network });
100
- default:
101
- throw new errors_1.ConditionViolationError(coinlib_core_1.Domain.ICP, "Protocol ".concat(identifier, " not supported."));
102
- }
103
- };
104
- return ICPModule;
105
- }());
106
- exports.ICPModule = ICPModule;
107
- //# sourceMappingURL=ICPModule.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ICPModule.js","sourceRoot":"","sources":["../../../src/v1/module/ICPModule.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qDAAkE;AAClE,sDAAqE;AACrE,iDAW2B;AAE3B,uEAAqE;AACrE,uDAAyF;AACzF,8EAAgF;AAIhF;IAAA;;QACmB,sBAAiB;YAChC,GAAC,kCAAmB,CAAC,GAAG,IAAG,IAAI,kCAAqB,CAAC;gBACnD,iBAAiB,EAAE,CAAC,0CAA4B,CAAC;aAClD,CAAC;gBACH;QACe,uBAAkB,GAAsD,IAAA,qCAAwB,EAAC,IAAI,CAAC,iBAAiB,CAAC,CAAA;IAoC1I,CAAC;IAlCc,+CAA2B,GAAxC;;;gBACE,sBAAO,IAAI,+CAAwB,EAAE,EAAA;;;KACtC;IAEY,yCAAqB,GAAlC,UAAmC,UAA8B;;;gBAC/D,sBAAO,IAAI,CAAC,cAAc,CAAC,UAAU,CAAC,EAAA;;;KACvC;IAEY,wCAAoB,GAAjC,UAAkC,UAA8B,EAAE,SAAkB;;;;;gBAC5E,OAAO,GAAgC,MAAA,IAAI,CAAC,iBAAiB,CAAC,UAAU,CAAC,0CAAE,WAAW,CAAC,SAAS,CAAC,CAAA;gBACvG,IAAI,OAAO,KAAK,SAAS,EAAE;oBACzB,MAAM,IAAI,gCAAuB,CAAC,qBAAM,CAAC,GAAG,EAAE,iCAAiC,CAAC,CAAA;iBACjF;gBAED,sBAAO,IAAI,CAAC,cAAc,CAAC,UAAU,EAAE,OAAO,CAAC,EAAA;;;KAChD;IAEY,uCAAmB,GAAhC,UAAiC,UAA8B,EAAE,SAAkB;;;;;gBAC3E,OAAO,GAAgC,MAAA,IAAI,CAAC,iBAAiB,CAAC,UAAU,CAAC,0CAAE,WAAW,CAAC,SAAS,CAAC,CAAA;gBACvG,IAAI,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,IAAI,MAAK,SAAS,EAAE;oBAC/B,MAAM,IAAI,gCAAuB,CAAC,qBAAM,CAAC,GAAG,EAAE,uCAAuC,CAAC,CAAA;iBACvF;gBAED,sBAAO,IAAI,mCAAgB,EAAE,EAAA;;;KAC9B;IAEO,kCAAc,GAAtB,UAAuB,UAA8B,EAAE,OAAyB;QAC9E,QAAQ,UAAU,EAAE;YAClB,KAAK,kCAAmB,CAAC,GAAG;gBAC1B,OAAO,IAAA,+BAAiB,EAAC,EAAE,OAAO,SAAA,EAAE,CAAC,CAAA;YACvC;gBACE,MAAM,IAAI,gCAAuB,CAAC,qBAAM,CAAC,GAAG,EAAE,mBAAY,UAAU,oBAAiB,CAAC,CAAA;SACzF;IACH,CAAC;IACH,gBAAC;AAAD,CAAC,AA1CD,IA0CC;AA1CY,8BAAS"}
package/v1/module.d.ts DELETED
@@ -1,3 +0,0 @@
1
- import { AirGapModule } from '@airgap/module-kit';
2
- export * from './index';
3
- export declare function create(): AirGapModule;
package/v1/module.js DELETED
@@ -1,24 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- exports.create = void 0;
18
- var ICPModule_1 = require("./module/ICPModule");
19
- __exportStar(require("./index"), exports);
20
- function create() {
21
- return new ICPModule_1.ICPModule();
22
- }
23
- exports.create = create;
24
- //# sourceMappingURL=module.js.map
package/v1/module.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"module.js","sourceRoot":"","sources":["../../src/v1/module.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AACA,gDAA8C;AAE9C,0CAAuB;AAEvB,SAAgB,MAAM;IACpB,OAAO,IAAI,qBAAS,EAAE,CAAA;AACxB,CAAC;AAFD,wBAEC"}
@@ -1,26 +0,0 @@
1
- import 'isomorphic-fetch';
2
- interface Transaction {
3
- to: string;
4
- amount: bigint;
5
- fee: bigint;
6
- }
7
- export declare function getKeyPairFromMnemonic(mnemonic: string, derivationPath?: string): {
8
- publicKey: string;
9
- privateKey: string;
10
- };
11
- export declare function getAddressFromPublicKey(publicKey: string, subAccount?: Uint8Array): string;
12
- export declare function createUnsignedTransaction(transaction: Transaction): string;
13
- export declare function getInfoFromUnsignedTransaction(unsignedTransaction: string): {
14
- to: string;
15
- fee: bigint;
16
- memo: bigint;
17
- from_subaccount: string[];
18
- created_at_time: any[];
19
- amount: bigint;
20
- };
21
- export declare function signTransaction(unsignedTransaction: string, privateKey: string): Promise<string>;
22
- export declare function getInfoFromSignedTransaction(signedTransaction: string): any;
23
- export declare function decodeArguments(args: ArrayBuffer): any;
24
- export declare function getBalanceFromAddress(address: string, host: string): Promise<bigint>;
25
- export declare function broadcastTransaction(signedTransaction: string, host: string): Promise<string>;
26
- export {};