@keetanetwork/keetanet-client 0.14.8 → 0.14.9

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 (107) hide show
  1. package/client/client_common_tests.d.ts +2 -2
  2. package/client/index-browser.js +240 -61
  3. package/client/index.js +208 -27
  4. package/docs/assets/hierarchy.js +1 -1
  5. package/docs/assets/search.js +1 -1
  6. package/docs/classes/KeetaNetSDK.Referenced.BaseSet.html +1 -1
  7. package/docs/classes/KeetaNetSDK.Referenced.BaseVoteBuilder.html +1 -1
  8. package/docs/classes/KeetaNetSDK.Referenced.BlockOperation.html +1 -1
  9. package/docs/classes/KeetaNetSDK.Referenced.BlockOperationCREATE_IDENTIFIER.html +1 -1
  10. package/docs/classes/KeetaNetSDK.Referenced.BlockOperationMANAGE_CERTIFICATE.html +1 -1
  11. package/docs/classes/KeetaNetSDK.Referenced.BlockOperationMODIFY_PERMISSIONS.html +1 -1
  12. package/docs/classes/KeetaNetSDK.Referenced.BlockOperationRECEIVE.html +1 -1
  13. package/docs/classes/KeetaNetSDK.Referenced.BlockOperationSEND.html +1 -1
  14. package/docs/classes/KeetaNetSDK.Referenced.BlockOperationSET_INFO.html +1 -1
  15. package/docs/classes/KeetaNetSDK.Referenced.BlockOperationSET_REP.html +1 -1
  16. package/docs/classes/KeetaNetSDK.Referenced.BlockOperationTOKEN_ADMIN_MODIFY_BALANCE.html +1 -1
  17. package/docs/classes/KeetaNetSDK.Referenced.BlockOperationTOKEN_ADMIN_SUPPLY.html +1 -1
  18. package/docs/classes/KeetaNetSDK.Referenced.ECDSAKeyPair.html +1 -1
  19. package/docs/classes/KeetaNetSDK.Referenced.ECDSASECP256K1KeyPair.html +1 -1
  20. package/docs/classes/KeetaNetSDK.Referenced.ECDSASECP256K1PrivateKey.html +1 -1
  21. package/docs/classes/KeetaNetSDK.Referenced.ECDSASECP256K1PublicKey.html +1 -1
  22. package/docs/classes/KeetaNetSDK.Referenced.ECDSASECP256K1Signature.html +1 -1
  23. package/docs/classes/KeetaNetSDK.Referenced.ECDSASECP256R1KeyPair.html +1 -1
  24. package/docs/classes/KeetaNetSDK.Referenced.ECDSASECP256R1PrivateKey.html +1 -1
  25. package/docs/classes/KeetaNetSDK.Referenced.ECDSASECP256R1PublicKey.html +1 -1
  26. package/docs/classes/KeetaNetSDK.Referenced.ECDSASECP256R1Signature.html +1 -1
  27. package/docs/classes/KeetaNetSDK.Referenced.ED25519KeyPair.html +1 -1
  28. package/docs/classes/KeetaNetSDK.Referenced.ED25519PrivateKey.html +1 -1
  29. package/docs/classes/KeetaNetSDK.Referenced.ED25519PublicKey.html +1 -1
  30. package/docs/classes/KeetaNetSDK.Referenced.ED25519Signature.html +1 -1
  31. package/docs/classes/KeetaNetSDK.Referenced.ExternalKeyPair.html +1 -1
  32. package/docs/classes/KeetaNetSDK.Referenced.ExternalSet.html +1 -1
  33. package/docs/classes/KeetaNetSDK.Referenced.IdempotentKey.html +1 -1
  34. package/docs/classes/KeetaNetSDK.Referenced.IdentifierKey.html +1 -1
  35. package/docs/classes/KeetaNetSDK.Referenced.IdentifierKeyPair.html +1 -1
  36. package/docs/classes/KeetaNetSDK.Referenced.KeetaNetErrorBase.html +1 -1
  37. package/docs/classes/KeetaNetSDK.Referenced.KeetaNetLedgerError.html +1 -1
  38. package/docs/classes/KeetaNetSDK.Referenced.KeetaNetLedgerIdempotentKeyError.html +1 -1
  39. package/docs/classes/KeetaNetSDK.Referenced.KeetaNetLedgerVoteError.html +1 -1
  40. package/docs/classes/KeetaNetSDK.Referenced.KeyInterface.html +1 -1
  41. package/docs/classes/KeetaNetSDK.Referenced.KeyStorage.html +1 -1
  42. package/docs/classes/KeetaNetSDK.Referenced.PermissionSetHolder.html +1 -1
  43. package/docs/classes/KeetaNetSDK.Referenced.PossiblyExpiredVote.html +1 -1
  44. package/docs/classes/KeetaNetSDK.Referenced.SignatureStorage.html +1 -1
  45. package/docs/classes/KeetaNetSDK.Referenced.StatsPending.html +1 -1
  46. package/docs/classes/KeetaNetSDK.Referenced.VoteBlockBundle.html +1 -1
  47. package/docs/classes/KeetaNetSDK.Referenced.VoteBuilder.html +1 -1
  48. package/docs/classes/KeetaNetSDK.Referenced.VoteHash.html +1 -1
  49. package/docs/classes/KeetaNetSDK.Referenced.VoteLikeBase.html +1 -1
  50. package/docs/classes/KeetaNetSDK.Referenced.VoteQuoteBuilder.html +1 -1
  51. package/docs/classes/KeetaNetSDK.Referenced.VoteStapleHash.html +1 -1
  52. package/docs/classes/KeetaNetSDK.Referenced.src_lib_utils_asn1.BufferStorageASN1.html +1 -1
  53. package/docs/classes/KeetaNetSDK.Referenced.src_lib_utils_asn1.ValidateASN1.html +73 -2
  54. package/docs/classes/KeetaNetSDK.Referenced.src_lib_utils_buffer.BufferStorage.html +1 -1
  55. package/docs/hierarchy.html +1 -1
  56. package/docs/interfaces/KeetaNetSDK.Referenced.ACLEntry.html +1 -1
  57. package/docs/interfaces/KeetaNetSDK.Referenced.ACLUpdate.html +1 -1
  58. package/docs/interfaces/KeetaNetSDK.Referenced.ASN1ExplicitContextTag.html +1 -1
  59. package/docs/interfaces/KeetaNetSDK.Referenced.ASN1ImplicitContextTag.html +1 -1
  60. package/docs/interfaces/KeetaNetSDK.Referenced.ASN1Object.html +1 -1
  61. package/docs/interfaces/KeetaNetSDK.Referenced.BaseExternalKeyPairFunctions.html +1 -1
  62. package/docs/interfaces/KeetaNetSDK.Referenced.BaseGenerationConfig.html +1 -1
  63. package/docs/interfaces/KeetaNetSDK.Referenced.BaseIdentifierCreateArguments.html +1 -1
  64. package/docs/interfaces/KeetaNetSDK.Referenced.BlockJSONOperation.html +1 -1
  65. package/docs/interfaces/KeetaNetSDK.Referenced.BlockJSONOperationCREATE_IDENTIFIER.html +1 -1
  66. package/docs/interfaces/KeetaNetSDK.Referenced.BlockJSONOperationMANAGE_CERTIFICATE.html +1 -1
  67. package/docs/interfaces/KeetaNetSDK.Referenced.BlockJSONOperationMANAGE_CERTIFICATESerializable.html +1 -1
  68. package/docs/interfaces/KeetaNetSDK.Referenced.BlockJSONOperationMODIFY_PERMISSIONS.html +1 -1
  69. package/docs/interfaces/KeetaNetSDK.Referenced.BlockJSONOperationRECEIVE.html +1 -1
  70. package/docs/interfaces/KeetaNetSDK.Referenced.BlockJSONOperationSEND.html +1 -1
  71. package/docs/interfaces/KeetaNetSDK.Referenced.BlockJSONOperationSET_INFO.html +1 -1
  72. package/docs/interfaces/KeetaNetSDK.Referenced.BlockJSONOperationSET_REP.html +1 -1
  73. package/docs/interfaces/KeetaNetSDK.Referenced.BlockJSONOperationTOKEN_ADMIN_MODIFY_BALANCE.html +1 -1
  74. package/docs/interfaces/KeetaNetSDK.Referenced.BlockJSONOperationTOKEN_ADMIN_SUPPLY.html +1 -1
  75. package/docs/interfaces/KeetaNetSDK.Referenced.BlockV1Canonical.html +1 -1
  76. package/docs/interfaces/KeetaNetSDK.Referenced.BlockV2Canonical.html +1 -1
  77. package/docs/interfaces/KeetaNetSDK.Referenced.Constructor.html +1 -1
  78. package/docs/interfaces/KeetaNetSDK.Referenced.DisposableTimingHandle.html +1 -1
  79. package/docs/interfaces/KeetaNetSDK.Referenced.ExternalKeyPairFunctionsNoEncryption.html +1 -1
  80. package/docs/interfaces/KeetaNetSDK.Referenced.ExternalKeyPairFunctionsSupportsEncryption.html +1 -1
  81. package/docs/interfaces/KeetaNetSDK.Referenced.InitialConfigSupply.html +1 -1
  82. package/docs/interfaces/KeetaNetSDK.Referenced.InstanceSet.html +1 -1
  83. package/docs/interfaces/KeetaNetSDK.Referenced.KVGenericOptionsType.html +1 -1
  84. package/docs/interfaces/KeetaNetSDK.Referenced.KVSetOptionsType.html +1 -1
  85. package/docs/interfaces/KeetaNetSDK.Referenced.ModifyTokenBalanceEntry.html +1 -1
  86. package/docs/interfaces/KeetaNetSDK.Referenced.MultiSigIdentifierCreateArguments.html +1 -1
  87. package/docs/interfaces/KeetaNetSDK.Referenced.MultisigConfig.html +1 -1
  88. package/docs/interfaces/KeetaNetSDK.Referenced.NumericValueEntry.html +1 -1
  89. package/docs/interfaces/KeetaNetSDK.Referenced.P2PPeerBase.html +1 -1
  90. package/docs/interfaces/KeetaNetSDK.Referenced.P2PPeerListener.html +1 -1
  91. package/docs/interfaces/KeetaNetSDK.Referenced.P2PPeerRepBase.html +1 -1
  92. package/docs/interfaces/KeetaNetSDK.Referenced.PublicKeyStorage.html +1 -1
  93. package/docs/interfaces/KeetaNetSDK.Referenced.RequestTokenReceiveEntry.html +1 -1
  94. package/docs/interfaces/KeetaNetSDK.Referenced.TokenNumericEntry.html +1 -1
  95. package/docs/interfaces/KeetaNetSDK.Referenced.WithIsInstance.html +1 -1
  96. package/docs/interfaces/KeetaNetSDK.Referenced.src_lib_utils_asn1.ASN1Struct.html +5 -0
  97. package/docs/modules/KeetaNetSDK.Referenced.src_lib_utils_asn1.html +1 -1
  98. package/docs/types/KeetaNetSDK.Referenced.src_lib_utils_asn1.ASN1AnyJS.html +1 -1
  99. package/docs/types/KeetaNetSDK.Referenced.src_lib_utils_asn1.ValidateASN1.Schema.html +1 -1
  100. package/docs/types/KeetaNetSDK.Referenced.src_lib_utils_asn1.ValidateASN1.SchemaMap.html +1 -1
  101. package/docs/variables/KeetaNetSDK.Referenced.src_lib_utils_asn1.ASN1CheckUtilities.html +1 -1
  102. package/lib/ledger/db_common_tests.d.ts +1 -0
  103. package/lib/utils/asn1.d.ts +109 -2
  104. package/lib/utils/helper_testing.d.ts +2 -1
  105. package/npm-shrinkwrap.json +157 -433
  106. package/package.json +6 -13
  107. package/version.d.ts +1 -1
