@cofhe/sdk 0.6.1 → 0.7.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 (113) hide show
  1. package/CHANGELOG.md +43 -0
  2. package/acps/acp.ts +411 -0
  3. package/acps/index.ts +70 -0
  4. package/{permits → acps}/onchain-utils.ts +49 -24
  5. package/acps/sealing.ts +90 -0
  6. package/acps/signature.ts +89 -0
  7. package/acps/store.ts +172 -0
  8. package/acps/test/acp.test.ts +615 -0
  9. package/acps/test/localstorage.test.ts +105 -0
  10. package/acps/test/sealing.test.ts +77 -0
  11. package/acps/test/store.test.ts +88 -0
  12. package/acps/test/validation.test.ts +361 -0
  13. package/acps/test-utils.ts +32 -0
  14. package/acps/types.ts +252 -0
  15. package/acps/validation.ts +392 -0
  16. package/adapters/test/ethers5.test.ts +4 -1
  17. package/adapters/test/ethers6.test.ts +4 -1
  18. package/adapters/test/wagmi.test.ts +5 -2
  19. package/chains/chains/stagingCofhe.ts +21 -0
  20. package/chains/index.ts +3 -1
  21. package/chains/test/chains.test.ts +2 -1
  22. package/core/acps.ts +625 -0
  23. package/core/client.ts +136 -39
  24. package/core/clientTypes.ts +52 -41
  25. package/core/config.ts +66 -5
  26. package/core/decrypt/MockThresholdNetworkAbi.ts +20 -11
  27. package/core/decrypt/apiError.ts +104 -0
  28. package/core/decrypt/cofheMocksDecryptForTx.ts +11 -11
  29. package/core/decrypt/cofheMocksDecryptForView.ts +7 -7
  30. package/core/decrypt/decryptForTxBuilder.ts +102 -102
  31. package/core/decrypt/decryptForViewBuilder.ts +90 -90
  32. package/core/decrypt/submitRetry.ts +38 -30
  33. package/core/decrypt/tnDecryptV1.ts +5 -5
  34. package/core/decrypt/tnDecryptV2.ts +25 -21
  35. package/core/decrypt/tnSealOutputV1.ts +4 -3
  36. package/core/decrypt/tnSealOutputV2.ts +24 -18
  37. package/core/encrypt/cofheMocksZkVerifySign.ts +59 -74
  38. package/core/encrypt/encryptInputsBuilder.ts +86 -52
  39. package/core/encrypt/zkPackProveVerify.ts +25 -18
  40. package/core/error.ts +34 -6
  41. package/core/index.ts +4 -14
  42. package/core/test/acpDefaults.test.ts +52 -0
  43. package/core/test/acps.test.ts +596 -0
  44. package/core/test/apiError.test.ts +130 -0
  45. package/core/test/client.test.ts +22 -19
  46. package/core/test/config.test.ts +25 -5
  47. package/core/test/decrypt.test.ts +40 -35
  48. package/core/test/decryptBuilders.test.ts +68 -68
  49. package/core/test/decryptErrorCodes.test.ts +217 -0
  50. package/core/test/encryptInputsBuilder.test.ts +72 -41
  51. package/core/test/pollCallbacks.test.ts +89 -18
  52. package/core/test/stagingRedirect.ts +18 -0
  53. package/core/test/submitRetry.test.ts +182 -0
  54. package/core/types.ts +9 -69
  55. package/dist/acp-Wi6isVQI.d.cts +407 -0
  56. package/dist/acp-Wi6isVQI.d.ts +407 -0
  57. package/dist/acps.cjs +1081 -0
  58. package/dist/acps.d.cts +480 -0
  59. package/dist/acps.d.ts +480 -0
  60. package/dist/acps.js +2 -0
  61. package/dist/chains.cjs +14 -1
  62. package/dist/chains.d.cts +30 -1
  63. package/dist/chains.d.ts +30 -1
  64. package/dist/chains.js +1 -1
  65. package/dist/{chunk-NOC3PYB7.js → chunk-43USWPEH.js} +930 -580
  66. package/dist/{chunk-MTRAXQXC.js → chunk-N6IDQRRU.js} +14 -2
  67. package/dist/chunk-Q7CBWGQX.js +1029 -0
  68. package/dist/{clientTypes-CyUvRRzA.d.ts → clientTypes-BN3nbzYM.d.ts} +342 -165
  69. package/dist/{clientTypes-BDy1qIBu.d.cts → clientTypes-CYZjFznO.d.cts} +342 -165
  70. package/dist/core.cjs +1358 -1002
  71. package/dist/core.d.cts +31 -9
  72. package/dist/core.d.ts +31 -9
  73. package/dist/core.js +3 -3
  74. package/dist/node.cjs +1293 -952
  75. package/dist/node.d.cts +2 -2
  76. package/dist/node.d.ts +2 -2
  77. package/dist/node.js +3 -3
  78. package/dist/web.cjs +1293 -952
  79. package/dist/web.d.cts +2 -2
  80. package/dist/web.d.ts +2 -2
  81. package/dist/web.js +3 -3
  82. package/node/test/inherited.test.ts +75 -65
  83. package/node/test/tfheinit.test.ts +23 -8
  84. package/package.json +6 -6
  85. package/web/test/client.web.test.ts +5 -1
  86. package/web/test/inherited.web.test.ts +75 -65
  87. package/web/test/tfheinit.web.test.ts +14 -5
  88. package/web/test/worker.config.web.test.ts +38 -23
  89. package/web/test/worker.output.web.test.ts +25 -24
  90. package/core/encrypt/encryptUtils.ts +0 -67
  91. package/core/permits.ts +0 -216
  92. package/core/test/permits.test.ts +0 -596
  93. package/dist/chunk-VB62WYPL.js +0 -978
  94. package/dist/permit-DnVMDT5h.d.cts +0 -376
  95. package/dist/permit-DnVMDT5h.d.ts +0 -376
  96. package/dist/permits.cjs +0 -1026
  97. package/dist/permits.d.cts +0 -353
  98. package/dist/permits.d.ts +0 -353
  99. package/dist/permits.js +0 -2
  100. package/permits/index.ts +0 -68
  101. package/permits/permit.ts +0 -385
  102. package/permits/sealing.ts +0 -131
  103. package/permits/signature.ts +0 -79
  104. package/permits/store.ts +0 -157
  105. package/permits/test/localstorage.test.ts +0 -113
  106. package/permits/test/permit.test.ts +0 -557
  107. package/permits/test/sealing.test.ts +0 -84
  108. package/permits/test/store.test.ts +0 -88
  109. package/permits/test/validation.test.ts +0 -361
  110. package/permits/test-utils.ts +0 -28
  111. package/permits/types.ts +0 -204
  112. package/permits/validation.ts +0 -327
  113. /package/{permits → acps}/utils.ts +0 -0
