@airgap/groestlcoin 0.13.11-beta.1 → 0.13.11-beta.2

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 (60) hide show
  1. package/index.d.ts +1 -0
  2. package/index.js +18 -0
  3. package/index.js.map +1 -0
  4. package/package.json +1 -5
  5. package/v0/index.d.ts +4 -0
  6. package/v0/index.js +21 -0
  7. package/v0/index.js.map +1 -0
  8. package/v0/protocol/GroestlcoinProtocol.d.ts +23 -0
  9. package/v0/protocol/GroestlcoinProtocol.js +89 -0
  10. package/v0/protocol/GroestlcoinProtocol.js.map +1 -0
  11. package/v0/protocol/GroestlcoinProtocolOptions.d.ts +26 -0
  12. package/v0/protocol/GroestlcoinProtocolOptions.js +149 -0
  13. package/v0/protocol/GroestlcoinProtocolOptions.js.map +1 -0
  14. package/v0/protocol/GroestlcoinTestnetProtocol.d.ts +4 -0
  15. package/v0/protocol/GroestlcoinTestnetProtocol.js +56 -0
  16. package/v0/protocol/GroestlcoinTestnetProtocol.js.map +1 -0
  17. package/v1/block-explorer/CryptoIDBlockExplorer.d.ts +11 -0
  18. package/v1/block-explorer/CryptoIDBlockExplorer.js +75 -0
  19. package/v1/block-explorer/CryptoIDBlockExplorer.js.map +1 -0
  20. package/v1/index.d.ts +10 -0
  21. package/v1/index.js +10 -0
  22. package/v1/index.js.map +1 -0
  23. package/v1/module/GroestlcoinModule.d.ts +17 -0
  24. package/v1/module/GroestlcoinModule.js +113 -0
  25. package/v1/module/GroestlcoinModule.js.map +1 -0
  26. package/v1/module.d.ts +3 -0
  27. package/v1/module.js +24 -0
  28. package/v1/module.js.map +1 -0
  29. package/v1/protocol/GroestlcoinProtocol.d.ts +63 -0
  30. package/v1/protocol/GroestlcoinProtocol.js +518 -0
  31. package/v1/protocol/GroestlcoinProtocol.js.map +1 -0
  32. package/v1/serializer/v3/schemas/converter/transaction-converter.d.ts +7 -0
  33. package/v1/serializer/v3/schemas/converter/transaction-converter.js +21 -0
  34. package/v1/serializer/v3/schemas/converter/transaction-converter.js.map +1 -0
  35. package/v1/serializer/v3/schemas/definitions/transaction-sign-request-groestlcoin.d.ts +5 -0
  36. package/v1/serializer/v3/schemas/definitions/transaction-sign-request-groestlcoin.js +3 -0
  37. package/v1/serializer/v3/schemas/definitions/transaction-sign-request-groestlcoin.js.map +1 -0
  38. package/v1/serializer/v3/schemas/definitions/transaction-sign-response-groestlcoin.d.ts +3 -0
  39. package/v1/serializer/v3/schemas/definitions/transaction-sign-response-groestlcoin.js +3 -0
  40. package/v1/serializer/v3/schemas/definitions/transaction-sign-response-groestlcoin.js.map +1 -0
  41. package/v1/serializer/v3/schemas/generated/transaction-sign-request-groestlcoin.json +109 -0
  42. package/v1/serializer/v3/schemas/generated/transaction-sign-response-groestlcoin.json +37 -0
  43. package/v1/serializer/v3/serializer-companion.d.ts +14 -0
  44. package/v1/serializer/v3/serializer-companion.js +173 -0
  45. package/v1/serializer/v3/serializer-companion.js.map +1 -0
  46. package/v1/serializer/v3/validators/transaction-validator.d.ts +4 -0
  47. package/v1/serializer/v3/validators/transaction-validator.js +29 -0
  48. package/v1/serializer/v3/validators/transaction-validator.js.map +1 -0
  49. package/v1/serializer/v3/validators/validators.d.ts +7 -0
  50. package/v1/serializer/v3/validators/validators.js +6 -0
  51. package/v1/serializer/v3/validators/validators.js.map +1 -0
  52. package/v1/types/crypto.d.ts +2 -0
  53. package/v1/types/crypto.js +3 -0
  54. package/v1/types/crypto.js.map +1 -0
  55. package/v1/types/protocol.d.ts +18 -0
  56. package/v1/types/protocol.js +3 -0
  57. package/v1/types/protocol.js.map +1 -0
  58. package/v1/types/transaction.d.ts +7 -0
  59. package/v1/types/transaction.js +3 -0
  60. package/v1/types/transaction.js.map +1 -0
