@towns-labs/web3 3.2.0 → 3.3.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 (334) hide show
  1. package/dist/cache/KVCacheStorage.d.ts +3 -3
  2. package/dist/cache/KVCacheStorage.d.ts.map +1 -1
  3. package/dist/cache/KVCacheStorage.js +10 -103
  4. package/dist/cache/KVCacheStorage.js.map +1 -1
  5. package/dist/cache/Keyable.d.ts +2 -3
  6. package/dist/cache/Keyable.d.ts.map +1 -1
  7. package/dist/cache/Keyable.js +1 -2
  8. package/dist/cache/Keyable.js.map +1 -1
  9. package/dist/eip-712/EIP-712.d.ts +16 -6
  10. package/dist/eip-712/EIP-712.d.ts.map +1 -1
  11. package/dist/eip-712/EIP-712.js +20 -8
  12. package/dist/eip-712/EIP-712.js.map +1 -1
  13. package/dist/index.d.ts +2 -77
  14. package/dist/index.d.ts.map +1 -1
  15. package/dist/index.js +2 -77
  16. package/dist/index.js.map +1 -1
  17. package/dist/test-helpers/MockERC1155.d.ts +1 -1
  18. package/dist/test-helpers/MockERC1155.d.ts.map +1 -1
  19. package/dist/test-helpers/MockERC20.d.ts +1 -1
  20. package/dist/test-helpers/MockERC20.d.ts.map +1 -1
  21. package/dist/types/ContractTypes.d.ts +0 -170
  22. package/dist/types/ContractTypes.d.ts.map +1 -1
  23. package/dist/types/ContractTypes.js +0 -32
  24. package/dist/types/ContractTypes.js.map +1 -1
  25. package/dist/utils/ut.d.ts +1 -4
  26. package/dist/utils/ut.d.ts.map +1 -1
  27. package/dist/utils/ut.js +2 -14
  28. package/dist/utils/ut.js.map +1 -1
  29. package/dist/utils/web3Env.js +1 -1
  30. package/dist/utils/web3Env.js.map +1 -1
  31. package/dist/utils/xchain.d.ts +21 -0
  32. package/dist/utils/xchain.d.ts.map +1 -0
  33. package/dist/{space/entitlements/XChainConfig.js → utils/xchain.js} +45 -29
  34. package/dist/utils/xchain.js.map +1 -0
  35. package/dist/web3Types.d.ts +33 -0
  36. package/dist/web3Types.d.ts.map +1 -0
  37. package/dist/web3Types.js +89 -0
  38. package/dist/web3Types.js.map +1 -0
  39. package/package.json +3 -5
  40. package/dist/BaseContractShim.d.ts +0 -57
  41. package/dist/BaseContractShim.d.ts.map +0 -1
  42. package/dist/BaseContractShim.js +0 -224
  43. package/dist/BaseContractShim.js.map +0 -1
  44. package/dist/airdrop/IDropFacetShim.d.ts +0 -9
  45. package/dist/airdrop/IDropFacetShim.d.ts.map +0 -1
  46. package/dist/airdrop/IDropFacetShim.js +0 -9
  47. package/dist/airdrop/IDropFacetShim.js.map +0 -1
  48. package/dist/airdrop/IRiverPointsShim.d.ts +0 -9
  49. package/dist/airdrop/IRiverPointsShim.d.ts.map +0 -1
  50. package/dist/airdrop/IRiverPointsShim.js +0 -9
  51. package/dist/airdrop/IRiverPointsShim.js.map +0 -1
  52. package/dist/airdrop/RiverAirdropDapp.d.ts +0 -16
  53. package/dist/airdrop/RiverAirdropDapp.d.ts.map +0 -1
  54. package/dist/airdrop/RiverAirdropDapp.js +0 -30
  55. package/dist/airdrop/RiverAirdropDapp.js.map +0 -1
  56. package/dist/app-registry/AppRegistryDapp.d.ts +0 -68
  57. package/dist/app-registry/AppRegistryDapp.d.ts.map +0 -1
  58. package/dist/app-registry/AppRegistryDapp.js +0 -182
  59. package/dist/app-registry/AppRegistryDapp.js.map +0 -1
  60. package/dist/app-registry/IAppFactoryShim.d.ts +0 -9
  61. package/dist/app-registry/IAppFactoryShim.d.ts.map +0 -1
  62. package/dist/app-registry/IAppFactoryShim.js +0 -9
  63. package/dist/app-registry/IAppFactoryShim.js.map +0 -1
  64. package/dist/app-registry/IAppInstallerShim.d.ts +0 -9
  65. package/dist/app-registry/IAppInstallerShim.d.ts.map +0 -1
  66. package/dist/app-registry/IAppInstallerShim.js +0 -9
  67. package/dist/app-registry/IAppInstallerShim.js.map +0 -1
  68. package/dist/app-registry/IAppRegistryShim.d.ts +0 -9
  69. package/dist/app-registry/IAppRegistryShim.d.ts.map +0 -1
  70. package/dist/app-registry/IAppRegistryShim.js +0 -9
  71. package/dist/app-registry/IAppRegistryShim.js.map +0 -1
  72. package/dist/app-registry/IIdentityRegistryShim.d.ts +0 -9
  73. package/dist/app-registry/IIdentityRegistryShim.d.ts.map +0 -1
  74. package/dist/app-registry/IIdentityRegistryShim.js +0 -9
  75. package/dist/app-registry/IIdentityRegistryShim.js.map +0 -1
  76. package/dist/app-registry/IReputationRegistryShim.d.ts +0 -9
  77. package/dist/app-registry/IReputationRegistryShim.d.ts.map +0 -1
  78. package/dist/app-registry/IReputationRegistryShim.js +0 -9
  79. package/dist/app-registry/IReputationRegistryShim.js.map +0 -1
  80. package/dist/app-registry/SimpleAppShim.d.ts +0 -9
  81. package/dist/app-registry/SimpleAppShim.d.ts.map +0 -1
  82. package/dist/app-registry/SimpleAppShim.js +0 -9
  83. package/dist/app-registry/SimpleAppShim.js.map +0 -1
  84. package/dist/base-registry/BaseRegistry.d.ts +0 -32
  85. package/dist/base-registry/BaseRegistry.d.ts.map +0 -1
  86. package/dist/base-registry/BaseRegistry.js +0 -67
  87. package/dist/base-registry/BaseRegistry.js.map +0 -1
  88. package/dist/base-registry/IEntitlementCheckerShim.d.ts +0 -9
  89. package/dist/base-registry/IEntitlementCheckerShim.d.ts.map +0 -1
  90. package/dist/base-registry/IEntitlementCheckerShim.js +0 -9
  91. package/dist/base-registry/IEntitlementCheckerShim.js.map +0 -1
  92. package/dist/base-registry/INodeOperatorShim.d.ts +0 -9
  93. package/dist/base-registry/INodeOperatorShim.d.ts.map +0 -1
  94. package/dist/base-registry/INodeOperatorShim.js +0 -9
  95. package/dist/base-registry/INodeOperatorShim.js.map +0 -1
  96. package/dist/base-registry/ISpaceDelegationShim.d.ts +0 -9
  97. package/dist/base-registry/ISpaceDelegationShim.d.ts.map +0 -1
  98. package/dist/base-registry/ISpaceDelegationShim.js +0 -9
  99. package/dist/base-registry/ISpaceDelegationShim.js.map +0 -1
  100. package/dist/base-registry/RewardsDistributionShim.d.ts +0 -9
  101. package/dist/base-registry/RewardsDistributionShim.d.ts.map +0 -1
  102. package/dist/base-registry/RewardsDistributionShim.js +0 -9
  103. package/dist/base-registry/RewardsDistributionShim.js.map +0 -1
  104. package/dist/delegate-registry/DelegateRegistry.d.ts +0 -3
  105. package/dist/delegate-registry/DelegateRegistry.d.ts.map +0 -1
  106. package/dist/delegate-registry/DelegateRegistry.js +0 -72
  107. package/dist/delegate-registry/DelegateRegistry.js.map +0 -1
  108. package/dist/erc-721/IERC721AQueryableShim.d.ts +0 -9
  109. package/dist/erc-721/IERC721AQueryableShim.d.ts.map +0 -1
  110. package/dist/erc-721/IERC721AQueryableShim.js +0 -9
  111. package/dist/erc-721/IERC721AQueryableShim.js.map +0 -1
  112. package/dist/erc-721/IERC721AShim.d.ts +0 -9
  113. package/dist/erc-721/IERC721AShim.d.ts.map +0 -1
  114. package/dist/erc-721/IERC721AShim.js +0 -9
  115. package/dist/erc-721/IERC721AShim.js.map +0 -1
  116. package/dist/platform-requirements/PlatformRequirements.d.ts +0 -12
  117. package/dist/platform-requirements/PlatformRequirements.d.ts.map +0 -1
  118. package/dist/platform-requirements/PlatformRequirements.js +0 -18
  119. package/dist/platform-requirements/PlatformRequirements.js.map +0 -1
  120. package/dist/pricing-modules/IPricingShim.d.ts +0 -9
  121. package/dist/pricing-modules/IPricingShim.d.ts.map +0 -1
  122. package/dist/pricing-modules/IPricingShim.js +0 -9
  123. package/dist/pricing-modules/IPricingShim.js.map +0 -1
  124. package/dist/pricing-modules/PricingModules.d.ts +0 -13
  125. package/dist/pricing-modules/PricingModules.d.ts.map +0 -1
  126. package/dist/pricing-modules/PricingModules.js +0 -23
  127. package/dist/pricing-modules/PricingModules.js.map +0 -1
  128. package/dist/pricing-modules/helpers.d.ts +0 -16
  129. package/dist/pricing-modules/helpers.d.ts.map +0 -1
  130. package/dist/pricing-modules/helpers.js +0 -35
  131. package/dist/pricing-modules/helpers.js.map +0 -1
  132. package/dist/readContractRetryer.d.ts +0 -10
  133. package/dist/readContractRetryer.d.ts.map +0 -1
  134. package/dist/readContractRetryer.js +0 -68
  135. package/dist/readContractRetryer.js.map +0 -1
  136. package/dist/river-registry/IOperatorRegistryShim.d.ts +0 -9
  137. package/dist/river-registry/IOperatorRegistryShim.d.ts.map +0 -1
  138. package/dist/river-registry/IOperatorRegistryShim.js +0 -9
  139. package/dist/river-registry/IOperatorRegistryShim.js.map +0 -1
  140. package/dist/river-registry/IStreamRegistryShim.d.ts +0 -9
  141. package/dist/river-registry/IStreamRegistryShim.d.ts.map +0 -1
  142. package/dist/river-registry/IStreamRegistryShim.js +0 -9
  143. package/dist/river-registry/IStreamRegistryShim.js.map +0 -1
  144. package/dist/river-registry/RiverRegistry.d.ts +0 -18
  145. package/dist/river-registry/RiverRegistry.d.ts.map +0 -1
  146. package/dist/river-registry/RiverRegistry.js +0 -42
  147. package/dist/river-registry/RiverRegistry.js.map +0 -1
  148. package/dist/river-registry/RiverRegistryFactory.d.ts +0 -5
  149. package/dist/river-registry/RiverRegistryFactory.d.ts.map +0 -1
  150. package/dist/river-registry/RiverRegistryFactory.js +0 -5
  151. package/dist/river-registry/RiverRegistryFactory.js.map +0 -1
  152. package/dist/space/IAppAccountShim.d.ts +0 -9
  153. package/dist/space/IAppAccountShim.d.ts.map +0 -1
  154. package/dist/space/IAppAccountShim.js +0 -9
  155. package/dist/space/IAppAccountShim.js.map +0 -1
  156. package/dist/space/IBanningShim.d.ts +0 -9
  157. package/dist/space/IBanningShim.d.ts.map +0 -1
  158. package/dist/space/IBanningShim.js +0 -9
  159. package/dist/space/IBanningShim.js.map +0 -1
  160. package/dist/space/IChannelShim.d.ts +0 -9
  161. package/dist/space/IChannelShim.d.ts.map +0 -1
  162. package/dist/space/IChannelShim.js +0 -9
  163. package/dist/space/IChannelShim.js.map +0 -1
  164. package/dist/space/IEntitlementDataQueryableShim.d.ts +0 -11
  165. package/dist/space/IEntitlementDataQueryableShim.d.ts.map +0 -1
  166. package/dist/space/IEntitlementDataQueryableShim.js +0 -9
  167. package/dist/space/IEntitlementDataQueryableShim.js.map +0 -1
  168. package/dist/space/IEntitlementsShim.d.ts +0 -13
  169. package/dist/space/IEntitlementsShim.d.ts.map +0 -1
  170. package/dist/space/IEntitlementsShim.js +0 -19
  171. package/dist/space/IEntitlementsShim.js.map +0 -1
  172. package/dist/space/IMembershipMetadataShim.d.ts +0 -9
  173. package/dist/space/IMembershipMetadataShim.d.ts.map +0 -1
  174. package/dist/space/IMembershipMetadataShim.js +0 -9
  175. package/dist/space/IMembershipMetadataShim.js.map +0 -1
  176. package/dist/space/IMembershipShim.d.ts +0 -33
  177. package/dist/space/IMembershipShim.d.ts.map +0 -1
  178. package/dist/space/IMembershipShim.js +0 -139
  179. package/dist/space/IMembershipShim.js.map +0 -1
  180. package/dist/space/IMulticallShim.d.ts +0 -13
  181. package/dist/space/IMulticallShim.d.ts.map +0 -1
  182. package/dist/space/IMulticallShim.js +0 -15
  183. package/dist/space/IMulticallShim.js.map +0 -1
  184. package/dist/space/IReviewShim.d.ts +0 -64
  185. package/dist/space/IReviewShim.d.ts.map +0 -1
  186. package/dist/space/IReviewShim.js +0 -102
  187. package/dist/space/IReviewShim.js.map +0 -1
  188. package/dist/space/IRolesShim.d.ts +0 -10
  189. package/dist/space/IRolesShim.d.ts.map +0 -1
  190. package/dist/space/IRolesShim.js +0 -9
  191. package/dist/space/IRolesShim.js.map +0 -1
  192. package/dist/space/ITippingShim.d.ts +0 -39
  193. package/dist/space/ITippingShim.d.ts.map +0 -1
  194. package/dist/space/ITippingShim.js +0 -76
  195. package/dist/space/ITippingShim.js.map +0 -1
  196. package/dist/space/ITreasuryShim.d.ts +0 -9
  197. package/dist/space/ITreasuryShim.d.ts.map +0 -1
  198. package/dist/space/ITreasuryShim.js +0 -9
  199. package/dist/space/ITreasuryShim.js.map +0 -1
  200. package/dist/space/OwnableFacetShim.d.ts +0 -12
  201. package/dist/space/OwnableFacetShim.d.ts.map +0 -1
  202. package/dist/space/OwnableFacetShim.js +0 -19
  203. package/dist/space/OwnableFacetShim.js.map +0 -1
  204. package/dist/space/Space.d.ts +0 -107
  205. package/dist/space/Space.d.ts.map +0 -1
  206. package/dist/space/Space.js +0 -511
  207. package/dist/space/Space.js.map +0 -1
  208. package/dist/space/TokenPausableFacetShim.d.ts +0 -9
  209. package/dist/space/TokenPausableFacetShim.d.ts.map +0 -1
  210. package/dist/space/TokenPausableFacetShim.js +0 -9
  211. package/dist/space/TokenPausableFacetShim.js.map +0 -1
  212. package/dist/space/entitlements/ConvertersEntitlements.d.ts +0 -14
  213. package/dist/space/entitlements/ConvertersEntitlements.d.ts.map +0 -1
  214. package/dist/space/entitlements/ConvertersEntitlements.js +0 -193
  215. package/dist/space/entitlements/ConvertersEntitlements.js.map +0 -1
  216. package/dist/space/entitlements/RuleBuilder.d.ts +0 -83
  217. package/dist/space/entitlements/RuleBuilder.d.ts.map +0 -1
  218. package/dist/space/entitlements/RuleBuilder.js +0 -86
  219. package/dist/space/entitlements/RuleBuilder.js.map +0 -1
  220. package/dist/space/entitlements/RuleEntitlementShim.d.ts +0 -353
  221. package/dist/space/entitlements/RuleEntitlementShim.d.ts.map +0 -1
  222. package/dist/space/entitlements/RuleEntitlementShim.js +0 -40
  223. package/dist/space/entitlements/RuleEntitlementShim.js.map +0 -1
  224. package/dist/space/entitlements/RuleEntitlementV2Shim.d.ts +0 -353
  225. package/dist/space/entitlements/RuleEntitlementV2Shim.d.ts.map +0 -1
  226. package/dist/space/entitlements/RuleEntitlementV2Shim.js +0 -40
  227. package/dist/space/entitlements/RuleEntitlementV2Shim.js.map +0 -1
  228. package/dist/space/entitlements/UserEntitlementShim.d.ts +0 -13
  229. package/dist/space/entitlements/UserEntitlementShim.d.ts.map +0 -1
  230. package/dist/space/entitlements/UserEntitlementShim.js +0 -45
  231. package/dist/space/entitlements/UserEntitlementShim.js.map +0 -1
  232. package/dist/space/entitlements/XChainConfig.d.ts +0 -14
  233. package/dist/space/entitlements/XChainConfig.d.ts.map +0 -1
  234. package/dist/space/entitlements/XChainConfig.js.map +0 -1
  235. package/dist/space/entitlements/entitlement.d.ts +0 -147
  236. package/dist/space/entitlements/entitlement.d.ts.map +0 -1
  237. package/dist/space/entitlements/entitlement.js +0 -940
  238. package/dist/space/entitlements/entitlement.js.map +0 -1
  239. package/dist/space/entitlements/validateAndParseXChainConfig.d.ts +0 -6
  240. package/dist/space/entitlements/validateAndParseXChainConfig.d.ts.map +0 -1
  241. package/dist/space/entitlements/validateAndParseXChainConfig.js +0 -34
  242. package/dist/space/entitlements/validateAndParseXChainConfig.js.map +0 -1
  243. package/dist/space-dapp/SpaceDapp.d.ts +0 -223
  244. package/dist/space-dapp/SpaceDapp.d.ts.map +0 -1
  245. package/dist/space-dapp/SpaceDapp.js +0 -1260
  246. package/dist/space-dapp/SpaceDapp.js.map +0 -1
  247. package/dist/space-dapp/SpaceDappFactory.d.ts +0 -5
  248. package/dist/space-dapp/SpaceDappFactory.d.ts.map +0 -1
  249. package/dist/space-dapp/SpaceDappFactory.js +0 -8
  250. package/dist/space-dapp/SpaceDappFactory.js.map +0 -1
  251. package/dist/space-dapp/wrapTransaction.d.ts +0 -4
  252. package/dist/space-dapp/wrapTransaction.d.ts.map +0 -1
  253. package/dist/space-dapp/wrapTransaction.js +0 -99
  254. package/dist/space-dapp/wrapTransaction.js.map +0 -1
  255. package/dist/space-owner/GuardianFacetShim.d.ts +0 -9
  256. package/dist/space-owner/GuardianFacetShim.d.ts.map +0 -1
  257. package/dist/space-owner/GuardianFacetShim.js +0 -9
  258. package/dist/space-owner/GuardianFacetShim.js.map +0 -1
  259. package/dist/space-owner/SpaceOwner.d.ts +0 -48
  260. package/dist/space-owner/SpaceOwner.d.ts.map +0 -1
  261. package/dist/space-owner/SpaceOwner.js +0 -81
  262. package/dist/space-owner/SpaceOwner.js.map +0 -1
  263. package/dist/space-registrar/ICreateSpaceShim.d.ts +0 -11
  264. package/dist/space-registrar/ICreateSpaceShim.d.ts.map +0 -1
  265. package/dist/space-registrar/ICreateSpaceShim.js +0 -9
  266. package/dist/space-registrar/ICreateSpaceShim.js.map +0 -1
  267. package/dist/space-registrar/ILegacySpaceArchitectShim.d.ts +0 -10
  268. package/dist/space-registrar/ILegacySpaceArchitectShim.d.ts.map +0 -1
  269. package/dist/space-registrar/ILegacySpaceArchitectShim.js +0 -9
  270. package/dist/space-registrar/ILegacySpaceArchitectShim.js.map +0 -1
  271. package/dist/space-registrar/ISpaceArchitectShim.d.ts +0 -10
  272. package/dist/space-registrar/ISpaceArchitectShim.d.ts.map +0 -1
  273. package/dist/space-registrar/ISpaceArchitectShim.js +0 -39
  274. package/dist/space-registrar/ISpaceArchitectShim.js.map +0 -1
  275. package/dist/space-registrar/SpaceRegistrar.d.ts +0 -27
  276. package/dist/space-registrar/SpaceRegistrar.d.ts.map +0 -1
  277. package/dist/space-registrar/SpaceRegistrar.js +0 -58
  278. package/dist/space-registrar/SpaceRegistrar.js.map +0 -1
  279. package/dist/test-helpers/LocalhostWeb3Provider.d.ts +0 -19
  280. package/dist/test-helpers/LocalhostWeb3Provider.d.ts.map +0 -1
  281. package/dist/test-helpers/LocalhostWeb3Provider.js +0 -80
  282. package/dist/test-helpers/LocalhostWeb3Provider.js.map +0 -1
  283. package/dist/test-helpers/MockCrossChainEntitlement.d.ts +0 -6
  284. package/dist/test-helpers/MockCrossChainEntitlement.d.ts.map +0 -1
  285. package/dist/test-helpers/MockCrossChainEntitlement.js +0 -104
  286. package/dist/test-helpers/MockCrossChainEntitlement.js.map +0 -1
  287. package/dist/test-helpers/MockERC721AShim.d.ts +0 -9
  288. package/dist/test-helpers/MockERC721AShim.d.ts.map +0 -1
  289. package/dist/test-helpers/MockERC721AShim.js +0 -9
  290. package/dist/test-helpers/MockERC721AShim.js.map +0 -1
  291. package/dist/test-helpers/TestCrossChainEntitlement.d.ts +0 -14
  292. package/dist/test-helpers/TestCrossChainEntitlement.d.ts.map +0 -1
  293. package/dist/test-helpers/TestCrossChainEntitlement.js +0 -99
  294. package/dist/test-helpers/TestCrossChainEntitlement.js.map +0 -1
  295. package/dist/test-helpers/TestGatingERC1155.d.ts +0 -17
  296. package/dist/test-helpers/TestGatingERC1155.d.ts.map +0 -1
  297. package/dist/test-helpers/TestGatingERC1155.js +0 -100
  298. package/dist/test-helpers/TestGatingERC1155.js.map +0 -1
  299. package/dist/test-helpers/TestGatingERC20.d.ts +0 -17
  300. package/dist/test-helpers/TestGatingERC20.d.ts.map +0 -1
  301. package/dist/test-helpers/TestGatingERC20.js +0 -149
  302. package/dist/test-helpers/TestGatingERC20.js.map +0 -1
  303. package/dist/test-helpers/TestGatingNFT.d.ts +0 -17
  304. package/dist/test-helpers/TestGatingNFT.d.ts.map +0 -1
  305. package/dist/test-helpers/TestGatingNFT.js +0 -137
  306. package/dist/test-helpers/TestGatingNFT.js.map +0 -1
  307. package/dist/test-helpers/TestGatingUtils.d.ts +0 -15
  308. package/dist/test-helpers/TestGatingUtils.d.ts.map +0 -1
  309. package/dist/test-helpers/TestGatingUtils.js +0 -112
  310. package/dist/test-helpers/TestGatingUtils.js.map +0 -1
  311. package/dist/test-helpers/utils.d.ts +0 -22
  312. package/dist/test-helpers/utils.d.ts.map +0 -1
  313. package/dist/test-helpers/utils.js +0 -30
  314. package/dist/test-helpers/utils.js.map +0 -1
  315. package/dist/towns-token/TownsToken.d.ts +0 -17
  316. package/dist/towns-token/TownsToken.d.ts.map +0 -1
  317. package/dist/towns-token/TownsToken.js +0 -33
  318. package/dist/towns-token/TownsToken.js.map +0 -1
  319. package/dist/types/typechain.d.ts +0 -4
  320. package/dist/types/typechain.d.ts.map +0 -1
  321. package/dist/types/typechain.js +0 -2
  322. package/dist/types/typechain.js.map +0 -1
  323. package/dist/utils/ContractHelpers.d.ts +0 -14
  324. package/dist/utils/ContractHelpers.d.ts.map +0 -1
  325. package/dist/utils/ContractHelpers.js +0 -54
  326. package/dist/utils/ContractHelpers.js.map +0 -1
  327. package/dist/wallet-link/WalletLink.d.ts +0 -58
  328. package/dist/wallet-link/WalletLink.d.ts.map +0 -1
  329. package/dist/wallet-link/WalletLink.js +0 -226
  330. package/dist/wallet-link/WalletLink.js.map +0 -1
  331. package/dist/wallet-link/WalletLinkShim.d.ts +0 -9
  332. package/dist/wallet-link/WalletLinkShim.d.ts.map +0 -1
  333. package/dist/wallet-link/WalletLinkShim.js +0 -9
  334. package/dist/wallet-link/WalletLinkShim.js.map +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@towns-labs/web3",
