@nucypher/shared 0.6.0-alpha.2 → 0.6.0-dev.viem

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 (157) hide show
  1. package/dist/cjs/adapters.d.ts +25 -0
  2. package/dist/cjs/adapters.js +44 -0
  3. package/dist/cjs/adapters.js.map +1 -0
  4. package/dist/cjs/contracts/agents/coordinator.d.ts +3 -3
  5. package/dist/cjs/contracts/agents/coordinator.js +6 -6
  6. package/dist/cjs/contracts/agents/coordinator.js.map +1 -1
  7. package/dist/cjs/contracts/agents/global-allow-list.d.ts +2 -2
  8. package/dist/cjs/contracts/agents/global-allow-list.js +4 -4
  9. package/dist/cjs/contracts/agents/global-allow-list.js.map +1 -1
  10. package/dist/cjs/contracts/agents/index.d.ts +3 -4
  11. package/dist/cjs/contracts/agents/index.js +3 -4
  12. package/dist/cjs/contracts/agents/index.js.map +1 -1
  13. package/dist/cjs/contracts/agents/subscription-manager.d.ts +2 -2
  14. package/dist/cjs/contracts/agents/subscription-manager.js +4 -4
  15. package/dist/cjs/contracts/agents/subscription-manager.js.map +1 -1
  16. package/dist/cjs/contracts/ethers-typechain/Coordinator.d.ts +1 -1
  17. package/dist/cjs/contracts/ethers-typechain/GlobalAllowList.d.ts +1 -1
  18. package/dist/cjs/contracts/ethers-typechain/SubscriptionManager.d.ts +1 -1
  19. package/dist/cjs/contracts/ethers-typechain/factories/Coordinator__factory.d.ts +1 -1
  20. package/dist/cjs/contracts/ethers-typechain/factories/GlobalAllowList__factory.d.ts +1 -1
  21. package/dist/cjs/contracts/ethers-typechain/factories/SubscriptionManager__factory.d.ts +1 -1
  22. package/dist/cjs/contracts/ethers-typechain/factories/index.d.ts +3 -4
  23. package/dist/cjs/contracts/ethers-typechain/factories/index.js +7 -9
  24. package/dist/cjs/contracts/ethers-typechain/factories/index.js.map +1 -1
  25. package/dist/cjs/contracts/ethers-typechain/index.d.ts +7 -9
  26. package/dist/cjs/contracts/ethers-typechain/index.js +8 -10
  27. package/dist/cjs/contracts/ethers-typechain/index.js.map +1 -1
  28. package/dist/cjs/contracts/index.d.ts +2 -2
  29. package/dist/cjs/contracts/index.js +2 -2
  30. package/dist/cjs/contracts/index.js.map +1 -1
  31. package/dist/cjs/domain.d.ts +43 -0
  32. package/dist/cjs/domain.js +49 -0
  33. package/dist/cjs/domain.js.map +1 -0
  34. package/dist/cjs/index.d.ts +10 -6
  35. package/dist/cjs/index.js +9 -6
  36. package/dist/cjs/index.js.map +1 -1
  37. package/dist/cjs/porter.d.ts +1 -13
  38. package/dist/cjs/porter.js +10 -66
  39. package/dist/cjs/porter.js.map +1 -1
  40. package/dist/cjs/schemas.d.ts +0 -1
  41. package/dist/cjs/schemas.js +1 -14
  42. package/dist/cjs/schemas.js.map +1 -1
  43. package/dist/cjs/taco-signer.d.ts +19 -0
  44. package/dist/cjs/{contracts/ethers-typechain/SigningCoordinator.js → taco-signer.js} +1 -1
  45. package/dist/cjs/taco-signer.js.map +1 -0
  46. package/dist/cjs/types.d.ts +9 -44
  47. package/dist/cjs/types.js +0 -63
  48. package/dist/cjs/types.js.map +1 -1
  49. package/dist/cjs/viem/ethers-adapter.d.ts +19 -0
  50. package/dist/cjs/viem/ethers-adapter.js +103 -0
  51. package/dist/cjs/viem/ethers-adapter.js.map +1 -0
  52. package/dist/cjs/viem/index.d.ts +2 -0
  53. package/dist/cjs/viem/index.js +18 -0
  54. package/dist/cjs/viem/index.js.map +1 -0
  55. package/dist/cjs/viem/signer-adapter.d.ts +13 -0
  56. package/dist/cjs/viem/signer-adapter.js +54 -0
  57. package/dist/cjs/viem/signer-adapter.js.map +1 -0
  58. package/dist/cjs/viem/type-guards.d.ts +20 -0
  59. package/dist/cjs/viem/type-guards.js +49 -0
  60. package/dist/cjs/viem/type-guards.js.map +1 -0
  61. package/dist/cjs/viem/types.d.ts +53 -0
  62. package/dist/cjs/viem/types.js +21 -0
  63. package/dist/cjs/viem/types.js.map +1 -0
  64. package/dist/cjs/web3.js +2 -2
  65. package/dist/cjs/web3.js.map +1 -1
  66. package/dist/es/adapters.d.ts +25 -0
  67. package/dist/es/adapters.js +40 -0
  68. package/dist/es/adapters.js.map +1 -0
  69. package/dist/es/contracts/agents/coordinator.d.ts +3 -3
  70. package/dist/es/contracts/agents/coordinator.js +3 -3
  71. package/dist/es/contracts/agents/coordinator.js.map +1 -1
  72. package/dist/es/contracts/agents/global-allow-list.d.ts +2 -2
  73. package/dist/es/contracts/agents/global-allow-list.js +2 -2
  74. package/dist/es/contracts/agents/global-allow-list.js.map +1 -1
  75. package/dist/es/contracts/agents/index.d.ts +3 -4
  76. package/dist/es/contracts/agents/index.js +3 -4
  77. package/dist/es/contracts/agents/index.js.map +1 -1
  78. package/dist/es/contracts/agents/subscription-manager.d.ts +2 -2
  79. package/dist/es/contracts/agents/subscription-manager.js +2 -2
  80. package/dist/es/contracts/agents/subscription-manager.js.map +1 -1
  81. package/dist/es/contracts/ethers-typechain/Coordinator.d.ts +1 -1
  82. package/dist/es/contracts/ethers-typechain/GlobalAllowList.d.ts +1 -1
  83. package/dist/es/contracts/ethers-typechain/SubscriptionManager.d.ts +1 -1
  84. package/dist/es/contracts/ethers-typechain/factories/Coordinator__factory.d.ts +1 -1
  85. package/dist/es/contracts/ethers-typechain/factories/GlobalAllowList__factory.d.ts +1 -1
  86. package/dist/es/contracts/ethers-typechain/factories/SubscriptionManager__factory.d.ts +1 -1
  87. package/dist/es/contracts/ethers-typechain/factories/index.d.ts +3 -4
  88. package/dist/es/contracts/ethers-typechain/factories/index.js +3 -4
  89. package/dist/es/contracts/ethers-typechain/factories/index.js.map +1 -1
  90. package/dist/es/contracts/ethers-typechain/index.d.ts +7 -9
  91. package/dist/es/contracts/ethers-typechain/index.js +4 -5
  92. package/dist/es/contracts/ethers-typechain/index.js.map +1 -1
  93. package/dist/es/contracts/index.d.ts +2 -2
  94. package/dist/es/contracts/index.js +2 -2
  95. package/dist/es/contracts/index.js.map +1 -1
  96. package/dist/es/domain.d.ts +43 -0
  97. package/dist/es/domain.js +46 -0
  98. package/dist/es/domain.js.map +1 -0
  99. package/dist/es/index.d.ts +10 -6
  100. package/dist/es/index.js +9 -6
  101. package/dist/es/index.js.map +1 -1
  102. package/dist/es/package.json +3 -0
  103. package/dist/es/porter.d.ts +1 -13
  104. package/dist/es/porter.js +1 -57
  105. package/dist/es/porter.js.map +1 -1
  106. package/dist/es/schemas.d.ts +0 -1
  107. package/dist/es/schemas.js +0 -13
  108. package/dist/es/schemas.js.map +1 -1
  109. package/dist/es/taco-signer.d.ts +19 -0
  110. package/dist/es/taco-signer.js +2 -0
  111. package/dist/es/taco-signer.js.map +1 -0
  112. package/dist/es/types.d.ts +9 -44
  113. package/dist/es/types.js +1 -60
  114. package/dist/es/types.js.map +1 -1
  115. package/dist/es/viem/ethers-adapter.d.ts +19 -0
  116. package/dist/es/viem/ethers-adapter.js +100 -0
  117. package/dist/es/viem/ethers-adapter.js.map +1 -0
  118. package/dist/es/viem/index.d.ts +2 -0
  119. package/dist/es/viem/index.js +2 -0
  120. package/dist/es/viem/index.js.map +1 -0
  121. package/dist/es/viem/signer-adapter.d.ts +13 -0
  122. package/dist/es/viem/signer-adapter.js +50 -0
  123. package/dist/es/viem/signer-adapter.js.map +1 -0
  124. package/dist/es/viem/type-guards.d.ts +20 -0
  125. package/dist/es/viem/type-guards.js +45 -0
  126. package/dist/es/viem/type-guards.js.map +1 -0
  127. package/dist/es/viem/types.d.ts +53 -0
  128. package/dist/es/viem/types.js +20 -0
  129. package/dist/es/viem/types.js.map +1 -0
  130. package/dist/es/web3.js +1 -1
  131. package/dist/es/web3.js.map +1 -1
  132. package/dist/tsconfig.cjs.tsbuildinfo +1 -1
  133. package/dist/tsconfig.es.tsbuildinfo +1 -1
  134. package/package.json +19 -6
  135. package/dist/cjs/contracts/agents/signing-coordinator.d.ts +0 -16
  136. package/dist/cjs/contracts/agents/signing-coordinator.js +0 -42
  137. package/dist/cjs/contracts/agents/signing-coordinator.js.map +0 -1
  138. package/dist/cjs/contracts/agents/signingCoordinator.d.ts +0 -14
  139. package/dist/cjs/contracts/agents/signingCoordinator.js +0 -32
  140. package/dist/cjs/contracts/agents/signingCoordinator.js.map +0 -1
  141. package/dist/cjs/contracts/ethers-typechain/SigningCoordinator.d.ts +0 -787
  142. package/dist/cjs/contracts/ethers-typechain/SigningCoordinator.js.map +0 -1
  143. package/dist/cjs/contracts/ethers-typechain/factories/SigningCoordinator__factory.d.ts +0 -939
  144. package/dist/cjs/contracts/ethers-typechain/factories/SigningCoordinator__factory.js +0 -1227
  145. package/dist/cjs/contracts/ethers-typechain/factories/SigningCoordinator__factory.js.map +0 -1
  146. package/dist/es/contracts/agents/signing-coordinator.d.ts +0 -16
  147. package/dist/es/contracts/agents/signing-coordinator.js +0 -38
  148. package/dist/es/contracts/agents/signing-coordinator.js.map +0 -1
  149. package/dist/es/contracts/agents/signingCoordinator.d.ts +0 -14
  150. package/dist/es/contracts/agents/signingCoordinator.js +0 -28
  151. package/dist/es/contracts/agents/signingCoordinator.js.map +0 -1
  152. package/dist/es/contracts/ethers-typechain/SigningCoordinator.d.ts +0 -787
  153. package/dist/es/contracts/ethers-typechain/SigningCoordinator.js +0 -2
  154. package/dist/es/contracts/ethers-typechain/SigningCoordinator.js.map +0 -1
  155. package/dist/es/contracts/ethers-typechain/factories/SigningCoordinator__factory.d.ts +0 -939
  156. package/dist/es/contracts/ethers-typechain/factories/SigningCoordinator__factory.js +0 -1223
  157. package/dist/es/contracts/ethers-typechain/factories/SigningCoordinator__factory.js.map +0 -1