package/client/index.js CHANGED
@@ -68442,17 +68442,31 @@ class LedgerAtomicInterface {
68442
68442
  return (retval);
68443
68443
  }
68444
68444
  async getHistory(account, start, limit = 25) {
68445
- const transaction = __classPrivateFieldGet(this, _LedgerAtomicInterface_instances, "m", _LedgerAtomicInterface_assertTransaction).call(this);
68446
- const voteStapleHashes = await __classPrivateFieldGet(this, _LedgerAtomicInterface_storage, "f").getHistory(transaction, account, start, limit);
68447
- const voteStaplesMap = await this.getVoteStaples(voteStapleHashes, 'main');
68448
- const voteStaples = voteStapleHashes.map(function (voteStapleHash) {
68449
- const voteStaple = voteStaplesMap.get(voteStapleHash);
68450
- if (voteStaple === undefined || voteStaple === null) {
68451
- throw (new Error(`internal error: missing vote staple for ${voteStapleHash}`));
68452
- }
68453
- return (voteStaple);
68454
- });
68455
- return (voteStaples);
68445
+ const env_1 = { stack: [], error: void 0, hasError: false };
68446
+ try {
68447
+ const transaction = __classPrivateFieldGet(this, _LedgerAtomicInterface_instances, "m", _LedgerAtomicInterface_assertTransaction).call(this);
68448
+ const _getHistoryTiming = __addDisposableResource(env_1, transaction.node?.timing.startTime(`storage-getHistory`), false);
68449
+ const voteStapleHashes = await __classPrivateFieldGet(this, _LedgerAtomicInterface_storage, "f").getHistory(transaction, account, start, limit);
68450
+ _getHistoryTiming?.end();
68451
+ const _getVoteStaplesTiming = __addDisposableResource(env_1, transaction.node?.timing.startTime(`storage-getVoteStaples`), false);
68452
+ const voteStaplesMap = await this.getVoteStaples(voteStapleHashes, 'main');
68453
+ _getVoteStaplesTiming?.end();
68454
+ const voteStaples = voteStapleHashes.map(function (voteStapleHash) {
68455
+ const voteStaple = voteStaplesMap.get(voteStapleHash);
68456
+ if (voteStaple === undefined || voteStaple === null) {
68457
+ throw (new Error(`internal error: missing vote staple for ${voteStapleHash}`));
68458
+ }
68459
+ return (voteStaple);
68460
+ });
68461
+ return (voteStaples);
68462
+ }
68463
+ catch (e_1) {
68464
+ env_1.error = e_1;
68465
+ env_1.hasError = true;
68466
+ }
68467
+ finally {
68468
+ __disposeResources(env_1);
68469
+ }
68456
68470
  }
