@superfluid-finance/sdk-redux 0.3.1-dev.7b94c3f.0 → 0.3.1-dev.7df8a6a.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 +10 -0
- package/README.md +7 -7
- package/dist/main/reduxSlices/argTypes.d.ts +5 -0
- package/dist/main/reduxSlices/argTypes.d.ts.map +1 -1
- package/dist/main/reduxSlices/argTypes.js +1 -0
- package/dist/main/reduxSlices/argTypes.js.map +1 -1
- package/dist/main/reduxSlices/rtkQuery/cacheTags/invalidateSpecificCacheTagsForEvents.js +1 -1
- package/dist/main/reduxSlices/rtkQuery/cacheTags/invalidateSpecificCacheTagsForEvents.js.map +1 -1
- package/dist/main/reduxSlices/rtkQuery/getSerializeQueryArgs.d.ts.map +1 -1
- package/dist/main/reduxSlices/rtkQuery/getSerializeQueryArgs.js +8 -1
- package/dist/main/reduxSlices/rtkQuery/getSerializeQueryArgs.js.map +1 -1
- package/dist/main/reduxSlices/rtkQuery/rpcApiSlice/endpoints/flowEndpoints.js +9 -9
- package/dist/main/reduxSlices/rtkQuery/rpcApiSlice/endpoints/flowEndpoints.js.map +1 -1
- package/dist/main/reduxSlices/rtkQuery/rpcApiSlice/endpoints/indexEndpoints.js +21 -21
- package/dist/main/reduxSlices/rtkQuery/rpcApiSlice/endpoints/indexEndpoints.js.map +1 -1
- package/dist/main/reduxSlices/rtkQuery/rpcApiSlice/endpoints/superTokenEndpoints.js +9 -9
- package/dist/main/reduxSlices/rtkQuery/rpcApiSlice/endpoints/superTokenEndpoints.js.map +1 -1
- package/dist/main/reduxSlices/rtkQuery/subgraphApiSlice/endpoints/allSubgraphEndpoints.d.ts +2 -0
- package/dist/main/reduxSlices/rtkQuery/subgraphApiSlice/endpoints/allSubgraphEndpoints.d.ts.map +1 -1
- package/dist/main/reduxSlices/rtkQuery/subgraphApiSlice/endpoints/eventArgs.d.ts +7 -1
- package/dist/main/reduxSlices/rtkQuery/subgraphApiSlice/endpoints/eventArgs.d.ts.map +1 -1
- package/dist/main/reduxSlices/rtkQuery/subgraphApiSlice/endpoints/eventEndpoints.d.ts +4 -2
- package/dist/main/reduxSlices/rtkQuery/subgraphApiSlice/endpoints/eventEndpoints.d.ts.map +1 -1
- package/dist/main/reduxSlices/rtkQuery/subgraphApiSlice/endpoints/eventEndpoints.js +3 -1
- package/dist/main/reduxSlices/rtkQuery/subgraphApiSlice/endpoints/eventEndpoints.js.map +1 -1
- package/dist/main/sdkReduxConfig.d.ts +1 -8
- package/dist/main/sdkReduxConfig.d.ts.map +1 -1
- package/dist/main/sdkReduxConfig.js +1 -16
- package/dist/main/sdkReduxConfig.js.map +1 -1
- package/dist/main/sdkReduxInitialization.d.ts +0 -7
- package/dist/main/sdkReduxInitialization.d.ts.map +1 -1
- package/dist/main/sdkReduxInitialization.js +1 -8
- package/dist/main/sdkReduxInitialization.js.map +1 -1
- package/dist/main/utils.d.ts +8 -0
- package/dist/main/utils.d.ts.map +1 -1
- package/dist/main/utils.js +9 -1
- package/dist/main/utils.js.map +1 -1
- package/dist/module/reduxSlices/argTypes.d.ts +5 -0
- package/dist/module/reduxSlices/argTypes.d.ts.map +1 -1
- package/dist/module/reduxSlices/argTypes.js +1 -1
- package/dist/module/reduxSlices/argTypes.js.map +1 -1
- package/dist/module/reduxSlices/rtkQuery/cacheTags/invalidateSpecificCacheTagsForEvents.js +1 -1
- package/dist/module/reduxSlices/rtkQuery/cacheTags/invalidateSpecificCacheTagsForEvents.js.map +1 -1
- package/dist/module/reduxSlices/rtkQuery/getSerializeQueryArgs.d.ts.map +1 -1
- package/dist/module/reduxSlices/rtkQuery/getSerializeQueryArgs.js +8 -1
- package/dist/module/reduxSlices/rtkQuery/getSerializeQueryArgs.js.map +1 -1
- package/dist/module/reduxSlices/rtkQuery/rpcApiSlice/endpoints/flowEndpoints.js +10 -10
- package/dist/module/reduxSlices/rtkQuery/rpcApiSlice/endpoints/flowEndpoints.js.map +1 -1
- package/dist/module/reduxSlices/rtkQuery/rpcApiSlice/endpoints/indexEndpoints.js +22 -22
- package/dist/module/reduxSlices/rtkQuery/rpcApiSlice/endpoints/indexEndpoints.js.map +1 -1
- package/dist/module/reduxSlices/rtkQuery/rpcApiSlice/endpoints/superTokenEndpoints.js +10 -10
- package/dist/module/reduxSlices/rtkQuery/rpcApiSlice/endpoints/superTokenEndpoints.js.map +1 -1
- package/dist/module/reduxSlices/rtkQuery/subgraphApiSlice/endpoints/allSubgraphEndpoints.d.ts +2 -0
- package/dist/module/reduxSlices/rtkQuery/subgraphApiSlice/endpoints/allSubgraphEndpoints.d.ts.map +1 -1
- package/dist/module/reduxSlices/rtkQuery/subgraphApiSlice/endpoints/eventArgs.d.ts +7 -1
- package/dist/module/reduxSlices/rtkQuery/subgraphApiSlice/endpoints/eventArgs.d.ts.map +1 -1
- package/dist/module/reduxSlices/rtkQuery/subgraphApiSlice/endpoints/eventEndpoints.d.ts +4 -2
- package/dist/module/reduxSlices/rtkQuery/subgraphApiSlice/endpoints/eventEndpoints.d.ts.map +1 -1
- package/dist/module/reduxSlices/rtkQuery/subgraphApiSlice/endpoints/eventEndpoints.js +4 -2
- package/dist/module/reduxSlices/rtkQuery/subgraphApiSlice/endpoints/eventEndpoints.js.map +1 -1
- package/dist/module/sdkReduxConfig.d.ts +1 -8
- package/dist/module/sdkReduxConfig.d.ts.map +1 -1
- package/dist/module/sdkReduxConfig.js +0 -14
- package/dist/module/sdkReduxConfig.js.map +1 -1
- package/dist/module/sdkReduxInitialization.d.ts +0 -7
- package/dist/module/sdkReduxInitialization.d.ts.map +1 -1
- package/dist/module/sdkReduxInitialization.js +0 -6
- package/dist/module/sdkReduxInitialization.js.map +1 -1
- package/dist/module/utils.d.ts +8 -0
- package/dist/module/utils.d.ts.map +1 -1
- package/dist/module/utils.js +8 -0
- package/dist/module/utils.js.map +1 -1
- package/package.json +2 -2
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { NativeAssetSuperToken, WrapperSuperToken } from '@superfluid-finance/sdk-core';
|
|
2
|
-
import { getFramework
|
|
2
|
+
import { getFramework } from '../../../../sdkReduxConfig';
|
|
3
3
|
import { registerNewTransactionAndReturnQueryFnResult } from '../../../transactionTrackerSlice/registerNewTransaction';
|
|
4
4
|
import { createGeneralTags, createSpecificTags } from '../../cacheTags/CacheTagTypes';
|
|
5
5
|
export const createSuperTokenEndpoints = (builder) => ({
|
|
6
6
|
superTokenUpgrade: builder.mutation({
|
|
7
7
|
queryFn: async (arg, queryApi) => {
|
|
8
|
-
const signer = await getSigner(arg.chainId);
|
|
9
8
|
const framework = await getFramework(arg.chainId);
|
|
10
9
|
const superToken = await framework.loadSuperToken(arg.superTokenAddress);
|
|
11
10
|
const canUpgradeTokenType = superToken instanceof WrapperSuperToken || superToken instanceof NativeAssetSuperToken;
|
|
@@ -15,12 +14,13 @@ export const createSuperTokenEndpoints = (builder) => ({
|
|
|
15
14
|
const transactionResponse = await superToken
|
|
16
15
|
.upgrade({
|
|
17
16
|
amount: arg.amountWei,
|
|
17
|
+
overrides: arg.overrides,
|
|
18
18
|
})
|
|
19
|
-
.exec(signer);
|
|
19
|
+
.exec(arg.signer);
|
|
20
20
|
return await registerNewTransactionAndReturnQueryFnResult({
|
|
21
21
|
transactionResponse,
|
|
22
22
|
chainId: arg.chainId,
|
|
23
|
-
signer: await signer.getAddress(),
|
|
23
|
+
signer: await arg.signer.getAddress(),
|
|
24
24
|
waitForConfirmation: !!arg.waitForConfirmation,
|
|
25
25
|
dispatch: queryApi.dispatch,
|
|
26
26
|
title: 'Upgrade to Super Token',
|
|
@@ -52,7 +52,6 @@ export const createSuperTokenEndpoints = (builder) => ({
|
|
|
52
52
|
}),
|
|
53
53
|
superTokenDowngrade: builder.mutation({
|
|
54
54
|
queryFn: async (arg, queryApi) => {
|
|
55
|
-
const signer = await getSigner(arg.chainId);
|
|
56
55
|
const framework = await getFramework(arg.chainId);
|
|
57
56
|
const superToken = await framework.loadSuperToken(arg.superTokenAddress);
|
|
58
57
|
const canDowngradeTokenType = superToken instanceof WrapperSuperToken || superToken instanceof NativeAssetSuperToken;
|
|
@@ -62,12 +61,13 @@ export const createSuperTokenEndpoints = (builder) => ({
|
|
|
62
61
|
const transactionResponse = await superToken
|
|
63
62
|
.downgrade({
|
|
64
63
|
amount: arg.amountWei,
|
|
64
|
+
overrides: arg.overrides,
|
|
65
65
|
})
|
|
66
|
-
.exec(signer);
|
|
66
|
+
.exec(arg.signer);
|
|
67
67
|
return await registerNewTransactionAndReturnQueryFnResult({
|
|
68
68
|
transactionResponse,
|
|
69
69
|
chainId: arg.chainId,
|
|
70
|
-
signer: await signer.getAddress(),
|
|
70
|
+
signer: await arg.signer.getAddress(),
|
|
71
71
|
waitForConfirmation: !!arg.waitForConfirmation,
|
|
72
72
|
dispatch: queryApi.dispatch,
|
|
73
73
|
title: 'Downgrade from Super Token',
|
|
@@ -77,19 +77,19 @@ export const createSuperTokenEndpoints = (builder) => ({
|
|
|
77
77
|
}),
|
|
78
78
|
superTokenTransfer: builder.mutation({
|
|
79
79
|
queryFn: async (arg, queryApi) => {
|
|
80
|
-
const signer = await getSigner(arg.chainId);
|
|
81
80
|
const framework = await getFramework(arg.chainId);
|
|
82
81
|
const superToken = await framework.loadSuperToken(arg.superTokenAddress);
|
|
83
82
|
const transactionResponse = await superToken
|
|
84
83
|
.transfer({
|
|
85
84
|
amount: arg.amountWei,
|
|
86
85
|
receiver: arg.receiverAddress,
|
|
86
|
+
overrides: arg.overrides,
|
|
87
87
|
})
|
|
88
|
-
.exec(signer);
|
|
88
|
+
.exec(arg.signer);
|
|
89
89
|
return await registerNewTransactionAndReturnQueryFnResult({
|
|
90
90
|
transactionResponse,
|
|
91
91
|
chainId: arg.chainId,
|
|
92
|
-
signer: await signer.getAddress(),
|
|
92
|
+
signer: await arg.signer.getAddress(),
|
|
93
93
|
waitForConfirmation: !!arg.waitForConfirmation,
|
|
94
94
|
dispatch: queryApi.dispatch,
|
|
95
95
|
title: 'Transfer Super Token',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"superTokenEndpoints.js","sourceRoot":"","sources":["../../../../../../src/reduxSlices/rtkQuery/rpcApiSlice/endpoints/superTokenEndpoints.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,qBAAqB,EAAE,iBAAiB,EAAC,MAAM,8BAA8B,CAAC;AAEtF,OAAO,EAAC,YAAY,
|
|
1
|
+
{"version":3,"file":"superTokenEndpoints.js","sourceRoot":"","sources":["../../../../../../src/reduxSlices/rtkQuery/rpcApiSlice/endpoints/superTokenEndpoints.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,qBAAqB,EAAE,iBAAiB,EAAC,MAAM,8BAA8B,CAAC;AAEtF,OAAO,EAAC,YAAY,EAAC,MAAM,4BAA4B,CAAC;AAExD,OAAO,EAAC,4CAA4C,EAAC,MAAM,yDAAyD,CAAC;AACrH,OAAO,EAAC,iBAAiB,EAAE,kBAAkB,EAAC,MAAM,+BAA+B,CAAC;AAUpF,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,OAA2B,EAAE,EAAE,CAAC,CAAC;IACvE,iBAAiB,EAAE,OAAO,CAAC,QAAQ,CAA6C;QAC5E,OAAO,EAAE,KAAK,EAAE,GAAG,EAAE,QAAQ,EAAE,EAAE;YAC7B,MAAM,SAAS,GAAG,MAAM,YAAY,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;YAClD,MAAM,UAAU,GAAG,MAAM,SAAS,CAAC,cAAc,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC;YAEzE,MAAM,mBAAmB,GACrB,UAAU,YAAY,iBAAiB,IAAI,UAAU,YAAY,qBAAqB,CAAC;YAC3F,IAAI,CAAC,mBAAmB,EAAE;gBACtB,MAAM,IAAI,KAAK,CAAC,kEAAkE,CAAC,CAAC;aACvF;YAED,MAAM,mBAAmB,GAAG,MAAM,UAAU;iBACvC,OAAO,CAAC;gBACL,MAAM,EAAE,GAAG,CAAC,SAAS;gBACrB,SAAS,EA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SAAS,CAAC,cAAc,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC;YAEzE,MAAM,mBAAmB,GAAG,MAAM,UAAU;iBACvC,QAAQ,CAAC;gBACN,MAAM,EAAE,GAAG,CAAC,SAAS;gBACrB,QAAQ,EAAE,GAAG,CAAC,eAAe;gBAC7B,SAAS,EAAE,GAAG,CAAC,SAAS;aAC3B,CAAC;iBACD,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;YAEtB,OAAO,MAAM,4CAA4C,CAAC;gBACtD,mBAAmB;gBACnB,OAAO,EAAE,GAAG,CAAC,OAAO;gBACpB,MAAM,EAAE,MAAM,GAAG,CAAC,MAAM,CAAC,UAAU,EAAE;gBACrC,mBAAmB,EAAE,CAAC,CAAC,GAAG,CAAC,mBAAmB;gBAC9C,QAAQ,EAAE,QAAQ,CAAC,QAAQ;gBAC3B,KAAK,EAAE,sBAAsB;gBAC7B,SAAS,EAAE,GAAG,CAAC,oBAAoB;aACtC,CAAC,CAAC;QACP,CAAC;KACJ,CAAC;CACL,CAAC,CAAC"}
|
package/dist/module/reduxSlices/rtkQuery/subgraphApiSlice/endpoints/allSubgraphEndpoints.d.ts
CHANGED
|
@@ -29,6 +29,8 @@ export declare const allSubgraphEndpoints: {
|
|
|
29
29
|
indexUpdatedEvents: import("@reduxjs/toolkit/dist/query").QueryDefinition<import("./eventArgs").IndexUpdatedEventsQuery, import("@reduxjs/toolkit/dist/query").BaseQueryFn<void, unknown, import("@reduxjs/toolkit").SerializedError, Record<string, unknown>, {}>, import("../../cacheTags/CacheTagTypes").CacheTagType, import("@superfluid-finance/sdk-core").PagedResult<import("@superfluid-finance/sdk-core").IndexUpdatedEvent>, "superfluid_subgraph">;
|
|
30
30
|
subscriptionUnitsUpdatedEvent: import("@reduxjs/toolkit/dist/query").QueryDefinition<import("./eventArgs").SubscriptionUnitsUpdatedEventQuery, import("@reduxjs/toolkit/dist/query").BaseQueryFn<void, unknown, import("@reduxjs/toolkit").SerializedError, Record<string, unknown>, {}>, import("../../cacheTags/CacheTagTypes").CacheTagType, import("@superfluid-finance/sdk-core").SubscriptionUnitsUpdatedEvent | null, "superfluid_subgraph">;
|
|
31
31
|
subscriptionUnitsUpdatedEvents: import("@reduxjs/toolkit/dist/query").QueryDefinition<import("./eventArgs").SubscriptionUnitsUpdatedEventsQuery, import("@reduxjs/toolkit/dist/query").BaseQueryFn<void, unknown, import("@reduxjs/toolkit").SerializedError, Record<string, unknown>, {}>, import("../../cacheTags/CacheTagTypes").CacheTagType, import("@superfluid-finance/sdk-core").PagedResult<import("@superfluid-finance/sdk-core").SubscriptionUnitsUpdatedEvent>, "superfluid_subgraph">;
|
|
32
|
+
transferEvent: import("@reduxjs/toolkit/dist/query").QueryDefinition<import("./eventArgs").TransferEventQuery, import("@reduxjs/toolkit/dist/query").BaseQueryFn<void, unknown, import("@reduxjs/toolkit").SerializedError, Record<string, unknown>, {}>, import("../../cacheTags/CacheTagTypes").CacheTagType, import("@superfluid-finance/sdk-core").TransferEvent | null, "superfluid_subgraph">;
|
|
33
|
+
transferEvents: import("@reduxjs/toolkit/dist/query").QueryDefinition<import("./eventArgs").TransferEventsQuery, import("@reduxjs/toolkit/dist/query").BaseQueryFn<void, unknown, import("@reduxjs/toolkit").SerializedError, Record<string, unknown>, {}>, import("../../cacheTags/CacheTagTypes").CacheTagType, import("@superfluid-finance/sdk-core").PagedResult<import("@superfluid-finance/sdk-core").TransferEvent>, "superfluid_subgraph">;
|
|
32
34
|
};
|
|
33
35
|
};
|
|
34
36
|
//# sourceMappingURL=allSubgraphEndpoints.d.ts.map
|
package/dist/module/reduxSlices/rtkQuery/subgraphApiSlice/endpoints/allSubgraphEndpoints.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"allSubgraphEndpoints.d.ts","sourceRoot":"","sources":["../../../../../../src/reduxSlices/rtkQuery/subgraphApiSlice/endpoints/allSubgraphEndpoints.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,uBAAuB,EAAC,MAAM,4BAA4B,CAAC;AAMnE,eAAO,MAAM,oBAAoB;yBACR,uBAAuB
|
|
1
|
+
{"version":3,"file":"allSubgraphEndpoints.d.ts","sourceRoot":"","sources":["../../../../../../src/reduxSlices/rtkQuery/subgraphApiSlice/endpoints/allSubgraphEndpoints.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,uBAAuB,EAAC,MAAM,4BAA4B,CAAC;AAMnE,eAAO,MAAM,oBAAoB;yBACR,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAE/C,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { EventListQuery, FlowUpdatedEventListQuery, IndexUpdatedEventListQuery, SubgraphGetQuery, SubscriptionUnitsUpdatedEventListQuery } from '@superfluid-finance/sdk-core';
|
|
1
|
+
import { EventListQuery, FlowUpdatedEventListQuery, IndexUpdatedEventListQuery, SubgraphGetQuery, SubscriptionUnitsUpdatedEventListQuery, TransferEventListQuery } from '@superfluid-finance/sdk-core';
|
|
2
2
|
export interface EventQuery extends SubgraphGetQuery {
|
|
3
3
|
chainId: number;
|
|
4
4
|
}
|
|
@@ -23,4 +23,10 @@ export interface SubscriptionUnitsUpdatedEventQuery extends SubgraphGetQuery {
|
|
|
23
23
|
export interface SubscriptionUnitsUpdatedEventsQuery extends SubscriptionUnitsUpdatedEventListQuery {
|
|
24
24
|
chainId: number;
|
|
25
25
|
}
|
|
26
|
+
export interface TransferEventQuery extends SubgraphGetQuery {
|
|
27
|
+
chainId: number;
|
|
28
|
+
}
|
|
29
|
+
export interface TransferEventsQuery extends TransferEventListQuery {
|
|
30
|
+
chainId: number;
|
|
31
|
+
}
|
|
26
32
|
//# sourceMappingURL=eventArgs.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"eventArgs.d.ts","sourceRoot":"","sources":["../../../../../../src/reduxSlices/rtkQuery/subgraphApiSlice/endpoints/eventArgs.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,cAAc,EACd,yBAAyB,EACzB,0BAA0B,EAC1B,gBAAgB,EAChB,sCAAsC,
|
|
1
|
+
{"version":3,"file":"eventArgs.d.ts","sourceRoot":"","sources":["../../../../../../src/reduxSlices/rtkQuery/subgraphApiSlice/endpoints/eventArgs.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,cAAc,EACd,yBAAyB,EACzB,0BAA0B,EAC1B,gBAAgB,EAChB,sCAAsC,EACtC,sBAAsB,EACzB,MAAM,8BAA8B,CAAC;AAEtC,MAAM,WAAW,UAAW,SAAQ,gBAAgB;IAChD,OAAO,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,WAAY,SAAQ,cAAc;IAC/C,OAAO,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,qBAAsB,SAAQ,gBAAgB;IAC3D,OAAO,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,sBAAuB,SAAQ,yBAAyB;IACrE,OAAO,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,sBAAuB,SAAQ,gBAAgB;IAC5D,OAAO,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,uBAAwB,SAAQ,0BAA0B;IACvE,OAAO,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,kCAAmC,SAAQ,gBAAgB;IACxE,OAAO,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,mCAAoC,SAAQ,sCAAsC;IAC/F,OAAO,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,kBAAmB,SAAQ,gBAAgB;IACxD,OAAO,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,mBAAoB,SAAQ,sBAAsB;IAC/D,OAAO,EAAE,MAAM,CAAC;CACnB"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { AllEvents, FlowUpdatedEvent, IndexUpdatedEvent, PagedResult, SubscriptionUnitsUpdatedEvent } from '@superfluid-finance/sdk-core';
|
|
1
|
+
import { AllEvents, FlowUpdatedEvent, IndexUpdatedEvent, PagedResult, SubscriptionUnitsUpdatedEvent, TransferEvent } from '@superfluid-finance/sdk-core';
|
|
2
2
|
import { SubgraphEndpointBuilder } from '../subgraphEndpointBuilder';
|
|
3
|
-
import { EventQuery, EventsQuery, FlowUpdatedEventQuery, FlowUpdatedEventsQuery, IndexUpdatedEventQuery, IndexUpdatedEventsQuery, SubscriptionUnitsUpdatedEventQuery, SubscriptionUnitsUpdatedEventsQuery } from './eventArgs';
|
|
3
|
+
import { EventQuery, EventsQuery, FlowUpdatedEventQuery, FlowUpdatedEventsQuery, IndexUpdatedEventQuery, IndexUpdatedEventsQuery, SubscriptionUnitsUpdatedEventQuery, SubscriptionUnitsUpdatedEventsQuery, TransferEventQuery, TransferEventsQuery } from './eventArgs';
|
|
4
4
|
export declare const createEventQueryEndpoints: (builder: SubgraphEndpointBuilder) => {
|
|
5
5
|
event: import("@reduxjs/toolkit/dist/query").QueryDefinition<EventQuery, import("@reduxjs/toolkit/dist/query").BaseQueryFn<void, unknown, import("@reduxjs/toolkit").SerializedError, Record<string, unknown>, {}>, import("../../cacheTags/CacheTagTypes").CacheTagType, AllEvents | null, "superfluid_subgraph">;
|
|
6
6
|
events: import("@reduxjs/toolkit/dist/query").QueryDefinition<EventsQuery, import("@reduxjs/toolkit/dist/query").BaseQueryFn<void, unknown, import("@reduxjs/toolkit").SerializedError, Record<string, unknown>, {}>, import("../../cacheTags/CacheTagTypes").CacheTagType, PagedResult<AllEvents>, "superfluid_subgraph">;
|
|
@@ -10,5 +10,7 @@ export declare const createEventQueryEndpoints: (builder: SubgraphEndpointBuilde
|
|
|
10
10
|
indexUpdatedEvents: import("@reduxjs/toolkit/dist/query").QueryDefinition<IndexUpdatedEventsQuery, import("@reduxjs/toolkit/dist/query").BaseQueryFn<void, unknown, import("@reduxjs/toolkit").SerializedError, Record<string, unknown>, {}>, import("../../cacheTags/CacheTagTypes").CacheTagType, PagedResult<IndexUpdatedEvent>, "superfluid_subgraph">;
|
|
11
11
|
subscriptionUnitsUpdatedEvent: import("@reduxjs/toolkit/dist/query").QueryDefinition<SubscriptionUnitsUpdatedEventQuery, import("@reduxjs/toolkit/dist/query").BaseQueryFn<void, unknown, import("@reduxjs/toolkit").SerializedError, Record<string, unknown>, {}>, import("../../cacheTags/CacheTagTypes").CacheTagType, SubscriptionUnitsUpdatedEvent | null, "superfluid_subgraph">;
|
|
12
12
|
subscriptionUnitsUpdatedEvents: import("@reduxjs/toolkit/dist/query").QueryDefinition<SubscriptionUnitsUpdatedEventsQuery, import("@reduxjs/toolkit/dist/query").BaseQueryFn<void, unknown, import("@reduxjs/toolkit").SerializedError, Record<string, unknown>, {}>, import("../../cacheTags/CacheTagTypes").CacheTagType, PagedResult<SubscriptionUnitsUpdatedEvent>, "superfluid_subgraph">;
|
|
13
|
+
transferEvent: import("@reduxjs/toolkit/dist/query").QueryDefinition<TransferEventQuery, import("@reduxjs/toolkit/dist/query").BaseQueryFn<void, unknown, import("@reduxjs/toolkit").SerializedError, Record<string, unknown>, {}>, import("../../cacheTags/CacheTagTypes").CacheTagType, TransferEvent | null, "superfluid_subgraph">;
|
|
14
|
+
transferEvents: import("@reduxjs/toolkit/dist/query").QueryDefinition<TransferEventsQuery, import("@reduxjs/toolkit/dist/query").BaseQueryFn<void, unknown, import("@reduxjs/toolkit").SerializedError, Record<string, unknown>, {}>, import("../../cacheTags/CacheTagTypes").CacheTagType, PagedResult<TransferEvent>, "superfluid_subgraph">;
|
|
13
15
|
};
|
|
14
16
|
//# sourceMappingURL=eventEndpoints.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"eventEndpoints.d.ts","sourceRoot":"","sources":["../../../../../../src/reduxSlices/rtkQuery/subgraphApiSlice/endpoints/eventEndpoints.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,SAAS,EAET,gBAAgB,EAGhB,iBAAiB,EAEjB,WAAW,EAOX,6BAA6B,
|
|
1
|
+
{"version":3,"file":"eventEndpoints.d.ts","sourceRoot":"","sources":["../../../../../../src/reduxSlices/rtkQuery/subgraphApiSlice/endpoints/eventEndpoints.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,SAAS,EAET,gBAAgB,EAGhB,iBAAiB,EAEjB,WAAW,EAOX,6BAA6B,EAE7B,aAAa,EAEhB,MAAM,8BAA8B,CAAC;AAMtC,OAAO,EAAC,uBAAuB,EAAC,MAAM,4BAA4B,CAAC;AAEnE,OAAO,EACH,UAAU,EACV,WAAW,EACX,qBAAqB,EACrB,sBAAsB,EACtB,sBAAsB,EACtB,uBAAuB,EACvB,kCAAkC,EAClC,mCAAmC,EACnC,kBAAkB,EAClB,mBAAmB,EACtB,MAAM,aAAa,CAAC;AAErB,eAAO,MAAM,yBAAyB,YAAa,uBAAuB;;;;;;;;;;;CAezE,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { EventQueryHandler, FlowUpdatedEventQueryHandler, IndexUpdatedEventQueryHandler, SubscriptionUnitsUpdatedEventQueryHandler, } from '@superfluid-finance/sdk-core';
|
|
1
|
+
import { EventQueryHandler, FlowUpdatedEventQueryHandler, IndexUpdatedEventQueryHandler, SubscriptionUnitsUpdatedEventQueryHandler, TransferEventQueryHandler, } from '@superfluid-finance/sdk-core';
|
|
2
2
|
import { getSubgraphClient } from '../../../../sdkReduxConfig';
|
|
3
3
|
import { createGeneralTags } from '../../cacheTags/CacheTagTypes';
|
|
4
4
|
import { CacheTime } from '../../cacheTime';
|
|
@@ -14,7 +14,9 @@ export const createEventQueryEndpoints = (builder) => {
|
|
|
14
14
|
indexUpdatedEvent: get(builder, new IndexUpdatedEventQueryHandler()),
|
|
15
15
|
indexUpdatedEvents: list(builder, new IndexUpdatedEventQueryHandler()),
|
|
16
16
|
subscriptionUnitsUpdatedEvent: get(builder, new SubscriptionUnitsUpdatedEventQueryHandler()),
|
|
17
|
-
subscriptionUnitsUpdatedEvents: list(builder, new SubscriptionUnitsUpdatedEventQueryHandler())
|
|
17
|
+
subscriptionUnitsUpdatedEvents: list(builder, new SubscriptionUnitsUpdatedEventQueryHandler()),
|
|
18
|
+
transferEvent: get(builder, new TransferEventQueryHandler()),
|
|
19
|
+
transferEvents: list(builder, new TransferEventQueryHandler())
|
|
18
20
|
};
|
|
19
21
|
};
|
|
20
22
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"eventEndpoints.js","sourceRoot":"","sources":["../../../../../../src/reduxSlices/rtkQuery/subgraphApiSlice/endpoints/eventEndpoints.ts"],"names":[],"mappings":"AAAA,OAAO,EAEH,iBAAiB,EAEjB,4BAA4B,EAG5B,6BAA6B,EAS7B,yCAAyC,
|
|
1
|
+
{"version":3,"file":"eventEndpoints.js","sourceRoot":"","sources":["../../../../../../src/reduxSlices/rtkQuery/subgraphApiSlice/endpoints/eventEndpoints.ts"],"names":[],"mappings":"AAAA,OAAO,EAEH,iBAAiB,EAEjB,4BAA4B,EAG5B,6BAA6B,EAS7B,yCAAyC,EAEzC,yBAAyB,GAC5B,MAAM,8BAA8B,CAAC;AAEtC,OAAO,EAAC,iBAAiB,EAAC,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAC,iBAAiB,EAAC,MAAM,+BAA+B,CAAC;AAChE,OAAO,EAAC,SAAS,EAAC,MAAM,iBAAiB,CAAC;AAC1C,OAAO,EAAC,6CAA6C,EAAC,MAAM,kDAAkD,CAAC;AAgB/G,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,OAAgC,EAAE,EAAE;IAC1E,uEAAuE;IACvE,kBAAkB;IAClB,OAAO;QACH,KAAK,EAAE,GAAG,CAAwB,OAAO,EAAE,IAAI,iBAAiB,EAAE,CAAC;QACnE,MAAM,EAAE,IAAI,CAAyB,OAAO,EAAE,IAAI,iBAAiB,EAAE,CAAC;QACtE,gBAAgB,EAAE,GAAG,CAA0C,OAAO,EAAE,IAAI,4BAA4B,EAAE,CAAC;QAC3G,iBAAiB,EAAE,IAAI,CAA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AC;QACD,YAAY,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,EAAE,CAAC;YACpC,GAAG,iBAAiB,CAAC,EAAC,OAAO,EAAE,GAAG,CAAC,OAAO,EAAC,CAAC;YAC5C,GAAG,6CAA6C,CAC5C,GAAG,CAAC,OAAO,EACX,YAAY,CAAC,8BAA8B,CAAC,GAAG,CAAC,MAAM,CAAC,CAC1D;SACJ;KACJ,CAAC,CAAC;AACP,CAAC"}
|
|
@@ -7,10 +7,6 @@ interface FrameworkLocator {
|
|
|
7
7
|
getFramework: (chainId: number) => Promise<Framework>;
|
|
8
8
|
setFramework: (chainId: number, frameworkOrFactory: Framework | (() => Promise<Framework>)) => void;
|
|
9
9
|
}
|
|
10
|
-
interface SignerLocator {
|
|
11
|
-
getSigner: (chainId: number) => Promise<Signer>;
|
|
12
|
-
setSigner: (chainId: number, signerOrFactory: Signer | (() => Promise<Signer>)) => void;
|
|
13
|
-
}
|
|
14
10
|
interface RpcApiSliceLocator {
|
|
15
11
|
getRpcApiSlice: () => RpcApiSliceEmpty;
|
|
16
12
|
setRpcApiSlice: (api: RpcApiSliceEmpty) => void;
|
|
@@ -26,7 +22,7 @@ interface TransactionTrackerSliceLocator {
|
|
|
26
22
|
/**
|
|
27
23
|
* NOTE: The reason memoization is used is to avoid multiple instantiations by the factory functions.
|
|
28
24
|
*/
|
|
29
|
-
export default class SdkReduxConfig implements FrameworkLocator,
|
|
25
|
+
export default class SdkReduxConfig implements FrameworkLocator, RpcApiSliceLocator, SubgraphApiSliceLocator, TransactionTrackerSliceLocator {
|
|
30
26
|
rpcApiSlice: RpcApiSliceEmpty | undefined;
|
|
31
27
|
subgraphApiSlice: SubgraphApiSliceEmpty | undefined;
|
|
32
28
|
transactionTrackerSlice: TransactionTrackerSlice | undefined;
|
|
@@ -36,12 +32,10 @@ export default class SdkReduxConfig implements FrameworkLocator, SignerLocator,
|
|
|
36
32
|
getRpcApiSlice(): RpcApiSliceEmpty;
|
|
37
33
|
getSubgraphApiSlice(): SubgraphApiSliceEmpty;
|
|
38
34
|
getFramework(chainId: number): Promise<Framework>;
|
|
39
|
-
getSigner(chainId: number): Promise<Signer>;
|
|
40
35
|
getTransactionTrackerSlice(): TransactionTrackerSlice;
|
|
41
36
|
setRpcApiSlice(slice: RpcApiSliceEmpty): void;
|
|
42
37
|
setSubgraphApiSlice(slice: SubgraphApiSliceEmpty): void;
|
|
43
38
|
setFramework(chainId: number, instanceOrFactory: Framework | (() => Promise<Framework>)): void;
|
|
44
|
-
setSigner(chainId: number, instanceOrFactory: Signer | (() => Promise<Signer>)): void;
|
|
45
39
|
setTransactionTrackerSlice(slice: TransactionTrackerSlice): void;
|
|
46
40
|
}
|
|
47
41
|
export declare const getConfig: typeof SdkReduxConfig.getOrCreateSingleton;
|
|
@@ -87,6 +81,5 @@ export declare const getTransactionTrackerSlice: () => {
|
|
|
87
81
|
};
|
|
88
82
|
export declare const getFramework: (chainId: number) => Promise<Framework>;
|
|
89
83
|
export declare const getSubgraphClient: (chainId: number) => Promise<import("@superfluid-finance/sdk-core/dist/module/subgraph/SubgraphClient").SubgraphClient>;
|
|
90
|
-
export declare const getSigner: (chainId: number) => Promise<Signer>;
|
|
91
84
|
export {};
|
|
92
85
|
//# sourceMappingURL=sdkReduxConfig.d.ts.map
|
|
@@ -1 +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;AAK9B,OAAO,EAAC,gBAAgB,EAAC,MAAM,gDAAgD,CAAC;AAChF,OAAO,EAAC,qBAAqB,EAAC,MAAM,0DAA0D,CAAC;AAC/F,OAAO,EAAC,uBAAuB,EAAC,MAAM,+DAA+D,CAAC;AAEtG,UAAU,gBAAgB;IACtB,YAAY,EAAE,CAAC,OAA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ACjB,YAAW,gBAAgB,EAAE,kBAAkB,EAAE,uBAAuB,EAAE,8BAA8B;IAExG,WAAW,EAAE,gBAAgB,GAAG,SAAS,CAAC;IAC1C,gBAAgB,EAAE,qBAAqB,GAAG,SAAS,CAAC;IACpD,uBAAuB,EAAE,uBAAuB,GAAG,SAAS,CAAC;IAC7D,0BAA0B,oBAAyB,QAAQ,SAAS,CAAC,EAAI;IACzE,uBAAuB,oBAAyB,QAAQ,MAAM,CAAC,EAAI;IAEnE,MAAM,CAAC,oBAAoB,IAAI,cAAc;IAO7C,cAAc,IAAI,gBAAgB;IAOlC,mBAAmB,IAAI,qBAAqB;IAO5C,YAAY,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,SAAS,CAAC;IASjD,0BAA0B,IAAI,uBAAuB;IASrD,cAAc,CAAC,KAAK,EAAE,gBAAgB,GAAG,IAAI;IAS7C,mBAAmB,CAAC,KAAK,EAAE,qBAAqB,GAAG,IAAI;IASvD,YAAY,CAAC,OAAO,EAAE,MAAM,EAAE,iBAAiB,EAAE,SAAS,GAAG,CAAC,MAAM,OAAO,CAAC,SAAS,CAAC,CAAC;IAQvF,0BAA0B,CAAC,KAAK,EAAE,uBAAuB,GAAG,IAAI;CAQnE;AAED,eAAO,MAAM,SAAS,4CAAsC,CAAC;AAC7D,eAAO,MAAM,cAAc,qWAAqC,CAAC;AACjE,eAAO,MAAM,mBAAmB,0WAA0C,CAAC;AAC3E,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAAiD,CAAC;AACzF,eAAO,MAAM,YAAY,YAAa,MAAM,uBAAsC,CAAC;AACnF,eAAO,MAAM,iBAAiB,YAAa,MAAM,uGAGL,CAAC"}
|
|
@@ -31,12 +31,6 @@ export default class SdkReduxConfig {
|
|
|
31
31
|
throw Error(`Don't know how to get Superfluid Framework. :( Please set up a *framework* source for chain [${chainId}].`);
|
|
32
32
|
return frameworkFactory();
|
|
33
33
|
}
|
|
34
|
-
getSigner(chainId) {
|
|
35
|
-
const signerFactory = this.memoizedSignerFactories.get(chainId);
|
|
36
|
-
if (!signerFactory)
|
|
37
|
-
throw Error(`Don't know how to get a signer. :( Please set up a *signer* source for chain [${chainId}].`);
|
|
38
|
-
return signerFactory();
|
|
39
|
-
}
|
|
40
34
|
getTransactionTrackerSlice() {
|
|
41
35
|
if (!this.transactionTrackerSlice) {
|
|
42
36
|
throw Error('The TransactionTrackerSlice has not been set. Are you sure you initialized SDK-Redux properly?');
|
|
@@ -61,12 +55,6 @@ export default class SdkReduxConfig {
|
|
|
61
55
|
: instanceOrFactory;
|
|
62
56
|
this.memoizedFrameworkFactories.set(chainId, _.memoize(frameworkFactory));
|
|
63
57
|
}
|
|
64
|
-
setSigner(chainId, instanceOrFactory) {
|
|
65
|
-
const signerFactory = isEthersSigner(instanceOrFactory)
|
|
66
|
-
? () => Promise.resolve(instanceOrFactory)
|
|
67
|
-
: instanceOrFactory;
|
|
68
|
-
this.memoizedSignerFactories.set(chainId, _.memoize(signerFactory));
|
|
69
|
-
}
|
|
70
58
|
setTransactionTrackerSlice(slice) {
|
|
71
59
|
if (this.transactionTrackerSlice) {
|
|
72
60
|
console.log("Warning! TransactionTrackerSlice was already set and will be overriden. This shouldn't be happening in production.");
|
|
@@ -82,7 +70,5 @@ export const getFramework = (chainId) => getConfig().getFramework(chainId);
|
|
|
82
70
|
export const getSubgraphClient = (chainId) => getConfig()
|
|
83
71
|
.getFramework(chainId)
|
|
84
72
|
.then((x) => x.query.subgraphClient);
|
|
85
|
-
export const getSigner = (chainId) => getConfig().getSigner(chainId);
|
|
86
|
-
const isEthersSigner = (value) => !!value.getAddress;
|
|
87
73
|
const isFramework = (value) => !!value.cfaV1;
|
|
88
74
|
//# sourceMappingURL=sdkReduxConfig.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sdkReduxConfig.js","sourceRoot":"","sources":["../../src/sdkReduxConfig.ts"],"names":[],"mappings":"AAEA,OA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CAAC,YAAY,CAAC,OAAO,CAAC,CAAC;AACnF,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,OAAe,EAAE,EAAE,CACjD,SAAS,EAAE;KACN,YAAY,CAAC,OAAO,CAAC;KACrB,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC;AAE7C,MAAM,WAAW,GAAG,CAAC,KAAU,EAAsB,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { CreateApi } from '@reduxjs/toolkit/dist/query';
|
|
2
2
|
import { Framework } from '@superfluid-finance/sdk-core';
|
|
3
|
-
import { Signer } from 'ethers';
|
|
4
3
|
/**
|
|
5
4
|
* For initializing "rpcApiSlice" Redux slice.
|
|
6
5
|
*
|
|
@@ -56,12 +55,6 @@ export declare const initializeTransactionTrackerSlice: () => {
|
|
|
56
55
|
getInitialState: () => import("@reduxjs/toolkit").EntityState<import(".").TrackedTransaction>;
|
|
57
56
|
reducerPath: "superfluid_transactions";
|
|
58
57
|
};
|
|
59
|
-
/**
|
|
60
|
-
* SDK-Redux needs to know where to get the signer for mutations (i.e. transaction signing & broadcasting)
|
|
61
|
-
* @param chainId The chain.
|
|
62
|
-
* @param signer The Ethers signer getter. Can be either Promise or instance.
|
|
63
|
-
*/
|
|
64
|
-
export declare const setSignerForSdkRedux: (chainId: number, signer: (() => Promise<Signer>) | Signer) => void;
|
|
65
58
|
/**
|
|
66
59
|
* SDK-Redux needs to know where to get SDK-Core's Framework for data querying.
|
|
67
60
|
* @param chainId The chain.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sdkReduxInitialization.d.ts","sourceRoot":"","sources":["../../src/sdkReduxInitialization.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAC,MAAM,6BAA6B,CAAC;AAEtD,OAAO,EAAC,SAAS,EAAC,MAAM,8BAA8B,CAAC;
|
|
1
|
+
{"version":3,"file":"sdkReduxInitialization.d.ts","sourceRoot":"","sources":["../../src/sdkReduxInitialization.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAC,MAAM,6BAA6B,CAAC;AAEtD,OAAO,EAAC,SAAS,EAAC,MAAM,8BAA8B,CAAC;AAOvD;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB,yYAIjC,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,0BAA0B,8YAItC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,iCAAiC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAI7C,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,uBAAuB,YAAa,MAAM,aAAa,CAAC,MAAM,QAAQ,SAAS,CAAC,CAAC,GAAG,SAAS,SAC1D,CAAC"}
|
|
@@ -32,12 +32,6 @@ export const initializeTransactionTrackerSlice = () => {
|
|
|
32
32
|
getConfig().setTransactionTrackerSlice(transactiontTrackerSlice);
|
|
33
33
|
return transactiontTrackerSlice;
|
|
34
34
|
};
|
|
35
|
-
/**
|
|
36
|
-
* SDK-Redux needs to know where to get the signer for mutations (i.e. transaction signing & broadcasting)
|
|
37
|
-
* @param chainId The chain.
|
|
38
|
-
* @param signer The Ethers signer getter. Can be either Promise or instance.
|
|
39
|
-
*/
|
|
40
|
-
export const setSignerForSdkRedux = (chainId, signer) => getConfig().setSigner(chainId, signer);
|
|
41
35
|
/**
|
|
42
36
|
* SDK-Redux needs to know where to get SDK-Core's Framework for data querying.
|
|
43
37
|
* @param chainId The chain.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sdkReduxInitialization.js","sourceRoot":"","sources":["../../src/sdkReduxInitialization.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"sdkReduxInitialization.js","sourceRoot":"","sources":["../../src/sdkReduxInitialization.ts"],"names":[],"mappings":"AAIA,OAAO,EAAC,iBAAiB,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29
|
+
export declare const mutationOverridesKey: "overrides";
|
|
30
|
+
/**
|
|
31
|
+
* @private
|
|
32
|
+
*/
|
|
33
|
+
export declare const mutationSignerKey: "signer";
|
|
26
34
|
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/utils.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,eAAO,MAAM,SAAS,kBAAqB,CAAC;AAE5C;;;;GAIG;AACH,wBAAgB,QAAQ,CAAC,CAAC,EAAE,SAAS,EAAE,OAAO,GAAG,OAAO,EAAE,WAAW,EAAE,MAAM,CAAC,EAAE,GAAG,CAAC,EAAE,CAErF;AAED;;;GAGG;AACH,oBAAY,gBAAgB;IACxB,SAAS,OAAO;IAChB,WAAW,OAAO;IAClB,aAAa,QAAQ;IACrB,SAAS,QAAQ;IACjB,UAAU,SAAS;IACnB,YAAY,SAAS;IACrB,WAAW,SAAS;CACvB"}
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/utils.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,eAAO,MAAM,SAAS,kBAAqB,CAAC;AAE5C;;;;GAIG;AACH,wBAAgB,QAAQ,CAAC,CAAC,EAAE,SAAS,EAAE,OAAO,GAAG,OAAO,EAAE,WAAW,EAAE,MAAM,CAAC,EAAE,GAAG,CAAC,EAAE,CAErF;AAED;;;GAGG;AACH,oBAAY,gBAAgB;IACxB,SAAS,OAAO;IAChB,WAAW,OAAO;IAClB,aAAa,QAAQ;IACrB,SAAS,QAAQ;IACjB,UAAU,SAAS;IACnB,YAAY,SAAS;IACrB,WAAW,SAAS;CACvB;AAED;;GAEG;AACH,eAAO,MAAM,oBAAoB,aAAuB,CAAC;AAEzD;;GAEG;AACH,eAAO,MAAM,iBAAiB,UAAoB,CAAC"}
|
package/dist/module/utils.js
CHANGED
|
@@ -26,4 +26,12 @@ export var MillisecondTimes;
|
|
|
26
26
|
MillisecondTimes[MillisecondTimes["ThreeMinutes"] = 180000] = "ThreeMinutes";
|
|
27
27
|
MillisecondTimes[MillisecondTimes["FiveMinutes"] = 300000] = "FiveMinutes";
|
|
28
28
|
})(MillisecondTimes || (MillisecondTimes = {}));
|
|
29
|
+
/**
|
|
30
|
+
* @private
|
|
31
|
+
*/
|
|
32
|
+
export const mutationOverridesKey = 'overrides';
|
|
33
|
+
/**
|
|
34
|
+
* @private
|
|
35
|
+
*/
|
|
36
|
+
export const mutationSignerKey = 'signer';
|
|
29
37
|
//# sourceMappingURL=utils.js.map
|
package/dist/module/utils.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/utils.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG,CAAI,GAAM,EAAE,EAAE,CAAC,GAAG,CAAC;AAE5C;;;;GAIG;AACH,MAAM,UAAU,QAAQ,CAAI,SAA4B,EAAE,WAAsB;IAC5E,OAAO,SAAS,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;AAC1C,CAAC;AAED;;;GAGG;AACH,MAAM,CAAN,IAAY,gBAQX;AARD,WAAY,gBAAgB;IACxB,oEAAgB,CAAA;IAChB,wEAAkB,CAAA;IAClB,6EAAqB,CAAA;IACrB,qEAAiB,CAAA;IACjB,wEAAmB,CAAA;IACnB,4EAAqB,CAAA;IACrB,0EAAoB,CAAA;AACxB,CAAC,EARW,gBAAgB,KAAhB,gBAAgB,QAQ3B"}
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/utils.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG,CAAI,GAAM,EAAE,EAAE,CAAC,GAAG,CAAC;AAE5C;;;;GAIG;AACH,MAAM,UAAU,QAAQ,CAAI,SAA4B,EAAE,WAAsB;IAC5E,OAAO,SAAS,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;AAC1C,CAAC;AAED;;;GAGG;AACH,MAAM,CAAN,IAAY,gBAQX;AARD,WAAY,gBAAgB;IACxB,oEAAgB,CAAA;IAChB,wEAAkB,CAAA;IAClB,6EAAqB,CAAA;IACrB,qEAAiB,CAAA;IACjB,wEAAmB,CAAA;IACnB,4EAAqB,CAAA;IACrB,0EAAoB,CAAA;AACxB,CAAC,EARW,gBAAgB,KAAhB,gBAAgB,QAQ3B;AAED;;GAEG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,WAAoB,CAAC;AAEzD;;GAEG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,QAAiB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@superfluid-finance/sdk-redux",
|
|
3
|
-
"version": "0.3.1-dev.
|
|
3
|
+
"version": "0.3.1-dev.7df8a6a.0",
|
|
4
4
|
"description": "SDK Redux for streamlined front-end application development with Superfluid Protocol",
|
|
5
5
|
"homepage": "https://docs.superfluid.finance/",
|
|
6
6
|
"repository": {
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
},
|
|
49
49
|
"peerDependencies": {
|
|
50
50
|
"@reduxjs/toolkit": "^1.6.0 || ^1.7.0",
|
|
51
|
-
"@superfluid-finance/sdk-core": "~0.4.
|
|
51
|
+
"@superfluid-finance/sdk-core": "~0.4.3"
|
|
52
52
|
},
|
|
53
53
|
"files": [
|
|
54
54
|
"dist/main",
|