@@ -0,0 +1,20 @@
1
+ import { ProviderLike, SignerLike } from '../types.js';
2
+ import { PublicClient, SignerAccount } from './types.js';
3
+ /**
4
+ * Type guard to determine if the provider-like is a viem PublicClient
5
+ *
6
+ * Checks for:
7
+ * - Ensures it's not an ethers provider instance
8
+ * - Presence of viem-specific properties (chain)
9
+ * - Presence of viem-specific methods (getChainId)
10
+ */
11
+ export declare function isViemClient(providerLike: ProviderLike): providerLike is PublicClient;
12
+ /**
13
+ * Type guard to determine if the signer is a viem account that can sign: LocalAccount or WalletClient
14
+ * Note: might need modification when supporting viem SmartAccount
15
+ * Checks for:
16
+ * - Ensures it's not an ethers Signer instance
17
+ * - Absence of ethers-specific properties (provider)
18
+ * - Presence of viem Local Account properties (address as string) or viem Wallet Client properties (account.address as string)
19
+ */
20
+ export declare function isViemSignerAccount(signer: SignerLike): signer is SignerAccount;
@@ -0,0 +1,49 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.isViemClient = isViemClient;
4
+ exports.isViemSignerAccount = isViemSignerAccount;
5
+ const ethers_1 = require("ethers");
6
+ /**
7
+ * Type guard to determine if the provider-like is a viem PublicClient
8
+ *
9
+ * Checks for:
10
+ * - Ensures it's not an ethers provider instance
11
+ * - Presence of viem-specific properties (chain)
12
+ * - Presence of viem-specific methods (getChainId)
13
+ */
14
+ function isViemClient(providerLike) {
15
+ // Early return if it's an ethers provider
16
+ if (providerLike instanceof ethers_1.ethers.providers.BaseProvider) {
17
+ return false;
18
+ }
19
+ // Check for viem-specific properties and methods
20
+ const hasChainProperty = 'chain' in providerLike;
21
+ const hasGetChainId = typeof providerLike
22
+ .getChainId === 'function';
23
+ return hasChainProperty || hasGetChainId;
24
+ }
25
+ /**
26
+ * Type guard to determine if the signer is a viem account that can sign: LocalAccount or WalletClient
27
+ * Note: might need modification when supporting viem SmartAccount
28
+ * Checks for:
29
+ * - Ensures it's not an ethers Signer instance
30
+ * - Absence of ethers-specific properties (provider)
31
+ * - Presence of viem Local Account properties (address as string) or viem Wallet Client properties (account.address as string)
32
+ */
33
+ function isViemSignerAccount(signer) {
34
+ if (signer instanceof ethers_1.ethers.Signer || 'provider' in signer) {
35
+ return false;
36
+ }
37
+ // Check for viem SignerAccount properties
38
+ const hasLocalAccountProperties =
39
+ // Local Account:
40
+ 'address' in signer &&
41
+ typeof signer.address === 'string';
42
+ const hasWalletClientProperties =
43
+ // Wallet Client:
44
+ 'account' in signer &&
45
+ typeof signer.account.address ===
46
+ 'string';
47
+ return hasLocalAccountProperties || hasWalletClientProperties;
48
+ }
49
+ //# sourceMappingURL=type-guards.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"type-guards.js","sourceRoot":"","sources":["../../../src/viem/type-guards.ts"],"names":[],"mappings":";;AAcA,oCAeC;AAUD,kDAmBC;AA1DD,mCAAgC;AAMhC;;;;;;;GAOG;AACH,SAAgB,YAAY,CAC1B,YAA0B;IAE1B,0CAA0C;IAC1C,IAAI,YAAY,YAAY,eAAM,CAAC,SAAS,CAAC,YAAY,EAAE,CAAC;QAC1D,OAAO,KAAK,CAAC;IACf,CAAC;IAED,iDAAiD;IACjD,MAAM,gBAAgB,GAAG,OAAO,IAAI,YAAY,CAAC;IACjD,MAAM,aAAa,GACjB,OAAQ,YAAsD;SAC3D,UAAU,KAAK,UAAU,CAAC;IAE/B,OAAO,gBAAgB,IAAI,aAAa,CAAC;AAC3C,CAAC;AAED;;;;;;;GAOG;AACH,SAAgB,mBAAmB,CACjC,MAAkB;IAElB,IAAI,MAAM,YAAY,eAAM,CAAC,MAAM,IAAI,UAAU,IAAI,MAAM,EAAE,CAAC;QAC5D,OAAO,KAAK,CAAC;IACf,CAAC;IAED,0CAA0C;IAC1C,MAAM,yBAAyB;IAC7B,iBAAiB;IACjB,SAAS,IAAI,MAAM;QACnB,OAAQ,MAA8B,CAAC,OAAO,KAAK,QAAQ,CAAC;IAC9D,MAAM,yBAAyB;IAC7B,iBAAiB;IACjB,SAAS,IAAI,MAAM;QACnB,OAAQ,MAA2C,CAAC,OAAO,CAAC,OAAO;YACjE,QAAQ,CAAC;IAEb,OAAO,yBAAyB,IAAI,yBAAyB,CAAC;AAChE,CAAC"}
@@ -0,0 +1,53 @@
1
+ /**
2
+ * Shared viem utilities for TACo packages
3
+ *
4
+ * Features:
5
+ * - Optional viem dependency handling with helpful error messages
6
+ * - Dynamic import pattern that's webpack-compatible
7
+ * - Centralized type definitions for viem objects
8
+ * - Runtime availability checking with caching
9
+ * - Common wrapper implementations for providers and signers
10
+ *
11
+ * Usage:
12
+ * ```typescript
13
+ * import { type PublicClient } from '@nucypher/shared';
14
+ *
15
+ * // Use viem clients directly with TACo adapters
16
+ * const tacoProvider = await toEthersProvider(publicClient);
17
+ * ```
18
+ */
19
+ type _Address = import('viem').Address;
20
+ type _ViemPublicClient = import('viem').PublicClient;
21
+ type _LocalAccount = import('viem').LocalAccount;
22
+ type _ViemChain = import('viem').Chain;
23
+ type _ViemTransport = import('viem').Transport;
24
+ type _WalletClient = import('viem').WalletClient;
25
+ /**
26
+ * Viem Address type (`0x${string}`)
27
+ */
28
+ export type Address = [unknown] extends [_Address] ? `0x${string}` : _Address;
29
+ /**
30
+ * Viem PublicClient type for read operations
31
+ * @see https://viem.sh/docs/clients/public
32
+ */
33
+ export type PublicClient = [unknown] extends [_ViemPublicClient] ? any : _ViemPublicClient;
34
+ export type LocalAccount = [unknown] extends [_LocalAccount] ? any : _LocalAccount;
35
+ export type WalletClient = [unknown] extends [_WalletClient] ? any : _WalletClient;
36
+ /**
37
+ * Viem signer account type for signing operations (LocalAccount or WalletClient)
38
+ * Note: SmartAccount is not supported yet
39
+ * @see https://viem.sh/docs/accounts/local
40
+ * @see https://viem.sh/docs/clients/wallet
41
+ */
42
+ export type SignerAccount = LocalAccount | WalletClient;
43
+ /**
44
+ * Viem Chain type for network metadata
45
+ * @see https://viem.sh/docs/glossary/types#chain
46
+ */
47
+ export type Chain = [unknown] extends [_ViemChain] ? any : _ViemChain;
48
+ /**
49
+ * Viem Transport type for network metadata
50
+ * @see https://viem.sh/docs/glossary/types#transport
51
+ */
52
+ export type Transport = [unknown] extends [_ViemTransport] ? any : _ViemTransport;
53
+ export {};
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ /**
3
+ * Shared viem utilities for TACo packages
4
+ *
5
+ * Features:
6
+ * - Optional viem dependency handling with helpful error messages
7
+ * - Dynamic import pattern that's webpack-compatible
8
+ * - Centralized type definitions for viem objects
9
+ * - Runtime availability checking with caching
10
+ * - Common wrapper implementations for providers and signers
11
+ *
12
+ * Usage:
13
+ * ```typescript
14
+ * import { type PublicClient } from '@nucypher/shared';
15
+ *
16
+ * // Use viem clients directly with TACo adapters
17
+ * const tacoProvider = await toEthersProvider(publicClient);
18
+ * ```
19
+ */
20
+ Object.defineProperty(exports, "__esModule", { value: true });
21
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/viem/types.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;GAiBG"}
package/dist/cjs/web3.js CHANGED
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.toCanonicalAddress = exports.ChainId = void 0;
4
- const utils_1 = require("./utils");
4
+ const utils_js_1 = require("./utils.js");
5
5
  var ChainId;
