@keetanetwork/keetanet-client 0.10.4 → 0.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (240) hide show
  1. package/api/index.d.ts +23 -7
  2. package/api/node.d.ts +27 -2
  3. package/api/vote.d.ts +4 -6
  4. package/client/builder.d.ts +17 -0
  5. package/client/client_common_tests.d.ts +28 -1
  6. package/client/index-browser.d.ts +129 -7
  7. package/client/index-browser.js +25383 -37128
  8. package/client/index.d.ts +129 -7
  9. package/client/index.js +3828 -6498
  10. package/config/index.d.ts +6 -1
  11. package/docs/assets/hierarchy.js +1 -1
  12. package/docs/assets/search.js +1 -1
  13. package/docs/classes/KeetaNetSDK.Client.html +42 -13
  14. package/docs/classes/KeetaNetSDK.Referenced.Account.html +31 -21
  15. package/docs/classes/KeetaNetSDK.Referenced.BaseSet.html +2 -2
  16. package/docs/classes/KeetaNetSDK.Referenced.Block.html +2 -4
  17. package/docs/classes/KeetaNetSDK.Referenced.BlockBuilder.html +1 -1
  18. package/docs/classes/KeetaNetSDK.Referenced.BlockHash.html +4 -5
  19. package/docs/classes/KeetaNetSDK.Referenced.BlockOperation.html +1 -1
  20. package/docs/classes/KeetaNetSDK.Referenced.BlockOperationCREATE_IDENTIFIER.html +2 -2
  21. package/docs/classes/KeetaNetSDK.Referenced.BlockOperationMANAGE_CERTIFICATE.html +12 -0
  22. package/docs/classes/KeetaNetSDK.Referenced.BlockOperationMODIFY_PERMISSIONS.html +2 -2
  23. package/docs/classes/KeetaNetSDK.Referenced.BlockOperationRECEIVE.html +2 -2
  24. package/docs/classes/KeetaNetSDK.Referenced.BlockOperationSEND.html +2 -2
  25. package/docs/classes/KeetaNetSDK.Referenced.BlockOperationSET_INFO.html +2 -2
  26. package/docs/classes/KeetaNetSDK.Referenced.BlockOperationSET_REP.html +2 -2
  27. package/docs/classes/KeetaNetSDK.Referenced.BlockOperationTOKEN_ADMIN_MODIFY_BALANCE.html +2 -2
  28. package/docs/classes/KeetaNetSDK.Referenced.BlockOperationTOKEN_ADMIN_SUPPLY.html +2 -2
  29. package/docs/classes/{KeetaNetSDK.Referenced.src_lib_utils_certificate.Certificate.html → KeetaNetSDK.Referenced.Certificate.html} +12 -9
  30. package/docs/classes/KeetaNetSDK.Referenced.CertificateBundle.html +8 -0
  31. package/docs/classes/KeetaNetSDK.Referenced.CertificateHash.html +16 -0
  32. package/docs/classes/KeetaNetSDK.Referenced.ECDSAKeyPair.html +1 -1
  33. package/docs/classes/KeetaNetSDK.Referenced.ECDSASECP256K1KeyPair.html +1 -1
  34. package/docs/classes/KeetaNetSDK.Referenced.ECDSASECP256K1PrivateKey.html +1 -1
  35. package/docs/classes/KeetaNetSDK.Referenced.ECDSASECP256K1PublicKey.html +1 -1
  36. package/docs/classes/KeetaNetSDK.Referenced.ECDSASECP256K1Signature.html +1 -1
  37. package/docs/classes/KeetaNetSDK.Referenced.ECDSASECP256R1KeyPair.html +1 -1
  38. package/docs/classes/KeetaNetSDK.Referenced.ECDSASECP256R1PrivateKey.html +1 -1
  39. package/docs/classes/KeetaNetSDK.Referenced.ECDSASECP256R1PublicKey.html +1 -1
  40. package/docs/classes/KeetaNetSDK.Referenced.ECDSASECP256R1Signature.html +1 -1
  41. package/docs/classes/KeetaNetSDK.Referenced.ED25519KeyPair.html +1 -1
  42. package/docs/classes/KeetaNetSDK.Referenced.ED25519PrivateKey.html +1 -1
  43. package/docs/classes/KeetaNetSDK.Referenced.ED25519PublicKey.html +1 -1
  44. package/docs/classes/KeetaNetSDK.Referenced.ED25519Signature.html +1 -1
  45. package/docs/classes/KeetaNetSDK.Referenced.ExternalKeyPair.html +1 -1
  46. package/docs/classes/KeetaNetSDK.Referenced.ExternalSet.html +1 -1
  47. package/docs/classes/KeetaNetSDK.Referenced.IdentifierKey.html +1 -1
  48. package/docs/classes/KeetaNetSDK.Referenced.IdentifierKeyPair.html +4 -4
  49. package/docs/classes/KeetaNetSDK.Referenced.KeetaNetError.html +1 -1
  50. package/docs/classes/KeetaNetSDK.Referenced.KeyInterface.html +1 -1
  51. package/docs/classes/KeetaNetSDK.Referenced.KeyStorage.html +1 -1
  52. package/docs/classes/KeetaNetSDK.Referenced.Ledger.html +4 -2
  53. package/docs/classes/KeetaNetSDK.Referenced.LedgerAtomicInterface.html +3 -1
  54. package/docs/classes/KeetaNetSDK.Referenced.LedgerRequestCache.html +1 -1
  55. package/docs/classes/KeetaNetSDK.Referenced.Node.html +1 -1
  56. package/docs/classes/KeetaNetSDK.Referenced.P2PSwitch.html +3 -3
  57. package/docs/classes/KeetaNetSDK.Referenced.PendingAccount.html +3 -2
  58. package/docs/classes/KeetaNetSDK.Referenced.PermissionSetHolder.html +1 -1
  59. package/docs/classes/KeetaNetSDK.Referenced.Permissions.html +2 -3
  60. package/docs/classes/KeetaNetSDK.Referenced.PossiblyExpiredVote.html +4 -3
  61. package/docs/classes/KeetaNetSDK.Referenced.RequestTiming.html +16 -2
  62. package/docs/classes/KeetaNetSDK.Referenced.SignatureStorage.html +1 -1
  63. package/docs/classes/KeetaNetSDK.Referenced.Stats.html +3 -2
  64. package/docs/classes/KeetaNetSDK.Referenced.UserClientBuilder.html +3 -2
  65. package/docs/classes/KeetaNetSDK.Referenced.Vote.html +4 -5
  66. package/docs/classes/KeetaNetSDK.Referenced.VoteBlockBundle.html +35 -0
  67. package/docs/classes/KeetaNetSDK.Referenced.VoteBlockHash.html +1 -1
  68. package/docs/classes/KeetaNetSDK.Referenced.VoteBlockHashMap.html +9 -8
  69. package/docs/classes/KeetaNetSDK.Referenced.VoteHash.html +1 -1
  70. package/docs/classes/KeetaNetSDK.Referenced.VoteStaple.html +23 -29
  71. package/docs/classes/KeetaNetSDK.Referenced.VoteStapleHash.html +1 -1
  72. package/docs/classes/KeetaNetSDK.Referenced.default.html +1 -1
  73. package/docs/classes/KeetaNetSDK.Referenced.src_lib_utils_asn1.BufferStorageASN1.html +1 -1
  74. package/docs/classes/KeetaNetSDK.Referenced.src_lib_utils_buffer.BufferStorage.html +1 -1
  75. package/docs/classes/KeetaNetSDK.Referenced.src_lib_utils_certificate.CertificateBuilder.html +1 -1
  76. package/docs/classes/KeetaNetSDK.UserClient.html +60 -18
  77. package/docs/documents/GETTING-STARTED.html +5 -2
  78. package/docs/enums/KeetaNetSDK.Referenced.AccountKeyAlgorithm.html +2 -1
  79. package/docs/enums/KeetaNetSDK.Referenced.AdjustMethod.html +4 -4
  80. package/docs/enums/KeetaNetSDK.Referenced.BaseFlag.html +2 -1
  81. package/docs/enums/KeetaNetSDK.Referenced.OperationType.html +2 -1
  82. package/docs/functions/KeetaNetSDK.Referenced.src_config.getDefaultConfig.html +2 -2
  83. package/docs/functions/KeetaNetSDK.Referenced.src_config.getNetworkAlias.html +1 -1
  84. package/docs/functions/KeetaNetSDK.Referenced.src_config.getValidation.html +1 -1
  85. package/docs/functions/KeetaNetSDK.Referenced.src_config.isNetwork.html +1 -1
  86. package/docs/functions/KeetaNetSDK.Referenced.src_lib_utils_conversion.objectToBuffer.html +1 -1
  87. package/docs/functions/KeetaNetSDK.Referenced.src_lib_utils_conversion.toJSONSerializable.html +1 -1
  88. package/docs/functions/KeetaNetSDK.Referenced.src_lib_utils_helper.booleanEnv.html +1 -0
  89. package/docs/functions/KeetaNetSDK.Referenced.src_lib_utils_helper.nonNullable.html +1 -0
  90. package/docs/hierarchy.html +1 -1
  91. package/docs/interfaces/KeetaNetSDK.Referenced.ACLEntry.html +1 -1
  92. package/docs/interfaces/KeetaNetSDK.Referenced.ACLUpdate.html +1 -1
  93. package/docs/interfaces/KeetaNetSDK.Referenced.ASN1ExplicitContextTag.html +1 -1
  94. package/docs/interfaces/KeetaNetSDK.Referenced.ASN1ImplicitContextTag.html +1 -1
  95. package/docs/interfaces/KeetaNetSDK.Referenced.ASN1Object.html +1 -1
  96. package/docs/interfaces/KeetaNetSDK.Referenced.BaseExternalKeyPairFunctions.html +1 -1
  97. package/docs/interfaces/KeetaNetSDK.Referenced.BaseGenerationConfig.html +1 -1
  98. package/docs/interfaces/KeetaNetSDK.Referenced.BlockCanonical.html +2 -2
  99. package/docs/interfaces/KeetaNetSDK.Referenced.BlockJSON.html +2 -2
  100. package/docs/interfaces/KeetaNetSDK.Referenced.BlockJSONOperation.html +1 -1
  101. package/docs/interfaces/KeetaNetSDK.Referenced.BlockJSONOperationCREATE_IDENTIFIER.html +1 -1
  102. package/docs/interfaces/KeetaNetSDK.Referenced.BlockJSONOperationMANAGE_CERTIFICATE.html +6 -0
  103. package/docs/interfaces/KeetaNetSDK.Referenced.BlockJSONOperationMANAGE_CERTIFICATESerializable.html +5 -0
  104. package/docs/interfaces/KeetaNetSDK.Referenced.BlockJSONOperationMODIFY_PERMISSIONS.html +1 -1
  105. package/docs/interfaces/KeetaNetSDK.Referenced.BlockJSONOperationRECEIVE.html +1 -1
  106. package/docs/interfaces/KeetaNetSDK.Referenced.BlockJSONOperationSEND.html +1 -1
  107. package/docs/interfaces/KeetaNetSDK.Referenced.BlockJSONOperationSET_INFO.html +1 -1
  108. package/docs/interfaces/KeetaNetSDK.Referenced.BlockJSONOperationSET_REP.html +1 -1
  109. package/docs/interfaces/KeetaNetSDK.Referenced.BlockJSONOperationTOKEN_ADMIN_MODIFY_BALANCE.html +1 -1
  110. package/docs/interfaces/KeetaNetSDK.Referenced.BlockJSONOperationTOKEN_ADMIN_SUPPLY.html +2 -2
  111. package/docs/interfaces/KeetaNetSDK.Referenced.BlockUnsignedCanonical.html +2 -2
  112. package/docs/interfaces/KeetaNetSDK.Referenced.CertificateWithIntermediates.html +3 -0
  113. package/docs/interfaces/KeetaNetSDK.Referenced.CertificateWithIntermediatesResponse.html +3 -0
  114. package/docs/interfaces/KeetaNetSDK.Referenced.ComputedBlocksEffectFields.html +3 -2
  115. package/docs/interfaces/KeetaNetSDK.Referenced.Constructor.html +1 -1
  116. package/docs/interfaces/KeetaNetSDK.Referenced.DisposableTimingHandle.html +7 -0
  117. package/docs/interfaces/KeetaNetSDK.Referenced.ExternalKeyPairFunctionsNoEncryption.html +1 -1
  118. package/docs/interfaces/KeetaNetSDK.Referenced.ExternalKeyPairFunctionsSupportsEncryption.html +1 -1
  119. package/docs/interfaces/KeetaNetSDK.Referenced.IdentifierCreateRequest.html +2 -2
  120. package/docs/interfaces/KeetaNetSDK.Referenced.InitialConfigSupply.html +1 -1
  121. package/docs/interfaces/KeetaNetSDK.Referenced.InstanceSet.html +13 -0
  122. package/docs/interfaces/KeetaNetSDK.Referenced.KVGenericOptionsType.html +2 -0
  123. package/docs/interfaces/KeetaNetSDK.Referenced.KVSetOptionsType.html +3 -2
  124. package/docs/interfaces/KeetaNetSDK.Referenced.KVStorageProviderAPI.html +2 -2
  125. package/docs/interfaces/KeetaNetSDK.Referenced.LedgerConfig.html +4 -2
  126. package/docs/interfaces/KeetaNetSDK.Referenced.LedgerStatistics.html +3 -2
  127. package/docs/interfaces/KeetaNetSDK.Referenced.LedgerStorageAPI.html +15 -7
  128. package/docs/interfaces/KeetaNetSDK.Referenced.LedgerStorageTransactionBase.html +6 -0
  129. package/docs/interfaces/KeetaNetSDK.Referenced.ModifyTokenBalanceEntry.html +1 -1
  130. package/docs/interfaces/KeetaNetSDK.Referenced.NodeConfig.html +3 -3
  131. package/docs/interfaces/KeetaNetSDK.Referenced.NumericValidationRule.html +3 -0
  132. package/docs/interfaces/KeetaNetSDK.Referenced.NumericValueEntry.html +1 -1
  133. package/docs/interfaces/KeetaNetSDK.Referenced.P2PPeerBase.html +1 -1
  134. package/docs/interfaces/KeetaNetSDK.Referenced.P2PPeerListener.html +1 -1
  135. package/docs/interfaces/KeetaNetSDK.Referenced.P2PPeerRepBase.html +3 -3
  136. package/docs/interfaces/KeetaNetSDK.Referenced.PendingOperations.html +3 -2
  137. package/docs/interfaces/KeetaNetSDK.Referenced.PendingOperationsJSON.html +3 -2
  138. package/docs/interfaces/KeetaNetSDK.Referenced.PublicKeyStorage.html +1 -1
  139. package/docs/interfaces/KeetaNetSDK.Referenced.PublicKeyStringMapping.html +3 -2
  140. package/docs/interfaces/KeetaNetSDK.Referenced.RequestTokenReceiveEntry.html +1 -1
  141. package/docs/interfaces/KeetaNetSDK.Referenced.TokenNumericEntry.html +1 -1
  142. package/docs/interfaces/KeetaNetSDK.Referenced.UserClientConfig.html +2 -2
  143. package/docs/interfaces/KeetaNetSDK.Referenced.UserClientListenerOptions.html +2 -0
  144. package/docs/interfaces/KeetaNetSDK.Referenced.UserClientOptions.html +1 -1
  145. package/docs/interfaces/KeetaNetSDK.Referenced.VoteBundleConstructor.html +6 -0
  146. package/docs/interfaces/KeetaNetSDK.Referenced.VoteStapleJSON.html +2 -2
  147. package/docs/interfaces/KeetaNetSDK.Referenced.WithIsInstance.html +1 -1
  148. package/docs/interfaces/KeetaNetSDK.Referenced.src_config.ValidationConfig.html +2 -2
  149. package/docs/interfaces/KeetaNetSDK.Referenced.src_lib_utils_asn1.ASN1BitString.html +1 -1
  150. package/docs/interfaces/KeetaNetSDK.Referenced.src_lib_utils_asn1.ASN1Date.html +1 -1
  151. package/docs/interfaces/KeetaNetSDK.Referenced.src_lib_utils_asn1.ASN1OID.html +1 -1
  152. package/docs/interfaces/KeetaNetSDK.Referenced.src_lib_utils_asn1.ASN1Set.html +1 -1
  153. package/docs/interfaces/KeetaNetSDK.Referenced.src_lib_utils_asn1.ASN1String.html +1 -1
  154. package/docs/interfaces/KeetaNetSDK.Referenced.src_lib_utils_conversion.ToJSONSerializableOptions.html +3 -0
  155. package/docs/interfaces/KeetaNetSDK.Referenced.src_lib_utils_helper.InstanceSetConstructor.html +2 -2
  156. package/docs/modules/KeetaNetSDK.Referenced.html +1 -1
  157. package/docs/modules/KeetaNetSDK.Referenced.src_lib_utils_certificate.html +1 -1
  158. package/docs/modules/KeetaNetSDK.Referenced.src_lib_utils_conversion.html +1 -1
  159. package/docs/modules/KeetaNetSDK.Referenced.src_lib_utils_helper.html +1 -1
  160. package/docs/types/KeetaNetSDK.Referenced.AccountKeyAlgorithmHex.html +8 -0
  161. package/docs/types/KeetaNetSDK.Referenced.AccountKeyAlgorithmHexReverse.html +1 -0
  162. package/docs/types/KeetaNetSDK.Referenced.AccountKeyAlgorithmHexToType.html +1 -0
  163. package/docs/types/KeetaNetSDK.Referenced.AddBinaryIfIncluded.html +1 -0
  164. package/docs/types/KeetaNetSDK.Referenced.BlockHashString.html +1 -0
  165. package/docs/types/KeetaNetSDK.Referenced.CertificateErrorCode.html +1 -0
  166. package/docs/types/KeetaNetSDK.Referenced.CertificateHashString.html +1 -0
  167. package/docs/types/KeetaNetSDK.Referenced.CertificateOptions.html +4 -4
  168. package/docs/types/KeetaNetSDK.Referenced.CertificateUpdate.html +2 -0
  169. package/docs/types/KeetaNetSDK.Referenced.ClientRepresentative.html +1 -1
  170. package/docs/types/KeetaNetSDK.Referenced.ComputedEffectOfBlocks.html +3 -2
  171. package/docs/types/KeetaNetSDK.Referenced.DbStats.html +2 -0
  172. package/docs/types/KeetaNetSDK.Referenced.ErrorCode.html +1 -1
  173. package/docs/types/KeetaNetSDK.Referenced.ExportedJSONOperation.html +1 -0
  174. package/docs/types/KeetaNetSDK.Referenced.MultisigPublicKeyString.html +1 -0
  175. package/docs/types/KeetaNetSDK.Referenced.NodeLike-1.html +1 -0
  176. package/docs/types/KeetaNetSDK.Referenced.NodeLike.html +1 -1
  177. package/docs/types/KeetaNetSDK.Referenced.PublicKeyAndTypeStringHex.html +3 -0
  178. package/docs/types/KeetaNetSDK.Referenced.TimingData.html +2 -0
  179. package/docs/types/KeetaNetSDK.Referenced.TimingSectionHandle.html +6 -0
  180. package/docs/types/KeetaNetSDK.Referenced.src_config.NetworkConfig.html +3 -3
  181. package/docs/types/KeetaNetSDK.Referenced.src_lib_utils_asn1.ValidateASN1.Schema.html +1 -1
  182. package/docs/types/KeetaNetSDK.Referenced.src_lib_utils_asn1.ValidateASN1.SchemaMap.html +1 -1
  183. package/docs/types/KeetaNetSDK.Referenced.src_lib_utils_certificate.CertificateJSONOutput.html +1 -0
  184. package/docs/types/KeetaNetSDK.Referenced.src_lib_utils_conversion.ToJSONSerializable.html +1 -1
  185. package/docs/variables/KeetaNetSDK.Referenced.BlockErrorCodes-1.html +1 -0
  186. package/docs/variables/KeetaNetSDK.Referenced.BlockErrorCodes.html +1 -1
  187. package/docs/{types/KeetaNetSDK.Referenced.JSONUnsupportedTypes.html → variables/KeetaNetSDK.Referenced.CertificateErrorType.html} +1 -1
  188. package/docs/variables/KeetaNetSDK.Referenced.ClientErrorCodes.html +1 -1
  189. package/docs/variables/KeetaNetSDK.Referenced.KVErrorCodes.html +1 -1
  190. package/docs/variables/KeetaNetSDK.Referenced.Operation.html +2 -2
  191. package/docs/variables/KeetaNetSDK.Referenced.identifierKeyTypes.html +1 -1
  192. package/docs/variables/KeetaNetSDK.Referenced.src_config.networksArray.html +1 -1
  193. package/docs/variables/KeetaNetSDK.Referenced.src_lib_utils_helper.AsyncDisposableStack.html +2 -0
  194. package/lib/account.d.ts +68 -29
  195. package/lib/block/index.d.ts +53 -23
  196. package/lib/block/operations.d.ts +78 -33
  197. package/lib/error/block.d.ts +1 -1
  198. package/lib/error/certificate.d.ts +9 -0
  199. package/lib/error/client.d.ts +1 -1
  200. package/lib/error/index.d.ts +2 -1
  201. package/lib/error/kv.d.ts +1 -1
  202. package/lib/kv/index.d.ts +15 -8
  203. package/lib/kv/kv_redis.d.ts +18 -8
  204. package/lib/ledger/common.d.ts +13 -5
  205. package/lib/ledger/db_dynamodb.d.ts +22 -16
  206. package/lib/ledger/db_postgres.d.ts +10 -10
  207. package/lib/ledger/db_spanner.d.ts +26 -14
  208. package/lib/ledger/db_spanner_helper.d.ts +94 -109
  209. package/lib/ledger/db_sqlite.d.ts +10 -10
  210. package/lib/ledger/effects.d.ts +19 -4
  211. package/lib/ledger/index.d.ts +57 -12
  212. package/lib/ledger/types.d.ts +7 -1
  213. package/lib/node/local.d.ts +10 -1
  214. package/lib/node/timing.d.ts +44 -5
  215. package/lib/p2p.d.ts +6 -3
  216. package/lib/permissions.d.ts +3 -3
  217. package/lib/pubsub/index.d.ts +1 -1
  218. package/lib/pubsub/providers.d.ts +2 -0
  219. package/lib/pubsub/ps_gcp.d.ts +14 -0
  220. package/lib/stats.d.ts +5 -0
  221. package/lib/utils/asn1.d.ts +3 -3
  222. package/lib/utils/certificate.d.ts +75 -4
  223. package/lib/utils/conversion.d.ts +13 -35
  224. package/lib/utils/helper.d.ts +19 -8
  225. package/lib/utils/helper_testing.d.ts +1 -1
  226. package/lib/vote.d.ts +73 -55
  227. package/package.json +2 -3
  228. package/version.d.ts +1 -1
  229. package/docs/functions/KeetaNetSDK.Referenced.src_lib_utils_conversion.RegisterSerializable.html +0 -2
  230. package/docs/interfaces/KeetaNetSDK.Referenced.BlockJSONOutput.html +0 -5
  231. package/docs/interfaces/KeetaNetSDK.Referenced.VoteJSONOutput.html +0 -4
  232. package/docs/interfaces/KeetaNetSDK.Referenced.WithConversionClass.html +0 -6
  233. package/docs/interfaces/KeetaNetSDK.Referenced.src_lib_utils_helper.InstanceSet.html +0 -10
  234. package/docs/types/KeetaNetSDK.Referenced.JSONSupportedObject.html +0 -1
  235. package/docs/types/KeetaNetSDK.Referenced.JSONSupportedValue.html +0 -1
  236. package/docs/types/KeetaNetSDK.Referenced.Vote.html +0 -1
  237. package/docs/types/KeetaNetSDK.Referenced.VoteJSONOutput.html +0 -1
  238. package/docs/types/KeetaNetSDK.Referenced.src_lib_utils_conversion.JSONSupported.html +0 -1
  239. package/docs/types/KeetaNetSDK.Referenced.src_lib_utils_conversion.ToJSONSerializableOptions.html +0 -3
  240. package/docs/variables/KeetaNetSDK.Referenced.default.html +0 -3
