@actioncodes/protocol 1.0.2 → 1.0.3

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.
@@ -6,7 +6,7 @@
6
6
 
7
7
  # Class: ActionCodesProtocol
8
8
 
9
- Defined in: [protocol.ts:31](https://github.com/otaprotocol/actioncodes/blob/6e0359c879f763df764595dbea0cb596eff80113/src/protocol.ts#L31)
9
+ Defined in: [protocol.ts:31](https://github.com/otaprotocol/actioncodes/blob/007a9e0d8a0303f8bd7d2ee1ee5ee3e0ff8d987c/src/protocol.ts#L31)
10
10
 
11
11
  OTA Protocol - Main entry point for the One-Time Action Code Protocol
12
12
 
@@ -19,7 +19,7 @@ action codes across multiple blockchain networks.
19
19
 
20
20
  > **new ActionCodesProtocol**(`config?`): `ActionCodesProtocol`
21
21
 
22
- Defined in: [protocol.ts:35](https://github.com/otaprotocol/actioncodes/blob/6e0359c879f763df764595dbea0cb596eff80113/src/protocol.ts#L35)
22
+ Defined in: [protocol.ts:35](https://github.com/otaprotocol/actioncodes/blob/007a9e0d8a0303f8bd7d2ee1ee5ee3e0ff8d987c/src/protocol.ts#L35)
23
23
 
24
24
  #### Parameters
25
25
 
@@ -37,7 +37,7 @@ Defined in: [protocol.ts:35](https://github.com/otaprotocol/actioncodes/blob/6e0
37
37
 
38
38
  > **attachTransaction**(`actionCode`, `transaction`, `txType?`): [`ActionCode`](../../actioncode/classes/ActionCode.md)
39
39
 
40
- Defined in: [protocol.ts:161](https://github.com/otaprotocol/actioncodes/blob/6e0359c879f763df764595dbea0cb596eff80113/src/protocol.ts#L161)
40
+ Defined in: [protocol.ts:161](https://github.com/otaprotocol/actioncodes/blob/007a9e0d8a0303f8bd7d2ee1ee5ee3e0ff8d987c/src/protocol.ts#L161)
41
41
 
42
42
  Attach a transaction to an action code
43
43
 
@@ -73,7 +73,7 @@ Updated ActionCode
73
73
 
74
74
  > **createActionCode**(`pubkey`, `signFn`, `chain`, `prefix`, `timestamp?`): `Promise`\<[`ActionCode`](../../actioncode/classes/ActionCode.md)\>
75
75
 
76
- Defined in: [protocol.ts:111](https://github.com/otaprotocol/actioncodes/blob/6e0359c879f763df764595dbea0cb596eff80113/src/protocol.ts#L111)
76
+ Defined in: [protocol.ts:111](https://github.com/otaprotocol/actioncodes/blob/007a9e0d8a0303f8bd7d2ee1ee5ee3e0ff8d987c/src/protocol.ts#L111)
77
77
 
78
78
  Create an action code
79
79
 
@@ -121,7 +121,7 @@ Promise resolving to a complete ActionCode object
121
121
 
122
122
  > **createProtocolMeta**(`actionCode`, `issuer?`, `params?`): [`ProtocolMetaV1`](../../meta/interfaces/ProtocolMetaV1.md)
123
123
 
124
- Defined in: [protocol.ts:226](https://github.com/otaprotocol/actioncodes/blob/6e0359c879f763df764595dbea0cb596eff80113/src/protocol.ts#L226)
124
+ Defined in: [protocol.ts:226](https://github.com/otaprotocol/actioncodes/blob/007a9e0d8a0303f8bd7d2ee1ee5ee3e0ff8d987c/src/protocol.ts#L226)
125
125
 
126
126
  Create protocol meta for a transaction
127
127
 
@@ -157,7 +157,7 @@ ProtocolMetaV1 object
157
157
 
158
158
  > **decodeProtocolMeta**(`transaction`, `chain`): `null` \| [`ProtocolMetaV1`](../../meta/interfaces/ProtocolMetaV1.md)
159
159
 
160
- Defined in: [protocol.ts:260](https://github.com/otaprotocol/actioncodes/blob/6e0359c879f763df764595dbea0cb596eff80113/src/protocol.ts#L260)
160
+ Defined in: [protocol.ts:260](https://github.com/otaprotocol/actioncodes/blob/007a9e0d8a0303f8bd7d2ee1ee5ee3e0ff8d987c/src/protocol.ts#L260)
161
161
 
162
162
  Decode protocol meta from a transaction
163
163
 
@@ -187,7 +187,7 @@ Decoded ProtocolMetaV1 or null
187
187
 
188
188
  > **decodeProtocolMetaTyped**\<`T`\>(`transaction`, `chain`): `null` \| [`ProtocolMetaV1`](../../meta/interfaces/ProtocolMetaV1.md)
189
189
 
190
- Defined in: [protocol.ts:341](https://github.com/otaprotocol/actioncodes/blob/6e0359c879f763df764595dbea0cb596eff80113/src/protocol.ts#L341)
190
+ Defined in: [protocol.ts:341](https://github.com/otaprotocol/actioncodes/blob/007a9e0d8a0303f8bd7d2ee1ee5ee3e0ff8d987c/src/protocol.ts#L341)
191
191
 
192
192
  Decode protocol meta with type safety
193
193
 
@@ -223,7 +223,7 @@ Decoded ProtocolMetaV1 or null
223
223
 
224
224
  > **detectTampering**\<`T`\>(`transaction`, `chain`, `authorities`, `expectedPrefix?`): `boolean`
225
225
 
226
- Defined in: [protocol.ts:321](https://github.com/otaprotocol/actioncodes/blob/6e0359c879f763df764595dbea0cb596eff80113/src/protocol.ts#L321)
226
+ Defined in: [protocol.ts:321](https://github.com/otaprotocol/actioncodes/blob/007a9e0d8a0303f8bd7d2ee1ee5ee3e0ff8d987c/src/protocol.ts#L321)
227
227
 
228
228
  Detect tampered transactions with type safety
229
229
 
@@ -271,7 +271,7 @@ True if transaction is valid and not tampered
271
271
 
272
272
  > **encodeProtocolMeta**(`meta`, `chain`): `any`
273
273
 
274
- Defined in: [protocol.ts:245](https://github.com/otaprotocol/actioncodes/blob/6e0359c879f763df764595dbea0cb596eff80113/src/protocol.ts#L245)
274
+ Defined in: [protocol.ts:245](https://github.com/otaprotocol/actioncodes/blob/007a9e0d8a0303f8bd7d2ee1ee5ee3e0ff8d987c/src/protocol.ts#L245)
275
275
 
276
276
  Encode protocol meta for a specific chain
277
277
 
@@ -301,7 +301,7 @@ Chain-specific encoded meta
301
301
 
302
302
  > **finalizeActionCode**(`actionCode`, `txSignature`): [`ActionCode`](../../actioncode/classes/ActionCode.md)
303
303
 
304
- Defined in: [protocol.ts:194](https://github.com/otaprotocol/actioncodes/blob/6e0359c879f763df764595dbea0cb596eff80113/src/protocol.ts#L194)
304
+ Defined in: [protocol.ts:194](https://github.com/otaprotocol/actioncodes/blob/007a9e0d8a0303f8bd7d2ee1ee5ee3e0ff8d987c/src/protocol.ts#L194)
305
305
 
306
306
  Finalize an action code with transaction signature
307
307
 
@@ -331,7 +331,7 @@ Updated ActionCode
331
331
 
332
332
  > **getChainAdapter**\<`T`\>(`chain`): `undefined` \| [`BaseChainAdapter`](../../adapters/base/classes/BaseChainAdapter.md)\<`T`\>
333
333
 
334
- Defined in: [protocol.ts:77](https://github.com/otaprotocol/actioncodes/blob/6e0359c879f763df764595dbea0cb596eff80113/src/protocol.ts#L77)
334
+ Defined in: [protocol.ts:77](https://github.com/otaprotocol/actioncodes/blob/007a9e0d8a0303f8bd7d2ee1ee5ee3e0ff8d987c/src/protocol.ts#L77)
335
335
 
336
336
  Get chain adapter with proper typing
337
337
 
@@ -361,7 +361,7 @@ Chain adapter or undefined
361
361
 
362
362
  > **getConfig**(): [`ProtocolConfig`](../interfaces/ProtocolConfig.md)
363
363
 
364
- Defined in: [protocol.ts:354](https://github.com/otaprotocol/actioncodes/blob/6e0359c879f763df764595dbea0cb596eff80113/src/protocol.ts#L354)
364
+ Defined in: [protocol.ts:354](https://github.com/otaprotocol/actioncodes/blob/007a9e0d8a0303f8bd7d2ee1ee5ee3e0ff8d987c/src/protocol.ts#L354)
365
365
 
366
366
  Get protocol configuration
367
367
 
@@ -377,7 +377,7 @@ Current protocol configuration
377
377
 
378
378
  > **getRegisteredChains**(): `string`[]
379
379
 
380
- Defined in: [protocol.ts:59](https://github.com/otaprotocol/actioncodes/blob/6e0359c879f763df764595dbea0cb596eff80113/src/protocol.ts#L59)
380
+ Defined in: [protocol.ts:59](https://github.com/otaprotocol/actioncodes/blob/007a9e0d8a0303f8bd7d2ee1ee5ee3e0ff8d987c/src/protocol.ts#L59)
381
381
 
382
382
  Get registered chain adapters
383
383
 
@@ -393,7 +393,7 @@ Array of registered chain identifiers
393
393
 
394
394
  > **isChainSupported**(`chain`): `boolean`
395
395
 
396
- Defined in: [protocol.ts:68](https://github.com/otaprotocol/actioncodes/blob/6e0359c879f763df764595dbea0cb596eff80113/src/protocol.ts#L68)
396
+ Defined in: [protocol.ts:68](https://github.com/otaprotocol/actioncodes/blob/007a9e0d8a0303f8bd7d2ee1ee5ee3e0ff8d987c/src/protocol.ts#L68)
397
397
 
398
398
  Check if a chain is supported
399
399
 
@@ -417,7 +417,7 @@ True if chain is supported
417
417
 
418
418
  > **registerAdapter**\<`T`\>(`adapter`): `void`
419
419
 
420
- Defined in: [protocol.ts:51](https://github.com/otaprotocol/actioncodes/blob/6e0359c879f763df764595dbea0cb596eff80113/src/protocol.ts#L51)
420
+ Defined in: [protocol.ts:51](https://github.com/otaprotocol/actioncodes/blob/007a9e0d8a0303f8bd7d2ee1ee5ee3e0ff8d987c/src/protocol.ts#L51)
421
421
 
422
422
  Register a chain adapter
423
423
 
@@ -445,7 +445,7 @@ Chain adapter implementation
445
445
 
446
446
  > **updateConfig**(`updates`): `void`
447
447
 
448
- Defined in: [protocol.ts:362](https://github.com/otaprotocol/actioncodes/blob/6e0359c879f763df764595dbea0cb596eff80113/src/protocol.ts#L362)
448
+ Defined in: [protocol.ts:362](https://github.com/otaprotocol/actioncodes/blob/007a9e0d8a0303f8bd7d2ee1ee5ee3e0ff8d987c/src/protocol.ts#L362)
449
449
 
450
450
  Update protocol configuration
451
451
 
@@ -467,7 +467,7 @@ Configuration updates
467
467
 
468
468
  > **validateActionCode**(`actionCode`): `boolean`
469
469
 
470
- Defined in: [protocol.ts:86](https://github.com/otaprotocol/actioncodes/blob/6e0359c879f763df764595dbea0cb596eff80113/src/protocol.ts#L86)
470
+ Defined in: [protocol.ts:86](https://github.com/otaprotocol/actioncodes/blob/007a9e0d8a0303f8bd7d2ee1ee5ee3e0ff8d987c/src/protocol.ts#L86)
471
471
 
472
472
  Validate an action code
473
473
 
@@ -491,7 +491,7 @@ True if valid
491
491
 
492
492
  > **validateTransaction**(`transaction`, `chain`, `authorities`, `expectedPrefix?`): `boolean`
493
493
 
494
- Defined in: [protocol.ts:277](https://github.com/otaprotocol/actioncodes/blob/6e0359c879f763df764595dbea0cb596eff80113/src/protocol.ts#L277)
494
+ Defined in: [protocol.ts:277](https://github.com/otaprotocol/actioncodes/blob/007a9e0d8a0303f8bd7d2ee1ee5ee3e0ff8d987c/src/protocol.ts#L277)
495
495
 
496
496
  Validate a transaction with protocol meta
497
497
 
@@ -533,7 +533,7 @@ True if transaction is valid
533
533
 
534
534
  > **validateTransactionTyped**\<`T`\>(`transaction`, `chain`, `authorities`, `expectedPrefix?`): `boolean`
535
535
 
536
- Defined in: [protocol.ts:299](https://github.com/otaprotocol/actioncodes/blob/6e0359c879f763df764595dbea0cb596eff80113/src/protocol.ts#L299)
536
+ Defined in: [protocol.ts:299](https://github.com/otaprotocol/actioncodes/blob/007a9e0d8a0303f8bd7d2ee1ee5ee3e0ff8d987c/src/protocol.ts#L299)
537
537
 
538
538
  Type-safe transaction validation for specific chains
539
539
 
@@ -581,7 +581,7 @@ True if transaction is valid
581
581
 
582
582
  > `static` **create**(): `ActionCodesProtocol`
583
583
 
584
- Defined in: [protocol.ts:370](https://github.com/otaprotocol/actioncodes/blob/6e0359c879f763df764595dbea0cb596eff80113/src/protocol.ts#L370)
584
+ Defined in: [protocol.ts:370](https://github.com/otaprotocol/actioncodes/blob/007a9e0d8a0303f8bd7d2ee1ee5ee3e0ff8d987c/src/protocol.ts#L370)
585
585
 
586
586
  Create a new protocol instance with default configuration
587
587
 
@@ -597,7 +597,7 @@ New protocol instance
597
597
 
598
598
  > `static` **createWithConfig**(`config`): `ActionCodesProtocol`
599
599
 
600
- Defined in: [protocol.ts:379](https://github.com/otaprotocol/actioncodes/blob/6e0359c879f763df764595dbea0cb596eff80113/src/protocol.ts#L379)
600
+ Defined in: [protocol.ts:379](https://github.com/otaprotocol/actioncodes/blob/007a9e0d8a0303f8bd7d2ee1ee5ee3e0ff8d987c/src/protocol.ts#L379)
601
601
 
602
602
  Create a new protocol instance with custom configuration
603
603
 
@@ -6,7 +6,7 @@
6
6
 
7
7
  # Interface: ProtocolConfig
8
8
 
9
- Defined in: [protocol.ts:10](https://github.com/otaprotocol/actioncodes/blob/6e0359c879f763df764595dbea0cb596eff80113/src/protocol.ts#L10)
9
+ Defined in: [protocol.ts:10](https://github.com/otaprotocol/actioncodes/blob/007a9e0d8a0303f8bd7d2ee1ee5ee3e0ff8d987c/src/protocol.ts#L10)
10
10
 
11
11
  OTA Protocol Configuration
12
12
 
@@ -16,7 +16,7 @@ OTA Protocol Configuration
16
16
 
17
17
  > **codeLength**: `number`
18
18
 
19
- Defined in: [protocol.ts:18](https://github.com/otaprotocol/actioncodes/blob/6e0359c879f763df764595dbea0cb596eff80113/src/protocol.ts#L18)
19
+ Defined in: [protocol.ts:18](https://github.com/otaprotocol/actioncodes/blob/007a9e0d8a0303f8bd7d2ee1ee5ee3e0ff8d987c/src/protocol.ts#L18)
20
20
 
21
21
  Code length in digits
22
22
 
@@ -26,7 +26,7 @@ Code length in digits
26
26
 
27
27
  > **codeTTL**: `number`
28
28
 
29
- Defined in: [protocol.ts:16](https://github.com/otaprotocol/actioncodes/blob/6e0359c879f763df764595dbea0cb596eff80113/src/protocol.ts#L16)
29
+ Defined in: [protocol.ts:16](https://github.com/otaprotocol/actioncodes/blob/007a9e0d8a0303f8bd7d2ee1ee5ee3e0ff8d987c/src/protocol.ts#L16)
30
30
 
31
31
  Code TTL in milliseconds
32
32
 
@@ -36,7 +36,7 @@ Code TTL in milliseconds
36
36
 
37
37
  > **defaultPrefix**: `string`
38
38
 
39
- Defined in: [protocol.ts:14](https://github.com/otaprotocol/actioncodes/blob/6e0359c879f763df764595dbea0cb596eff80113/src/protocol.ts#L14)
39
+ Defined in: [protocol.ts:14](https://github.com/otaprotocol/actioncodes/blob/007a9e0d8a0303f8bd7d2ee1ee5ee3e0ff8d987c/src/protocol.ts#L14)
40
40
 
41
41
  Default prefix for action codes
42
42
 
@@ -46,7 +46,7 @@ Default prefix for action codes
46
46
 
47
47
  > **maxPrefixLength**: `number`
48
48
 
49
- Defined in: [protocol.ts:20](https://github.com/otaprotocol/actioncodes/blob/6e0359c879f763df764595dbea0cb596eff80113/src/protocol.ts#L20)
49
+ Defined in: [protocol.ts:20](https://github.com/otaprotocol/actioncodes/blob/007a9e0d8a0303f8bd7d2ee1ee5ee3e0ff8d987c/src/protocol.ts#L20)
50
50
 
51
51
  Maximum prefix length
52
52
 
@@ -56,7 +56,7 @@ Maximum prefix length
56
56
 
57
57
  > **minPrefixLength**: `number`
58
58
 
59
- Defined in: [protocol.ts:22](https://github.com/otaprotocol/actioncodes/blob/6e0359c879f763df764595dbea0cb596eff80113/src/protocol.ts#L22)
59
+ Defined in: [protocol.ts:22](https://github.com/otaprotocol/actioncodes/blob/007a9e0d8a0303f8bd7d2ee1ee5ee3e0ff8d987c/src/protocol.ts#L22)
60
60
 
61
61
  Minimum prefix length
62
62
 
@@ -66,6 +66,6 @@ Minimum prefix length
66
66
 
67
67
  > **version**: `string`
68
68
 
69
- Defined in: [protocol.ts:12](https://github.com/otaprotocol/actioncodes/blob/6e0359c879f763df764595dbea0cb596eff80113/src/protocol.ts#L12)
69
+ Defined in: [protocol.ts:12](https://github.com/otaprotocol/actioncodes/blob/007a9e0d8a0303f8bd7d2ee1ee5ee3e0ff8d987c/src/protocol.ts#L12)
70
70
 
71
71
  Protocol version
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@actioncodes/protocol",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "description": "Action Codes Protocol",
5
5
  "main": "src/index.js",
6
6
  "types": "dist/index.d.ts",