@actioncodes/protocol 1.0.3 → 1.1.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.
Files changed (28) hide show
  1. package/dist/adapters/base.d.ts +10 -0
  2. package/dist/adapters/base.d.ts.map +1 -1
  3. package/dist/adapters/solana/solana.d.ts +7 -1
  4. package/dist/adapters/solana/solana.d.ts.map +1 -1
  5. package/dist/adapters/solana/solana.js +39 -0
  6. package/docs/actioncode/classes/ActionCode.md +23 -23
  7. package/docs/actioncode/interfaces/ActionCodeFields.md +11 -11
  8. package/docs/actioncode/interfaces/ActionCodeMetadata.md +3 -3
  9. package/docs/actioncode/interfaces/ActionCodeTransaction.md +4 -4
  10. package/docs/actioncode/type-aliases/ActionCodeStatus.md +1 -1
  11. package/docs/adapters/base/classes/BaseChainAdapter.md +38 -10
  12. package/docs/adapters/solana/solana/classes/SolanaAdapter.md +42 -12
  13. package/docs/adapters/solana/solana/type-aliases/SolanaTransaction.md +1 -1
  14. package/docs/codegen/classes/CodeGenerator.md +14 -14
  15. package/docs/constants/type-aliases/SupportedChain.md +1 -1
  16. package/docs/constants/variables/CODE_LENGTH.md +1 -1
  17. package/docs/constants/variables/CODE_TTL.md +1 -1
  18. package/docs/constants/variables/MAX_PREFIX_LENGTH.md +1 -1
  19. package/docs/constants/variables/MIN_PREFIX_LENGTH.md +1 -1
  20. package/docs/constants/variables/PROTOCOL_CODE_PREFIX.md +1 -1
  21. package/docs/constants/variables/PROTOCOL_PREFIX.md +1 -1
  22. package/docs/constants/variables/PROTOCOL_VERSION.md +1 -1
  23. package/docs/constants/variables/SUPPORTED_CHAINS.md +1 -1
  24. package/docs/meta/classes/ProtocolMetaParser.md +6 -6
  25. package/docs/meta/interfaces/ProtocolMetaV1.md +7 -7
  26. package/docs/protocol/classes/ActionCodesProtocol.md +21 -21
  27. package/docs/protocol/interfaces/ProtocolConfig.md +7 -7
  28. package/package.json +1 -1
@@ -65,5 +65,15 @@ export declare abstract class BaseChainAdapter<T = any> {
65
65
  * @returns True if the code signature is valid
66
66
  */
67
67
  abstract verifyCodeSignature(actionCode: ActionCode): boolean;
68
+ /**
69
+ * Sign the transaction with the protocol key using a callback approach
70
+ * This method should be implemented by each chain-specific adapter to handle
71
+ * the chain's specific signing mechanism asynchronously
72
+ * @param tx - Chain-specific transaction to sign
73
+ * @param protocolPrivateKey - Private key or Keypair object depending on the chain
74
+ * @param signCallback - Callback function that performs the actual signing
75
+ * @returns Promise that resolves to the signed transaction
76
+ */
77
+ abstract signWithProtocolKey(actionCode: ActionCode, key: any): Promise<ActionCode>;
68
78
  }
69
79
  //# sourceMappingURL=base.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../src/adapters/base.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAEzC;;;GAGG;AACH,8BAAsB,gBAAgB,CAAC,CAAC,GAAG,GAAG;IAC1C,QAAQ,CAAC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IAEhC;;;;OAIG;IACH,QAAQ,CAAC,MAAM,CAAC,IAAI,EAAE,cAAc,GAAG,GAAG;IAE1C;;;;OAIG;IACH,QAAQ,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC,GAAG,cAAc,GAAG,IAAI;IAE7C;;;;;;OAMG;IACH,QAAQ,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC,EAAE,WAAW,EAAE,MAAM,EAAE,EAAE,cAAc,CAAC,EAAE,MAAM,GAAG,OAAO;IAEjF;;;;;OAKG;IACH,QAAQ,CAAC,kBAAkB,CAAC,EAAE,EAAE,CAAC,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO;IAE3D;;;;;;OAMG;IACH,eAAe,CAAC,EAAE,EAAE,CAAC,EAAE,WAAW,EAAE,MAAM,EAAE,EAAE,cAAc,GAAE,M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AE,EAAE,CAAC,EAAE,IAAI,EAAE,cAAc,GAAG,OAAO;IAErF;;;;;;OAMG;IACH,uBAAuB,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,GAAE,MAA6B,GAAG,MAAM;IAIvG;;;;;;OAMG;IACH,QAAQ,CAAC,mBAAmB,CAAC,UAAU,EAAE,UAAU,GAAG,OAAO;IAE7D;;;;;;;;OAQG;IACH,QAAQ,CAAC,mBAAmB,CACxB,UAAU,EAAE,UAAU,EACtB,GAAG,EAAE,GAAG,GACT,OAAO,CAAC,UAAU,CAAC;CACzB"}
@@ -1,4 +1,4 @@
1
- import { Transaction, TransactionInstruction, VersionedTransaction } from '@solana/web3.js';
1
+ import { Transaction, TransactionInstruction, VersionedTransaction, Keypair } from '@solana/web3.js';
2
2
  import { ProtocolMetaV1 } from '../../meta';
3
3
  import { BaseChainAdapter } from '../base';
4
4
  import { ActionCode } from '../../actioncode';
@@ -82,5 +82,11 @@ export declare class SolanaAdapter extends BaseChainAdapter<SolanaTransaction> {
82
82
  */
83
83
  validateFromBase64(base64String: string, authorities: string[], expectedPrefix?: string): boolean;
84
84
  verifyCodeSignature(actionCode: ActionCode): boolean;
85
+ /**
86
+ * Sign the transaction with the protocol key using a callback approach
87
+ * @param signCallback - Callback function that performs the actual signing
88
+ * @returns Promise that resolves to the signed transaction
89
+ */
90
+ signWithProtocolKey(actionCode: ActionCode, key: Keypair): Promise<ActionCode>;
85
91
  }