3
- "version": "3.2.0",
3
+ "version": "3.3.0",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -18,11 +18,9 @@
18
18
  },
19
19
  "dependencies": {
20
20
  "@isaacs/ttlcache": "^1.4.1",
21
- "@towns-labs/generated": "^3.2.0",
22
- "@towns-labs/utils": "^3.2.0",
23
- "abitype": "^0.9.10",
21
+ "@towns-labs/deployments": "^3.3.0",
22
+ "@towns-labs/utils": "^3.3.0",
24
23
  "debug": "^4.3.4",
25
- "ethers": "^5.8.0",
26
24
  "lru-cache": "^11.0.1",
27
25
  "nanoid": "^4.0.0",
28
26
  "superjson": "^2.2.2",
@@ -1,57 +0,0 @@
1
- import { BytesLike, ContractTransaction, ethers } from 'ethers';
2
- import { Connect, ContractType } from './types/typechain';
3
- import { Abi } from 'abitype';
4
- import { TransactionOpts } from './types/ContractTypes';
5
- export type PromiseOrValue<T> = T | Promise<T>;
6
- export declare const UNKNOWN_ERROR = "UNKNOWN_ERROR";
7
- export type OverrideExecution<T> = (args: {
8
- toAddress: string;
9
- calldata: string;
10
- value?: bigint;
11
- }) => Promise<T>;
12
- export declare class BaseContractShim<connect extends Connect<ethers.Contract>, T_CONTRACT extends ContractType<connect> = ContractType<connect>> {
13
- readonly address: string;
14
- readonly provider: ethers.providers.Provider;
15
- readonly connect: Connect<T_CONTRACT>;
16
- readonly abi: Abi;
17
- private _network?;
18
- private _networkPromise?;
19
- private contractInterface?;
20
- private readContract?;
21
- private writeContract?;
22
- constructor(address: string, provider: ethers.providers.Provider, connect: Connect<T_CONTRACT>, abi: Abi);
23
- getNetwork(): Promise<ethers.providers.Network | undefined>;
24
- get interface(): T_CONTRACT['interface'];
25
- get read(): T_CONTRACT;
26
- write(signer: ethers.Signer): T_CONTRACT;
27
- /**
28
- * Executes a contract function call. If overrideExecution is provided, uses that instead of
29
- * the default blockchain transaction. This allows for custom handling of the call, such as
30
- * returning the raw calldata or implementing custom transaction logic.
31
- *
32
- * @param params.signer - The signer to use for the transaction
33
- * @param params.functionName - The name of the contract function to call
34
- * @param params.args - The arguments to pass to the function
35
- * @param params.overrideExecution - Optional function to override the default execution
36
- * @param params.transactionOpts - Optional transaction options
37
- * @returns The result of the function call or the override execution
38
- */
39
- executeCall<T = ContractTransaction, FnName extends keyof T_CONTRACT['functions'] = keyof T_CONTRACT['functions'], Args extends Parameters<T_CONTRACT['functions'][FnName]> = Parameters<T_CONTRACT['functions'][FnName]>>(params: {
40
- signer: ethers.Signer;
41
- functionName: FnName;
42
- args: Args;
43
- value?: bigint;
44
- overrideExecution?: OverrideExecution<T>;
45
- transactionOpts?: TransactionOpts;
46
- }): Promise<T extends undefined ? ContractTransaction : T>;
47
- decodeFunctionResult<FnName extends keyof T_CONTRACT['functions']>(functionName: FnName, data: BytesLike): Awaited<ReturnType<T_CONTRACT['functions'][FnName]>>;
48
- decodeFunctionData<FnName extends keyof T_CONTRACT['functions']>(functionName: FnName, data: BytesLike): ethers.utils.Result;
49
- encodeFunctionData<FnName extends keyof T_CONTRACT['functions'], FnParams extends Parameters<T_CONTRACT['functions'][FnName]>>(functionName: FnName, args: FnParams): string;
50
- parseError(error: unknown): Error & {
51
- code?: string;
52
- data?: unknown;
53
- };
54
- private getErrorData;
55
- parseLog(log: ethers.providers.Log): ethers.utils.LogDescription;
56
- }
57
- //# sourceMappingURL=BaseContractShim.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"BaseContractShim.d.ts","sourceRoot":"","sources":["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AS,MAAM,UAAU,CAAC,WAAW,CAAC,EAC5C,QAAQ,SAAS,UAAU,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC,MAAM,CAAC,CAAC,EAC9D,YAAY,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,GAAG,MAAM;IAUxC,UAAU,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,GAAG;QACvC,IAAI,CAAC,EAAE,MAAM,CAAA;QACb,IAAI,CAAC,EAAE,OAAO,CAAA;KACjB;IA4CD,OAAO,CAAC,YAAY;IAmEb,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC,SAAS,CAAC,GAAG;CAG5C"}
@@ -1,224 +0,0 @@
1
- import { dlogger } from '@towns-labs/utils';
2
- import { wrapTransaction } from './space-dapp/wrapTransaction';
3
- export const UNKNOWN_ERROR = 'UNKNOWN_ERROR';
4
- const logger = dlogger('csb:BaseContractShim');
5
- export class BaseContractShim {
6
- address;
7
- provider;
8
- connect;
9
- abi;
10
- _network;
11
- _networkPromise;
12
- contractInterface;
13
- readContract;
14
- writeContract;
15
- constructor(address, provider, connect, abi) {
16
- this.address = address;
17
- this.provider = provider;
18
- this.connect = connect;
19
- this.abi = abi;
20
- void this.getNetwork();
21
- }
22
- async getNetwork() {
23
- if (this._network) {
24
- return this._network;
25
- }
26
- if (!this._networkPromise) {
27
- this._networkPromise = this.provider.getNetwork();
28
- }
29
- try {
30
- this._network = await this._networkPromise;
31
- }
32
- catch (error) {
33
- this._networkPromise = undefined;
34
- logger.error('Failed to fetch network info:', error);
35
- }
36
- return this._network;
37
- }
38
- get interface() {
39
- if (!this.contractInterface) {
40
- this.readContract = this.connect(this.address, this.provider);
41
- this.contractInterface = this.readContract.interface;
42
- }
43
- return this.contractInterface;
44
- }
45
- get read() {
46
- // lazy create an instance if it is not already cached
47
- if (!this.readContract) {
48
- this.readContract = this.connect(this.address, this.provider);
49
- this.contractInterface = this.readContract.interface;
50
- }
51
- return this.readContract;
52
- }
53
- write(signer) {
54
- // lazy create an instance if it is not already cached
55
- if (!this.writeContract) {
56
- this.writeContract = this.connect(this.address, signer);
57
- this.contractInterface = this.writeContract.interface;
58
- }
59
- else {
60
- // update the signer if it has changed
61
- if (this.writeContract.signer !== signer) {
62
- this.writeContract = this.connect(this.address, signer);
63
- }
64
- }
65
- return this.writeContract;
66
- }
67
- /**
68
- * Executes a contract function call. If overrideExecution is provided, uses that instead of
69
- * the default blockchain transaction. This allows for custom handling of the call, such as
70
- * returning the raw calldata or implementing custom transaction logic.
71
- *
72
- * @param params.signer - The signer to use for the transaction
73
- * @param params.functionName - The name of the contract function to call
74
- * @param params.args - The arguments to pass to the function
75
- * @param params.overrideExecution - Optional function to override the default execution
76
- * @param params.transactionOpts - Optional transaction options
77
- * @returns The result of the function call or the override execution
78
- */
79
- executeCall(params) {
80
- return (params.overrideExecution
81
- ? params.overrideExecution({
82
- toAddress: this.address,
83
- calldata: this.encodeFunctionData(params.functionName, params.args),
84
- value: params.value,
85
- })
86
- : wrapTransaction(() => this.write(params.signer)[params.functionName](...(params.value
87
- ? [...params.args, { value: params.value }]
88
- : params.args)), params.transactionOpts));
89
- }
90
- decodeFunctionResult(functionName, data) {
91
- if (typeof functionName !== 'string') {
92
- throw new Error('functionName must be a string');
93
- }
94
- if (!this.interface.getFunction(functionName)) {
95
- throw new Error(`Function ${functionName} not found in contract interface`);
96
- }
97
- const decoded = this.interface.decodeFunctionResult(functionName, data);
98
- // eslint-disable-next-line @typescript-eslint/no-unsafe-return
99
- return decoded;
100
- }
101
- decodeFunctionData(functionName, data) {
102
- if (typeof functionName !== 'string') {
103
- throw new Error('functionName must be a string');
104
- }
105
- if (!this.interface.getFunction(functionName)) {
106
- throw new Error(`Function ${functionName} not found in contract interface`);
107
- }
108
- return this.interface.decodeFunctionData(functionName, data);
109
- }
110
- encodeFunctionData(functionName, args) {
111
- if (typeof functionName !== 'string') {
112
- throw new Error('functionName must be a string');
113
- }
114
- if (!this.interface.getFunction(functionName)) {
115
- throw new Error(`Function ${functionName} not found in contract interface`);
116
- }
117
- return this.interface.encodeFunctionData(functionName, args);
118
- }
119
- parseError(error) {
120
- // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-explicit-any
121
- const anyError = error;
122
- const { errorData, errorMessage, errorName } = this.getErrorData(anyError);
123
- /**
124
- * Return early if we have trouble extracting the error data.
125
- * Don't know how to decode it.
126
- */
127
- if (!errorData) {
128
- logger.log(`parseError ${errorName}: no error data, or don't know how to extract error data`);
129
- return {
130
- name: errorName ?? UNKNOWN_ERROR,
131
- message: errorMessage ?? anyError,
132
- // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
133
- code: anyError?.code,
134
- };
135
- }
136
- /**
137
- * Try to decode the error data. If it fails, return the original error message.
138
- */
139
- try {
140
- const errDescription = this.interface.parseError(errorData);
141
- const decodedError = {
142
- name: errDescription?.errorFragment.name ?? UNKNOWN_ERROR,
143
- // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
144
- message: errorMessage,
145
- };
146
- logger.log('decodedError', decodedError);
147
- return decodedError;
148
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
149
- }
150
- catch (e) {
151
- // Cannot decode error
152
- logger.error('cannot decode error', e);
153
- return {
154
- name: UNKNOWN_ERROR,
155
- // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access
156
- message: e.message,
157
- };
158
- }
159
- }
160
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
161
- getErrorData(anyError) {
162
- /**
163
- * Error data is nested in different places depending on whether the app is
164
- * running in jest/node, or which blockchain (goerli, or anvil).
165
- */
166
- // Case: jest/node error
167
- // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access
168
- let errorData = anyError.error?.error?.error?.data;
169
- // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access
170
- let errorMessage = anyError.error?.error?.error?.message;
171
- // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access
172
- let errorName = anyError.error?.error?.error?.name;
173
- if (!errorData) {
174
- // Case: Browser (anvil || base goerli)
175
- // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access
176
- errorData = anyError.error?.error?.data;
177
- // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access
178
- errorMessage = anyError.error?.error?.message;
179
- // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access
180
- errorName = anyError.error?.error?.name;
181
- }
182
- if (!errorData) {
183
- // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access
184
- errorData = anyError.data;
185
- // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access
186
- errorData = anyError?.data;
187
- // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access
188
- errorMessage = anyError?.message;
189
- // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access
190
- errorName = anyError?.name;
191
- }
192
- if (!errorData) {
193
- // sometimes it's a stringified object under anyError.reason or anyError.message
194
- try {
195
- // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access
196
- const reason = anyError?.reason || anyError?.message;
197
- if (typeof reason === 'string') {
198
- const errorMatch = reason?.match(/error\\":\{([^}]+)\}/)?.[1];
199
- if (errorMatch) {
200
- const parsedData = JSON.parse(`{${errorMatch?.replace(/\\/g, '')}}`);
201
- // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
202
- errorData = parsedData?.data;
203
- // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
204
- errorMessage = parsedData?.message;
205
- // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
206
- errorName = parsedData?.name;
207
- }
208
- }
209
- }
210
- catch (error) {
211
- logger.error('error parsing reason', error);
212
- }
213
- }
214
- return {
215
- errorData,
216
- errorMessage,
217
- errorName,
218
- };
219
- }
220
- parseLog(log) {
221
- return this.interface.parseLog(log);
222
- }
223
- }
224
- //# sourceMappingURL=BaseContractShim.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"BaseContractShim.js","sourceRoot":"","sources":["../src/BaseContractShim.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAA;AAI3C,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAA;AAG9D,MAAM,CAAC,MAAM,aAAa,GAAG,eAAe,CAAA;AAE5C,MAAM,MAAM,GAAG,OAAO,CAAC,sBAAsB,CAAC,CAAA;AAQ9C,MAAM,OAAO,gBAAgB;IAIT,OAAO,CAAQ;IACf,QAAQ,CAA2B;IACnC,OAAO,CAAqB;IAC5B,GAAG,CAAK;IAChB,QAAQ,CAA2B;IACnC,eAAe,CAAoC;IACnD,iBAAiB,CAA0B;IAC3C,YAAY,CAAa;IACzB,aAAa,CAAa;IAElC,YACI,OAAe,EACf,QAAmC,EACnC,OAA4B,EAC5B,GAAQ;QAER,IAAI,CAAC,OAAO,GAAG,OAAO,CAAA;QACtB,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAA;QACxB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAA;QACtB,IAAI,CAAC,GAAG,GAAG,GAAG,CAAA;QACd,KAAK,IAAI,CAAC,UAAU,EAAE,CAAA;IAC1B,CAAC;IAEM,KAAK,CAAC,UAAU;QACnB,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC;YAChB,OAAO,IAAI,CAAC,QAAQ,CAAA;QACxB,CAAC;QAED,IAAI,CAAC,IAAI,CAAC,eAAe,EAAE,CAAC;YACxB,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC,QAAQ,CAAC,UAAU,EAAE,CAAA;QACrD,CAAC;QAED,IAAI,CAAC;YACD,IAAI,CA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;YACZ,SAAS;SACZ,CAAA;IACL,CAAC;IAEM,QAAQ,CAAC,GAAyB;QACrC,OAAO,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAA;IACvC,CAAC;CACJ"}
@@ -1,9 +0,0 @@
1
- import { ethers } from 'ethers';
2
- import { BaseContractShim } from '../BaseContractShim';
3
- import { DropFacet__factory } from '@towns-labs/generated/dev/typings/factories/DropFacet__factory';
4
- declare const connect: typeof DropFacet__factory.connect;
5
- export declare class IDropFacetShim extends BaseContractShim<typeof connect> {
6
- constructor(address: string, provider: ethers.providers.Provider);
7
- }
8
- export {};
9
- //# sourceMappingURL=IDropFacetShim.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"IDropFacetShim.d.ts","sourceRoot":"","sources":["../../src/airdrop/IDropFacetShim.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAC/B,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAA;AACtD,OAAO,EAAE,kBAAkB,EAAE,MAAM,gEAAgE,CAAA;AAEnG,QAAA,MAAa,OAAO,mCAAuB,CAAA;AAE3C,qBAAa,cAAe,SAAQ,gBAAgB,CAAC,OAAO,OAAO,CAAC;gBACpD,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,CAAC,SAAS,CAAC,QAAQ;CAGnE"}
@@ -1,9 +0,0 @@
1
- import { BaseContractShim } from '../BaseContractShim';
2
- import { DropFacet__factory } from '@towns-labs/generated/dev/typings/factories/DropFacet__factory';
3
- const { abi, connect } = DropFacet__factory;
4
- export class IDropFacetShim extends BaseContractShim {
5
- constructor(address, provider) {
6
- super(address, provider, connect, abi);
7
- }
8
- }
9
- //# sourceMappingURL=IDropFacetShim.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"IDropFacetShim.js","sourceRoot":"","sources":["../../src/airdrop/IDropFacetShim.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAA;AACtD,OAAO,EAAE,kBAAkB,EAAE,MAAM,gEAAgE,CAAA;AAEnG,MAAM,EAAE,GAAG,EAAE,OAAO,EAAE,GAAG,kBAAkB,CAAA;AAE3C,MAAM,OAAO,cAAe,SAAQ,gBAAgC;IAChE,YAAY,OAAe,EAAE,QAAmC;QAC5D,KAAK,CAAC,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,CAAC,CAAA;IAC1C,CAAC;CACJ"}
@@ -1,9 +0,0 @@
1
- import { ethers } from 'ethers';
2
- import { BaseContractShim } from '../BaseContractShim';
3
- import { ITownsPoints__factory } from '@towns-labs/generated/dev/typings/factories/ITownsPoints__factory';
4
- declare const connect: typeof ITownsPoints__factory.connect;
5
- export declare class IRiverPointsShim extends BaseContractShim<typeof connect> {
6
- constructor(address: string, provider: ethers.providers.Provider);
7
- }
8
- export {};
9
- //# sourceMappingURL=IRiverPointsShim.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"IRiverPointsShim.d.ts","sourceRoot":"","sources":["../../src/airdrop/IRiverPointsShim.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAC/B,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAA;AACtD,OAAO,EAAE,qBAAqB,EAAE,MAAM,mEAAmE,CAAA;AAEzG,QAAA,MAAa,OAAO,sCAA0B,CAAA;AAE9C,qBAAa,gBAAiB,SAAQ,gBAAgB,CAAC,OAAO,OAAO,CAAC;gBACtD,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,CAAC,SAAS,CAAC,QAAQ;CAGnE"}
@@ -1,9 +0,0 @@
1
- import { BaseContractShim } from '../BaseContractShim';
2
- import { ITownsPoints__factory } from '@towns-labs/generated/dev/typings/factories/ITownsPoints__factory';
3
- const { abi, connect } = ITownsPoints__factory;
4
- export class IRiverPointsShim extends BaseContractShim {
5
- constructor(address, provider) {
6
- super(address, provider, connect, abi);
7
- }
8
- }
9
- //# sourceMappingURL=IRiverPointsShim.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"IRiverPointsShim.js","sourceRoot":"","sources":["../../src/airdrop/IRiverPointsShim.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAA;AACtD,OAAO,EAAE,qBAAqB,EAAE,MAAM,mEAAmE,CAAA;AAEzG,MAAM,EAAE,GAAG,EAAE,OAAO,EAAE,GAAG,qBAAqB,CAAA;AAE9C,MAAM,OAAO,gBAAiB,SAAQ,gBAAgC;IAClE,YAAY,OAAe,EAAE,QAAmC;QAC5D,KAAK,CAAC,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,CAAC,CAAA;IAC1C,CAAC;CACJ"}
@@ -1,16 +0,0 @@
1
- import { IDropFacetShim } from './IDropFacetShim';
2
- import { BaseChainConfig } from '../utils/web3Env';
3
- import { BigNumber, ethers } from 'ethers';
4
- import { IERC721AShim } from '../erc-721/IERC721AShim';
5
- import { IRiverPointsShim } from './IRiverPointsShim';
6
- export declare class RiverAirdropDapp {
7
- readonly drop?: IDropFacetShim;
8
- readonly riverPoints?: IRiverPointsShim;
9
- readonly erc721A?: IERC721AShim;
10
- constructor(config: BaseChainConfig, provider: ethers.providers.Provider);
11
- getCurrentStreak(walletAddress: string): Promise<BigNumber>;
12
- getLastCheckIn(walletAddress: string): Promise<BigNumber>;
13
- checkIn(signer: ethers.Signer): Promise<ethers.ContractTransaction | undefined>;
14
- balanceOf(walletAddress: string): Promise<BigNumber>;
15
- }
16
- //# sourceMappingURL=RiverAirdropDapp.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"RiverAirdropDapp.d.ts","sourceRoot":"","sources":["../../src/airdrop/RiverAirdropDapp.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AACjD,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAA;AAClD,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAC1C,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAA;AACtD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAA;AAErD,qBAAa,gBAAgB;IAEzB,SAAgB,IAAI,CAAC,EAAE,cAAc,CAAA;IACrC,SAAgB,WAAW,CAAC,EAAE,gBAAgB,CAAA;IAC9C,SAAgB,OAAO,CAAC,EAAE,YAAY,CAAA;gBAE1B,MAAM,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,CAAC,SAAS,CAAC,QAAQ;IAQ3D,gBAAgB,CAAC,aAAa,EAAE,MAAM,GAAG,OAAO,CAAC,SAAS,CAAC;IAI3D,cAAc,CAAC,aAAa,EAAE,MAAM,GAAG,OAAO,CAAC,SAAS,CAAC;IAIzD,OAAO,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM;IAI7B,SAAS,CAAC,aAAa,EAAE,MAAM;CAG/C"}
@@ -1,30 +0,0 @@
1
- import { IDropFacetShim } from './IDropFacetShim';
2
- import { BigNumber } from 'ethers';
3
- import { IERC721AShim } from '../erc-721/IERC721AShim';
4
- import { IRiverPointsShim } from './IRiverPointsShim';
5
- export class RiverAirdropDapp {
6
- // river airdrop isn't on all chains, so the facets might be undefined
7
- drop;
8
- riverPoints;
9
- erc721A;
10
- constructor(config, provider) {
11
- if (config.addresses.riverAirdrop) {
12
- this.drop = new IDropFacetShim(config.addresses.riverAirdrop, provider);
13
- this.riverPoints = new IRiverPointsShim(config.addresses.riverAirdrop, provider);
14
- this.erc721A = new IERC721AShim(config.addresses.riverAirdrop, provider);
15
- }
16
- }
17
- async getCurrentStreak(walletAddress) {
18
- return this.riverPoints?.read.getCurrentStreak(walletAddress) ?? BigNumber.from(0);
19
- }
20
- async getLastCheckIn(walletAddress) {
21
- return this.riverPoints?.read.getLastCheckIn(walletAddress) ?? BigNumber.from(0);
22
- }
23
- async checkIn(signer) {
24
- return this.riverPoints?.write(signer).checkIn();
25
- }
26
- async balanceOf(walletAddress) {
27
- return this.erc721A?.read.balanceOf(walletAddress) ?? BigNumber.from(0);
28
- }
29
- }
30
- //# sourceMappingURL=RiverAirdropDapp.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"RiverAirdropDapp.js","sourceRoot":"","sources":["../../src/airdrop/RiverAirdropDapp.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AAEjD,OAAO,EAAE,SAAS,EAAU,MAAM,QAAQ,CAAA;AAC1C,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAA;AACtD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAA;AAErD,MAAM,OAAO,gBAAgB;IACzB,sEAAsE;IACtD,IAAI,CAAiB;IACrB,WAAW,CAAmB;IAC9B,OAAO,CAAe;IAEtC,YAAY,MAAuB,EAAE,QAAmC;QACpE,IAAI,MAAM,CAAC,SAAS,CAAC,YAAY,EAAE,CAAC;YAChC,IAAI,CAAC,IAAI,GAAG,IAAI,cAAc,CAAC,MAAM,CAAC,SAAS,CAAC,YAAY,EAAE,QAAQ,CAAC,CAAA;YACvE,IAAI,CAAC,WAAW,GAAG,IAAI,gBAAgB,CAAC,MAAM,CAAC,SAAS,CAAC,YAAY,EAAE,QAAQ,CAAC,CAAA;YAChF,IAAI,CAAC,OAAO,GAAG,IAAI,YAAY,CAAC,MAAM,CAAC,SAAS,CAAC,YAAY,EAAE,QAAQ,CAAC,CAAA;QAC5E,CAAC;IACL,CAAC;IAEM,KAAK,CAAC,gBAAgB,CAAC,aAAqB;QAC/C,OAAO,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,gBAAgB,CAAC,aAAa,CAAC,IAAI,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;IACtF,CAAC;IAEM,KAAK,CAAC,cAAc,CAAC,aAAqB;QAC7C,OAAO,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,cAAc,CAAC,aAAa,CAAC,IAAI,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;IACpF,CAAC;IAEM,KAAK,CAAC,OAAO,CAAC,MAAqB;QACtC,OAAO,IAAI,CAAC,WAAW,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC,OAAO,EAAE,CAAA;IACpD,CAAC;IAEM,KAAK,CAAC,SAAS,CAAC,aAAqB;QACxC,OAAO,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,SAAS,CAAC,aAAa,CAAC,IAAI,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;IAC3E,CAAC;CACJ"}
@@ -1,68 +0,0 @@
1
- import { ethers, type BigNumber, type ContractReceipt, type ContractTransaction } from 'ethers';
2
- import { BaseChainConfig } from '../utils/web3Env';
3
- import type { Address } from 'viem';
4
- import { IAppRegistryShim } from './IAppRegistryShim';
5
- import { IAppInstallerShim } from './IAppInstallerShim';
6
- import { IAppFactoryShim } from './IAppFactoryShim';
7
- import { IReputationRegistryShim } from './IReputationRegistryShim';
8
- import { SimpleAppShim } from './SimpleAppShim';
9
- import type { AppRegisteredEventObject, IAppRegistryBase } from '@towns-labs/generated/dev/typings/IAppRegistry';
10
- import type { AppCreatedEventObject } from '@towns-labs/generated/dev/typings/IAppFactory';
11
- import { Permission } from '../types/ContractTypes';
12
- export type BotInfo = {
13
- appId: Address;
14
- app: {
15
- client: Address;
16
- module: Address;
17
- owner: Address;
18
- permissions: Permission[];
19
- };
20
- };
21
- export declare class AppRegistryDapp {
22
- readonly registry: IAppRegistryShim;
23
- readonly installer: IAppInstallerShim;
24
- readonly factory: IAppFactoryShim;
25
- readonly reputation: IReputationRegistryShim;
26
- private readonly provider;
27
- constructor(config: BaseChainConfig, provider: ethers.providers.Provider);
28
- callApp(appAddress: Address): SimpleAppShim;
29
- createApp(signer: ethers.Signer, name: string, permissions: Permission[], client: Address, installPrice: bigint, accessDuration: bigint): Promise<ContractTransaction>;
30
- getCreateAppEvent(receipt: ContractReceipt, senderAddress: Address): AppCreatedEventObject;
31
- getRegisterAppEvent(receipt: ContractReceipt, appAddress: Address): AppRegisteredEventObject;
32
- /** To register a smart contract app with a App Client */
33
- registerApp(signer: ethers.Signer, app: Address, client: Address): Promise<ContractTransaction>;
34
- /** To install a smart contract app in a space */
35
- installApp(
36
- /** The signer of the app owner */
37
- signer: ethers.Signer,
38
- /** The address of the app to install */
39
- app: Address,
40
- /** The address of the space to install the app in */
41
- spaceAddress: Address,
42
- /** The price of the app in wei */
43
- price: bigint,
44
- /** The data to pass to the app's onInstall function */
45
- data?: Uint8Array): Promise<ContractTransaction>;
46
- /** To uninstall a smart contract app from a space */
47
- uninstallApp(
48
- /** The signer of the app owner */
49
- signer: ethers.Signer,
50
- /** The address of the app to uninstall */
51
- app: Address,
52
- /** The address of the space to uninstall the app from */
53
- spaceAddress: Address,
54
- /** The data to pass to the app's onUninstall function */
55
- data?: Uint8Array): Promise<ContractTransaction>;
56
- removeApp(signer: ethers.Signer, appId: string): Promise<ContractTransaction>;
57
- getAppPrice(app: Address): Promise<BigNumber>;
58
- getAppDuration(app: Address): Promise<number>;
59
- getAppSchema(): Promise<string>;
60
- getAppSchemaId(): Promise<string>;
61
- isAppBanned(app: Address): Promise<boolean>;
62
- getLatestAppId(app: Address): Promise<string>;
63
- getAppById(appId: string): Promise<IAppRegistryBase.AppStructOutput>;
64
- adminRegisterAppSchema(signer: ethers.Signer, schema: string, resolver: Address, revocable: boolean): Promise<ContractTransaction>;
65
- adminBanApp(signer: ethers.Signer, app: Address): Promise<ContractTransaction>;
66
- getAllAppsByOwner(targetOwner: Address, fromBlock?: number): Promise<BotInfo[]>;
67
- }
68
- //# sourceMappingURL=AppRegistryDapp.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"AppRegistryDapp.d.ts","sourceRoot":"","sources":["../../src/app-registry/AppRegistryDapp.ts"],"names":[],"mappings":"AAAA,OAAO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