@@ -0,0 +1,109 @@
1
+ {
2
+ "$ref": "#/definitions/GroestlcoinTransactionSignRequest",
3
+ "$schema": "http://json-schema.org/draft-07/schema#",
4
+ "definitions": {
5
+ "BitcoinInTransaction": {
6
+ "additionalProperties": false,
7
+ "properties": {
8
+ "address": {
9
+ "type": "string"
10
+ },
11
+ "derivationPath": {
12
+ "type": "string"
13
+ },
14
+ "txId": {
15
+ "type": "string"
16
+ },
17
+ "value": {
18
+ "type": "string"
19
+ },
20
+ "vout": {
21
+ "type": "number"
22
+ }
23
+ },
24
+ "required": ["txId", "value", "vout", "address"],
25
+ "type": "object"
26
+ },
27
+ "BitcoinOutTransaction": {
28
+ "additionalProperties": false,
29
+ "properties": {
30
+ "derivationPath": {
31
+ "type": "string"
32
+ },
33
+ "isChange": {
34
+ "type": "boolean"
35
+ },
36
+ "recipient": {
37
+ "type": "string"
38
+ },
39
+ "value": {
40
+ "type": "string"
41
+ }
42
+ },
43
+ "required": ["recipient", "isChange", "value"],
44
+ "type": "object"
45
+ },
46
+ "BitcoinUnsignedTransaction": {
47
+ "additionalProperties": false,
48
+ "properties": {
49
+ "ins": {
50
+ "items": {
51
+ "$ref": "#/definitions/BitcoinInTransaction"
52
+ },
53
+ "type": "array"
54
+ },
55
+ "outs": {
56
+ "items": {
57
+ "$ref": "#/definitions/BitcoinOutTransaction"
58
+ },
59
+ "type": "array"
60
+ },
61
+ "type": {
62
+ "enum": ["unsigned"],
63
+ "type": "string"
64
+ }
65
+ },
66
+ "required": ["ins", "outs", "type"],
67
+ "type": "object"
68
+ },
69
+ "GroestlcoinTransactionSignRequest": {
70
+ "additionalProperties": false,
71
+ "properties": {
72
+ "callbackURL": {
73
+ "type": "string"
74
+ },
75
+ "publicKey": {
76
+ "type": "string"
77
+ },
78
+ "transaction": {
79
+ "$ref": "#/definitions/GroestlcoinUnsignedTransaction"
80
+ }
81
+ },
82
+ "required": ["publicKey", "transaction"],
83
+ "type": "object"
84
+ },
85
+ "GroestlcoinUnsignedTransaction": {
86
+ "additionalProperties": false,
87
+ "properties": {
88
+ "ins": {
89
+ "items": {
90
+ "$ref": "#/definitions/BitcoinInTransaction"
91
+ },
92
+ "type": "array"
93
+ },
94
+ "outs": {
95
+ "items": {
96
+ "$ref": "#/definitions/BitcoinOutTransaction"
97
+ },
98
+ "type": "array"
99
+ },
100
+ "type": {
101
+ "enum": ["unsigned"],
102
+ "type": "string"
103
+ }
104
+ },
105
+ "required": ["ins", "outs", "type"],
106
+ "type": "object"
107
+ }
108
+ }
109
+ }
@@ -0,0 +1,37 @@
1
+ {
2
+ "$ref": "#/definitions/GroestlcoinTransactionSignResponse",
3
+ "$schema": "http://json-schema.org/draft-07/schema#",
4
+ "definitions": {
5
+ "GroestlcoinTransactionSignResponse": {
6
+ "additionalProperties": false,
7
+ "properties": {
8
+ "accountIdentifier": {
9
+ "type": "string"
10
+ },
11
+ "amount": {
12
+ "type": "string"
13
+ },
14
+ "fee": {
15
+ "type": "string"
16
+ },
17
+ "from": {
18
+ "items": {
19
+ "type": "string"
20
+ },
21
+ "type": "array"
22
+ },
23
+ "to": {
24
+ "items": {
25
+ "type": "string"
26
+ },
27
+ "type": "array"
28
+ },
29
+ "transaction": {
30
+ "type": "string"
31
+ }
32
+ },
33
+ "required": ["accountIdentifier", "amount", "fee", "from", "to", "transaction"],
34
+ "type": "object"
35
+ }
36
+ }
37
+ }
@@ -0,0 +1,14 @@
1
+ import { AirGapV3SerializerCompanion, SignedTransaction, UnsignedTransaction } from '@airgap/module-kit';
2
+ import { V3SchemaConfiguration } from '@airgap/module-kit/types/serializer';
3
+ import { TransactionSignRequest, TransactionSignResponse } from '@airgap/serializer';
4
+ export declare class GroestlcoinV3SerializerCompanion implements AirGapV3SerializerCompanion {
5
+ readonly schemas: V3SchemaConfiguration[];
6
+ private readonly groestlcoinTransactionValidator;
7
+ constructor();
8
+ toTransactionSignRequest(identifier: string, unsignedTransaction: UnsignedTransaction, publicKey: string, callbackUrl?: string): Promise<TransactionSignRequest>;
9
+ fromTransactionSignRequest(identifier: string, transactionSignRequest: TransactionSignRequest): Promise<UnsignedTransaction>;
10
+ validateTransactionSignRequest(identifier: string, transactionSignRequest: TransactionSignRequest): Promise<boolean>;
11
+ toTransactionSignResponse(identifier: string, signedTransaction: SignedTransaction, accountIdentifier: string): Promise<TransactionSignResponse>;
12
+ fromTransactionSignResponse(identifier: string, transactionSignResponse: TransactionSignResponse): Promise<SignedTransaction>;
13
+ validateTransactionSignResponse(identifier: string, transactionSignResponse: TransactionSignResponse): Promise<boolean>;
14
+ }
@@ -0,0 +1,173 @@
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.GroestlcoinV3SerializerCompanion = void 0;
40
+ var coinlib_core_1 = require("@airgap/coinlib-core");
41
+ var validate_1 = require("@airgap/coinlib-core/dependencies/src/validate.js-0.13.1/validate");
42
+ var errors_1 = require("@airgap/coinlib-core/errors");
43
+ var serializer_1 = require("@airgap/serializer");
44
+ var transaction_converter_1 = require("./schemas/converter/transaction-converter");
45
+ var transaction_validator_1 = require("./validators/transaction-validator");
46
+ var validators_1 = require("./validators/validators");
47
+ var groestlcoinTransactionSignRequest = require('./schemas/generated/transaction-sign-request-groestlcoin.json');
48
+ var groestlcoinTransactionSignResponse = require('./schemas/generated/transaction-sign-response-groestlcoin.json');
49
+ var GroestlcoinV3SerializerCompanion = /** @class */ (function () {
50
+ function GroestlcoinV3SerializerCompanion() {
51
+ this.schemas = [
52
+ {
53
+ type: serializer_1.IACMessageType.TransactionSignRequest,
54
+ schema: { schema: groestlcoinTransactionSignRequest },
55
+ protocolIdentifier: coinlib_core_1.MainProtocolSymbols.GRS
56
+ },
57
+ {
58
+ type: serializer_1.IACMessageType.TransactionSignResponse,
59
+ schema: { schema: groestlcoinTransactionSignResponse },
60
+ protocolIdentifier: coinlib_core_1.MainProtocolSymbols.GRS
61
+ }
62
+ ];
63
+ this.groestlcoinTransactionValidator = new transaction_validator_1.GroestlcoinTransactionValidator();
64
+ Object.keys(validators_1.groestlcoinValidators).forEach(function (key) {
65
+ validate_1.validators[key] = validators_1.groestlcoinValidators[key];
66
+ });
67
+ }
68
+ GroestlcoinV3SerializerCompanion.prototype.toTransactionSignRequest = function (identifier, unsignedTransaction, publicKey, callbackUrl) {
69
+ return __awaiter(this, void 0, void 0, function () {
70
+ return __generator(this, function (_a) {
71
+ switch (identifier) {
72
+ case coinlib_core_1.MainProtocolSymbols.GRS:
73
+ return [2 /*return*/, (0, transaction_converter_1.groestlcoinUnsignedTransactionToRequest)(unsignedTransaction, publicKey, callbackUrl)];
74
+ default:
75
+ throw new errors_1.UnsupportedError(coinlib_core_1.Domain.GROESTLCOIN, "Protocol ".concat(identifier, " not supported"));
76
+ }
77
+ return [2 /*return*/];
78
+ });
79
+ });
80
+ };
81
+ GroestlcoinV3SerializerCompanion.prototype.fromTransactionSignRequest = function (identifier, transactionSignRequest) {
82
+ return __awaiter(this, void 0, void 0, function () {
83
+ return __generator(this, function (_a) {
84
+ switch (identifier) {
85
+ case coinlib_core_1.MainProtocolSymbols.GRS:
86
+ return [2 /*return*/, (0, transaction_converter_1.groestlcoinTransactionSignRequestToUnsigned)(transactionSignRequest)];
87
+ default:
88
+ throw new errors_1.UnsupportedError(coinlib_core_1.Domain.GROESTLCOIN, "Protocol ".concat(identifier, " not supported"));
89
+ }
90
+ return [2 /*return*/];
91
+ });
92
+ });
93
+ };
94
+ GroestlcoinV3SerializerCompanion.prototype.validateTransactionSignRequest = function (identifier, transactionSignRequest) {
95
+ return __awaiter(this, void 0, void 0, function () {
96
+ var _a, _b;
97
+ return __generator(this, function (_c) {
98
+ switch (_c.label) {
99
+ case 0:
100
+ _a = identifier;
101
+ switch (_a) {
102
+ case coinlib_core_1.MainProtocolSymbols.GRS: return [3 /*break*/, 1];
103
+ }
104
+ return [3 /*break*/, 4];
105
+ case 1:
106
+ _c.trys.push([1, 3, , 4]);
107
+ return [4 /*yield*/, this.groestlcoinTransactionValidator.validateUnsignedTransaction(transactionSignRequest)];
108
+ case 2:
109
+ _c.sent();
110
+ return [2 /*return*/, true];
111
+ case 3:
112
+ _b = _c.sent();
113
+ return [2 /*return*/, false];
114
+ case 4: throw new errors_1.UnsupportedError(coinlib_core_1.Domain.GROESTLCOIN, "Protocol ".concat(identifier, " not supported"));
115
+ }
116
+ });
117
+ });
118
+ };
119
+ GroestlcoinV3SerializerCompanion.prototype.toTransactionSignResponse = function (identifier, signedTransaction, accountIdentifier) {
120
+ return __awaiter(this, void 0, void 0, function () {
121
+ return __generator(this, function (_a) {
122
+ switch (identifier) {
123
+ case coinlib_core_1.MainProtocolSymbols.GRS:
124
+ return [2 /*return*/, (0, transaction_converter_1.groestlcoinSignedTransactionToResponse)(signedTransaction, accountIdentifier)];
125
+ default:
126
+ throw new errors_1.UnsupportedError(coinlib_core_1.Domain.GROESTLCOIN, "Protocol ".concat(identifier, " not supported"));
127
+ }
128
+ return [2 /*return*/];
129
+ });
130
+ });
131
+ };
132
+ GroestlcoinV3SerializerCompanion.prototype.fromTransactionSignResponse = function (identifier, transactionSignResponse) {
133
+ return __awaiter(this, void 0, void 0, function () {
134
+ return __generator(this, function (_a) {
135
+ switch (identifier) {
136
+ case coinlib_core_1.MainProtocolSymbols.GRS:
137
+ return [2 /*return*/, (0, transaction_converter_1.groestlcoinTransactionSignResponseToSigned)(transactionSignResponse)];
138
+ default:
139
+ throw new errors_1.UnsupportedError(coinlib_core_1.Domain.GROESTLCOIN, "Protocol ".concat(identifier, " not supported"));
140
+ }
141
+ return [2 /*return*/];
142
+ });
143
+ });
144
+ };
145
+ GroestlcoinV3SerializerCompanion.prototype.validateTransactionSignResponse = function (identifier, transactionSignResponse) {
146
+ return __awaiter(this, void 0, void 0, function () {
147
+ var _a, _b;
148
+ return __generator(this, function (_c) {
149
+ switch (_c.label) {
150
+ case 0:
151
+ _a = identifier;
152
+ switch (_a) {
153
+ case coinlib_core_1.MainProtocolSymbols.GRS: return [3 /*break*/, 1];
154
+ }
155
+ return [3 /*break*/, 4];
156
+ case 1:
157
+ _c.trys.push([1, 3, , 4]);
158
+ return [4 /*yield*/, this.groestlcoinTransactionValidator.validateSignedTransaction(transactionSignResponse)];
159
+ case 2:
160
+ _c.sent();
161
+ return [2 /*return*/, true];
162
+ case 3:
163
+ _b = _c.sent();
164
+ return [2 /*return*/, false];
165
+ case 4: throw new errors_1.UnsupportedError(coinlib_core_1.Domain.GROESTLCOIN, "Protocol ".concat(identifier, " not supported"));
166
+ }
167
+ });
168
+ });
169
+ };
170
+ return GroestlcoinV3SerializerCompanion;
171
+ }());
172
+ exports.GroestlcoinV3SerializerCompanion = GroestlcoinV3SerializerCompanion;
173
+ //# sourceMappingURL=serializer-companion.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"serializer-companion.js","sourceRoot":"","sources":["../../../../src/v1/serializer/v3/serializer-companion.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,4 @@
1
+ import { BitcoinTransactionValidator } from '@airgap/bitcoin/v1';
2
+ import { TransactionValidator } from '@airgap/serializer';
3
+ export declare class GroestlcoinTransactionValidator extends BitcoinTransactionValidator implements TransactionValidator {
4
+ }
@@ -0,0 +1,29 @@
1
+ "use strict";
2
+ var __extends = (this && this.__extends) || (function () {
3
+ var extendStatics = function (d, b) {
4
+ extendStatics = Object.setPrototypeOf ||
5
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
+ return extendStatics(d, b);
8
+ };
9
+ return function (d, b) {
10
+ if (typeof b !== "function" && b !== null)
11
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
+ extendStatics(d, b);
13
+ function __() { this.constructor = d; }
14
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
+ };
16
+ })();
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ exports.GroestlcoinTransactionValidator = void 0;
19
+ // tslint:disable: max-classes-per-file
20
+ var v1_1 = require("@airgap/bitcoin/v1");
21
+ var GroestlcoinTransactionValidator = /** @class */ (function (_super) {
22
+ __extends(GroestlcoinTransactionValidator, _super);
23
+ function GroestlcoinTransactionValidator() {
24
+ return _super !== null && _super.apply(this, arguments) || this;
25
+ }
26
+ return GroestlcoinTransactionValidator;
27
+ }(v1_1.BitcoinTransactionValidator));
28
+ exports.GroestlcoinTransactionValidator = GroestlcoinTransactionValidator;
29
+ //# sourceMappingURL=transaction-validator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"transaction-validator.js","sourceRoot":"","sources":["../../../../../src/v1/serializer/v3/validators/transaction-validator.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,uCAAuC;AACvC,yCAAgE;AAGhE;IAAqD,mDAA2B;IAAhF;;IAAkH,CAAC;IAAD,sCAAC;AAAD,CAAC,AAAnH,CAAqD,gCAA2B,GAAmC;AAAtG,0EAA+B"}
@@ -0,0 +1,7 @@
1
+ export declare const groestlcoinValidators: {
2
+ isValidBitcoinInput: (ins: unknown) => Promise<"not an array" | "doesn't have property txId " | "not a valid txId" | "doesn't have property value " | "value not a valid BigNumber" | "doesn't have property vout" | "vout is not a number" | "vout is not a positive value" | "doesn't have property address " | "not a valid bitcoin address" | null>;
3
+ isValidBitcoinOutput: (outs: unknown) => Promise<"not an array" | "doesn't have property value " | "doesn't have property recipient" | "invalid Bitcoin address" | "doesn't have property isChange " | "change is not a boolean" | "value is not BigNumber" | null>;
4
+ isValidBitcoinFromArray: (array: unknown) => Promise<"not a valid bitcoin address" | "not an array of Bitcoin addresses" | null>;
5
+ isBitcoinAccount: (accountIdentifier: string) => Promise<"not a valid Bitcoin account" | null>;
6
+ isValidBitcoinTxString: (transaction: string) => "is not a valid hex encoded Bitcoin transaction" | null;
7
+ };
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.groestlcoinValidators = void 0;
4
+ var v1_1 = require("@airgap/bitcoin/v1");
5
+ exports.groestlcoinValidators = v1_1.bitcoinValidators;
6
+ //# sourceMappingURL=validators.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validators.js","sourceRoot":"","sources":["../../../../../src/v1/serializer/v3/validators/validators.ts"],"names":[],"mappings":";;;AAAA,yCAAsD;AAEzC,QAAA,qBAAqB,GAAG,sBAAiB,CAAA"}
@@ -0,0 +1,2 @@
1
+ import { BitcoinCryptoConfiguration } from '@airgap/bitcoin/v1/types/crypto';
2
+ export declare type GroestlcoinCryptoConfiguration = BitcoinCryptoConfiguration;
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=crypto.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"crypto.js","sourceRoot":"","sources":["../../../src/v1/types/crypto.ts"],"names":[],"mappings":""}
@@ -0,0 +1,18 @@
1
+ import { BitcoinProtocolOptions } from '@airgap/bitcoin/v1';
2
+ import { ProtocolNetwork } from '@airgap/module-kit';
3
+ export declare type GroestlcoinUnits = 'GRS' | 'mGRS' | 'Satoshi';
4
+ interface GroestlcoinBaseProtocolNetwork extends ProtocolNetwork {
5
+ indexerApi: string;
6
+ }
7
+ export interface GroestlcoinStandardProtocolNetwork extends GroestlcoinBaseProtocolNetwork {
8
+ type: 'mainnet' | 'testnet';
9
+ }
10
+ export interface GroestlcoinCustomProtocolNetwork extends GroestlcoinBaseProtocolNetwork {
11
+ type: 'custom';
12
+ bitcoinjsNetworkName: string;
13
+ }
14
+ export declare type GroestlcoinProtocolNetwork = GroestlcoinStandardProtocolNetwork | GroestlcoinCustomProtocolNetwork;
15
+ export interface GroestlcoinProtocolOptions extends BitcoinProtocolOptions {
16
+ network: GroestlcoinProtocolNetwork;
17
+ }
18
+ export {};
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=protocol.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"protocol.js","sourceRoot":"","sources":["../../../src/v1/types/protocol.ts"],"names":[],"mappings":""}
@@ -0,0 +1,7 @@
1
+ import { BitcoinSignedTransaction, BitcoinTransactionCursor, BitcoinUnsignedTransaction } from '@airgap/bitcoin/v1';
2
+ export interface GroestlcoinUnsignedTransaction extends BitcoinUnsignedTransaction {
3
+ }
4
+ export interface GroestlcoinSignedTransaction extends BitcoinSignedTransaction {
5
+ }
6
+ export interface GroestlcoinTransactionCursor extends BitcoinTransactionCursor {
7
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=transaction.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"transaction.js","sourceRoot":"","sources":["../../../src/v1/types/transaction.ts"],"names":[],"mappings":""}