86
92
  //# sourceMappingURL=solana.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"solana.d.ts","sourceRoot":"","sources":["../../../src/adapters/solana/solana.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,WAAW,EACX,sBAAsB,EACtB,oBAAoB,EAGvB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAAE,cAAc,EAAsB,MAAM,YAAY,CAAC;AAChE,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAE3C,OAAO,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AE,MAAM,GAAG,cAAc,GAAG,IAAI;IAgB7D;;;;;;OAMG;IACH,kBAAkB,CAAC,YAAY,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,EAAE,cAAc,GAAE,MAAkB,GAAG,OAAO;IAiBrG,mBAAmB,CAAC,UAAU,EAAE,UAAU,GAAG,OAAO;IAa3D;;;;OAIG;IACG,mBAAmB,CACrB,UAAU,EAAE,UAAU,EACtB,GAAG,EAAE,OAAO,GACb,OAAO,CAAC,UAAU,CAAC;CAkCzB"}
@@ -199,6 +199,12 @@ class SolanaAdapter extends base_1.BaseChainAdapter {
199
199
  if (!decodedMeta) {
200
200
  return false;
201
201
  }
202
+ if (!meta.iss) {
203
+ return false;
204
+ }
205
+ if (!this.hasIssuerSignature(tx, meta.iss)) {
206
+ return false;
207
+ }
202
208
  // Cross-check the decoded meta with the provided meta
203
209
  return (decodedMeta.version === meta.version &&
204
210
  decodedMeta.prefix === meta.prefix &&
@@ -265,6 +271,39 @@ class SolanaAdapter extends base_1.BaseChainAdapter {
265
271
  return false;
266
272
  }
267
273
  }
274
+ /**
275
+ * Sign the transaction with the protocol key using a callback approach
276
+ * @param signCallback - Callback function that performs the actual signing
277
+ * @returns Promise that resolves to the signed transaction
278
+ */
279
+ async signWithProtocolKey(actionCode, key) {
280
+ try {
281
+ if (!actionCode.transaction?.transaction) {
282
+ throw new Error('No transaction found');
283
+ }
284
+ const tx = web3_js_1.Transaction.from(buffer_1.Buffer.from(actionCode.transaction.transaction, 'base64'));
285
+ tx.partialSign(key);
286
+ const meta = this.decode(tx);
287
+ if (!meta) {
288
+ throw new Error('Invalid transaction, protocol meta not found');
289
+ }
290
+ if (!this.validateTransactionIntegrity(tx, meta)) {
291
+ throw new Error('Invalid transaction, transaction integrity not valid');
292
+ }
293
+ const newActionCode = Object.assign({}, actionCode, {
294
+ transaction: {
295
+ ...actionCode.transaction,
296
+ transaction: buffer_1.Buffer.from(tx.serialize({
297
+ requireAllSignatures: false
298
+ })).toString('base64'),
299
+ }
300
+ });
301
+ return newActionCode;
302
+ }
303
+ catch (error) {
304
+ throw new Error(`Failed to sign transaction with protocol key: ${error instanceof Error ? error.message : 'Unknown error'}`);
305
+ }
306
+ }
268
307
  }
269
308
  exports.SolanaAdapter = SolanaAdapter;
270
309
  SolanaAdapter.MEMO_PROGRAM_ID = spl_memo_1.MEMO_PROGRAM_ID;
@@ -6,7 +6,7 @@
6
6
 
7
7
  # Class: ActionCode
8
8
 
