@airgap/groestlcoin 0.13.7-beta.21 → 0.13.7-beta.23

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 (55) hide show
  1. package/airgap-coinlib-groestlcoin.min.js +16819 -4275
  2. package/index.d.ts +1 -4
  3. package/index.js +15 -11
  4. package/index.js.map +1 -1
  5. package/package.json +4 -2
  6. package/v0/index.d.ts +4 -0
  7. package/v0/index.js +21 -0
  8. package/v0/index.js.map +1 -0
  9. package/{protocol → v0/protocol}/GroestlcoinProtocol.d.ts +0 -0
  10. package/{protocol → v0/protocol}/GroestlcoinProtocol.js +7 -1
  11. package/v0/protocol/GroestlcoinProtocol.js.map +1 -0
  12. package/{protocol → v0/protocol}/GroestlcoinProtocolOptions.d.ts +0 -0
  13. package/{protocol → v0/protocol}/GroestlcoinProtocolOptions.js +10 -4
  14. package/v0/protocol/GroestlcoinProtocolOptions.js.map +1 -0
  15. package/{protocol → v0/protocol}/GroestlcoinTestnetProtocol.d.ts +0 -0
  16. package/{protocol → v0/protocol}/GroestlcoinTestnetProtocol.js +7 -1
  17. package/v0/protocol/GroestlcoinTestnetProtocol.js.map +1 -0
  18. package/v1/block-explorer/CryptoIDBlockExplorer.d.ts +11 -0
  19. package/v1/block-explorer/CryptoIDBlockExplorer.js +75 -0
  20. package/v1/block-explorer/CryptoIDBlockExplorer.js.map +1 -0
  21. package/v1/index.d.ts +9 -0
  22. package/v1/index.js +10 -0
  23. package/v1/index.js.map +1 -0
  24. package/v1/module/GroestlcoinModule.d.ts +10 -0
  25. package/v1/module/GroestlcoinModule.js +92 -0
  26. package/v1/module/GroestlcoinModule.js.map +1 -0
  27. package/v1/protocol/GroestlcoinProtocol.d.ts +59 -0
  28. package/v1/protocol/GroestlcoinProtocol.js +502 -0
  29. package/v1/protocol/GroestlcoinProtocol.js.map +1 -0
  30. package/v1/serializer/v3/schemas/converter/transaction-converter.d.ts +7 -0
  31. package/v1/serializer/v3/schemas/converter/transaction-converter.js +21 -0
  32. package/v1/serializer/v3/schemas/converter/transaction-converter.js.map +1 -0
  33. package/v1/serializer/v3/schemas/definitions/transaction-sign-request-groestlcoin.d.ts +5 -0
  34. package/v1/serializer/v3/schemas/definitions/transaction-sign-request-groestlcoin.js +3 -0
  35. package/v1/serializer/v3/schemas/definitions/transaction-sign-request-groestlcoin.js.map +1 -0
  36. package/v1/serializer/v3/schemas/definitions/transaction-sign-response-groestlcoin.d.ts +3 -0
  37. package/v1/serializer/v3/schemas/definitions/transaction-sign-response-groestlcoin.js +3 -0
  38. package/v1/serializer/v3/schemas/definitions/transaction-sign-response-groestlcoin.js.map +1 -0
  39. package/v1/serializer/v3/schemas/generated/transaction-sign-request-groestlcoin.json +109 -0
  40. package/v1/serializer/v3/schemas/generated/transaction-sign-response-groestlcoin.json +37 -0
  41. package/v1/serializer/v3/validators/transaction-validator.d.ts +7 -0
  42. package/v1/serializer/v3/validators/transaction-validator.js +38 -0
  43. package/v1/serializer/v3/validators/transaction-validator.js.map +1 -0
  44. package/v1/serializer/v3/validators/validators.d.ts +7 -0
  45. package/v1/serializer/v3/validators/validators.js +6 -0
  46. package/v1/serializer/v3/validators/validators.js.map +1 -0
  47. package/v1/types/protocol.d.ts +18 -0
  48. package/v1/types/protocol.js +3 -0
  49. package/v1/types/protocol.js.map +1 -0
  50. package/v1/types/transaction.d.ts +7 -0
  51. package/v1/types/transaction.js +3 -0
  52. package/v1/types/transaction.js.map +1 -0
  53. package/protocol/GroestlcoinProtocol.js.map +0 -1
  54. package/protocol/GroestlcoinProtocolOptions.js.map +0 -1
  55. package/protocol/GroestlcoinTestnetProtocol.js.map +0 -1
