@actioncodes/protocol 1.2.2 → 2.0.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/LICENSE +1 -1
- package/README.md +32 -45
- package/dist/ActionCodesProtocol.d.ts +35 -0
- package/dist/ActionCodesProtocol.d.ts.map +1 -0
- package/dist/adapters/BaseChainAdapter.d.ts +22 -0
- package/dist/adapters/BaseChainAdapter.d.ts.map +1 -0
- package/dist/adapters/SolanaAdapter.d.ts +44 -0
- package/dist/adapters/SolanaAdapter.d.ts.map +1 -0
- package/dist/constants.d.ts +6 -8
- package/dist/constants.d.ts.map +1 -1
- package/dist/errors.d.ts +63 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/index.cjs +3 -0
- package/dist/index.cjs.map +25 -0
- package/dist/index.d.ts +10 -8
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -36
- package/dist/index.js.map +25 -0
- package/dist/strategy/DelegationStrategy.d.ts +43 -0
- package/dist/strategy/DelegationStrategy.d.ts.map +1 -0
- package/dist/strategy/WalletStrategy.d.ts +8 -0
- package/dist/strategy/WalletStrategy.d.ts.map +1 -0
- package/dist/types.d.ts +40 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/utils/canonical.d.ts +5 -0
- package/dist/utils/canonical.d.ts.map +1 -0
- package/dist/utils/crypto.d.ts +13 -0
- package/dist/utils/crypto.d.ts.map +1 -0
- package/dist/utils/protocolMeta.d.ts +16 -0
- package/dist/utils/protocolMeta.d.ts.map +1 -0
- package/docs/ActionCodesProtocol/README.md +11 -0
- package/docs/ActionCodesProtocol/classes/ActionCodesProtocol.md +147 -0
- package/docs/README.md +10 -50
- package/docs/adapters/BaseChainAdapter/README.md +20 -0
- package/docs/adapters/BaseChainAdapter/classes/BaseChainAdapter.md +56 -0
- package/docs/adapters/BaseChainAdapter/interfaces/BaseContext.md +17 -0
- package/docs/adapters/BaseChainAdapter/interfaces/ChainAdapter.md +33 -0
- package/docs/adapters/BaseChainAdapter/type-aliases/ChainContext.md +23 -0
- package/docs/adapters/NodeCryptoAdapter/README.md +15 -0
- package/docs/adapters/NodeCryptoAdapter/classes/NodeCryptoAdapter.md +254 -0
- package/docs/adapters/NodeCryptoAdapter/type-aliases/NodeCryptoContext.md +27 -0
- package/docs/adapters/SolanaAdapter/README.md +16 -0
- package/docs/adapters/SolanaAdapter/classes/SolanaAdapter.md +190 -0
- package/docs/adapters/SolanaAdapter/type-aliases/SolanaContext.md +27 -0
- package/docs/adapters/SolanaAdapter/type-aliases/SolanaTransaction.md +13 -0
- package/docs/constants/README.md +8 -13
- package/docs/constants/variables/CODE_CHARSET_DIGITS.md +11 -0
- package/docs/constants/variables/CODE_DEFAULT_LENGTH.md +11 -0
- package/docs/constants/variables/CODE_MAX_LENGTH.md +11 -0
- package/docs/constants/variables/CODE_MIN_LENGTH.md +11 -0
- package/docs/constants/variables/PROTOCOL_META_MAX_BYTES.md +11 -0
- package/docs/constants/variables/PROTOCOL_NORMALIZATION.md +11 -0
- package/docs/constants/variables/SUPPORTED_CHAINS.md +3 -3
- package/docs/errors/README.md +22 -0
- package/docs/errors/classes/ExpiredCodeError.md +695 -0
- package/docs/errors/classes/InvalidCodeFormatError.md +691 -0
- package/docs/errors/classes/InvalidPubkeyFormatError.md +691 -0
- package/docs/errors/classes/InvalidSignatureError.md +687 -0
- package/docs/errors/classes/MetaMismatchError.md +695 -0
- package/docs/errors/classes/MissingMetaError.md +681 -0
- package/docs/errors/classes/ProtocolError.md +637 -0
- package/docs/errors/classes/TransactionNotSignedByIntendedOwnerError.md +691 -0
- package/docs/errors/enumerations/ProtocolErrorCode.md +121 -0
- package/docs/index/README.md +83 -41
- package/docs/modules.md +12 -9
- package/docs/strategy/WalletStrategy/README.md +11 -0
- package/docs/strategy/WalletStrategy/classes/WalletStrategy.md +67 -0
- package/docs/types/README.md +14 -0
- package/docs/types/interfaces/ActionCode.md +65 -0
- package/docs/types/interfaces/CanonicalMessageParts.md +33 -0
- package/docs/types/interfaces/CodeGenerationConfig.md +33 -0
- package/docs/types/interfaces/CodeGenerationResult.md +25 -0
- package/docs/utils/canonical/README.md +16 -0
- package/docs/utils/canonical/functions/serializeCanonical.md +21 -0
- package/docs/utils/canonical/variables/CANONICAL_MESSAGE_PREFIX.md +11 -0
- package/docs/utils/canonical/variables/CANONICAL_MESSAGE_VERSION.md +11 -0
- package/docs/utils/crypto/README.md +18 -0
- package/docs/utils/crypto/functions/base32EncodeCrockford.md +21 -0
- package/docs/utils/crypto/functions/codeHash.md +21 -0
- package/docs/utils/crypto/functions/digestToDigits.md +25 -0
- package/docs/utils/crypto/functions/generateRandomSecret.md +15 -0
- package/docs/utils/crypto/functions/hkdfSha256.md +35 -0
- package/docs/utils/crypto/functions/hmacSha256.md +25 -0
- package/docs/utils/crypto/functions/sha256.md +21 -0
- package/docs/utils/crypto/functions/truncateBits.md +25 -0
- package/docs/utils/protocolMeta/README.md +21 -0
- package/docs/utils/protocolMeta/functions/buildProtocolMeta.md +21 -0
- package/docs/utils/protocolMeta/functions/parseProtocolMeta.md +21 -0
- package/docs/utils/protocolMeta/functions/validateProtocolMetaFormat.md +21 -0
- package/docs/utils/protocolMeta/interfaces/ProtocolMetaFields.md +41 -0
- package/docs/utils/protocolMeta/variables/SCHEME.md +11 -0
- package/package.json +42 -47
- package/dist/actioncode.d.ts +0 -120
- package/dist/actioncode.d.ts.map +0 -1
- package/dist/actioncode.js +0 -186
- package/dist/adapters/base.d.ts +0 -93
- package/dist/adapters/base.d.ts.map +0 -1
- package/dist/adapters/base.js +0 -65
- package/dist/adapters/solana/index.d.ts +0 -2
- package/dist/adapters/solana/index.d.ts.map +0 -1
- package/dist/adapters/solana/index.js +0 -30
- package/dist/adapters/solana/solana.d.ts +0 -113
- package/dist/adapters/solana/solana.d.ts.map +0 -1
- package/dist/adapters/solana/solana.js +0 -537
- package/dist/codegen.d.ts +0 -76
- package/dist/codegen.d.ts.map +0 -1
- package/dist/codegen.js +0 -211
- package/dist/constants.js +0 -24
- package/dist/meta.d.ts +0 -54
- package/dist/meta.d.ts.map +0 -1
- package/dist/meta.js +0 -104
- package/dist/protocol.d.ts +0 -179
- package/dist/protocol.d.ts.map +0 -1
- package/dist/protocol.js +0 -390
- package/docs/_media/LICENSE +0 -201
- package/docs/_media/README.md +0 -28
- package/docs/actioncode/README.md +0 -21
- package/docs/actioncode/classes/ActionCode.md +0 -430
- package/docs/actioncode/interfaces/ActionCodeFields.md +0 -89
- package/docs/actioncode/interfaces/ActionCodeMetadata.md +0 -25
- package/docs/actioncode/interfaces/ActionCodeTransaction.md +0 -57
- package/docs/actioncode/type-aliases/ActionCodeStatus.md +0 -11
- package/docs/adapters/base/README.md +0 -11
- package/docs/adapters/base/classes/BaseChainAdapter.md +0 -396
- package/docs/adapters/solana/README.md +0 -19
- package/docs/adapters/solana/solana/README.md +0 -15
- package/docs/adapters/solana/solana/classes/SolanaAdapter.md +0 -506
- package/docs/adapters/solana/solana/type-aliases/SolanaTransaction.md +0 -13
- package/docs/codegen/README.md +0 -11
- package/docs/codegen/classes/CodeGenerator.md +0 -341
- package/docs/constants/type-aliases/SupportedChain.md +0 -11
- package/docs/constants/variables/CODE_LENGTH.md +0 -11
- package/docs/constants/variables/CODE_TTL.md +0 -11
- package/docs/constants/variables/MAX_PREFIX_LENGTH.md +0 -11
- package/docs/constants/variables/MIN_PREFIX_LENGTH.md +0 -11
- package/docs/constants/variables/PROTOCOL_CODE_PREFIX.md +0 -11
- package/docs/constants/variables/PROTOCOL_PREFIX.md +0 -11
- package/docs/constants/variables/PROTOCOL_VERSION.md +0 -11
- package/docs/meta/README.md +0 -15
- package/docs/meta/classes/ProtocolMetaParser.md +0 -177
- package/docs/meta/interfaces/ProtocolMetaV1.md +0 -59
- package/docs/protocol/README.md +0 -51
- package/docs/protocol/classes/ActionCodesProtocol.md +0 -676
- package/docs/protocol/interfaces/ProtocolConfig.md +0 -71
@@ -1,71 +0,0 @@
|
|
1
|
-
[**@actioncodes/protocol**](../../README.md)
|
2
|
-
|
3
|
-
***
|
4
|
-
|
5
|
-
[@actioncodes/protocol](../../modules.md) / [protocol](../README.md) / ProtocolConfig
|
6
|
-
|
7
|
-
# Interface: ProtocolConfig
|
8
|
-
|
9
|
-
Defined in: [protocol.ts:10](https://github.com/otaprotocol/actioncodes/blob/7fa582d3aecdeca51131d2fc9eec0802298f9a4d/src/protocol.ts#L10)
|
10
|
-
|
11
|
-
OTA Protocol Configuration
|
12
|
-
|
13
|
-
## Properties
|
14
|
-
|
15
|
-
### codeLength
|
16
|
-
|
17
|
-
> **codeLength**: `number`
|
18
|
-
|
19
|
-
Defined in: [protocol.ts:18](https://github.com/otaprotocol/actioncodes/blob/7fa582d3aecdeca51131d2fc9eec0802298f9a4d/src/protocol.ts#L18)
|
20
|
-
|
21
|
-
Code length in digits
|
22
|
-
|
23
|
-
***
|
24
|
-
|
25
|
-
### codeTTL
|
26
|
-
|
27
|
-
> **codeTTL**: `number`
|
28
|
-
|
29
|
-
Defined in: [protocol.ts:16](https://github.com/otaprotocol/actioncodes/blob/7fa582d3aecdeca51131d2fc9eec0802298f9a4d/src/protocol.ts#L16)
|
30
|
-
|
31
|
-
Code TTL in milliseconds
|
32
|
-
|
33
|
-
***
|
34
|
-
|
35
|
-
### defaultPrefix
|
36
|
-
|
37
|
-
> **defaultPrefix**: `string`
|
38
|
-
|
39
|
-
Defined in: [protocol.ts:14](https://github.com/otaprotocol/actioncodes/blob/7fa582d3aecdeca51131d2fc9eec0802298f9a4d/src/protocol.ts#L14)
|
40
|
-
|
41
|
-
Default prefix for action codes
|
42
|
-
|
43
|
-
***
|
44
|
-
|
45
|
-
### maxPrefixLength
|
46
|
-
|
47
|
-
> **maxPrefixLength**: `number`
|
48
|
-
|
49
|
-
Defined in: [protocol.ts:20](https://github.com/otaprotocol/actioncodes/blob/7fa582d3aecdeca51131d2fc9eec0802298f9a4d/src/protocol.ts#L20)
|
50
|
-
|
51
|
-
Maximum prefix length
|
52
|
-
|
53
|
-
***
|
54
|
-
|
55
|
-
### minPrefixLength
|
56
|
-
|
57
|
-
> **minPrefixLength**: `number`
|
58
|
-
|
59
|
-
Defined in: [protocol.ts:22](https://github.com/otaprotocol/actioncodes/blob/7fa582d3aecdeca51131d2fc9eec0802298f9a4d/src/protocol.ts#L22)
|
60
|
-
|
61
|
-
Minimum prefix length
|
62
|
-
|
63
|
-
***
|
64
|
-
|
65
|
-
### version
|
66
|
-
|
67
|
-
> **version**: `string`
|
68
|
-
|
69
|
-
Defined in: [protocol.ts:12](https://github.com/otaprotocol/actioncodes/blob/7fa582d3aecdeca51131d2fc9eec0802298f9a4d/src/protocol.ts#L12)
|
70
|
-
|
71
|
-
Protocol version
|