@@ -1,7 +1,8 @@
1
1
  import type { GenericAccount, TokenAddress } from '../account';
2
2
  import type { AdjustMethod } from '../block';
3
3
  import type { Permissions } from '../permissions';
4
- import type { TimeStats } from '../stats';
4
+ import type { DbStats, TimeStats } from '../stats';
5
+ import type { Certificate, CertificateBundle } from '../utils/certificate';
5
6
  /**
6
7
  * Account info entry
7
8
  */
@@ -97,5 +98,10 @@ export interface LedgerStatistics {
97
98
  blockCount: number;
98
99
  transactionCount: number;
99
100
  representativeCount: number;
101
+ db: DbStats;
100
102
  settlementTimes: TimeStats;
101
103
  }
104
+ export interface CertificateWithIntermediates {
105
+ certificate: Certificate;
106
+ intermediates: CertificateBundle | null;
107
+ }
@@ -1,11 +1,18 @@
1
+ import type { Response as ExpressResponse } from 'express';
1
2
  import type { NodeConfig } from './';
2
3
  import { Node } from './';
3
4
  import type { BootstrapConfig } from '../bootstrap';
4
5
  import { BootstrapClient } from '../bootstrap';
5
6
  import type { ErrorCode } from '../error';
6
- export type LocalNodeConfig = NodeConfig & {
7
+ export type LocalNodeConfig = Omit<NodeConfig, 'nodeOptions'> & {
7
8
  bootstrap?: BootstrapConfig;
8
9
  invokeSecret?: string;
10
+ nodeOptions?: {
11
+ listenIP?: string;
12
+ listenPort?: number;
13
+ timingSampleRate?: number;
14
+ noSyncAfterEachRoute?: boolean;
15
+ };
9
16
  };
10
17
  export type ApiErrorResponse = {
11
18
  error: boolean;
@@ -19,7 +26,9 @@ type LocalNodeRunOptions = {
19
26
  export declare class LocalNode extends Node {
20
27
  #private;
21
28
  static isInstance: (obj: any, strict?: boolean) => obj is LocalNode;
29
+ config: LocalNodeConfig;
22
30
  constructor(config: LocalNodeConfig);
31
+ setCorsHeaders(response: ExpressResponse): void;
23
32
  addRoutes(prefix?: string): void;
24
33
  get _app(): import("express-serve-static-core").Express;
25
34
  run(options?: LocalNodeRunOptions): Promise<void>;
@@ -1,11 +1,50 @@
1
+ interface DisposableTimingHandle extends Disposable {
2
+ /**
3
+ * Unique identifier for the timing section
4
+ */
5
+ id: symbol;
6
+ /**
7
+ * End the timing section
8
+ */
9
+ end: () => void;
10
+ /**
11
+ * Dispose of the timing section, ending it
12
+ */
13
+ [Symbol.dispose]: () => void;
14
+ }
1
15
  export declare class RequestTiming {
2
16
  #private;
3
- startTime(section: string): void;
4
- endTime(section: string, deduplicate?: boolean): void;
5
- runTimer<T>(section: string, code: () => Promise<T>, deduplicate?: boolean): Promise<T>;
6
- getTiming(section: string): number;
17
+ static defaultLogger: Console;
18
+ log: Console;
19
+ /**
20
+ * Start timing a section of code
21
+ * @param section Name of the section to time -- should be unique within the code base so that it can be identified later
22
+ * @returns A handle which can be used to end the timing section
23
+ */
24
+ startTime(section: string): DisposableTimingHandle;
25
+ endTime(section: symbol | undefined | ReturnType<RequestTiming['startTime']>): void;
26
+ /** @deprecated Use `endTime(section: symbol)` instead */
27
+ endTime(section: string | undefined, deduplicate?: boolean): void;
28
+ /**
29
+ * Run a piece of code and time it, returning the result of the code
30
+ *
31
+ * This takes an optional "timing" parameter which is a timing object
32
+ * if one exists, to update -- if this parameter is undefined no timing
33
+ * will be done.
34
+ *
35
+ * @param section Name of the section to time -- should be unique within the code base so that it can be identified later
36
+ * @param timing Timing object to update, if available
37
+ * @param code The code to run
38
+ * @returns The result of the code
39
+ */
40
+ static runTimer<T>(section: string, timing: RequestTiming | undefined, code: () => Promise<T>): Promise<T>;
41
+ runTimer<T>(section: string, code: () => Promise<T>): Promise<T>;
42
+ private getTiming;
7
43
  getAllTiming(): {
8
- [section: string]: number;
44
+ [section: string]: {
45
+ name: string;
46
+ duration: number;
47
+ };
9
48
  };
10
49
  counter(): number;
11
50
  }
package/lib/p2p.d.ts CHANGED
@@ -72,9 +72,12 @@ interface P2PPeerBase {
72
72
  interface P2PPeerRepBase extends P2PPeerBase {
73
73
  kind: NodeKind.REPRESENTATIVE;
74
74
  /**
75
- * Endpoint to reach the representative
75
+ * Endpoints to reach the representative
76
76
  */
77
- endpoint: string;
77
+ endpoints: {
78
+ p2p: string;
79
+ api: string;
80
+ };
78
81
  /**
79
82
  * Public key of the representative (used as the ID)
80
83
  */
@@ -224,7 +227,7 @@ export declare class P2PWebSocket implements P2PConnection {
224
227
  /**
225
228
  * The interfaces from the Node that the P2P switch uses
226
229
  */
227
- type NodeLike = Pick<Node, 'recvMessageFromPeer' | 'config' | 'stats' | 'log'>;
230
+ type NodeLike = Pick<Node, 'recvMessageFromPeer' | 'sendMessage' | 'config' | 'stats' | 'log'>;
228
231
  /**
229
232
  * Deserializer DB
230
233
  */
@@ -17,7 +17,8 @@ declare enum BaseFlag {
17
17
  TOKEN_ADMIN_SUPPLY = 6,/* 0x0040 */
18
18
  TOKEN_ADMIN_MODIFY_BALANCE = 7,/* 0x0080 */
19
19
  PERMISSION_DELEGATE_ADD = 11,/* 0x0800 */
20
- PERMISSION_DELEGATE_REMOVE = 12
20
+ PERMISSION_DELEGATE_REMOVE = 12,/* 0x1000 */
21
+ MANAGE_CERTIFICATE = 13
21
22
  }
22
23
  type ExternalFlagName = `${typeof externalFlagPrefix}${string}`;
23
24
  export type BaseFlagName = keyof typeof BaseFlag;
@@ -116,6 +117,5 @@ export declare class Permissions {
116
117
  get canUseDelegation(): boolean;
117
118
  get base(): BaseSet;
118
119
  get external(): ExternalSet;
119
- static toJSONSerializablePrefix: string;
120
- static toJSONSerializable(value: Permissions): bigint[];
120
+ toJSON(): [bigint, bigint];
121
121
  }
@@ -1,7 +1,7 @@
1
1
  import type { JSONSerializable } from '../utils/conversion';
2
2
  export type SubscriptionCallback = (message: JSONSerializable) => void;
3
3
  export interface PubSubProviderAPI {
4
- subscribe: (channel: string, callback: SubscriptionCallback) => Promise<void>;
5
4
  publish: (channel: string, message: JSONSerializable) => Promise<void>;
5
+ subscribe: (channel: string, callback: SubscriptionCallback) => Promise<void>;
6
6
  destroy: () => Promise<void>;
7
7
  }
@@ -1,7 +1,9 @@
1
1
  import PubSubProviderMemory from './ps_memory';
2
2
  import PubSubProviderRedis from './ps_redis';
3
+ import PubSubProviderGCP from './ps_gcp';
3
4
  export declare const PS: {
4
5
  Memory: typeof PubSubProviderMemory;
5
6
  Redis: typeof PubSubProviderRedis;
7
+ GCP: typeof PubSubProviderGCP;
6
8
  };
7
9
  export default PS;
@@ -0,0 +1,14 @@
1
+ import type { JSONSerializable } from '../utils/conversion';
2
+ import type { PubSubProviderAPI, SubscriptionCallback } from '.';
3
+ import { PubSub } from '@google-cloud/pubsub';
4
+ import type { Topic } from '@google-cloud/pubsub';
5
+ export declare class PubSubProviderGCP implements PubSubProviderAPI {
6
+ #private;
7
+ constructor(projectId: string, apiEndpoint?: string);
8
+ get _testing_pubsub(): PubSub;
9
+ publish(channel: string, message: JSONSerializable): Promise<void>;
10
+ subscribe(channel: string, callback: SubscriptionCallback): Promise<void>;
11
+ destroy(): Promise<void>;
12
+ assertTopicExists(topic: Topic, channel: string): Promise<true | undefined>;
13
+ }
14
+ export default PubSubProviderGCP;
package/lib/stats.d.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  import type { KVStorageProvider } from './kv';
2
2
  import { BufferStorage } from './utils/buffer';
3
3
  import type { BlockHash } from './block';
4
+ import type { RequestTiming } from './node/timing';
4
5
  export interface StatsConfig {
5
6
  kv: KVStorageProvider | null;
6
7
  }
@@ -33,6 +34,9 @@ type TimeStat = {
33
34
  export type TimeStats = {
34
35
  [duration in DurationBreakdowns]: TimeStat;
35
36
  };
37
+ export type DbStats = {
38
+ retries: number;
39
+ };
36
40
  export declare class Stats {
37
41
  #private;
38
42
  constructor(config: StatsConfig);
@@ -44,6 +48,7 @@ export declare class Stats {
44
48
  xor(key: string, change: BlockHash | BufferStorage): void;
45
49
  getXor(key: string): Promise<BufferStorage>;
46
50
  addTimingPoint(arena: string, category: string, duration: number, returnOnly?: boolean): Parameters<Stats['incr']>;
51
+ addRequestTiming(arena: string, timing: RequestTiming, returnOnly?: boolean): Parameters<Stats['incr']>[];
47
52
  get(arena: string, key: string): Promise<number>;
48
53
  getTimingData(arena: string, category: string): Promise<TimeStats>;
49
54
  sync(): Promise<void>;
@@ -63,7 +63,7 @@ export declare namespace ValidateASN1 {
63
63
  sequenceOf: Schema;
64
64
  } | {
65
65
  optional: Schema;
66
- } | {
66
+ } | bigint | {
67
67
  type: 'context';
68
68
  kind: 'implicit' | 'explicit';
69
69
  contains: Schema;
@@ -110,7 +110,7 @@ export declare namespace ValidateASN1 {
110
110
  sequenceOf: Schema;
111
111
  } ? SchemaMap<T['sequenceOf']>[] : T extends {
112
112
  optional: Schema;
113
- } ? SchemaMap<T['optional']> | undefined : T extends {
113
+ } ? SchemaMap<T['optional']> | undefined : T extends bigint ? T : T extends {
114
114
  type: 'context';
115
115
  kind: infer U extends 'implicit' | 'explicit';
116
116
  value: number;
@@ -182,7 +182,7 @@ type Mutable<T> = T extends Buffer | ArrayBuffer | Date ? T : T extends object ?
182
182
  export declare class BufferStorageASN1<T extends ASN1AnyJS | Readonly<ASN1AnyJS> = Readonly<ASN1AnyJS>, S extends ValidateASN1.Schema | undefined = undefined> {
183
183
  #private;
184
184
  static readonly Validate: typeof ValidateASN1;
185
- static readonly isInstance: (obj: any, strict?: boolean) => obj is BufferStorageASN1<string | number | bigint | boolean | Buffer | ASN1AnyJS[] | Date | ASN1OID | ASN1Set | ASN1ExplicitContextTag | ASN1ImplicitContextTag | ASN1BitString | ASN1Date | ASN1String | readonly ASN1AnyJS[] | Readonly<Buffer> | Readonly<Date> | Readonly<ASN1OID> | Readonly<ASN1Set> | Readonly<ASN1ExplicitContextTag> | Readonly<ASN1ImplicitContextTag> | Readonly<ASN1BitString> | Readonly<ASN1Date> | Readonly<ASN1String> | null | undefined, ValidateASN1.Schema | undefined>;
185
+ static readonly isInstance: (obj: any, strict?: boolean) => obj is BufferStorageASN1<string | number | bigint | boolean | Date | Buffer | ASN1AnyJS[] | ASN1OID | ASN1Set | ASN1ExplicitContextTag | ASN1ImplicitContextTag | ASN1BitString | ASN1Date | ASN1String | readonly ASN1AnyJS[] | Readonly<Date> | Readonly<Buffer> | Readonly<ASN1OID> | Readonly<ASN1Set> | Readonly<ASN1ExplicitContextTag> | Readonly<ASN1ImplicitContextTag> | Readonly<ASN1BitString> | Readonly<ASN1Date> | Readonly<ASN1String> | null | undefined, ValidateASN1.Schema | undefined>;
186
186
  constructor(input: T | ArrayBuffer, schema?: S);
187
187
  getDER(): ArrayBuffer;
188
188
  getDERBuffer(): Buffer;
@@ -1,6 +1,8 @@
1
1
  import * as ASN1 from './asn1';
2
- import Account from '../account';
2
+ import Account, { AccountKeyAlgorithm } from '../account';
3
3
  import * as HashLib from './hash';
4
+ import { BufferStorage } from './buffer';
5
+ import type { ToJSONSerializableOptions, ToJSONSerializable } from './conversion';
4
6
  /**
5
7
  * De-normalized mapped Certificate Schema, for use in type annotations since
6
8
  * we do not want to expose such a complex type
@@ -132,7 +134,7 @@ export declare class CertificateBuilder {
132
134
  * Create a certificate
133
135
  */
134
136
  buildDER(params?: Partial<CertificateBuilderParams>): Promise<ArrayBuffer>;
135
- build(params?: Partial<CertificateBuilderParams>): Promise<Certificate>;
137
+ build(params?: Partial<CertificateBuilderParams>, options?: ConstructorParameters<typeof Certificate>[1]): Promise<Certificate>;
136
138
  }
137
139
  type CertificateOptions = {
138
140
  /**
@@ -163,6 +165,22 @@ type CertificateOptions = {
163
165
  */
164
166
  isTrustedRoot?: boolean;
165
167
  };
168
+ type CertificateHashString = string & {
169
+ readonly __certificateHash: never;
170
+ };
171
+ /**
172
+ * Certificate hash
173
+ */
174
+ export declare class CertificateHash extends BufferStorage {
175
+ static isInstance: (obj: any, strict?: boolean) => obj is CertificateHash;
176
+ static Set: import("./helper").InstanceSetConstructor<CertificateHash, CertificateHashString>;
177
+ get hashFunctionName(): string;
178
+ constructor(certificateHash: ConstructorParameters<typeof BufferStorage>[0]);
179
+ static fromData(data: Buffer): CertificateHash;
180
+ toJSON(): CertificateHashString;
181
+ toString(): CertificateHashString;
182
+ }
183
+ export type CertificateJSONOutput = ToJSONSerializable<ReturnType<Certificate['toJSON']>>;
166
184
  export declare class Certificate {
167
185
  #private;
168
186
  /**
@@ -269,6 +287,11 @@ export declare class Certificate {
269
287
  * Verifies that the certificate is was signed by the given account or certificate
270
288
  */
271
289
  verify(account: Account | Certificate): boolean;
290
+ /**
291
+ * Asserts provided certificates can construct a valid graph with no loops or orphans, and that all provided certificates can reach the root, or current certificate
292
+ * @param certificates Additional intermediate certificates to verify
293
+ */
294
+ assertCanConstructValidGraph(certificates: Set<Certificate>): true | undefined;
272
295
  /**
273
296
  * Verify against a given certificate store
274
297
  */
@@ -331,10 +354,58 @@ export declare class Certificate {
331
354
  /**
332
355
  * Compute a hash of the certificate
333
356
  */
334
- hash(): string;
357
+ hash(): CertificateHash;
335
358
  /**
336
359
  * Get a JSON representation of the certificate
337
360
  */
338
- toJSON(includeChain?: boolean): any;
361
+ toJSON(options?: ToJSONSerializableOptions, includeChain?: boolean): {
362
+ $binary?: string;
363
+ $chain?: unknown;
364
+ serial: bigint;
365
+ notBefore: Date;
366
+ notAfter: Date;
367
+ subject: string;
368
+ issuer: string;
369
+ subjectPublicKey: Account<AccountKeyAlgorithm.ECDSA_SECP256K1 | AccountKeyAlgorithm.ED25519 | AccountKeyAlgorithm.ECDSA_SECP256R1>;
370
+ baseExtensions: {
371
+ /**
372
+ * Basic Constraints
373
+ */
374
+ basicConstraints?: [ca: boolean, pathLenConstraint?: bigint];
375
+ /**
376
+ * Subject Key Identifier
377
+ */
378
+ subjectKeyIdentifier?: Buffer;
379
+ /**
380
+ * Authority Key Identifier
381
+ */
382
+ authorityKeyIdentifier?: {
383
+ type: "context";
384
+ value: 0;
385
+ contains: Buffer;
386
+ };
387
+ } | undefined;
388
+ subjectDN: {
389
+ name: string;
390
+ value: string;
391
+ }[];
392
+ issuerDN: {
393
+ name: string;
394
+ value: string;
395
+ }[];
396
+ $hash: CertificateHash;
397
+ };
398
+ }
399
+ export declare class CertificateBundle {
400
+ #private;
401
+ static isInstance: (obj: any, strict?: boolean) => obj is CertificateBundle;
402
+ constructor(input: CertificateBundle | Certificate[] | ArrayBuffer | Buffer | string | (ConstructorParameters<typeof Certificate>[0])[] | Set<Certificate>);
403
+ get bundleSize(): number;
404
+ getDER(): ArrayBuffer;
405
+ getDERBuffer(): Buffer;
406
+ getCertificates(): Certificate[];
407
+ toJSON(): {
408
+ certificates: string[];
409
+ };
339
410
  }
340
411
  export {};
@@ -1,46 +1,24 @@
1
- import type { Vote, VoteStaple } from '../vote';
2
- import type Account from '../account';
3
- import type { Block, BlockHash } from '../block';
4
- import type { Permissions } from '../permissions';
5
1
  export type JSONSerializable = string | number | boolean | null | JSONSerializable[] | {
6
2
  [key: string]: JSONSerializable;
7
3
  };
8
4
  export type JSONSerializableObject = {
9
5
  [key: string]: JSONSerializable;
10
6
  };
11
- type JSONUnsupportedTypes = Date | BlockHash | Account | bigint | Permissions | Vote | Block | VoteStaple;
12
- type JSONSupportedObject<T> = {
13
- [Property in keyof T]: Exclude<T[Property], JSONUnsupportedTypes>;
14
- };
15
- type JSONSupportedValue<T> = JSONSupportedObject<T>[any];
16
- export type JSONSupported<T> = JSONSupportedObject<T> | JSONSupportedValue<T>;
17
- export type ToJSONSerializableOptions = {
7
+ export interface ToJSONSerializableOptions<AddBinary extends boolean = boolean> {
18
8
  debugUnsafe?: boolean;
19
- addBinary?: boolean;
20
- };
21
- export type ToJSONSerializable<T> = T extends bigint ? string : T extends Date ? string : T extends Buffer ? string : T extends {
22
- toJSONSerializable(): infer U;
23
- } ? U : T extends {
9
+ addBinary?: AddBinary;
10
+ }
11
+ type AddBinaryIfIncluded<I> = I extends {
12
+ '$binary'?: infer BinaryType;
13
+ } ? Omit<I, '$binary'> & {
14
+ '$binary': NonNullable<BinaryType>;
15
+ } : I;
16
+ export type ToJSONSerializable<T, Options extends ToJSONSerializableOptions = ToJSONSerializableOptions> = T extends JSONSerializable ? T : T extends undefined ? undefined : T extends bigint ? string : T extends Date ? string : T extends Buffer | ArrayBuffer ? string : T extends {
24
17
  toJSON(): infer U;
25
- } ? ToJSONSerializable<U> : T extends Account<infer K extends typeof Account.AccountKeyAlgorithm[keyof typeof Account.AccountKeyAlgorithm]> ? ReturnType<Account<K>['publicKeyString']['get']> : T extends BlockHash ? string : T extends Permissions ? [string, string] : T extends Vote ? ReturnType<Vote['toJSON']> & {
26
- '$binary': string;
27
- } : T extends VoteStaple ? ReturnType<VoteStaple['toJSON']> & {
28
- '$binary': string;
29
- } : T extends Block ? ReturnType<Block['toJSON']> & {
30
- '$binary': string;
31
- } : T extends JSONSerializable ? T : T extends object ? {
32
- [K in keyof T]: ToJSONSerializable<T[K]>;
18
+ } ? Options['addBinary'] extends true ? ToJSONSerializable<AddBinaryIfIncluded<U>, Options> : ToJSONSerializable<U, Options> : T extends object ? {
19
+ [K in keyof T]: ToJSONSerializable<T[K], Options>;
33
20
  } : never;
34
- export declare function toJSONSerializable(data: JSONSupported<any>, opts?: ToJSONSerializableOptions): JSONSupported<any> & JSONSerializable;
35
- /** @deprecated -- move to toJSON methods */
36
- interface WithConversionClass<T, Y> {
37
- toJSONSerializablePrefix: string;
38
- toJSONSerializable(value: T, options: ToJSONSerializableOptions): Y;
39
- isInstance(value: any): value is T;
40
- new (...args: any[]): T;
41
- }
42
- /** @deprecated -- move to toJSON methods */
43
- export declare function RegisterSerializable(name: string): <X, Y>(target: WithConversionClass<X, Y>) => void;
44
- export declare function objectToBuffer(data: JSONSupported<any>, opts?: ToJSONSerializableOptions): Buffer;
21
+ export declare function toJSONSerializable<Value, Options extends ToJSONSerializableOptions>(data: Value, opts?: Options): ToJSONSerializable<Value, Options>;
22
+ export declare function objectToBuffer(data: any, opts?: ToJSONSerializableOptions): Buffer;
45
23
  export declare function parseHexBigIntString(input: string): bigint;
46
24
  export {};
@@ -23,6 +23,7 @@ export declare function waitTicks(ticks: number): Promise<void>;
23
23
  * Throws if neither are defined
24
24
  */
25
25
  export declare function env(name: string, defaultValue?: string): string;
26
+ export declare function booleanEnv(name: string, defaultValue?: boolean): boolean;
26
27
  /**
27
28
  * Generate a random string from length provided (default 32)
28
29
  */
@@ -44,6 +45,7 @@ interface IsInstance<T> {
44
45
  check(obj: any, strict?: boolean): obj is T;
45
46
  }
46
47
  export declare function checkableGenerator<P extends Constructor<T>, T = InstanceType<P>>(parent: P, defaultStrict?: boolean): IsInstance<T>['check'];
48
+ export declare function nonNullable<T>(value: T): NonNullable<T>;
47
49
  export type DeepMutable<T> = {
48
50
  -readonly [P in keyof T]: DeepMutable<T[P]>;
49
51
  };
@@ -53,15 +55,24 @@ interface WithIsInstance<Inst> extends Constructor<Inst> {
53
55
  type EncodeFunc<Inst, Enc> = (a: Inst) => Enc;
54
56
  type DecodeFunc<Inst, Enc> = (a: Enc) => Inst;
55
57
  type CanBeArray<T> = T | T[];
56
- export interface InstanceSet<Instance, Encoded = string> extends Set<Encoded> {
57
- add(data: CanBeArray<Instance | Encoded>): this;
58
- delete(data: Instance | Encoded): boolean;
59
- has(data: Instance | Encoded): boolean;
60
- decodedArray: Instance[];
61
- encodedArray: Encoded[];
58
+ interface InstanceSet<Instance, Encoded = string> extends Set<Instance> {
59
+ add(data: CanBeArray<Instance>): this;
60
+ forEach(callbackfn: (value: Instance, value2: Instance, set: InstanceSet<Instance, Encoded>) => void, thisArg?: any): void;
61
+ hasInternal(data: Encoded): boolean;
62
+ addInternal(data: Encoded): this;
63
+ deleteInternal(data: Encoded): boolean;
64
+ valuesInternal(): IterableIterator<Encoded>;
65
+ toArray(): Instance[];
66
+ toArrayInternal(): Encoded[];
67
+ isSubsetOf(data: InstanceSet<Instance, Encoded>): boolean;
68
+ isEqualTo(data: InstanceSet<Instance, Encoded>): boolean;
62
69
  }
63
- export interface InstanceSetConstructor<Instance, Encoded> {
64
- new (data?: (Instance | Encoded)[]): InstanceSet<Instance, Encoded>;
70
+ /**
71
+ * AsyncDisposableStack https://github.com/tc39/proposal-explicit-resource-management
72
+ */
73
+ export declare const AsyncDisposableStack: AsyncDisposableStackConstructor;
74
+ export interface InstanceSetConstructor<Instance, Encoded = string> {
75
+ new (data?: (Instance)[]): InstanceSet<Instance, Encoded>;
65
76
  }
66
77
  export declare function setGenerator<P extends WithIsInstance<Instance>, E extends EncodeFunc<Instance, Encoded>, D extends DecodeFunc<Instance, Encoded>, Instance = InstanceType<P>, Encoded = ReturnType<E>>(parent: P, rawEncode: E, rawDecode: D): InstanceSetConstructor<Instance, Encoded>;
67
78
  export {};
@@ -2,7 +2,7 @@ import Account from '../account';
2
2
  import LocalNode from '../node/local';
3
3
  import { VoteStaple } from '../vote';
4
4
  import type { Block } from '../block';
5
- export declare const testingNetworkId: bigint;
5
+ export declare const testingNetworkId = 0n;
6
6
  type NodeConfig = ConstructorParameters<typeof LocalNode>[0];
7
7
  export declare function canListenOn(ip: string): Promise<boolean>;
8
8
  export declare function findListenableIP(checkIPs: string[]): Promise<string | null>;