@keetanetwork/keetanet-client 0.16.0 → 0.16.2

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 (210) hide show
  1. package/client/builder.d.ts +3 -3
  2. package/client/client_common_tests.d.ts +23 -4
  3. package/client/index-browser.d.ts +15 -13
  4. package/client/index-browser.js +878 -351
  5. package/client/index.d.ts +15 -13
  6. package/client/index.js +737 -253
  7. package/docs/assets/hierarchy.js +1 -1
  8. package/docs/assets/search.js +1 -1
  9. package/docs/classes/KeetaNetSDK.Client.html +10 -10
  10. package/docs/classes/KeetaNetSDK.Referenced.Account.html +34 -31
  11. package/docs/classes/KeetaNetSDK.Referenced.BaseSet.html +1 -1
  12. package/docs/classes/KeetaNetSDK.Referenced.BaseVoteBuilder.html +2 -2
  13. package/docs/classes/KeetaNetSDK.Referenced.Block.html +3 -3
  14. package/docs/classes/KeetaNetSDK.Referenced.BlockBuilder.html +1 -1
  15. package/docs/classes/KeetaNetSDK.Referenced.BlockHash.html +1 -1
  16. package/docs/classes/KeetaNetSDK.Referenced.BlockOperation.html +1 -1
  17. package/docs/classes/KeetaNetSDK.Referenced.BlockOperationCREATE_IDENTIFIER.html +2 -2
  18. package/docs/classes/KeetaNetSDK.Referenced.BlockOperationMANAGE_CERTIFICATE.html +2 -2
  19. package/docs/classes/KeetaNetSDK.Referenced.BlockOperationMODIFY_PERMISSIONS.html +2 -2
  20. package/docs/classes/KeetaNetSDK.Referenced.BlockOperationRECEIVE.html +2 -2
  21. package/docs/classes/KeetaNetSDK.Referenced.BlockOperationSEND.html +2 -2
  22. package/docs/classes/KeetaNetSDK.Referenced.BlockOperationSET_INFO.html +2 -2
  23. package/docs/classes/KeetaNetSDK.Referenced.BlockOperationSET_REP.html +2 -2
  24. package/docs/classes/KeetaNetSDK.Referenced.BlockOperationTOKEN_ADMIN_MODIFY_BALANCE.html +2 -2
  25. package/docs/classes/KeetaNetSDK.Referenced.BlockOperationTOKEN_ADMIN_SUPPLY.html +2 -2
  26. package/docs/classes/KeetaNetSDK.Referenced.Certificate.html +7 -7
  27. package/docs/classes/KeetaNetSDK.Referenced.CertificateBundle.html +1 -1
  28. package/docs/classes/KeetaNetSDK.Referenced.CertificateHash.html +1 -1
  29. package/docs/classes/KeetaNetSDK.Referenced.ECDSAKeyPair.html +1 -1
  30. package/docs/classes/KeetaNetSDK.Referenced.ECDSASECP256K1KeyPair.html +1 -1
  31. package/docs/classes/KeetaNetSDK.Referenced.ECDSASECP256K1PrivateKey.html +1 -1
  32. package/docs/classes/KeetaNetSDK.Referenced.ECDSASECP256K1PublicKey.html +1 -1
  33. package/docs/classes/KeetaNetSDK.Referenced.ECDSASECP256K1Signature.html +1 -1
  34. package/docs/classes/KeetaNetSDK.Referenced.ECDSASECP256R1KeyPair.html +1 -1
  35. package/docs/classes/KeetaNetSDK.Referenced.ECDSASECP256R1PrivateKey.html +1 -1
  36. package/docs/classes/KeetaNetSDK.Referenced.ECDSASECP256R1PublicKey.html +1 -1
  37. package/docs/classes/KeetaNetSDK.Referenced.ECDSASECP256R1Signature.html +1 -1
  38. package/docs/classes/KeetaNetSDK.Referenced.ED25519KeyPair.html +1 -1
  39. package/docs/classes/KeetaNetSDK.Referenced.ED25519PrivateKey.html +1 -1
  40. package/docs/classes/KeetaNetSDK.Referenced.ED25519PublicKey.html +1 -1
  41. package/docs/classes/KeetaNetSDK.Referenced.ED25519Signature.html +1 -1
  42. package/docs/classes/KeetaNetSDK.Referenced.ExternalKeyPair.html +1 -1
  43. package/docs/classes/KeetaNetSDK.Referenced.ExternalSet.html +1 -1
  44. package/docs/classes/KeetaNetSDK.Referenced.IdempotentKey.html +1 -1
  45. package/docs/classes/KeetaNetSDK.Referenced.IdentifierKey.html +1 -1
  46. package/docs/classes/KeetaNetSDK.Referenced.IdentifierKeyPair.html +4 -4
  47. package/docs/classes/KeetaNetSDK.Referenced.KeetaNetError.html +2 -2
  48. package/docs/classes/KeetaNetSDK.Referenced.KeetaNetErrorBase.html +1 -1
  49. package/docs/classes/KeetaNetSDK.Referenced.KeetaNetLedgerError.html +1 -1
  50. package/docs/classes/KeetaNetSDK.Referenced.KeetaNetLedgerIdempotentKeyError.html +1 -1
  51. package/docs/classes/KeetaNetSDK.Referenced.KeetaNetLedgerVoteError.html +1 -1
  52. package/docs/classes/KeetaNetSDK.Referenced.KeyInterface.html +1 -1
  53. package/docs/classes/KeetaNetSDK.Referenced.KeyStorage.html +1 -1
  54. package/docs/classes/KeetaNetSDK.Referenced.Ledger.html +2 -2
  55. package/docs/classes/KeetaNetSDK.Referenced.LedgerAtomicInterface.html +1 -1
  56. package/docs/classes/KeetaNetSDK.Referenced.P2PSwitch.html +2 -2
  57. package/docs/classes/KeetaNetSDK.Referenced.PermissionSetHolder.html +1 -1
  58. package/docs/classes/KeetaNetSDK.Referenced.PossiblyExpiredVote.html +2 -2
  59. package/docs/classes/KeetaNetSDK.Referenced.PossiblyUnsignedBlock.html +3 -3
  60. package/docs/classes/KeetaNetSDK.Referenced.SignatureStorage.html +1 -1
  61. package/docs/classes/KeetaNetSDK.Referenced.Stats.html +1 -1
  62. package/docs/classes/KeetaNetSDK.Referenced.StatsPending.html +1 -1
  63. package/docs/classes/KeetaNetSDK.Referenced.UnsignedBlock.html +3 -3
  64. package/docs/classes/KeetaNetSDK.Referenced.UserClientBuilder.html +11 -11
  65. package/docs/classes/KeetaNetSDK.Referenced.Vote.html +2 -2
  66. package/docs/classes/KeetaNetSDK.Referenced.VoteBlockBundle.html +4 -4
  67. package/docs/classes/KeetaNetSDK.Referenced.VoteBlockHash.html +1 -1
  68. package/docs/classes/KeetaNetSDK.Referenced.VoteBuilder.html +2 -2
  69. package/docs/classes/KeetaNetSDK.Referenced.VoteHash.html +1 -1
  70. package/docs/classes/KeetaNetSDK.Referenced.VoteLikeBase.html +2 -2
  71. package/docs/classes/KeetaNetSDK.Referenced.VoteQuote.html +2 -2
  72. package/docs/classes/KeetaNetSDK.Referenced.VoteQuoteBuilder.html +2 -2
  73. package/docs/classes/KeetaNetSDK.Referenced.VoteStaple.html +4 -4
  74. package/docs/classes/KeetaNetSDK.Referenced.VoteStapleHash.html +1 -1
  75. package/docs/classes/KeetaNetSDK.Referenced.src_lib_utils_buffer.BufferStorage.html +1 -1
  76. package/docs/classes/KeetaNetSDK.UserClient.html +20 -20
  77. package/docs/documents/GETTING-STARTED.html +1 -1
  78. package/docs/enums/KeetaNetSDK.Referenced.AccountKeyAlgorithm.html +8 -8
  79. package/docs/functions/KeetaNetSDK.Referenced.src_lib_utils_domain-separation.applyNamespace.html +5 -0
  80. package/docs/functions/KeetaNetSDK.Referenced.src_lib_utils_helper.getTypedObjectEntries.html +1 -0
  81. package/docs/hierarchy.html +1 -1
  82. package/docs/interfaces/KeetaNetSDK.Referenced.ACLEntry.html +1 -1
  83. package/docs/interfaces/KeetaNetSDK.Referenced.ACLUpdate.html +1 -1
  84. package/docs/interfaces/KeetaNetSDK.Referenced.ASN1ExplicitContextTag.html +1 -1
  85. package/docs/interfaces/KeetaNetSDK.Referenced.ASN1ImplicitContextTag.html +1 -1
  86. package/docs/interfaces/KeetaNetSDK.Referenced.ASN1Object.html +1 -1
  87. package/docs/interfaces/KeetaNetSDK.Referenced.BaseAccountInfo.html +10 -0
  88. package/docs/interfaces/KeetaNetSDK.Referenced.BaseExternalKeyPairFunctions.html +1 -1
  89. package/docs/interfaces/KeetaNetSDK.Referenced.BaseGenerationConfig.html +2 -2
  90. package/docs/interfaces/KeetaNetSDK.Referenced.BaseIdentifierAccountInfo.html +12 -0
  91. package/docs/interfaces/KeetaNetSDK.Referenced.BaseIdentifierCreateArguments.html +1 -1
  92. package/docs/interfaces/KeetaNetSDK.Referenced.BlockJSONOperation.html +1 -1
  93. package/docs/interfaces/KeetaNetSDK.Referenced.BlockJSONOperationCREATE_IDENTIFIER.html +2 -2
  94. package/docs/interfaces/KeetaNetSDK.Referenced.BlockJSONOperationMANAGE_CERTIFICATE.html +2 -2
  95. package/docs/interfaces/KeetaNetSDK.Referenced.BlockJSONOperationMODIFY_PERMISSIONS.html +1 -1
  96. package/docs/interfaces/KeetaNetSDK.Referenced.BlockJSONOperationRECEIVE.html +1 -1
  97. package/docs/interfaces/KeetaNetSDK.Referenced.BlockJSONOperationSEND.html +1 -1
  98. package/docs/interfaces/KeetaNetSDK.Referenced.BlockJSONOperationSET_INFO.html +1 -1
  99. package/docs/interfaces/KeetaNetSDK.Referenced.BlockJSONOperationSET_REP.html +1 -1
  100. package/docs/interfaces/KeetaNetSDK.Referenced.BlockJSONOperationTOKEN_ADMIN_MODIFY_BALANCE.html +1 -1
  101. package/docs/interfaces/KeetaNetSDK.Referenced.BlockJSONOperationTOKEN_ADMIN_SUPPLY.html +1 -1
  102. package/docs/interfaces/KeetaNetSDK.Referenced.BlockV1Canonical.html +1 -1
  103. package/docs/interfaces/KeetaNetSDK.Referenced.BlockV1JSON.html +2 -2
  104. package/docs/interfaces/KeetaNetSDK.Referenced.BlockV2Canonical.html +1 -1
  105. package/docs/interfaces/KeetaNetSDK.Referenced.BuilderBlockOptions.html +2 -2
  106. package/docs/interfaces/KeetaNetSDK.Referenced.Constructor.html +1 -1
  107. package/docs/interfaces/KeetaNetSDK.Referenced.DisposableTimingHandle.html +1 -1
  108. package/docs/interfaces/KeetaNetSDK.Referenced.ECDSA_SECP256K1AccountInfo.html +10 -0
  109. package/docs/interfaces/KeetaNetSDK.Referenced.ECDSA_SECP256R1AccountInfo.html +10 -0
  110. package/docs/interfaces/KeetaNetSDK.Referenced.ED25519AccountInfo.html +10 -0
  111. package/docs/interfaces/KeetaNetSDK.Referenced.ExternalKeyPairFunctionsNoEncryption.html +1 -1
  112. package/docs/interfaces/KeetaNetSDK.Referenced.ExternalKeyPairFunctionsSupportsEncryption.html +1 -1
  113. package/docs/interfaces/KeetaNetSDK.Referenced.FeeAmountAndToken.html +2 -2
  114. package/docs/interfaces/KeetaNetSDK.Referenced.FeeAmountAndTokenJSON.html +2 -2
  115. package/docs/interfaces/KeetaNetSDK.Referenced.IdentifierCreateRequest.html +2 -2
  116. package/docs/interfaces/KeetaNetSDK.Referenced.InitialConfigSupply.html +2 -2
  117. package/docs/interfaces/KeetaNetSDK.Referenced.InstanceSet.html +1 -1
  118. package/docs/interfaces/KeetaNetSDK.Referenced.KVGenericOptionsType.html +1 -1
  119. package/docs/interfaces/KeetaNetSDK.Referenced.KVSetOptionsType.html +1 -1
  120. package/docs/interfaces/KeetaNetSDK.Referenced.LedgerConfig.html +4 -4
  121. package/docs/interfaces/KeetaNetSDK.Referenced.LedgerStorageAPI.html +5 -5
  122. package/docs/interfaces/KeetaNetSDK.Referenced.ModifyTokenBalanceEntry.html +1 -1
  123. package/docs/interfaces/KeetaNetSDK.Referenced.MultiSigIdentifierCreateArguments.html +2 -2
  124. package/docs/interfaces/KeetaNetSDK.Referenced.MultisigAccountInfo.html +14 -0
  125. package/docs/interfaces/KeetaNetSDK.Referenced.MultisigConfig.html +2 -2
  126. package/docs/interfaces/KeetaNetSDK.Referenced.NetworkAccountInfo.html +12 -0
  127. package/docs/interfaces/KeetaNetSDK.Referenced.NodeConfig.html +4 -4
  128. package/docs/interfaces/KeetaNetSDK.Referenced.NumericValueEntry.html +1 -1
  129. package/docs/interfaces/KeetaNetSDK.Referenced.P2PPeerBase.html +1 -1
  130. package/docs/interfaces/KeetaNetSDK.Referenced.P2PPeerListener.html +1 -1
  131. package/docs/interfaces/KeetaNetSDK.Referenced.P2PPeerRepBase.html +1 -1
  132. package/docs/interfaces/KeetaNetSDK.Referenced.PendingOperations.html +2 -2
  133. package/docs/interfaces/KeetaNetSDK.Referenced.PendingOperationsJSON.html +2 -2
  134. package/docs/interfaces/KeetaNetSDK.Referenced.PrincipalACLWithInfoParsed.html +3 -10
  135. package/docs/interfaces/KeetaNetSDK.Referenced.PublicKeyStorage.html +1 -1
  136. package/docs/interfaces/KeetaNetSDK.Referenced.PublishOptions.html +1 -1
  137. package/docs/interfaces/KeetaNetSDK.Referenced.RequestTokenReceiveEntry.html +1 -1
  138. package/docs/interfaces/KeetaNetSDK.Referenced.StorageAccountInfo.html +12 -0
  139. package/docs/interfaces/KeetaNetSDK.Referenced.TokenAccountInfo.html +14 -0
  140. package/docs/interfaces/KeetaNetSDK.Referenced.TokenNumericEntry.html +1 -1
  141. package/docs/interfaces/KeetaNetSDK.Referenced.UserClientConfig.html +2 -2
  142. package/docs/interfaces/KeetaNetSDK.Referenced.UserClientOptions.html +1 -1
  143. package/docs/interfaces/KeetaNetSDK.Referenced.VoteJSON.html +2 -2
  144. package/docs/interfaces/KeetaNetSDK.Referenced.VoteStapleJSON.html +2 -2
  145. package/docs/interfaces/KeetaNetSDK.Referenced.WithIsInstance.html +1 -1
  146. package/docs/interfaces/KeetaNetSDK.Referenced.signOptionsType.html +16 -3
  147. package/docs/interfaces/KeetaNetSDK.Referenced.src_lib_utils_asn1.ASN1BitString.html +1 -1
  148. package/docs/interfaces/KeetaNetSDK.Referenced.src_lib_utils_asn1.ASN1Date.html +1 -1
  149. package/docs/interfaces/KeetaNetSDK.Referenced.src_lib_utils_asn1.ASN1OID.html +1 -1
  150. package/docs/interfaces/KeetaNetSDK.Referenced.src_lib_utils_asn1.ASN1Set.html +1 -1
  151. package/docs/interfaces/KeetaNetSDK.Referenced.src_lib_utils_asn1.ASN1String.html +1 -1
  152. package/docs/interfaces/KeetaNetSDK.Referenced.src_lib_utils_asn1.ASN1Struct.html +1 -1
  153. package/docs/modules/KeetaNetSDK.Referenced.html +1 -1
  154. package/docs/modules/KeetaNetSDK.Referenced.src_lib_utils_domain-separation.html +1 -0
  155. package/docs/modules/KeetaNetSDK.Referenced.src_lib_utils_helper.html +1 -1
  156. package/docs/types/KeetaNetSDK.Referenced.AccountInfo.html +1 -0
  157. package/docs/types/KeetaNetSDK.Referenced.AccountInfoForType.html +1 -0
  158. package/docs/types/KeetaNetSDK.Referenced.AccountInfoResponse.html +2 -2
  159. package/docs/types/KeetaNetSDK.Referenced.AccountInfoWithoutAccount.html +1 -0
  160. package/docs/types/{KeetaNetSDK.Referenced.src_lib_utils_helper.DistributiveOmit.html → KeetaNetSDK.Referenced.DistributiveOmit.html} +1 -1
  161. package/docs/types/KeetaNetSDK.Referenced.GetAccountStateAPIResponseFormatted.html +5 -12
  162. package/docs/types/KeetaNetSDK.Referenced.KeyPairAccountInfo.html +1 -0
  163. package/docs/types/KeetaNetSDK.Referenced.KeyPairKeyAlgorithm.html +1 -0
  164. package/docs/types/KeetaNetSDK.Referenced.NetworkAddress.html +1 -1
  165. package/docs/types/KeetaNetSDK.Referenced.StorageAddress.html +1 -1
  166. package/docs/types/KeetaNetSDK.Referenced.TokenAddress.html +1 -1
  167. package/docs/types/KeetaNetSDK.Referenced.TokenOrPending.html +1 -1
  168. package/docs/types/KeetaNetSDK.Referenced.UserEditableAccountInfo.html +1 -1
  169. package/docs/types/KeetaNetSDK.Referenced.VoteBuilderOptions.html +2 -2
  170. package/docs/types/KeetaNetSDK.Referenced.src_lib_utils_conversion.ToJSONSerializable.html +1 -1
  171. package/docs/types/KeetaNetSDK.Referenced.src_lib_utils_initial.BaseNetworkInfo.html +1 -1
  172. package/docs/variables/KeetaNetSDK.Referenced.allFullErrorCodes.html +1 -1
  173. package/docs/variables/KeetaNetSDK.Referenced.identifierKeyTypes.html +1 -1
  174. package/docs/variables/KeetaNetSDK.Referenced.src_lib_utils_domain-separation.KeetaNamespaceVersion.html +3 -0
  175. package/docs/variables/KeetaNetSDK.Referenced.src_lib_utils_domain-separation.MaxNamespaceLength.html +3 -0
  176. package/docs/variables/KeetaNetSDK.Referenced.src_lib_utils_domain-separation.namespacePrefixSchema.html +9 -0
  177. package/docs/variables/KeetaNetSDK.lib.html +2 -2
  178. package/lib/account.d.ts +39 -1
  179. package/lib/block/index.d.ts +126 -108
  180. package/lib/block/operations.d.ts +11 -0
  181. package/lib/error/account.d.ts +2 -2
  182. package/lib/error/index.d.ts +1 -1
  183. package/lib/error/vote.d.ts +2 -2
  184. package/lib/index.d.ts +4 -2
  185. package/lib/ledger/common.d.ts +15 -3
  186. package/lib/ledger/db_dynamodb.d.ts +6 -6
  187. package/lib/ledger/db_postgres.d.ts +3 -3
  188. package/lib/ledger/db_spanner.d.ts +4 -4
  189. package/lib/ledger/db_spanner_helper.d.ts +2 -2
  190. package/lib/ledger/db_sqlite.d.ts +3 -3
  191. package/lib/ledger/effects.d.ts +3 -1
  192. package/lib/ledger/index.d.ts +9 -9
  193. package/lib/ledger/types.d.ts +43 -9
  194. package/lib/log/target_gcp.js +3 -0
  195. package/lib/log/target_https.js +7 -0
  196. package/lib/utils/certificate.d.ts +13 -12
  197. package/lib/utils/conversion.d.ts +12 -3
  198. package/lib/utils/domain-separation.d.ts +31 -0
  199. package/lib/utils/external-keys/gcp-kms.d.ts +53 -0
  200. package/lib/utils/external-keys/gcp-kms.js +328 -0
  201. package/lib/utils/external-keys/passkey-prf.d.ts +1 -3
  202. package/lib/utils/external-keys/passkey-prf.js +6 -0
  203. package/lib/utils/helper.d.ts +1 -0
  204. package/lib/utils/initial.d.ts +3 -2
  205. package/lib/utils/never.d.ts +4 -0
  206. package/lib/vote.d.ts +96 -89
  207. package/npm-shrinkwrap.json +30 -12
  208. package/package.json +2 -2
  209. package/version.d.ts +1 -1
  210. package/docs/interfaces/KeetaNetSDK.Referenced.AccountInfo.html +0 -14