package/dist/core.d.cts CHANGED
@@ -1,9 +1,9 @@
1
- import { a as CofheConfig, c as CofheClientParams, b as CofheClient, d as CofheClientConnectionState, F as FheTypes } from './clientTypes-BDy1qIBu.cjs';
2
- export { O as AnyExternalHash, h as CofheClientPermits, C as CofheInputConfig, f as CofheInternalConfig, W as DecryptEndpoint, ab as DecryptForTxBuilder, ac as DecryptForTxResult, aa as DecryptForViewBuilder, V as DecryptPollCallbackContext, T as DecryptPollCallbackFunction, a9 as EncryptInputsBuilder, X as EncryptSetStateFn, a1 as EncryptStep, Y as EncryptStepCallbackContext, $ as Encryptable, o as EncryptableAddress, i as EncryptableBool, E as EncryptableItem, z as EncryptableToEncryptedItemInputMap, Q as EncryptableToExternalHashMap, n as EncryptableUint128, k as EncryptableUint16, l as EncryptableUint32, m as EncryptableUint64, j as EncryptableUint8, x as EncryptedAddressInput, r as EncryptedBoolInput, q as EncryptedItemInput, y as EncryptedItemInputs, p as EncryptedNumber, w as EncryptedUint128Input, t as EncryptedUint16Input, u as EncryptedUint32Input, v as EncryptedUint64Input, s as EncryptedUint8Input, M as ExternalAddressHash, B as ExternalBoolHash, N as ExternalHashProof, R as ExternalItemHashes, K as ExternalUint128Hash, G as ExternalUint16Hash, H as ExternalUint32Hash, J as ExternalUint64Hash, D as ExternalUint8Hash, _ as FheAllUTypes, a5 as FheKeyDeserializer, A as FheTypeValue, Z as FheUintUTypes, S as HashPlusProofResult, I as IStorage, a7 as KeysStorage, a8 as KeysStore, L as LiteralToPrimitive, P as Primitive, U as UnsealedItem, ad as ZkBuilderAndCrsGenerator, ae as ZkProveWorkerFunction, af as ZkProveWorkerRequest, ag as ZkProveWorkerResponse, a3 as assertCorrectEncryptedItemInput, e as createCofheConfigBase, a6 as createKeysStore, a4 as fetchKeys, g as getCofheConfigItem, a0 as isEncryptableItem, a2 as isLastEncryptionStep, ah as zkProveWithWorker } from './clientTypes-BDy1qIBu.cjs';
1
+ import { a as CofheConfig, c as CofheClientParams, b as CofheClient, d as CofheClientConnectionState, F as FheTypes } from './clientTypes-CYZjFznO.cjs';
2
+ export { A as AnyExternalHash, i as CofheClientACPs, C as CofheInputConfig, h as CofheInternalConfig, K as DecryptEndpoint, a2 as DecryptForTxBuilder, a3 as DecryptForTxResult, a1 as DecryptForViewBuilder, J as DecryptPollCallbackContext, G as DecryptPollCallbackFunction, $ as EncryptInputsBuilder, a0 as EncryptInputsBuilderUnset, M as EncryptSetStateFn, T as EncryptStep, N as EncryptStepCallbackContext, R as Encryptable, p as EncryptableAddress, j as EncryptableBool, E as EncryptableItem, B as EncryptableToExternalHashMap, o as EncryptableUint128, l as EncryptableUint16, m as EncryptableUint32, n as EncryptableUint64, k as EncryptableUint8, q as EncryptedNumber, y as ExternalAddressHash, s as ExternalBoolHash, z as ExternalHashProof, D as ExternalItemHashes, x as ExternalUint128Hash, u as ExternalUint16Hash, v as ExternalUint32Hash, w as ExternalUint64Hash, t as ExternalUint8Hash, Q as FheAllUTypes, X as FheKeyDeserializer, r as FheTypeValue, O as FheUintUTypes, H as HashPlusProofResult, I as IStorage, Z as KeysStorage, _ as KeysStore, L as LiteralToPrimitive, P as Primitive, U as UnsealedItem, a4 as ZkBuilderAndCrsGenerator, a5 as ZkProveWorkerFunction, a6 as ZkProveWorkerRequest, a7 as ZkProveWorkerResponse, f as assertNoRenamedConfigKeys, e as createCofheConfigBase, Y as createKeysStore, W as fetchKeys, g as getCofheConfigItem, S as isEncryptableItem, V as isLastEncryptionStep, a8 as zkProveWithWorker } from './clientTypes-CYZjFznO.cjs';
3
3
  import { Hex, PublicClient } from 'viem';