68457
68471
  async getStaplesFromBlockHashes(hashes) {
68458
68472
  const transaction = __classPrivateFieldGet(this, _LedgerAtomicInterface_instances, "m", _LedgerAtomicInterface_assertTransaction).call(this);
@@ -69056,9 +69070,9 @@ class Ledger {
69056
69070
  * @returns The return value from "code"
69057
69071
  */
69058
69072
  async run(identifier, code, readOnly) {
69059
- const env_1 = { stack: [], error: void 0, hasError: false };
69073
+ const env_2 = { stack: [], error: void 0, hasError: false };
69060
69074
  try {
69061
- const _timing = __addDisposableResource(env_1, this.node?.timing.startTime(`run-${identifier}`), false);
69075
+ const _timing = __addDisposableResource(env_2, this.node?.timing.startTime(`run-${identifier}`), false);
69062
69076
  let retryConfig;
69063
69077
  if (__classPrivateFieldGet(this, _Ledger_config, "f").transactionRetries?.maxRetries !== undefined) {
69064
69078
  retryConfig = {
@@ -69143,12 +69157,12 @@ class Ledger {
69143
69157
  this.node?.stats.incr('ledger', 'dbRetries', retryCount);
69144
69158
  return (retval);
69145
69159
  }
69146
- catch (e_1) {
69147
- env_1.error = e_1;
69148
- env_1.hasError = true;
69160
+ catch (e_2) {
69161
+ env_2.error = e_2;
69162
+ env_2.hasError = true;
69149
69163
  }
69150
69164
  finally {
69151
- __disposeResources(env_1);
69165
+ __disposeResources(env_2);
69152
69166
  }
69153
69167
  }
69154
69168
  async runReadOnly(identifier, code) {
@@ -69299,18 +69313,18 @@ class Ledger {
69299
69313
  }));
69300
69314
  }
69301
69315
  async stats() {
69302
- const env_2 = { stack: [], error: void 0, hasError: false };
69316
+ const env_3 = { stack: [], error: void 0, hasError: false };
69303
69317
  try {
69304
- const _timing = __addDisposableResource(env_2, this.node?.timing.startTime('db-stats'), false);
69318
+ const _timing = __addDisposableResource(env_3, this.node?.timing.startTime('db-stats'), false);
69305
69319
  const retval = await __classPrivateFieldGet(this, _Ledger_storage, "f").stats();
69306
69320
  return (retval);
69307
69321
  }
69308
- catch (e_2) {
69309
- env_2.error = e_2;
69310
- env_2.hasError = true;
69322
+ catch (e_3) {
69323
+ env_3.error = e_3;
69324
+ env_3.hasError = true;
69311
69325
  }
69312
69326
  finally {
69313
- __disposeResources(env_2);
69327
+ __disposeResources(env_3);
69314
69328
  }
69315
69329
  }
69316
69330
  async _testingRunStorageFunction(code) {
@@ -73284,6 +73298,37 @@ function isASN1Date(input) {
73284
73298
  }
73285
73299
  return (true);
73286
73300
  }
73301
+ function isASN1Struct(input) {
73302
+ if (!isASN1Object(input)) {
73303
+ return (false);
73304
+ }
73305
+ if (input.type !== 'struct') {
73306
+ return (false);
73307
+ }
73308
+ if ('fieldNames' in input && input.fieldNames !== undefined) {
73309
+ if (!Array.isArray(input.fieldNames)) {
73310
+ return (false);
73311
+ }
73312
+ for (const fieldName of input.fieldNames) {
73313
+ if (typeof fieldName !== 'string') {
73314
+ return (false);
73315
+ }
73316
+ }
73317
+ }
73318
+ if (!('contains' in input) || typeof input.contains !== 'object' || input.contains === null) {
73319
+ return (false);
73320
+ }
73321
+ return (true);
73322
+ }
73323
+ function isASN1ModifierOptional(input) {
73324
+ if (typeof input !== 'object' || input === null) {
73325
+ return (false);
73326
+ }
73327
+ if (!('optional' in input)) {
73328
+ return (false);
73329
+ }
73330
+ return (true);
73331
+ }
73287
73332
  function isStringValidForKind(input, kind) {
73288
73333
  if (input === '') {
73289
73334
  return (true);
@@ -73316,7 +73361,8 @@ exports.ASN1CheckUtilities = {
73316
73361
  isASN1Set,
73317
73362
  isASN1ContextTag,
73318
73363
  isASN1BitString,
73319
- isASN1Date
73364
+ isASN1Date,
73365
+ isASN1Struct
73320
73366
  };
73321
73367
  /**
73322
73368
  * Checks if an ASN.1 sequence is valid based on a provided validation schema.
@@ -73485,6 +73531,22 @@ function jsJStoASN1(input, allowUndefined) {
73485
73531
  return (constructedObject);
73486
73532
  }
73487
73533
  }
73534
+ else if (isASN1Struct(input)) {
73535
+ /* Structs are encoded as sequences */
73536
+ const structContainer = new asn1js.Sequence();
73537
+ if (input.fieldNames === undefined) {
73538
+ throw (new Error('internal error: ASN1Struct is missing fieldNames'));
73539
+ }
73540
+ for (const fieldName of input.fieldNames) {
73541
+ const fieldValue = input.contains[fieldName];
73542
+ if (fieldValue === undefined) {
73543
+ /* Skip over undefined values, they should be "optional" in the schema */
73544
+ continue;
73545
+ }
73546
+ structContainer.valueBlock.value.push(jsJStoASN1(fieldValue, true));
73547
+ }
73548
+ return (structContainer);
73549
+ }
73488
73550
  else if (typeof input === 'string') {
73489
73551
  if (isStringValidForKind(input, 'printable')) {
73490
73552
  return (new asn1js.PrintableString({ value: input }));
@@ -73772,6 +73834,39 @@ exports.ASN1toJS = ASN1toJS;
73772
73834
  exports.JStoASN1 = JStoASN1;
73773
73835
  exports.ASN1IntegerToBigInt = ASN1IntegerToBigInt;
73774
73836
  exports.ASN1BigIntToBuffer = ASN1BigIntToBuffer;
73837
+ /**
73838
+ * Helper class to validate ASN.1 values against schemas
73839
+ *
73840
+ * Some schemas are basic types, others are more complex
73841
+ * Basic types are defined as:
73842
+ * - {@link ValidateASN1.IsAny}
73843
+ * - {@link ValidateASN1.IsUnknown}
73844
+ * - {@link ValidateASN1.IsDate}
73845
+ * - {@link ValidateASN1.IsAnyDate}
73846
+ * - {@link ValidateASN1.IsString}
73847
+ * - {@link ValidateASN1.IsAnyString}
73848
+ * - {@link ValidateASN1.IsOctetString}
73849
+ * - {@link ValidateASN1.IsBitString}
73850
+ * - {@link ValidateASN1.IsInteger}
73851
+ * - {@link ValidateASN1.IsBoolean}
73852
+ * - {@link ValidateASN1.IsOID}
73853
+ * - {@link ValidateASN1.IsSet}
73854
+ * - {@link ValidateASN1.IsNull}
73855
+ *
73856
+ * More complex types are defined as:
73857
+ * - Choice: `{ choice: [ schema1, schema2, ... ] }`
73858
+ * - Sequence of: `{ sequenceOf: schema }`
73859
+ * - Optional: `{ optional: schema }`
73860
+ * - Context Tag: `{ type: 'context'; kind: 'implicit' | 'explicit'; contains: schema; value: number }`
73861
+ * - OID: `{ type: 'oid'; oid: string }`
73862
+ * - String: `{ type: 'string'; kind: 'printable' | 'ia5' | 'utf8' }`
73863
+ * - Date: `{ type: 'date'; kind: 'utc' | 'general' }`
73864
+ * - Fixed Integer: `bigint` (where the value is the exact integer required)
73865
+ * - Sequence: `[ schema1, schema2, ... ]` (a tuple where each item is a schema)
73866
+ *
73867
+ * - Lazy Schema: `() => schema` (a function that returns a schema, useful for
73868
+ * recursive schemas)
73869
+ */
73775
73870
  class ValidateASN1 {
73776
73871
  /**
73777
73872
  * Interpret an untagged type as a specific universal tag
@@ -73858,6 +73953,9 @@ class ValidateASN1 {
73858
73953
  break;
73859
73954
  case 'context':
73860
73955
  throw (new Error('not implemented: Cannot interpret untagged type as Context Tag yet'));
73956
+ case 'struct':
73957
+ interpretTag = 16;
73958
+ break;
73861
73959
  default:
73862
73960
  (0, never_1.assertNever)(tag);
73863
73961
  }
@@ -74077,6 +74175,36 @@ class ValidateASN1 {
74077
74175
  }
74078
74176
  needsMoreAnalysis = false;
74079
74177
  break;
74178
+ case 'struct': {
74179
+ const outputStruct = {
74180
+ type: 'struct',
74181
+ fieldNames: schema.fieldNames,
74182
+ contains: {}
74183
+ };
74184
+ const schemaAsTuples = schema.fieldNames.map(function (fieldName) {
74185
+ return (schema.contains[fieldName]);
74186
+ });
74187
+ let valuesAsTuples;
74188
+ if (Array.isArray(input)) {
74189
+ valuesAsTuples = input;
74190
+ }
74191
+ else if (isASN1Struct(input)) {
74192
+ const x = input;
74193
+ valuesAsTuples = schema.fieldNames.map(function (fieldName) {
74194
+ return (x.contains[fieldName]);
74195
+ });
74196
+ }
74197
+ else {
74198
+ throw (new Error(`Expected Array or Struct, got ${typeof input} --> ${JSON.stringify((0, helper_1.debugPrintableObject)(input))}`));
74199
+ }
74200
+ // @ts-ignore
74201
+ const outputValuesTuples = ValidateASN1.againstSchema(valuesAsTuples, schemaAsTuples);
74202
+ schema.fieldNames.forEach(function (fieldName, index) {
74203
+ outputStruct.contains[fieldName] = outputValuesTuples[index];
74204
+ });
74205
+ // eslint-disable-next-line @typescript-eslint/consistent-type-assertions
74206
+ return outputStruct;
74207
+ }
74080
74208
  default:
74081
74209
  (0, never_1.assertNever)(schema);
74082
74210
  }
@@ -74195,18 +74323,63 @@ class ValidateASN1 {
74195
74323
  }
74196
74324
  exports.ValidateASN1 = ValidateASN1;
74197
74325
  _ValidateASN1_schema = new WeakMap();
74326
+ /**
74327
+ * Validate that the tag is any valid ASN.1 type
74328
+ */
74198
74329
  ValidateASN1.IsAny = Symbol('IsAny');
74330
+ /**
74331
+ * Validate that the tag is any valid ASN.1 type, but do not
74332
+ * attempt to interpret it
74333
+ */
74199
74334
  ValidateASN1.IsUnknown = Symbol('IsUnknown');
74335
+ /**
74336
+ * Validate the tag is either a GeneralizedTime or UTCTime
74337
+ * depending on the value (i.e. before or after 2050)
74338
+ * as per RFC 5280
74339
+ */
74200
74340
  ValidateASN1.IsDate = Symbol('IsDate');
74341
+ /**
74342
+ * Validate the tag is either a GeneralizedTime or UTCTime
74343
+ */
74201
74344
  ValidateASN1.IsAnyDate = Symbol('IsAnyDate');
74345
+ /**
74346
+ * Validate that the tag is the least-requisite string type
74347
+ * (i.e. PrintableString, IA5String, or UTF8String) for
74348
+ * the value
74349
+ */
74202
74350
  ValidateASN1.IsString = Symbol('IsString');
74351
+ /**
74352
+ * Validate that the tag is any string type of PrintableString,
74353
+ * IA5String, or UTF8String
74354
+ */
74203
74355
  ValidateASN1.IsAnyString = Symbol('IsAnyString');
74356
+ /**
74357
+ * Validate that the tag is an OctetString
74358
+ */
74204
74359
  ValidateASN1.IsOctetString = Symbol('IsOctetString');
74360
+ /**
74361
+ * Validate that the tag is a BitString
74362
+ */
74205
74363
  ValidateASN1.IsBitString = Symbol('IsBitString');
74364
+ /**
74365
+ * Validate that the tag is an Integer
74366
+ */
74206
74367
  ValidateASN1.IsInteger = Symbol('IsInteger');
74368
+ /**
74369
+ * Validate that the tag is a Boolean
74370
+ */
74207
74371
  ValidateASN1.IsBoolean = Symbol('IsBoolean');
74372
+ /**
74373
+ * Validate that the tag is an Object Identifier (OID)
74374
+ */
74208
74375
  ValidateASN1.IsOID = Symbol('IsOID');
74376
+ /**
74377
+ * Validate that the tag is a Set
74378
+ */
74209
74379
  ValidateASN1.IsSet = Symbol('IsSet');
74380
+ /**
74381
+ * Validate that the tag is a Null
74382
+ */
74210
74383
  ValidateASN1.IsNull = Symbol('IsNull');
74211
74384
  /**
74212
74385
  * An ASN.1 object which contains the DER encoded value as well as the
@@ -76676,7 +76849,12 @@ function promiseGenerator() {
76676
76849
  }
76677
76850
  return ({ promise, resolve, reject });
76678
76851
  }
76679
- function convertToJSON(_ignore_key, item) {
76852
+ function convertToJSON(key, item) {
76853
+ // @ts-ignore
76854
+ if (this !== undefined) {
76855
+ // @ts-ignore
76856
+ item = this[key];
76857
+ }
76680
76858
  switch (typeof item) {
76681
76859
  case 'string':
76682
76860
  case 'boolean':
@@ -76717,6 +76895,9 @@ function convertToJSON(_ignore_key, item) {
76717
76895
  if (util_1.types.isArrayBuffer(item)) {
76718
76896
  return (Buffer.from(item).toString('base64'));
76719
76897
  }
76898
+ if (typeof item === 'symbol') {
76899
+ return (item.toString());
76900
+ }
76720
76901
  if (item instanceof Object) {
76721
76902
  if (item.toJSON !== undefined) {
76722
76903
  if (typeof item.toJSON === 'function') {
@@ -78044,7 +78225,7 @@ class VoteQuote extends VoteLikeBase {
78044
78225
  throw (new vote_1.default('VOTE_EXPIRED', `VoteQuote is expired (expired on ${this.validityTo.toISOString()}; issued on ${this.validityFrom.toISOString()}; moment: ${expirationCheckMomentISO})`));
78045
78226
  }
78046
78227
  if (!this.quote) {
78047
- throw (new vote_1.default('VOTE_FEE_NOT_QUOTE', `Tried to construct a quote but fee kind is note QUOTE`));
78228
+ throw (new vote_1.default('VOTE_FEE_NOT_QUOTE', `Tried to construct a quote but kind is not QUOTE`));
78048
78229
  }
78049
78230
  }
78050
78231
  }
@@ -78795,7 +78976,7 @@ exports.Testing = { findRDN, blockHashesFromVote, feeFromVote };
78795
78976
 
78796
78977
  Object.defineProperty(exports, "__esModule", ({ value: true }));
78797
78978
  exports.version = void 0;
78798
- exports.version = '0.14.8+g2ae53aba450fae088463ac1a8f545b6460825c5b';
78979
+ exports.version = '0.14.9+gdb1185935886a43e4feda1919fa65830dc656174';
78799
78980
  exports["default"] = exports.version;
78800
78981
 
78801
78982
 
@@ -1 +1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