@@ -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,7 @@
1
+ import { BitcoinTransactionValidator } from '@airgap/bitcoin/v1';
2
+ import { TransactionValidator, TransactionValidatorFactory } from '@airgap/serializer';
3
+ export declare class GroestlcoinTransactionValidator extends BitcoinTransactionValidator implements TransactionValidator {
4
+ }
5
+ export declare class GroestlcoinTransactionValidatorFactory implements TransactionValidatorFactory<GroestlcoinTransactionValidator> {
6
+ create(): GroestlcoinTransactionValidator;
7
+ }
@@ -0,0 +1,38 @@
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.GroestlcoinTransactionValidatorFactory = 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
+ var GroestlcoinTransactionValidatorFactory = /** @class */ (function () {
30
+ function GroestlcoinTransactionValidatorFactory() {
31
+ }
32
+ GroestlcoinTransactionValidatorFactory.prototype.create = function () {
33
+ return new GroestlcoinTransactionValidator();
34
+ };
35
+ return GroestlcoinTransactionValidatorFactory;
36
+ }());
37
+ exports.GroestlcoinTransactionValidatorFactory = GroestlcoinTransactionValidatorFactory;
38
+ //# 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;AAE5C;IAAA;IAIA,CAAC;IAHQ,uDAAM,GAAb;QACE,OAAO,IAAI,+BAA+B,EAAE,CAAA;IAC9C,CAAC;IACH,6CAAC;AAAD,CAAC,AAJD,IAIC;AAJY,wFAAsC"}
@@ -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" | "doesn't have property derivationPath" | "invalid derivation path" | 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,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":""}
@@ -1 +0,0 @@
1
- {"version":3,"file":"GroestlcoinProtocol.js","sourceRoot":"","sources":["../../src/protocol/GroestlcoinProtocol.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAAsE;AAEtE,4HAA+G;AAE/G,8EAAiG;AAEjG,2EAAyE;AAEzE;IAAyC,uCAAe;IAsCtD,6BAA4B,OAAsE;QAAtE,wBAAA,EAAA,cAA0C,uDAA0B,EAAE;QAAlG,YACE,kBAAM,OAAO,CAAC,SAEf;QAH2B,aAAO,GAA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C,AAFD,IAEC;AAFY,8DAAyB;AAItC;IACE,oCACkB,OAAsE,EACtE,MAAmE;QADnE,wBAAA,EAAA,cAA0C,0BAA0B,EAAE;QACtE,uBAAA,EAAA,aAAwC,yBAAyB,EAAE;QADnE,YAAO,GAAP,OAAO,CAA+D;QACtE,WAAM,GAAN,MAAM,CAA6D;IAClF,CAAC;IACN,iCAAC;AAAD,CAAC,AALD,IAKC;AALY,gEAA0B"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"GroestlcoinTestnetProtocol.js","sourceRoot":"","sources":["../../src/protocol/GroestlcoinTestnetProtocol.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAAiD;AACjD,iJAAoI;AACpI,8EAAwE;AAExE,2EAMqC;AAErC;IAAgD,8CAAe;IAC7D;QACE,4GAA4G;eAC5G,kBACE,IAAI,uDAA0B,CAC5B,IAAI,uDAA0B,CAC5B,SAAS,EACT,6BAAW,CAAC,OAAO,EACnB,EAAE,EACF,IAAI,kDAAqB,CAAC,uCAAuC,CAAC,EAClE,IAAI,6DAAgC,CAAC,yCAAyC,EAAE,SAAS,CAAC,QAAQ,CAAC,WAAW,CAAC,CAChH,EACD,IAAI,sDAAyB,EAAE,CAChC,CACF;IACH,CAAC;IACH,iCAAC;AAAD,CAAC,AAhBD,CAAgD,yBAAe,GAgB9D;AAhBY,gEAA0B"}