9
- Defined in: [actioncode.ts:32](https://github.com/otaprotocol/actioncodes/blob/007a9e0d8a0303f8bd7d2ee1ee5ee3e0ff8d987c/src/actioncode.ts#L32)
9
+ Defined in: [actioncode.ts:32](https://github.com/otaprotocol/actioncodes/blob/c724b443a380f5f43ae1dd1ddefb6b90efaa0aa5/src/actioncode.ts#L32)
10
10
 
11
11
  ## Constructors
12
12
 
@@ -14,7 +14,7 @@ Defined in: [actioncode.ts:32](https://github.com/otaprotocol/actioncodes/blob/0
14
14
 
15
15
  > **new ActionCode**(`fields`): `ActionCode`
16
16
 
17
- Defined in: [actioncode.ts:33](https://github.com/otaprotocol/actioncodes/blob/007a9e0d8a0303f8bd7d2ee1ee5ee3e0ff8d987c/src/actioncode.ts#L33)
17
+ Defined in: [actioncode.ts:33](https://github.com/otaprotocol/actioncodes/blob/c724b443a380f5f43ae1dd1ddefb6b90efaa0aa5/src/actioncode.ts#L33)
18
18
 
19
19
  #### Parameters
20
20
 
@@ -34,7 +34,7 @@ Defined in: [actioncode.ts:33](https://github.com/otaprotocol/actioncodes/blob/0
34
34
 
35
35
  > **get** **chain**(): `string`
36
36
 
37
- Defined in: [actioncode.ts:95](https://github.com/otaprotocol/actioncodes/blob/007a9e0d8a0303f8bd7d2ee1ee5ee3e0ff8d987c/src/actioncode.ts#L95)
37
+ Defined in: [actioncode.ts:95](https://github.com/otaprotocol/actioncodes/blob/c724b443a380f5f43ae1dd1ddefb6b90efaa0aa5/src/actioncode.ts#L95)
38
38
 
39
39
  Get the target chain for this action code
40
40
 
@@ -52,7 +52,7 @@ Chain identifier (e.g., "solana", "evm")
52
52
 
53
53
  > **get** **code**(): `string`
54
54
 
55
- Defined in: [actioncode.ts:111](https://github.com/otaprotocol/actioncodes/blob/007a9e0d8a0303f8bd7d2ee1ee5ee3e0ff8d987c/src/actioncode.ts#L111)
55
+ Defined in: [actioncode.ts:111](https://github.com/otaprotocol/actioncodes/blob/c724b443a380f5f43ae1dd1ddefb6b90efaa0aa5/src/actioncode.ts#L111)
56
56
 
57
57
  Get the action code string
58
58
 
@@ -70,7 +70,7 @@ The 8-character action code
70
70
 
71
71
  > **get** **codeHash**(): `string`
72
72
 
73
- Defined in: [actioncode.ts:217](https://github.com/otaprotocol/actioncodes/blob/007a9e0d8a0303f8bd7d2ee1ee5ee3e0ff8d987c/src/actioncode.ts#L217)
73
+ Defined in: [actioncode.ts:217](https://github.com/otaprotocol/actioncodes/blob/c724b443a380f5f43ae1dd1ddefb6b90efaa0aa5/src/actioncode.ts#L217)
74
74
 
75
75
  Get the code hash for this action code
76
76
  it is also used in the protocol meta as the code id
@@ -89,7 +89,7 @@ Code hash string
89
89
 
90
90
  > **get** **description**(): `undefined` \| `string`
91
91
 
92
- Defined in: [actioncode.ts:151](https://github.com/otaprotocol/actioncodes/blob/007a9e0d8a0303f8bd7d2ee1ee5ee3e0ff8d987c/src/actioncode.ts#L151)
92
+ Defined in: [actioncode.ts:151](https://github.com/otaprotocol/actioncodes/blob/c724b443a380f5f43ae1dd1ddefb6b90efaa0aa5/src/actioncode.ts#L151)
93
93
 
94
94
  Get a human-readable description of the action
95
95
 
@@ -107,7 +107,7 @@ Description string or undefined
107
107
 
108
108
  > **get** **displayString**(): `string`
109
109
 
110
- Defined in: [actioncode.ts:183](https://github.com/otaprotocol/actioncodes/blob/007a9e0d8a0303f8bd7d2ee1ee5ee3e0ff8d987c/src/actioncode.ts#L183)
110
+ Defined in: [actioncode.ts:183](https://github.com/otaprotocol/actioncodes/blob/c724b443a380f5f43ae1dd1ddefb6b90efaa0aa5/src/actioncode.ts#L183)
111
111
 
112
112
  Get a human-readable display string for the action code
113
113
 
@@ -125,7 +125,7 @@ Formatted display string
125
125
 
126
126
  > **get** **encoded**(): `string`
127
127
 
128
- Defined in: [actioncode.ts:47](https://github.com/otaprotocol/actioncodes/blob/007a9e0d8a0303f8bd7d2ee1ee5ee3e0ff8d987c/src/actioncode.ts#L47)
128
+ Defined in: [actioncode.ts:47](https://github.com/otaprotocol/actioncodes/blob/c724b443a380f5f43ae1dd1ddefb6b90efaa0aa5/src/actioncode.ts#L47)
129
129
 
130
130
  ##### Returns
131
131
 
@@ -139,7 +139,7 @@ Defined in: [actioncode.ts:47](https://github.com/otaprotocol/actioncodes/blob/0
139
139
 
140
140
  > **get** **expired**(): `boolean`
141
141
 
142
- Defined in: [actioncode.ts:87](https://github.com/otaprotocol/actioncodes/blob/007a9e0d8a0303f8bd7d2ee1ee5ee3e0ff8d987c/src/actioncode.ts#L87)
142
+ Defined in: [actioncode.ts:87](https://github.com/otaprotocol/actioncodes/blob/c724b443a380f5f43ae1dd1ddefb6b90efaa0aa5/src/actioncode.ts#L87)
143
143
 
144
144
  Check if the action code has expired
145
145
 
@@ -157,7 +157,7 @@ True if the code has expired
157
157
 
158
158
  > **get** **json**(): [`ActionCodeFields`](../interfaces/ActionCodeFields.md)
159
159
 
160
- Defined in: [actioncode.ts:68](https://github.com/otaprotocol/actioncodes/blob/007a9e0d8a0303f8bd7d2ee1ee5ee3e0ff8d987c/src/actioncode.ts#L68)
160
+ Defined in: [actioncode.ts:68](https://github.com/otaprotocol/actioncodes/blob/c724b443a380f5f43ae1dd1ddefb6b90efaa0aa5/src/actioncode.ts#L68)
161
161
 
162
162
  ##### Returns
163
163
 
@@ -171,7 +171,7 @@ Defined in: [actioncode.ts:68](https://github.com/otaprotocol/actioncodes/blob/0
171
171
 
172
172
  > **get** **metadata**(): `undefined` \| [`ActionCodeMetadata`](../interfaces/ActionCodeMetadata.md)
173
173
 
174
- Defined in: [actioncode.ts:143](https://github.com/otaprotocol/actioncodes/blob/007a9e0d8a0303f8bd7d2ee1ee5ee3e0ff8d987c/src/actioncode.ts#L143)
174
+ Defined in: [actioncode.ts:143](https://github.com/otaprotocol/actioncodes/blob/c724b443a380f5f43ae1dd1ddefb6b90efaa0aa5/src/actioncode.ts#L143)
175
175
 
176
176
  Get metadata associated with this action code
177
177
 
@@ -189,7 +189,7 @@ Metadata object or undefined
189
189
 
190
190
  > **get** **params**(): `undefined` \| `Record`\<`string`, `any`\>
191
191
 
192
- Defined in: [actioncode.ts:159](https://github.com/otaprotocol/actioncodes/blob/007a9e0d8a0303f8bd7d2ee1ee5ee3e0ff8d987c/src/actioncode.ts#L159)
192
+ Defined in: [actioncode.ts:159](https://github.com/otaprotocol/actioncodes/blob/c724b443a380f5f43ae1dd1ddefb6b90efaa0aa5/src/actioncode.ts#L159)
193
193
 
194
194
  Get parameters associated with this action
195
195
 
@@ -207,7 +207,7 @@ Parameters object or undefined
207
207
 
208
208
  > **get** **prefix**(): `string`
209
209
 
210
- Defined in: [actioncode.ts:119](https://github.com/otaprotocol/actioncodes/blob/007a9e0d8a0303f8bd7d2ee1ee5ee3e0ff8d987c/src/actioncode.ts#L119)
210
+ Defined in: [actioncode.ts:119](https://github.com/otaprotocol/actioncodes/blob/c724b443a380f5f43ae1dd1ddefb6b90efaa0aa5/src/actioncode.ts#L119)
211
211
 
212
212
  Get the prefix used for this action code
213
213
 
@@ -225,7 +225,7 @@ Normalized prefix
225
225
 
226
226
  > **get** **pubkey**(): `string`
227
227
 
228
- Defined in: [actioncode.ts:127](https://github.com/otaprotocol/actioncodes/blob/007a9e0d8a0303f8bd7d2ee1ee5ee3e0ff8d987c/src/actioncode.ts#L127)
228
+ Defined in: [actioncode.ts:127](https://github.com/otaprotocol/actioncodes/blob/c724b443a380f5f43ae1dd1ddefb6b90efaa0aa5/src/actioncode.ts#L127)
229
229
 
230
230
  Get the user's public key
231
231
 
@@ -243,7 +243,7 @@ User's public key
243
243
 
244
244
  > **get** **remainingTime**(): `number`
245
245
 
246
- Defined in: [actioncode.ts:78](https://github.com/otaprotocol/actioncodes/blob/007a9e0d8a0303f8bd7d2ee1ee5ee3e0ff8d987c/src/actioncode.ts#L78)
246
+ Defined in: [actioncode.ts:78](https://github.com/otaprotocol/actioncodes/blob/c724b443a380f5f43ae1dd1ddefb6b90efaa0aa5/src/actioncode.ts#L78)
247
247
 
248
248
  Get remaining time in milliseconds until expiration
249
249
 
@@ -261,7 +261,7 @@ Remaining time in milliseconds, or 0 if expired
261
261
 
262
262
  > **get** **remainingTimeString**(): `string`
263
263
 
264
- Defined in: [actioncode.ts:196](https://github.com/otaprotocol/actioncodes/blob/007a9e0d8a0303f8bd7d2ee1ee5ee3e0ff8d987c/src/actioncode.ts#L196)
264
+ Defined in: [actioncode.ts:196](https://github.com/otaprotocol/actioncodes/blob/c724b443a380f5f43ae1dd1ddefb6b90efaa0aa5/src/actioncode.ts#L196)
265
265
 
266
266
  Get a formatted time string showing remaining time
267
267
 
@@ -279,7 +279,7 @@ Human-readable time string (e.g., "1m 30s remaining")
279
279
 
280
280
  > **get** **signature**(): `string`
281
281
 
282
- Defined in: [actioncode.ts:175](https://github.com/otaprotocol/actioncodes/blob/007a9e0d8a0303f8bd7d2ee1ee5ee3e0ff8d987c/src/actioncode.ts#L175)
282
+ Defined in: [actioncode.ts:175](https://github.com/otaprotocol/actioncodes/blob/c724b443a380f5f43ae1dd1ddefb6b90efaa0aa5/src/actioncode.ts#L175)
283
283
 
284
284
  Get the user's signature
285
285
 
@@ -297,7 +297,7 @@ User's signature string
297
297
 
298
298
  > **get** **status**(): [`ActionCodeStatus`](../type-aliases/ActionCodeStatus.md)
299
299
 
300
- Defined in: [actioncode.ts:103](https://github.com/otaprotocol/actioncodes/blob/007a9e0d8a0303f8bd7d2ee1ee5ee3e0ff8d987c/src/actioncode.ts#L103)
300
+ Defined in: [actioncode.ts:103](https://github.com/otaprotocol/actioncodes/blob/c724b443a380f5f43ae1dd1ddefb6b90efaa0aa5/src/actioncode.ts#L103)
301
301
 
302
302
  Get the current status of the action code
303
303
 
@@ -315,7 +315,7 @@ Current status
315
315
 
316
316
  > **get** **timestamp**(): `number`
317
317
 
318
- Defined in: [actioncode.ts:167](https://github.com/otaprotocol/actioncodes/blob/007a9e0d8a0303f8bd7d2ee1ee5ee3e0ff8d987c/src/actioncode.ts#L167)
318
+ Defined in: [actioncode.ts:167](https://github.com/otaprotocol/actioncodes/blob/c724b443a380f5f43ae1dd1ddefb6b90efaa0aa5/src/actioncode.ts#L167)
319
319
 
320
320
  Get the timestamp when the code was generated
321
321
 
@@ -333,7 +333,7 @@ Timestamp in milliseconds
333
333
 
334
334
  > **get** **transaction**(): `undefined` \| [`ActionCodeTransaction`](../interfaces/ActionCodeTransaction.md)
335
335
 
336
- Defined in: [actioncode.ts:135](https://github.com/otaprotocol/actioncodes/blob/007a9e0d8a0303f8bd7d2ee1ee5ee3e0ff8d987c/src/actioncode.ts#L135)
336
+ Defined in: [actioncode.ts:135](https://github.com/otaprotocol/actioncodes/blob/c724b443a380f5f43ae1dd1ddefb6b90efaa0aa5/src/actioncode.ts#L135)
337
337
 
338
338
  Get the transaction data (chain-specific)
339
339
 
@@ -349,7 +349,7 @@ Transaction data or undefined
349
349
 
350
350
  > **isValid**(`protocol`): `boolean`
351
351
 
352
- Defined in: [actioncode.ts:51](https://github.com/otaprotocol/actioncodes/blob/007a9e0d8a0303f8bd7d2ee1ee5ee3e0ff8d987c/src/actioncode.ts#L51)
352
+ Defined in: [actioncode.ts:51](https://github.com/otaprotocol/actioncodes/blob/c724b443a380f5f43ae1dd1ddefb6b90efaa0aa5/src/actioncode.ts#L51)
353
353
 
354
354
  #### Parameters
355
355
 
@@ -367,7 +367,7 @@ Defined in: [actioncode.ts:51](https://github.com/otaprotocol/actioncodes/blob/0
367
367
 
368
368
  > `static` **fromEncoded**(`encoded`): `ActionCode`
369
369
 
370
- Defined in: [actioncode.ts:42](https://github.com/otaprotocol/actioncodes/blob/007a9e0d8a0303f8bd7d2ee1ee5ee3e0ff8d987c/src/actioncode.ts#L42)
370
+ Defined in: [actioncode.ts:42](https://github.com/otaprotocol/actioncodes/blob/c724b443a380f5f43ae1dd1ddefb6b90efaa0aa5/src/actioncode.ts#L42)
371
371
 
372
372
  #### Parameters
373
373
 
@@ -385,7 +385,7 @@ Defined in: [actioncode.ts:42](https://github.com/otaprotocol/actioncodes/blob/0
385
385
 
386
386
  > `static` **fromPayload**(`input`): `ActionCode`
387
387
 
388
- Defined in: [actioncode.ts:35](https://github.com/otaprotocol/actioncodes/blob/007a9e0d8a0303f8bd7d2ee1ee5ee3e0ff8d987c/src/actioncode.ts#L35)
388
+ Defined in: [actioncode.ts:35](https://github.com/otaprotocol/actioncodes/blob/c724b443a380f5f43ae1dd1ddefb6b90efaa0aa5/src/actioncode.ts#L35)
389
389
 
390
390
  #### Parameters
391
391
 
@@ -6,7 +6,7 @@
6
6
 
7
7
  # Interface: ActionCodeFields
8
8
 
9
- Defined in: [actioncode.ts:19](https://github.com/otaprotocol/actioncodes/blob/007a9e0d8a0303f8bd7d2ee1ee5ee3e0ff8d987c/src/actioncode.ts#L19)
9
+ Defined in: [actioncode.ts:19](https://github.com/otaprotocol/actioncodes/blob/c724b443a380f5f43ae1dd1ddefb6b90efaa0aa5/src/actioncode.ts#L19)
10
10
 
11
11
  ## Properties
12
12
 
@@ -14,7 +14,7 @@ Defined in: [actioncode.ts:19](https://github.com/otaprotocol/actioncodes/blob/0
14
14
 
15
15
  > **chain**: `"solana"`
16
16
 
17
- Defined in: [actioncode.ts:25](https://github.com/otaprotocol/actioncodes/blob/007a9e0d8a0303f8bd7d2ee1ee5ee3e0ff8d987c/src/actioncode.ts#L25)
17
+ Defined in: [actioncode.ts:25](https://github.com/otaprotocol/actioncodes/blob/c724b443a380f5f43ae1dd1ddefb6b90efaa0aa5/src/actioncode.ts#L25)
18
18
 
19
19
  ***
20
20
 
@@ -22,7 +22,7 @@ Defined in: [actioncode.ts:25](https://github.com/otaprotocol/actioncodes/blob/0
22
22
 
23
23
  > **code**: `string`
24
24
 
25
- Defined in: [actioncode.ts:20](https://github.com/otaprotocol/actioncodes/blob/007a9e0d8a0303f8bd7d2ee1ee5ee3e0ff8d987c/src/actioncode.ts#L20)
25
+ Defined in: [actioncode.ts:20](https://github.com/otaprotocol/actioncodes/blob/c724b443a380f5f43ae1dd1ddefb6b90efaa0aa5/src/actioncode.ts#L20)
26
26
 
27
27
  ***
28
28
 
@@ -30,7 +30,7 @@ Defined in: [actioncode.ts:20](https://github.com/otaprotocol/actioncodes/blob/0
30
30
 
31
31
  > **expiresAt**: `number`
32
32
 
33
- Defined in: [actioncode.ts:28](https://github.com/otaprotocol/actioncodes/blob/007a9e0d8a0303f8bd7d2ee1ee5ee3e0ff8d987c/src/actioncode.ts#L28)
33
+ Defined in: [actioncode.ts:28](https://github.com/otaprotocol/actioncodes/blob/c724b443a380f5f43ae1dd1ddefb6b90efaa0aa5/src/actioncode.ts#L28)
34
34
 
35
35
  ***
36
36
 
@@ -38,7 +38,7 @@ Defined in: [actioncode.ts:28](https://github.com/otaprotocol/actioncodes/blob/0
38
38
 
39
39
  > `optional` **metadata**: [`ActionCodeMetadata`](ActionCodeMetadata.md)
40
40
 
41
- Defined in: [actioncode.ts:27](https://github.com/otaprotocol/actioncodes/blob/007a9e0d8a0303f8bd7d2ee1ee5ee3e0ff8d987c/src/actioncode.ts#L27)
41
+ Defined in: [actioncode.ts:27](https://github.com/otaprotocol/actioncodes/blob/c724b443a380f5f43ae1dd1ddefb6b90efaa0aa5/src/actioncode.ts#L27)
42
42
 
43
43
  ***
44
44
 
@@ -46,7 +46,7 @@ Defined in: [actioncode.ts:27](https://github.com/otaprotocol/actioncodes/blob/0
46
46
 
47
47
  > **prefix**: `string`
48
48
 
49
- Defined in: [actioncode.ts:21](https://github.com/otaprotocol/actioncodes/blob/007a9e0d8a0303f8bd7d2ee1ee5ee3e0ff8d987c/src/actioncode.ts#L21)
49
+ Defined in: [actioncode.ts:21](https://github.com/otaprotocol/actioncodes/blob/c724b443a380f5f43ae1dd1ddefb6b90efaa0aa5/src/actioncode.ts#L21)
50
50
 
51
51
  ***
52
52
 
@@ -54,7 +54,7 @@ Defined in: [actioncode.ts:21](https://github.com/otaprotocol/actioncodes/blob/0
54
54
 
55
55
  > **pubkey**: `string`
56
56
 
57
- Defined in: [actioncode.ts:22](https://github.com/otaprotocol/actioncodes/blob/007a9e0d8a0303f8bd7d2ee1ee5ee3e0ff8d987c/src/actioncode.ts#L22)
57
+ Defined in: [actioncode.ts:22](https://github.com/otaprotocol/actioncodes/blob/c724b443a380f5f43ae1dd1ddefb6b90efaa0aa5/src/actioncode.ts#L22)
58
58
 
59
59
  ***
60
60
 
@@ -62,7 +62,7 @@ Defined in: [actioncode.ts:22](https://github.com/otaprotocol/actioncodes/blob/0
62
62
 
63
63
  > **signature**: `string`
64
64
 
65
- Defined in: [actioncode.ts:24](https://github.com/otaprotocol/actioncodes/blob/007a9e0d8a0303f8bd7d2ee1ee5ee3e0ff8d987c/src/actioncode.ts#L24)
65
+ Defined in: [actioncode.ts:24](https://github.com/otaprotocol/actioncodes/blob/c724b443a380f5f43ae1dd1ddefb6b90efaa0aa5/src/actioncode.ts#L24)
66
66
 
67
67
  ***
68
68
 
@@ -70,7 +70,7 @@ Defined in: [actioncode.ts:24](https://github.com/otaprotocol/actioncodes/blob/0
70
70
 
71
71
  > **status**: [`ActionCodeStatus`](../type-aliases/ActionCodeStatus.md)
72
72
 
73
- Defined in: [actioncode.ts:29](https://github.com/otaprotocol/actioncodes/blob/007a9e0d8a0303f8bd7d2ee1ee5ee3e0ff8d987c/src/actioncode.ts#L29)
73
+ Defined in: [actioncode.ts:29](https://github.com/otaprotocol/actioncodes/blob/c724b443a380f5f43ae1dd1ddefb6b90efaa0aa5/src/actioncode.ts#L29)
74
74
 
75
75
  ***
76
76
 
@@ -78,7 +78,7 @@ Defined in: [actioncode.ts:29](https://github.com/otaprotocol/actioncodes/blob/0
78
78
 
79
79
  > **timestamp**: `number`
80
80
 
81
- Defined in: [actioncode.ts:23](https://github.com/otaprotocol/actioncodes/blob/007a9e0d8a0303f8bd7d2ee1ee5ee3e0ff8d987c/src/actioncode.ts#L23)
81
+ Defined in: [actioncode.ts:23](https://github.com/otaprotocol/actioncodes/blob/c724b443a380f5f43ae1dd1ddefb6b90efaa0aa5/src/actioncode.ts#L23)
82
82
 
83
83
  ***
84
84
 
@@ -86,4 +86,4 @@ Defined in: [actioncode.ts:23](https://github.com/otaprotocol/actioncodes/blob/0
86
86
 
87
87
  > `optional` **transaction**: [`ActionCodeTransaction`](ActionCodeTransaction.md)
88
88
 
89
- Defined in: [actioncode.ts:26](https://github.com/otaprotocol/actioncodes/blob/007a9e0d8a0303f8bd7d2ee1ee5ee3e0ff8d987c/src/actioncode.ts#L26)
89
+ Defined in: [actioncode.ts:26](https://github.com/otaprotocol/actioncodes/blob/c724b443a380f5f43ae1dd1ddefb6b90efaa0aa5/src/actioncode.ts#L26)
@@ -6,7 +6,7 @@
6
6
 
7
7
  # Interface: ActionCodeMetadata
8
8
 
9
- Defined in: [actioncode.ts:8](https://github.com/otaprotocol/actioncodes/blob/007a9e0d8a0303f8bd7d2ee1ee5ee3e0ff8d987c/src/actioncode.ts#L8)
9
+ Defined in: [actioncode.ts:8](https://github.com/otaprotocol/actioncodes/blob/c724b443a380f5f43ae1dd1ddefb6b90efaa0aa5/src/actioncode.ts#L8)
10
10
 
11
11
  ## Properties
12
12
 
@@ -14,7 +14,7 @@ Defined in: [actioncode.ts:8](https://github.com/otaprotocol/actioncodes/blob/00
14
14
 
15
15
  > `optional` **description**: `string`
16
16
 
17
- Defined in: [actioncode.ts:9](https://github.com/otaprotocol/actioncodes/blob/007a9e0d8a0303f8bd7d2ee1ee5ee3e0ff8d987c/src/actioncode.ts#L9)
17
+ Defined in: [actioncode.ts:9](https://github.com/otaprotocol/actioncodes/blob/c724b443a380f5f43ae1dd1ddefb6b90efaa0aa5/src/actioncode.ts#L9)
18
18
 
19
19
  ***
20
20
 
@@ -22,4 +22,4 @@ Defined in: [actioncode.ts:9](https://github.com/otaprotocol/actioncodes/blob/00
22
22
 
23
23
  > `optional` **params**: `Record`\<`string`, `any`\>
24
24
 
25
- Defined in: [actioncode.ts:10](https://github.com/otaprotocol/actioncodes/blob/007a9e0d8a0303f8bd7d2ee1ee5ee3e0ff8d987c/src/actioncode.ts#L10)
25
+ Defined in: [actioncode.ts:10](https://github.com/otaprotocol/actioncodes/blob/c724b443a380f5f43ae1dd1ddefb6b90efaa0aa5/src/actioncode.ts#L10)
@@ -6,7 +6,7 @@
6
6
 
7
7
  # Interface: ActionCodeTransaction
8
8
 
9
- Defined in: [actioncode.ts:13](https://github.com/otaprotocol/actioncodes/blob/007a9e0d8a0303f8bd7d2ee1ee5ee3e0ff8d987c/src/actioncode.ts#L13)
9
+ Defined in: [actioncode.ts:13](https://github.com/otaprotocol/actioncodes/blob/c724b443a380f5f43ae1dd1ddefb6b90efaa0aa5/src/actioncode.ts#L13)
10
10
 
11
11
  ## Properties
12
12
 
@@ -14,7 +14,7 @@ Defined in: [actioncode.ts:13](https://github.com/otaprotocol/actioncodes/blob/0
14
14
 
15
15
  > `optional` **transaction**: `string`
16
16
 
17
- Defined in: [actioncode.ts:14](https://github.com/otaprotocol/actioncodes/blob/007a9e0d8a0303f8bd7d2ee1ee5ee3e0ff8d987c/src/actioncode.ts#L14)
17
+ Defined in: [actioncode.ts:14](https://github.com/otaprotocol/actioncodes/blob/c724b443a380f5f43ae1dd1ddefb6b90efaa0aa5/src/actioncode.ts#L14)
18
18
 
19
19
  ***
20
20
 
@@ -22,7 +22,7 @@ Defined in: [actioncode.ts:14](https://github.com/otaprotocol/actioncodes/blob/0
22
22
 
23
23
  > `optional` **txSignature**: `string`
24
24
 
25
- Defined in: [actioncode.ts:15](https://github.com/otaprotocol/actioncodes/blob/007a9e0d8a0303f8bd7d2ee1ee5ee3e0ff8d987c/src/actioncode.ts#L15)
25
+ Defined in: [actioncode.ts:15](https://github.com/otaprotocol/actioncodes/blob/c724b443a380f5f43ae1dd1ddefb6b90efaa0aa5/src/actioncode.ts#L15)
26
26
 
27
27
  ***
28
28
 
@@ -30,4 +30,4 @@ Defined in: [actioncode.ts:15](https://github.com/otaprotocol/actioncodes/blob/0
30
30
 
31
31
  > `optional` **txType**: `string`
32
32
 
33
- Defined in: [actioncode.ts:16](https://github.com/otaprotocol/actioncodes/blob/007a9e0d8a0303f8bd7d2ee1ee5ee3e0ff8d987c/src/actioncode.ts#L16)
33
+ Defined in: [actioncode.ts:16](https://github.com/otaprotocol/actioncodes/blob/c724b443a380f5f43ae1dd1ddefb6b90efaa0aa5/src/actioncode.ts#L16)
@@ -8,4 +8,4 @@
8
8
 
9
9
  > **ActionCodeStatus** = `"pending"` \| `"resolved"` \| `"finalized"` \| `"expired"` \| `"error"`
10
10
 
11
- Defined in: [actioncode.ts:6](https://github.com/otaprotocol/actioncodes/blob/007a9e0d8a0303f8bd7d2ee1ee5ee3e0ff8d987c/src/actioncode.ts#L6)
11
+ Defined in: [actioncode.ts:6](https://github.com/otaprotocol/actioncodes/blob/c724b443a380f5f43ae1dd1ddefb6b90efaa0aa5/src/actioncode.ts#L6)
@@ -6,7 +6,7 @@
6
6
 
7
7
  # Class: `abstract` BaseChainAdapter\<T\>
8
8
 
9
- Defined in: [adapters/base.ts:9](https://github.com/otaprotocol/actioncodes/blob/007a9e0d8a0303f8bd7d2ee1ee5ee3e0ff8d987c/src/adapters/base.ts#L9)
9
+ Defined in: [adapters/base.ts:9](https://github.com/otaprotocol/actioncodes/blob/c724b443a380f5f43ae1dd1ddefb6b90efaa0aa5/src/adapters/base.ts#L9)
10
10
 
11
11
  Base adapter class for chain-specific protocol meta operations
12
12
 
@@ -38,7 +38,7 @@ Chain-specific transaction type
38
38
 
39
39
  > `abstract` `readonly` **chain**: `string`
40
40
 
41
- Defined in: [adapters/base.ts:10](https://github.com/otaprotocol/actioncodes/blob/007a9e0d8a0303f8bd7d2ee1ee5ee3e0ff8d987c/src/adapters/base.ts#L10)
41
+ Defined in: [adapters/base.ts:10](https://github.com/otaprotocol/actioncodes/blob/c724b443a380f5f43ae1dd1ddefb6b90efaa0aa5/src/adapters/base.ts#L10)
42
42
 
43
43
  ## Methods
44
44
 
@@ -46,7 +46,7 @@ Defined in: [adapters/base.ts:10](https://github.com/otaprotocol/actioncodes/blo
46
46
 
47
47
  > `abstract` **decode**(`tx`): `null` \| [`ProtocolMetaV1`](../../../meta/interfaces/ProtocolMetaV1.md)
48
48
 
49
- Defined in: [adapters/base.ts:24](https://github.com/otaprotocol/actioncodes/blob/007a9e0d8a0303f8bd7d2ee1ee5ee3e0ff8d987c/src/adapters/base.ts#L24)
49
+ Defined in: [adapters/base.ts:24](https://github.com/otaprotocol/actioncodes/blob/c724b443a380f5f43ae1dd1ddefb6b90efaa0aa5/src/adapters/base.ts#L24)
50
50
 
51
51
  Decode protocol meta from chain-specific transaction
52
52
 
@@ -70,7 +70,7 @@ Decoded ProtocolMetaV1 or null
70
70
 
71
71
  > **detectTampering**(`tx`, `authorities`, `expectedPrefix`): `boolean`
72
72
 
73
- Defined in: [adapters/base.ts:50](https://github.com/otaprotocol/actioncodes/blob/007a9e0d8a0303f8bd7d2ee1ee5ee3e0ff8d987c/src/adapters/base.ts#L50)
73
+ Defined in: [adapters/base.ts:50](https://github.com/otaprotocol/actioncodes/blob/c724b443a380f5f43ae1dd1ddefb6b90efaa0aa5/src/adapters/base.ts#L50)
74
74
 
75
75
  Detect tampered transactions by cross-checking metadata
76
76
 
@@ -106,7 +106,7 @@ True if transaction is valid and not tampered
106
106
 
107
107
  > `abstract` **encode**(`meta`): `any`
108
108
 
109
- Defined in: [adapters/base.ts:17](https://github.com/otaprotocol/actioncodes/blob/007a9e0d8a0303f8bd7d2ee1ee5ee3e0ff8d987c/src/adapters/base.ts#L17)
109
+ Defined in: [adapters/base.ts:17](https://github.com/otaprotocol/actioncodes/blob/c724b443a380f5f43ae1dd1ddefb6b90efaa0aa5/src/adapters/base.ts#L17)
110
110
 
111
111
  Encode protocol meta for this chain
112
112
 
@@ -130,7 +130,7 @@ Chain-specific encoded data
130
130
 
131
131
  > **getCodeSignatureMessage**(`code`, `timestamp`, `prefix`): `string`
132
132
 
133
- Defined in: [adapters/base.ts:96](https://github.com/otaprotocol/actioncodes/blob/007a9e0d8a0303f8bd7d2ee1ee5ee3e0ff8d987c/src/adapters/base.ts#L96)
133
+ Defined in: [adapters/base.ts:96](https://github.com/otaprotocol/actioncodes/blob/c724b443a380f5f43ae1dd1ddefb6b90efaa0aa5/src/adapters/base.ts#L96)
134
134
 
135
135
  Get the code signature message
136
136
 
@@ -166,7 +166,7 @@ The code signature message
166
166
 
167
167
  > `abstract` **hasIssuerSignature**(`tx`, `issuer`): `boolean`
168
168
 
169
- Defined in: [adapters/base.ts:41](https://github.com/otaprotocol/actioncodes/blob/007a9e0d8a0303f8bd7d2ee1ee5ee3e0ff8d987c/src/adapters/base.ts#L41)
169
+ Defined in: [adapters/base.ts:41](https://github.com/otaprotocol/actioncodes/blob/c724b443a380f5f43ae1dd1ddefb6b90efaa0aa5/src/adapters/base.ts#L41)
170
170
 
171
171
  Check if the issuer has signed the transaction
172
172
 
@@ -192,11 +192,39 @@ True if issuer has signed
192
192
 
193
193
  ***
194
194
 
195
+ ### signWithProtocolKey()
196
+
197
+ > `abstract` **signWithProtocolKey**(`actionCode`, `key`): `Promise`\<[`ActionCode`](../../../actioncode/classes/ActionCode.md)\>
198
+
199
+ Defined in: [adapters/base.ts:118](https://github.com/otaprotocol/actioncodes/blob/c724b443a380f5f43ae1dd1ddefb6b90efaa0aa5/src/adapters/base.ts#L118)
200
+
201
+ Sign the transaction with the protocol key using a callback approach
202
+ This method should be implemented by each chain-specific adapter to handle
203
+ the chain's specific signing mechanism asynchronously
204
+
205
+ #### Parameters
206
+
207
+ ##### actionCode
208
+
209
+ [`ActionCode`](../../../actioncode/classes/ActionCode.md)
210
+
211
+ ##### key
212
+
213
+ `any`
214
+
215
+ #### Returns
216
+
217
+ `Promise`\<[`ActionCode`](../../../actioncode/classes/ActionCode.md)\>
218
+
219
+ Promise that resolves to the signed transaction
220
+
221
+ ***
222
+
195
223
  ### validate()
196
224
 
197
225
  > `abstract` **validate**(`tx`, `authorities`, `expectedPrefix?`): `boolean`
198
226
 
199
- Defined in: [adapters/base.ts:33](https://github.com/otaprotocol/actioncodes/blob/007a9e0d8a0303f8bd7d2ee1ee5ee3e0ff8d987c/src/adapters/base.ts#L33)
227
+ Defined in: [adapters/base.ts:33](https://github.com/otaprotocol/actioncodes/blob/c724b443a380f5f43ae1dd1ddefb6b90efaa0aa5/src/adapters/base.ts#L33)
200
228
 
201
229
  Validate transaction with protocol meta and authority list
202
230
 
@@ -232,7 +260,7 @@ True if transaction is valid
232
260
 
233
261
  > `abstract` `protected` **validateTransactionIntegrity**(`tx`, `meta`): `boolean`
234
262
 
235
- Defined in: [adapters/base.ts:87](https://github.com/otaprotocol/actioncodes/blob/007a9e0d8a0303f8bd7d2ee1ee5ee3e0ff8d987c/src/adapters/base.ts#L87)
263
+ Defined in: [adapters/base.ts:87](https://github.com/otaprotocol/actioncodes/blob/c724b443a380f5f43ae1dd1ddefb6b90efaa0aa5/src/adapters/base.ts#L87)
236
264
 
237
265
  Chain-specific transaction integrity validation
238
266
  Override this method for additional validation logic
@@ -263,7 +291,7 @@ True if transaction integrity is valid
263
291
 
264
292
  > `abstract` **verifyCodeSignature**(`actionCode`): `boolean`
265
293
 
266
- Defined in: [adapters/base.ts:107](https://github.com/otaprotocol/actioncodes/blob/007a9e0d8a0303f8bd7d2ee1ee5ee3e0ff8d987c/src/adapters/base.ts#L107)
294
+ Defined in: [adapters/base.ts:107](https://github.com/otaprotocol/actioncodes/blob/c724b443a380f5f43ae1dd1ddefb6b90efaa0aa5/src/adapters/base.ts#L107)
267
295
 
268
296
  Verify the code signature
269
297
  This is specific to the chain and should be implemented by the concrete adapter