@superfluid-finance/sdk-redux 0.1.1-dev.e0742d5.0 → 0.2.1-dev.da50fa8.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/CHANGELOG.md +28 -0
- package/README.md +47 -44
- package/dist/main/index.d.ts +13 -0
- package/dist/main/index.d.ts.map +1 -0
- package/dist/main/index.js +37 -0
- package/dist/main/index.js.map +1 -0
- package/{build → dist}/main/redux-slices/argTypes.d.ts +11 -13
- package/dist/main/redux-slices/argTypes.d.ts.map +1 -0
- package/dist/main/redux-slices/argTypes.js +3 -0
- package/dist/main/redux-slices/argTypes.js.map +1 -0
- package/{build → dist}/main/redux-slices/rtk-query/cacheTags/CacheTagTypes.d.ts +1 -0
- package/dist/main/redux-slices/rtk-query/cacheTags/CacheTagTypes.d.ts.map +1 -0
- package/dist/main/redux-slices/rtk-query/cacheTags/CacheTagTypes.js +18 -0
- package/dist/main/redux-slices/rtk-query/cacheTags/CacheTagTypes.js.map +1 -0
- package/{build → dist}/main/redux-slices/rtk-query/cacheTags/eventTags.d.ts +1 -0
- package/dist/main/redux-slices/rtk-query/cacheTags/eventTags.d.ts.map +1 -0
- package/dist/main/redux-slices/rtk-query/cacheTags/eventTags.js +12 -0
- package/dist/main/redux-slices/rtk-query/cacheTags/eventTags.js.map +1 -0
- package/{build → dist}/main/redux-slices/rtk-query/cacheTags/indexTags.d.ts +2 -1
- package/dist/main/redux-slices/rtk-query/cacheTags/indexTags.d.ts.map +1 -0
- package/dist/main/redux-slices/rtk-query/cacheTags/indexTags.js +31 -0
- package/dist/main/redux-slices/rtk-query/cacheTags/indexTags.js.map +1 -0
- package/{build → dist}/main/redux-slices/rtk-query/cacheTags/invalidateCacheTagsForEvents.d.ts +1 -0
- package/dist/main/redux-slices/rtk-query/cacheTags/invalidateCacheTagsForEvents.d.ts.map +1 -0
- package/{build → dist}/main/redux-slices/rtk-query/cacheTags/invalidateCacheTagsForEvents.js +5 -7
- package/dist/main/redux-slices/rtk-query/cacheTags/invalidateCacheTagsForEvents.js.map +1 -0
- package/{build/module → dist/main}/redux-slices/rtk-query/cacheTags/monitorAddressForNextEventToInvalidateCache.d.ts +1 -0
- package/dist/main/redux-slices/rtk-query/cacheTags/monitorAddressForNextEventToInvalidateCache.d.ts.map +1 -0
- package/dist/main/redux-slices/rtk-query/cacheTags/monitorAddressForNextEventToInvalidateCache.js +21 -0
- package/dist/main/redux-slices/rtk-query/cacheTags/monitorAddressForNextEventToInvalidateCache.js.map +1 -0
- package/{build/module → dist/main}/redux-slices/rtk-query/cacheTags/streamTags.d.ts +2 -1
- package/dist/main/redux-slices/rtk-query/cacheTags/streamTags.d.ts.map +1 -0
- package/dist/main/redux-slices/rtk-query/cacheTags/streamTags.js +30 -0
- package/dist/main/redux-slices/rtk-query/cacheTags/streamTags.js.map +1 -0
- package/{build/module → dist/main}/redux-slices/rtk-query/cacheTags/tokenTags.d.ts +2 -1
- package/dist/main/redux-slices/rtk-query/cacheTags/tokenTags.d.ts.map +1 -0
- package/dist/main/redux-slices/rtk-query/cacheTags/tokenTags.js +30 -0
- package/dist/main/redux-slices/rtk-query/cacheTags/tokenTags.js.map +1 -0
- package/dist/main/redux-slices/rtk-query/cacheTime.d.ts +9 -0
- package/dist/main/redux-slices/rtk-query/cacheTime.d.ts.map +1 -0
- package/dist/main/redux-slices/rtk-query/cacheTime.js +13 -0
- package/dist/main/redux-slices/rtk-query/cacheTime.js.map +1 -0
- package/dist/main/redux-slices/rtk-query/createApiWithReactHooks.d.ts +7 -0
- package/dist/main/redux-slices/rtk-query/createApiWithReactHooks.d.ts.map +1 -0
- package/dist/main/redux-slices/rtk-query/createApiWithReactHooks.js +11 -0
- package/dist/main/redux-slices/rtk-query/createApiWithReactHooks.js.map +1 -0
- package/dist/main/redux-slices/rtk-query/createApiWithoutReactHooks.d.ts +7 -0
- package/dist/main/redux-slices/rtk-query/createApiWithoutReactHooks.d.ts.map +1 -0
- package/dist/main/redux-slices/rtk-query/createApiWithoutReactHooks.js +11 -0
- package/dist/main/redux-slices/rtk-query/createApiWithoutReactHooks.js.map +1 -0
- package/dist/main/redux-slices/rtk-query/getSerializeQueryArgs.d.ts +3 -0
- package/dist/main/redux-slices/rtk-query/getSerializeQueryArgs.d.ts.map +1 -0
- package/dist/main/redux-slices/rtk-query/getSerializeQueryArgs.js +40 -0
- package/dist/main/redux-slices/rtk-query/getSerializeQueryArgs.js.map +1 -0
- package/dist/main/redux-slices/rtk-query/mutations/addMutationEndpoints.d.ts +21 -0
- package/dist/main/redux-slices/rtk-query/mutations/addMutationEndpoints.d.ts.map +1 -0
- package/dist/main/redux-slices/rtk-query/mutations/addMutationEndpoints.js +409 -0
- package/dist/main/redux-slices/rtk-query/mutations/addMutationEndpoints.js.map +1 -0
- package/dist/main/redux-slices/rtk-query/mutations/mutations.d.ts +140 -0
- package/dist/main/redux-slices/rtk-query/mutations/mutations.d.ts.map +1 -0
- package/dist/main/redux-slices/rtk-query/mutations/mutations.js +3 -0
- package/dist/main/redux-slices/rtk-query/mutations/mutations.js.map +1 -0
- package/dist/main/redux-slices/rtk-query/queries/addQueryEndpoints.d.ts +16 -0
- package/dist/main/redux-slices/rtk-query/queries/addQueryEndpoints.d.ts.map +1 -0
- package/dist/main/redux-slices/rtk-query/queries/addQueryEndpoints.js +280 -0
- package/dist/main/redux-slices/rtk-query/queries/addQueryEndpoints.js.map +1 -0
- package/dist/main/redux-slices/rtk-query/queries/queries.d.ts +56 -0
- package/dist/main/redux-slices/rtk-query/queries/queries.d.ts.map +1 -0
- package/dist/main/redux-slices/rtk-query/queries/queries.js +3 -0
- package/dist/main/redux-slices/rtk-query/queries/queries.js.map +1 -0
- package/dist/main/redux-slices/rtk-query/returnTypes.d.ts +16 -0
- package/dist/main/redux-slices/rtk-query/returnTypes.d.ts.map +1 -0
- package/dist/main/redux-slices/rtk-query/returnTypes.js +3 -0
- package/dist/main/redux-slices/rtk-query/returnTypes.js.map +1 -0
- package/dist/main/redux-slices/rtk-query/sfApiSlice.d.ts +33 -0
- package/dist/main/redux-slices/rtk-query/sfApiSlice.d.ts.map +1 -0
- package/dist/main/redux-slices/rtk-query/sfApiSlice.js +25 -0
- package/dist/main/redux-slices/rtk-query/sfApiSlice.js.map +1 -0
- package/dist/main/redux-slices/rtk-query/sfApiSliceInferredType.d.ts +3 -0
- package/dist/main/redux-slices/rtk-query/sfApiSliceInferredType.d.ts.map +1 -0
- package/dist/main/redux-slices/rtk-query/sfApiSliceInferredType.js +3 -0
- package/dist/main/redux-slices/rtk-query/sfApiSliceInferredType.js.map +1 -0
- package/dist/main/redux-slices/rtk-query/subgraph-slice/allSubgraphSliceEndpoints.d.ts +106 -0
- package/dist/main/redux-slices/rtk-query/subgraph-slice/allSubgraphSliceEndpoints.d.ts.map +1 -0
- package/dist/main/redux-slices/rtk-query/subgraph-slice/allSubgraphSliceEndpoints.js +14 -0
- package/dist/main/redux-slices/rtk-query/subgraph-slice/allSubgraphSliceEndpoints.js.map +1 -0
- package/dist/main/redux-slices/rtk-query/subgraph-slice/createEntityQueryEndpoints.d.ts +72 -0
- package/dist/main/redux-slices/rtk-query/subgraph-slice/createEntityQueryEndpoints.d.ts.map +1 -0
- package/dist/main/redux-slices/rtk-query/subgraph-slice/createEntityQueryEndpoints.js +62 -0
- package/dist/main/redux-slices/rtk-query/subgraph-slice/createEntityQueryEndpoints.js.map +1 -0
- package/dist/main/redux-slices/rtk-query/subgraph-slice/createEventQueryEndpoints.d.ts +40 -0
- package/dist/main/redux-slices/rtk-query/subgraph-slice/createEventQueryEndpoints.d.ts.map +1 -0
- package/dist/main/redux-slices/rtk-query/subgraph-slice/createEventQueryEndpoints.js +52 -0
- package/dist/main/redux-slices/rtk-query/subgraph-slice/createEventQueryEndpoints.js.map +1 -0
- package/dist/main/redux-slices/rtk-query/subgraph-slice/customSubgraphQuery.d.ts +16 -0
- package/dist/main/redux-slices/rtk-query/subgraph-slice/customSubgraphQuery.d.ts.map +1 -0
- package/dist/main/redux-slices/rtk-query/subgraph-slice/customSubgraphQuery.js +16 -0
- package/dist/main/redux-slices/rtk-query/subgraph-slice/customSubgraphQuery.js.map +1 -0
- package/dist/main/redux-slices/rtk-query/subgraph-slice/entityQueryArgs.d.ts +50 -0
- package/dist/main/redux-slices/rtk-query/subgraph-slice/entityQueryArgs.d.ts.map +1 -0
- package/dist/main/redux-slices/rtk-query/subgraph-slice/entityQueryArgs.js +3 -0
- package/dist/main/redux-slices/rtk-query/subgraph-slice/entityQueryArgs.js.map +1 -0
- package/dist/main/redux-slices/rtk-query/subgraph-slice/eventQueryArgs.d.ts +26 -0
- package/dist/main/redux-slices/rtk-query/subgraph-slice/eventQueryArgs.d.ts.map +1 -0
- package/dist/main/redux-slices/rtk-query/subgraph-slice/eventQueryArgs.js +3 -0
- package/dist/main/redux-slices/rtk-query/subgraph-slice/eventQueryArgs.js.map +1 -0
- package/dist/main/redux-slices/rtk-query/subgraph-slice/provideCacheTagsFromRelevantAddresses.d.ts +7 -0
- package/dist/main/redux-slices/rtk-query/subgraph-slice/provideCacheTagsFromRelevantAddresses.d.ts.map +1 -0
- package/dist/main/redux-slices/rtk-query/subgraph-slice/provideCacheTagsFromRelevantAddresses.js +29 -0
- package/dist/main/redux-slices/rtk-query/subgraph-slice/provideCacheTagsFromRelevantAddresses.js.map +1 -0
- package/dist/main/redux-slices/rtk-query/subgraph-slice/sfSubgraphSliceInferredType.d.ts +3 -0
- package/dist/main/redux-slices/rtk-query/subgraph-slice/sfSubgraphSliceInferredType.d.ts.map +1 -0
- package/dist/main/redux-slices/rtk-query/subgraph-slice/sfSubgraphSliceInferredType.js +3 -0
- package/dist/main/redux-slices/rtk-query/subgraph-slice/sfSubgraphSliceInferredType.js.map +1 -0
- package/dist/main/redux-slices/rtk-query/subgraph-slice/subgraphSlice.d.ts +22 -0
- package/dist/main/redux-slices/rtk-query/subgraph-slice/subgraphSlice.d.ts.map +1 -0
- package/dist/main/redux-slices/rtk-query/subgraph-slice/subgraphSlice.js +37 -0
- package/dist/main/redux-slices/rtk-query/subgraph-slice/subgraphSlice.js.map +1 -0
- package/dist/main/redux-slices/transactions/createTransactionSlice.d.ts +12 -0
- package/dist/main/redux-slices/transactions/createTransactionSlice.d.ts.map +1 -0
- package/dist/main/redux-slices/transactions/createTransactionSlice.js +15 -0
- package/dist/main/redux-slices/transactions/createTransactionSlice.js.map +1 -0
- package/{build/module → dist/main}/redux-slices/transactions/registerNewTransaction.d.ts +1 -0
- package/dist/main/redux-slices/transactions/registerNewTransaction.d.ts.map +1 -0
- package/dist/main/redux-slices/transactions/registerNewTransaction.js +33 -0
- package/dist/main/redux-slices/transactions/registerNewTransaction.js.map +1 -0
- package/{build/module → dist/main}/redux-slices/transactions/trackTransaction.d.ts +1 -0
- package/dist/main/redux-slices/transactions/trackTransaction.d.ts.map +1 -0
- package/dist/main/redux-slices/transactions/trackTransaction.js +64 -0
- package/dist/main/redux-slices/transactions/trackTransaction.js.map +1 -0
- package/dist/main/redux-slices/transactions/trackedTransaction.d.ts +12 -0
- package/dist/main/redux-slices/transactions/trackedTransaction.d.ts.map +1 -0
- package/dist/main/redux-slices/transactions/trackedTransaction.js +11 -0
- package/dist/main/redux-slices/transactions/trackedTransaction.js.map +1 -0
- package/dist/main/sdkReduxConfig.d.ts +95 -0
- package/dist/main/sdkReduxConfig.d.ts.map +1 -0
- package/dist/main/sdkReduxConfig.js +102 -0
- package/dist/main/sdkReduxConfig.js.map +1 -0
- package/dist/main/sdkReduxInitialization.d.ts +74 -0
- package/dist/main/sdkReduxInitialization.d.ts.map +1 -0
- package/dist/main/sdkReduxInitialization.js +55 -0
- package/dist/main/sdkReduxInitialization.js.map +1 -0
- package/{build → dist}/main/utils.d.ts +1 -0
- package/dist/main/utils.d.ts.map +1 -0
- package/{build → dist}/main/utils.js +1 -1
- package/dist/main/utils.js.map +1 -0
- package/dist/module/index.d.ts +13 -0
- package/dist/module/index.d.ts.map +1 -0
- package/dist/module/index.js +12 -0
- package/dist/module/index.js.map +1 -0
- package/{build → dist}/module/redux-slices/argTypes.d.ts +11 -13
- package/dist/module/redux-slices/argTypes.d.ts.map +1 -0
- package/dist/module/redux-slices/argTypes.js +2 -0
- package/dist/module/redux-slices/argTypes.js.map +1 -0
- package/{build → dist}/module/redux-slices/rtk-query/cacheTags/CacheTagTypes.d.ts +1 -0
- package/dist/module/redux-slices/rtk-query/cacheTags/CacheTagTypes.d.ts.map +1 -0
- package/dist/module/redux-slices/rtk-query/cacheTags/CacheTagTypes.js +14 -0
- package/dist/module/redux-slices/rtk-query/cacheTags/CacheTagTypes.js.map +1 -0
- package/{build → dist}/module/redux-slices/rtk-query/cacheTags/eventTags.d.ts +1 -0
- package/dist/module/redux-slices/rtk-query/cacheTags/eventTags.d.ts.map +1 -0
- package/dist/module/redux-slices/rtk-query/cacheTags/eventTags.js +8 -0
- package/dist/module/redux-slices/rtk-query/cacheTags/eventTags.js.map +1 -0
- package/{build → dist}/module/redux-slices/rtk-query/cacheTags/indexTags.d.ts +2 -1
- package/dist/module/redux-slices/rtk-query/cacheTags/indexTags.d.ts.map +1 -0
- package/dist/module/redux-slices/rtk-query/cacheTags/indexTags.js +26 -0
- package/dist/module/redux-slices/rtk-query/cacheTags/indexTags.js.map +1 -0
- package/{build → dist}/module/redux-slices/rtk-query/cacheTags/invalidateCacheTagsForEvents.d.ts +1 -0
- package/dist/module/redux-slices/rtk-query/cacheTags/invalidateCacheTagsForEvents.d.ts.map +1 -0
- package/dist/module/redux-slices/rtk-query/cacheTags/invalidateCacheTagsForEvents.js +142 -0
- package/dist/module/redux-slices/rtk-query/cacheTags/invalidateCacheTagsForEvents.js.map +1 -0
- package/{build/main → dist/module}/redux-slices/rtk-query/cacheTags/monitorAddressForNextEventToInvalidateCache.d.ts +1 -0
- package/dist/module/redux-slices/rtk-query/cacheTags/monitorAddressForNextEventToInvalidateCache.d.ts.map +1 -0
- package/dist/module/redux-slices/rtk-query/cacheTags/monitorAddressForNextEventToInvalidateCache.js +17 -0
- package/dist/module/redux-slices/rtk-query/cacheTags/monitorAddressForNextEventToInvalidateCache.js.map +1 -0
- package/{build/main → dist/module}/redux-slices/rtk-query/cacheTags/streamTags.d.ts +2 -1
- package/dist/module/redux-slices/rtk-query/cacheTags/streamTags.d.ts.map +1 -0
- package/dist/module/redux-slices/rtk-query/cacheTags/streamTags.js +25 -0
- package/dist/module/redux-slices/rtk-query/cacheTags/streamTags.js.map +1 -0
- package/{build/main → dist/module}/redux-slices/rtk-query/cacheTags/tokenTags.d.ts +2 -1
- package/dist/module/redux-slices/rtk-query/cacheTags/tokenTags.d.ts.map +1 -0
- package/dist/module/redux-slices/rtk-query/cacheTags/tokenTags.js +25 -0
- package/dist/module/redux-slices/rtk-query/cacheTags/tokenTags.js.map +1 -0
- package/dist/module/redux-slices/rtk-query/cacheTime.d.ts +9 -0
- package/dist/module/redux-slices/rtk-query/cacheTime.d.ts.map +1 -0
- package/dist/module/redux-slices/rtk-query/cacheTime.js +10 -0
- package/dist/module/redux-slices/rtk-query/cacheTime.js.map +1 -0
- package/dist/module/redux-slices/rtk-query/createApiWithReactHooks.d.ts +7 -0
- package/dist/module/redux-slices/rtk-query/createApiWithReactHooks.d.ts.map +1 -0
- package/dist/module/redux-slices/rtk-query/createApiWithReactHooks.js +8 -0
- package/dist/module/redux-slices/rtk-query/createApiWithReactHooks.js.map +1 -0
- package/dist/module/redux-slices/rtk-query/createApiWithoutReactHooks.d.ts +7 -0
- package/dist/module/redux-slices/rtk-query/createApiWithoutReactHooks.d.ts.map +1 -0
- package/dist/module/redux-slices/rtk-query/createApiWithoutReactHooks.js +8 -0
- package/dist/module/redux-slices/rtk-query/createApiWithoutReactHooks.js.map +1 -0
- package/dist/module/redux-slices/rtk-query/getSerializeQueryArgs.d.ts +3 -0
- package/dist/module/redux-slices/rtk-query/getSerializeQueryArgs.d.ts.map +1 -0
- package/dist/module/redux-slices/rtk-query/getSerializeQueryArgs.js +36 -0
- package/dist/module/redux-slices/rtk-query/getSerializeQueryArgs.js.map +1 -0
- package/dist/module/redux-slices/rtk-query/mutations/addMutationEndpoints.d.ts +21 -0
- package/dist/module/redux-slices/rtk-query/mutations/addMutationEndpoints.d.ts.map +1 -0
- package/dist/module/redux-slices/rtk-query/mutations/addMutationEndpoints.js +405 -0
- package/dist/module/redux-slices/rtk-query/mutations/addMutationEndpoints.js.map +1 -0
- package/dist/module/redux-slices/rtk-query/mutations/mutations.d.ts +140 -0
- package/dist/module/redux-slices/rtk-query/mutations/mutations.d.ts.map +1 -0
- package/dist/module/redux-slices/rtk-query/mutations/mutations.js +2 -0
- package/dist/module/redux-slices/rtk-query/mutations/mutations.js.map +1 -0
- package/dist/module/redux-slices/rtk-query/queries/addQueryEndpoints.d.ts +16 -0
- package/dist/module/redux-slices/rtk-query/queries/addQueryEndpoints.d.ts.map +1 -0
- package/dist/module/redux-slices/rtk-query/queries/addQueryEndpoints.js +276 -0
- package/dist/module/redux-slices/rtk-query/queries/addQueryEndpoints.js.map +1 -0
- package/dist/module/redux-slices/rtk-query/queries/queries.d.ts +56 -0
- package/dist/module/redux-slices/rtk-query/queries/queries.d.ts.map +1 -0
- package/dist/module/redux-slices/rtk-query/queries/queries.js +2 -0
- package/dist/module/redux-slices/rtk-query/queries/queries.js.map +1 -0
- package/dist/module/redux-slices/rtk-query/returnTypes.d.ts +16 -0
- package/dist/module/redux-slices/rtk-query/returnTypes.d.ts.map +1 -0
- package/dist/module/redux-slices/rtk-query/returnTypes.js +2 -0
- package/dist/module/redux-slices/rtk-query/returnTypes.js.map +1 -0
- package/dist/module/redux-slices/rtk-query/sfApiSlice.d.ts +33 -0
- package/dist/module/redux-slices/rtk-query/sfApiSlice.d.ts.map +1 -0
- package/dist/module/redux-slices/rtk-query/sfApiSlice.js +20 -0
- package/dist/module/redux-slices/rtk-query/sfApiSlice.js.map +1 -0
- package/dist/module/redux-slices/rtk-query/sfApiSliceInferredType.d.ts +3 -0
- package/dist/module/redux-slices/rtk-query/sfApiSliceInferredType.d.ts.map +1 -0
- package/dist/module/redux-slices/rtk-query/sfApiSliceInferredType.js +2 -0
- package/dist/module/redux-slices/rtk-query/sfApiSliceInferredType.js.map +1 -0
- package/dist/module/redux-slices/rtk-query/subgraph-slice/allSubgraphSliceEndpoints.d.ts +106 -0
- package/dist/module/redux-slices/rtk-query/subgraph-slice/allSubgraphSliceEndpoints.d.ts.map +1 -0
- package/dist/module/redux-slices/rtk-query/subgraph-slice/allSubgraphSliceEndpoints.js +11 -0
- package/dist/module/redux-slices/rtk-query/subgraph-slice/allSubgraphSliceEndpoints.js.map +1 -0
- package/dist/module/redux-slices/rtk-query/subgraph-slice/createEntityQueryEndpoints.d.ts +72 -0
- package/dist/module/redux-slices/rtk-query/subgraph-slice/createEntityQueryEndpoints.d.ts.map +1 -0
- package/dist/module/redux-slices/rtk-query/subgraph-slice/createEntityQueryEndpoints.js +58 -0
- package/dist/module/redux-slices/rtk-query/subgraph-slice/createEntityQueryEndpoints.js.map +1 -0
- package/dist/module/redux-slices/rtk-query/subgraph-slice/createEventQueryEndpoints.d.ts +40 -0
- package/dist/module/redux-slices/rtk-query/subgraph-slice/createEventQueryEndpoints.d.ts.map +1 -0
- package/dist/module/redux-slices/rtk-query/subgraph-slice/createEventQueryEndpoints.js +48 -0
- package/dist/module/redux-slices/rtk-query/subgraph-slice/createEventQueryEndpoints.js.map +1 -0
- package/dist/module/redux-slices/rtk-query/subgraph-slice/customSubgraphQuery.d.ts +16 -0
- package/dist/module/redux-slices/rtk-query/subgraph-slice/customSubgraphQuery.d.ts.map +1 -0
- package/dist/module/redux-slices/rtk-query/subgraph-slice/customSubgraphQuery.js +12 -0
- package/dist/module/redux-slices/rtk-query/subgraph-slice/customSubgraphQuery.js.map +1 -0
- package/dist/module/redux-slices/rtk-query/subgraph-slice/entityQueryArgs.d.ts +50 -0
- package/dist/module/redux-slices/rtk-query/subgraph-slice/entityQueryArgs.d.ts.map +1 -0
- package/dist/module/redux-slices/rtk-query/subgraph-slice/entityQueryArgs.js +2 -0
- package/dist/module/redux-slices/rtk-query/subgraph-slice/entityQueryArgs.js.map +1 -0
- package/dist/module/redux-slices/rtk-query/subgraph-slice/eventQueryArgs.d.ts +26 -0
- package/dist/module/redux-slices/rtk-query/subgraph-slice/eventQueryArgs.d.ts.map +1 -0
- package/dist/module/redux-slices/rtk-query/subgraph-slice/eventQueryArgs.js +2 -0
- package/dist/module/redux-slices/rtk-query/subgraph-slice/eventQueryArgs.js.map +1 -0
- package/dist/module/redux-slices/rtk-query/subgraph-slice/provideCacheTagsFromRelevantAddresses.d.ts +7 -0
- package/dist/module/redux-slices/rtk-query/subgraph-slice/provideCacheTagsFromRelevantAddresses.d.ts.map +1 -0
- package/dist/module/redux-slices/rtk-query/subgraph-slice/provideCacheTagsFromRelevantAddresses.js +25 -0
- package/dist/module/redux-slices/rtk-query/subgraph-slice/provideCacheTagsFromRelevantAddresses.js.map +1 -0
- package/dist/module/redux-slices/rtk-query/subgraph-slice/sfSubgraphSliceInferredType.d.ts +3 -0
- package/dist/module/redux-slices/rtk-query/subgraph-slice/sfSubgraphSliceInferredType.d.ts.map +1 -0
- package/dist/module/redux-slices/rtk-query/subgraph-slice/sfSubgraphSliceInferredType.js +2 -0
- package/dist/module/redux-slices/rtk-query/subgraph-slice/sfSubgraphSliceInferredType.js.map +1 -0
- package/dist/module/redux-slices/rtk-query/subgraph-slice/subgraphSlice.d.ts +22 -0
- package/dist/module/redux-slices/rtk-query/subgraph-slice/subgraphSlice.d.ts.map +1 -0
- package/dist/module/redux-slices/rtk-query/subgraph-slice/subgraphSlice.js +31 -0
- package/dist/module/redux-slices/rtk-query/subgraph-slice/subgraphSlice.js.map +1 -0
- package/dist/module/redux-slices/transactions/createTransactionSlice.d.ts +12 -0
- package/dist/module/redux-slices/transactions/createTransactionSlice.d.ts.map +1 -0
- package/dist/module/redux-slices/transactions/createTransactionSlice.js +11 -0
- package/dist/module/redux-slices/transactions/createTransactionSlice.js.map +1 -0
- package/{build/main → dist/module}/redux-slices/transactions/registerNewTransaction.d.ts +1 -0
- package/dist/module/redux-slices/transactions/registerNewTransaction.d.ts.map +1 -0
- package/dist/module/redux-slices/transactions/registerNewTransaction.js +29 -0
- package/dist/module/redux-slices/transactions/registerNewTransaction.js.map +1 -0
- package/{build/main → dist/module}/redux-slices/transactions/trackTransaction.d.ts +1 -0
- package/dist/module/redux-slices/transactions/trackTransaction.d.ts.map +1 -0
- package/dist/module/redux-slices/transactions/trackTransaction.js +60 -0
- package/dist/module/redux-slices/transactions/trackTransaction.js.map +1 -0
- package/dist/module/redux-slices/transactions/trackedTransaction.d.ts +12 -0
- package/dist/module/redux-slices/transactions/trackedTransaction.d.ts.map +1 -0
- package/dist/module/redux-slices/transactions/trackedTransaction.js +8 -0
- package/dist/module/redux-slices/transactions/trackedTransaction.js.map +1 -0
- package/dist/module/sdkReduxConfig.d.ts +95 -0
- package/dist/module/sdkReduxConfig.d.ts.map +1 -0
- package/dist/module/sdkReduxConfig.js +89 -0
- package/dist/module/sdkReduxConfig.js.map +1 -0
- package/dist/module/sdkReduxInitialization.d.ts +74 -0
- package/dist/module/sdkReduxInitialization.d.ts.map +1 -0
- package/dist/module/sdkReduxInitialization.js +47 -0
- package/dist/module/sdkReduxInitialization.js.map +1 -0
- package/{build → dist}/module/utils.d.ts +1 -0
- package/dist/module/utils.d.ts.map +1 -0
- package/{build → dist}/module/utils.js +1 -1
- package/dist/module/utils.js.map +1 -0
- package/package.json +19 -22
- package/build/main/SuperfluidContext.d.ts +0 -31
- package/build/main/SuperfluidContext.js +0 -49
- package/build/main/createSdkReduxParts.d.ts +0 -23
- package/build/main/createSdkReduxParts.js +0 -28
- package/build/main/index.d.ts +0 -29
- package/build/main/index.js +0 -41
- package/build/main/redux-slices/argTypes.js +0 -3
- package/build/main/redux-slices/rtk-query/cacheTags/CacheTagTypes.js +0 -18
- package/build/main/redux-slices/rtk-query/cacheTags/eventTags.js +0 -12
- package/build/main/redux-slices/rtk-query/cacheTags/indexTags.js +0 -31
- package/build/main/redux-slices/rtk-query/cacheTags/monitorAddressForNextEventToInvalidateCache.js +0 -21
- package/build/main/redux-slices/rtk-query/cacheTags/streamTags.js +0 -30
- package/build/main/redux-slices/rtk-query/cacheTags/tokenTags.js +0 -30
- package/build/main/redux-slices/rtk-query/mutations/approveIndexSubscription.d.ts +0 -19
- package/build/main/redux-slices/rtk-query/mutations/approveIndexSubscription.js +0 -45
- package/build/main/redux-slices/rtk-query/mutations/claimFromIndexSubscription.d.ts +0 -21
- package/build/main/redux-slices/rtk-query/mutations/claimFromIndexSubscription.js +0 -46
- package/build/main/redux-slices/rtk-query/mutations/createFlow.d.ts +0 -19
- package/build/main/redux-slices/rtk-query/mutations/createFlow.js +0 -50
- package/build/main/redux-slices/rtk-query/mutations/createIndex.d.ts +0 -17
- package/build/main/redux-slices/rtk-query/mutations/createIndex.js +0 -50
- package/build/main/redux-slices/rtk-query/mutations/deleteFlow.d.ts +0 -17
- package/build/main/redux-slices/rtk-query/mutations/deleteFlow.js +0 -48
- package/build/main/redux-slices/rtk-query/mutations/deleteIndexSubscription.d.ts +0 -21
- package/build/main/redux-slices/rtk-query/mutations/deleteIndexSubscription.js +0 -46
- package/build/main/redux-slices/rtk-query/mutations/distributeToIndex.d.ts +0 -19
- package/build/main/redux-slices/rtk-query/mutations/distributeToIndex.js +0 -48
- package/build/main/redux-slices/rtk-query/mutations/downgradeFromSuperToken.d.ts +0 -15
- package/build/main/redux-slices/rtk-query/mutations/downgradeFromSuperToken.js +0 -46
- package/build/main/redux-slices/rtk-query/mutations/monitorForEventsToInvalidateCache.d.ts +0 -16
- package/build/main/redux-slices/rtk-query/mutations/monitorForEventsToInvalidateCache.js +0 -40
- package/build/main/redux-slices/rtk-query/mutations/revokeIndexSubscription.d.ts +0 -19
- package/build/main/redux-slices/rtk-query/mutations/revokeIndexSubscription.js +0 -45
- package/build/main/redux-slices/rtk-query/mutations/transferSuperToken.d.ts +0 -17
- package/build/main/redux-slices/rtk-query/mutations/transferSuperToken.js +0 -47
- package/build/main/redux-slices/rtk-query/mutations/updateFlow.d.ts +0 -19
- package/build/main/redux-slices/rtk-query/mutations/updateFlow.js +0 -49
- package/build/main/redux-slices/rtk-query/mutations/updateIndexSubscriptionUnits.d.ts +0 -21
- package/build/main/redux-slices/rtk-query/mutations/updateIndexSubscriptionUnits.js +0 -46
- package/build/main/redux-slices/rtk-query/mutations/upgradeToSuperToken.d.ts +0 -16
- package/build/main/redux-slices/rtk-query/mutations/upgradeToSuperToken.js +0 -65
- package/build/main/redux-slices/rtk-query/queries/getAllowanceForUpgradeToSuperToken.d.ts +0 -17
- package/build/main/redux-slices/rtk-query/queries/getAllowanceForUpgradeToSuperToken.js +0 -43
- package/build/main/redux-slices/rtk-query/queries/getIndex.d.ts +0 -17
- package/build/main/redux-slices/rtk-query/queries/getIndex.js +0 -43
- package/build/main/redux-slices/rtk-query/queries/getIndexSubscription.d.ts +0 -17
- package/build/main/redux-slices/rtk-query/queries/getIndexSubscription.js +0 -44
- package/build/main/redux-slices/rtk-query/queries/getRealtimeBalance.d.ts +0 -22
- package/build/main/redux-slices/rtk-query/queries/getRealtimeBalance.js +0 -75
- package/build/main/redux-slices/rtk-query/queries/listEvents.d.ts +0 -15
- package/build/main/redux-slices/rtk-query/queries/listEvents.js +0 -59
- package/build/main/redux-slices/rtk-query/queries/listIndexSubscriptions.d.ts +0 -15
- package/build/main/redux-slices/rtk-query/queries/listIndexSubscriptions.js +0 -41
- package/build/main/redux-slices/rtk-query/queries/listIndexes.d.ts +0 -16
- package/build/main/redux-slices/rtk-query/queries/listIndexes.js +0 -42
- package/build/main/redux-slices/rtk-query/queries/listStreams.d.ts +0 -16
- package/build/main/redux-slices/rtk-query/queries/listStreams.js +0 -41
- package/build/main/redux-slices/rtk-query/queries/listSuperTokens.d.ts +0 -14
- package/build/main/redux-slices/rtk-query/queries/listSuperTokens.js +0 -39
- package/build/main/redux-slices/rtk-query/queries/listUserInteractedSuperTokens.d.ts +0 -15
- package/build/main/redux-slices/rtk-query/queries/listUserInteractedSuperTokens.js +0 -56
- package/build/main/redux-slices/rtk-query/rtkQuerySlice.d.ts +0 -3
- package/build/main/redux-slices/rtk-query/rtkQuerySlice.js +0 -53
- package/build/main/redux-slices/rtk-query/rtkQuerySliceBaseQuery.d.ts +0 -21
- package/build/main/redux-slices/rtk-query/rtkQuerySliceBaseQuery.js +0 -14
- package/build/main/redux-slices/transactions/registerNewTransaction.js +0 -33
- package/build/main/redux-slices/transactions/trackTransaction.js +0 -66
- package/build/main/redux-slices/transactions/transactionSlice.d.ts +0 -36
- package/build/main/redux-slices/transactions/transactionSlice.js +0 -19
- package/build/module/SuperfluidContext.d.ts +0 -31
- package/build/module/SuperfluidContext.js +0 -46
- package/build/module/createSdkReduxParts.d.ts +0 -23
- package/build/module/createSdkReduxParts.js +0 -23
- package/build/module/index.d.ts +0 -29
- package/build/module/index.js +0 -29
- package/build/module/redux-slices/argTypes.js +0 -2
- package/build/module/redux-slices/rtk-query/cacheTags/CacheTagTypes.js +0 -14
- package/build/module/redux-slices/rtk-query/cacheTags/eventTags.js +0 -8
- package/build/module/redux-slices/rtk-query/cacheTags/indexTags.js +0 -26
- package/build/module/redux-slices/rtk-query/cacheTags/invalidateCacheTagsForEvents.js +0 -144
- package/build/module/redux-slices/rtk-query/cacheTags/monitorAddressForNextEventToInvalidateCache.js +0 -17
- package/build/module/redux-slices/rtk-query/cacheTags/streamTags.js +0 -25
- package/build/module/redux-slices/rtk-query/cacheTags/tokenTags.js +0 -25
- package/build/module/redux-slices/rtk-query/mutations/approveIndexSubscription.d.ts +0 -19
- package/build/module/redux-slices/rtk-query/mutations/approveIndexSubscription.js +0 -43
- package/build/module/redux-slices/rtk-query/mutations/claimFromIndexSubscription.d.ts +0 -21
- package/build/module/redux-slices/rtk-query/mutations/claimFromIndexSubscription.js +0 -44
- package/build/module/redux-slices/rtk-query/mutations/createFlow.d.ts +0 -19
- package/build/module/redux-slices/rtk-query/mutations/createFlow.js +0 -48
- package/build/module/redux-slices/rtk-query/mutations/createIndex.d.ts +0 -17
- package/build/module/redux-slices/rtk-query/mutations/createIndex.js +0 -48
- package/build/module/redux-slices/rtk-query/mutations/deleteFlow.d.ts +0 -17
- package/build/module/redux-slices/rtk-query/mutations/deleteFlow.js +0 -46
- package/build/module/redux-slices/rtk-query/mutations/deleteIndexSubscription.d.ts +0 -21
- package/build/module/redux-slices/rtk-query/mutations/deleteIndexSubscription.js +0 -44
- package/build/module/redux-slices/rtk-query/mutations/distributeToIndex.d.ts +0 -19
- package/build/module/redux-slices/rtk-query/mutations/distributeToIndex.js +0 -46
- package/build/module/redux-slices/rtk-query/mutations/downgradeFromSuperToken.d.ts +0 -15
- package/build/module/redux-slices/rtk-query/mutations/downgradeFromSuperToken.js +0 -44
- package/build/module/redux-slices/rtk-query/mutations/monitorForEventsToInvalidateCache.d.ts +0 -16
- package/build/module/redux-slices/rtk-query/mutations/monitorForEventsToInvalidateCache.js +0 -38
- package/build/module/redux-slices/rtk-query/mutations/revokeIndexSubscription.d.ts +0 -19
- package/build/module/redux-slices/rtk-query/mutations/revokeIndexSubscription.js +0 -43
- package/build/module/redux-slices/rtk-query/mutations/transferSuperToken.d.ts +0 -17
- package/build/module/redux-slices/rtk-query/mutations/transferSuperToken.js +0 -45
- package/build/module/redux-slices/rtk-query/mutations/updateFlow.d.ts +0 -19
- package/build/module/redux-slices/rtk-query/mutations/updateFlow.js +0 -47
- package/build/module/redux-slices/rtk-query/mutations/updateIndexSubscriptionUnits.d.ts +0 -21
- package/build/module/redux-slices/rtk-query/mutations/updateIndexSubscriptionUnits.js +0 -44
- package/build/module/redux-slices/rtk-query/mutations/upgradeToSuperToken.d.ts +0 -16
- package/build/module/redux-slices/rtk-query/mutations/upgradeToSuperToken.js +0 -63
- package/build/module/redux-slices/rtk-query/queries/getAllowanceForUpgradeToSuperToken.d.ts +0 -17
- package/build/module/redux-slices/rtk-query/queries/getAllowanceForUpgradeToSuperToken.js +0 -41
- package/build/module/redux-slices/rtk-query/queries/getIndex.d.ts +0 -17
- package/build/module/redux-slices/rtk-query/queries/getIndex.js +0 -41
- package/build/module/redux-slices/rtk-query/queries/getIndexSubscription.d.ts +0 -17
- package/build/module/redux-slices/rtk-query/queries/getIndexSubscription.js +0 -42
- package/build/module/redux-slices/rtk-query/queries/getRealtimeBalance.d.ts +0 -22
- package/build/module/redux-slices/rtk-query/queries/getRealtimeBalance.js +0 -73
- package/build/module/redux-slices/rtk-query/queries/listEvents.d.ts +0 -15
- package/build/module/redux-slices/rtk-query/queries/listEvents.js +0 -57
- package/build/module/redux-slices/rtk-query/queries/listIndexSubscriptions.d.ts +0 -15
- package/build/module/redux-slices/rtk-query/queries/listIndexSubscriptions.js +0 -39
- package/build/module/redux-slices/rtk-query/queries/listIndexes.d.ts +0 -16
- package/build/module/redux-slices/rtk-query/queries/listIndexes.js +0 -40
- package/build/module/redux-slices/rtk-query/queries/listStreams.d.ts +0 -16
- package/build/module/redux-slices/rtk-query/queries/listStreams.js +0 -39
- package/build/module/redux-slices/rtk-query/queries/listSuperTokens.d.ts +0 -14
- package/build/module/redux-slices/rtk-query/queries/listSuperTokens.js +0 -37
- package/build/module/redux-slices/rtk-query/queries/listUserInteractedSuperTokens.d.ts +0 -15
- package/build/module/redux-slices/rtk-query/queries/listUserInteractedSuperTokens.js +0 -54
- package/build/module/redux-slices/rtk-query/rtkQuerySlice.d.ts +0 -3
- package/build/module/redux-slices/rtk-query/rtkQuerySlice.js +0 -47
- package/build/module/redux-slices/rtk-query/rtkQuerySliceBaseQuery.d.ts +0 -21
- package/build/module/redux-slices/rtk-query/rtkQuerySliceBaseQuery.js +0 -10
- package/build/module/redux-slices/transactions/registerNewTransaction.js +0 -29
- package/build/module/redux-slices/transactions/trackTransaction.js +0 -62
- package/build/module/redux-slices/transactions/transactionSlice.d.ts +0 -36
- package/build/module/redux-slices/transactions/transactionSlice.js +0 -19
package/dist/main/redux-slices/rtk-query/subgraph-slice/provideCacheTagsFromRelevantAddresses.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { RelevantAddresses } from '@superfluid-finance/sdk-core';
|
|
2
|
+
import { CacheTagTypes } from '../cacheTags/CacheTagTypes';
|
|
3
|
+
export declare const provideCacheTagsFromRelevantAddresses: (chainId: number, relevantAddresses: RelevantAddresses, tag: CacheTagTypes) => {
|
|
4
|
+
type: CacheTagTypes;
|
|
5
|
+
id: string;
|
|
6
|
+
}[];
|
|
7
|
+
//# sourceMappingURL=provideCacheTagsFromRelevantAddresses.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"provideCacheTagsFromRelevantAddresses.d.ts","sourceRoot":"","sources":["../../../../../src/redux-slices/rtk-query/subgraph-slice/provideCacheTagsFromRelevantAddresses.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,iBAAiB,EAAC,MAAM,8BAA8B,CAAC;AAE/D,OAAO,EAAC,aAAa,EAAC,MAAM,4BAA4B,CAAC;AAEzD,eAAO,MAAM,qCAAqC,YACrC,MAAM,qBACI,iBAAiB,OAC/B,aAAa;;;GAwBrB,CAAC"}
|
package/dist/main/redux-slices/rtk-query/subgraph-slice/provideCacheTagsFromRelevantAddresses.js
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.provideCacheTagsFromRelevantAddresses = void 0;
|
|
4
|
+
const provideCacheTagsFromRelevantAddresses = (chainId, relevantAddresses, tag) => {
|
|
5
|
+
if (relevantAddresses.tokens.length) {
|
|
6
|
+
return relevantAddresses.tokens
|
|
7
|
+
.map((tokenAddress) => relevantAddresses.accounts.map((accountAddress) => ({
|
|
8
|
+
type: tag,
|
|
9
|
+
id: `${chainId}_${tokenAddress}_${accountAddress}`,
|
|
10
|
+
})))
|
|
11
|
+
.flat();
|
|
12
|
+
}
|
|
13
|
+
else if (relevantAddresses.accounts.length) {
|
|
14
|
+
return relevantAddresses.accounts.map((accountAddress) => ({
|
|
15
|
+
type: tag,
|
|
16
|
+
id: `${chainId}_${accountAddress}`,
|
|
17
|
+
}));
|
|
18
|
+
}
|
|
19
|
+
else {
|
|
20
|
+
return [
|
|
21
|
+
{
|
|
22
|
+
type: tag,
|
|
23
|
+
id: `${chainId}`,
|
|
24
|
+
},
|
|
25
|
+
];
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
exports.provideCacheTagsFromRelevantAddresses = provideCacheTagsFromRelevantAddresses;
|
|
29
|
+
//# sourceMappingURL=provideCacheTagsFromRelevantAddresses.js.map
|
package/dist/main/redux-slices/rtk-query/subgraph-slice/provideCacheTagsFromRelevantAddresses.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"provideCacheTagsFromRelevantAddresses.js","sourceRoot":"","sources":["../../../../../src/redux-slices/rtk-query/subgraph-slice/provideCacheTagsFromRelevantAddresses.ts"],"names":[],"mappings":";;;AAIO,MAAM,qCAAqC,GAAG,CACjD,OAAe,EACf,iBAAoC,EACpC,GAAkB,EACpB,EAAE;IACA,IAAI,iBAAiB,CAAC,MAAM,CAAC,MAAM,EAAE;QACjC,OAAO,iBAAiB,CAAC,MAAM;aAC1B,GAAG,CAAC,CAAC,YAAoB,EAAE,EAAE,CAC1B,iBAAiB,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,cAAsB,EAAE,EAAE,CAAC,CAAC;YACxD,IAAI,EAAE,GAAG;YACT,EAAE,EAAE,GAAG,OAAO,IAAI,YAAY,IAAI,cAAc,EAAE;SACrD,CAAC,CAAC,CACN;aACA,IAAI,EAAE,CAAC;KACf;SAAM,IAAI,iBAAiB,CAAC,QAAQ,CAAC,MAAM,EAAE;QAC1C,OAAO,iBAAiB,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,cAAsB,EAAE,EAAE,CAAC,CAAC;YAC/D,IAAI,EAAE,GAAG;YACT,EAAE,EAAE,GAAG,OAAO,IAAI,cAAc,EAAE;SACrC,CAAC,CAAC,CAAC;KACP;SAAM;QACH,OAAO;YACH;gBACI,IAAI,EAAE,GAAG;gBACT,EAAE,EAAE,GAAG,OAAO,EAAE;aACnB;SACJ,CAAC;KACL;AACL,CAAC,CAAC;AA3BW,QAAA,qCAAqC,yCA2BhD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sfSubgraphSliceInferredType.d.ts","sourceRoot":"","sources":["../../../../../src/redux-slices/rtk-query/subgraph-slice/sfSubgraphSliceInferredType.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,mBAAmB,EAAC,MAAM,iBAAiB,CAAC;AAEpD,oBAAY,2BAA2B,GAAG,UAAU,CAAC,OAAO,mBAAmB,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sfSubgraphSliceInferredType.js","sourceRoot":"","sources":["../../../../../src/redux-slices/rtk-query/subgraph-slice/sfSubgraphSliceInferredType.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { BaseQueryFn } from '@reduxjs/toolkit/dist/query';
|
|
2
|
+
import { EndpointBuilder } from '@reduxjs/toolkit/dist/query/endpointDefinitions';
|
|
3
|
+
import { CreateApi } from '@reduxjs/toolkit/query';
|
|
4
|
+
import { Framework, SFError } from '@superfluid-finance/sdk-core';
|
|
5
|
+
import { CacheTagTypes } from '../cacheTags/CacheTagTypes';
|
|
6
|
+
export declare const createSubgraphSlice: <T extends keyof import("@reduxjs/toolkit/dist/query").ApiModules<any, any, any, any>>(createRtkQueryApi: CreateApi<T>) => import("@reduxjs/toolkit/dist/query").Api<BaseQueryFn<SubgraphSliceArgs, unknown, SFError, Record<string, unknown>, {}>, {}, "sfSubgraph", CacheTagTypes, T>;
|
|
7
|
+
export declare type SubgraphSliceEndpointBuilder = EndpointBuilder<SubgraphSliceBaseQueryType, CacheTagTypes, 'sfSubgraph'>;
|
|
8
|
+
declare type SubgraphSliceArgs = {
|
|
9
|
+
chainId: number;
|
|
10
|
+
handle: (framework: Framework) => Promise<unknown>;
|
|
11
|
+
};
|
|
12
|
+
export declare const subgraphSliceBaseQuery: () => BaseQueryFn<SubgraphSliceArgs, unknown, SFError, Record<string, unknown>>;
|
|
13
|
+
export declare type SubgraphSliceBaseQueryType = ReturnType<typeof subgraphSliceBaseQuery>;
|
|
14
|
+
export declare const handleSubgraphQueryWithFramework: ({ chainId, handle }: SubgraphSliceArgs) => Promise<{
|
|
15
|
+
data: unknown;
|
|
16
|
+
error?: undefined;
|
|
17
|
+
} | {
|
|
18
|
+
error: SFError;
|
|
19
|
+
data?: undefined;
|
|
20
|
+
}>;
|
|
21
|
+
export {};
|
|
22
|
+
//# sourceMappingURL=subgraphSlice.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"subgraphSlice.d.ts","sourceRoot":"","sources":["../../../../../src/redux-slices/rtk-query/subgraph-slice/subgraphSlice.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,WAAW,EAAC,MAAM,6BAA6B,CAAC;AAExD,OAAO,EAAC,eAAe,EAAC,MAAM,iDAAiD,CAAC;AAChF,OAAO,EAAC,SAAS,EAAC,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAC,SAAS,EAAE,OAAO,EAAC,MAAM,8BAA8B,CAAC;AAIhE,OAAO,EAAC,aAAa,EAAC,MAAM,4BAA4B,CAAC;AAIzD,eAAO,MAAM,mBAAmB,yRAQ1B,CAAC;AAEP,oBAAY,4BAA4B,GAAG,eAAe,CAAC,0BAA0B,EAAE,aAAa,EAAE,YAAY,CAAC,CAAC;AAEpH,aAAK,iBAAiB,GAAG;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,CAAC,SAAS,EAAE,SAAS,KAAK,OAAO,CAAC,OAAO,CAAC,CAAA;CAAC,CAAC;AAE/F,eAAO,MAAM,sBAAsB,QAAO,YAAY,iBAAiB,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,MAAM,EAAE,OAAO,CAAC,CAC9E,CAAC;AAErC,oBAAY,0BAA0B,GAAG,UAAU,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAEnF,eAAO,MAAM,gCAAgC,wBAA6B,iBAAiB;;;;;;EAa1F,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.handleSubgraphQueryWithFramework = exports.subgraphSliceBaseQuery = exports.createSubgraphSlice = void 0;
|
|
4
|
+
const sdk_core_1 = require("@superfluid-finance/sdk-core");
|
|
5
|
+
const sdkReduxConfig_1 = require("../../../sdkReduxConfig");
|
|
6
|
+
const utils_1 = require("../../../utils");
|
|
7
|
+
const cacheTime_1 = require("../cacheTime");
|
|
8
|
+
const getSerializeQueryArgs_1 = require("../getSerializeQueryArgs");
|
|
9
|
+
const createSubgraphSlice = (createRtkQueryApi) => createRtkQueryApi({
|
|
10
|
+
keepUnusedDataFor: cacheTime_1.CacheTime.OneMinute,
|
|
11
|
+
reducerPath: 'sfSubgraph',
|
|
12
|
+
baseQuery: (0, exports.subgraphSliceBaseQuery)(),
|
|
13
|
+
tagTypes: (0, utils_1.typeGuard)(['Event', 'Index', 'Stream', 'Token']),
|
|
14
|
+
endpoints: (_builder) => ({}),
|
|
15
|
+
serializeQueryArgs: (0, getSerializeQueryArgs_1.getSerializeQueryArgs)(),
|
|
16
|
+
});
|
|
17
|
+
exports.createSubgraphSlice = createSubgraphSlice;
|
|
18
|
+
const subgraphSliceBaseQuery = () => exports.handleSubgraphQueryWithFramework;
|
|
19
|
+
exports.subgraphSliceBaseQuery = subgraphSliceBaseQuery;
|
|
20
|
+
const handleSubgraphQueryWithFramework = async ({ chainId, handle }) => {
|
|
21
|
+
try {
|
|
22
|
+
const framework = await (0, sdkReduxConfig_1.getFramework)(chainId);
|
|
23
|
+
return { data: await handle(framework) };
|
|
24
|
+
}
|
|
25
|
+
catch (error) {
|
|
26
|
+
if (error instanceof sdk_core_1.SFError) {
|
|
27
|
+
return {
|
|
28
|
+
error: error,
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
else {
|
|
32
|
+
throw error;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
exports.handleSubgraphQueryWithFramework = handleSubgraphQueryWithFramework;
|
|
37
|
+
//# sourceMappingURL=subgraphSlice.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"subgraphSlice.js","sourceRoot":"","sources":["../../../../../src/redux-slices/rtk-query/subgraph-slice/subgraphSlice.ts"],"names":[],"mappings":";;;AAIA,2DAAgE;AAEhE,4DAAqD;AACrD,0CAAyC;AAEzC,4CAAuC;AACvC,oEAA+D;AAExD,MAAM,mBAAmB,GAAG,CAAuB,iBAA+B,EAAE,EAAE,CACzF,iBAAiB,CAAC;IACd,iBAAiB,EAAE,qBAAS,CAAC,SAAS;IACtC,WAAW,EAAE,YAAY;IACzB,SAAS,EAAE,IAAA,8BAAsB,GAAE;IACnC,QAAQ,EAAE,IAAA,iBAAS,EAAkB,CAAC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC;IAC3E,SAAS,EAAE,CAAC,QAAsC,EAAE,EAAE,CAAC,CAAC,EAAE,CAAC;IAC3D,kBAAkB,EAAE,IAAA,6CAAqB,GAAE;CAC9C,CAAC,CAAC;AARM,QAAA,mBAAmB,uBAQzB;AAMA,MAAM,sBAAsB,GAAG,GAA8E,EAAE,CAClH,wCAAgC,CAAC;AADxB,QAAA,sBAAsB,0BACE;AAI9B,MAAM,gCAAgC,GAAG,KAAK,EAAE,EAAC,OAAO,EAAE,MAAM,EAAoB,EAAE,EAAE;IAC3F,IAAI;QACA,MAAM,SAAS,GAAG,MAAM,IAAA,6BAAY,EAAC,OAAO,CAAC,CAAC;QAC9C,OAAO,EAAC,IAAI,EAAE,MAAM,MAAM,CAAC,SAAS,CAAC,EAAC,CAAC;KAC1C;IAAC,OAAO,KAAK,EAAE;QACZ,IAAI,KAAK,YAAY,kBAAO,EAAE;YAC1B,OAAO;gBACH,KAAK,EAAE,KAAK;aACf,CAAC;SACL;aAAM;YACH,MAAM,KAAK,CAAC;SACf;KACJ;AACL,CAAC,CAAC;AAbW,QAAA,gCAAgC,oCAa3C"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare const transactionSlicePrefix: "sfTransactions";
|
|
2
|
+
export declare const createTransactionSlice: () => import("@reduxjs/toolkit").Slice<import("@reduxjs/toolkit").EntityState<import("./trackedTransaction").TrackedTransaction>, {
|
|
3
|
+
upsertTransaction: {
|
|
4
|
+
<S extends import("@reduxjs/toolkit").EntityState<import("./trackedTransaction").TrackedTransaction>>(state: import("@reduxjs/toolkit/dist/tsHelpers").IsAny<S, import("@reduxjs/toolkit").EntityState<import("./trackedTransaction").TrackedTransaction>, S>, entity: import("./trackedTransaction").TrackedTransaction): S;
|
|
5
|
+
<S_1 extends import("@reduxjs/toolkit").EntityState<import("./trackedTransaction").TrackedTransaction>>(state: import("@reduxjs/toolkit/dist/tsHelpers").IsAny<S_1, import("@reduxjs/toolkit").EntityState<import("./trackedTransaction").TrackedTransaction>, S_1>, entity: {
|
|
6
|
+
payload: import("./trackedTransaction").TrackedTransaction;
|
|
7
|
+
type: string;
|
|
8
|
+
}): S_1;
|
|
9
|
+
};
|
|
10
|
+
}, "sfTransactions">;
|
|
11
|
+
export declare type SfTransactionSliceType = ReturnType<typeof createTransactionSlice>;
|
|
12
|
+
//# sourceMappingURL=createTransactionSlice.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createTransactionSlice.d.ts","sourceRoot":"","sources":["../../../../src/redux-slices/transactions/createTransactionSlice.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,sBAAsB,kBAA4B,CAAC;AAEhE,eAAO,MAAM,sBAAsB;;;;;;;;oBAO7B,CAAC;AAEP,oBAAY,sBAAsB,GAAG,UAAU,CAAC,OAAO,sBAAsB,CAAC,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createTransactionSlice = exports.transactionSlicePrefix = void 0;
|
|
4
|
+
const toolkit_1 = require("@reduxjs/toolkit");
|
|
5
|
+
const trackedTransaction_1 = require("./trackedTransaction");
|
|
6
|
+
exports.transactionSlicePrefix = 'sfTransactions';
|
|
7
|
+
const createTransactionSlice = () => (0, toolkit_1.createSlice)({
|
|
8
|
+
name: exports.transactionSlicePrefix,
|
|
9
|
+
initialState: trackedTransaction_1.transactionsAdapter.getInitialState(),
|
|
10
|
+
reducers: {
|
|
11
|
+
upsertTransaction: trackedTransaction_1.transactionsAdapter.upsertOne,
|
|
12
|
+
},
|
|
13
|
+
});
|
|
14
|
+
exports.createTransactionSlice = createTransactionSlice;
|
|
15
|
+
//# sourceMappingURL=createTransactionSlice.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createTransactionSlice.js","sourceRoot":"","sources":["../../../../src/redux-slices/transactions/createTransactionSlice.ts"],"names":[],"mappings":";;;AAAA,8CAA6C;AAE7C,6DAAyD;AAE5C,QAAA,sBAAsB,GAAG,gBAAyB,CAAC;AAEzD,MAAM,sBAAsB,GAAG,GAAG,EAAE,CACvC,IAAA,qBAAW,EAAC;IACR,IAAI,EAAE,8BAAsB;IAC5B,YAAY,EAAE,wCAAmB,CAAC,eAAe,EAAE;IACnD,QAAQ,EAAE;QACN,iBAAiB,EAAE,wCAAmB,CAAC,SAAS;KACnD;CACJ,CAAC,CAAC;AAPM,QAAA,sBAAsB,0BAO5B"}
|
|
@@ -3,3 +3,4 @@ import { ThunkDispatch } from '@reduxjs/toolkit';
|
|
|
3
3
|
* Transactions have to be registered for them to be tracked inside the redux store and monitored for re-orgs.
|
|
4
4
|
*/
|
|
5
5
|
export declare const registerNewTransaction: (chainId: number, transactionHash: string, waitForConfirmation: boolean, dispatch: ThunkDispatch<any, any, any>) => Promise<void>;
|
|
6
|
+
//# sourceMappingURL=registerNewTransaction.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registerNewTransaction.d.ts","sourceRoot":"","sources":["../../../../src/redux-slices/transactions/registerNewTransaction.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,aAAa,EAAC,MAAM,kBAAkB,CAAC;AAM/C;;GAEG;AACH,eAAO,MAAM,sBAAsB,YAKtB,MAAM,mBACE,MAAM,uBAIF,OAAO,YAIlB,cAAc,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,kBAczC,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.registerNewTransaction = void 0;
|
|
4
|
+
const sdkReduxConfig_1 = require("../../sdkReduxConfig");
|
|
5
|
+
const trackTransaction_1 = require("./trackTransaction");
|
|
6
|
+
/**
|
|
7
|
+
* Transactions have to be registered for them to be tracked inside the redux store and monitored for re-orgs.
|
|
8
|
+
*/
|
|
9
|
+
const registerNewTransaction = async (
|
|
10
|
+
/**
|
|
11
|
+
* The chain ID transaction is on.
|
|
12
|
+
* WARNING: Don't pass `chainId` off of ether's `TransactionResponse` because it's not set correctly on timely manner.
|
|
13
|
+
*/
|
|
14
|
+
chainId, transactionHash,
|
|
15
|
+
/**
|
|
16
|
+
* Whether to wait for one transaction confirmation.
|
|
17
|
+
*/
|
|
18
|
+
waitForConfirmation,
|
|
19
|
+
/**
|
|
20
|
+
* For dispatching redux thunks.
|
|
21
|
+
*/
|
|
22
|
+
dispatch) => {
|
|
23
|
+
const framework = await (0, sdkReduxConfig_1.getFramework)(chainId);
|
|
24
|
+
dispatch((0, trackTransaction_1.trackTransaction)({
|
|
25
|
+
chainId,
|
|
26
|
+
hash: transactionHash,
|
|
27
|
+
}));
|
|
28
|
+
if (waitForConfirmation) {
|
|
29
|
+
await (0, trackTransaction_1.waitForOneConfirmation)(framework.settings.provider, transactionHash);
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
exports.registerNewTransaction = registerNewTransaction;
|
|
33
|
+
//# sourceMappingURL=registerNewTransaction.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registerNewTransaction.js","sourceRoot":"","sources":["../../../../src/redux-slices/transactions/registerNewTransaction.ts"],"names":[],"mappings":";;;AAEA,yDAAkD;AAElD,yDAA4E;AAE5E;;GAEG;AACI,MAAM,sBAAsB,GAAG,KAAK;AACvC;;;GAGG;AACH,OAAe,EACf,eAAuB;AACvB;;GAEG;AACH,mBAA4B;AAC5B;;GAEG;AACH,QAAsC,EACxC,EAAE;IACA,MAAM,SAAS,GAAG,MAAM,IAAA,6BAAY,EAAC,OAAO,CAAC,CAAC;IAE9C,QAAQ,CACJ,IAAA,mCAAgB,EAAC;QACb,OAAO;QACP,IAAI,EAAE,eAAe;KACxB,CAAC,CACL,CAAC;IAEF,IAAI,mBAAmB,EAAE;QACrB,MAAM,IAAA,yCAAsB,EAAC,SAAS,CAAC,QAAQ,CAAC,QAAQ,EAAE,eAAe,CAAC,CAAC;KAC9E;AACL,CAAC,CAAC;AA5BW,QAAA,sBAAsB,0BA4BjC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"trackTransaction.d.ts","sourceRoot":"","sources":["../../../../src/redux-slices/transactions/trackTransaction.ts"],"names":[],"mappings":"AAEA,OAAO,EAAC,MAAM,EAAC,MAAM,QAAQ,CAAC;AAI9B,OAAO,EAAC,eAAe,EAAC,MAAM,aAAa,CAAC;AAa5C;;;;GAIG;AACH,eAAO,MAAM,sBAAsB,aACrB,OAAO,SAAS,CAAC,QAAQ,mBAClB,MAAM,KACxB,QAAQ,OAAO,SAAS,CAAC,kBAAkB,CACkC,CAAC;AAEjF;;GAEG;AACH,eAAO,MAAM,gBAAgB,kEA+B5B,CAAC"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.trackTransaction = exports.waitForOneConfirmation = void 0;
|
|
4
|
+
// Having a single "track" action makes it easy to use transaction tracking logic.
|
|
5
|
+
const toolkit_1 = require("@reduxjs/toolkit");
|
|
6
|
+
const ethers_1 = require("ethers");
|
|
7
|
+
const sdkReduxConfig_1 = require("../../sdkReduxConfig");
|
|
8
|
+
const utils_1 = require("../../utils");
|
|
9
|
+
const createTransactionSlice_1 = require("./createTransactionSlice");
|
|
10
|
+
/**
|
|
11
|
+
*
|
|
12
|
+
* @param provider
|
|
13
|
+
* @param transactionHash
|
|
14
|
+
*/
|
|
15
|
+
const waitForOneConfirmation = (provider, transactionHash) => provider.waitForTransaction(transactionHash, 1, utils_1.MillisecondTimes.TenMinutes);
|
|
16
|
+
exports.waitForOneConfirmation = waitForOneConfirmation;
|
|
17
|
+
/**
|
|
18
|
+
*
|
|
19
|
+
*/
|
|
20
|
+
exports.trackTransaction = (0, toolkit_1.createAsyncThunk)(`${createTransactionSlice_1.transactionSlicePrefix}/trackTransaction`, async (arg, { dispatch }) => {
|
|
21
|
+
dispatch((0, sdkReduxConfig_1.getTransactionSlice)().actions.upsertTransaction({
|
|
22
|
+
chainId: arg.chainId,
|
|
23
|
+
hash: arg.hash,
|
|
24
|
+
status: 'Pending',
|
|
25
|
+
}));
|
|
26
|
+
const framework = await (0, sdkReduxConfig_1.getFramework)(arg.chainId);
|
|
27
|
+
(0, exports.waitForOneConfirmation)(framework.settings.provider, arg.hash)
|
|
28
|
+
.then((_transactionReceipt) => {
|
|
29
|
+
// When Ethers successfully returns then we assume the transaction was mined as per documentation: https://docs.ethers.io/v5/api/providers/provider/#Provider-waitForTransaction
|
|
30
|
+
dispatch((0, sdkReduxConfig_1.getTransactionSlice)().actions.upsertTransaction({
|
|
31
|
+
chainId: arg.chainId,
|
|
32
|
+
hash: arg.hash,
|
|
33
|
+
status: 'Succeeded',
|
|
34
|
+
}));
|
|
35
|
+
monitorForLateErrors(framework.settings.provider, arg, dispatch);
|
|
36
|
+
})
|
|
37
|
+
.catch((ethersError) => {
|
|
38
|
+
notifyOfError(ethersError, arg, dispatch);
|
|
39
|
+
});
|
|
40
|
+
});
|
|
41
|
+
// i.e. monitor for re-orgs...
|
|
42
|
+
const monitorForLateErrors = (provider, { chainId, hash }, dispatch) => {
|
|
43
|
+
provider
|
|
44
|
+
.waitForTransaction(hash, 5, utils_1.MillisecondTimes.TenMinutes)
|
|
45
|
+
// When there's no error then that means a re-org didn't happen.
|
|
46
|
+
.catch((ethersError) => {
|
|
47
|
+
if (ethersError.code != ethers_1.ethers.errors.TIMEOUT) {
|
|
48
|
+
// Completely reset API cache.
|
|
49
|
+
dispatch((0, sdkReduxConfig_1.getApiSlice)().util.resetApiState());
|
|
50
|
+
dispatch((0, sdkReduxConfig_1.getSubgraphSlice)().util.resetApiState());
|
|
51
|
+
notifyOfError(ethersError, { chainId, hash: hash }, dispatch);
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
};
|
|
55
|
+
const notifyOfError = (ethersError, { chainId, hash }, dispatch) => {
|
|
56
|
+
dispatch((0, sdkReduxConfig_1.getTransactionSlice)().actions.upsertTransaction({
|
|
57
|
+
chainId: chainId,
|
|
58
|
+
hash: hash,
|
|
59
|
+
status: ethersError.code === ethers_1.ethers.errors.TIMEOUT ? 'Unknown' : 'Failed',
|
|
60
|
+
ethersErrorCode: ethersError.code,
|
|
61
|
+
ethersErrorMessage: ethersError.message,
|
|
62
|
+
}));
|
|
63
|
+
};
|
|
64
|
+
//# sourceMappingURL=trackTransaction.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"trackTransaction.js","sourceRoot":"","sources":["../../../../src/redux-slices/transactions/trackTransaction.ts"],"names":[],"mappings":";;;AAAA,kFAAkF;AAClF,8CAA4D;AAC5D,mCAA8B;AAE9B,yDAAsG;AACtG,uCAA6C;AAG7C,qEAAgE;AAWhE;;;;GAIG;AACI,MAAM,s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+
chainId: number;
|
|
5
|
+
hash: string;
|
|
6
|
+
status: TransactionStatus;
|
|
7
|
+
ethersErrorCode?: ethers.errors;
|
|
8
|
+
ethersErrorMessage?: string;
|
|
9
|
+
}
|
|
10
|
+
export declare const transactionsAdapter: import("@reduxjs/toolkit").EntityAdapter<TrackedTransaction>;
|
|
11
|
+
export declare const transactionSelectors: import("@reduxjs/toolkit").EntitySelectors<TrackedTransaction, import("@reduxjs/toolkit").EntityState<TrackedTransaction>>;
|
|
12
|
+
//# sourceMappingURL=trackedTransaction.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"trackedTransaction.d.ts","sourceRoot":"","sources":["../../../../src/redux-slices/transactions/trackedTransaction.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,MAAM,EAAC,MAAM,QAAQ,CAAC;AAE9B,oBAAY,iBAAiB,GAAG,SAAS,GAAG,WAAW,GAAG,QAAQ,GAAG,SAAS,CAAC;AAG/E,MAAM,WAAW,kBAAkB;IAC/B,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,iBAAiB,CAAC;IAC1B,eAAe,CAAC,EAAE,MAAM,CAAC,MAAM,CAAC;IAChC,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC/B;AAID,eAAO,MAAM,mBAAmB,8DAG9B,CAAC;AAEH,eAAO,MAAM,oBAAoB,4HAAqC,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.transactionSelectors = exports.transactionsAdapter = void 0;
|
|
4
|
+
const toolkit_1 = require("@reduxjs/toolkit");
|
|
5
|
+
const getTransactionId = (transaction) => `${transaction.chainId}_${transaction.hash}`;
|
|
6
|
+
exports.transactionsAdapter = (0, toolkit_1.createEntityAdapter)({
|
|
7
|
+
selectId: (transaction) => getTransactionId(transaction),
|
|
8
|
+
sortComparer: (a, b) => getTransactionId(a).localeCompare(getTransactionId(b)),
|
|
9
|
+
});
|
|
10
|
+
exports.transactionSelectors = exports.transactionsAdapter.getSelectors();
|
|
11
|
+
//# sourceMappingURL=trackedTransaction.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"trackedTransaction.js","sourceRoot":"","sources":["../../../../src/redux-slices/transactions/trackedTransaction.ts"],"names":[],"mappings":";;;AAAA,8CAAqD;AAcrD,MAAM,gBAAgB,GAAG,CAAC,WAA+B,EAAE,EAAE,CAAC,GAAG,WAAW,CAAC,OAAO,IAAI,WAAW,CAAC,IAAI,EAAE,CAAC;AAE9F,QAAA,mBAAmB,GAAG,IAAA,6BAAmB,EAAqB;IACvE,QAAQ,EAAE,CAAC,WAAW,EAAE,EAAE,CAAC,gBAAgB,CAAC,WAAW,CAAC;IACxD,YAAY,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,aAAa,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC;CACjF,CAAC,CAAC;AAEU,QAAA,oBAAoB,GAAG,2BAAmB,CAAC,YAAY,EAAE,CAAC"}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { Framework } from '@superfluid-finance/sdk-core';
|
|
2
|
+
import { Signer } from 'ethers';
|
|
3
|
+
import { SfApiSliceInferredType } from './redux-slices/rtk-query/sfApiSliceInferredType';
|
|
4
|
+
import { SfSubgraphSliceInferredType } from './redux-slices/rtk-query/subgraph-slice/sfSubgraphSliceInferredType';
|
|
5
|
+
import { SfTransactionSliceType } from './redux-slices/transactions/createTransactionSlice';
|
|
6
|
+
interface FrameworkLocator {
|
|
7
|
+
getFramework: (chainId: number) => Promise<Framework>;
|
|
8
|
+
setFramework: (chainId: number, frameworkOrFactory: Framework | (() => Promise<Framework>)) => void;
|
|
9
|
+
}
|
|
10
|
+
interface SignerLocator {
|
|
11
|
+
getSigner: (chainId: number) => Promise<Signer>;
|
|
12
|
+
setSigner: (chainId: number, signerOrFactory: Signer | (() => Promise<Signer>)) => void;
|
|
13
|
+
}
|
|
14
|
+
interface FrameworkAndSignerLocator extends FrameworkLocator, SignerLocator {
|
|
15
|
+
getFrameworkAndSigner: (chainId: number) => Promise<[framework: Framework, signer: Signer]>;
|
|
16
|
+
}
|
|
17
|
+
interface ApiSliceLocator {
|
|
18
|
+
getApiSlice: () => SfApiSliceInferredType;
|
|
19
|
+
setApiSlice: (slice: SfApiSliceInferredType) => void;
|
|
20
|
+
}
|
|
21
|
+
interface SubgraphSliceLocator {
|
|
22
|
+
getSubgraphSlice: () => SfSubgraphSliceInferredType;
|
|
23
|
+
setSubgraphSlice: (slice: SfSubgraphSliceInferredType) => void;
|
|
24
|
+
}
|
|
25
|
+
interface TransactionSliceLocator {
|
|
26
|
+
getTransactionSlice: () => SfTransactionSliceType;
|
|
27
|
+
setTransactionSlice: (slice: SfTransactionSliceType) => void;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* NOTE: The reason memoization is used is to avoid multiple instantiations by the factory functions.
|
|
31
|
+
*/
|
|
32
|
+
export default class SdkReduxConfig implements FrameworkAndSignerLocator, ApiSliceLocator, SubgraphSliceLocator, TransactionSliceLocator {
|
|
33
|
+
apiSlice: SfApiSliceInferredType | undefined;
|
|
34
|
+
subgraphSlice: SfSubgraphSliceInferredType | undefined;
|
|
35
|
+
transactionSlice: SfTransactionSliceType | undefined;
|
|
36
|
+
memoizedFrameworkFactories: Map<number, () => Promise<Framework>>;
|
|
37
|
+
memoizedSignerFactories: Map<number, () => Promise<Signer>>;
|
|
38
|
+
static getOrCreateSingleton(): SdkReduxConfig;
|
|
39
|
+
getApiSlice(): SfApiSliceInferredType;
|
|
40
|
+
getSubgraphSlice(): SfSubgraphSliceInferredType;
|
|
41
|
+
getFramework(chainId: number): Promise<Framework>;
|
|
42
|
+
getSigner(chainId: number): Promise<Signer>;
|
|
43
|
+
getTransactionSlice(): SfTransactionSliceType;
|
|
44
|
+
setApiSlice(slice: SfApiSliceInferredType): void;
|
|
45
|
+
setSubgraphSlice(slice: SfSubgraphSliceInferredType): void;
|
|
46
|
+
setFramework(chainId: number, instanceOrFactory: Framework | (() => Promise<Framework>)): void;
|
|
47
|
+
setSigner(chainId: number, instanceOrFactory: Signer | (() => Promise<Signer>)): void;
|
|
48
|
+
setTransactionSlice(slice: SfTransactionSliceType): void;
|
|
49
|
+
getFrameworkAndSigner(chainId: number): Promise<[framework: Framework, signer: Signer]>;
|
|
50
|
+
}
|
|
51
|
+
export declare const getConfig: typeof SdkReduxConfig.getOrCreateSingleton;
|
|
52
|
+
export declare const getApiSlice: () => import("@reduxjs/toolkit/dist/query").Api<import("@reduxjs/toolkit/dist/query").BaseQueryFn<void, unknown, import(".").ValidationError, Record<string, unknown>, import("./redux-slices/rtk-query/returnTypes").MutationMeta>, {
|
|
53
|
+
approveIndexSubscription: import("@reduxjs/toolkit/dist/query").MutationDefinition<import(".").ApproveIndexSubscription, import("@reduxjs/toolkit/dist/query").BaseQueryFn<void, unknown, import(".").ValidationError, Record<string, unknown>, import("./redux-slices/rtk-query/returnTypes").MutationMeta>, import("./redux-slices/rtk-query/cacheTags/CacheTagTypes").CacheTagTypes, import(".").TransactionInfo, "sfApi">;
|
|
54
|
+
claimFromIndexSubscription: import("@reduxjs/toolkit/dist/query").MutationDefinition<import(".").ClaimFromIndexSubscription, import("@reduxjs/toolkit/dist/query").BaseQueryFn<void, unknown, import(".").ValidationError, Record<string, unknown>, import("./redux-slices/rtk-query/returnTypes").MutationMeta>, import("./redux-slices/rtk-query/cacheTags/CacheTagTypes").CacheTagTypes, import(".").TransactionInfo, "sfApi">;
|
|
55
|
+
createFlow: import("@reduxjs/toolkit/dist/query").MutationDefinition<import(".").CreateFlow, import("@reduxjs/toolkit/dist/query").BaseQueryFn<void, unknown, import(".").ValidationError, Record<string, unknown>, import("./redux-slices/rtk-query/returnTypes").MutationMeta>, import("./redux-slices/rtk-query/cacheTags/CacheTagTypes").CacheTagTypes, import(".").TransactionInfo, "sfApi">;
|
|
56
|
+
createIndex: import("@reduxjs/toolkit/dist/query").MutationDefinition<import(".").CreateIndex, import("@reduxjs/toolkit/dist/query").BaseQueryFn<void, unknown, import(".").ValidationError, Record<string, unknown>, import("./redux-slices/rtk-query/returnTypes").MutationMeta>, import("./redux-slices/rtk-query/cacheTags/CacheTagTypes").CacheTagTypes, import(".").TransactionInfo, "sfApi">;
|
|
57
|
+
deleteFlow: import("@reduxjs/toolkit/dist/query").MutationDefinition<import(".").DeleteFlow, import("@reduxjs/toolkit/dist/query").BaseQueryFn<void, unknown, import(".").ValidationError, Record<string, unknown>, import("./redux-slices/rtk-query/returnTypes").MutationMeta>, import("./redux-slices/rtk-query/cacheTags/CacheTagTypes").CacheTagTypes, import(".").TransactionInfo, "sfApi">;
|
|
58
|
+
deleteIndexSubscription: import("@reduxjs/toolkit/dist/query").MutationDefinition<import(".").DeleteIndexSubscription, import("@reduxjs/toolkit/dist/query").BaseQueryFn<void, unknown, import(".").ValidationError, Record<string, unknown>, import("./redux-slices/rtk-query/returnTypes").MutationMeta>, import("./redux-slices/rtk-query/cacheTags/CacheTagTypes").CacheTagTypes, import(".").TransactionInfo, "sfApi">;
|
|
59
|
+
distributeToIndex: import("@reduxjs/toolkit/dist/query").MutationDefinition<import(".").DistributeToIndex, import("@reduxjs/toolkit/dist/query").BaseQueryFn<void, unknown, import(".").ValidationError, Record<string, unknown>, import("./redux-slices/rtk-query/returnTypes").MutationMeta>, import("./redux-slices/rtk-query/cacheTags/CacheTagTypes").CacheTagTypes, import(".").TransactionInfo, "sfApi">;
|
|
60
|
+
downgradeFromSuperToken: import("@reduxjs/toolkit/dist/query").MutationDefinition<import(".").DowngradeFromSuperToken, import("@reduxjs/toolkit/dist/query").BaseQueryFn<void, unknown, import(".").ValidationError, Record<string, unknown>, import("./redux-slices/rtk-query/returnTypes").MutationMeta>, import("./redux-slices/rtk-query/cacheTags/CacheTagTypes").CacheTagTypes, import(".").TransactionInfo, "sfApi">;
|
|
61
|
+
monitorForEventsToInvalidateCache: import("@reduxjs/toolkit/dist/query").MutationDefinition<import(".").MonitorForEventsToInvalidateCache, import("@reduxjs/toolkit/dist/query").BaseQueryFn<void, unknown, import(".").ValidationError, Record<string, unknown>, import("./redux-slices/rtk-query/returnTypes").MutationMeta>, import("./redux-slices/rtk-query/cacheTags/CacheTagTypes").CacheTagTypes, true, "sfApi">;
|
|
62
|
+
revokeIndexSubscription: import("@reduxjs/toolkit/dist/query").MutationDefinition<import(".").RevokeIndexSubscription, import("@reduxjs/toolkit/dist/query").BaseQueryFn<void, unknown, import(".").ValidationError, Record<string, unknown>, import("./redux-slices/rtk-query/returnTypes").MutationMeta>, import("./redux-slices/rtk-query/cacheTags/CacheTagTypes").CacheTagTypes, import(".").TransactionInfo, "sfApi">;
|
|
63
|
+
transferSuperToken: import("@reduxjs/toolkit/dist/query").MutationDefinition<import(".").TransferSuperToken, import("@reduxjs/toolkit/dist/query").BaseQueryFn<void, unknown, import(".").ValidationError, Record<string, unknown>, import("./redux-slices/rtk-query/returnTypes").MutationMeta>, import("./redux-slices/rtk-query/cacheTags/CacheTagTypes").CacheTagTypes, import(".").TransactionInfo, "sfApi">;
|
|
64
|
+
updateFlow: import("@reduxjs/toolkit/dist/query").MutationDefinition<import(".").UpdateFlow, import("@reduxjs/toolkit/dist/query").BaseQueryFn<void, unknown, import(".").ValidationError, Record<string, unknown>, import("./redux-slices/rtk-query/returnTypes").MutationMeta>, import("./redux-slices/rtk-query/cacheTags/CacheTagTypes").CacheTagTypes, import(".").TransactionInfo, "sfApi">;
|
|
65
|
+
updateIndexSubscriptionUnits: import("@reduxjs/toolkit/dist/query").MutationDefinition<import(".").UpdateIndexSubscriptionUnits, import("@reduxjs/toolkit/dist/query").BaseQueryFn<void, unknown, import(".").ValidationError, Record<string, unknown>, import("./redux-slices/rtk-query/returnTypes").MutationMeta>, import("./redux-slices/rtk-query/cacheTags/CacheTagTypes").CacheTagTypes, import(".").TransactionInfo, "sfApi">;
|
|
66
|
+
upgradeToSuperToken: import("@reduxjs/toolkit/dist/query").MutationDefinition<import(".").UpgradeToSuperToken, import("@reduxjs/toolkit/dist/query").BaseQueryFn<void, unknown, import(".").ValidationError, Record<string, unknown>, import("./redux-slices/rtk-query/returnTypes").MutationMeta>, import("./redux-slices/rtk-query/cacheTags/CacheTagTypes").CacheTagTypes, import(".").TransactionInfo, "sfApi">;
|
|
67
|
+
getAllowanceForUpgradeToSuperToken: import("@reduxjs/toolkit/dist/query").QueryDefinition<import(".").GetAllowanceForUpgradeToSuperToken, import("@reduxjs/toolkit/dist/query").BaseQueryFn<void, unknown, import(".").ValidationError, Record<string, unknown>, import("./redux-slices/rtk-query/returnTypes").MutationMeta>, import("./redux-slices/rtk-query/cacheTags/CacheTagTypes").CacheTagTypes, string, string>;
|
|
68
|
+
getIndex: import("@reduxjs/toolkit/dist/query").QueryDefinition<import(".").GetIndex, import("@reduxjs/toolkit/dist/query").BaseQueryFn<void, unknown, import(".").ValidationError, Record<string, unknown>, import("./redux-slices/rtk-query/returnTypes").MutationMeta>, import("./redux-slices/rtk-query/cacheTags/CacheTagTypes").CacheTagTypes, import("@superfluid-finance/sdk-core").IWeb3Index, string>;
|
|
69
|
+
getIndexSubscription: import("@reduxjs/toolkit/dist/query").QueryDefinition<import(".").GetIndexSubscriptions, import("@reduxjs/toolkit/dist/query").BaseQueryFn<void, unknown, import(".").ValidationError, Record<string, unknown>, import("./redux-slices/rtk-query/returnTypes").MutationMeta>, import("./redux-slices/rtk-query/cacheTags/CacheTagTypes").CacheTagTypes, import("@superfluid-finance/sdk-core").IWeb3Subscription, string>;
|
|
70
|
+
getRealtimeBalance: import("@reduxjs/toolkit/dist/query").QueryDefinition<import(".").GetRealtimeBalance, import("@reduxjs/toolkit/dist/query").BaseQueryFn<void, unknown, import(".").ValidationError, Record<string, unknown>, import("./redux-slices/rtk-query/returnTypes").MutationMeta>, import("./redux-slices/rtk-query/cacheTags/CacheTagTypes").CacheTagTypes, import(".").GetRealtimeBalanceResult, string>;
|
|
71
|
+
listEvents: import("@reduxjs/toolkit/dist/query").QueryDefinition<import(".").ListEvents, import("@reduxjs/toolkit/dist/query").BaseQueryFn<void, unknown, import(".").ValidationError, Record<string, unknown>, import("./redux-slices/rtk-query/returnTypes").MutationMeta>, import("./redux-slices/rtk-query/cacheTags/CacheTagTypes").CacheTagTypes, import("@superfluid-finance/sdk-core").PagedResult<import("@superfluid-finance/sdk-core").AllEvents>, string>;
|
|
72
|
+
listIndexes: import("@reduxjs/toolkit/dist/query").QueryDefinition<import(".").ListIndexes, import("@reduxjs/toolkit/dist/query").BaseQueryFn<void, unknown, import(".").ValidationError, Record<string, unknown>, import("./redux-slices/rtk-query/returnTypes").MutationMeta>, import("./redux-slices/rtk-query/cacheTags/CacheTagTypes").CacheTagTypes, import("@superfluid-finance/sdk-core").PagedResult<import("@superfluid-finance/sdk-core").IIndex>, string>;
|
|
73
|
+
listIndexSubscriptions: import("@reduxjs/toolkit/dist/query").QueryDefinition<import(".").ListIndexSubscriptions, import("@reduxjs/toolkit/dist/query").BaseQueryFn<void, unknown, import(".").ValidationError, Record<string, unknown>, import("./redux-slices/rtk-query/returnTypes").MutationMeta>, import("./redux-slices/rtk-query/cacheTags/CacheTagTypes").CacheTagTypes, import("@superfluid-finance/sdk-core").PagedResult<import("@superfluid-finance/sdk-core").IIndexSubscription>, string>;
|
|
74
|
+
listStreams: import("@reduxjs/toolkit/dist/query").QueryDefinition<import(".").ListStreams, import("@reduxjs/toolkit/dist/query").BaseQueryFn<void, unknown, import(".").ValidationError, Record<string, unknown>, import("./redux-slices/rtk-query/returnTypes").MutationMeta>, import("./redux-slices/rtk-query/cacheTags/CacheTagTypes").CacheTagTypes, import("@superfluid-finance/sdk-core").PagedResult<import("@superfluid-finance/sdk-core").IStream>, string>;
|
|
75
|
+
listSuperTokens: import("@reduxjs/toolkit/dist/query").QueryDefinition<import(".").ListSuperTokens, import("@reduxjs/toolkit/dist/query").BaseQueryFn<void, unknown, import(".").ValidationError, Record<string, unknown>, import("./redux-slices/rtk-query/returnTypes").MutationMeta>, import("./redux-slices/rtk-query/cacheTags/CacheTagTypes").CacheTagTypes, import("@superfluid-finance/sdk-core").PagedResult<import("@superfluid-finance/sdk-core").ISuperToken>, string>;
|
|
76
|
+
listUserInteractedSuperTokens: import("@reduxjs/toolkit/dist/query").QueryDefinition<import(".").ListUserInteractedSuperTokens, import("@reduxjs/toolkit/dist/query").BaseQueryFn<void, unknown, import(".").ValidationError, Record<string, unknown>, import("./redux-slices/rtk-query/returnTypes").MutationMeta>, import("./redux-slices/rtk-query/cacheTags/CacheTagTypes").CacheTagTypes, import("@superfluid-finance/sdk-core").PagedResult<import("@superfluid-finance/sdk-core").ILightAccountTokenSnapshot>, string>;
|
|
77
|
+
}, "sfApi", import("./redux-slices/rtk-query/cacheTags/CacheTagTypes").CacheTagTypes, keyof import("@reduxjs/toolkit/dist/query").ApiModules<any, any, any, any>>;
|
|
78
|
+
export declare const getSubgraphSlice: () => import("@reduxjs/toolkit/dist/query").Api<import("@reduxjs/toolkit/dist/query").BaseQueryFn<{
|
|
79
|
+
chainId: number;
|
|
80
|
+
handle: (framework: Framework) => Promise<unknown>;
|
|
81
|
+
}, unknown, import("@superfluid-finance/sdk-core").SFError, Record<string, unknown>, {}>, {}, "sfSubgraph", import("./redux-slices/rtk-query/cacheTags/CacheTagTypes").CacheTagTypes, keyof import("@reduxjs/toolkit/dist/query").ApiModules<any, any, any, any>>;
|
|
82
|
+
export declare const getTransactionSlice: () => import("@reduxjs/toolkit").Slice<import("@reduxjs/toolkit").EntityState<import(".").TrackedTransaction>, {
|
|
83
|
+
upsertTransaction: {
|
|
84
|
+
<S extends import("@reduxjs/toolkit").EntityState<import(".").TrackedTransaction>>(state: import("@reduxjs/toolkit/dist/tsHelpers").IsAny<S, import("@reduxjs/toolkit").EntityState<import(".").TrackedTransaction>, S>, entity: import(".").TrackedTransaction): S;
|
|
85
|
+
<S_1 extends import("@reduxjs/toolkit").EntityState<import(".").TrackedTransaction>>(state: import("@reduxjs/toolkit/dist/tsHelpers").IsAny<S_1, import("@reduxjs/toolkit").EntityState<import(".").TrackedTransaction>, S_1>, entity: {
|
|
86
|
+
payload: import(".").TrackedTransaction;
|
|
87
|
+
type: string;
|
|
88
|
+
}): S_1;
|
|
89
|
+
};
|
|
90
|
+
}, "sfTransactions">;
|
|
91
|
+
export declare const getFramework: (chainId: number) => Promise<Framework>;
|
|
92
|
+
export declare const getSigner: (chainId: number) => Promise<Signer>;
|
|
93
|
+
export declare const getFrameworkAndSigner: (chainId: number) => Promise<[framework: Framework, signer: Signer]>;
|
|
94
|
+
export {};
|
|
95
|
+
//# sourceMappingURL=sdkReduxConfig.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sdkReduxConfig.d.ts","sourceRoot":"","sources":["../../src/sdkReduxConfig.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAC,MAAM,8BAA8B,CAAC;AACvD,OAAO,EAAC,MAAM,EAAC,MAAM,QAAQ,CAAC;AAG9B,OAAO,EAAC,sBAAsB,EAAC,MAAM,iDAAiD,CAAC;AACvF,OAAO,EAAC,2BAA2B,EAAC,MAAM,qEAAqE,CAAC;AAChH,OAAO,EAAC,sBAAsB,EAAC,MAAM,oDAAoD,CAAC;AAE1F,UAAU,gBAAgB;IACtB,YAAY,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC,SAAS,CAAC,CAAC;IACtD,YAAY,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,kBAAkB,EAAE,SAAS,GAAG,CAAC,MAAM,OAAO,CAAC,SAAS,CAAC,CAAC,KAAK,IAAI,CAAC;CACvG;AAED,UAAU,aAAa;IACnB,SAAS,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;IAChD,SAAS,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,eAAe,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C,mBAAmB,IAAI,sBAAsB;IAO7C,WAAW,CAAC,KAAK,EAAE,sBAAsB,GAAG,IAAI;IAShD,gBAAgB,CAAC,KAAK,EAAE,2BAA2B,GAAG,IAAI;IAS1D,YAAY,CAAC,OAAO,EAAE,MAAM,EAAE,iBAAiB,EAAE,SAAS,GAAG,CAAC,MAAM,OAAO,CAAC,SAAS,CAAC,CAAC;IAQvF,SAAS,CAAC,OAAO,EAAE,MAAM,EAAE,iBAAiB,EAAE,MAAM,GAAG,CAAC,MAAM,OAAO,CAAC,MAAM,CAAC,CAAC;IAQ9E,mBAAmB,CAAC,KAAK,EAAE,sBAAsB,GAAG,IAAI;IASlD,qBAAqB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC,SAAS,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;CAGhG;AAED,eAAO,MAAM,SAAS,4CAAsC,CAAC;AAC7D,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;iKAAkC,CAAC;AAC3D,eAAO,MAAM,gBAAgB;;;iQAAuC,CAAC;AACrE,eAAO,MAAM,mBAAmB;;;;;;;;oBAA0C,CAAC;AAC3E,eAAO,MAAM,YAAY,YAAa,MAAM,uBAAsC,CAAC;AACnF,eAAO,MAAM,SAAS,YAAa,MAAM,oBAAmC,CAAC;AAC7E,eAAO,MAAM,qBAAqB,YAAa,MAAM,oDAA+C,CAAC"}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.getFrameworkAndSigner = exports.getSigner = exports.getFramework = exports.getTransactionSlice = exports.getSubgraphSlice = exports.getApiSlice = exports.getConfig = void 0;
|
|
7
|
+
const lodash_1 = __importDefault(require("lodash"));
|
|
8
|
+
/**
|
|
9
|
+
* NOTE: The reason memoization is used is to avoid multiple instantiations by the factory functions.
|
|
10
|
+
*/
|
|
11
|
+
class SdkReduxConfig {
|
|
12
|
+
constructor() {
|
|
13
|
+
this.memoizedFrameworkFactories = new Map();
|
|
14
|
+
this.memoizedSignerFactories = new Map();
|
|
15
|
+
}
|
|
16
|
+
static getOrCreateSingleton() {
|
|
17
|
+
if (!globalThis.sdkReduxConfig) {
|
|
18
|
+
globalThis.sdkReduxConfig = new SdkReduxConfig();
|
|
19
|
+
}
|
|
20
|
+
return globalThis.sdkReduxConfig;
|
|
21
|
+
}
|
|
22
|
+
getApiSlice() {
|
|
23
|
+
if (!this.apiSlice) {
|
|
24
|
+
throw Error('The ApiSlice has not been set. Are you sure you initialized SDK-Redux properly?');
|
|
25
|
+
}
|
|
26
|
+
return this.apiSlice;
|
|
27
|
+
}
|
|
28
|
+
getSubgraphSlice() {
|
|
29
|
+
if (!this.subgraphSlice) {
|
|
30
|
+
throw Error('The SubgraphSlice has not been set. Are you sure you initialized SDK-Redux properly?');
|
|
31
|
+
}
|
|
32
|
+
return this.subgraphSlice;
|
|
33
|
+
}
|
|
34
|
+
getFramework(chainId) {
|
|
35
|
+
const frameworkFactory = this.memoizedFrameworkFactories.get(chainId);
|
|
36
|
+
if (!frameworkFactory)
|
|
37
|
+
throw Error(`Don't know how to get Superfluid Framework. :( Please set up a *framework* source for chain [${chainId}].`);
|
|
38
|
+
return frameworkFactory();
|
|
39
|
+
}
|
|
40
|
+
getSigner(chainId) {
|
|
41
|
+
const signerFactory = this.memoizedSignerFactories.get(chainId);
|
|
42
|
+
if (!signerFactory)
|
|
43
|
+
throw Error(`Don't know how to get a signer. :( Please set up a *signer* source for chain [${chainId}].`);
|
|
44
|
+
return signerFactory();
|
|
45
|
+
}
|
|
46
|
+
getTransactionSlice() {
|
|
47
|
+
if (!this.transactionSlice) {
|
|
48
|
+
throw Error('The ApiSlice has not been set. Are you sure you initialized SDK-Redux properly?');
|
|
49
|
+
}
|
|
50
|
+
return this.transactionSlice;
|
|
51
|
+
}
|
|
52
|
+
setApiSlice(slice) {
|
|
53
|
+
if (this.apiSlice) {
|
|
54
|
+
console.log("Warning! ApiAlice was already set and will be overriden. This shouldn't be happening in production.");
|
|
55
|
+
}
|
|
56
|
+
this.apiSlice = slice;
|
|
57
|
+
}
|
|
58
|
+
setSubgraphSlice(slice) {
|
|
59
|
+
if (this.subgraphSlice) {
|
|
60
|
+
console.log("Warning! SubgraphSlice was already set and will be overriden. This shouldn't be happening in production.");
|
|
61
|
+
}
|
|
62
|
+
this.subgraphSlice = slice;
|
|
63
|
+
}
|
|
64
|
+
setFramework(chainId, instanceOrFactory) {
|
|
65
|
+
const frameworkFactory = isFramework(instanceOrFactory)
|
|
66
|
+
? () => Promise.resolve(instanceOrFactory)
|
|
67
|
+
: instanceOrFactory;
|
|
68
|
+
this.memoizedFrameworkFactories.set(chainId, lodash_1.default.memoize(frameworkFactory));
|
|
69
|
+
}
|
|
70
|
+
setSigner(chainId, instanceOrFactory) {
|
|
71
|
+
const signerFactory = isEthersSigner(instanceOrFactory)
|
|
72
|
+
? () => Promise.resolve(instanceOrFactory)
|
|
73
|
+
: instanceOrFactory;
|
|
74
|
+
this.memoizedSignerFactories.set(chainId, lodash_1.default.memoize(signerFactory));
|
|
75
|
+
}
|
|
76
|
+
setTransactionSlice(slice) {
|
|
77
|
+
if (this.transactionSlice) {
|
|
78
|
+
console.log("Warning! TransactionSlice was already set and will be overriden. This shouldn't be happening in production.");
|
|
79
|
+
}
|
|
80
|
+
this.transactionSlice = slice;
|
|
81
|
+
}
|
|
82
|
+
async getFrameworkAndSigner(chainId) {
|
|
83
|
+
return await Promise.all([this.getFramework(chainId), this.getSigner(chainId)]);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
exports.default = SdkReduxConfig;
|
|
87
|
+
exports.getConfig = SdkReduxConfig.getOrCreateSingleton;
|
|
88
|
+
const getApiSlice = () => (0, exports.getConfig)().getApiSlice();
|
|
89
|
+
exports.getApiSlice = getApiSlice;
|
|
90
|
+
const getSubgraphSlice = () => (0, exports.getConfig)().getSubgraphSlice();
|
|
91
|
+
exports.getSubgraphSlice = getSubgraphSlice;
|
|
92
|
+
const getTransactionSlice = () => (0, exports.getConfig)().getTransactionSlice();
|
|
93
|
+
exports.getTransactionSlice = getTransactionSlice;
|
|
94
|
+
const getFramework = (chainId) => (0, exports.getConfig)().getFramework(chainId);
|
|
95
|
+
exports.getFramework = getFramework;
|
|
96
|
+
const getSigner = (chainId) => (0, exports.getConfig)().getSigner(chainId);
|
|
97
|
+
exports.getSigner = getSigner;
|
|
98
|
+
const getFrameworkAndSigner = (chainId) => (0, exports.getConfig)().getFrameworkAndSigner(chainId);
|
|
99
|
+
exports.getFrameworkAndSigner = getFrameworkAndSigner;
|
|
100
|
+
const isEthersSigner = (value) => !!value.getAddress;
|
|
101
|
+
const isFramework = (value) => !!value.cfaV1;
|
|
102
|
+
//# sourceMappingURL=sdkReduxConfig.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sdkReduxConfig.js","sourceRoot":"","sources":["../../src/sdkReduxConfig.ts"],"names":[],"mappings":";;;;;;AAEA,oDAAuB;AAmCvB;;GAEG;AACH,MAAqB,cAAc;IAAnC;QAMI,+BAA0B,GAAG,IAAI,GAAG,EAAoC,CAAC;QACzE,4BAAuB,GAAG,IAAI,GAAG,EAAiC,CAAC;IA4FvE,CAAC;IA1FG,MAAM,CAAC,oBAAoB;QACvB,IAAI,CAAC,UAAU,CAAC,cAAc,EAAE;YAC5B,UAAU,CAAC,cAAc,GAAG,IAAI,cAAc,EAAE,CAAC;SACpD;QACD,OAAO,UAAU,CAAC,cAAc,CAAC;IACrC,CAAC;IAED,WAAW;QACP,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE;YAChB,MAAM,KAAK,CAAC,iFAAiF,CAAC,CAAC;SAClG;QACD,OAAO,IAAI,CAAC,QAAQ,CAAC;IACzB,CAAC;I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