4
4
  import './types-C07FK-cL.cjs';
5
5
  import 'zod';
6
- import './permit-DnVMDT5h.cjs';
6
+ import './acp-Wi6isVQI.cjs';
7
7
  import 'zustand/vanilla';
8
8
 
9
9
  declare const InitialConnectStore: CofheClientConnectionState;
@@ -48,12 +48,13 @@ declare enum CofheErrorCode {
48
48
  MissingWalletClient = "MISSING_WALLET_CLIENT",
49
49
  MissingProviderParam = "MISSING_PROVIDER_PARAM",
50
50
  EmptySecurityZonesParam = "EMPTY_SECURITY_ZONES_PARAM",
51
- InvalidPermitData = "INVALID_PERMIT_DATA",
52
- InvalidPermitDomain = "INVALID_PERMIT_DOMAIN",
53
- PermitNotFound = "PERMIT_NOT_FOUND",
54
- CannotRemoveLastPermit = "CANNOT_REMOVE_LAST_PERMIT",
51
+ InvalidACPData = "INVALID_ACP_DATA",
52
+ InvalidACPDomain = "INVALID_ACP_DOMAIN",
53
+ ACPNotFound = "ACP_NOT_FOUND",
54
+ CannotRemoveLastACP = "CANNOT_REMOVE_LAST_ACP",
55
55
  AccountUninitialized = "ACCOUNT_UNINITIALIZED",
56
56
  ChainIdUninitialized = "CHAIN_ID_UNINITIALIZED",
57
+ ConsumingContractUninitialized = "CONSUMING_CONTRACT_UNINITIALIZED",
57
58
  SealOutputFailed = "SEAL_OUTPUT_FAILED",
58
59
  SealOutputReturnedNull = "SEAL_OUTPUT_RETURNED_NULL",
59
60
  InvalidUtype = "INVALID_UTYPE",
@@ -80,7 +81,25 @@ declare enum CofheErrorCode {
80
81
  FetchKeysFailed = "FETCH_KEYS_FAILED",
81
82
  PublicWalletGetChainIdFailed = "PUBLIC_WALLET_GET_CHAIN_ID_FAILED",
82
83
  PublicWalletGetAddressesFailed = "PUBLIC_WALLET_GET_ADDRESSES_FAILED",
83
- RehydrateKeysStoreFailed = "REHYDRATE_KEYS_STORE_FAILED"
84
+ RehydrateKeysStoreFailed = "REHYDRATE_KEYS_STORE_FAILED",
85
+ BadRequest = "BAD_REQUEST",
86
+ UnknownChain = "UNKNOWN_CHAIN",
87
+ ACPMalformed = "ACP_MALFORMED",
88
+ ACPDenied = "ACP_DENIED",
89
+ ACPExpired = "ACP_EXPIRED",
90
+ ACPInvalid = "ACP_INVALID",
91
+ ACPRevoked = "ACP_REVOKED",
92
+ NotPubliclyAllowed = "NOT_PUBLICLY_ALLOWED",
93
+ CtNotFound = "CT_NOT_FOUND",
94
+ UnsupportedSecurityZone = "UNSUPPORTED_SECURITY_ZONE",
95
+ UnsupportedType = "UNSUPPORTED_TYPE",
96
+ SigningFailed = "SIGNING_FAILED",
97
+ CtSourceError = "CT_SOURCE_ERROR",
98
+ ACPVerifierError = "ACP_VERIFIER_ERROR",
99
+ CtSourceTimeout = "CT_SOURCE_TIMEOUT",
100
+ ACPVerifierTimeout = "ACP_VERIFIER_TIMEOUT",
101
+ ACPRequired = "ACP_REQUIRED",
102
+ SealFailed = "SEAL_FAILED"
84
103
  }
85
104
  type CofheErrorParams = {
86
105
  code: CofheErrorCode;
@@ -88,6 +107,8 @@ type CofheErrorParams = {
88
107
  cause?: Error;
89
108
  hint?: string;
90
109
  context?: Record<string, unknown>;
110
+ /** Raw backend `error` string, when this error originated from a threshold-network response. */
111
+ apiErrorCode?: string;
91
112
  };
92
113
  /**
93
114
  * CofheError class
@@ -105,7 +126,8 @@ declare class CofheError extends Error {
105
126
  readonly cause?: Error;
106
127
  readonly hint?: string;
107
128
  readonly context?: Record<string, unknown>;
108
- constructor({ code, message, cause, hint, context }: CofheErrorParams);
129
+ readonly apiErrorCode?: string;
130
+ constructor({ code, message, cause, hint, context, apiErrorCode }: CofheErrorParams);
109
131
  /**
110
132
  * Creates a CofheError from an unknown error
111
133
  * If the error is a CofheError, it is returned unchanged, else a new CofheError is created
package/dist/core.d.ts CHANGED
@@ -1,9 +1,9 @@
1
- import { a as CofheConfig, c as CofheClientParams, b as CofheClient, d as CofheClientConnectionState, F as FheTypes } from './clientTypes-CyUvRRzA.js';
2
- export { O as AnyExternalHash, h as CofheClientPermits, C as CofheInputConfig, f as CofheInternalConfig, W as DecryptEndpoint, ab as DecryptForTxBuilder, ac as DecryptForTxResult, aa as DecryptForViewBuilder, V as DecryptPollCallbackContext, T as DecryptPollCallbackFunction, a9 as EncryptInputsBuilder, X as EncryptSetStateFn, a1 as EncryptStep, Y as EncryptStepCallbackContext, $ as Encryptable, o as EncryptableAddress, i as EncryptableBool, E as EncryptableItem, z as EncryptableToEncryptedItemInputMap, Q as EncryptableToExternalHashMap, n as EncryptableUint128, k as EncryptableUint16, l as EncryptableUint32, m as EncryptableUint64, j as EncryptableUint8, x as EncryptedAddressInput, r as EncryptedBoolInput, q as EncryptedItemInput, y as EncryptedItemInputs, p as EncryptedNumber, w as EncryptedUint128Input, t as EncryptedUint16Input, u as EncryptedUint32Input, v as EncryptedUint64Input, s as EncryptedUint8Input, M as ExternalAddressHash, B as ExternalBoolHash, N as ExternalHashProof, R as ExternalItemHashes, K as ExternalUint128Hash, G as ExternalUint16Hash, H as ExternalUint32Hash, J as ExternalUint64Hash, D as ExternalUint8Hash, _ as FheAllUTypes, a5 as FheKeyDeserializer, A as FheTypeValue, Z as FheUintUTypes, S as HashPlusProofResult, I as IStorage, a7 as KeysStorage, a8 as KeysStore, L as LiteralToPrimitive, P as Primitive, U as UnsealedItem, ad as ZkBuilderAndCrsGenerator, ae as ZkProveWorkerFunction, af as ZkProveWorkerRequest, ag as ZkProveWorkerResponse, a3 as assertCorrectEncryptedItemInput, e as createCofheConfigBase, a6 as createKeysStore, a4 as fetchKeys, g as getCofheConfigItem, a0 as isEncryptableItem, a2 as isLastEncryptionStep, ah as zkProveWithWorker } from './clientTypes-CyUvRRzA.js';
1
+ import { a as CofheConfig, c as CofheClientParams, b as CofheClient, d as CofheClientConnectionState, F as FheTypes } from './clientTypes-BN3nbzYM.js';
2
+ export { A as AnyExternalHash, i as CofheClientACPs, C as CofheInputConfig, h as CofheInternalConfig, K as DecryptEndpoint, a2 as DecryptForTxBuilder, a3 as DecryptForTxResult, a1 as DecryptForViewBuilder, J as DecryptPollCallbackContext, G as DecryptPollCallbackFunction, $ as EncryptInputsBuilder, a0 as EncryptInputsBuilderUnset, M as EncryptSetStateFn, T as EncryptStep, N as EncryptStepCallbackContext, R as Encryptable, p as EncryptableAddress, j as EncryptableBool, E as EncryptableItem, B as EncryptableToExternalHashMap, o as EncryptableUint128, l as EncryptableUint16, m as EncryptableUint32, n as EncryptableUint64, k as EncryptableUint8, q as EncryptedNumber, y as ExternalAddressHash, s as ExternalBoolHash, z as ExternalHashProof, D as ExternalItemHashes, x as ExternalUint128Hash, u as ExternalUint16Hash, v as ExternalUint32Hash, w as ExternalUint64Hash, t as ExternalUint8Hash, Q as FheAllUTypes, X as FheKeyDeserializer, r as FheTypeValue, O as FheUintUTypes, H as HashPlusProofResult, I as IStorage, Z as KeysStorage, _ as KeysStore, L as LiteralToPrimitive, P as Primitive, U as UnsealedItem, a4 as ZkBuilderAndCrsGenerator, a5 as ZkProveWorkerFunction, a6 as ZkProveWorkerRequest, a7 as ZkProveWorkerResponse, f as assertNoRenamedConfigKeys, e as createCofheConfigBase, Y as createKeysStore, W as fetchKeys, g as getCofheConfigItem, S as isEncryptableItem, V as isLastEncryptionStep, a8 as zkProveWithWorker } from './clientTypes-BN3nbzYM.js';
3
3
  import { Hex, PublicClient } from 'viem';
4
4
  import './types-C07FK-cL.js';
5
5
  import 'zod';
6
- import './permit-DnVMDT5h.js';
6
+ import './acp-Wi6isVQI.js';
7
7
  import 'zustand/vanilla';
8
8
 
9
9
  declare const InitialConnectStore: CofheClientConnectionState;
@@ -48,12 +48,13 @@ declare enum CofheErrorCode {
48
48
  MissingWalletClient = "MISSING_WALLET_CLIENT",
49
49
  MissingProviderParam = "MISSING_PROVIDER_PARAM",
50
50
  EmptySecurityZonesParam = "EMPTY_SECURITY_ZONES_PARAM",
51
- InvalidPermitData = "INVALID_PERMIT_DATA",
52
- InvalidPermitDomain = "INVALID_PERMIT_DOMAIN",
53
- PermitNotFound = "PERMIT_NOT_FOUND",
54
- CannotRemoveLastPermit = "CANNOT_REMOVE_LAST_PERMIT",
51
+ InvalidACPData = "INVALID_ACP_DATA",
52
+ InvalidACPDomain = "INVALID_ACP_DOMAIN",
53
+ ACPNotFound = "ACP_NOT_FOUND",
54
+ CannotRemoveLastACP = "CANNOT_REMOVE_LAST_ACP",
55
55
  AccountUninitialized = "ACCOUNT_UNINITIALIZED",
56
56
  ChainIdUninitialized = "CHAIN_ID_UNINITIALIZED",
57
+ ConsumingContractUninitialized = "CONSUMING_CONTRACT_UNINITIALIZED",
57
58
  SealOutputFailed = "SEAL_OUTPUT_FAILED",
58
59
  SealOutputReturnedNull = "SEAL_OUTPUT_RETURNED_NULL",
59
60
  InvalidUtype = "INVALID_UTYPE",
@@ -80,7 +81,25 @@ declare enum CofheErrorCode {
80
81
  FetchKeysFailed = "FETCH_KEYS_FAILED",
81
82
  PublicWalletGetChainIdFailed = "PUBLIC_WALLET_GET_CHAIN_ID_FAILED",
82
83
  PublicWalletGetAddressesFailed = "PUBLIC_WALLET_GET_ADDRESSES_FAILED",
83
- RehydrateKeysStoreFailed = "REHYDRATE_KEYS_STORE_FAILED"
84
+ RehydrateKeysStoreFailed = "REHYDRATE_KEYS_STORE_FAILED",
85
+ BadRequest = "BAD_REQUEST",
86
+ UnknownChain = "UNKNOWN_CHAIN",
87
+ ACPMalformed = "ACP_MALFORMED",
88
+ ACPDenied = "ACP_DENIED",
89
+ ACPExpired = "ACP_EXPIRED",
90
+ ACPInvalid = "ACP_INVALID",
91
+ ACPRevoked = "ACP_REVOKED",
92
+ NotPubliclyAllowed = "NOT_PUBLICLY_ALLOWED",
93
+ CtNotFound = "CT_NOT_FOUND",
94
+ UnsupportedSecurityZone = "UNSUPPORTED_SECURITY_ZONE",
95
+ UnsupportedType = "UNSUPPORTED_TYPE",
96
+ SigningFailed = "SIGNING_FAILED",
97
+ CtSourceError = "CT_SOURCE_ERROR",
98
+ ACPVerifierError = "ACP_VERIFIER_ERROR",
99
+ CtSourceTimeout = "CT_SOURCE_TIMEOUT",
100
+ ACPVerifierTimeout = "ACP_VERIFIER_TIMEOUT",
101
+ ACPRequired = "ACP_REQUIRED",
102
+ SealFailed = "SEAL_FAILED"
84
103
  }
85
104
  type CofheErrorParams = {
86
105
  code: CofheErrorCode;
@@ -88,6 +107,8 @@ type CofheErrorParams = {
88
107
  cause?: Error;
89
108
  hint?: string;
90
109
  context?: Record<string, unknown>;
110
+ /** Raw backend `error` string, when this error originated from a threshold-network response. */
111
+ apiErrorCode?: string;
91
112
  };
92
113
  /**
93
114
  * CofheError class
@@ -105,7 +126,8 @@ declare class CofheError extends Error {
105
126
  readonly cause?: Error;
106
127
  readonly hint?: string;
107
128
  readonly context?: Record<string, unknown>;
108
- constructor({ code, message, cause, hint, context }: CofheErrorParams);
129
+ readonly apiErrorCode?: string;
130
+ constructor({ code, message, cause, hint, context, apiErrorCode }: CofheErrorParams);
109
131
  /**
110
132
  * Creates a CofheError from an unknown error
111
133
  * If the error is a CofheError, it is returned unchanged, else a new CofheError is created
package/dist/core.js CHANGED
@@ -1,4 +1,4 @@
1
- export { InitialConnectStore as CONNECT_STORE_DEFAULTS, CofheError, CofheErrorCode, DecryptForTxBuilder, DecryptForViewBuilder, EncryptInputsBuilder, EncryptStep, Encryptable, FheAllUTypes, FheTypes, FheUintUTypes, assertCorrectEncryptedItemInput, cofheFetch, createCofheClientBase, createCofheConfigBase, createKeysStore, fetchKeys, fheTypeToString, getCofheConfigItem, getCofheDebugInterceptors, isCofheError, isEncryptableItem, isLastEncryptionStep, setCofheDebugInterceptors, verifyDecryptResult, zkProveWithWorker } from './chunk-NOC3PYB7.js';
2
- import './chunk-MTRAXQXC.js';
3
- import './chunk-VB62WYPL.js';
1
+ export { InitialConnectStore as CONNECT_STORE_DEFAULTS, CofheError, CofheErrorCode, DecryptForTxBuilder, DecryptForViewBuilder, EncryptInputsBuilder, EncryptStep, Encryptable, FheAllUTypes, FheTypes, FheUintUTypes, assertNoRenamedConfigKeys, cofheFetch, createCofheClientBase, createCofheConfigBase, createKeysStore, fetchKeys, fheTypeToString, getCofheConfigItem, getCofheDebugInterceptors, isCofheError, isEncryptableItem, isLastEncryptionStep, setCofheDebugInterceptors, verifyDecryptResult, zkProveWithWorker } from './chunk-43USWPEH.js';
2
+ import './chunk-N6IDQRRU.js';
3
+ import './chunk-Q7CBWGQX.js';
4
4
  export { MOCKS_DECRYPT_RESULT_SIGNER_PRIVATE_KEY, MOCKS_THRESHOLD_NETWORK_ADDRESS, MOCKS_ZK_VERIFIER_ADDRESS, MOCKS_ZK_VERIFIER_SIGNER_ADDRESS, MOCKS_ZK_VERIFIER_SIGNER_PRIVATE_KEY, TASK_MANAGER_ADDRESS, TFHE_RS_SAFE_SERIALIZATION_SIZE_LIMIT, TFHE_RS_ZK_MAX_BITS } from './chunk-ESMZCFJY.js';