6
6
  (function (ChainId) {
7
7
  ChainId[ChainId["POLYGON"] = 137] = "POLYGON";
@@ -14,7 +14,7 @@ const toCanonicalAddress = (address) => {
14
14
  const nonPrefixed = address.startsWith(ethAddressStringPrefix)
15
15
  ? address.substring(ethAddressStringPrefix.length)
16
16
  : address;
17
- return (0, utils_1.fromHexString)(nonPrefixed);
17
+ return (0, utils_js_1.fromHexString)(nonPrefixed);
18
18
  };
19
19
  exports.toCanonicalAddress = toCanonicalAddress;
20
20
  //# sourceMappingURL=web3.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"web3.js","sourceRoot":"","sources":["../../src/web3.ts"],"names":[],"mappings":";;;AAAA,mCAAwC;AAExC,IAAY,OAKX;AALD,WAAY,OAAO;IACjB,6CAAa,CAAA;IACb,yCAAY,CAAA;IACZ,kDAAkB,CAAA;IAClB,6DAAoB,CAAA;AACtB,CAAC,EALW,OAAO,uBAAP,OAAO,QAKlB;AAEM,MAAM,kBAAkB,GAAG,CAAC,OAAe,EAAc,EAAE;IAChE,MAAM,sBAAsB,GAAG,IAAI,CAAC;IACpC,MAAM,WAAW,GAAG,OAAO,CAAC,UAAU,CAAC,sBAAsB,CAAC;QAC5D,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC,sBAAsB,CAAC,MAAM,CAAC;QAClD,CAAC,CAAC,OAAO,CAAC;IACZ,OAAO,IAAA,qBAAa,EAAC,WAAW,CAAC,CAAC;AACpC,CAAC,CAAC;AANW,QAAA,kBAAkB,sBAM7B"}
1
+ {"version":3,"file":"web3.js","sourceRoot":"","sources":["../../src/web3.ts"],"names":[],"mappings":";;;AAAA,yCAA2C;AAE3C,IAAY,OAKX;AALD,WAAY,OAAO;IACjB,6CAAa,CAAA;IACb,yCAAY,CAAA;IACZ,kDAAkB,CAAA;IAClB,6DAAoB,CAAA;AACtB,CAAC,EALW,OAAO,uBAAP,OAAO,QAKlB;AAEM,MAAM,kBAAkB,GAAG,CAAC,OAAe,EAAc,EAAE;IAChE,MAAM,sBAAsB,GAAG,IAAI,CAAC;IACpC,MAAM,WAAW,GAAG,OAAO,CAAC,UAAU,CAAC,sBAAsB,CAAC;QAC5D,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC,sBAAsB,CAAC,MAAM,CAAC;QAClD,CAAC,CAAC,OAAO,CAAC;IACZ,OAAO,IAAA,wBAAa,EAAC,WAAW,CAAC,CAAC;AACpC,CAAC,CAAC;AANW,QAAA,kBAAkB,sBAM7B"}
@@ -0,0 +1,25 @@
1
+ import { ethers } from 'ethers';
2
+ import type { TacoSigner } from './taco-signer.js';
3
+ import { ProviderLike, SignerLike } from './types.js';
4
+ /**
5
+ * Convert ethers Signer or viem SignerAccount (LocalAccount or WalletClient) to TacoSigner.
6
+ *
7
+ * This is the main entry point for creating signers for internal TACo use.
8
+ * Unlike toEthersProvider which creates actual ethers objects,
9
+ * this creates minimal adapters implementing only what TACo needs.
10
+ *
11
+ * @param signerLike - Either an ethers Signer or a viem SignerAccount (LocalAccount or WalletClient)
12
+ * @returns A TacoSigner interface implementation
13
+ */
14
+ export declare function toTacoSigner(signerLike: SignerLike): TacoSigner;
15
+ /**
16
+ * Convert viem client to ethers provider or return existing ethers provider.
17
+ *
18
+ * This is the main entry point for converting providers.
19
+ * It handles both viem clients (converting them to ethers providers)
20
+ * and existing ethers providers (returning them unchanged).
21
+ *
22
+ * @param providerLike - Either a viem PublicClient or an ethers.providers.Provider
23
+ * @returns An actual ethers.providers.Provider instance
24
+ */
25
+ export declare function toEthersProvider(providerLike: ProviderLike): ethers.providers.Provider;
@@ -0,0 +1,40 @@
1
+ import { viemClientToProvider } from './viem/ethers-adapter.js';
2
+ import { ViemSignerAdapter } from './viem/signer-adapter.js';
3
+ import { isViemClient, isViemSignerAccount } from './viem/type-guards.js';
4
+ /**
5
+ * Convert ethers Signer or viem SignerAccount (LocalAccount or WalletClient) to TacoSigner.
6
+ *
7
+ * This is the main entry point for creating signers for internal TACo use.
8
+ * Unlike toEthersProvider which creates actual ethers objects,
9
+ * this creates minimal adapters implementing only what TACo needs.
10
+ *
11
+ * @param signerLike - Either an ethers Signer or a viem SignerAccount (LocalAccount or WalletClient)
12
+ * @returns A TacoSigner interface implementation
13
+ */
14
+ export function toTacoSigner(signerLike) {
15
+ if (isViemSignerAccount(signerLike)) {
16
+ return new ViemSignerAdapter(signerLike);
17
+ }
18
+ else {
19
+ return signerLike;
20
+ }
21
+ }
22
+ /**
23
+ * Convert viem client to ethers provider or return existing ethers provider.
24
+ *
25
+ * This is the main entry point for converting providers.
26
+ * It handles both viem clients (converting them to ethers providers)
27
+ * and existing ethers providers (returning them unchanged).
28
+ *
29
+ * @param providerLike - Either a viem PublicClient or an ethers.providers.Provider
30
+ * @returns An actual ethers.providers.Provider instance
31
+ */
32
+ export function toEthersProvider(providerLike) {
33
+ if (isViemClient(providerLike)) {
34
+ return viemClientToProvider(providerLike);
35
+ }
36
+ else {
37
+ return providerLike;
38
+ }
39
+ }
40
+ //# sourceMappingURL=adapters.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"adapters.js","sourceRoot":"","sources":["../../src/adapters.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAChE,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,EAAE,YAAY,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAE1E;;;;;;;;;GASG;AACH,MAAM,UAAU,YAAY,CAAC,UAAsB;IACjD,IAAI,mBAAmB,CAAC,UAAU,CAAC,EAAE,CAAC;QACpC,OAAO,IAAI,iBAAiB,CAAC,UAAU,CAAC,CAAC;IAC3C,CAAC;SAAM,CAAC;QACN,OAAO,UAAU,CAAC;IACpB,CAAC;AACH,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,UAAU,gBAAgB,CAC9B,YAA0B;IAE1B,IAAI,YAAY,CAAC,YAAY,CAAC,EAAE,CAAC;QAC/B,OAAO,oBAAoB,CAAC,YAAY,CAAC,CAAC;IAC5C,CAAC;SAAM,CAAC;QACN,OAAO,YAAY,CAAC;IACtB,CAAC;AACH,CAAC"}
@@ -1,8 +1,8 @@
1
1
  import { DkgPublicKey, SessionStaticKey, ThresholdMessageKit } from '@nucypher/nucypher-core';
2
2
  import { BigNumberish, ethers } from 'ethers';
3
- import { Domain } from '../../porter';
4
- import { ChecksumAddress } from '../../types';
5
- import { BLS12381 } from '../ethers-typechain/Coordinator';
3
+ import { Domain } from '../../porter.js';
4
+ import { ChecksumAddress } from '../../types.js';
5
+ import { BLS12381 } from '../ethers-typechain/Coordinator.js';
6
6
  export interface CoordinatorRitual {
7
7
  initiator: string;
8
8
  initTimestamp: number;
@@ -1,8 +1,8 @@
1
1
  import { getContract } from '@nucypher/nucypher-contracts';
2
2
  import { SessionStaticKey, } from '@nucypher/nucypher-core';
3
- import { fromHexString } from '../../utils';
4
- import { DEFAULT_WAIT_N_CONFIRMATIONS } from '../const';
5
- import { Coordinator__factory } from '../ethers-typechain';
3
+ import { fromHexString } from '../../utils.js';
4
+ import { DEFAULT_WAIT_N_CONFIRMATIONS } from '../const.js';
5
+ import { Coordinator__factory } from '../ethers-typechain/index.js';
6
6
  export var DkgRitualState;
7
7
  (function (DkgRitualState) {
8
8
  DkgRitualState[DkgRitualState["NON_INITIATED"] = 0] = "NON_INITIATED";
@@ -1 +1 @@
1
- {"version":3,"file":"coordinator.js","sourceRoot":"","sources":["../../../../src/contracts/agents/coordinator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAC3D,OAAO,EAEL,gBAAgB,GAEjB,MAAM,yBAAyB,CAAC;AAKjC,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAC;AACxD,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAwB3D,MAAM,CAAN,IAAY,cAQX;AARD,WAAY,cAAc;IACxB,qEAAa,CAAA;IACb,2FAAwB,CAAA;IACxB,6FAAyB,CAAA;IACzB,iEAAW,CAAA;IACX,iEAAW,CAAA;IACX,uDAAM,CAAA;IACN,yDAAO,CAAA;AACT,CAAC,EARW,cAAc,KAAd,cAAc,QAQzB;AAED,MAAM,OAAO,mBAAmB;IACvB,MAAM,CAAC,KAAK,CAAC,eAAe,CACjC,QAAmC,EACnC,MAAc,EACd,QAAgB,EAChB,eAAuB;QAEvB,MAAM,WAAW,GAAG,MAAM,IAAI,CAAC,eAAe,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;QACjE,MAAM,YAAY,GAAG,MAAM,WAAW,CACpC,8CAA8C,CAC/C,CAAC,QAAQ,EAAE,CAAC,EAAE,eAAe,EAAE,KAAK,CAAC,CAAC;QAEvC,OAAO,YAAY,CAAC,GAAG,CAAC,CAAC,WAAW,EAAE,EAAE;YACtC,OAAO;gBACL,QAAQ,EAAE,WAAW,CAAC,QAAQ;gBAC9B,UAAU,EAAE,WAAW,CAAC,UAAU;gBAClC,0BAA0B,EAAE,gB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CACF"}
@@ -1,6 +1,6 @@
1
1
  import { ethers } from 'ethers';
2
- import { Domain } from '../../porter';
3
- import { ChecksumAddress } from '../../types';
2
+ import { Domain } from '../../porter.js';
3
+ import { ChecksumAddress } from '../../types.js';
4
4
  export declare class GlobalAllowListAgent {
5
5
  static registerEncrypters(provider: ethers.providers.Provider, signer: ethers.Signer, domain: Domain, ritualId: number, encrypters: ChecksumAddress[]): Promise<void>;
6
6
  private static connectReadOnly;
@@ -1,6 +1,6 @@
1
1
  import { getContract } from '@nucypher/nucypher-contracts';
2
- import { DEFAULT_WAIT_N_CONFIRMATIONS } from '../const';
3
- import { GlobalAllowList__factory } from '../ethers-typechain';
2
+ import { DEFAULT_WAIT_N_CONFIRMATIONS } from '../const.js';
3
+ import { GlobalAllowList__factory } from '../ethers-typechain/index.js';
4
4
  export class GlobalAllowListAgent {
5
5
  static async registerEncrypters(provider, signer, domain, ritualId, encrypters) {
6
6
  const globalAllowList = await this.connectReadWrite(provider, domain, signer);
@@ -1 +1 @@
1
- {"version":3,"file":"global-allow-list.js","sourceRoot":"","sources":["../../../../src/contracts/agents/global-allow-list.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAK3D,OAAO,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAC;AACxD,OAAO,EAAmB,wBAAwB,EAAE,MAAM,qBAAqB,CAAC;AAEhF,MAAM,OAAO,oBAAoB;IACxB,MAAM,CAAC,KAAK,CAAC,kBAAkB,CACpC,QAAmC,EACnC,MAAqB,EACrB,MAAc,EACd,QAAgB,EAChB,UAA6B;QAE7B,MAAM,eAAe,GAAG,MAAM,IAAI,CAAC,gBAAgB,CACjD,QAAQ,EACR,MAAM,EACN,MAAM,CACP,CAAC;QACF,MAAM,EAAE,GAAG,MAAM,eAAe,CAAC,SAAS,CAAC,QAAQ,EAAE,UAAU,CAAC,CAAC;QACjE,MAAM,EAAE,CAAC,IAAI,CAAC,4BAA4B,CAAC,CAAC;IAC9C,CAAC;IAEO,MAAM,CAAC,KAAK,CAAC,eAAe,CAClC,QAAmC,EACnC,MAAc;QAEd,OAAO,MAAM,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;IAC9C,CAAC;IAEO,MAAM,CAAC,KAAK,CAAC,gBAAgB,CACnC,QAAmC,EACnC,MAAc,EACd,MAAqB;QAErB,OAAO,MAAM,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;IACtD,CAAC;IAEO,MAAM,CAAC,KAAK,CAAC,OAAO,CAC1B,QAAmC,EACnC,MAAc,EACd,MAAsB;QAEtB,MAAM,OAAO,GAAG,MAAM,QAAQ,CAAC,UAAU,EAAE,CAAC;QAC5C,MAAM,eAAe,GAAG,WAAW,CACjC,MAAM,EACN,OAAO,CAAC,OAAO,EACf,iBAAiB,CAClB,CAAC;QACF,OAAO,wBAAwB,CAAC,OAAO,CACrC,eAAe,EACf,MAAM,IAAI,QAAQ,CACnB,CAAC;IACJ,CAAC;CACF"}
1
+ {"version":3,"file":"global-allow-list.js","sourceRoot":"","sources":["../../../../src/contracts/agents/global-allow-list.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAK3D,OAAO,EAAE,4BAA4B,EAAE,MAAM,aAAa,CAAC;AAC3D,OAAO,EAAmB,wBAAwB,EAAE,MAAM,8BAA8B,CAAC;AAEzF,MAAM,OAAO,oBAAoB;IACxB,MAAM,CAAC,KAAK,CAAC,kBAAkB,CACpC,QAAmC,EACnC,MAAqB,EACrB,MAAc,EACd,QAAgB,EAChB,UAA6B;QAE7B,MAAM,eAAe,GAAG,MAAM,IAAI,CAAC,gBAAgB,CACjD,QAAQ,EACR,MAAM,EACN,MAAM,CACP,CAAC;QACF,MAAM,EAAE,GAAG,MAAM,eAAe,CAAC,SAAS,CAAC,QAAQ,EAAE,UAAU,CAAC,CAAC;QACjE,MAAM,EAAE,CAAC,IAAI,CAAC,4BAA4B,CAAC,CAAC;IAC9C,CAAC;IAEO,MAAM,CAAC,KAAK,CAAC,eAAe,CAClC,QAAmC,EACnC,MAAc;QAEd,OAAO,MAAM,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;IAC9C,CAAC;IAEO,MAAM,CAAC,KAAK,CAAC,gBAAgB,CACnC,QAAmC,EACnC,MAAc,EACd,MAAqB;QAErB,OAAO,MAAM,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;IACtD,CAAC;IAEO,MAAM,CAAC,KAAK,CAAC,OAAO,CAC1B,QAAmC,EACnC,MAAc,EACd,MAAsB;QAEtB,MAAM,OAAO,GAAG,MAAM,QAAQ,CAAC,UAAU,EAAE,CAAC;QAC5C,MAAM,eAAe,GAAG,WAAW,CACjC,MAAM,EACN,OAAO,CAAC,OAAO,EACf,iBAAiB,CAClB,CAAC;QACF,OAAO,wBAAwB,CAAC,OAAO,CACrC,eAAe,EACf,MAAM,IAAI,QAAQ,CACnB,CAAC;IACJ,CAAC;CACF"}
@@ -1,4 +1,3 @@
1
- export * from './coordinator';
2
- export * from './global-allow-list';
3
- export * from './signing-coordinator';
4
- export * from './subscription-manager';
1
+ export * from './coordinator.js';
2
+ export * from './global-allow-list.js';
3
+ export * from './subscription-manager.js';
@@ -1,5 +1,4 @@
1
- export * from './coordinator';
2
- export * from './global-allow-list';
3
- export * from './signing-coordinator';
4
- export * from './subscription-manager';
1
+ export * from './coordinator.js';
2
+ export * from './global-allow-list.js';
3
+ export * from './subscription-manager.js';
5
4
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/contracts/agents/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC;AACtC,cAAc,wBAAwB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/contracts/agents/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,wBAAwB,CAAC;AACvC,cAAc,2BAA2B,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import { BigNumber, ContractTransaction, ethers } from 'ethers';
2
- import { Domain } from '../../porter';
3
- import { ChecksumAddress } from '../../types';
2
+ import { Domain } from '../../porter.js';
3
+ import { ChecksumAddress } from '../../types.js';
4
4
  export declare class PreSubscriptionManagerAgent {
5
5
  static createPolicy(provider: ethers.providers.Provider, signer: ethers.Signer, domain: Domain, valueInWei: BigNumber, policyId: Uint8Array, size: number, startTimestamp: number, endTimestamp: number, ownerAddress: ChecksumAddress): Promise<ContractTransaction>;
6
6
  static getPolicyCost(provider: ethers.providers.Provider, domain: Domain, size: number, startTimestamp: number, endTimestamp: number): Promise<BigNumber>;
@@ -1,7 +1,7 @@
1
1
  import { getContract } from '@nucypher/nucypher-contracts';
2
2
  import { utils as ethersUtils, } from 'ethers';
3
- import { DEFAULT_WAIT_N_CONFIRMATIONS } from '../const';
4
- import { SubscriptionManager__factory, } from '../ethers-typechain';
3
+ import { DEFAULT_WAIT_N_CONFIRMATIONS } from '../const.js';
4
+ import { SubscriptionManager__factory, } from '../ethers-typechain/index.js';
5
5
  export class PreSubscriptionManagerAgent {
6
6
  static async createPolicy(provider, signer, domain, valueInWei, policyId, size, startTimestamp, endTimestamp, ownerAddress) {
7
7
  const subscriptionManager = await this.connectReadWrite(provider, domain, signer);
@@ -1 +1 @@
1
- {"version":3,"file":"subscription-manager.js","sourceRoot":"","sources":["../../../../src/contracts/agents/subscription-manager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAC3D,OAAO,EAIL,KAAK,IAAI,WAAW,GACrB,MAAM,QAAQ,CAAC;AAIhB,OAAO,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAC;AACxD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Ac;QAEd,OAAO,MAAM,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;IAC9C,CAAC;IAEO,MAAM,CAAC,KAAK,CAAC,gBAAgB,CACnC,QAAmC,EACnC,MAAc,EACd,MAAqB;QAErB,OAAO,MAAM,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;IACtD,CAAC;IAEO,MAAM,CAAC,KAAK,CAAC,OAAO,CAC1B,QAAmC,EACnC,MAAc,EACd,MAAsB;QAEtB,MAAM,OAAO,GAAG,MAAM,QAAQ,CAAC,UAAU,EAAE,CAAC;QAC5C,MAAM,eAAe,GAAG,WAAW,CACjC,MAAM,EACN,OAAO,CAAC,OAAO,EACf,qBAAqB,CACtB,CAAC;QACF,OAAO,4BAA4B,CAAC,OAAO,CACzC,eAAe,EACf,MAAM,IAAI,QAAQ,CACnB,CAAC;IACJ,CAAC;CACF"}
1
+ {"version":3,"file":"subscription-manager.js","sourceRoot":"","sources":["../../../../src/contracts/agents/subscription-manager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAC3D,OAAO,EAIL,KAAK,IAAI,WAAW,GACrB,MAAM,QAAQ,CAAC;AAIhB,OAAO,EAAE,4BAA4B,EAAE,MAAM,aAAa,CAAC;AAC3D,OAAO,EAEL,4BAA4B,GAC7B,MAAM,8BAA8B,CAAC;AAEtC,MAAM,OAAO,2BAA2B;IAC/B,MAAM,CAAC,KAAK,CAAC,YAAY,CAC9B,QAAmC,EACnC,MAAqB,EACrB,MAAc,EACd,UAAqB,EACrB,QAAoB,EACpB,IAAY,EACZ,cAAsB,EACtB,YAAoB,EACpB,YAA6B;QAE7B,MAAM,mBAAmB,GAAG,MAAM,IAAI,CAAC,gBAAgB,CACrD,QAAQ,EACR,MAAM,EACN,MAAM,CACP,CAAC;QACF,MAAM,SAAS,GAAG;YAChB,KAAK,EAAE,UAAU,CAAC,Q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AU,EAAE,CAAC;QAC5C,MAAM,eAAe,GAAG,WAAW,CACjC,MAAM,EACN,OAAO,CAAC,OAAO,EACf,qBAAqB,CACtB,CAAC;QACF,OAAO,4BAA4B,CAAC,OAAO,CACzC,eAAe,EACf,MAAM,IAAI,QAAQ,CACnB,CAAC;IACJ,CAAC;CACF"}
@@ -1,7 +1,7 @@
1
1
  import type { EventFragment, FunctionFragment, Result } from '@ethersproject/abi';
2
2
  import type { Listener, Provider } from '@ethersproject/providers';
3
3
  import type { BaseContract, BigNumber, BigNumberish, BytesLike, CallOverrides, ContractTransaction, Overrides, PopulatedTransaction, Signer, utils } from 'ethers';
4
- import type { OnEvent, TypedEvent, TypedEventFilter, TypedListener } from './common';
4
+ import type { OnEvent, TypedEvent, TypedEventFilter, TypedListener } from './common.js';
5
5
  export declare namespace BLS12381 {
6
6
  type G2PointStruct = {
7
7
  word0: BytesLike;
@@ -1,7 +1,7 @@
1
1
  import type { EventFragment, FunctionFragment, Result } from '@ethersproject/abi';
2
2
  import type { Listener, Provider } from '@ethersproject/providers';
3
3
  import type { BaseContract, BigNumber, BigNumberish, BytesLike, CallOverrides, ContractTransaction, Overrides, PopulatedTransaction, Signer, utils } from 'ethers';
4
- import type { OnEvent, TypedEvent, TypedEventFilter, TypedListener } from './common';
4
+ import type { OnEvent, TypedEvent, TypedEventFilter, TypedListener } from './common.js';
5
5
  export interface GlobalAllowListInterface extends utils.Interface {
6
6
  functions: {
7
7
  'MAX_AUTH_ACTIONS()': FunctionFragment;
@@ -1,7 +1,7 @@
1
1
  import type { EventFragment, FunctionFragment, Result } from '@ethersproject/abi';
2
2
  import type { Listener, Provider } from '@ethersproject/providers';
3
3
  import type { BaseContract, BigNumber, BigNumberish, BytesLike, CallOverrides, ContractTransaction, Overrides, PayableOverrides, PopulatedTransaction, Signer, utils } from 'ethers';
4
- import type { OnEvent, TypedEvent, TypedEventFilter, TypedListener } from './common';
4
+ import type { OnEvent, TypedEvent, TypedEventFilter, TypedListener } from './common.js';
5
5
  export declare namespace SubscriptionManager {
6
6
  type PolicyStruct = {
7
7
  sponsor: string;
@@ -1,6 +1,6 @@
1
1
  import type { Provider } from '@ethersproject/providers';
2
2
  import { Signer } from 'ethers';
3
- import type { Coordinator, CoordinatorInterface } from '../Coordinator';
3
+ import type { Coordinator, CoordinatorInterface } from '../Coordinator.js';
4
4
  export declare class Coordinator__factory {
5
5
  static readonly abi: readonly [{
6
6
  readonly type: "constructor";
@@ -1,6 +1,6 @@
1
1
  import type { Provider } from '@ethersproject/providers';
2
2
  import { Signer } from 'ethers';
3
- import type { GlobalAllowList, GlobalAllowListInterface } from '../GlobalAllowList';
3
+ import type { GlobalAllowList, GlobalAllowListInterface } from '../GlobalAllowList.js';
4
4
  export declare class GlobalAllowList__factory {
5
5
  static readonly abi: readonly [{
6
6
  readonly type: "constructor";
@@ -1,6 +1,6 @@
1
1
  import type { Provider } from '@ethersproject/providers';
2
2
  import { Signer } from 'ethers';
3
- import type { SubscriptionManager, SubscriptionManagerInterface } from '../SubscriptionManager';
3
+ import type { SubscriptionManager, SubscriptionManagerInterface } from '../SubscriptionManager.js';
4
4
  export declare class SubscriptionManager__factory {
5
5
  static readonly abi: readonly [{
6
6
  readonly anonymous: false;
@@ -1,4 +1,3 @@
1
- export { Coordinator__factory } from './Coordinator__factory';
2
- export { GlobalAllowList__factory } from './GlobalAllowList__factory';
3
- export { SigningCoordinator__factory } from './SigningCoordinator__factory';
4
- export { SubscriptionManager__factory } from './SubscriptionManager__factory';
1
+ export { Coordinator__factory } from './Coordinator__factory.js';
2
+ export { GlobalAllowList__factory } from './GlobalAllowList__factory.js';
3
+ export { SubscriptionManager__factory } from './SubscriptionManager__factory.js';
@@ -1,8 +1,7 @@
1
1
  /* Autogenerated file. Do not edit manually. */
2
2
  /* tslint:disable */
3
3
  /* eslint-disable */
4
- export { Coordinator__factory } from './Coordinator__factory';
5
- export { GlobalAllowList__factory } from './GlobalAllowList__factory';
6
- export { SigningCoordinator__factory } from './SigningCoordinator__factory';
7
- export { SubscriptionManager__factory } from './SubscriptionManager__factory';
4
+ export { Coordinator__factory } from './Coordinator__factory.js';
5
+ export { GlobalAllowList__factory } from './GlobalAllowList__factory.js';
6
+ export { SubscriptionManager__factory } from './SubscriptionManager__factory.js';
8
7
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/contracts/ethers-typechain/factories/index.ts"],"names":[],"mappings":"AAAA,+CAA+C;AAC/C,oBAAoB;AACpB,oBAAoB;AACpB,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AAC5E,OAAO,EAAE,4BAA4B,EAAE,MAAM,gCAAgC,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/contracts/ethers-typechain/factories/index.ts"],"names":[],"mappings":"AAAA,+CAA+C;AAC/C,oBAAoB;AACpB,oBAAoB;AACpB,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AACzE,OAAO,EAAE,4BAA4B,EAAE,MAAM,mCAAmC,CAAC"}
@@ -1,9 +1,7 @@
1
- export type { Coordinator } from './Coordinator';
2
- export * as factories from './factories';
3
- export { Coordinator__factory } from './factories/Coordinator__factory';
4
- export { GlobalAllowList__factory } from './factories/GlobalAllowList__factory';
5
- export { SigningCoordinator__factory } from './factories/SigningCoordinator__factory';
6
- export { SubscriptionManager__factory } from './factories/SubscriptionManager__factory';
7
- export type { GlobalAllowList } from './GlobalAllowList';
8
- export type { SigningCoordinator } from './SigningCoordinator';
9
- export type { SubscriptionManager } from './SubscriptionManager';
1
+ export type { Coordinator } from './Coordinator.js';
2
+ export * as factories from './factories/index.js';
3
+ export { Coordinator__factory } from './factories/Coordinator__factory.js';
4
+ export { GlobalAllowList__factory } from './factories/GlobalAllowList__factory.js';
5
+ export { SubscriptionManager__factory } from './factories/SubscriptionManager__factory.js';
6
+ export type { GlobalAllowList } from './GlobalAllowList.js';
7
+ export type { SubscriptionManager } from './SubscriptionManager.js';
@@ -1,6 +1,5 @@
1
- export * as factories from './factories';
2
- export { Coordinator__factory } from './factories/Coordinator__factory';
3
- export { GlobalAllowList__factory } from './factories/GlobalAllowList__factory';
4
- export { SigningCoordinator__factory } from './factories/SigningCoordinator__factory';
5
- export { SubscriptionManager__factory } from './factories/SubscriptionManager__factory';
1
+ export * as factories from './factories/index.js';
2
+ export { Coordinator__factory } from './factories/Coordinator__factory.js';
3
+ export { GlobalAllowList__factory } from './factories/GlobalAllowList__factory.js';
4
+ export { SubscriptionManager__factory } from './factories/SubscriptionManager__factory.js';
6
5
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/contracts/ethers-typechain/index.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,SAAS,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,oBAAoB,EAAE,MAAM,kCAAkC,CAAC;AACxE,OAAO,EAAE,wBAAwB,EAAE,MAAM,sCAAsC,CAAC;AAChF,OAAO,EAAE,2BAA2B,EAAE,MAAM,yCAAyC,CAAC;AACtF,OAAO,EAAE,4BAA4B,EAAE,MAAM,0CAA0C,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/contracts/ethers-typechain/index.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,SAAS,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;AAC3E,OAAO,EAAE,wBAAwB,EAAE,MAAM,yCAAyC,CAAC;AACnF,OAAO,EAAE,4BAA4B,EAAE,MAAM,6CAA6C,CAAC"}
@@ -1,2 +1,2 @@
1
- export * from './agents';
2
- export * from './ethers-typechain';
1
+ export * from './agents/index.js';
2
+ export * from './ethers-typechain/index.js';
@@ -1,3 +1,3 @@
1
- export * from './agents';
2
- export * from './ethers-typechain';
1
+ export * from './agents/index.js';
2
+ export * from './ethers-typechain/index.js';
3
3
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/contracts/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,oBAAoB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/contracts/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,6BAA6B,CAAC"}
@@ -0,0 +1,43 @@
1
+ export type DomainName = 'lynx' | 'tapir' | 'mainnet';
2
+ /**
3
+ * TACo domain configuration with essential network data
4
+ *
5
+ * Contains domain names, chain IDs, and core infrastructure information
6
+ * needed for TACo operations across different networks.
7
+ *
8
+ * @example
9
+ * ```typescript
10
+ * // Get domain information
11
+ * const lynxInfo = DOMAINS.DEVNET;
12
+ * console.log(lynxInfo.domain); // 'lynx'
13
+ * console.log(lynxInfo.chainId); // 80002
14
+ * ```
15
+ */
16
+ export declare const DOMAINS: {
17
+ readonly DEVNET: {
18
+ readonly domain: "lynx";
19
+ readonly chainId: 80002;
20
+ };
21
+ readonly TESTNET: {
22
+ readonly domain: "tapir";
23
+ readonly chainId: 80002;
24
+ };
25
+ readonly MAINNET: {
26
+ readonly domain: "mainnet";
27
+ readonly chainId: 137;
28
+ };
29
+ };
30
+ /**
31
+ * TACo Domain Name Constants
32
+ *
33
+ * Convenient constants for referencing TACo domain names in a type-safe manner.
34
+ * Use these constants instead of hardcoded strings for better maintainability.
35
+ */
36
+ export declare const DOMAIN_NAMES: {
37
+ /** DEVNET domain ('lynx') - Bleeding-edge developer network */
38
+ readonly DEVNET: "lynx";
39
+ /** TESTNET domain ('tapir') - Stable testnet for current TACo release */
40
+ readonly TESTNET: "tapir";
41
+ /** MAINNET domain ('mainnet') - Production network */
42
+ readonly MAINNET: "mainnet";
43
+ };
@@ -0,0 +1,46 @@
1
+ /**
2
+ * TACo domain configuration with essential network data
3
+ *
4
+ * Contains domain names, chain IDs, and core infrastructure information
5
+ * needed for TACo operations across different networks.
6
+ *
7
+ * @example
8
+ * ```typescript
9
+ * // Get domain information
10
+ * const lynxInfo = DOMAINS.DEVNET;
11
+ * console.log(lynxInfo.domain); // 'lynx'
12
+ * console.log(lynxInfo.chainId); // 80002
13
+ * ```
14
+ */
15
+ export const DOMAINS = {
16
+ // lynx - DEVNET: Bleeding-edge developer network
17
+ DEVNET: {
18
+ domain: 'lynx',
19
+ chainId: 80002,
20
+ },
21
+ // tapir - TESTNET: Stable testnet for current TACo release
22
+ TESTNET: {
23
+ domain: 'tapir',
24
+ chainId: 80002,
25
+ },
26
+ // mainnet - MAINNET: Production network
27
+ MAINNET: {
28
+ domain: 'mainnet',
29
+ chainId: 137,
30
+ },
31
+ };
32
+ /**
33
+ * TACo Domain Name Constants
34
+ *
35
+ * Convenient constants for referencing TACo domain names in a type-safe manner.
36
+ * Use these constants instead of hardcoded strings for better maintainability.
37
+ */
38
+ export const DOMAIN_NAMES = {
39
+ /** DEVNET domain ('lynx') - Bleeding-edge developer network */
40
+ DEVNET: 'lynx',
41
+ /** TESTNET domain ('tapir') - Stable testnet for current TACo release */
42
+ TESTNET: 'tapir',
43
+ /** MAINNET domain ('mainnet') - Production network */
44
+ MAINNET: 'mainnet',
45
+ };
46
+ //# sourceMappingURL=domain.js.map