@actioncodes/protocol 1.2.2 → 2.0.1

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 (144) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +318 -33
  3. package/dist/ActionCodesProtocol.d.ts +37 -0
  4. package/dist/ActionCodesProtocol.d.ts.map +1 -0
  5. package/dist/adapters/BaseChainAdapter.d.ts +22 -0
  6. package/dist/adapters/BaseChainAdapter.d.ts.map +1 -0
  7. package/dist/adapters/SolanaAdapter.d.ts +44 -0
  8. package/dist/adapters/SolanaAdapter.d.ts.map +1 -0
  9. package/dist/constants.d.ts +6 -8
  10. package/dist/constants.d.ts.map +1 -1
  11. package/dist/errors.d.ts +63 -0
  12. package/dist/errors.d.ts.map +1 -0
  13. package/dist/index.cjs +3 -0
  14. package/dist/index.cjs.map +25 -0
  15. package/dist/index.d.ts +10 -8
  16. package/dist/index.d.ts.map +1 -1
  17. package/dist/index.js +3 -36
  18. package/dist/index.js.map +25 -0
  19. package/dist/strategy/DelegationStrategy.d.ts +45 -0
  20. package/dist/strategy/DelegationStrategy.d.ts.map +1 -0
  21. package/dist/strategy/WalletStrategy.d.ts +8 -0
  22. package/dist/strategy/WalletStrategy.d.ts.map +1 -0
  23. package/dist/types.d.ts +40 -0
  24. package/dist/types.d.ts.map +1 -0
  25. package/dist/utils/canonical.d.ts +5 -0
  26. package/dist/utils/canonical.d.ts.map +1 -0
  27. package/dist/utils/crypto.d.ts +13 -0
  28. package/dist/utils/crypto.d.ts.map +1 -0
  29. package/dist/utils/protocolMeta.d.ts +16 -0
  30. package/dist/utils/protocolMeta.d.ts.map +1 -0
  31. package/docs/ActionCodesProtocol/README.md +11 -0
  32. package/docs/ActionCodesProtocol/classes/ActionCodesProtocol.md +147 -0
  33. package/docs/README.md +10 -50
  34. package/docs/adapters/BaseChainAdapter/README.md +20 -0
  35. package/docs/adapters/BaseChainAdapter/classes/BaseChainAdapter.md +56 -0
  36. package/docs/adapters/BaseChainAdapter/interfaces/BaseContext.md +17 -0
  37. package/docs/adapters/BaseChainAdapter/interfaces/ChainAdapter.md +33 -0
  38. package/docs/adapters/BaseChainAdapter/type-aliases/ChainContext.md +23 -0
  39. package/docs/adapters/NodeCryptoAdapter/README.md +15 -0
  40. package/docs/adapters/NodeCryptoAdapter/classes/NodeCryptoAdapter.md +254 -0
  41. package/docs/adapters/NodeCryptoAdapter/type-aliases/NodeCryptoContext.md +27 -0
  42. package/docs/adapters/SolanaAdapter/README.md +16 -0
  43. package/docs/adapters/SolanaAdapter/classes/SolanaAdapter.md +190 -0
  44. package/docs/adapters/SolanaAdapter/type-aliases/SolanaContext.md +27 -0
  45. package/docs/adapters/SolanaAdapter/type-aliases/SolanaTransaction.md +13 -0
  46. package/docs/constants/README.md +8 -13
  47. package/docs/constants/variables/CODE_CHARSET_DIGITS.md +11 -0
  48. package/docs/constants/variables/CODE_DEFAULT_LENGTH.md +11 -0
  49. package/docs/constants/variables/CODE_MAX_LENGTH.md +11 -0
  50. package/docs/constants/variables/CODE_MIN_LENGTH.md +11 -0
  51. package/docs/constants/variables/PROTOCOL_META_MAX_BYTES.md +11 -0
  52. package/docs/constants/variables/PROTOCOL_NORMALIZATION.md +11 -0
  53. package/docs/constants/variables/SUPPORTED_CHAINS.md +3 -3
  54. package/docs/errors/README.md +22 -0
  55. package/docs/errors/classes/ExpiredCodeError.md +695 -0
  56. package/docs/errors/classes/InvalidCodeFormatError.md +691 -0
  57. package/docs/errors/classes/InvalidPubkeyFormatError.md +691 -0
  58. package/docs/errors/classes/InvalidSignatureError.md +687 -0
  59. package/docs/errors/classes/MetaMismatchError.md +695 -0
  60. package/docs/errors/classes/MissingMetaError.md +681 -0
  61. package/docs/errors/classes/ProtocolError.md +637 -0
  62. package/docs/errors/classes/TransactionNotSignedByIntendedOwnerError.md +691 -0
  63. package/docs/errors/enumerations/ProtocolErrorCode.md +121 -0
  64. package/docs/index/README.md +83 -41
  65. package/docs/modules.md +12 -9
  66. package/docs/strategy/WalletStrategy/README.md +11 -0
  67. package/docs/strategy/WalletStrategy/classes/WalletStrategy.md +67 -0
  68. package/docs/types/README.md +14 -0
  69. package/docs/types/interfaces/ActionCode.md +65 -0
  70. package/docs/types/interfaces/CanonicalMessageParts.md +33 -0
  71. package/docs/types/interfaces/CodeGenerationConfig.md +33 -0
  72. package/docs/types/interfaces/CodeGenerationResult.md +25 -0
  73. package/docs/utils/canonical/README.md +16 -0
  74. package/docs/utils/canonical/functions/serializeCanonical.md +21 -0
  75. package/docs/utils/canonical/variables/CANONICAL_MESSAGE_PREFIX.md +11 -0
  76. package/docs/utils/canonical/variables/CANONICAL_MESSAGE_VERSION.md +11 -0
  77. package/docs/utils/crypto/README.md +18 -0
  78. package/docs/utils/crypto/functions/base32EncodeCrockford.md +21 -0
  79. package/docs/utils/crypto/functions/codeHash.md +21 -0
  80. package/docs/utils/crypto/functions/digestToDigits.md +25 -0
  81. package/docs/utils/crypto/functions/generateRandomSecret.md +15 -0
  82. package/docs/utils/crypto/functions/hkdfSha256.md +35 -0
  83. package/docs/utils/crypto/functions/hmacSha256.md +25 -0
  84. package/docs/utils/crypto/functions/sha256.md +21 -0
  85. package/docs/utils/crypto/functions/truncateBits.md +25 -0
  86. package/docs/utils/protocolMeta/README.md +21 -0
  87. package/docs/utils/protocolMeta/functions/buildProtocolMeta.md +21 -0
  88. package/docs/utils/protocolMeta/functions/parseProtocolMeta.md +21 -0
  89. package/docs/utils/protocolMeta/functions/validateProtocolMetaFormat.md +21 -0
  90. package/docs/utils/protocolMeta/interfaces/ProtocolMetaFields.md +41 -0
  91. package/docs/utils/protocolMeta/variables/SCHEME.md +11 -0
  92. package/package.json +42 -47
  93. package/dist/actioncode.d.ts +0 -120
  94. package/dist/actioncode.d.ts.map +0 -1
  95. package/dist/actioncode.js +0 -186
  96. package/dist/adapters/base.d.ts +0 -93
  97. package/dist/adapters/base.d.ts.map +0 -1
  98. package/dist/adapters/base.js +0 -65
  99. package/dist/adapters/solana/index.d.ts +0 -2
  100. package/dist/adapters/solana/index.d.ts.map +0 -1
  101. package/dist/adapters/solana/index.js +0 -30
  102. package/dist/adapters/solana/solana.d.ts +0 -113
  103. package/dist/adapters/solana/solana.d.ts.map +0 -1
  104. package/dist/adapters/solana/solana.js +0 -537
  105. package/dist/codegen.d.ts +0 -76
  106. package/dist/codegen.d.ts.map +0 -1
  107. package/dist/codegen.js +0 -211
  108. package/dist/constants.js +0 -24
  109. package/dist/meta.d.ts +0 -54
  110. package/dist/meta.d.ts.map +0 -1
  111. package/dist/meta.js +0 -104
  112. package/dist/protocol.d.ts +0 -179
  113. package/dist/protocol.d.ts.map +0 -1
  114. package/dist/protocol.js +0 -390
  115. package/docs/_media/LICENSE +0 -201
  116. package/docs/_media/README.md +0 -28
  117. package/docs/actioncode/README.md +0 -21
  118. package/docs/actioncode/classes/ActionCode.md +0 -430
  119. package/docs/actioncode/interfaces/ActionCodeFields.md +0 -89
  120. package/docs/actioncode/interfaces/ActionCodeMetadata.md +0 -25
  121. package/docs/actioncode/interfaces/ActionCodeTransaction.md +0 -57
  122. package/docs/actioncode/type-aliases/ActionCodeStatus.md +0 -11
  123. package/docs/adapters/base/README.md +0 -11
  124. package/docs/adapters/base/classes/BaseChainAdapter.md +0 -396
  125. package/docs/adapters/solana/README.md +0 -19
  126. package/docs/adapters/solana/solana/README.md +0 -15
  127. package/docs/adapters/solana/solana/classes/SolanaAdapter.md +0 -506
  128. package/docs/adapters/solana/solana/type-aliases/SolanaTransaction.md +0 -13
  129. package/docs/codegen/README.md +0 -11
  130. package/docs/codegen/classes/CodeGenerator.md +0 -341
  131. package/docs/constants/type-aliases/SupportedChain.md +0 -11
  132. package/docs/constants/variables/CODE_LENGTH.md +0 -11
  133. package/docs/constants/variables/CODE_TTL.md +0 -11
  134. package/docs/constants/variables/MAX_PREFIX_LENGTH.md +0 -11
  135. package/docs/constants/variables/MIN_PREFIX_LENGTH.md +0 -11
  136. package/docs/constants/variables/PROTOCOL_CODE_PREFIX.md +0 -11
  137. package/docs/constants/variables/PROTOCOL_PREFIX.md +0 -11
  138. package/docs/constants/variables/PROTOCOL_VERSION.md +0 -11
  139. package/docs/meta/README.md +0 -15
  140. package/docs/meta/classes/ProtocolMetaParser.md +0 -177
  141. package/docs/meta/interfaces/ProtocolMetaV1.md +0 -59
  142. package/docs/protocol/README.md +0 -51
  143. package/docs/protocol/classes/ActionCodesProtocol.md +0 -676
  144. package/docs/protocol/interfaces/ProtocolConfig.md +0 -71