package/lib/account.d.ts CHANGED
@@ -83,6 +83,7 @@ type AccountKeyAlgorithmHexReverse = {
83
83
  type AccountKeyAlgorithmHexToType<T extends PublicKeyAndTypeStringHex> = T extends `0x${infer AlgorithmHex1}${infer AlgorithmHex2}${string}` ? `0x${AlgorithmHex1}${AlgorithmHex2}` extends keyof AccountKeyAlgorithmHexReverse ? AccountKeyAlgorithmHexReverse[`0x${AlgorithmHex1}${AlgorithmHex2}`] : never : never;
84
84
  declare const identifierKeyTypes: readonly [AccountKeyAlgorithm.NETWORK, AccountKeyAlgorithm.TOKEN, AccountKeyAlgorithm.STORAGE, AccountKeyAlgorithm.MULTISIG];
85
85
  export type IdentifierKeyAlgorithm = typeof identifierKeyTypes[any];
86
+ export type KeyPairKeyAlgorithm = Exclude<AccountKeyAlgorithm, IdentifierKeyAlgorithm>;
86
87
  /**
87
88
  * Things we can use to construct a key from
88
89
  */
@@ -171,6 +172,25 @@ interface signOptionsType {
171
172
  * is accept for X.509
172
173
  */
173
174
  forCert?: boolean;
175
+ /**
176
+ * Additional data (usually raw value) that is being signed
177
+ * For example, when signing a block this would be the output of UnsignedBlock.toBytes(false)
178
+ */
179
+ ancillaryData?: ArrayBuffer;
180
+ /**
181
+ * Optional domain-separation namespace applied to `data` before hashing
182
+ * and signing (or verifying), using the `NamespacePrefix` schema. This
183
+ * prevents cross-context signature reuse between applications that
184
+ * share a key but use different namespaces.
185
+ *
186
+ * Signer and verifier MUST supply the same namespace. Domain separation
187
+ * is applied regardless of `raw`; `raw` controls only the subsequent
188
+ * hash step.
189
+ *
190
+ * If `namespace` is a string, the 1-255 byte limit applies to the UTF-8
191
+ * encoded namespace bytes, not the string's character count.
192
+ */
193
+ namespace?: string | ArrayBuffer;
174
194
  }
175
195
  /**
176
196
  * Signing function, accepts arbitrary data and returns a detached signature
@@ -372,16 +392,31 @@ declare class IdentifierKeyPair extends KeyInterface {
372
392
  encrypt(..._ignored_parameters: Parameters<encryptFunctionType>): ReturnType<encryptFunctionType>;
373
393
  decrypt(..._ignored_parameters: Parameters<decryptFunctionType>): ReturnType<decryptFunctionType>;
374
394
  }
395
+ type KeyPairClassesByAlgorithm = {
396
+ [AccountKeyAlgorithm.ECDSA_SECP256K1]: typeof ECDSASECP256K1KeyPair;
397
+ [AccountKeyAlgorithm.ECDSA_SECP256R1]: typeof ECDSASECP256R1KeyPair;
398
+ [AccountKeyAlgorithm.ED25519]: typeof ED25519KeyPair;
399
+ [AccountKeyAlgorithm.NETWORK]: typeof IdentifierKeyPair;
400
+ [AccountKeyAlgorithm.TOKEN]: typeof IdentifierKeyPair;
401
+ [AccountKeyAlgorithm.STORAGE]: typeof IdentifierKeyPair;
402
+ [AccountKeyAlgorithm.MULTISIG]: typeof IdentifierKeyPair;
403
+ };
375
404
  /**
376
405
  * Account class, which is used to represent a key pair or an identifier
377
406
  * account (which have no private key) such as tokens.
378
407
  *
379
408
  * @template T - The type of the key algorithm used for this account.
380
409
  */
381
- export declare class Account<T extends AccountKeyAlgorithm = Exclude<AccountKeyAlgorithm, IdentifierKeyAlgorithm>> {
410
+ export declare class Account<T extends AccountKeyAlgorithm = KeyPairKeyAlgorithm> {
382
411
  #private;
383
412
  static AccountKeyAlgorithm: typeof AccountKeyAlgorithm;
384
413
  static ExternalKeyPair: typeof ExternalKeyPair;
414
+ /**
415
+ * Access to the underlying Key Pair classes for advanced use cases.
416
+ */
417
+ static readonly KeyPairs: {
418
+ [K in AccountKeyAlgorithm]: KeyPairClassesByAlgorithm[K];
419
+ };
385
420
  /**
386
421
  * Construct an account from a public key string. The public key
387
422
  * string encodes the type and public key data
@@ -562,6 +597,9 @@ export declare class Account<T extends AccountKeyAlgorithm = Exclude<AccountKeyA
562
597
  * Determine if an account is an identifier
563
598
  */
564
599
  isIdentifier(): this is IdentifierAddress;
600
+ /**
601
+ * Determine if an account is a regular (non-identifier)
602
+ */
565
603
  isAccount(): this is Account;
566
604
  isKeyType<CheckType extends AccountKeyAlgorithm>(checkKeyType: CheckType): this is Account<CheckType>;
567
605
  isStorage(): this is Account<AccountKeyAlgorithm.STORAGE>;
@@ -184,7 +184,7 @@ declare abstract class PossiblyUnsignedBlock<HasSignature extends boolean> imple
184
184
  readonly subnet: SubnetID | undefined;
185
185
  readonly signer: BlockSignerField;
186
186
  readonly signatures: HasSignature extends true ? BlockSignatureField : null;
187
- get principal(): MultisigAddress | Account<AccountKeyAlgorithm.ECDSA_SECP256K1 | AccountKeyAlgorithm.ED25519 | AccountKeyAlgorithm.ECDSA_SECP256R1>;
187
+ get principal(): MultisigAddress | Account<import("../account").KeyPairKeyAlgorithm>;
188
188
  protected static getSortedRequiredSigners(input: BlockSignerField): Account[];
189
189
  readonly $opening: boolean;
190
190
  protected static isValidJSONSignedOrUnsigned<AssertSignatureField extends boolean, Version extends 1 | 2>(assertSignatureIncluded: AssertSignatureField, block: unknown, version?: Version): block is AssertSignatureField extends true ? ({
@@ -201,82 +201,94 @@ declare abstract class PossiblyUnsignedBlock<HasSignature extends boolean> imple
201
201
  protected static getV2ASN1ContainerWithoutSignature(input: BlockV2UnsignedCanonical | BlockV2Canonical): BlockV2ASN1WithoutSignature;
202
202
  protected static getASN1ContainerWithoutSignature(input: Omit<BlockV1UnsignedCanonical, 'signature'> | Omit<BlockV2UnsignedCanonical, 'signatures'>): BlockASN1SchemaWithoutSignature;
203
203
  toJSON(options?: ToJSONSerializableOptions): {
204
- $binary?: string | undefined;
205
- signature?: string | undefined;
206
- signatures?: string[] | undefined;
207
204
  version: 1 | 2;
208
- idempotent: string | undefined;
209
205
  date: string;
210
206
  previous: BlockHashString;
211
207
  account: import("../account").TokenPublicKeyString | import("../account").NetworkPublicKeyString | import("../account").StoragePublicKeyString | import("../account").MultisigPublicKeyString | import("../account").Secp256K1PublicKeyString | import("../account").Secp256R1PublicKeyString | import("../account").ED25519PublicKeyString;
212
208
  purpose: BlockPurpose;
213
209
  signer: import("../account").Secp256K1PublicKeyString | import("../account").Secp256R1PublicKeyString | import("../account").ED25519PublicKeyString | [import("../account").MultisigPublicKeyString, (import("../account").Secp256K1PublicKeyString | import("../account").Secp256R1PublicKeyString | import("../account").ED25519PublicKeyString | [import("../account").MultisigPublicKeyString, (import("../account").Secp256K1PublicKeyString | import("../account").Secp256R1PublicKeyString | import("../account").ED25519PublicKeyString | [import("../account").MultisigPublicKeyString, (import("../account").Secp256K1PublicKeyString | import("../account").Secp256R1PublicKeyString | import("../account").ED25519PublicKeyString | [import("../account").MultisigPublicKeyString, (import("../account").Secp256K1PublicKeyString | import("../account").Secp256R1PublicKeyString | import("../account").ED25519PublicKeyString | [never, never[]])[]])[]])[]])[]];
214
210
  network: string;
215
- subnet: string | undefined;
216
- operations: ({
211
+ operations: (({
217
212
  type: Operations.OperationType.SEND;
218
213
  to: string;
219
214
  amount: string;
220
215
  token: import("../account").TokenPublicKeyString;
216
+ } & {
221
217
  external?: string | undefined;
222
- } | {
218
+ }) | ({
223
219
  type: Operations.OperationType.SET_REP;
224
220
  to: string;
225
- } | {
221
+ } & {}) | ({
226
222
  type: Operations.OperationType.SET_INFO;
227
223
  name: string;
228
224
  description: string;
229
225
  metadata: string;
226
+ } & {
230
227
  defaultPermission?: false | [string, number[]] | [string, string] | [number[] | import("../permissions").BaseFlagNames, number[]] | undefined;
231
- } | {
228
+ }) | ({
232
229
  type: Operations.OperationType.MODIFY_PERMISSIONS;
233
230
  principal: string;
234
231
  method: AdjustMethod;
235
232
  permissions: false | [string, number[]] | [string, string] | [number[] | import("../permissions").BaseFlagNames, number[]] | null;
233
+ } & {
236
234
  target?: string | undefined;
237
- } | {
235
+ }) | ({
238
236
  type: Operations.OperationType.CREATE_IDENTIFIER;
239
237
  identifier: string;
240
- createArguments?: {
238
+ } & {
239
+ createArguments?: ({
241
240
  type: AccountKeyAlgorithm.MULTISIG;
242
241
  signers: (import("../account").MultisigPublicKeyString | import("../account").Secp256K1PublicKeyString | import("../account").Secp256R1PublicKeyString | import("../account").ED25519PublicKeyString)[];
243
242
  quorum: string;
244
- } | {
243
+ } & {}) | ({
245
244
  type: AccountKeyAlgorithm.MULTISIG;
246
245
  signers: (import("../account").MultisigPublicKeyString | import("../account").Secp256K1PublicKeyString | import("../account").Secp256R1PublicKeyString | import("../account").ED25519PublicKeyString)[];
247
246
  quorum: string;
248
- } | undefined;
249
- } | {
247
+ } & {}) | undefined;
248
+ }) | ({
250
249
  type: Operations.OperationType.TOKEN_ADMIN_SUPPLY;
251
250
  amount: string;
252
251
  method: AdjustMethod.ADD | AdjustMethod.SUBTRACT;
253
- } | {
252
+ } & {}) | ({
254
253
  type: Operations.OperationType.TOKEN_ADMIN_MODIFY_BALANCE;
255
254
  token: import("../account").TokenPublicKeyString;
256
255
  amount: string;
257
256
  method: AdjustMethod;
258
- } | {
257
+ } & {}) | ({
259
258
  type: Operations.OperationType.RECEIVE;
260
259
  amount: string;
261
260
  token: import("../account").TokenPublicKeyString;
262
261
  from: string;
262
+ } & {
263
263
  forward?: string | undefined;
264
264
  exact?: boolean | undefined;
265
- } | {
265
+ }) | ({
266
266
  type: Operations.OperationType.MANAGE_CERTIFICATE;
267
267
  certificateOrHash: string | (string & {
268
268
  readonly __certificateHash: never;
269
- }) | {
270
- $binary?: string | undefined;
271
- $chain?: undefined;
269
+ }) | ({
272
270
  serial: string;
273
271
  notBefore: string;
274
272
  notAfter: string;
275
273
  subject: string;
276
274
  issuer: string;
277
275
  subjectPublicKey: import("../account").Secp256K1PublicKeyString | import("../account").Secp256R1PublicKeyString | import("../account").ED25519PublicKeyString;
278
- baseExtensions: {
279
- basicConstraints?: [ca: boolean, pathLenConstraint?: string | undefined] | undefined;
276
+ subjectDN: {
277
+ name: string;
278
+ value: string;
279
+ }[];
280
+ issuerDN: {
281
+ name: string;
282
+ value: string;
283
+ }[];
284
+ $hash: string & {
285
+ readonly __certificateHash: never;
286
+ };
287
+ } & {
288
+ $binary?: string | undefined;
289
+ $chain?: undefined;
290
+ baseExtensions?: ({} & {
291
+ basicConstraints?: [ca: boolean, pathLenConstraint?: string | null | undefined] | undefined;
280
292
  keyUsage?: {
281
293
  digitalSignature?: boolean | undefined;
282
294
  nonRepudiation?: boolean | undefined;
@@ -289,12 +301,19 @@ declare abstract class PossiblyUnsignedBlock<HasSignature extends boolean> imple
289
301
  decipherOnly?: boolean | undefined;
290
302
  } | undefined;
291
303
  subjectKeyIdentifier?: string | undefined;
292
- authorityKeyIdentifier?: {
304
+ authorityKeyIdentifier?: ({
293
305
  type: "context";
294
306
  value: 0;
295
307
  contains: string;
296
- } | undefined;
297
- } | undefined;
308
+ } & {}) | undefined;
309
+ }) | undefined;
310
+ }) | ({
311
+ serial: string;
312
+ notBefore: string;
313
+ notAfter: string;
314
+ subject: string;
315
+ issuer: string;
316
+ subjectPublicKey: import("../account").Secp256K1PublicKeyString | import("../account").Secp256R1PublicKeyString | import("../account").ED25519PublicKeyString;
298
317
  subjectDN: {
299
318
  name: string;
300
319
  value: string;
@@ -306,17 +325,11 @@ declare abstract class PossiblyUnsignedBlock<HasSignature extends boolean> imple
306
325
  $hash: string & {
307
326
  readonly __certificateHash: never;
308
327
  };
309
- } | {
328
+ } & {
310
329
  $binary?: string | undefined;
311
330
  $chain?: undefined;
312
- serial: string;
313
- notBefore: string;
314
- notAfter: string;
315
- subject: string;
316
- issuer: string;
317
- subjectPublicKey: import("../account").Secp256K1PublicKeyString | import("../account").Secp256R1PublicKeyString | import("../account").ED25519PublicKeyString;
318
- baseExtensions: {
319
- basicConstraints?: [ca: boolean, pathLenConstraint?: string | undefined] | undefined;
331
+ baseExtensions?: ({} & {
332
+ basicConstraints?: [ca: boolean, pathLenConstraint?: string | null | undefined] | undefined;
320
333
  keyUsage?: {
321
334
  digitalSignature?: boolean | undefined;
322
335
  nonRepudiation?: boolean | undefined;
@@ -329,31 +342,27 @@ declare abstract class PossiblyUnsignedBlock<HasSignature extends boolean> imple
329
342
  decipherOnly?: boolean | undefined;
330
343
  } | undefined;
331
344
  subjectKeyIdentifier?: string | undefined;
332
- authorityKeyIdentifier?: {
345
+ authorityKeyIdentifier?: ({
333
346
  type: "context";
334
347
  value: 0;
335
348
  contains: string;
336
- } | undefined;
337
- } | undefined;
338
- subjectDN: {
339
- name: string;
340
- value: string;
341
- }[];
342
- issuerDN: {
343
- name: string;
344
- value: string;
345
- }[];
346
- $hash: string & {
347
- readonly __certificateHash: never;
348
- };
349
- };
349
+ } & {}) | undefined;
350
+ }) | undefined;
351
+ });
352
+ method: Exclude<AdjustMethod, AdjustMethod.SET>;
353
+ } & {
350
354
  intermediateCertificates?: string | {
351
355
  certificates: string[];
352
356
  } | null | undefined;
353
- method: Exclude<AdjustMethod, AdjustMethod.SET>;
354
- })[];
357
+ }))[];
355
358
  $hash: BlockHashString;
356
359
  $opening: boolean;
360
+ } & {
361
+ $binary?: string | undefined;
362
+ signature?: string | undefined;
363
+ signatures?: string[] | undefined;
364
+ idempotent?: string | undefined;
365
+ subnet?: string | undefined;
357
366
  };
358
367
  /**
359
368
  * Hash of the block minus the signature
@@ -407,78 +416,97 @@ export declare class BlockBuilder {
407
416
  protected get currentWIP(): BlockJSONIncomplete;
408
417
  protected get currentBlockSealed(): Block;
409
418
  toJSON(opts?: ToJSONSerializableOptions): {
410
- version: number | undefined;
411
- idempotent: string | undefined;
412
- date: string | undefined;
413
- previous: BlockHashString | undefined;
414
- account: import("../account").TokenPublicKeyString | import("../account").NetworkPublicKeyString | import("../account").StoragePublicKeyString | import("../account").MultisigPublicKeyString | import("../account").Secp256K1PublicKeyString | import("../account").Secp256R1PublicKeyString | import("../account").ED25519PublicKeyString | undefined;
415
- signer: string | [string, (string | [string, (string | [string, (string | [string, (string | [string, never[]])[]])[]])[]])[]] | undefined;
416
- network: string | undefined;
417
- subnet: string | undefined;
418
- operations: ({
419
+ purpose: BlockPurpose;
420
+ } & {
421
+ version?: number | undefined;
422
+ idempotent?: string | undefined;
423
+ date?: string | undefined;
424
+ previous?: BlockHashString | undefined;
425
+ account?: import("../account").TokenPublicKeyString | import("../account").NetworkPublicKeyString | import("../account").StoragePublicKeyString | import("../account").MultisigPublicKeyString | import("../account").Secp256K1PublicKeyString | import("../account").Secp256R1PublicKeyString | import("../account").ED25519PublicKeyString | undefined;
426
+ signer?: string | [string, (string | [string, (string | [string, (string | [string, (string | [string, never[]])[]])[]])[]])[]] | undefined;
427
+ network?: string | undefined;
428
+ subnet?: string | undefined;
429
+ operations?: (({
419
430
  type: Operations.OperationType.SEND;
420
431
  to: string;
421
432
  amount: string;
422
433
  token: import("../account").TokenPublicKeyString;
434
+ } & {
423
435
  external?: string | undefined;
424
- } | {
436
+ }) | ({
425
437
  type: Operations.OperationType.SET_REP;
426
438
  to: string;
427
- } | {
439
+ } & {}) | ({
428
440
  type: Operations.OperationType.SET_INFO;
429
441
  name: string;
430
442
  description: string;
431
443
  metadata: string;
444
+ } & {
432
445
  defaultPermission?: false | [string, number[]] | [string, string] | [number[] | import("../permissions").BaseFlagNames, number[]] | undefined;
433
- } | {
446
+ }) | ({
434
447
  type: Operations.OperationType.MODIFY_PERMISSIONS;
435
448
  principal: string;
436
449
  method: AdjustMethod;
437
450
  permissions: false | [string, number[]] | [string, string] | [number[] | import("../permissions").BaseFlagNames, number[]] | null;
451
+ } & {
438
452
  target?: string | undefined;
439
- } | {
453
+ }) | ({
440
454
  type: Operations.OperationType.CREATE_IDENTIFIER;
441
455
  identifier: string;
442
- createArguments?: {
456
+ } & {
457
+ createArguments?: ({
443
458
  type: AccountKeyAlgorithm.MULTISIG;
444
459
  signers: (import("../account").MultisigPublicKeyString | import("../account").Secp256K1PublicKeyString | import("../account").Secp256R1PublicKeyString | import("../account").ED25519PublicKeyString)[];
445
460
  quorum: string;
446
- } | {
461
+ } & {}) | ({
447
462
  type: AccountKeyAlgorithm.MULTISIG;
448
463
  signers: (import("../account").MultisigPublicKeyString | import("../account").Secp256K1PublicKeyString | import("../account").Secp256R1PublicKeyString | import("../account").ED25519PublicKeyString)[];
449
464
  quorum: string;
450
- } | undefined;
451
- } | {
465
+ } & {}) | undefined;
466
+ }) | ({
452
467
  type: Operations.OperationType.TOKEN_ADMIN_SUPPLY;
453
468
  amount: string;
454
469
  method: AdjustMethod.ADD | AdjustMethod.SUBTRACT;
455
- } | {
470
+ } & {}) | ({
456
471
  type: Operations.OperationType.TOKEN_ADMIN_MODIFY_BALANCE;
457
472
  token: import("../account").TokenPublicKeyString;
458
473
  amount: string;
459
474
  method: AdjustMethod;
460
- } | {
475
+ } & {}) | ({
461
476
  type: Operations.OperationType.RECEIVE;
462
477
  amount: string;
463
478
  token: import("../account").TokenPublicKeyString;
464
479
  from: string;
480
+ } & {
465
481
  forward?: string | undefined;
466
482
  exact?: boolean | undefined;
467
- } | {
483
+ }) | ({
468
484
  type: Operations.OperationType.MANAGE_CERTIFICATE;
469
485
  certificateOrHash: string | (string & {
470
486
  readonly __certificateHash: never;
471
- }) | {
472
- $binary?: string | undefined;
473
- $chain?: undefined;
487
+ }) | ({
474
488
  serial: string;
475
489
  notBefore: string;
476
490
  notAfter: string;
477
491
  subject: string;
478
492
  issuer: string;
479
493
  subjectPublicKey: import("../account").Secp256K1PublicKeyString | import("../account").Secp256R1PublicKeyString | import("../account").ED25519PublicKeyString;
480
- baseExtensions: {
481
- basicConstraints?: [ca: boolean, pathLenConstraint?: string | undefined] | undefined;
494
+ subjectDN: {
495
+ name: string;
496
+ value: string;
497
+ }[];
498
+ issuerDN: {
499
+ name: string;
500
+ value: string;
501
+ }[];
502
+ $hash: string & {
503
+ readonly __certificateHash: never;
504
+ };
505
+ } & {
506
+ $binary?: string | undefined;
507
+ $chain?: undefined;
508
+ baseExtensions?: ({} & {
509
+ basicConstraints?: [ca: boolean, pathLenConstraint?: string | null | undefined] | undefined;
482
510
  keyUsage?: {
483
511
  digitalSignature?: boolean | undefined;
484
512
  nonRepudiation?: boolean | undefined;
@@ -491,12 +519,19 @@ export declare class BlockBuilder {
491
519
  decipherOnly?: boolean | undefined;
492
520
  } | undefined;
493
521
  subjectKeyIdentifier?: string | undefined;
494
- authorityKeyIdentifier?: {
522
+ authorityKeyIdentifier?: ({
495
523
  type: "context";
496
524
  value: 0;
497
525
  contains: string;
498
- } | undefined;
499
- } | undefined;
526
+ } & {}) | undefined;
527
+ }) | undefined;
528
+ }) | ({
529
+ serial: string;
530
+ notBefore: string;
531
+ notAfter: string;
532
+ subject: string;
533
+ issuer: string;
534
+ subjectPublicKey: import("../account").Secp256K1PublicKeyString | import("../account").Secp256R1PublicKeyString | import("../account").ED25519PublicKeyString;
500
535
  subjectDN: {
501
536
  name: string;
502
537
  value: string;
@@ -508,17 +543,11 @@ export declare class BlockBuilder {
508
543
  $hash: string & {
509
544
  readonly __certificateHash: never;
510
545
  };
511
- } | {
546
+ } & {
512
547
  $binary?: string | undefined;
513
548
  $chain?: undefined;
514
- serial: string;
515
- notBefore: string;
516
- notAfter: string;
517
- subject: string;
518
- issuer: string;
519
- subjectPublicKey: import("../account").Secp256K1PublicKeyString | import("../account").Secp256R1PublicKeyString | import("../account").ED25519PublicKeyString;
520
- baseExtensions: {
521
- basicConstraints?: [ca: boolean, pathLenConstraint?: string | undefined] | undefined;
549
+ baseExtensions?: ({} & {
550
+ basicConstraints?: [ca: boolean, pathLenConstraint?: string | null | undefined] | undefined;
522
551
  keyUsage?: {
523
552
  digitalSignature?: boolean | undefined;
524
553
  nonRepudiation?: boolean | undefined;
@@ -531,31 +560,20 @@ export declare class BlockBuilder {
531
560
  decipherOnly?: boolean | undefined;
532
561
  } | undefined;
533
562
  subjectKeyIdentifier?: string | undefined;
534
- authorityKeyIdentifier?: {
563
+ authorityKeyIdentifier?: ({
535
564
  type: "context";
536
565
  value: 0;
537
566
  contains: string;
538
- } | undefined;
539
- } | undefined;
540
- subjectDN: {
541
- name: string;
542
- value: string;
543
- }[];
544
- issuerDN: {
545
- name: string;
546
- value: string;
547
- }[];
548
- $hash: string & {
549
- readonly __certificateHash: never;
550
- };
551
- };
567
+ } & {}) | undefined;
568
+ }) | undefined;
569
+ });
570
+ method: Exclude<AdjustMethod, AdjustMethod.SET>;
571
+ } & {
552
572
  intermediateCertificates?: string | {
553
573
  certificates: string[];
554
574
  } | null | undefined;
555
- method: Exclude<AdjustMethod, AdjustMethod.SET>;
556
- })[] | undefined;
557
- purpose: BlockPurpose;
558
- $opening: boolean | undefined;
575
+ }))[] | undefined;
576
+ $opening?: boolean | undefined;
559
577
  };
560
578
  getUnsignedBlock(): Promise<UnsignedBlock>;
561
579
  seal(): Promise<Block>;
@@ -1,4 +1,5 @@
1
1
  import { ValidateASN1 } from '../utils/asn1';
2
+ import type { ASN1AnyJS } from '../utils/asn1';
2
3
  import type { DeepMutable } from '../utils/helper';
3
4
  import type { GenericAccount, IdentifierAddress, IdentifierKeyAlgorithm, TokenAddress, TokenPublicKeyString } from '../account';
4
5
  import Account, { AccountKeyAlgorithm } from '../account';
@@ -86,6 +87,8 @@ declare const BlockOperationASN1SchemaBase: {
86
87
  readonly kind: "utf8";
87
88
  };
88
89
  }, {
90
+ readonly encode: (data: Permissions | undefined) => bigint[] | undefined;
91
+ readonly decode: (data: ASN1AnyJS) => Permissions | undefined;
89
92
  readonly name: "defaultPermission";
90
93
  readonly schema: {
91
94
  readonly optional: readonly [typeof ValidateASN1.IsInteger, typeof ValidateASN1.IsInteger];
@@ -98,6 +101,8 @@ declare const BlockOperationASN1SchemaBase: {
98
101
  readonly name: "method";
99
102
  readonly schema: typeof ValidateASN1.IsInteger;
100
103
  }, {
104
+ readonly encode: (data: Permissions | null) => bigint[] | null;
105
+ readonly decode: (data: ASN1AnyJS) => Permissions | null;
101
106
  readonly name: "permissions";
102
107
  readonly schema: {
103
108
  readonly choice: [typeof ValidateASN1.IsNull, readonly [typeof ValidateASN1.IsInteger, typeof ValidateASN1.IsInteger]];
@@ -125,6 +130,8 @@ declare const BlockOperationASN1SchemaBase: {
125
130
  }];
126
131
  };
127
132
  };
133
+ readonly encode: (data: MultiSigIdentifierCreateArguments | undefined) => ASN1AnyJS;
134
+ readonly decode: (data: ASN1AnyJS) => IdentifierCreateArguments | undefined;
128
135
  }];
129
136
  readonly TOKEN_ADMIN_SUPPLY: [{
130
137
  readonly name: "amount";
@@ -149,6 +156,8 @@ declare const BlockOperationASN1SchemaBase: {
149
156
  }, {
150
157
  readonly name: "certificateOrHash";
151
158
  readonly schema: typeof ValidateASN1.IsOctetString;
159
+ readonly encode: (data: Certificate | CertificateHash) => Buffer;
160
+ readonly decode: (data: ASN1AnyJS) => Certificate | CertificateHash;
152
161
  }, {
153
162
  readonly name: "intermediateCertificates";
154
163
  readonly schema: {
@@ -158,6 +167,8 @@ declare const BlockOperationASN1SchemaBase: {
158
167
  }];
159
168
  };
160
169
  };
170
+ readonly decode: (data: ASN1AnyJS) => CertificateBundle | null;
171
+ readonly encode: (data: CertificateBundle | null | undefined) => Buffer[] | null;
161
172
  }];
162
173
  };
163
174
  type ExtractSchemaFromBase<T extends {
@@ -1,6 +1,6 @@
1
1
  import { KeetaNetErrorBase } from './base';
2
- export declare const AccountErrorCodes: readonly ["INVALID_PREFIX", "INVALID_KEYTYPE", "INVALID_KEYTYPE_EXTERNAL", "PASSPHRASE_WEAK", "INVALID_CONSTRUCTION", "NO_IDENTIFIER_SIGN", "NO_IDENTIFIER_VERIFY", "INVALID_IDENTIFIER_CONSTRUCTION", "SEED_INDEX_UNDEFINED", "SEED_INDEX_NEGATIVE", "SEED_INDEX_NOT_INT", "SEED_INDEX_TOO_LARGE", "ENCRYPTION_NOT_SUPPORTED"];
3
- export declare const FullAccountErrorCodes: ("ACCOUNT_INVALID_CONSTRUCTION" | "ACCOUNT_INVALID_PREFIX" | "ACCOUNT_INVALID_KEYTYPE" | "ACCOUNT_INVALID_KEYTYPE_EXTERNAL" | "ACCOUNT_PASSPHRASE_WEAK" | "ACCOUNT_NO_IDENTIFIER_SIGN" | "ACCOUNT_NO_IDENTIFIER_VERIFY" | "ACCOUNT_INVALID_IDENTIFIER_CONSTRUCTION" | "ACCOUNT_SEED_INDEX_UNDEFINED" | "ACCOUNT_SEED_INDEX_NEGATIVE" | "ACCOUNT_SEED_INDEX_NOT_INT" | "ACCOUNT_SEED_INDEX_TOO_LARGE" | "ACCOUNT_ENCRYPTION_NOT_SUPPORTED")[];
2
+ export declare const AccountErrorCodes: readonly ["INVALID_PREFIX", "INVALID_KEYTYPE", "INVALID_KEYTYPE_EXTERNAL", "PASSPHRASE_WEAK", "INVALID_CONSTRUCTION", "NO_IDENTIFIER_SIGN", "NO_IDENTIFIER_VERIFY", "NOT_ACCOUNT", "NOT_IDENTIFIER", "INVALID_IDENTIFIER_CONSTRUCTION", "SEED_INDEX_UNDEFINED", "SEED_INDEX_NEGATIVE", "SEED_INDEX_NOT_INT", "SEED_INDEX_TOO_LARGE", "ENCRYPTION_NOT_SUPPORTED", "NAMESPACE_EMPTY", "NAMESPACE_TOO_LONG"];
3
+ export declare const FullAccountErrorCodes: ("ACCOUNT_INVALID_PREFIX" | "ACCOUNT_INVALID_KEYTYPE" | "ACCOUNT_INVALID_KEYTYPE_EXTERNAL" | "ACCOUNT_PASSPHRASE_WEAK" | "ACCOUNT_INVALID_CONSTRUCTION" | "ACCOUNT_NO_IDENTIFIER_SIGN" | "ACCOUNT_NO_IDENTIFIER_VERIFY" | "ACCOUNT_NOT_ACCOUNT" | "ACCOUNT_NOT_IDENTIFIER" | "ACCOUNT_INVALID_IDENTIFIER_CONSTRUCTION" | "ACCOUNT_SEED_INDEX_UNDEFINED" | "ACCOUNT_SEED_INDEX_NEGATIVE" | "ACCOUNT_SEED_INDEX_NOT_INT" | "ACCOUNT_SEED_INDEX_TOO_LARGE" | "ACCOUNT_ENCRYPTION_NOT_SUPPORTED" | "ACCOUNT_NAMESPACE_EMPTY" | "ACCOUNT_NAMESPACE_TOO_LONG")[];
4
4
  export type AccountErrorCode = typeof FullAccountErrorCodes[number];
5
5
  export default class KeetaNetAccountError extends KeetaNetErrorBase<AccountErrorCode> {
6
6
  static readonly isInstance: (obj: any, strict?: boolean) => obj is KeetaNetAccountError;
@@ -1,6 +1,6 @@
1
1
  import { KeetaNetErrorBase } from './base';
2
2
  import { KeetaNetLedgerError, KeetaNetLedgerVoteError, KeetaNetLedgerIdempotentKeyError } from './ledger';
3
- declare const allFullErrorCodes: readonly ("PERMISSIONS_CANNOT_MIX_FLAGS_AND_TYPES" | "PERMISSIONS_EXTERNAL_OFFSET_TOO_LARGE" | "PERMISSIONS_INVALID_EXTERNAL_FLAG" | "PERMISSIONS_INVALID_FLAG" | "PERMISSIONS_INVALID_FLAG_ASSERTION" | "BLOCK_AMOUNT_BELOW_ZERO" | "BLOCK_CANNOT_FORWARD_TO_SELF" | "BLOCK_CANNOT_SEND_NON_TOKEN" | "BLOCK_CERTIFICATE_SUBJECT_MISMATCH" | "BLOCK_EXACT_TRUE_WHEN_FORWARDING" | "BLOCK_EXTERNAL_INVALID" | "BLOCK_EXTERNAL_MISSING" | "BLOCK_EXTERNAL_TOO_LONG" | "BLOCK_GENERAL_FIELD_INVALID" | "BLOCK_IDENTIFIER_INVALID" | "BLOCK_IDENTIFIER_NEED_DEFAULT_PERMISSIONS" | "BLOCK_INTERMEDIATE_CERTIFICATES_ONLY_ADD" | "BLOCK_INVALID_ACCOUNT_TYPE" | "BLOCK_INVALID_CERTIFICATE_VALUE" | "BLOCK_INVALID_CREATE_IDENTIFIER_ARGS" | "BLOCK_INVALID_IDEMPOTENT_FORMAT" | "BLOCK_INVALID_IDEMPOTENT_LENGTH" | "BLOCK_INVALID_MULTISIG_QUORUM" | "BLOCK_INVALID_MULTISIG_SIGNER_COUNT" | "BLOCK_INVALID_MULTISIG_SIGNER_DEPTH" | "BLOCK_INVALID_MULTISIG_SIGNER_DUPLICATE" | "BLOCK_INVALID_PURPOSE_VALIDATION" | "BLOCK_INVALID_SIGNATURE" | "BLOCK_INVALID_SIGNER" | "BLOCK_INVALID_TYPE" | "BLOCK_INVALID_VERSION" | "BLOCK_NO_ADMIN_ON_TARGET" | "BLOCK_NO_DELEGATE_ADMIN" | "BLOCK_NO_DUPLICATE_CERTIFICATE_OPERATION" | "BLOCK_NO_IDENTIFIER_OP" | "BLOCK_NO_MODIFY_PERMISSION_DUPE" | "BLOCK_NO_MULTIPLE_SET_REP" | "BLOCK_NO_MULTISIG_OP" | "BLOCK_NO_TOKEN_OP" | "BLOCK_ONLY_IDENTIFIER_OP" | "BLOCK_ONLY_TOKEN_OP" | "BLOCK_PERMISSIONS_INVALID_DEFAULT" | "BLOCK_PERMISSIONS_INVALID_ENTITY" | "BLOCK_PERMISSIONS_INVALID_PRINCIPAL" | "BLOCK_PERMISSIONS_INVALID_TARGET" | "BLOCK_PREVIOUS_SELF" | "BLOCK_SUPPLY_INVALID" | "BLOCK_TOKEN_RECEIVE_DIFFERS" | "BLOCK_SIGNATURE_REQUIRED" | "BLOCK_SIGNATURE_PARAMETER_DIFFERS" | "CERTIFICATE_INVALID_VERSION" | "CERTIFICATE_DUPLICATE_INCLUDED" | "CERTIFICATE_ORPHAN_FOUND" | "CERTIFICATE_CYCLE_FOUND" | "CERTIFICATE_SECONDARY_GRAPH" | "CERTIFICATE_MISSING_FIELD" | "CERTIFICATE_SIGNATURE_ALGORITHM_MISMATCH" | "CERTIFICATE_SELF_SIGNED_VALIDATION_FAILED" | "CERTIFICATE_CHAIN_VERIFICATION_FAILED" | "CERTIFICATE_DUPLICATE_EXTENSION" | "CERTIFICATE_EXTENSION_NOT_PROCESSED" | "CERTIFICATE_INVALID_SIGNATURE_ALGORITHM" | "CERTIFICATE_INVALID_GRAPH_COUNT" | "CERTIFICATE_MOMENT_INVALID" | "VOTE_INVALID_VERSION" | "VOTE_SERIAL_MISMATCH" | "VOTE_INVALID_CONSTRUCTION" | "VOTE_INVALID_CONSTRUCTION_JSON" | "VOTE_SIGNATURE_INVALID" | "VOTE_EXPIRED" | "VOTE_INVALID_VALIDITY" | "VOTE_MOMENT_BEFORE_VALIDITY_FROM" | "VOTE_STAPLE_INVALID_CONSTRUCTION" | "VOTE_STAPLE_ALL_VOTES_MUST_HAVE_SAME_BLOCKS_COUNT" | "VOTE_STAPLE_ALL_VOTES_MUST_HAVE_SAME_BLOCKS_MISSING" | "VOTE_STAPLE_ALL_VOTES_MUST_HAVE_SAME_BLOCKS_ORDER" | "VOTE_STAPLE_DUPLICATE_VOTE_ISSUER" | "VOTE_STAPLE_PERMANENCE_MISMATCH" | "VOTE_BUILDER_INVALID_CONSTRUCTION" | "VOTE_BUILDER_INVALID_BLOCK_TYPE" | "VOTE_BUILDER_INVALID_SERIAL" | "VOTE_BUILDER_INVALID_VALID_TO_FROM" | "VOTE_MALFORMED_WRAPPER" | "VOTE_MALFORMED_VOTE_WRAPPER" | "VOTE_MALFORMED_VOTE_CONTENT" | "VOTE_MALFORMED_VOTE_CONTENT_EXTRA_DATA" | "VOTE_MALFORMED_VOTE_VERSION" | "VOTE_MALFORMED_VOTE_SERIAL" | "VOTE_MALFORMED_VOTE_SIGNATURE_INFORMATION" | "VOTE_MALFORMED_VOTE_ISSUER_INFORMATION" | "VOTE_MALFORMED_VOTE_SUBJECT_INFORMATION" | "VOTE_MALFORMED_VOTE_VALIDITY_INFORMATION" | "VOTE_MALFORMED_VOTE_EXTENSIONS" | "VOTE_MALFORMED_VOTE_EXTENSIONS_DATA" | "VOTE_MALFORMED_VOTE_EXTENSIONS_VALUE" | "VOTE_MALFORMED_VOTE_EXTENSIONS_VALUE_OID" | "VOTE_MALFORMED_VOTE_EXTENSIONS_VALUE_CRITICAL" | "VOTE_MALFORMED_VOTE_EXTENSIONS_VALUE_CRITICAL_TYPE" | "VOTE_MALFORMED_VOTE_SIGNATURE_SCHEME_DOES_NOT_MATCH_ISSUER" | "VOTE_MALFORMED_VOTE_SIGNATURE_SCHEME_DOES_NOT_MATCH_WRAPPER" | "VOTE_MALFORMED_VOTE_SIGNATURE_SCHEME_ECDSA_INVALID_CURVE" | "VOTE_MALFORMED_VOTE_SIGNATURE_UNSUPPORTED_SCHEME" | "VOTE_MALFORMED_VOTE_SUBJECT_PUBLIC_KEY_INFORMATION" | "VOTE_MALFORMED_VOTE_SIGNATURE_VALUE" | "VOTE_MALFORMED_VOTE_NO_BLOCKS_FOUND" | "VOTE_MALFORMED_STAPLE" | "VOTE_MALFORMED_STAPLE_BLOCKS" | "VOTE_MALFORMED_STAPLE_BLOCKS_AT_LEAST_ONE" | "VOTE_MALFORMED_STAPLE_VOTES" | "VOTE_MALFORMED_STAPLE_VOTES_AT_LEAST_ONE" | "VOTE_MALFORMED_FIND_RDN_INVALID_TYPE" | "VOTE_MALFORMED_FIND_RDN_MUST_HAVE_ONE" | "VOTE_MALFORMED_FIND_RDN_PART_WELL_FORMED" | "VOTE_MALFORMED_FIND_RDN_MUST_BE_SET" | "VOTE_MALFORMED_FIND_RDN_TYPE_MUST_BE_OID" | "VOTE_MALFORMED_HASHES_FROM_VOTE_INVALID_INPUT" | "VOTE_MALFORMED_HASHES_FROM_VOTE_INVALID_TYPE" | "VOTE_MALFORMED_HASHES_FROM_VOTE_INVALID_CONTEXT_SPECIFIC" | "VOTE_MALFORMED_HASHES_FROM_VOTE_DATA_NEEDS_OID" | "VOTE_MALFORMED_HASHES_FROM_VOTE_DATA_HASH_DATA_MUST_BE_SEQUENCE" | "VOTE_MALFORMED_HASHES_FROM_VOTE_DATA_NOT_TWO_ITEMS" | "VOTE_MALFORMED_HASHES_FROM_VOTE_DATA_UNSUPPORTED_HASH_FUNC" | "VOTE_MALFORMED_HASHES_FROM_VOTE_DATA_UNSUPPORTED_HASH_TYPE" | "VOTE_MALFORMED_HASHES_FROM_VOTE_DATA_SECOND_MUST_BE_SEQUENCE" | "VOTE_MALFORMED_FEES_AMOUNT" | "VOTE_MALFORMED_FEES_FROM_VOTE_INVALID_INPUT" | "VOTE_MALFORMED_FEES_IN_PERMANENT_VOTE" | "VOTE_MALFORMED_FEES_PAY_TO_INVALID" | "VOTE_MALFORMED_FEES_TOKEN_NOT_TOKEN" | "VOTE_FEE_IS_QUOTE" | "VOTE_FEE_QUOTE_MISSING_FEES" | "VOTE_FEE_NOT_QUOTE" | "VOTE_MALFORMED_FEES_KIND_MISSING" | "VOTE_MALFORMED_FEES_QUOTE_INVALID" | "LEDGER_BLOCK_ALREADY_EXISTS" | "LEDGER_BLOCK_EXPIRED" | "LEDGER_TRANSACTION_ABORTED" | "LEDGER_INVALID_CHAIN" | "LEDGER_INVALID_NETWORK" | "LEDGER_INVALID_SUBNET" | "LEDGER_INVALID_PERMISSIONS" | "LEDGER_INVALID_OWNER_COUNT" | "LEDGER_INVALID_BALANCE" | "LEDGER_INVALID_SET_REP" | "LEDGER_OPERATION_NOT_SUPPORTED" | "LEDGER_NOT_EMPTY" | "LEDGER_PREVIOUS_ALREADY_USED" | "LEDGER_PREVIOUS_NOT_SEEN" | "LEDGER_SUCCESSOR_VOTE_EXISTS" | "LEDGER_INSUFFICIENT_VOTING_WEIGHT" | "LEDGER_INVALID_ACCOUNT_INFO_KEY" | "LEDGER_RECEIVE_NOT_MET" | "LEDGER_DUPLICATE_VOTE_FOUND" | "LEDGER_CANNOT_EXCHANGE_PERM_VOTE" | "LEDGER_TEMP_VOTE_INCLUDES_SELF" | "LEDGER_BLOCKS_DIFFER_FROM_VOTED_ON" | "LEDGER_NO_PERM_WITHOUT_SELF_TEMP" | "LEDGER_DUPLICATE_VOTE_ISSUER_FOUND" | "LEDGER_OTHER" | "LEDGER_MISSING_BLOCKS" | "LEDGER_FEE_AMOUNT_MISMATCH" | "LEDGER_FEE_TOKEN_MISMATCH" | "LEDGER_FEE_MISSING" | "LEDGER_MISSING_REQUIRED_FEE_BLOCK" | "LEDGER_MULTIPLE_FEE_BLOCK" | "LEDGER_VOTE_WITH_QUOTE" | "LEDGER_QUOTE_MISMATCH" | "LEDGER_REQUIRED_FEE_MISMATCH" | "LEDGER_NOT_SUCCESSOR" | "LEDGER_NOT_OPENING" | "LEDGER_IDEMPOTENT_KEY_EXISTS" | "ACCOUNT_INVALID_CONSTRUCTION" | "ACCOUNT_INVALID_PREFIX" | "ACCOUNT_INVALID_KEYTYPE" | "ACCOUNT_INVALID_KEYTYPE_EXTERNAL" | "ACCOUNT_PASSPHRASE_WEAK" | "ACCOUNT_NO_IDENTIFIER_SIGN" | "ACCOUNT_NO_IDENTIFIER_VERIFY" | "ACCOUNT_INVALID_IDENTIFIER_CONSTRUCTION" | "ACCOUNT_SEED_INDEX_UNDEFINED" | "ACCOUNT_SEED_INDEX_NEGATIVE" | "ACCOUNT_SEED_INDEX_NOT_INT" | "ACCOUNT_SEED_INDEX_TOO_LARGE" | "ACCOUNT_ENCRYPTION_NOT_SUPPORTED" | "API_INVALID_LIMIT" | "API_INVALID_SIDE" | "API_INVALID_START" | "API_LIMIT_NOT_NUMBER" | "API_LIMIT_NOT_GREATER_THAN_ZERO" | "API_REP_MISSING" | "API_START_MISSING" | "CLIENT_BUILDER_AMOUNT_IS_ZERO" | "CLIENT_BUILDER_CANNOT_READ_BEFORE_RENDER" | "CLIENT_BUILDER_REQUIRES_PRIVATE_KEY" | "CLIENT_BUILDER_USER_CLIENT_REQUIRED" | "CLIENT_PUBLISH_AID_NOT_AVAILABLE" | "CLIENT_SIGNER_REQUIRES_PRIVATE_KEY" | "CLIENT_SYNC_PUBLISH_FAILED" | "CLIENT_SWAP_INVALID_ACCOUNT_OPTION" | "CLIENT_SWAP_OPTIONS_INVALID" | "CLIENT_SWAP_MISSING_SEND" | "CLIENT_SWAP_MISSING_RECEIVE" | "CLIENT_SWAP_SEND_RECEIVE_ACCOUNT_MISMATCH" | "CLIENT_SWAP_SEND_ACCOUNT_MISMATCH" | "CLIENT_SWAP_SEND_TOKEN_MISMATCH" | "CLIENT_SWAP_SEND_AMOUNT_TOO_LOW" | "CLIENT_SWAP_SEND_AMOUNT_RECEIVE_EXACT_MISMATCH" | "CLIENT_SWAP_REQUEST_TOKEN_MISMATCH" | "CLIENT_SWAP_REQUEST_AMOUNT_MISMATCH" | "KV_TTL_NOT_SUPPORTED" | "KV_KEY_ALREADY_EXISTS")[];
3
+ declare const allFullErrorCodes: readonly ("ACCOUNT_INVALID_PREFIX" | "ACCOUNT_INVALID_KEYTYPE" | "ACCOUNT_INVALID_KEYTYPE_EXTERNAL" | "ACCOUNT_PASSPHRASE_WEAK" | "ACCOUNT_INVALID_CONSTRUCTION" | "ACCOUNT_NO_IDENTIFIER_SIGN" | "ACCOUNT_NO_IDENTIFIER_VERIFY" | "ACCOUNT_NOT_ACCOUNT" | "ACCOUNT_NOT_IDENTIFIER" | "ACCOUNT_INVALID_IDENTIFIER_CONSTRUCTION" | "ACCOUNT_SEED_INDEX_UNDEFINED" | "ACCOUNT_SEED_INDEX_NEGATIVE" | "ACCOUNT_SEED_INDEX_NOT_INT" | "ACCOUNT_SEED_INDEX_TOO_LARGE" | "ACCOUNT_ENCRYPTION_NOT_SUPPORTED" | "ACCOUNT_NAMESPACE_EMPTY" | "ACCOUNT_NAMESPACE_TOO_LONG" | "PERMISSIONS_CANNOT_MIX_FLAGS_AND_TYPES" | "PERMISSIONS_EXTERNAL_OFFSET_TOO_LARGE" | "PERMISSIONS_INVALID_EXTERNAL_FLAG" | "PERMISSIONS_INVALID_FLAG" | "PERMISSIONS_INVALID_FLAG_ASSERTION" | "BLOCK_AMOUNT_BELOW_ZERO" | "BLOCK_CANNOT_FORWARD_TO_SELF" | "BLOCK_CANNOT_SEND_NON_TOKEN" | "BLOCK_CERTIFICATE_SUBJECT_MISMATCH" | "BLOCK_EXACT_TRUE_WHEN_FORWARDING" | "BLOCK_EXTERNAL_INVALID" | "BLOCK_EXTERNAL_MISSING" | "BLOCK_EXTERNAL_TOO_LONG" | "BLOCK_GENERAL_FIELD_INVALID" | "BLOCK_IDENTIFIER_INVALID" | "BLOCK_IDENTIFIER_NEED_DEFAULT_PERMISSIONS" | "BLOCK_INTERMEDIATE_CERTIFICATES_ONLY_ADD" | "BLOCK_INVALID_ACCOUNT_TYPE" | "BLOCK_INVALID_CERTIFICATE_VALUE" | "BLOCK_INVALID_CREATE_IDENTIFIER_ARGS" | "BLOCK_INVALID_IDEMPOTENT_FORMAT" | "BLOCK_INVALID_IDEMPOTENT_LENGTH" | "BLOCK_INVALID_MULTISIG_QUORUM" | "BLOCK_INVALID_MULTISIG_SIGNER_COUNT" | "BLOCK_INVALID_MULTISIG_SIGNER_DEPTH" | "BLOCK_INVALID_MULTISIG_SIGNER_DUPLICATE" | "BLOCK_INVALID_PURPOSE_VALIDATION" | "BLOCK_INVALID_SIGNATURE" | "BLOCK_INVALID_SIGNER" | "BLOCK_INVALID_TYPE" | "BLOCK_INVALID_VERSION" | "BLOCK_NO_ADMIN_ON_TARGET" | "BLOCK_NO_DELEGATE_ADMIN" | "BLOCK_NO_DUPLICATE_CERTIFICATE_OPERATION" | "BLOCK_NO_IDENTIFIER_OP" | "BLOCK_NO_MODIFY_PERMISSION_DUPE" | "BLOCK_NO_MULTIPLE_SET_REP" | "BLOCK_NO_MULTISIG_OP" | "BLOCK_NO_TOKEN_OP" | "BLOCK_ONLY_IDENTIFIER_OP" | "BLOCK_ONLY_TOKEN_OP" | "BLOCK_PERMISSIONS_INVALID_DEFAULT" | "BLOCK_PERMISSIONS_INVALID_ENTITY" | "BLOCK_PERMISSIONS_INVALID_PRINCIPAL" | "BLOCK_PERMISSIONS_INVALID_TARGET" | "BLOCK_PREVIOUS_SELF" | "BLOCK_SUPPLY_INVALID" | "BLOCK_TOKEN_RECEIVE_DIFFERS" | "BLOCK_SIGNATURE_REQUIRED" | "BLOCK_SIGNATURE_PARAMETER_DIFFERS" | "CERTIFICATE_INVALID_VERSION" | "CERTIFICATE_DUPLICATE_INCLUDED" | "CERTIFICATE_ORPHAN_FOUND" | "CERTIFICATE_CYCLE_FOUND" | "CERTIFICATE_SECONDARY_GRAPH" | "CERTIFICATE_MISSING_FIELD" | "CERTIFICATE_SIGNATURE_ALGORITHM_MISMATCH" | "CERTIFICATE_SELF_SIGNED_VALIDATION_FAILED" | "CERTIFICATE_CHAIN_VERIFICATION_FAILED" | "CERTIFICATE_DUPLICATE_EXTENSION" | "CERTIFICATE_EXTENSION_NOT_PROCESSED" | "CERTIFICATE_INVALID_SIGNATURE_ALGORITHM" | "CERTIFICATE_INVALID_GRAPH_COUNT" | "CERTIFICATE_MOMENT_INVALID" | "VOTE_INVALID_CONSTRUCTION" | "VOTE_INVALID_VERSION" | "VOTE_SERIAL_MISMATCH" | "VOTE_INVALID_CONSTRUCTION_JSON" | "VOTE_SIGNATURE_INVALID" | "VOTE_EXPIRED" | "VOTE_INVALID_VALIDITY" | "VOTE_MOMENT_BEFORE_VALIDITY_FROM" | "VOTE_STAPLE_INVALID_CONSTRUCTION" | "VOTE_STAPLE_ALL_VOTES_MUST_HAVE_SAME_BLOCKS_COUNT" | "VOTE_STAPLE_ALL_VOTES_MUST_HAVE_SAME_BLOCKS_MISSING" | "VOTE_STAPLE_ALL_VOTES_MUST_HAVE_SAME_BLOCKS_ORDER" | "VOTE_STAPLE_DUPLICATE_VOTE_ISSUER" | "VOTE_STAPLE_PERMANENCE_MISMATCH" | "VOTE_BUILDER_INVALID_CONSTRUCTION" | "VOTE_BUILDER_INVALID_BLOCK_TYPE" | "VOTE_BUILDER_INVALID_SERIAL" | "VOTE_BUILDER_INVALID_VALID_TO_FROM" | "VOTE_BUILDER_INVALID_FEE" | "VOTE_MALFORMED_WRAPPER" | "VOTE_MALFORMED_VOTE_WRAPPER" | "VOTE_MALFORMED_VOTE_CONTENT" | "VOTE_MALFORMED_VOTE_CONTENT_EXTRA_DATA" | "VOTE_MALFORMED_VOTE_VERSION" | "VOTE_MALFORMED_VOTE_SERIAL" | "VOTE_MALFORMED_VOTE_SIGNATURE_INFORMATION" | "VOTE_MALFORMED_VOTE_ISSUER_INFORMATION" | "VOTE_MALFORMED_VOTE_SUBJECT_INFORMATION" | "VOTE_MALFORMED_VOTE_VALIDITY_INFORMATION" | "VOTE_MALFORMED_VOTE_EXTENSIONS" | "VOTE_MALFORMED_VOTE_EXTENSIONS_DATA" | "VOTE_MALFORMED_VOTE_EXTENSIONS_VALUE" | "VOTE_MALFORMED_VOTE_EXTENSIONS_VALUE_OID" | "VOTE_MALFORMED_VOTE_EXTENSIONS_VALUE_CRITICAL" | "VOTE_MALFORMED_VOTE_EXTENSIONS_VALUE_CRITICAL_TYPE" | "VOTE_MALFORMED_VOTE_SIGNATURE_SCHEME_DOES_NOT_MATCH_ISSUER" | "VOTE_MALFORMED_VOTE_SIGNATURE_SCHEME_DOES_NOT_MATCH_WRAPPER" | "VOTE_MALFORMED_VOTE_SIGNATURE_SCHEME_ECDSA_INVALID_CURVE" | "VOTE_MALFORMED_VOTE_SIGNATURE_UNSUPPORTED_SCHEME" | "VOTE_MALFORMED_VOTE_SUBJECT_PUBLIC_KEY_INFORMATION" | "VOTE_MALFORMED_VOTE_SIGNATURE_VALUE" | "VOTE_MALFORMED_VOTE_NO_BLOCKS_FOUND" | "VOTE_MALFORMED_STAPLE" | "VOTE_MALFORMED_STAPLE_BLOCKS" | "VOTE_MALFORMED_STAPLE_BLOCKS_AT_LEAST_ONE" | "VOTE_MALFORMED_STAPLE_VOTES" | "VOTE_MALFORMED_STAPLE_VOTES_AT_LEAST_ONE" | "VOTE_MALFORMED_FIND_RDN_INVALID_TYPE" | "VOTE_MALFORMED_FIND_RDN_MUST_HAVE_ONE" | "VOTE_MALFORMED_FIND_RDN_PART_WELL_FORMED" | "VOTE_MALFORMED_FIND_RDN_MUST_BE_SET" | "VOTE_MALFORMED_FIND_RDN_TYPE_MUST_BE_OID" | "VOTE_MALFORMED_HASHES_FROM_VOTE_INVALID_INPUT" | "VOTE_MALFORMED_HASHES_FROM_VOTE_INVALID_TYPE" | "VOTE_MALFORMED_HASHES_FROM_VOTE_INVALID_CONTEXT_SPECIFIC" | "VOTE_MALFORMED_HASHES_FROM_VOTE_DATA_NEEDS_OID" | "VOTE_MALFORMED_HASHES_FROM_VOTE_DATA_HASH_DATA_MUST_BE_SEQUENCE" | "VOTE_MALFORMED_HASHES_FROM_VOTE_DATA_NOT_TWO_ITEMS" | "VOTE_MALFORMED_HASHES_FROM_VOTE_DATA_UNSUPPORTED_HASH_FUNC" | "VOTE_MALFORMED_HASHES_FROM_VOTE_DATA_UNSUPPORTED_HASH_TYPE" | "VOTE_MALFORMED_HASHES_FROM_VOTE_DATA_SECOND_MUST_BE_SEQUENCE" | "VOTE_MALFORMED_FEES_AMOUNT" | "VOTE_MALFORMED_FEES_FROM_VOTE_INVALID_INPUT" | "VOTE_MALFORMED_FEES_IN_PERMANENT_VOTE" | "VOTE_MALFORMED_FEES_INVALID_QUOTE_VALUE" | "VOTE_MALFORMED_FEES_MULTIPLE_FEE_EMPTY" | "VOTE_MALFORMED_FEES_PAY_TO_INVALID" | "VOTE_MALFORMED_FEES_TOKEN_NOT_TOKEN" | "VOTE_FEE_IS_QUOTE" | "VOTE_FEE_QUOTE_MISSING_FEES" | "VOTE_FEE_NOT_QUOTE" | "VOTE_MALFORMED_FEES_KIND_MISSING" | "VOTE_MALFORMED_FEES_QUOTE_INVALID" | "LEDGER_BLOCK_ALREADY_EXISTS" | "LEDGER_BLOCK_EXPIRED" | "LEDGER_TRANSACTION_ABORTED" | "LEDGER_INVALID_CHAIN" | "LEDGER_INVALID_NETWORK" | "LEDGER_INVALID_SUBNET" | "LEDGER_INVALID_PERMISSIONS" | "LEDGER_INVALID_OWNER_COUNT" | "LEDGER_INVALID_BALANCE" | "LEDGER_INVALID_SET_REP" | "LEDGER_OPERATION_NOT_SUPPORTED" | "LEDGER_NOT_EMPTY" | "LEDGER_PREVIOUS_ALREADY_USED" | "LEDGER_PREVIOUS_NOT_SEEN" | "LEDGER_SUCCESSOR_VOTE_EXISTS" | "LEDGER_INSUFFICIENT_VOTING_WEIGHT" | "LEDGER_INVALID_ACCOUNT_INFO_KEY" | "LEDGER_RECEIVE_NOT_MET" | "LEDGER_DUPLICATE_VOTE_FOUND" | "LEDGER_CANNOT_EXCHANGE_PERM_VOTE" | "LEDGER_TEMP_VOTE_INCLUDES_SELF" | "LEDGER_BLOCKS_DIFFER_FROM_VOTED_ON" | "LEDGER_NO_PERM_WITHOUT_SELF_TEMP" | "LEDGER_DUPLICATE_VOTE_ISSUER_FOUND" | "LEDGER_OTHER" | "LEDGER_MISSING_BLOCKS" | "LEDGER_FEE_AMOUNT_MISMATCH" | "LEDGER_FEE_TOKEN_MISMATCH" | "LEDGER_FEE_MISSING" | "LEDGER_MISSING_REQUIRED_FEE_BLOCK" | "LEDGER_MULTIPLE_FEE_BLOCK" | "LEDGER_VOTE_WITH_QUOTE" | "LEDGER_QUOTE_MISMATCH" | "LEDGER_REQUIRED_FEE_MISMATCH" | "LEDGER_NOT_SUCCESSOR" | "LEDGER_NOT_OPENING" | "LEDGER_IDEMPOTENT_KEY_EXISTS" | "API_INVALID_LIMIT" | "API_INVALID_SIDE" | "API_INVALID_START" | "API_LIMIT_NOT_NUMBER" | "API_LIMIT_NOT_GREATER_THAN_ZERO" | "API_REP_MISSING" | "API_START_MISSING" | "CLIENT_BUILDER_AMOUNT_IS_ZERO" | "CLIENT_BUILDER_CANNOT_READ_BEFORE_RENDER" | "CLIENT_BUILDER_REQUIRES_PRIVATE_KEY" | "CLIENT_BUILDER_USER_CLIENT_REQUIRED" | "CLIENT_PUBLISH_AID_NOT_AVAILABLE" | "CLIENT_SIGNER_REQUIRES_PRIVATE_KEY" | "CLIENT_SYNC_PUBLISH_FAILED" | "CLIENT_SWAP_INVALID_ACCOUNT_OPTION" | "CLIENT_SWAP_OPTIONS_INVALID" | "CLIENT_SWAP_MISSING_SEND" | "CLIENT_SWAP_MISSING_RECEIVE" | "CLIENT_SWAP_SEND_RECEIVE_ACCOUNT_MISMATCH" | "CLIENT_SWAP_SEND_ACCOUNT_MISMATCH" | "CLIENT_SWAP_SEND_TOKEN_MISMATCH" | "CLIENT_SWAP_SEND_AMOUNT_TOO_LOW" | "CLIENT_SWAP_SEND_AMOUNT_RECEIVE_EXACT_MISMATCH" | "CLIENT_SWAP_REQUEST_TOKEN_MISMATCH" | "CLIENT_SWAP_REQUEST_AMOUNT_MISMATCH" | "KV_TTL_NOT_SUPPORTED" | "KV_KEY_ALREADY_EXISTS")[];
4
4
  export type ErrorCode = typeof allFullErrorCodes[number];
5
5
  export declare function ExpectErrorCode(code: ErrorCode, test: () => any): Promise<void>;
6
6
  export declare class KeetaNetError extends KeetaNetErrorBase<ErrorCode> {