@taquito/utils 11.0.2 → 11.2.0-beta-RC.0

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.
package/README.md CHANGED
@@ -1,29 +1,270 @@
1
1
  # Taquito Utils package
2
+ *TypeDoc style documentation is available on-line [here](https://tezostaquito.io/typedoc/modules/_taquito_utils.html)*
2
3
 
3
4
  `@taquito/utils` is an npm package that provides developers with utility functionality for Taquito.
4
5
 
6
+ ## Install
7
+
8
+ ```
9
+ npm i --save @taquito/utils
10
+ ```
11
+
12
+ ## Usage
13
+
14
+ ### Validation functions
15
+
16
+ Taquito provides functions that allow seeing if an address, a chain, a key hash, a contract address, a public key, a signature, a block hash, an operation hash, or a protocol hash is valid based on checksums.
17
+
18
+ The `ValidationResult` returned by these functions is an enum that can take the following values:
19
+
20
+ ```
21
+ 0 = NO_PREFIX_MATCHED,
22
+ 1 = INVALID_CHECKSUM,
23
+ 2 = INVALID_LENGTH,
24
+ 3 = VALID
25
+ ```
26
+
27
+ **Address validation (tz1, tz2, tz3, KT1)**
28
+
29
+ ```ts
30
+ import { validateAddress } from '@taquito/utils';
31
+
32
+ const pkh = 'tz1L9r8mWmRPndRhuvMCWESLGSVeFzQ9NAWx';
33
+ console.log(validateAddress(pkh));
34
+ // output: 3 which is valid
35
+ ```
36
+
37
+ **Key hash validation**
38
+
39
+ ```ts
40
+ import { validateKeyHash } from '@taquito/utils';
41
+
42
+ const keyHash = 'tz1L9r8mWmRPndRhuvMCWESLGSVeFzQ9NAWx';
43
+ console.log(validateKeyHash(keyHash));
44
+ // output: 3 which is valid
45
+ ```
46
+
47
+ **Contract address validation**
48
+
49
+ ```ts
50
+ import { validateContractAddress } from '@taquito/utils';
51
+
52
+ const contractAddress = 'KT1AfxAKKLnEg6rQ6kHdvCWwagjSaxEwURSJ';
53
+ console.log(validateContractAddress(contractAddress));
54
+ // output: 3 which is valid
55
+ ```
56
+
57
+ **Chain id validation**
58
+
59
+ ```ts
60
+ import { validateChain } from '@taquito/utils';
61
+
62
+ const chainId = 'NetXdQprcVkpaWU';
63
+ console.log(validateChain(chainId));
64
+ // output: 3 which is valid
65
+ ```
66
+
67
+ **Public key validation**
68
+
69
+ ```ts
70
+ import { validatePublicKey } from '@taquito/utils';
71
+
72
+ const publicKey = 'edpkvS5QFv7KRGfa3b87gg9DBpxSm3NpSwnjhUjNBQrRUUR66F7C9g';
73
+ console.log(validatePublicKey(publicKey));
74
+ // output: 3 which is valid
75
+ ```
76
+
77
+ **Signature validation**
78
+
79
+ ```ts
80
+ import { validateSignature } from '@taquito/utils';
81
+
82
+ const signature = 'edsigtkpiSSschcaCt9pUVrpNPf7TTcgvgDEDD6NCEHMy8NNQJCGnMfLZzYoQj74yLjo9wx6MPVV29CvVzgi7qEcEUok3k7AuMg';
83
+ console.log(validateSignature(signature));
84
+ // output: 3 which is valid
85
+ ```
86
+
87
+ **Block hash validation**
88
+
89
+ ```ts
90
+ import { validateBlock } from '@taquito/utils';
91
+
92
+ const block ='BLJjnzaPtSsxykZ9pLTFLSfsKuiN3z7SjSPDPWwbE4Q68u5EpBw';
93
+ console.log(validateBlock(block));
94
+ // output: 3 which is valid
95
+ ```
96
+
97
+ **Operation hash validation**
98
+
99
+ ```ts
100
+ import { validateOperation } from '@taquito/utils';
101
+
102
+ const operation ='ood2Y1FLHH9izvYghVcDGGAkvJFo1CgSEjPfWvGsaz3qypCmeUj';
103
+ console.log(validateOperation(operation));
104
+ // output: 3 which is valid
105
+ ```
106
+
107
+ **Protocol hash validation**
108
+
109
+ ```ts
110
+ import { validateProtocol } from '@taquito/utils';
111
+
112
+ //valid
113
+ const protocol ='PtHangz2aRngywmSRGGvrcTyMbbdpWdpFKuS4uMWxg2RaH9i1qx';
114
+ console.log(validateProtocol(protocol));
115
+ // output: 3 which is valid
116
+ ```
117
+
118
+ ### Verification of a signature
119
+
120
+ The function takes a message, a public key, and a signature as parameters and returns a boolean indicating if the signature matches.
121
+
122
+ ```ts
123
+ import { verifySignature } from '@taquito/utils';
124
+
125
+ const message = '03d0c10e3ed11d7c6e3357f6ef335bab9e8f2bd54d0ce20c482e241191a6e4b8ce6c01be917311d9ac46959750e405d57e268e2ed9e174a80794fbd504e12a4a000141eb3781afed2f69679ff2bbe1c5375950b0e40d00ff000000005e05050505050507070100000024747a32526773486e74516b72794670707352466261313652546656503539684b72654a4d07070100000024747a315a6672455263414c42776d4171776f6e525859565142445439426a4e6a42484a750001';
126
+ const pk = 'sppk7c7hkPj47yjYFEHX85q46sFJGw6RBrqoVSHwAJAT4e14KJwzoey';
127
+ const sig = 'spsig1cdLkp1RLgUHAp13aRFkZ6MQDPp7xCnjAExGL3MBSdMDmT6JgQSX8cufyDgJRM3sinFtiCzLbsyP6d365EHoNevxhT47nx'
128
+
129
+ const isValid = verifySignature(message, pk, sig);
130
+ console.log(isValid);
131
+ // output: true
132
+ ```
133
+
134
+ ### Utility functions
135
+
136
+ **Conversion between hexadecimal and ASCII strings**
137
+ ```ts
138
+ import { char2Bytes, bytes2Char } from '@taquito/utils';
139
+
140
+ const url = 'https://storage.googleapis.com/tzip-16/fa2-views.json';
141
+ const hex = '68747470733a2f2f73746f726167652e676f6f676c65617069732e636f6d2f747a69702d31362f6661322d76696577732e6a736f6e';
142
+
143
+ console.log(char2Bytes(url));
144
+ // output: 68747470733a2f2f73746f726167652e676f6f676c65617069732e636f6d2f747a69702d31362f6661322d76696577732e6a736f6e
145
+
146
+ console.log(bytes2Char(hex));
147
+ // output: https://storage.googleapis.com/tzip-16/fa2-views.json
148
+ ```
149
+
150
+ **Conversion between buffer and hexadecimal strings**
151
+
152
+ ```ts
153
+ import { buf2hex, hex2buf } from '@taquito/utils';
154
+
155
+ const buffer = Buffer.from([0x62, 0x75, 0x66, 0x66, 0x65, 0x72]);
156
+ const hex = '627566666572'
157
+
158
+ console.log(buf2hex(buffer));
159
+ // output: 627566666572
160
+
161
+ console.log(hex2buf(hex));
162
+ // output: Uint8Array(6) [ 98, 117, 102, 102, 101, 114 ]
163
+ ```
164
+
165
+ **Merge 2 buffers together**
166
+
167
+ ```ts
168
+ import { mergebuf } from '@taquito/utils';
169
+
170
+ const buff = new Uint8Array([1,2]);
171
+ const buff2 = new Uint8Array([3,4]);
172
+
173
+ console.log(mergebuf(buff, buff2));
174
+ // output: Uint8Array(4) [ 1, 2, 3, 4 ]
175
+ ```
176
+
177
+ **Base58 encode a key hash according to its prefix**
178
+
179
+ ```ts
180
+ import { encodeKeyHash } from '@taquito/utils';
181
+
182
+ console.log(encodeKeyHash('01106d79a502c4135b10e61e92f4c5a72ca740fb87'));
183
+ // output: tz29p6csejX9FcHXgQERr5sXsAinLvxmVerM
184
+ ```
185
+
186
+ **Base58 encode a public key according to its prefix**
187
+
188
+ ```ts
189
+ import { encodeKey } from '@taquito/utils';
190
+
191
+ console.log(encodeKey('0060842d4ba23a9940ef5dcf4404fdaa430cfaaccb5029fad06cb5ea894e4562ae'));
192
+ // output: edpkuNjKKT48xBoT5asPrWdmuM1Yw8D93MwgFgVvtca8jb5pstzaCh
193
+ ```
194
+
195
+ **Base58 encode an address using a predefined prefix**
5
196
  ```ts
6
- import { char2Bytes } from '@taquito/utils'; // Convert a string to bytes
7
- import { bytes2Char } from '@taquito/utils'; // Convert bytes to a string
8
- import { buf2hex } from '@taquito/utils'; // Convert a buffer to an hex string
9
- import { mergebuf } from '@taquito/utils'; // Merge 2 buffers together
10
- import { hex2buf } from '@taquito/utils'; // Convert an hex string to a Uint8Array
11
- import { encodeKeyHash } from '@taquito/utils'; // Base58 encode a key hash according to its prefix
12
- import { encodeKey } from '@taquito/utils'; // Base58 encode a key according to its prefix
13
- import { encodePubKey } from '@taquito/utils'; // Base58 encode a public key using predefined prefix
14
- import { b58decode } from '@taquito/utils'; // Base58 decode a string with predefined prefix
15
- import { b58cdecode } from '@taquito/utils'; // Base58 decode a string and remove the prefix from it
16
- import { b58cencode } from '@taquito/utils'; // Base58 encode a string or a Uint8Array and append a prefix to it
17
- import { encodeOpHash } from '@taquito/utils'; // Return the operation hash of a signed operation
18
- import { encodeExpr } from '@taquito/utils'; // Hash a string using the BLAKE2b algorithm, base58 encode the hash obtained and appends the prefix 'expr' to it
19
- import { getPkhfromPk } from '@taquito/utils'; // Returns Tezos address (PKH) of a given Public Key
197
+ import { encodePubKey } from '@taquito/utils';
198
+
199
+ console.log(encodePubKey('0000e96b9f8b19af9c7ffa0c0480e1977b295850961f'));
200
+ // output: tz1gvF4cD2dDtqitL3ZTraggSR1Mju2BKFEM
201
+
202
+ console.log(encodePubKey('01f9b689a478253793bd92357c5e08e5ebcd8db47600'));
203
+ // output: KT1XM8VUFBiM9AC5czWU15fEeE9nmuEYWt3Y
20
204
  ```
21
205
 
22
- See the top-level [https://github.com/ecadlabs/taquito](https://github.com/ecadlabs/taquito) file for details on reporting issues, contributing and versioning.
206
+ **Base58 decode a string with a predefined prefix**
207
+
208
+ ```ts
209
+ import { b58decode } from '@taquito/utils';
210
+
211
+ console.log(b58decode('tz1gvF4cD2dDtqitL3ZTraggSR1Mju2BKFEM'));
212
+ // output: 0000e96b9f8b19af9c7ffa0c0480e1977b295850961f
213
+ ```
214
+
215
+ **Base58 decode a string and remove the prefix from it**
216
+
217
+ ```ts
218
+ import { b58cdecode, prefix, Prefix } from '@taquito/utils';
219
+
220
+ console.log(b58cdecode('tz1gvF4cD2dDtqitL3ZTraggSR1Mju2BKFEM', prefix[Prefix.TZ1]));
221
+ // output: <Buffer e9 6b 9f 8b 19 af 9c 7f fa 0c 04 80 e1 97 7b 29 58 50 96 1f>
222
+ ```
223
+
224
+ **Base58 encode a string or a Uint8Array and append a prefix to it**
225
+
226
+ ```ts
227
+ import { b58cencode } from '@taquito/utils';
228
+
229
+ console.log(b58cdecode('e96b9f8b19af9c7ffa0c0480e1977b295850961f', prefix[Prefix.TZ1]));
230
+ // output: tz1gvF4cD2dDtqitL3ZTraggSR1Mju2BKFEM
231
+ ```
232
+
233
+ **Return the operation hash of a signed operation**
234
+
235
+ ```ts
236
+ import { encodeOpHash } from '@taquito/utils';
237
+
238
+ const opBytesSigned = '0f185d8a30061e8134c162dbb7a6c3ab8f5fdb153363ccd6149b49a33481156a6c00b2e19a9e74440d86c59f13dab8a18ff873e889eaa304ab05da13000001f1585a7384f36e45fb43dc37e8ce172bced3e05700ff0000000002002110c033f3a990c2e46a3d6054ecc2f74072aae7a34b5ac4d9ce9edc11c2410a97695682108951786f05b361da03b97245dc9897e1955e08b5b8d9e153b0bdeb0d';
239
+ console.log(encodeOpHash(opBytesSigned));
240
+ // output: opapqvVXmebRTCFd2GQFydr4tJj3V5QocQuTmuhbatcHm4Seo2t
241
+ ```
242
+
243
+ **Generate expression hash**
244
+
245
+ Hash a string using the BLAKE2b algorithm, base58 encode the hash obtained and append the prefix 'expr' to it.
246
+
247
+ ```ts
248
+ import { encodeExpr } from '@taquito/utils';
249
+
250
+ console.log(encodeExpr('050a000000160000b2e19a9e74440d86c59f13dab8a18ff873e889ea'));
251
+
252
+ // output: exprv6UsC1sN3Fk2XfgcJCL8NCerP5rCGy1PRESZAqr7L2JdzX55EN
253
+ ```
254
+
255
+ **Obtain the public key hash given a public key**
256
+
257
+ ```ts
258
+ import { getPkhfromPk } from '@taquito/utils';
259
+
260
+ const publicKey = 'sppk7czKu6So3zDWjhBPBv9wgCrBAfbEFoKYzEaKUsjhNr5Ug6E4Sn1';
261
+ console.log(getPkhfromPk(publicKey));
262
+ // output: 'tz2Gsf1Q857wUzkNGzHsJNC98z881UutMwjg
263
+ ```
23
264
 
24
- ## API Documentation
265
+ ## Additional info
25
266
 
26
- TypeDoc style documentation is available on-line [here](https://tezostaquito.io/typedoc/modules/_taquito_utils.html)
267
+ See the top-level [https://github.com/ecadlabs/taquito](https://github.com/ecadlabs/taquito) file for details on reporting issues, contributing, and versioning.
27
268
 
28
269
  ## Disclaimer
29
270
 
@@ -1,5 +1,4 @@
1
1
  "use strict";
2
- var _a, _b;
3
2
  Object.defineProperty(exports, "__esModule", { value: true });
4
3
  exports.prefixLength = exports.prefix = exports.Prefix = void 0;
5
4
  var Prefix;
@@ -25,7 +24,7 @@ var Prefix;
25
24
  Prefix["SIG"] = "sig";
26
25
  Prefix["NET"] = "Net";
27
26
  Prefix["NCE"] = "nce";
28
- Prefix["B"] = "b";
27
+ Prefix["B"] = "B";
29
28
  Prefix["O"] = "o";
30
29
  Prefix["LO"] = "Lo";
31
30
  Prefix["LLO"] = "LLo";
@@ -35,55 +34,55 @@ var Prefix;
35
34
  Prefix["EXPR"] = "expr";
36
35
  Prefix["TZ"] = "TZ";
37
36
  })(Prefix = exports.Prefix || (exports.Prefix = {}));
38
- exports.prefix = (_a = {},
39
- _a[Prefix.TZ1] = new Uint8Array([6, 161, 159]),
40
- _a[Prefix.TZ2] = new Uint8Array([6, 161, 161]),
41
- _a[Prefix.TZ3] = new Uint8Array([6, 161, 164]),
42
- _a[Prefix.KT] = new Uint8Array([2, 90, 121]),
43
- _a[Prefix.KT1] = new Uint8Array([2, 90, 121]),
44
- _a[Prefix.EDSK] = new Uint8Array([43, 246, 78, 7]),
45
- _a[Prefix.EDSK2] = new Uint8Array([13, 15, 58, 7]),
46
- _a[Prefix.SPSK] = new Uint8Array([17, 162, 224, 201]),
47
- _a[Prefix.P2SK] = new Uint8Array([16, 81, 238, 189]),
48
- _a[Prefix.EDPK] = new Uint8Array([13, 15, 37, 217]),
49
- _a[Prefix.SPPK] = new Uint8Array([3, 254, 226, 86]),
50
- _a[Prefix.P2PK] = new Uint8Array([3, 178, 139, 127]),
51
- _a[Prefix.EDESK] = new Uint8Array([7, 90, 60, 179, 41]),
52
- _a[Prefix.SPESK] = new Uint8Array([0x09, 0xed, 0xf1, 0xae, 0x96]),
53
- _a[Prefix.P2ESK] = new Uint8Array([0x09, 0x30, 0x39, 0x73, 0xab]),
54
- _a[Prefix.EDSIG] = new Uint8Array([9, 245, 205, 134, 18]),
55
- _a[Prefix.SPSIG] = new Uint8Array([13, 115, 101, 19, 63]),
56
- _a[Prefix.P2SIG] = new Uint8Array([54, 240, 44, 52]),
57
- _a[Prefix.SIG] = new Uint8Array([4, 130, 43]),
58
- _a[Prefix.NET] = new Uint8Array([87, 82, 0]),
59
- _a[Prefix.NCE] = new Uint8Array([69, 220, 169]),
60
- _a[Prefix.B] = new Uint8Array([1, 52]),
61
- _a[Prefix.O] = new Uint8Array([5, 116]),
62
- _a[Prefix.LO] = new Uint8Array([133, 233]),
63
- _a[Prefix.LLO] = new Uint8Array([29, 159, 109]),
64
- _a[Prefix.P] = new Uint8Array([2, 170]),
65
- _a[Prefix.CO] = new Uint8Array([79, 179]),
66
- _a[Prefix.ID] = new Uint8Array([153, 103]),
67
- _a[Prefix.EXPR] = new Uint8Array([13, 44, 64, 27]),
37
+ exports.prefix = {
38
+ [Prefix.TZ1]: new Uint8Array([6, 161, 159]),
39
+ [Prefix.TZ2]: new Uint8Array([6, 161, 161]),
40
+ [Prefix.TZ3]: new Uint8Array([6, 161, 164]),
41
+ [Prefix.KT]: new Uint8Array([2, 90, 121]),
42
+ [Prefix.KT1]: new Uint8Array([2, 90, 121]),
43
+ [Prefix.EDSK]: new Uint8Array([43, 246, 78, 7]),
44
+ [Prefix.EDSK2]: new Uint8Array([13, 15, 58, 7]),
45
+ [Prefix.SPSK]: new Uint8Array([17, 162, 224, 201]),
46
+ [Prefix.P2SK]: new Uint8Array([16, 81, 238, 189]),
47
+ [Prefix.EDPK]: new Uint8Array([13, 15, 37, 217]),
48
+ [Prefix.SPPK]: new Uint8Array([3, 254, 226, 86]),
49
+ [Prefix.P2PK]: new Uint8Array([3, 178, 139, 127]),
50
+ [Prefix.EDESK]: new Uint8Array([7, 90, 60, 179, 41]),
51
+ [Prefix.SPESK]: new Uint8Array([0x09, 0xed, 0xf1, 0xae, 0x96]),
52
+ [Prefix.P2ESK]: new Uint8Array([0x09, 0x30, 0x39, 0x73, 0xab]),
53
+ [Prefix.EDSIG]: new Uint8Array([9, 245, 205, 134, 18]),
54
+ [Prefix.SPSIG]: new Uint8Array([13, 115, 101, 19, 63]),
55
+ [Prefix.P2SIG]: new Uint8Array([54, 240, 44, 52]),
56
+ [Prefix.SIG]: new Uint8Array([4, 130, 43]),
57
+ [Prefix.NET]: new Uint8Array([87, 82, 0]),
58
+ [Prefix.NCE]: new Uint8Array([69, 220, 169]),
59
+ [Prefix.B]: new Uint8Array([1, 52]),
60
+ [Prefix.O]: new Uint8Array([5, 116]),
61
+ [Prefix.LO]: new Uint8Array([133, 233]),
62
+ [Prefix.LLO]: new Uint8Array([29, 159, 109]),
63
+ [Prefix.P]: new Uint8Array([2, 170]),
64
+ [Prefix.CO]: new Uint8Array([79, 179]),
65
+ [Prefix.ID]: new Uint8Array([153, 103]),
66
+ [Prefix.EXPR]: new Uint8Array([13, 44, 64, 27]),
68
67
  // Legacy prefix
69
- _a[Prefix.TZ] = new Uint8Array([2, 90, 121]),
70
- _a);
71
- exports.prefixLength = (_b = {},
72
- _b[Prefix.TZ1] = 20,
73
- _b[Prefix.TZ2] = 20,
74
- _b[Prefix.TZ3] = 20,
75
- _b[Prefix.KT] = 20,
76
- _b[Prefix.KT1] = 20,
77
- _b[Prefix.EDPK] = 32,
78
- _b[Prefix.SPPK] = 33,
79
- _b[Prefix.P2PK] = 33,
80
- _b[Prefix.EDSIG] = 64,
81
- _b[Prefix.SPSIG] = 64,
82
- _b[Prefix.P2SIG] = 64,
83
- _b[Prefix.SIG] = 64,
84
- _b[Prefix.NET] = 4,
85
- _b[Prefix.B] = 32,
86
- _b[Prefix.P] = 32,
87
- _b[Prefix.O] = 32,
88
- _b);
68
+ [Prefix.TZ]: new Uint8Array([2, 90, 121]),
69
+ };
70
+ exports.prefixLength = {
71
+ [Prefix.TZ1]: 20,
72
+ [Prefix.TZ2]: 20,
73
+ [Prefix.TZ3]: 20,
74
+ [Prefix.KT]: 20,
75
+ [Prefix.KT1]: 20,
76
+ [Prefix.EDPK]: 32,
77
+ [Prefix.SPPK]: 33,
78
+ [Prefix.P2PK]: 33,
79
+ [Prefix.EDSIG]: 64,
80
+ [Prefix.SPSIG]: 64,
81
+ [Prefix.P2SIG]: 64,
82
+ [Prefix.SIG]: 64,
83
+ [Prefix.NET]: 4,
84
+ [Prefix.B]: 32,
85
+ [Prefix.P]: 32,
86
+ [Prefix.O]: 32
87
+ };
89
88
  //# sourceMappingURL=constants.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":";;;;AAAA,IAAY,MAqCX;AArCD,WAAY,MAAM;IAChB,qBAAW,CAAA;IACX,qBAAW,CAAA;IACX,qBAAW,CAAA;IACX,mBAAS,CAAA;IACT,qBAAW,CAAA;IAEX,yBAAe,CAAA;IACf,uBAAa,CAAA;IACb,uBAAa,CAAA;IAEb,uBAAa,CAAA;IACb,uBAAa,CAAA;IACb,uBAAa,CAAA;IAEb,yBAAe,CAAA;IACf,yBAAe,CAAA;IACf,yBAAe,CAAA;IAEf,uBAAa,CAAA;IACb,yBAAe,CAAA;IACf,yBAAe,CAAA;IACf,yBAAe,CAAA;IACf,qBAAW,CAAA;IAEX,qBAAW,CAAA;IACX,qBAAW,CAAA;IACX,iBAAO,CAAA;IACP,iBAAO,CAAA;IACP,mBAAS,CAAA;IACT,qBAAW,CAAA;IACX,iBAAO,CAAA;IACP,mBAAS,CAAA;IACT,mBAAS,CAAA;IAET,uBAAa,CAAA;IACb,mBAAS,CAAA;AACX,CAAC,EArCW,MAAM,GAAN,cAAM,KAAN,cAAM,QAqCjB;AAEY,QAAA,MAAM;IACjB,GAAC,MAAM,CAAC,GAAG,IAAG,IAAI,UAAU,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;IAC3C,GAAC,MAAM,CAAC,GAAG,IAAG,IAAI,UAAU,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;IAC3C,GAAC,MAAM,CAAC,GAAG,IAAG,IAAI,UAAU,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;IAC3C,GAAC,MAA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,28 +1,76 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.InvalidMessageError = exports.InvalidSignatureError = exports.InvalidPublicKeyError = void 0;
4
- var InvalidPublicKeyError = /** @class */ (function () {
5
- function InvalidPublicKeyError(message) {
3
+ exports.InvalidOperationHashError = exports.InvalidProtocolHashError = exports.InvalidBlockHashError = exports.InvalidKeyHashError = exports.InvalidAddressError = exports.InvalidContractAddressError = exports.InvalidMessageError = exports.InvalidSignatureError = exports.InvalidPublicKeyError = void 0;
4
+ class InvalidPublicKeyError extends Error {
5
+ constructor(message) {
6
+ super(message);
6
7
  this.message = message;
7
8
  this.name = 'InvalidPublicKeyError';
8
9
  }
9
- return InvalidPublicKeyError;
10
- }());
10
+ }
11
11
  exports.InvalidPublicKeyError = InvalidPublicKeyError;
12
- var InvalidSignatureError = /** @class */ (function () {
13
- function InvalidSignatureError(message) {
12
+ class InvalidSignatureError extends Error {
13
+ constructor(message) {
14
+ super(message);
14
15
  this.message = message;
15
16
  this.name = 'InvalidSignatureError';
16
17
  }
17
- return InvalidSignatureError;
18
- }());
18
+ }
19
19
  exports.InvalidSignatureError = InvalidSignatureError;
20
- var InvalidMessageError = /** @class */ (function () {
21
- function InvalidMessageError(message) {
20
+ class InvalidMessageError extends Error {
21
+ constructor(message) {
22
+ super(message);
22
23
  this.message = message;
23
24
  this.name = 'InvalidMessageError';
24
25
  }
25
- return InvalidMessageError;
26
- }());
26
+ }
27
27
  exports.InvalidMessageError = InvalidMessageError;
28
+ class InvalidContractAddressError extends Error {
29
+ constructor(message) {
30
+ super(message);
31
+ this.message = message;
32
+ this.name = 'InvalidContractAddressError';
33
+ }
34
+ }
35
+ exports.InvalidContractAddressError = InvalidContractAddressError;
36
+ class InvalidAddressError extends Error {
37
+ constructor(message) {
38
+ super(message);
39
+ this.message = message;
40
+ this.name = 'InvalidAddressError';
41
+ }
42
+ }
43
+ exports.InvalidAddressError = InvalidAddressError;
44
+ class InvalidKeyHashError extends Error {
45
+ constructor(message) {
46
+ super(message);
47
+ this.message = message;
48
+ this.name = 'InvalidKeyHashError';
49
+ }
50
+ }
51
+ exports.InvalidKeyHashError = InvalidKeyHashError;
52
+ class InvalidBlockHashError extends Error {
53
+ constructor(message) {
54
+ super(message);
55
+ this.message = message;
56
+ this.name = 'InvalidBlockHashError';
57
+ }
58
+ }
59
+ exports.InvalidBlockHashError = InvalidBlockHashError;
60
+ class InvalidProtocolHashError extends Error {
61
+ constructor(message) {
62
+ super(message);
63
+ this.message = message;
64
+ this.name = 'InvalidProtocolHashError';
65
+ }
66
+ }
67
+ exports.InvalidProtocolHashError = InvalidProtocolHashError;
68
+ class InvalidOperationHashError extends Error {
69
+ constructor(message) {
70
+ super(message);
71
+ this.message = message;
72
+ this.name = 'InvalidOperationHashError';
73
+ }
74
+ }
75
+ exports.InvalidOperationHashError = InvalidOperationHashError;
28
76
  //# sourceMappingURL=errors.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"errors.js","sourceRoot":"","sources":["../../src/errors.ts"],"names":[],"mappings":";;;AAAA;IAEI,+BAAmB,OAAe;QAAf,YAAO,GAAP,OAAO,CAAQ;QAD3B,SAAI,GAAW,uBAAuB,CAAC;IACT,CAAC;IACxC,4BAAC;AAAD,CAAC,AAHH,IAGG;AAHU,sDAAqB;AAKhC;IAEE,+BAAmB,OAAe;QAAf,YAAO,GAAP,OAAO,CAAQ;QAD3B,SAAI,GAAW,uBAAuB,CAAC;IACT,CAAC;IACxC,4BAAC;AAAD,CAAC,AAHD,IAGC;AAHY,sDAAqB;AAKlC;IAEE,6BAAmB,OAAe;QAAf,YAAO,GAAP,OAAO,CAAQ;QAD3B,SAAI,GAAW,qBAAqB,CAAC;IACP,CAAC;IACxC,0BAAC;AAAD,CAAC,AAHD,IAGC;AAHY,kDAAmB"}
1
+ {"version":3,"file":"errors.js","sourceRoot":"","sources":["../../src/errors.ts"],"names":[],"mappings":";;;AAAA,MAAa,qBAAsB,SAAQ,KAAK;IAE9C,Y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