package/docs/README.md CHANGED
@@ -1,59 +1,19 @@
1
- **@actioncodes/protocol**
1
+ **@actioncodes/protocol-v2**
2
2
 
3
3
  ***
4
4
 
5
- # 🛡️ Action Codes Protocol
5
+ # protocol-v2
6
6
 
7
- ![Coverage](https://img.shields.io/badge/coverage-98%-brightgreen)
8
-
9
- **Action Codes Protocol** enables short-lived, cryptographically verifiable action codes that authorize blockchain transactions and intents without requiring live wallet sessions.
10
-
11
- This repository contains the canonical specifications, SDK modules, and chain adapter interfaces that implement the Action Codes Protocol.
12
-
13
- ---
14
-
15
- ## ✨ Key Features
16
-
17
- - 🔐 **Deterministic Code Generation**
18
- Users can generate time-limited codes directly in their wallet or client, without external servers.
19
-
20
- - ✅ **Signature-Based Verification**
21
- Codes are signed by the wallet, and transactions must be signed by protocol-authorized relayers.
22
-
23
- - 🧩 **Meta-Based Intent Encoding**
24
- Each transaction carries an encoded `meta` string for verifiable context across chains.
25
-
26
- - 🧱 **Chain-Agnostic Design**
27
- Works on Solana today; built for future EVM, Cosmos, and more.
28
-
29
- - 🌐 **Prefix Namespace System**
30
- Enables ecosystem-wide namespacing (e.g. `JUP`, `ME`) for branded intents and UIs.
31
-
32
- ---
33
-
34
- ## 📦 Repository Structure
7
+ To install dependencies:
35
8
 
9
+ ```bash
10
+ bun install
36
11
  ```
37
- /src - SDK modules (codegen, meta, validator, blockchain adapters)
38
- /specs - Formal specifications (AIPs)
39
- README.md - You are here
40
- LICENSE - Apache 2.0
41
- ```
42
-
43
- ---
44
12
 
45
- ## 📄 Specifications
13
+ To run:
46
14
 
47
- [Protocol Specifications](_media/README.md)
48
-
49
- - [`AIP-0`](./specs/aip-0.md): Action Codes Protocol Architecture
50
- - [`AIP-1`](./specs/aip-1.md): Protocol Meta Format
51
- - [`AIP-2`](./specs/aip-2.md): Authority Signature Validation
52
- - [`AIP-3`](./specs/aip-3.md): Intent Resolution & Routing
53
- - [`AIP-4`](./specs/aip-4.md): Prefix System
54
-
55
- ---
56
-
57
- ## 📜 License
15
+ ```bash
16
+ bun run index.ts
17
+ ```
58
18
 
59
- This protocol is open source under the [Apache 2.0 License](_media/LICENSE).
19
+ This project was created using `bun init` in bun v1.2.22. [Bun](https://bun.com) is a fast all-in-one JavaScript runtime.
@@ -0,0 +1,20 @@
1
+ [**@actioncodes/protocol-v2**](../../README.md)
2
+
3
+ ***
4
+
5
+ [@actioncodes/protocol-v2](../../modules.md) / adapters/BaseChainAdapter
6
+
7
+ # adapters/BaseChainAdapter
8
+
9
+ ## Classes
10
+
11
+ - [BaseChainAdapter](classes/BaseChainAdapter.md)
12
+
13
+ ## Interfaces
14
+
15
+ - [BaseContext](interfaces/BaseContext.md)
16
+ - [ChainAdapter](interfaces/ChainAdapter.md)
17
+
18
+ ## Type Aliases
19
+
20
+ - [ChainContext](type-aliases/ChainContext.md)
@@ -0,0 +1,56 @@
1
+ [**@actioncodes/protocol-v2**](../../../README.md)
2
+
3
+ ***
4
+
5
+ [@actioncodes/protocol-v2](../../../modules.md) / [adapters/BaseChainAdapter](../README.md) / BaseChainAdapter
6
+
7
+ # Abstract Class: BaseChainAdapter\<TCtx\>
8
+
9
+ Defined in: src/adapters/BaseChainAdapter.ts:14
10
+
11
+ ## Extended by
12
+
13
+ - [`NodeCryptoAdapter`](../../NodeCryptoAdapter/classes/NodeCryptoAdapter.md)
14
+ - [`SolanaAdapter`](../../SolanaAdapter/classes/SolanaAdapter.md)
15
+
16
+ ## Type Parameters
17
+
18
+ ### TCtx
19
+
20
+ `TCtx`
21
+
22
+ ## Implements
23
+
24
+ - [`ChainAdapter`](../interfaces/ChainAdapter.md)\<`TCtx`\>
25
+
26
+ ## Constructors
27
+
28
+ ### Constructor
29
+
30
+ > **new BaseChainAdapter**\<`TCtx`\>(): `BaseChainAdapter`\<`TCtx`\>
31
+
32
+ #### Returns
33
+
34
+ `BaseChainAdapter`\<`TCtx`\>
35
+
36
+ ## Methods
37
+
38
+ ### verify()
39
+
40
+ > `abstract` **verify**(`context`): `boolean`
41
+
42
+ Defined in: src/adapters/BaseChainAdapter.ts:15
43
+
44
+ #### Parameters
45
+
46
+ ##### context
47
+
48
+ [`ChainContext`](../type-aliases/ChainContext.md)\<`TCtx`\>
49
+
50
+ #### Returns
51
+
52
+ `boolean`
53
+
54
+ #### Implementation of
55
+
56
+ [`ChainAdapter`](../interfaces/ChainAdapter.md).[`verify`](../interfaces/ChainAdapter.md#verify)
@@ -0,0 +1,17 @@
1
+ [**@actioncodes/protocol-v2**](../../../README.md)
2
+
3
+ ***
4
+
5
+ [@actioncodes/protocol-v2](../../../modules.md) / [adapters/BaseChainAdapter](../README.md) / BaseContext
6
+
7
+ # Interface: BaseContext
8
+
9
+ Defined in: src/adapters/BaseChainAdapter.ts:4
10
+
11
+ ## Properties
12
+
13
+ ### canonicalMessageParts
14
+
15
+ > **canonicalMessageParts**: [`CanonicalMessageParts`](../../../types/interfaces/CanonicalMessageParts.md)
16
+
17
+ Defined in: src/adapters/BaseChainAdapter.ts:6
@@ -0,0 +1,33 @@
1
+ [**@actioncodes/protocol-v2**](../../../README.md)
2
+
3
+ ***
4
+
5
+ [@actioncodes/protocol-v2](../../../modules.md) / [adapters/BaseChainAdapter](../README.md) / ChainAdapter
6
+
7
+ # Interface: ChainAdapter\<TCtx\>
8
+
9
+ Defined in: src/adapters/BaseChainAdapter.ts:10
10
+
11
+ ## Type Parameters
12
+
13
+ ### TCtx
14
+
15
+ `TCtx` = `unknown`
16
+
17
+ ## Methods
18
+
19
+ ### verify()
20
+
21
+ > **verify**(`context`): `boolean`
22
+
23
+ Defined in: src/adapters/BaseChainAdapter.ts:11
24
+
25
+ #### Parameters
26
+
27
+ ##### context
28
+
29
+ [`ChainContext`](../type-aliases/ChainContext.md)\<`TCtx`\>
30
+
31
+ #### Returns
32
+
33
+ `boolean`
@@ -0,0 +1,23 @@
1
+ [**@actioncodes/protocol-v2**](../../../README.md)
2
+
3
+ ***
4
+
5
+ [@actioncodes/protocol-v2](../../../modules.md) / [adapters/BaseChainAdapter](../README.md) / ChainContext
6
+
7
+ # Type Alias: ChainContext\<T\>
8
+
9
+ > **ChainContext**\<`T`\> = [`BaseContext`](../interfaces/BaseContext.md) & `object` & `T`
10
+
11
+ Defined in: src/adapters/BaseChainAdapter.ts:8
12
+
13
+ ## Type Declaration
14
+
15
+ ### chain
16
+
17
+ > **chain**: `string`
18
+
19
+ ## Type Parameters
20
+
21
+ ### T
22
+
23
+ `T`
@@ -0,0 +1,15 @@
1
+ [**@actioncodes/protocol-v2**](../../README.md)
2
+
3
+ ***
4
+
5
+ [@actioncodes/protocol-v2](../../modules.md) / adapters/NodeCryptoAdapter
6
+
7
+ # adapters/NodeCryptoAdapter
8
+
9
+ ## Classes
10
+
11
+ - [NodeCryptoAdapter](classes/NodeCryptoAdapter.md)
12
+
13
+ ## Type Aliases
14
+
15
+ - [NodeCryptoContext](type-aliases/NodeCryptoContext.md)
@@ -0,0 +1,254 @@
1
+ [**@actioncodes/protocol-v2**](../../../README.md)
2
+
3
+ ***
4
+
5
+ [@actioncodes/protocol-v2](../../../modules.md) / [adapters/NodeCryptoAdapter](../README.md) / NodeCryptoAdapter
6
+
7
+ # Class: NodeCryptoAdapter
8
+
9
+ Defined in: src/adapters/NodeCryptoAdapter.ts:20
10
+
11
+ ## Extends
12
+
13
+ - [`BaseChainAdapter`](../../BaseChainAdapter/classes/BaseChainAdapter.md)\<[`NodeCryptoContext`](../type-aliases/NodeCryptoContext.md)\>
14
+
15
+ ## Constructors
16
+
17
+ ### Constructor
18
+
19
+ > **new NodeCryptoAdapter**(): `NodeCryptoAdapter`
20
+
21
+ #### Returns
22
+
23
+ `NodeCryptoAdapter`
24
+
25
+ #### Inherited from
26
+
27
+ [`BaseChainAdapter`](../../BaseChainAdapter/classes/BaseChainAdapter.md).[`constructor`](../../BaseChainAdapter/classes/BaseChainAdapter.md#constructor)
28
+
29
+ ## Methods
30
+
31
+ ### getProtocolMeta()
32
+
33
+ > **getProtocolMeta**(`tx`): `null` \| `string`
34
+
35
+ Defined in: src/adapters/NodeCryptoAdapter.ts:57
36
+
37
+ Extract protocol metadata from a simulated transaction
38
+
39
+ #### Parameters
40
+
41
+ ##### tx
42
+
43
+ ###### instructions?
44
+
45
+ `object`[]
46
+
47
+ #### Returns
48
+
49
+ `null` \| `string`
50
+
51
+ ***
52
+
53
+ ### parseMeta()
54
+
55
+ > **parseMeta**(`tx`): `null` \| [`ProtocolMetaFields`](../../../utils/protocolMeta/interfaces/ProtocolMetaFields.md)
56
+
57
+ Defined in: src/adapters/NodeCryptoAdapter.ts:74
58
+
59
+ Get parsed ProtocolMeta object, or null if none or invalid
60
+
61
+ #### Parameters
62
+
63
+ ##### tx
64
+
65
+ ###### instructions?
66
+
67
+ `object`[]
68
+
69
+ #### Returns
70
+
71
+ `null` \| [`ProtocolMetaFields`](../../../utils/protocolMeta/interfaces/ProtocolMetaFields.md)
72
+
73
+ ***
74
+
75
+ ### verify()
76
+
77
+ > **verify**(`context`): `boolean`
78
+
79
+ Defined in: src/adapters/NodeCryptoAdapter.ts:22
80
+
81
+ Verify the signature over canonical message using Node.js crypto
82
+
83
+ #### Parameters
84
+
85
+ ##### context
86
+
87
+ [`ChainContext`](../../BaseChainAdapter/type-aliases/ChainContext.md)\<[`NodeCryptoContext`](../type-aliases/NodeCryptoContext.md)\>
88
+
89
+ #### Returns
90
+
91
+ `boolean`
92
+
93
+ #### Overrides
94
+
95
+ [`BaseChainAdapter`](../../BaseChainAdapter/classes/BaseChainAdapter.md).[`verify`](../../BaseChainAdapter/classes/BaseChainAdapter.md#verify)
96
+
97
+ ***
98
+
99
+ ### verifyTransactionMatchesCode()
100
+
101
+ > **verifyTransactionMatchesCode**(`actionCode`, `tx`): `void`
102
+
103
+ Defined in: src/adapters/NodeCryptoAdapter.ts:84
104
+
105
+ Validate that a transaction's meta aligns with the bound `actionCode`.
106
+ Throws ProtocolError if validation fails.
107
+
108
+ #### Parameters
109
+
110
+ ##### actionCode
111
+
112
+ [`ActionCode`](../../../types/interfaces/ActionCode.md)
113
+
114
+ ##### tx
115
+
116
+ ###### instructions?
117
+
118
+ `object`[]
119
+
120
+ #### Returns
121
+
122
+ `void`
123
+
124
+ ***
125
+
126
+ ### verifyTransactionSignedByIntentOwner()
127
+
128
+ > **verifyTransactionSignedByIntentOwner**(`tx`): `void`
129
+
130
+ Defined in: src/adapters/NodeCryptoAdapter.ts:125
131
+
132
+ Verify that the transaction is signed by the "intendedFor" pubkey
133
+ as declared in the protocol meta of the transaction.
134
+ Throws ProtocolError if validation fails.
135
+
136
+ #### Parameters
137
+
138
+ ##### tx
139
+
140
+ ###### instructions?
141
+
142
+ `object`[]
143
+
144
+ ###### signatures?
145
+
146
+ `object`[]
147
+
148
+ #### Returns
149
+
150
+ `void`
151
+
152
+ ***
153
+
154
+ ### attachProtocolMeta()
155
+
156
+ > `static` **attachProtocolMeta**(`tx`, `meta`): `object`
157
+
158
+ Defined in: src/adapters/NodeCryptoAdapter.ts:159
159
+
160
+ Attach protocol meta to a simulated transaction.
161
+
162
+ #### Parameters
163
+
164
+ ##### tx
165
+
166
+ ###### instructions?
167
+
168
+ `object`[]
169
+
170
+ ##### meta
171
+
172
+ [`ProtocolMetaFields`](../../../utils/protocolMeta/interfaces/ProtocolMetaFields.md)
173
+
174
+ #### Returns
175
+
176
+ `object`
177
+
178
+ ##### instructions
179
+
180
+ > **instructions**: `object`[]
181
+
182
+ ***
183
+
184
+ ### createProtocolMetaInstruction()
185
+
186
+ > `static` **createProtocolMetaInstruction**(`meta`): `object`
187
+
188
+ Defined in: src/adapters/NodeCryptoAdapter.ts:46
189
+
190
+ Create a protocol meta instruction for NodeCrypto (simulated)
191
+
192
+ #### Parameters
193
+
194
+ ##### meta
195
+
196
+ [`ProtocolMetaFields`](../../../utils/protocolMeta/interfaces/ProtocolMetaFields.md)
197
+
198
+ #### Returns
199
+
200
+ `object`
201
+
202
+ ##### data
203
+
204
+ > **data**: `string`
205
+
206
+ ##### type
207
+
208
+ > **type**: `string`
209
+
210
+ ***
211
+
212
+ ### generateKeyPair()
213
+
214
+ > `static` **generateKeyPair**(): `object`
215
+
216
+ Defined in: src/adapters/NodeCryptoAdapter.ts:185
217
+
218
+ Generate a key pair for testing
219
+
220
+ #### Returns
221
+
222
+ `object`
223
+
224
+ ##### privateKey
225
+
226
+ > **privateKey**: `KeyObject`
227
+
228
+ ##### publicKey
229
+
230
+ > **publicKey**: `KeyObject`
231
+
232
+ ***
233
+
234
+ ### signMessage()
235
+
236
+ > `static` **signMessage**(`message`, `privateKey`): `string`
237
+
238
+ Defined in: src/adapters/NodeCryptoAdapter.ts:173
239
+
240
+ Sign a message with a private key
241
+
242
+ #### Parameters
243
+
244
+ ##### message
245
+
246
+ `Uint8Array`
247
+
248
+ ##### privateKey
249
+
250
+ `KeyObject`
251
+
252
+ #### Returns
253
+
254
+ `string`
@@ -0,0 +1,27 @@
1
+ [**@actioncodes/protocol-v2**](../../../README.md)
2
+
3
+ ***
4
+
5
+ [@actioncodes/protocol-v2](../../../modules.md) / [adapters/NodeCryptoAdapter](../README.md) / NodeCryptoContext
6
+
7
+ # Type Alias: NodeCryptoContext
8
+
9
+ > **NodeCryptoContext** = `object`
10
+
11
+ Defined in: src/adapters/NodeCryptoAdapter.ts:15
12
+
13
+ ## Properties
14
+
15
+ ### pubkey
16
+
17
+ > **pubkey**: `string`
18
+
19
+ Defined in: src/adapters/NodeCryptoAdapter.ts:16
20
+
21
+ ***
22
+
23
+ ### signature
24
+
25
+ > **signature**: `string`
26
+
27
+ Defined in: src/adapters/NodeCryptoAdapter.ts:17
@@ -0,0 +1,16 @@
1
+ [**@actioncodes/protocol-v2**](../../README.md)
2
+
3
+ ***
4
+
5
+ [@actioncodes/protocol-v2](../../modules.md) / adapters/SolanaAdapter
6
+
7
+ # adapters/SolanaAdapter
8
+
9
+ ## Classes
10
+
11
+ - [SolanaAdapter](classes/SolanaAdapter.md)
12
+
13
+ ## Type Aliases
14
+
15
+ - [SolanaContext](type-aliases/SolanaContext.md)
16
+ - [SolanaTransaction](type-aliases/SolanaTransaction.md)