@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.
- package/dist/cache/KVCacheStorage.d.ts +3 -3
- package/dist/cache/KVCacheStorage.d.ts.map +1 -1
- package/dist/cache/KVCacheStorage.js +10 -103
- package/dist/cache/KVCacheStorage.js.map +1 -1
- package/dist/cache/Keyable.d.ts +2 -3
- package/dist/cache/Keyable.d.ts.map +1 -1
- package/dist/cache/Keyable.js +1 -2
- package/dist/cache/Keyable.js.map +1 -1
- package/dist/eip-712/EIP-712.d.ts +16 -6
- package/dist/eip-712/EIP-712.d.ts.map +1 -1
- package/dist/eip-712/EIP-712.js +20 -8
- package/dist/eip-712/EIP-712.js.map +1 -1
- package/dist/index.d.ts +2 -77
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -77
- package/dist/index.js.map +1 -1
- package/dist/test-helpers/MockERC1155.d.ts +1 -1
- package/dist/test-helpers/MockERC1155.d.ts.map +1 -1
- package/dist/test-helpers/MockERC20.d.ts +1 -1
- package/dist/test-helpers/MockERC20.d.ts.map +1 -1
- package/dist/types/ContractTypes.d.ts +0 -170
- package/dist/types/ContractTypes.d.ts.map +1 -1
- package/dist/types/ContractTypes.js +0 -32
- package/dist/types/ContractTypes.js.map +1 -1
- package/dist/utils/ut.d.ts +1 -4
- package/dist/utils/ut.d.ts.map +1 -1
- package/dist/utils/ut.js +2 -14
- package/dist/utils/ut.js.map +1 -1
- package/dist/utils/web3Env.js +1 -1
- package/dist/utils/web3Env.js.map +1 -1
- package/dist/utils/xchain.d.ts +21 -0
- package/dist/utils/xchain.d.ts.map +1 -0
- package/dist/{space/entitlements/XChainConfig.js → utils/xchain.js} +45 -29
- package/dist/utils/xchain.js.map +1 -0
- package/dist/web3Types.d.ts +33 -0
- package/dist/web3Types.d.ts.map +1 -0
- package/dist/web3Types.js +89 -0
- package/dist/web3Types.js.map +1 -0
- package/package.json +3 -5
- package/dist/BaseContractShim.d.ts +0 -57
- package/dist/BaseContractShim.d.ts.map +0 -1
- package/dist/BaseContractShim.js +0 -224
- package/dist/BaseContractShim.js.map +0 -1
- package/dist/airdrop/IDropFacetShim.d.ts +0 -9
- package/dist/airdrop/IDropFacetShim.d.ts.map +0 -1
- package/dist/airdrop/IDropFacetShim.js +0 -9
- package/dist/airdrop/IDropFacetShim.js.map +0 -1
- package/dist/airdrop/IRiverPointsShim.d.ts +0 -9
- package/dist/airdrop/IRiverPointsShim.d.ts.map +0 -1
- package/dist/airdrop/IRiverPointsShim.js +0 -9
- package/dist/airdrop/IRiverPointsShim.js.map +0 -1
- package/dist/airdrop/RiverAirdropDapp.d.ts +0 -16
- package/dist/airdrop/RiverAirdropDapp.d.ts.map +0 -1
- package/dist/airdrop/RiverAirdropDapp.js +0 -30
- package/dist/airdrop/RiverAirdropDapp.js.map +0 -1
- package/dist/app-registry/AppRegistryDapp.d.ts +0 -68
- package/dist/app-registry/AppRegistryDapp.d.ts.map +0 -1
- package/dist/app-registry/AppRegistryDapp.js +0 -182
- package/dist/app-registry/AppRegistryDapp.js.map +0 -1
- package/dist/app-registry/IAppFactoryShim.d.ts +0 -9
- package/dist/app-registry/IAppFactoryShim.d.ts.map +0 -1
- package/dist/app-registry/IAppFactoryShim.js +0 -9
- package/dist/app-registry/IAppFactoryShim.js.map +0 -1
- package/dist/app-registry/IAppInstallerShim.d.ts +0 -9
- package/dist/app-registry/IAppInstallerShim.d.ts.map +0 -1
- package/dist/app-registry/IAppInstallerShim.js +0 -9
- package/dist/app-registry/IAppInstallerShim.js.map +0 -1
- package/dist/app-registry/IAppRegistryShim.d.ts +0 -9
- package/dist/app-registry/IAppRegistryShim.d.ts.map +0 -1
- package/dist/app-registry/IAppRegistryShim.js +0 -9
- package/dist/app-registry/IAppRegistryShim.js.map +0 -1
- package/dist/app-registry/IIdentityRegistryShim.d.ts +0 -9
- package/dist/app-registry/IIdentityRegistryShim.d.ts.map +0 -1
- package/dist/app-registry/IIdentityRegistryShim.js +0 -9
- package/dist/app-registry/IIdentityRegistryShim.js.map +0 -1
- package/dist/app-registry/IReputationRegistryShim.d.ts +0 -9
- package/dist/app-registry/IReputationRegistryShim.d.ts.map +0 -1
- package/dist/app-registry/IReputationRegistryShim.js +0 -9
- package/dist/app-registry/IReputationRegistryShim.js.map +0 -1
- package/dist/app-registry/SimpleAppShim.d.ts +0 -9
- package/dist/app-registry/SimpleAppShim.d.ts.map +0 -1
- package/dist/app-registry/SimpleAppShim.js +0 -9
- package/dist/app-registry/SimpleAppShim.js.map +0 -1
- package/dist/base-registry/BaseRegistry.d.ts +0 -32
- package/dist/base-registry/BaseRegistry.d.ts.map +0 -1
- package/dist/base-registry/BaseRegistry.js +0 -67
- package/dist/base-registry/BaseRegistry.js.map +0 -1
- package/dist/base-registry/IEntitlementCheckerShim.d.ts +0 -9
- package/dist/base-registry/IEntitlementCheckerShim.d.ts.map +0 -1
- package/dist/base-registry/IEntitlementCheckerShim.js +0 -9
- package/dist/base-registry/IEntitlementCheckerShim.js.map +0 -1
- package/dist/base-registry/INodeOperatorShim.d.ts +0 -9
- package/dist/base-registry/INodeOperatorShim.d.ts.map +0 -1
- package/dist/base-registry/INodeOperatorShim.js +0 -9
- package/dist/base-registry/INodeOperatorShim.js.map +0 -1
- package/dist/base-registry/ISpaceDelegationShim.d.ts +0 -9
- package/dist/base-registry/ISpaceDelegationShim.d.ts.map +0 -1
- package/dist/base-registry/ISpaceDelegationShim.js +0 -9
- package/dist/base-registry/ISpaceDelegationShim.js.map +0 -1
- package/dist/base-registry/RewardsDistributionShim.d.ts +0 -9
- package/dist/base-registry/RewardsDistributionShim.d.ts.map +0 -1
- package/dist/base-registry/RewardsDistributionShim.js +0 -9
- package/dist/base-registry/RewardsDistributionShim.js.map +0 -1
- package/dist/delegate-registry/DelegateRegistry.d.ts +0 -3
- package/dist/delegate-registry/DelegateRegistry.d.ts.map +0 -1
- package/dist/delegate-registry/DelegateRegistry.js +0 -72
- package/dist/delegate-registry/DelegateRegistry.js.map +0 -1
- package/dist/erc-721/IERC721AQueryableShim.d.ts +0 -9
- package/dist/erc-721/IERC721AQueryableShim.d.ts.map +0 -1
- package/dist/erc-721/IERC721AQueryableShim.js +0 -9
- package/dist/erc-721/IERC721AQueryableShim.js.map +0 -1
- package/dist/erc-721/IERC721AShim.d.ts +0 -9
- package/dist/erc-721/IERC721AShim.d.ts.map +0 -1
- package/dist/erc-721/IERC721AShim.js +0 -9
- package/dist/erc-721/IERC721AShim.js.map +0 -1
- package/dist/platform-requirements/PlatformRequirements.d.ts +0 -12
- package/dist/platform-requirements/PlatformRequirements.d.ts.map +0 -1
- package/dist/platform-requirements/PlatformRequirements.js +0 -18
- package/dist/platform-requirements/PlatformRequirements.js.map +0 -1
- package/dist/pricing-modules/IPricingShim.d.ts +0 -9
- package/dist/pricing-modules/IPricingShim.d.ts.map +0 -1
- package/dist/pricing-modules/IPricingShim.js +0 -9
- package/dist/pricing-modules/IPricingShim.js.map +0 -1
- package/dist/pricing-modules/PricingModules.d.ts +0 -13
- package/dist/pricing-modules/PricingModules.d.ts.map +0 -1
- package/dist/pricing-modules/PricingModules.js +0 -23
- package/dist/pricing-modules/PricingModules.js.map +0 -1
- package/dist/pricing-modules/helpers.d.ts +0 -16
- package/dist/pricing-modules/helpers.d.ts.map +0 -1
- package/dist/pricing-modules/helpers.js +0 -35
- package/dist/pricing-modules/helpers.js.map +0 -1
- package/dist/readContractRetryer.d.ts +0 -10
- package/dist/readContractRetryer.d.ts.map +0 -1
- package/dist/readContractRetryer.js +0 -68
- package/dist/readContractRetryer.js.map +0 -1
- package/dist/river-registry/IOperatorRegistryShim.d.ts +0 -9
- package/dist/river-registry/IOperatorRegistryShim.d.ts.map +0 -1
- package/dist/river-registry/IOperatorRegistryShim.js +0 -9
- package/dist/river-registry/IOperatorRegistryShim.js.map +0 -1
- package/dist/river-registry/IStreamRegistryShim.d.ts +0 -9
- package/dist/river-registry/IStreamRegistryShim.d.ts.map +0 -1
- package/dist/river-registry/IStreamRegistryShim.js +0 -9
- package/dist/river-registry/IStreamRegistryShim.js.map +0 -1
- package/dist/river-registry/RiverRegistry.d.ts +0 -18
- package/dist/river-registry/RiverRegistry.d.ts.map +0 -1
- package/dist/river-registry/RiverRegistry.js +0 -42
- package/dist/river-registry/RiverRegistry.js.map +0 -1
- package/dist/river-registry/RiverRegistryFactory.d.ts +0 -5
- package/dist/river-registry/RiverRegistryFactory.d.ts.map +0 -1
- package/dist/river-registry/RiverRegistryFactory.js +0 -5
- package/dist/river-registry/RiverRegistryFactory.js.map +0 -1
- package/dist/space/IAppAccountShim.d.ts +0 -9
- package/dist/space/IAppAccountShim.d.ts.map +0 -1
- package/dist/space/IAppAccountShim.js +0 -9
- package/dist/space/IAppAccountShim.js.map +0 -1
- package/dist/space/IBanningShim.d.ts +0 -9
- package/dist/space/IBanningShim.d.ts.map +0 -1
- package/dist/space/IBanningShim.js +0 -9
- package/dist/space/IBanningShim.js.map +0 -1
- package/dist/space/IChannelShim.d.ts +0 -9
- package/dist/space/IChannelShim.d.ts.map +0 -1
- package/dist/space/IChannelShim.js +0 -9
- package/dist/space/IChannelShim.js.map +0 -1
- package/dist/space/IEntitlementDataQueryableShim.d.ts +0 -11
- package/dist/space/IEntitlementDataQueryableShim.d.ts.map +0 -1
- package/dist/space/IEntitlementDataQueryableShim.js +0 -9
- package/dist/space/IEntitlementDataQueryableShim.js.map +0 -1
- package/dist/space/IEntitlementsShim.d.ts +0 -13
- package/dist/space/IEntitlementsShim.d.ts.map +0 -1
- package/dist/space/IEntitlementsShim.js +0 -19
- package/dist/space/IEntitlementsShim.js.map +0 -1
- package/dist/space/IMembershipMetadataShim.d.ts +0 -9
- package/dist/space/IMembershipMetadataShim.d.ts.map +0 -1
- package/dist/space/IMembershipMetadataShim.js +0 -9
- package/dist/space/IMembershipMetadataShim.js.map +0 -1
- package/dist/space/IMembershipShim.d.ts +0 -33
- package/dist/space/IMembershipShim.d.ts.map +0 -1
- package/dist/space/IMembershipShim.js +0 -139
- package/dist/space/IMembershipShim.js.map +0 -1
- package/dist/space/IMulticallShim.d.ts +0 -13
- package/dist/space/IMulticallShim.d.ts.map +0 -1
- package/dist/space/IMulticallShim.js +0 -15
- package/dist/space/IMulticallShim.js.map +0 -1
- package/dist/space/IReviewShim.d.ts +0 -64
- package/dist/space/IReviewShim.d.ts.map +0 -1
- package/dist/space/IReviewShim.js +0 -102
- package/dist/space/IReviewShim.js.map +0 -1
- package/dist/space/IRolesShim.d.ts +0 -10
- package/dist/space/IRolesShim.d.ts.map +0 -1
- package/dist/space/IRolesShim.js +0 -9
- package/dist/space/IRolesShim.js.map +0 -1
- package/dist/space/ITippingShim.d.ts +0 -39
- package/dist/space/ITippingShim.d.ts.map +0 -1
- package/dist/space/ITippingShim.js +0 -76
- package/dist/space/ITippingShim.js.map +0 -1
- package/dist/space/ITreasuryShim.d.ts +0 -9
- package/dist/space/ITreasuryShim.d.ts.map +0 -1
- package/dist/space/ITreasuryShim.js +0 -9
- package/dist/space/ITreasuryShim.js.map +0 -1
- package/dist/space/OwnableFacetShim.d.ts +0 -12
- package/dist/space/OwnableFacetShim.d.ts.map +0 -1
- package/dist/space/OwnableFacetShim.js +0 -19
- package/dist/space/OwnableFacetShim.js.map +0 -1
- package/dist/space/Space.d.ts +0 -107
- package/dist/space/Space.d.ts.map +0 -1
- package/dist/space/Space.js +0 -511
- package/dist/space/Space.js.map +0 -1
- package/dist/space/TokenPausableFacetShim.d.ts +0 -9
- package/dist/space/TokenPausableFacetShim.d.ts.map +0 -1
- package/dist/space/TokenPausableFacetShim.js +0 -9
- package/dist/space/TokenPausableFacetShim.js.map +0 -1
- package/dist/space/entitlements/ConvertersEntitlements.d.ts +0 -14
- package/dist/space/entitlements/ConvertersEntitlements.d.ts.map +0 -1
- package/dist/space/entitlements/ConvertersEntitlements.js +0 -193
- package/dist/space/entitlements/ConvertersEntitlements.js.map +0 -1
- package/dist/space/entitlements/RuleBuilder.d.ts +0 -83
- package/dist/space/entitlements/RuleBuilder.d.ts.map +0 -1
- package/dist/space/entitlements/RuleBuilder.js +0 -86
- package/dist/space/entitlements/RuleBuilder.js.map +0 -1
- package/dist/space/entitlements/RuleEntitlementShim.d.ts +0 -353
- package/dist/space/entitlements/RuleEntitlementShim.d.ts.map +0 -1
- package/dist/space/entitlements/RuleEntitlementShim.js +0 -40
- package/dist/space/entitlements/RuleEntitlementShim.js.map +0 -1
- package/dist/space/entitlements/RuleEntitlementV2Shim.d.ts +0 -353
- package/dist/space/entitlements/RuleEntitlementV2Shim.d.ts.map +0 -1
- package/dist/space/entitlements/RuleEntitlementV2Shim.js +0 -40
- package/dist/space/entitlements/RuleEntitlementV2Shim.js.map +0 -1
- package/dist/space/entitlements/UserEntitlementShim.d.ts +0 -13
- package/dist/space/entitlements/UserEntitlementShim.d.ts.map +0 -1
- package/dist/space/entitlements/UserEntitlementShim.js +0 -45
- package/dist/space/entitlements/UserEntitlementShim.js.map +0 -1
- package/dist/space/entitlements/XChainConfig.d.ts +0 -14
- package/dist/space/entitlements/XChainConfig.d.ts.map +0 -1
- package/dist/space/entitlements/XChainConfig.js.map +0 -1
- package/dist/space/entitlements/entitlement.d.ts +0 -147
- package/dist/space/entitlements/entitlement.d.ts.map +0 -1
- package/dist/space/entitlements/entitlement.js +0 -940
- package/dist/space/entitlements/entitlement.js.map +0 -1
- package/dist/space/entitlements/validateAndParseXChainConfig.d.ts +0 -6
- package/dist/space/entitlements/validateAndParseXChainConfig.d.ts.map +0 -1
- package/dist/space/entitlements/validateAndParseXChainConfig.js +0 -34
- package/dist/space/entitlements/validateAndParseXChainConfig.js.map +0 -1
- package/dist/space-dapp/SpaceDapp.d.ts +0 -223
- package/dist/space-dapp/SpaceDapp.d.ts.map +0 -1
- package/dist/space-dapp/SpaceDapp.js +0 -1260
- package/dist/space-dapp/SpaceDapp.js.map +0 -1
- package/dist/space-dapp/SpaceDappFactory.d.ts +0 -5
- package/dist/space-dapp/SpaceDappFactory.d.ts.map +0 -1
- package/dist/space-dapp/SpaceDappFactory.js +0 -8
- package/dist/space-dapp/SpaceDappFactory.js.map +0 -1
- package/dist/space-dapp/wrapTransaction.d.ts +0 -4
- package/dist/space-dapp/wrapTransaction.d.ts.map +0 -1
- package/dist/space-dapp/wrapTransaction.js +0 -99
- package/dist/space-dapp/wrapTransaction.js.map +0 -1
- package/dist/space-owner/GuardianFacetShim.d.ts +0 -9
- package/dist/space-owner/GuardianFacetShim.d.ts.map +0 -1
- package/dist/space-owner/GuardianFacetShim.js +0 -9
- package/dist/space-owner/GuardianFacetShim.js.map +0 -1
- package/dist/space-owner/SpaceOwner.d.ts +0 -48
- package/dist/space-owner/SpaceOwner.d.ts.map +0 -1
- package/dist/space-owner/SpaceOwner.js +0 -81
- package/dist/space-owner/SpaceOwner.js.map +0 -1
- package/dist/space-registrar/ICreateSpaceShim.d.ts +0 -11
- package/dist/space-registrar/ICreateSpaceShim.d.ts.map +0 -1
- package/dist/space-registrar/ICreateSpaceShim.js +0 -9
- package/dist/space-registrar/ICreateSpaceShim.js.map +0 -1
- package/dist/space-registrar/ILegacySpaceArchitectShim.d.ts +0 -10
- package/dist/space-registrar/ILegacySpaceArchitectShim.d.ts.map +0 -1
- package/dist/space-registrar/ILegacySpaceArchitectShim.js +0 -9
- package/dist/space-registrar/ILegacySpaceArchitectShim.js.map +0 -1
- package/dist/space-registrar/ISpaceArchitectShim.d.ts +0 -10
- package/dist/space-registrar/ISpaceArchitectShim.d.ts.map +0 -1
- package/dist/space-registrar/ISpaceArchitectShim.js +0 -39
- package/dist/space-registrar/ISpaceArchitectShim.js.map +0 -1
- package/dist/space-registrar/SpaceRegistrar.d.ts +0 -27
- package/dist/space-registrar/SpaceRegistrar.d.ts.map +0 -1
- package/dist/space-registrar/SpaceRegistrar.js +0 -58
- package/dist/space-registrar/SpaceRegistrar.js.map +0 -1
- package/dist/test-helpers/LocalhostWeb3Provider.d.ts +0 -19
- package/dist/test-helpers/LocalhostWeb3Provider.d.ts.map +0 -1
- package/dist/test-helpers/LocalhostWeb3Provider.js +0 -80
- package/dist/test-helpers/LocalhostWeb3Provider.js.map +0 -1
- package/dist/test-helpers/MockCrossChainEntitlement.d.ts +0 -6
- package/dist/test-helpers/MockCrossChainEntitlement.d.ts.map +0 -1
- package/dist/test-helpers/MockCrossChainEntitlement.js +0 -104
- package/dist/test-helpers/MockCrossChainEntitlement.js.map +0 -1
- package/dist/test-helpers/MockERC721AShim.d.ts +0 -9
- package/dist/test-helpers/MockERC721AShim.d.ts.map +0 -1
- package/dist/test-helpers/MockERC721AShim.js +0 -9
- package/dist/test-helpers/MockERC721AShim.js.map +0 -1
- package/dist/test-helpers/TestCrossChainEntitlement.d.ts +0 -14
- package/dist/test-helpers/TestCrossChainEntitlement.d.ts.map +0 -1
- package/dist/test-helpers/TestCrossChainEntitlement.js +0 -99
- package/dist/test-helpers/TestCrossChainEntitlement.js.map +0 -1
- package/dist/test-helpers/TestGatingERC1155.d.ts +0 -17
- package/dist/test-helpers/TestGatingERC1155.d.ts.map +0 -1
- package/dist/test-helpers/TestGatingERC1155.js +0 -100
- package/dist/test-helpers/TestGatingERC1155.js.map +0 -1
- package/dist/test-helpers/TestGatingERC20.d.ts +0 -17
- package/dist/test-helpers/TestGatingERC20.d.ts.map +0 -1
- package/dist/test-helpers/TestGatingERC20.js +0 -149
- package/dist/test-helpers/TestGatingERC20.js.map +0 -1
- package/dist/test-helpers/TestGatingNFT.d.ts +0 -17
- package/dist/test-helpers/TestGatingNFT.d.ts.map +0 -1
- package/dist/test-helpers/TestGatingNFT.js +0 -137
- package/dist/test-helpers/TestGatingNFT.js.map +0 -1
- package/dist/test-helpers/TestGatingUtils.d.ts +0 -15
- package/dist/test-helpers/TestGatingUtils.d.ts.map +0 -1
- package/dist/test-helpers/TestGatingUtils.js +0 -112
- package/dist/test-helpers/TestGatingUtils.js.map +0 -1
- package/dist/test-helpers/utils.d.ts +0 -22
- package/dist/test-helpers/utils.d.ts.map +0 -1
- package/dist/test-helpers/utils.js +0 -30
- package/dist/test-helpers/utils.js.map +0 -1
- package/dist/towns-token/TownsToken.d.ts +0 -17
- package/dist/towns-token/TownsToken.d.ts.map +0 -1
- package/dist/towns-token/TownsToken.js +0 -33
- package/dist/towns-token/TownsToken.js.map +0 -1
- package/dist/types/typechain.d.ts +0 -4
- package/dist/types/typechain.d.ts.map +0 -1
- package/dist/types/typechain.js +0 -2
- package/dist/types/typechain.js.map +0 -1
- package/dist/utils/ContractHelpers.d.ts +0 -14
- package/dist/utils/ContractHelpers.d.ts.map +0 -1
- package/dist/utils/ContractHelpers.js +0 -54
- package/dist/utils/ContractHelpers.js.map +0 -1
- package/dist/wallet-link/WalletLink.d.ts +0 -58
- package/dist/wallet-link/WalletLink.d.ts.map +0 -1
- package/dist/wallet-link/WalletLink.js +0 -226
- package/dist/wallet-link/WalletLink.js.map +0 -1
- package/dist/wallet-link/WalletLinkShim.d.ts +0 -9
- package/dist/wallet-link/WalletLinkShim.d.ts.map +0 -1
- package/dist/wallet-link/WalletLinkShim.js +0 -9
- package/dist/wallet-link/WalletLinkShim.js.map +0 -1
|
@@ -41,7 +41,7 @@ export interface KVNamespace {
|
|
|
41
41
|
}
|
|
42
42
|
/**
|
|
43
43
|
* Cloudflare KV-backed cache storage implementation
|
|
44
|
-
* Implements ICacheStorage from @towns-labs/web3 for use as a
|
|
44
|
+
* Implements ICacheStorage from @towns-labs/web3 for use as a cache backend
|
|
45
45
|
*
|
|
46
46
|
* This implementation includes an optional local in-memory cache layer (enabled by default)
|
|
47
47
|
* that sits in front of KV. This is intended for use in Cloudflare Workers or similar
|
|
@@ -69,11 +69,11 @@ export declare class KVCacheStorage<V> implements ICacheStorage<V> {
|
|
|
69
69
|
}
|
|
70
70
|
/**
|
|
71
71
|
* Create a factory function that creates KV-backed cache storage instances
|
|
72
|
-
*
|
|
72
|
+
* Creates a factory function for KV-backed cache storage instances
|
|
73
73
|
*
|
|
74
74
|
* @param kv The Cloudflare or Hosting provider KV namespace
|
|
75
75
|
* @param options Optional configuration for the KV storage (e.g., disableLocalCache)
|
|
76
|
-
* @returns A factory function compatible with
|
|
76
|
+
* @returns A factory function compatible with CreateStorageFn
|
|
77
77
|
*/
|
|
78
78
|
export declare function createKVStorageFactory<V = unknown>(kv: KVNamespace, options?: Pick<KVCacheStorageConfig, 'disableLocalCache'>): CreateStorageFn<V>;
|
|
79
79
|
//# sourceMappingURL=KVCacheStorage.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"KVCacheStorage.d.ts","sourceRoot":"","sources":["../../src/cache/KVCacheStorage.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"KVCacheStorage.d.ts","sourceRoot":"","sources":["../../src/cache/KVCacheStorage.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,kBAAkB,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAKpF;;GAEG;AACH,MAAM,WAAW,oBAAqB,SAAQ,kBAAkB;IAC5D;;;;;;OAMG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAA;CAC9B;AAYD;;GAEG;AACH,MAAM,WAAW,WAAW;IACxB,GAAG,CACC,GAAG,EAAE,MAAM,EACX,OAAO,CAAC,EAAE;QAAE,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,aAAa,GAAG,QAAQ,CAAA;KAAE,GAChE,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAA;IACzB,GAAG,CACC,GAAG,EAAE,MAAM,EACX,KAAK,EAAE,MAAM,EACb,OAAO,CAAC,EAAE;QAAE,aAAa,CAAC,EAAE,MAAM,CAAC;QAAC,UAAU,CAAC,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;KAAE,GAC9E,OAAO,CAAC,IAAI,CAAC,CAAA;IAChB,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IAClC,IAAI,CAAC,OAAO,CAAC,EAAE;QAAE,MAAM,C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 +1,16 @@
|
|
|
1
|
-
import { BigNumber } from 'ethers';
|
|
2
1
|
import SuperJson from 'superjson';
|
|
3
2
|
import TTLCache from '@isaacs/ttlcache';
|
|
4
3
|
import { dlogger } from '@towns-labs/utils';
|
|
5
4
|
const logger = dlogger('web3:kvcache');
|
|
6
|
-
// Register
|
|
5
|
+
// Register bigint with SuperJSON
|
|
7
6
|
SuperJson.registerCustom({
|
|
8
|
-
isApplicable: (v) =>
|
|
9
|
-
serialize: (v) => v.
|
|
10
|
-
deserialize: (v) =>
|
|
11
|
-
}, '
|
|
12
|
-
/**
|
|
13
|
-
* Detects if a value is an ethers.js struct output (array with named properties).
|
|
14
|
-
* These are arrays that have string-keyed properties in addition to numeric indices.
|
|
15
|
-
*/
|
|
16
|
-
function isEthersStructOutput(value) {
|
|
17
|
-
if (!Array.isArray(value))
|
|
18
|
-
return false;
|
|
19
|
-
const namedKeys = Object.keys(value).filter((key) => isNaN(Number(key)));
|
|
20
|
-
return namedKeys.length > 0;
|
|
21
|
-
}
|
|
22
|
-
/**
|
|
23
|
-
* Converts ethers.js struct outputs to plain objects for proper serialization.
|
|
24
|
-
* Works recursively for nested structures.
|
|
25
|
-
*/
|
|
26
|
-
function normalizeEthersOutput(value) {
|
|
27
|
-
if (value === null || value === undefined) {
|
|
28
|
-
return value;
|
|
29
|
-
}
|
|
30
|
-
// Let SuperJson's registered BigNumber serializer handle BigNumbers
|
|
31
|
-
// BigNumber properties (_hex, _isBigNumber) are non-enumerable, so Object.entries
|
|
32
|
-
// would return an empty array and corrupt the BigNumber into {}
|
|
33
|
-
if (BigNumber.isBigNumber(value)) {
|
|
34
|
-
return value;
|
|
35
|
-
}
|
|
36
|
-
// Handle ethers struct outputs (arrays with named properties)
|
|
37
|
-
if (isEthersStructOutput(value)) {
|
|
38
|
-
const namedKeys = Object.keys(value).filter((key) => isNaN(Number(key)));
|
|
39
|
-
const obj = { __ethersStruct: true };
|
|
40
|
-
for (const key of namedKeys) {
|
|
41
|
-
obj[key] = normalizeEthersOutput(value[key]);
|
|
42
|
-
}
|
|
43
|
-
return obj;
|
|
44
|
-
}
|
|
45
|
-
// Handle regular arrays (recurse into elements)
|
|
46
|
-
if (Array.isArray(value)) {
|
|
47
|
-
return value.map(normalizeEthersOutput);
|
|
48
|
-
}
|
|
49
|
-
// Handle plain objects (recurse into values)
|
|
50
|
-
if (typeof value === 'object') {
|
|
51
|
-
const obj = {};
|
|
52
|
-
for (const [key, val] of Object.entries(value)) {
|
|
53
|
-
obj[key] = normalizeEthersOutput(val);
|
|
54
|
-
}
|
|
55
|
-
return obj;
|
|
56
|
-
}
|
|
57
|
-
// Primitives pass through unchanged
|
|
58
|
-
return value;
|
|
59
|
-
}
|
|
60
|
-
/**
|
|
61
|
-
* Restores ethers-like struct outputs from normalized objects.
|
|
62
|
-
* The restored object has both array indices and named properties.
|
|
63
|
-
*/
|
|
64
|
-
function denormalizeEthersOutput(value) {
|
|
65
|
-
if (value === null || value === undefined) {
|
|
66
|
-
return value;
|
|
67
|
-
}
|
|
68
|
-
// Preserve BigNumber objects - they've already been deserialized by SuperJson
|
|
69
|
-
// BigNumber properties are non-enumerable, so Object.entries would corrupt them
|
|
70
|
-
if (BigNumber.isBigNumber(value)) {
|
|
71
|
-
return value;
|
|
72
|
-
}
|
|
73
|
-
// Handle normalized ethers struct objects
|
|
74
|
-
if (typeof value === 'object' &&
|
|
75
|
-
!Array.isArray(value) &&
|
|
76
|
-
value.__ethersStruct === true) {
|
|
77
|
-
const valueObj = value;
|
|
78
|
-
const keys = Object.keys(valueObj).filter((k) => k !== '__ethersStruct');
|
|
79
|
-
// Create array-like object with both indices and named properties
|
|
80
|
-
const result = keys.map((key) => denormalizeEthersOutput(valueObj[key]));
|
|
81
|
-
for (let i = 0; i < keys.length; i++) {
|
|
82
|
-
result[keys[i]] = result[i];
|
|
83
|
-
}
|
|
84
|
-
return result;
|
|
85
|
-
}
|
|
86
|
-
// Handle regular arrays (recurse into elements)
|
|
87
|
-
if (Array.isArray(value)) {
|
|
88
|
-
return value.map(denormalizeEthersOutput);
|
|
89
|
-
}
|
|
90
|
-
// Handle plain objects (recurse into values)
|
|
91
|
-
if (typeof value === 'object') {
|
|
92
|
-
const obj = {};
|
|
93
|
-
for (const [key, val] of Object.entries(value)) {
|
|
94
|
-
obj[key] = denormalizeEthersOutput(val);
|
|
95
|
-
}
|
|
96
|
-
return obj;
|
|
97
|
-
}
|
|
98
|
-
// Primitives pass through unchanged
|
|
99
|
-
return value;
|
|
100
|
-
}
|
|
7
|
+
isApplicable: (v) => typeof v === 'bigint',
|
|
8
|
+
serialize: (v) => v.toString(),
|
|
9
|
+
deserialize: (v) => BigInt(v),
|
|
10
|
+
}, 'bigint');
|
|
101
11
|
/**
|
|
102
12
|
* Cloudflare KV-backed cache storage implementation
|
|
103
|
-
* Implements ICacheStorage from @towns-labs/web3 for use as a
|
|
13
|
+
* Implements ICacheStorage from @towns-labs/web3 for use as a cache backend
|
|
104
14
|
*
|
|
105
15
|
* This implementation includes an optional local in-memory cache layer (enabled by default)
|
|
106
16
|
* that sits in front of KV. This is intended for use in Cloudflare Workers or similar
|
|
@@ -156,8 +66,7 @@ export class KVCacheStorage {
|
|
|
156
66
|
void this.kv.delete(this.getKey(key));
|
|
157
67
|
return undefined;
|
|
158
68
|
}
|
|
159
|
-
|
|
160
|
-
const value = denormalizeEthersOutput(entry.value);
|
|
69
|
+
const value = entry.value;
|
|
161
70
|
// Populate local cache on successful KV fetch with remaining TTL
|
|
162
71
|
if (this.localCache) {
|
|
163
72
|
const remainingTtlMs = entry.expiresAt - Date.now();
|
|
@@ -180,10 +89,8 @@ export class KVCacheStorage {
|
|
|
180
89
|
if (this.localCache) {
|
|
181
90
|
this.localCache.set(key, value, { ttl: effectiveTtlMs });
|
|
182
91
|
}
|
|
183
|
-
// Normalize ethers.js struct outputs to plain objects for proper serialization
|
|
184
|
-
const normalizedValue = normalizeEthersOutput(value);
|
|
185
92
|
const entry = {
|
|
186
|
-
value
|
|
93
|
+
value,
|
|
187
94
|
expiresAt,
|
|
188
95
|
};
|
|
189
96
|
// KV requires minimum 60 second TTL
|
|
@@ -212,11 +119,11 @@ export class KVCacheStorage {
|
|
|
212
119
|
}
|
|
213
120
|
/**
|
|
214
121
|
* Create a factory function that creates KV-backed cache storage instances
|
|
215
|
-
*
|
|
122
|
+
* Creates a factory function for KV-backed cache storage instances
|
|
216
123
|
*
|
|
217
124
|
* @param kv The Cloudflare or Hosting provider KV namespace
|
|
218
125
|
* @param options Optional configuration for the KV storage (e.g., disableLocalCache)
|
|
219
|
-
* @returns A factory function compatible with
|
|
126
|
+
* @returns A factory function compatible with CreateStorageFn
|
|
220
127
|
*/
|
|
221
128
|
export function createKVStorageFactory(kv, options) {
|
|
222
129
|
return (config) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"KVCacheStorage.js","sourceRoot":"","sources":["../../src/cache/KVCacheStorage.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"KVCacheStorage.js","sourceRoot":"","sources":["../../src/cache/KVCacheStorage.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,WAAW,CAAA;AACjC,OAAO,QAAQ,MAAM,kBAAkB,CAAA;AAEvC,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAA;AAE3C,MAAM,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC,CAAA;AAgBtC,iCAAiC;AACjC,SAAS,CAAC,cAAc,CACpB;IACI,YAAY,EAAE,CAAC,CAAC,EAAe,EAAE,CAAC,OAAO,CAAC,KAAK,QAAQ;IACvD,SAAS,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,EAAE;IAC9B,WAAW,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC;CAChC,EACD,QAAQ,CACX,CAAA;AAiCD;;;;;;;;;GASG;AACH,MAAM,OAAO,cAAc;IACN,EAAE,CAAa;IACf,UAA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ache/Keyable.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { ethers } from 'ethers';
|
|
2
1
|
import { Permission } from '../types/ContractTypes';
|
|
3
2
|
export declare class Keyable {
|
|
4
3
|
private readonly parts;
|
|
@@ -9,8 +8,8 @@ export declare class Keyable {
|
|
|
9
8
|
static owner(spaceAddress: string): Keyable;
|
|
10
9
|
static balanceOf(accountAddress: string): Keyable;
|
|
11
10
|
static bannedTokenIds(spaceId: string): Keyable;
|
|
12
|
-
static ownerOfToken(spaceId: string, tokenId:
|
|
13
|
-
static isTokenBanned(spaceId: string, tokenId:
|
|
11
|
+
static ownerOfToken(spaceId: string, tokenId: bigint): Keyable;
|
|
12
|
+
static isTokenBanned(spaceId: string, tokenId: bigint): Keyable;
|
|
14
13
|
static entitlement(spaceId: string, channelId: string, userId: string, permission: Permission): Keyable;
|
|
15
14
|
static spaceEntitlement(spaceId: string, permission: Permission): Keyable;
|
|
16
15
|
static spaceEntitlementEvaluation(spaceId: string, rootKey: string, permission: Permission): Keyable;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Keyable.d.ts","sourceRoot":"","sources":["../../src/cache/Keyable.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"Keyable.d.ts","sourceRoot":"","sources":["../../src/cache/Keyable.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAEnD,qBAAa,OAAO;IAChB,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAW;gBAErB,GAAG,IAAI,EAAE,OAAO,EAAE;IAI9B,KAAK,IAAI,MAAM;IAiBf,MAAM,CAAC,SAAS,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO;IAI1C,MAAM,CAAC,eAAe,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO;IAIrD,MAAM,CAAC,KAAK,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO;IAI3C,MAAM,CAAC,SAAS,CAAC,cAAc,EAAE,MAAM,GAAG,OAAO;IAIjD,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO;IAI/C,MAAM,CAAC,YAAY,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO;IAI9D,MAAM,CAAC,aAAa,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO;IAI/D,MAAM,CAAC,WAAW,CACd,OAAO,EAAE,MAAM,EACf,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,UAAU,GACvB,OAAO;IAIV,MAAM,CAAC,gBAAgB,CAAC,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,UAAU,GAAG,OAAO;IAIzE,MAAM,CAAC,0BAA0B,CAC7B,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,MAAM,EACf,UAAU,EAAE,UAAU,GACvB,OAAO;IAIV,MAAM,CAAC,kBAAkB,CAAC,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,UAAU,EAAE,UAAU,GAAG,OAAO;IAI9F,MAAM,CAAC,4BAA4B,CAC/B,OAAO,EAAE,MAAM,EACf,gBAAgB,EAAE,MAAM,EACxB,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,UAAU,GACvB,OAAO;CAGb"}
|
package/dist/cache/Keyable.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { ethers } from 'ethers';
|
|
2
1
|
export class Keyable {
|
|
3
2
|
parts;
|
|
4
3
|
constructor(...args) {
|
|
@@ -11,7 +10,7 @@ export class Keyable {
|
|
|
11
10
|
return 'null';
|
|
12
11
|
if (part === undefined)
|
|
13
12
|
return 'undefined';
|
|
14
|
-
if (
|
|
13
|
+
if (typeof part === 'bigint') {
|
|
15
14
|
return part.toString();
|
|
16
15
|
}
|
|
17
16
|
if (typeof part === 'object') {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Keyable.js","sourceRoot":"","sources":["../../src/cache/Keyable.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Keyable.js","sourceRoot":"","sources":["../../src/cache/Keyable.ts"],"names":[],"mappings":"AAEA,MAAM,OAAO,OAAO;IACC,KAAK,CAAW;IAEjC,YAAY,GAAG,IAAe;QAC1B,IAAI,CAAC,KAAK,GAAG,IAAI,CAAA;IACrB,CAAC;IAED,KAAK;QACD,OAAO,IAAI,CAAC,KAAK;aACZ,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE;YACV,IAAI,IAAI,KAAK,IAAI;gBAAE,OAAO,MAAM,CAAA;YAChC,IAAI,IAAI,KAAK,SAAS;gBAAE,OAAO,WAAW,CAAA;YAC1C,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE,CAAC;gBAC3B,OAAO,IAAI,CAAC,QAAQ,EAAE,CAAA;YAC1B,CAAC;YACD,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE,CAAC;gBAC3B,OAAO,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAA;YAC/B,CAAC;YACD,+EAA+E;YAC/E,OAAO,MAAM,CAAC,IAAmD,CAAC,CAAA;QACtE,CAAC,CAAC;aACD,IAAI,CAAC,GAAG,CAAC,CAAA;IAClB,CAAC;IAED,MAAM,CAAC,SAAS,CAAC,OAAe;QAC5B,OAAO,IAAI,OAAO,CAAC,WAAW,EAAE,OAAO,CAAC,CAAA;IAC5C,CAAC;IAED,MAAM,CAAC,eAAe,CAAC,YAAoB;QACvC,OAAO,IAAI,OAAO,CAAC,iBAAiB,EAAE,YAAY,CAAC,CAAA;IACvD,CAAC;IAED,MAAM,CAAC,KAAK,CAAC,YAAoB;QAC7B,OAAO,IAAI,OAAO,CAAC,OAAO,EAAE,YAAY,CAAC,CAAA;IAC7C,CAAC;IAED,MAAM,CAAC,SAAS,CAAC,cAAsB;QACnC,OAAO,IAAI,OAAO,CAAC,WAAW,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IAC/F,CAAC;CACJ"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { type Hex } from 'viem';
|
|
2
2
|
import { Address } from '../types/ContractTypes';
|
|
3
3
|
/**
|
|
4
4
|
* https://github.com/ethereum/EIPs/blob/master/EIPS/eip-712.md
|
|
@@ -6,11 +6,21 @@ import { Address } from '../types/ContractTypes';
|
|
|
6
6
|
interface LinkedWalletValue {
|
|
7
7
|
message: string;
|
|
8
8
|
userID: Address;
|
|
9
|
-
nonce:
|
|
9
|
+
nonce: bigint;
|
|
10
|
+
}
|
|
11
|
+
interface TypedDataField {
|
|
12
|
+
name: string;
|
|
13
|
+
type: string;
|
|
14
|
+
}
|
|
15
|
+
interface TypedDataDomain {
|
|
16
|
+
name?: string;
|
|
17
|
+
version?: string;
|
|
18
|
+
chainId?: number | bigint;
|
|
19
|
+
verifyingContract?: Address;
|
|
10
20
|
}
|
|
11
21
|
interface Eip712LinkedWalletArgs {
|
|
12
22
|
domain: TypedDataDomain;
|
|
13
|
-
nonce:
|
|
23
|
+
nonce: bigint;
|
|
14
24
|
userID: Address;
|
|
15
25
|
message: string;
|
|
16
26
|
}
|
|
@@ -19,8 +29,8 @@ export declare function createEip712LinkedWalletdData({ domain, userID, nonce, m
|
|
|
19
29
|
domain: TypedDataDomain;
|
|
20
30
|
value: LinkedWalletValue;
|
|
21
31
|
};
|
|
22
|
-
export declare function getDomainSeparator(domain: TypedDataDomain):
|
|
23
|
-
export declare function toLinkedWalletHash(message: string, address: string, nonce:
|
|
32
|
+
export declare function getDomainSeparator(domain: TypedDataDomain): Hex;
|
|
33
|
+
export declare function toLinkedWalletHash(message: string, address: string, nonce: bigint): Hex;
|
|
24
34
|
/**
|
|
25
35
|
* @dev Returns the keccak256 digest of an EIP-712 typed data (EIP-191 version `0x01`).
|
|
26
36
|
*
|
|
@@ -30,6 +40,6 @@ export declare function toLinkedWalletHash(message: string, address: string, non
|
|
|
30
40
|
*
|
|
31
41
|
* See {ECDSA-recover}.
|
|
32
42
|
*/
|
|
33
|
-
export declare function toTypedDataHash(domain: TypedDataDomain, structHash:
|
|
43
|
+
export declare function toTypedDataHash(domain: TypedDataDomain, structHash: Hex): Hex;
|
|
34
44
|
export {};
|
|
35
45
|
//# sourceMappingURL=EIP-712.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EIP-712.d.ts","sourceRoot":"","sources":["../../src/eip-712/EIP-712.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"EIP-712.d.ts","sourceRoot":"","sources":["../../src/eip-712/EIP-712.ts"],"names":[],"mappings":"AAAA,OAAO,EAA6D,KAAK,GAAG,EAAE,MAAM,MAAM,CAAA;AAC1F,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAA;AAEhD;;KAEK;AACL,UAAU,iBAAiB;IACvB,OAAO,EAAE,MAAM,CAAA;IACf,MAAM,EAAE,OAAO,CAAA;IACf,KAAK,EAAE,MAAM,CAAA;CAChB;AAED,UAAU,cAAc;IACpB,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;CACf;AAED,UAAU,eAAe;IACrB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IACzB,iBAAiB,CAAC,EAAE,OAAO,CAAA;CAC9B;AAED,UAAU,sBAAsB;IAC5B,MAAM,EAAE,eAAe,CAAA;IACvB,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,OAAO,CAAA;IACf,OAAO,EAAE,MAAM,CAAA;CAClB;AAED,wBAAgB,6BAA6B,CAAC,EAC1C,MAAM,EACN,MAAM,EACN,KAAK,EACL,OAAO,GACV,EAAE,sBAAsB;;;;EAqBxB;AAED,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,eAAe,GAAG,GAAG,CA+B/D;AAED,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,GAAG,CAavF;AAED;;;;;;;;GAQG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,eAAe,EAAE,UAAU,EAAE,GAAG,GAAG,GAAG,CAO7E"}
|
package/dist/eip-712/EIP-712.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { encodeAbiParameters, encodePacked, keccak256, stringToHex } from 'viem';
|
|
2
2
|
export function createEip712LinkedWalletdData({ domain, userID, nonce, message, }) {
|
|
3
3
|
// should match the types and order of _LINKED_WALLET_TYPEHASH in
|
|
4
4
|
// river/contracts/src/factory/facets/wallet-link/WalletLinkBase.sol
|
|
@@ -24,20 +24,32 @@ export function createEip712LinkedWalletdData({ domain, userID, nonce, message,
|
|
|
24
24
|
export function getDomainSeparator(domain) {
|
|
25
25
|
// this hash should match _TYPE_HASH
|
|
26
26
|
// in river/contracts/src/diamond/utils/cryptography/signature/EIP712Base.sol
|
|
27
|
-
const DOMAIN_TYPE_HASH = keccak256(
|
|
27
|
+
const DOMAIN_TYPE_HASH = keccak256(stringToHex('EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)'));
|
|
28
28
|
// Compute the keccak256 hash of the name and version
|
|
29
|
-
const nameHash = keccak256(
|
|
30
|
-
const versionHash = keccak256(
|
|
29
|
+
const nameHash = keccak256(stringToHex(domain.name ?? ''));
|
|
30
|
+
const versionHash = keccak256(stringToHex(domain.version ?? ''));
|
|
31
31
|
// Encode the data
|
|
32
|
-
const encodedData =
|
|
32
|
+
const encodedData = encodeAbiParameters([
|
|
33
|
+
{ type: 'bytes32' },
|
|
34
|
+
{ type: 'bytes32' },
|
|
35
|
+
{ type: 'bytes32' },
|
|
36
|
+
{ type: 'uint256' },
|
|
37
|
+
{ type: 'address' },
|
|
38
|
+
], [
|
|
39
|
+
DOMAIN_TYPE_HASH,
|
|
40
|
+
nameHash,
|
|
41
|
+
versionHash,
|
|
42
|
+
BigInt(domain.chainId ?? 0),
|
|
43
|
+
domain.verifyingContract ?? '0x0000000000000000000000000000000000000000',
|
|
44
|
+
]);
|
|
33
45
|
// Compute the keccak256 hash of the encoded data
|
|
34
46
|
return keccak256(encodedData);
|
|
35
47
|
}
|
|
36
48
|
export function toLinkedWalletHash(message, address, nonce) {
|
|
37
49
|
// this hash should match _LINKED_WALLET_TYPEHASH in
|
|
38
50
|
// river/contracts/src/factory/facets/wallet-link/WalletLinkBase.sol
|
|
39
|
-
const LINKED_WALLET_TYPE_HASH = keccak256(
|
|
40
|
-
const structHash = keccak256(
|
|
51
|
+
const LINKED_WALLET_TYPE_HASH = keccak256(stringToHex('LinkedWallet(string message,address userID,uint256 nonce)'));
|
|
52
|
+
const structHash = keccak256(encodeAbiParameters([{ type: 'bytes32' }, { type: 'string' }, { type: 'address' }, { type: 'uint256' }], [LINKED_WALLET_TYPE_HASH, message, address, nonce]));
|
|
41
53
|
return structHash;
|
|
42
54
|
}
|
|
43
55
|
/**
|
|
@@ -51,7 +63,7 @@ export function toLinkedWalletHash(message, address, nonce) {
|
|
|
51
63
|
*/
|
|
52
64
|
export function toTypedDataHash(domain, structHash) {
|
|
53
65
|
const domainSeparator = getDomainSeparator(domain);
|
|
54
|
-
const encodedData =
|
|
66
|
+
const encodedData = encodePacked(['bytes2', 'bytes32', 'bytes32'], ['0x1901', domainSeparator, structHash]);
|
|
55
67
|
return keccak256(encodedData);
|
|
56
68
|
}
|
|
57
69
|
//# sourceMappingURL=EIP-712.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EIP-712.js","sourceRoot":"","sources":["../../src/eip-712/EIP-712.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"EIP-712.js","sourceRoot":"","sources":["../../src/eip-712/EIP-712.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,YAAY,EAAE,SAAS,EAAE,WAAW,EA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AAC,CAAC;QAC3B,MAAM,CAAC,iBAAiB,IAAI,4CAA4C;KAC3E,CACJ,CAAA;IAED,iDAAiD;IACjD,OAAO,SAAS,CAAC,WAAW,CAAC,CAAA;AACjC,CAAC;AAED,MAAM,UAAU,kBAAkB,CAAC,OAAe,EAAE,OAAe,EAAE,KAAa;IAC9E,oDAAoD;IACpD,oEAAoE;IACpE,MAAM,uBAAuB,GAAG,SAAS,CACrC,WAAW,CAAC,2DAA2D,CAAC,CAC3E,CAAA;IACD,MAAM,UAAU,GAAG,SAAS,CACxB,mBAAmB,CACf,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC,EACnF,CAAC,uBAAuB,EAAE,OAAO,EAAE,OAAkB,EAAE,KAAK,CAAC,CAChE,CACJ,CAAA;IACD,OAAO,UAAU,CAAA;AACrB,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,eAAe,CAAC,MAAuB,EAAE,UAAe;IACpE,MAAM,eAAe,GAAG,kBAAkB,CAAC,MAAM,CAAC,CAAA;IAClD,MAAM,WAAW,GAAG,YAAY,CAC5B,CAAC,QAAQ,EAAE,SAAS,EAAE,SAAS,CAAC,EAChC,CAAC,QAAQ,EAAE,eAAe,EAAE,UAAU,CAAC,CAC1C,CAAA;IACD,OAAO,SAAS,CAAC,WAAW,CAAC,CAAA;AACjC,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,22 +1,3 @@
|
|
|
1
|
-
/**************************************************************************
|
|
2
|
-
* This file is generated by running 🏕️ scripts/generate_sdk_index.sh 🏕️ *
|
|
3
|
-
**************************************************************************/
|
|
4
|
-
export * from './BaseContractShim';
|
|
5
|
-
export * from './airdrop/IDropFacetShim';
|
|
6
|
-
export * from './airdrop/IRiverPointsShim';
|
|
7
|
-
export * from './airdrop/RiverAirdropDapp';
|
|
8
|
-
export * from './app-registry/AppRegistryDapp';
|
|
9
|
-
export * from './app-registry/IAppFactoryShim';
|
|
10
|
-
export * from './app-registry/IAppInstallerShim';
|
|
11
|
-
export * from './app-registry/IAppRegistryShim';
|
|
12
|
-
export * from './app-registry/IIdentityRegistryShim';
|
|
13
|
-
export * from './app-registry/IReputationRegistryShim';
|
|
14
|
-
export * from './app-registry/SimpleAppShim';
|
|
15
|
-
export * from './base-registry/BaseRegistry';
|
|
16
|
-
export * from './base-registry/IEntitlementCheckerShim';
|
|
17
|
-
export * from './base-registry/INodeOperatorShim';
|
|
18
|
-
export * from './base-registry/ISpaceDelegationShim';
|
|
19
|
-
export * from './base-registry/RewardsDistributionShim';
|
|
20
1
|
export * from './cache/EntitlementCache';
|
|
21
2
|
export * from './cache/ICacheStorage';
|
|
22
3
|
export * from './cache/Keyable';
|
|
@@ -24,73 +5,17 @@ export * from './cache/KVCacheStorage';
|
|
|
24
5
|
export * from './cache/SimpleCache';
|
|
25
6
|
export * from './cache/TTLCacheStorage';
|
|
26
7
|
export * from './chain';
|
|
27
|
-
export * from './delegate-registry/DelegateRegistry';
|
|
28
8
|
export * from './eip-712/EIP-712';
|
|
29
|
-
export * from './erc-721/IERC721AQueryableShim';
|
|
30
|
-
export * from './erc-721/IERC721AShim';
|
|
31
|
-
export * from './platform-requirements/PlatformRequirements';
|
|
32
|
-
export * from './pricing-modules/IPricingShim';
|
|
33
|
-
export * from './pricing-modules/PricingModules';
|
|
34
|
-
export * from './pricing-modules/helpers';
|
|
35
|
-
export * from './readContractRetryer';
|
|
36
|
-
export * from './river-registry/IOperatorRegistryShim';
|
|
37
|
-
export * from './river-registry/IStreamRegistryShim';
|
|
38
|
-
export * from './river-registry/RiverRegistry';
|
|
39
|
-
export * from './river-registry/RiverRegistryFactory';
|
|
40
|
-
export * from './space-dapp/SpaceDapp';
|
|
41
|
-
export * from './space-dapp/SpaceDappFactory';
|
|
42
|
-
export * from './space-dapp/wrapTransaction';
|
|
43
|
-
export * from './space-owner/GuardianFacetShim';
|
|
44
|
-
export * from './space-owner/SpaceOwner';
|
|
45
|
-
export * from './space-registrar/ICreateSpaceShim';
|
|
46
|
-
export * from './space-registrar/ILegacySpaceArchitectShim';
|
|
47
|
-
export * from './space-registrar/ISpaceArchitectShim';
|
|
48
|
-
export * from './space-registrar/SpaceRegistrar';
|
|
49
|
-
export * from './space/IAppAccountShim';
|
|
50
|
-
export * from './space/IBanningShim';
|
|
51
|
-
export * from './space/IChannelShim';
|
|
52
|
-
export * from './space/IEntitlementDataQueryableShim';
|
|
53
|
-
export * from './space/IEntitlementsShim';
|
|
54
|
-
export * from './space/IMembershipMetadataShim';
|
|
55
|
-
export * from './space/IMembershipShim';
|
|
56
|
-
export * from './space/IMulticallShim';
|
|
57
|
-
export * from './space/IReviewShim';
|
|
58
|
-
export * from './space/IRolesShim';
|
|
59
|
-
export * from './space/ITippingShim';
|
|
60
|
-
export * from './space/ITreasuryShim';
|
|
61
|
-
export * from './space/OwnableFacetShim';
|
|
62
|
-
export * from './space/Space';
|
|
63
|
-
export * from './space/TokenPausableFacetShim';
|
|
64
|
-
export * from './space/entitlements/ConvertersEntitlements';
|
|
65
|
-
export * from './space/entitlements/RuleBuilder';
|
|
66
|
-
export * from './space/entitlements/RuleEntitlementShim';
|
|
67
|
-
export * from './space/entitlements/RuleEntitlementV2Shim';
|
|
68
|
-
export * from './space/entitlements/UserEntitlementShim';
|
|
69
|
-
export * from './space/entitlements/entitlement';
|
|
70
|
-
export * from './space/entitlements/XChainConfig';
|
|
71
|
-
export * from './space/entitlements/validateAndParseXChainConfig';
|
|
72
|
-
export * from './test-helpers/LocalhostWeb3Provider';
|
|
73
|
-
export * from './test-helpers/MockCrossChainEntitlement';
|
|
74
9
|
export * from './test-helpers/MockERC1155';
|
|
75
10
|
export * from './test-helpers/MockERC20';
|
|
76
11
|
export * from './test-helpers/MockERC721A';
|
|
77
|
-
export * from './test-helpers/MockERC721AShim';
|
|
78
|
-
export * from './test-helpers/TestCrossChainEntitlement';
|
|
79
12
|
export * from './test-helpers/TestEthBalance';
|
|
80
|
-
export * from './test-helpers/TestGatingERC1155';
|
|
81
|
-
export * from './test-helpers/TestGatingERC20';
|
|
82
|
-
export * from './test-helpers/TestGatingNFT';
|
|
83
|
-
export * from './test-helpers/TestGatingUtils';
|
|
84
|
-
export * from './test-helpers/utils';
|
|
85
|
-
export * from './towns-token/TownsToken';
|
|
86
13
|
export * from './types/ContractTypes';
|
|
87
14
|
export * from './types/error-types';
|
|
88
|
-
export * from './types/typechain';
|
|
89
15
|
export * from './types/types';
|
|
90
|
-
export * from './utils/ContractHelpers';
|
|
91
16
|
export * from './utils/Web3Constants';
|
|
92
17
|
export * from './utils/ut';
|
|
93
18
|
export * from './utils/web3Env';
|
|
94
|
-
export * from './
|
|
95
|
-
export * from './
|
|
19
|
+
export * from './utils/xchain';
|
|
20
|
+
export * from './web3Types';
|
|
96
21
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAA;AACxC,cAAc,uBAAuB,CAAA;AACrC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,wBAAwB,CAAA;AACtC,cAAc,qBAAqB,CAAA;AACnC,cAAc,yBAAyB,CAAA;AACvC,cAAc,SAAS,CAAA;AACvB,cAAc,mBAAmB,CAAA;AACjC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,0BAA0B,CAAA;AACxC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,+BAA+B,CAAA;AAC7C,cAAc,uBAAuB,CAAA;AACrC,cAAc,qBAAqB,CAAA;AACnC,cAAc,eAAe,CAAA;AAC7B,cAAc,uBAAuB,CAAA;AACrC,cAAc,YAAY,CAAA;AAC1B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,aAAa,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -1,22 +1,3 @@
|
|
|
1
|
-
/**************************************************************************
|
|
2
|
-
* This file is generated by running 🏕️ scripts/generate_sdk_index.sh 🏕️ *
|
|
3
|
-
**************************************************************************/
|
|
4
|
-
export * from './BaseContractShim';
|
|
5
|
-
export * from './airdrop/IDropFacetShim';
|
|
6
|
-
export * from './airdrop/IRiverPointsShim';
|
|
7
|
-
export * from './airdrop/RiverAirdropDapp';
|
|
8
|
-
export * from './app-registry/AppRegistryDapp';
|
|
9
|
-
export * from './app-registry/IAppFactoryShim';
|
|
10
|
-
export * from './app-registry/IAppInstallerShim';
|
|
11
|
-
export * from './app-registry/IAppRegistryShim';
|
|
12
|
-
export * from './app-registry/IIdentityRegistryShim';
|
|
13
|
-
export * from './app-registry/IReputationRegistryShim';
|
|
14
|
-
export * from './app-registry/SimpleAppShim';
|
|
15
|
-
export * from './base-registry/BaseRegistry';
|
|
16
|
-
export * from './base-registry/IEntitlementCheckerShim';
|
|
17
|
-
export * from './base-registry/INodeOperatorShim';
|
|
18
|
-
export * from './base-registry/ISpaceDelegationShim';
|
|
19
|
-
export * from './base-registry/RewardsDistributionShim';
|
|
20
1
|
export * from './cache/EntitlementCache';
|
|
21
2
|
export * from './cache/ICacheStorage';
|
|
22
3
|
export * from './cache/Keyable';
|
|
@@ -24,73 +5,17 @@ export * from './cache/KVCacheStorage';
|
|
|
24
5
|
export * from './cache/SimpleCache';
|
|
25
6
|
export * from './cache/TTLCacheStorage';
|
|
26
7
|
export * from './chain';
|
|
27
|
-
export * from './delegate-registry/DelegateRegistry';
|
|
28
8
|
export * from './eip-712/EIP-712';
|
|
29
|
-
export * from './erc-721/IERC721AQueryableShim';
|
|
30
|
-
export * from './erc-721/IERC721AShim';
|
|
31
|
-
export * from './platform-requirements/PlatformRequirements';
|
|
32
|
-
export * from './pricing-modules/IPricingShim';
|
|
33
|
-
export * from './pricing-modules/PricingModules';
|
|
34
|
-
export * from './pricing-modules/helpers';
|
|
35
|
-
export * from './readContractRetryer';
|
|
36
|
-
export * from './river-registry/IOperatorRegistryShim';
|
|
37
|
-
export * from './river-registry/IStreamRegistryShim';
|
|
38
|
-
export * from './river-registry/RiverRegistry';
|
|
39
|
-
export * from './river-registry/RiverRegistryFactory';
|
|
40
|
-
export * from './space-dapp/SpaceDapp';
|
|
41
|
-
export * from './space-dapp/SpaceDappFactory';
|
|
42
|
-
export * from './space-dapp/wrapTransaction';
|
|
43
|
-
export * from './space-owner/GuardianFacetShim';
|
|
44
|
-
export * from './space-owner/SpaceOwner';
|
|
45
|
-
export * from './space-registrar/ICreateSpaceShim';
|
|
46
|
-
export * from './space-registrar/ILegacySpaceArchitectShim';
|
|
47
|
-
export * from './space-registrar/ISpaceArchitectShim';
|
|
48
|
-
export * from './space-registrar/SpaceRegistrar';
|
|
49
|
-
export * from './space/IAppAccountShim';
|
|
50
|
-
export * from './space/IBanningShim';
|
|
51
|
-
export * from './space/IChannelShim';
|
|
52
|
-
export * from './space/IEntitlementDataQueryableShim';
|
|
53
|
-
export * from './space/IEntitlementsShim';
|
|
54
|
-
export * from './space/IMembershipMetadataShim';
|
|
55
|
-
export * from './space/IMembershipShim';
|
|
56
|
-
export * from './space/IMulticallShim';
|
|
57
|
-
export * from './space/IReviewShim';
|
|
58
|
-
export * from './space/IRolesShim';
|
|
59
|
-
export * from './space/ITippingShim';
|
|
60
|
-
export * from './space/ITreasuryShim';
|
|
61
|
-
export * from './space/OwnableFacetShim';
|
|
62
|
-
export * from './space/Space';
|
|
63
|
-
export * from './space/TokenPausableFacetShim';
|
|
64
|
-
export * from './space/entitlements/ConvertersEntitlements';
|
|
65
|
-
export * from './space/entitlements/RuleBuilder';
|
|
66
|
-
export * from './space/entitlements/RuleEntitlementShim';
|
|
67
|
-
export * from './space/entitlements/RuleEntitlementV2Shim';
|
|
68
|
-
export * from './space/entitlements/UserEntitlementShim';
|
|
69
|
-
export * from './space/entitlements/entitlement';
|
|
70
|
-
export * from './space/entitlements/XChainConfig';
|
|
71
|
-
export * from './space/entitlements/validateAndParseXChainConfig';
|
|
72
|
-
export * from './test-helpers/LocalhostWeb3Provider';
|
|
73
|
-
export * from './test-helpers/MockCrossChainEntitlement';
|
|
74
9
|
export * from './test-helpers/MockERC1155';
|
|
75
10
|
export * from './test-helpers/MockERC20';
|
|
76
11
|
export * from './test-helpers/MockERC721A';
|
|
77
|
-
export * from './test-helpers/MockERC721AShim';
|
|
78
|
-
export * from './test-helpers/TestCrossChainEntitlement';
|
|
79
12
|
export * from './test-helpers/TestEthBalance';
|
|
80
|
-
export * from './test-helpers/TestGatingERC1155';
|
|
81
|
-
export * from './test-helpers/TestGatingERC20';
|
|
82
|
-
export * from './test-helpers/TestGatingNFT';
|
|
83
|
-
export * from './test-helpers/TestGatingUtils';
|
|
84
|
-
export * from './test-helpers/utils';
|
|
85
|
-
export * from './towns-token/TownsToken';
|
|
86
13
|
export * from './types/ContractTypes';
|
|
87
14
|
export * from './types/error-types';
|
|
88
|
-
export * from './types/typechain';
|
|
89
15
|
export * from './types/types';
|
|
90
|
-
export * from './utils/ContractHelpers';
|
|
91
16
|
export * from './utils/Web3Constants';
|
|
92
17
|
export * from './utils/ut';
|
|
93
18
|
export * from './utils/web3Env';
|
|
94
|
-
export * from './
|
|
95
|
-
export * from './
|
|
19
|
+
export * from './utils/xchain';
|
|
20
|
+
export * from './web3Types';
|
|
96
21
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAA;AACxC,cAAc,uBAAuB,CAAA;AACrC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,wBAAwB,CAAA;AACtC,cAAc,qBAAqB,CAAA;AACnC,cAAc,yBAAyB,CAAA;AACvC,cAAc,SAAS,CAAA;AACvB,cAAc,mBAAmB,CAAA;AACjC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,0BAA0B,CAAA;AACxC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,+BAA+B,CAAA;AAC7C,cAAc,uBAAuB,CAAA;AACrC,cAAc,qBAAqB,CAAA;AACnC,cAAc,eAAe,CAAA;AAC7B,cAAc,uBAAuB,CAAA;AACrC,cAAc,YAAY,CAAA;AAC1B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,aAAa,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MockERC1155.d.ts","sourceRoot":"","sources":["../../src/test-helpers/MockERC1155.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"MockERC1155.d.ts","sourceRoot":"","sources":["../../src/test-helpers/MockERC1155.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,MAAM,CAAA;AAugB/B,eAAO,MAAM,WAAW;;;CAGvB,CAAA"}
|