@superfluid-finance/sdk-core 0.3.3-dev.c77270b.0 → 0.3.3-dev.ce1e30c.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 +19 -1
- package/dist/index.umd.js +1290 -499
- package/dist/main/{Token.d.ts → ERC20Token.d.ts} +2 -2
- package/dist/main/ERC20Token.d.ts.map +1 -0
- package/dist/main/{Token.js → ERC20Token.js} +3 -3
- package/dist/main/ERC20Token.js.map +1 -0
- package/dist/main/Query.d.ts +5 -5
- package/dist/main/Query.d.ts.map +1 -1
- package/dist/main/Query.js +17 -15
- package/dist/main/Query.js.map +1 -1
- package/dist/main/SuperToken.d.ts +3 -3
- package/dist/main/SuperToken.d.ts.map +1 -1
- package/dist/main/SuperToken.js +3 -3
- package/dist/main/SuperToken.js.map +1 -1
- package/dist/main/abi/IConstantFlowAgreementV1.json +348 -0
- package/dist/main/index.d.ts +3 -0
- package/dist/main/index.d.ts.map +1 -1
- package/dist/main/index.js +4 -1
- package/dist/main/index.js.map +1 -1
- package/dist/main/pagination.d.ts +37 -0
- package/dist/main/pagination.d.ts.map +1 -1
- package/dist/main/pagination.js +34 -3
- package/dist/main/pagination.js.map +1 -1
- package/dist/main/subgraph/SubgraphClient.d.ts +2 -2
- package/dist/main/subgraph/SubgraphClient.d.ts.map +1 -1
- package/dist/main/subgraph/SubgraphClient.js +0 -12
- package/dist/main/subgraph/SubgraphClient.js.map +1 -1
- package/dist/main/subgraph/entities/account/account.d.ts +1 -0
- package/dist/main/subgraph/entities/account/account.d.ts.map +1 -1
- package/dist/main/subgraph/entities/account/accounts.generated.d.ts +2 -0
- package/dist/main/subgraph/entities/account/accounts.generated.d.ts.map +1 -1
- package/dist/main/subgraph/entities/account/accounts.generated.js +1 -1
- package/dist/main/subgraph/entities/account/accounts.generated.js.map +1 -1
- package/dist/main/subgraph/entities/accountTokenSnapshot/accountTokenSnapshot.d.ts +2 -0
- package/dist/main/subgraph/entities/accountTokenSnapshot/accountTokenSnapshot.d.ts.map +1 -1
- package/dist/main/subgraph/entities/accountTokenSnapshot/accountTokenSnapshot.js +1 -0
- package/dist/main/subgraph/entities/accountTokenSnapshot/accountTokenSnapshot.js.map +1 -1
- package/dist/main/subgraph/entities/accountTokenSnapshot/accountTokenSnapshots.generated.d.ts +3 -0
- package/dist/main/subgraph/entities/accountTokenSnapshot/accountTokenSnapshots.generated.d.ts.map +1 -1
- package/dist/main/subgraph/entities/accountTokenSnapshot/accountTokenSnapshots.generated.js +1 -1
- package/dist/main/subgraph/entities/accountTokenSnapshot/accountTokenSnapshots.generated.js.map +1 -1
- package/dist/main/subgraph/entities/index/index.d.ts +2 -0
- package/dist/main/subgraph/entities/index/index.d.ts.map +1 -1
- package/dist/main/subgraph/entities/index/index.js +1 -0
- package/dist/main/subgraph/entities/index/index.js.map +1 -1
- package/dist/main/subgraph/entities/index/indexes.generated.d.ts +3 -0
- package/dist/main/subgraph/entities/index/indexes.generated.d.ts.map +1 -1
- package/dist/main/subgraph/entities/index/indexes.generated.js +1 -1
- package/dist/main/subgraph/entities/index/indexes.generated.js.map +1 -1
- package/dist/main/subgraph/entities/indexSubscription/indexSubscription.d.ts +2 -0
- package/dist/main/subgraph/entities/indexSubscription/indexSubscription.d.ts.map +1 -1
- package/dist/main/subgraph/entities/indexSubscription/indexSubscription.js +1 -0
- package/dist/main/subgraph/entities/indexSubscription/indexSubscription.js.map +1 -1
- package/dist/main/subgraph/entities/indexSubscription/indexSubscriptions.generated.d.ts +3 -0
- package/dist/main/subgraph/entities/indexSubscription/indexSubscriptions.generated.d.ts.map +1 -1
- package/dist/main/subgraph/entities/indexSubscription/indexSubscriptions.generated.js +1 -1
- package/dist/main/subgraph/entities/indexSubscription/indexSubscriptions.generated.js.map +1 -1
- package/dist/main/subgraph/entities/stream/stream.d.ts +2 -0
- package/dist/main/subgraph/entities/stream/stream.d.ts.map +1 -1
- package/dist/main/subgraph/entities/stream/stream.js +1 -0
- package/dist/main/subgraph/entities/stream/stream.js.map +1 -1
- package/dist/main/subgraph/entities/stream/streams.generated.d.ts +3 -0
- package/dist/main/subgraph/entities/stream/streams.generated.d.ts.map +1 -1
- package/dist/main/subgraph/entities/stream/streams.generated.js +1 -1
- package/dist/main/subgraph/entities/stream/streams.generated.js.map +1 -1
- package/dist/main/subgraph/entities/streamPeriod/streamPeriod.d.ts +2 -0
- package/dist/main/subgraph/entities/streamPeriod/streamPeriod.d.ts.map +1 -1
- package/dist/main/subgraph/entities/streamPeriod/streamPeriod.js +1 -0
- package/dist/main/subgraph/entities/streamPeriod/streamPeriod.js.map +1 -1
- package/dist/main/subgraph/entities/streamPeriod/streamPeriods.generated.d.ts +3 -0
- package/dist/main/subgraph/entities/streamPeriod/streamPeriods.generated.d.ts.map +1 -1
- package/dist/main/subgraph/entities/streamPeriod/streamPeriods.generated.js +1 -1
- package/dist/main/subgraph/entities/streamPeriod/streamPeriods.generated.js.map +1 -1
- package/dist/main/subgraph/entities/token/token.d.ts +1 -0
- package/dist/main/subgraph/entities/token/token.d.ts.map +1 -1
- package/dist/main/subgraph/entities/token/tokens.generated.d.ts +2 -0
- package/dist/main/subgraph/entities/token/tokens.generated.d.ts.map +1 -1
- package/dist/main/subgraph/entities/token/tokens.generated.js +1 -1
- package/dist/main/subgraph/entities/token/tokens.generated.js.map +1 -1
- package/dist/main/subgraph/entities/tokenStatistic/tokenStatistic.d.ts +1 -0
- package/dist/main/subgraph/entities/tokenStatistic/tokenStatistic.d.ts.map +1 -1
- package/dist/main/subgraph/entities/tokenStatistic/tokenStatistics.generated.d.ts +2 -0
- package/dist/main/subgraph/entities/tokenStatistic/tokenStatistics.generated.d.ts.map +1 -1
- package/dist/main/subgraph/entities/tokenStatistic/tokenStatistics.generated.js +1 -1
- package/dist/main/subgraph/entities/tokenStatistic/tokenStatistics.generated.js.map +1 -1
- package/dist/main/subgraph/events/events.d.ts +1 -0
- package/dist/main/subgraph/events/events.d.ts.map +1 -1
- package/dist/main/subgraph/events/events.generated.d.ts +72 -0
- package/dist/main/subgraph/events/events.generated.d.ts.map +1 -1
- package/dist/main/subgraph/events/events.generated.js +36 -36
- package/dist/main/subgraph/events/events.generated.js.map +1 -1
- package/dist/main/subgraph/events/flowUpdatedEvent.d.ts +1 -0
- package/dist/main/subgraph/events/flowUpdatedEvent.d.ts.map +1 -1
- package/dist/main/subgraph/events/indexUpdatedEvent.d.ts +1 -0
- package/dist/main/subgraph/events/indexUpdatedEvent.d.ts.map +1 -1
- package/dist/main/subgraph/events/subscriptionUnitsUpdatedEvents.d.ts +1 -0
- package/dist/main/subgraph/events/subscriptionUnitsUpdatedEvents.d.ts.map +1 -1
- package/dist/main/subgraph/meta/meta.d.ts +15 -0
- package/dist/main/subgraph/meta/meta.d.ts.map +1 -0
- package/dist/main/subgraph/meta/meta.generated.d.ts +19 -0
- package/dist/main/subgraph/meta/meta.generated.d.ts.map +1 -0
- package/dist/main/subgraph/meta/meta.generated.js +5 -0
- package/dist/main/subgraph/meta/meta.generated.js.map +1 -0
- package/dist/main/subgraph/meta/meta.js +20 -0
- package/dist/main/subgraph/meta/meta.js.map +1 -0
- package/dist/main/subgraph/subgraphQueryHandler.d.ts +6 -3
- package/dist/main/subgraph/subgraphQueryHandler.d.ts.map +1 -1
- package/dist/main/subgraph/subgraphQueryHandler.js +30 -16
- package/dist/main/subgraph/subgraphQueryHandler.js.map +1 -1
- package/dist/main/typechain/IConstantFlowAgreementV1.d.ts +184 -0
- package/dist/main/typechain/IConstantFlowAgreementV1.d.ts.map +1 -1
- package/dist/main/typechain/factories/IConstantFlowAgreementV1__factory.d.ts.map +1 -1
- package/dist/main/typechain/factories/IConstantFlowAgreementV1__factory.js +348 -0
- package/dist/main/typechain/factories/IConstantFlowAgreementV1__factory.js.map +1 -1
- package/dist/module/{Token.d.ts → ERC20Token.d.ts} +2 -2
- package/dist/module/ERC20Token.d.ts.map +1 -0
- package/dist/module/{Token.js → ERC20Token.js} +2 -2
- package/dist/module/ERC20Token.js.map +1 -0
- package/dist/module/Query.d.ts +5 -5
- package/dist/module/Query.d.ts.map +1 -1
- package/dist/module/Query.js +15 -15
- package/dist/module/Query.js.map +1 -1
- package/dist/module/SuperToken.d.ts +3 -3
- package/dist/module/SuperToken.d.ts.map +1 -1
- package/dist/module/SuperToken.js +3 -3
- package/dist/module/SuperToken.js.map +1 -1
- package/dist/module/abi/IConstantFlowAgreementV1.json +348 -0
- package/dist/module/index.d.ts +3 -0
- package/dist/module/index.d.ts.map +1 -1
- package/dist/module/index.js +3 -0
- package/dist/module/index.js.map +1 -1
- package/dist/module/pagination.d.ts +37 -0
- package/dist/module/pagination.d.ts.map +1 -1
- package/dist/module/pagination.js +28 -3
- package/dist/module/pagination.js.map +1 -1
- package/dist/module/subgraph/SubgraphClient.d.ts +2 -2
- package/dist/module/subgraph/SubgraphClient.d.ts.map +1 -1
- package/dist/module/subgraph/SubgraphClient.js +1 -13
- package/dist/module/subgraph/SubgraphClient.js.map +1 -1
- package/dist/module/subgraph/entities/account/account.d.ts +1 -0
- package/dist/module/subgraph/entities/account/account.d.ts.map +1 -1
- package/dist/module/subgraph/entities/account/accounts.generated.d.ts +2 -0
- package/dist/module/subgraph/entities/account/accounts.generated.d.ts.map +1 -1
- package/dist/module/subgraph/entities/account/accounts.generated.js +1 -1
- package/dist/module/subgraph/entities/account/accounts.generated.js.map +1 -1
- package/dist/module/subgraph/entities/accountTokenSnapshot/accountTokenSnapshot.d.ts +2 -0
- package/dist/module/subgraph/entities/accountTokenSnapshot/accountTokenSnapshot.d.ts.map +1 -1
- package/dist/module/subgraph/entities/accountTokenSnapshot/accountTokenSnapshot.js +1 -0
- package/dist/module/subgraph/entities/accountTokenSnapshot/accountTokenSnapshot.js.map +1 -1
- package/dist/module/subgraph/entities/accountTokenSnapshot/accountTokenSnapshots.generated.d.ts +3 -0
- package/dist/module/subgraph/entities/accountTokenSnapshot/accountTokenSnapshots.generated.d.ts.map +1 -1
- package/dist/module/subgraph/entities/accountTokenSnapshot/accountTokenSnapshots.generated.js +1 -1
- package/dist/module/subgraph/entities/accountTokenSnapshot/accountTokenSnapshots.generated.js.map +1 -1
- package/dist/module/subgraph/entities/index/index.d.ts +2 -0
- package/dist/module/subgraph/entities/index/index.d.ts.map +1 -1
- package/dist/module/subgraph/entities/index/index.js +1 -0
- package/dist/module/subgraph/entities/index/index.js.map +1 -1
- package/dist/module/subgraph/entities/index/indexes.generated.d.ts +3 -0
- package/dist/module/subgraph/entities/index/indexes.generated.d.ts.map +1 -1
- package/dist/module/subgraph/entities/index/indexes.generated.js +1 -1
- package/dist/module/subgraph/entities/index/indexes.generated.js.map +1 -1
- package/dist/module/subgraph/entities/indexSubscription/indexSubscription.d.ts +2 -0
- package/dist/module/subgraph/entities/indexSubscription/indexSubscription.d.ts.map +1 -1
- package/dist/module/subgraph/entities/indexSubscription/indexSubscription.js +1 -0
- package/dist/module/subgraph/entities/indexSubscription/indexSubscription.js.map +1 -1
- package/dist/module/subgraph/entities/indexSubscription/indexSubscriptions.generated.d.ts +3 -0
- package/dist/module/subgraph/entities/indexSubscription/indexSubscriptions.generated.d.ts.map +1 -1
- package/dist/module/subgraph/entities/indexSubscription/indexSubscriptions.generated.js +1 -1
- package/dist/module/subgraph/entities/indexSubscription/indexSubscriptions.generated.js.map +1 -1
- package/dist/module/subgraph/entities/stream/stream.d.ts +2 -0
- package/dist/module/subgraph/entities/stream/stream.d.ts.map +1 -1
- package/dist/module/subgraph/entities/stream/stream.js +1 -0
- package/dist/module/subgraph/entities/stream/stream.js.map +1 -1
- package/dist/module/subgraph/entities/stream/streams.generated.d.ts +3 -0
- package/dist/module/subgraph/entities/stream/streams.generated.d.ts.map +1 -1
- package/dist/module/subgraph/entities/stream/streams.generated.js +1 -1
- package/dist/module/subgraph/entities/stream/streams.generated.js.map +1 -1
- package/dist/module/subgraph/entities/streamPeriod/streamPeriod.d.ts +2 -0
- package/dist/module/subgraph/entities/streamPeriod/streamPeriod.d.ts.map +1 -1
- package/dist/module/subgraph/entities/streamPeriod/streamPeriod.js +1 -0
- package/dist/module/subgraph/entities/streamPeriod/streamPeriod.js.map +1 -1
- package/dist/module/subgraph/entities/streamPeriod/streamPeriods.generated.d.ts +3 -0
- package/dist/module/subgraph/entities/streamPeriod/streamPeriods.generated.d.ts.map +1 -1
- package/dist/module/subgraph/entities/streamPeriod/streamPeriods.generated.js +1 -1
- package/dist/module/subgraph/entities/streamPeriod/streamPeriods.generated.js.map +1 -1
- package/dist/module/subgraph/entities/token/token.d.ts +1 -0
- package/dist/module/subgraph/entities/token/token.d.ts.map +1 -1
- package/dist/module/subgraph/entities/token/tokens.generated.d.ts +2 -0
- package/dist/module/subgraph/entities/token/tokens.generated.d.ts.map +1 -1
- package/dist/module/subgraph/entities/token/tokens.generated.js +1 -1
- package/dist/module/subgraph/entities/token/tokens.generated.js.map +1 -1
- package/dist/module/subgraph/entities/tokenStatistic/tokenStatistic.d.ts +1 -0
- package/dist/module/subgraph/entities/tokenStatistic/tokenStatistic.d.ts.map +1 -1
- package/dist/module/subgraph/entities/tokenStatistic/tokenStatistics.generated.d.ts +2 -0
- package/dist/module/subgraph/entities/tokenStatistic/tokenStatistics.generated.d.ts.map +1 -1
- package/dist/module/subgraph/entities/tokenStatistic/tokenStatistics.generated.js +1 -1
- package/dist/module/subgraph/entities/tokenStatistic/tokenStatistics.generated.js.map +1 -1
- package/dist/module/subgraph/events/events.d.ts +1 -0
- package/dist/module/subgraph/events/events.d.ts.map +1 -1
- package/dist/module/subgraph/events/events.generated.d.ts +72 -0
- package/dist/module/subgraph/events/events.generated.d.ts.map +1 -1
- package/dist/module/subgraph/events/events.generated.js +36 -36
- package/dist/module/subgraph/events/events.generated.js.map +1 -1
- package/dist/module/subgraph/events/flowUpdatedEvent.d.ts +1 -0
- package/dist/module/subgraph/events/flowUpdatedEvent.d.ts.map +1 -1
- package/dist/module/subgraph/events/indexUpdatedEvent.d.ts +1 -0
- package/dist/module/subgraph/events/indexUpdatedEvent.d.ts.map +1 -1
- package/dist/module/subgraph/events/subscriptionUnitsUpdatedEvents.d.ts +1 -0
- package/dist/module/subgraph/events/subscriptionUnitsUpdatedEvents.d.ts.map +1 -1
- package/dist/module/subgraph/meta/meta.d.ts +15 -0
- package/dist/module/subgraph/meta/meta.d.ts.map +1 -0
- package/dist/module/subgraph/meta/meta.generated.d.ts +19 -0
- package/dist/module/subgraph/meta/meta.generated.d.ts.map +1 -0
- package/dist/module/subgraph/meta/meta.generated.js +2 -0
- package/dist/module/subgraph/meta/meta.generated.js.map +1 -0
- package/dist/module/subgraph/meta/meta.js +16 -0
- package/dist/module/subgraph/meta/meta.js.map +1 -0
- package/dist/module/subgraph/subgraphQueryHandler.d.ts +6 -3
- package/dist/module/subgraph/subgraphQueryHandler.d.ts.map +1 -1
- package/dist/module/subgraph/subgraphQueryHandler.js +31 -17
- package/dist/module/subgraph/subgraphQueryHandler.js.map +1 -1
- package/dist/module/typechain/IConstantFlowAgreementV1.d.ts +184 -0
- package/dist/module/typechain/IConstantFlowAgreementV1.d.ts.map +1 -1
- package/dist/module/typechain/factories/IConstantFlowAgreementV1__factory.d.ts.map +1 -1
- package/dist/module/typechain/factories/IConstantFlowAgreementV1__factory.js +348 -0
- package/dist/module/typechain/factories/IConstantFlowAgreementV1__factory.js.map +1 -1
- package/package.json +2 -3
- package/dist/main/Token.d.ts.map +0 -1
- package/dist/main/Token.js.map +0 -1
- package/dist/module/Token.d.ts.map +0 -1
- package/dist/module/Token.js.map +0 -1
|
@@ -1,4 +1,41 @@
|
|
|
1
1
|
{ "abi": [
|
|
2
|
+
{
|
|
3
|
+
"anonymous": false,
|
|
4
|
+
"inputs": [
|
|
5
|
+
{
|
|
6
|
+
"indexed": true,
|
|
7
|
+
"internalType": "contract ISuperfluidToken",
|
|
8
|
+
"name": "token",
|
|
9
|
+
"type": "address"
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
"indexed": true,
|
|
13
|
+
"internalType": "address",
|
|
14
|
+
"name": "sender",
|
|
15
|
+
"type": "address"
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"indexed": true,
|
|
19
|
+
"internalType": "address",
|
|
20
|
+
"name": "flowOperator",
|
|
21
|
+
"type": "address"
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"indexed": false,
|
|
25
|
+
"internalType": "uint8",
|
|
26
|
+
"name": "permissions",
|
|
27
|
+
"type": "uint8"
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"indexed": false,
|
|
31
|
+
"internalType": "int96",
|
|
32
|
+
"name": "flowRateAllowance",
|
|
33
|
+
"type": "int96"
|
|
34
|
+
}
|
|
35
|
+
],
|
|
36
|
+
"name": "FlowOperatorUpdated",
|
|
37
|
+
"type": "event"
|
|
38
|
+
},
|
|
2
39
|
{
|
|
3
40
|
"anonymous": false,
|
|
4
41
|
"inputs": [
|
|
@@ -48,6 +85,25 @@
|
|
|
48
85
|
"name": "FlowUpdated",
|
|
49
86
|
"type": "event"
|
|
50
87
|
},
|
|
88
|
+
{
|
|
89
|
+
"anonymous": false,
|
|
90
|
+
"inputs": [
|
|
91
|
+
{
|
|
92
|
+
"indexed": true,
|
|
93
|
+
"internalType": "address",
|
|
94
|
+
"name": "flowOperator",
|
|
95
|
+
"type": "address"
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
"indexed": false,
|
|
99
|
+
"internalType": "uint256",
|
|
100
|
+
"name": "deposit",
|
|
101
|
+
"type": "uint256"
|
|
102
|
+
}
|
|
103
|
+
],
|
|
104
|
+
"name": "FlowUpdatedExtension",
|
|
105
|
+
"type": "event"
|
|
106
|
+
},
|
|
51
107
|
{
|
|
52
108
|
"inputs": [
|
|
53
109
|
{
|
|
@@ -206,6 +262,186 @@
|
|
|
206
262
|
"stateMutability": "view",
|
|
207
263
|
"type": "function"
|
|
208
264
|
},
|
|
265
|
+
{
|
|
266
|
+
"inputs": [
|
|
267
|
+
{
|
|
268
|
+
"internalType": "contract ISuperfluidToken",
|
|
269
|
+
"name": "token",
|
|
270
|
+
"type": "address"
|
|
271
|
+
},
|
|
272
|
+
{
|
|
273
|
+
"internalType": "address",
|
|
274
|
+
"name": "sender",
|
|
275
|
+
"type": "address"
|
|
276
|
+
},
|
|
277
|
+
{
|
|
278
|
+
"internalType": "address",
|
|
279
|
+
"name": "flowOperator",
|
|
280
|
+
"type": "address"
|
|
281
|
+
},
|
|
282
|
+
{
|
|
283
|
+
"internalType": "uint8",
|
|
284
|
+
"name": "permissions",
|
|
285
|
+
"type": "uint8"
|
|
286
|
+
},
|
|
287
|
+
{
|
|
288
|
+
"internalType": "int96",
|
|
289
|
+
"name": "flowRateAllowance",
|
|
290
|
+
"type": "int96"
|
|
291
|
+
},
|
|
292
|
+
{
|
|
293
|
+
"internalType": "bytes",
|
|
294
|
+
"name": "ctx",
|
|
295
|
+
"type": "bytes"
|
|
296
|
+
}
|
|
297
|
+
],
|
|
298
|
+
"name": "updateFlowOperatorPermissions",
|
|
299
|
+
"outputs": [
|
|
300
|
+
{
|
|
301
|
+
"internalType": "bytes",
|
|
302
|
+
"name": "newCtx",
|
|
303
|
+
"type": "bytes"
|
|
304
|
+
}
|
|
305
|
+
],
|
|
306
|
+
"stateMutability": "nonpayable",
|
|
307
|
+
"type": "function"
|
|
308
|
+
},
|
|
309
|
+
{
|
|
310
|
+
"inputs": [
|
|
311
|
+
{
|
|
312
|
+
"internalType": "contract ISuperfluidToken",
|
|
313
|
+
"name": "token",
|
|
314
|
+
"type": "address"
|
|
315
|
+
},
|
|
316
|
+
{
|
|
317
|
+
"internalType": "address",
|
|
318
|
+
"name": "sender",
|
|
319
|
+
"type": "address"
|
|
320
|
+
},
|
|
321
|
+
{
|
|
322
|
+
"internalType": "address",
|
|
323
|
+
"name": "flowOperator",
|
|
324
|
+
"type": "address"
|
|
325
|
+
},
|
|
326
|
+
{
|
|
327
|
+
"internalType": "bytes",
|
|
328
|
+
"name": "ctx",
|
|
329
|
+
"type": "bytes"
|
|
330
|
+
}
|
|
331
|
+
],
|
|
332
|
+
"name": "authorizeFlowOperatorWithFullControl",
|
|
333
|
+
"outputs": [
|
|
334
|
+
{
|
|
335
|
+
"internalType": "bytes",
|
|
336
|
+
"name": "newCtx",
|
|
337
|
+
"type": "bytes"
|
|
338
|
+
}
|
|
339
|
+
],
|
|
340
|
+
"stateMutability": "nonpayable",
|
|
341
|
+
"type": "function"
|
|
342
|
+
},
|
|
343
|
+
{
|
|
344
|
+
"inputs": [
|
|
345
|
+
{
|
|
346
|
+
"internalType": "contract ISuperfluidToken",
|
|
347
|
+
"name": "token",
|
|
348
|
+
"type": "address"
|
|
349
|
+
},
|
|
350
|
+
{
|
|
351
|
+
"internalType": "address",
|
|
352
|
+
"name": "sender",
|
|
353
|
+
"type": "address"
|
|
354
|
+
},
|
|
355
|
+
{
|
|
356
|
+
"internalType": "address",
|
|
357
|
+
"name": "flowOperator",
|
|
358
|
+
"type": "address"
|
|
359
|
+
},
|
|
360
|
+
{
|
|
361
|
+
"internalType": "bytes",
|
|
362
|
+
"name": "ctx",
|
|
363
|
+
"type": "bytes"
|
|
364
|
+
}
|
|
365
|
+
],
|
|
366
|
+
"name": "revokeFlowOperatorWithFullControl",
|
|
367
|
+
"outputs": [
|
|
368
|
+
{
|
|
369
|
+
"internalType": "bytes",
|
|
370
|
+
"name": "newCtx",
|
|
371
|
+
"type": "bytes"
|
|
372
|
+
}
|
|
373
|
+
],
|
|
374
|
+
"stateMutability": "nonpayable",
|
|
375
|
+
"type": "function"
|
|
376
|
+
},
|
|
377
|
+
{
|
|
378
|
+
"inputs": [
|
|
379
|
+
{
|
|
380
|
+
"internalType": "contract ISuperfluidToken",
|
|
381
|
+
"name": "token",
|
|
382
|
+
"type": "address"
|
|
383
|
+
},
|
|
384
|
+
{
|
|
385
|
+
"internalType": "address",
|
|
386
|
+
"name": "sender",
|
|
387
|
+
"type": "address"
|
|
388
|
+
},
|
|
389
|
+
{
|
|
390
|
+
"internalType": "address",
|
|
391
|
+
"name": "flowOperator",
|
|
392
|
+
"type": "address"
|
|
393
|
+
}
|
|
394
|
+
],
|
|
395
|
+
"name": "getFlowOperatorData",
|
|
396
|
+
"outputs": [
|
|
397
|
+
{
|
|
398
|
+
"internalType": "bytes32",
|
|
399
|
+
"name": "flowOperatorId",
|
|
400
|
+
"type": "bytes32"
|
|
401
|
+
},
|
|
402
|
+
{
|
|
403
|
+
"internalType": "uint8",
|
|
404
|
+
"name": "permissions",
|
|
405
|
+
"type": "uint8"
|
|
406
|
+
},
|
|
407
|
+
{
|
|
408
|
+
"internalType": "int96",
|
|
409
|
+
"name": "flowRateAllowance",
|
|
410
|
+
"type": "int96"
|
|
411
|
+
}
|
|
412
|
+
],
|
|
413
|
+
"stateMutability": "view",
|
|
414
|
+
"type": "function"
|
|
415
|
+
},
|
|
416
|
+
{
|
|
417
|
+
"inputs": [
|
|
418
|
+
{
|
|
419
|
+
"internalType": "contract ISuperfluidToken",
|
|
420
|
+
"name": "token",
|
|
421
|
+
"type": "address"
|
|
422
|
+
},
|
|
423
|
+
{
|
|
424
|
+
"internalType": "bytes32",
|
|
425
|
+
"name": "flowOperatorId",
|
|
426
|
+
"type": "bytes32"
|
|
427
|
+
}
|
|
428
|
+
],
|
|
429
|
+
"name": "getFlowOperatorDataByID",
|
|
430
|
+
"outputs": [
|
|
431
|
+
{
|
|
432
|
+
"internalType": "uint8",
|
|
433
|
+
"name": "permissions",
|
|
434
|
+
"type": "uint8"
|
|
435
|
+
},
|
|
436
|
+
{
|
|
437
|
+
"internalType": "int96",
|
|
438
|
+
"name": "flowRateAllowance",
|
|
439
|
+
"type": "int96"
|
|
440
|
+
}
|
|
441
|
+
],
|
|
442
|
+
"stateMutability": "view",
|
|
443
|
+
"type": "function"
|
|
444
|
+
},
|
|
209
445
|
{
|
|
210
446
|
"inputs": [
|
|
211
447
|
{
|
|
@@ -240,6 +476,45 @@
|
|
|
240
476
|
"stateMutability": "nonpayable",
|
|
241
477
|
"type": "function"
|
|
242
478
|
},
|
|
479
|
+
{
|
|
480
|
+
"inputs": [
|
|
481
|
+
{
|
|
482
|
+
"internalType": "contract ISuperfluidToken",
|
|
483
|
+
"name": "token",
|
|
484
|
+
"type": "address"
|
|
485
|
+
},
|
|
486
|
+
{
|
|
487
|
+
"internalType": "address",
|
|
488
|
+
"name": "sender",
|
|
489
|
+
"type": "address"
|
|
490
|
+
},
|
|
491
|
+
{
|
|
492
|
+
"internalType": "address",
|
|
493
|
+
"name": "receiver",
|
|
494
|
+
"type": "address"
|
|
495
|
+
},
|
|
496
|
+
{
|
|
497
|
+
"internalType": "int96",
|
|
498
|
+
"name": "flowRate",
|
|
499
|
+
"type": "int96"
|
|
500
|
+
},
|
|
501
|
+
{
|
|
502
|
+
"internalType": "bytes",
|
|
503
|
+
"name": "ctx",
|
|
504
|
+
"type": "bytes"
|
|
505
|
+
}
|
|
506
|
+
],
|
|
507
|
+
"name": "createFlowByOperator",
|
|
508
|
+
"outputs": [
|
|
509
|
+
{
|
|
510
|
+
"internalType": "bytes",
|
|
511
|
+
"name": "newCtx",
|
|
512
|
+
"type": "bytes"
|
|
513
|
+
}
|
|
514
|
+
],
|
|
515
|
+
"stateMutability": "nonpayable",
|
|
516
|
+
"type": "function"
|
|
517
|
+
},
|
|
243
518
|
{
|
|
244
519
|
"inputs": [
|
|
245
520
|
{
|
|
@@ -274,6 +549,45 @@
|
|
|
274
549
|
"stateMutability": "nonpayable",
|
|
275
550
|
"type": "function"
|
|
276
551
|
},
|
|
552
|
+
{
|
|
553
|
+
"inputs": [
|
|
554
|
+
{
|
|
555
|
+
"internalType": "contract ISuperfluidToken",
|
|
556
|
+
"name": "token",
|
|
557
|
+
"type": "address"
|
|
558
|
+
},
|
|
559
|
+
{
|
|
560
|
+
"internalType": "address",
|
|
561
|
+
"name": "sender",
|
|
562
|
+
"type": "address"
|
|
563
|
+
},
|
|
564
|
+
{
|
|
565
|
+
"internalType": "address",
|
|
566
|
+
"name": "receiver",
|
|
567
|
+
"type": "address"
|
|
568
|
+
},
|
|
569
|
+
{
|
|
570
|
+
"internalType": "int96",
|
|
571
|
+
"name": "flowRate",
|
|
572
|
+
"type": "int96"
|
|
573
|
+
},
|
|
574
|
+
{
|
|
575
|
+
"internalType": "bytes",
|
|
576
|
+
"name": "ctx",
|
|
577
|
+
"type": "bytes"
|
|
578
|
+
}
|
|
579
|
+
],
|
|
580
|
+
"name": "updateFlowByOperator",
|
|
581
|
+
"outputs": [
|
|
582
|
+
{
|
|
583
|
+
"internalType": "bytes",
|
|
584
|
+
"name": "newCtx",
|
|
585
|
+
"type": "bytes"
|
|
586
|
+
}
|
|
587
|
+
],
|
|
588
|
+
"stateMutability": "nonpayable",
|
|
589
|
+
"type": "function"
|
|
590
|
+
},
|
|
277
591
|
{
|
|
278
592
|
"inputs": [
|
|
279
593
|
{
|
|
@@ -453,5 +767,39 @@
|
|
|
453
767
|
],
|
|
454
768
|
"stateMutability": "nonpayable",
|
|
455
769
|
"type": "function"
|
|
770
|
+
},
|
|
771
|
+
{
|
|
772
|
+
"inputs": [
|
|
773
|
+
{
|
|
774
|
+
"internalType": "contract ISuperfluidToken",
|
|
775
|
+
"name": "token",
|
|
776
|
+
"type": "address"
|
|
777
|
+
},
|
|
778
|
+
{
|
|
779
|
+
"internalType": "address",
|
|
780
|
+
"name": "sender",
|
|
781
|
+
"type": "address"
|
|
782
|
+
},
|
|
783
|
+
{
|
|
784
|
+
"internalType": "address",
|
|
785
|
+
"name": "receiver",
|
|
786
|
+
"type": "address"
|
|
787
|
+
},
|
|
788
|
+
{
|
|
789
|
+
"internalType": "bytes",
|
|
790
|
+
"name": "ctx",
|
|
791
|
+
"type": "bytes"
|
|
792
|
+
}
|
|
793
|
+
],
|
|
794
|
+
"name": "deleteFlowByOperator",
|
|
795
|
+
"outputs": [
|
|
796
|
+
{
|
|
797
|
+
"internalType": "bytes",
|
|
798
|
+
"name": "newCtx",
|
|
799
|
+
"type": "bytes"
|
|
800
|
+
}
|
|
801
|
+
],
|
|
802
|
+
"stateMutability": "nonpayable",
|
|
803
|
+
"type": "function"
|
|
456
804
|
}
|
|
457
805
|
] }
|
package/dist/main/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export * from "./subgraph/schema.generated";
|
|
2
2
|
import BatchCall from "./BatchCall";
|
|
3
3
|
import ConstantFlowAgreementV1 from "./ConstantFlowAgreementV1";
|
|
4
|
+
import ERC20Token from "./ERC20Token";
|
|
4
5
|
import Framework from "./Framework";
|
|
5
6
|
import Host from "./Host";
|
|
6
7
|
import InstantDistributionAgreementV1 from "./InstantDistributionAgreementV1";
|
|
@@ -13,6 +14,7 @@ export * from "./ordering";
|
|
|
13
14
|
export * from "./events";
|
|
14
15
|
export * from "./types";
|
|
15
16
|
export { Framework };
|
|
17
|
+
export { ERC20Token };
|
|
16
18
|
export { SuperToken };
|
|
17
19
|
export { Query };
|
|
18
20
|
export { ConstantFlowAgreementV1 };
|
|
@@ -31,6 +33,7 @@ export * from "./subgraph/events/events";
|
|
|
31
33
|
export * from "./subgraph/events/flowUpdatedEvent";
|
|
32
34
|
export * from "./subgraph/events/indexUpdatedEvent";
|
|
33
35
|
export * from "./subgraph/events/subscriptionUnitsUpdatedEvents";
|
|
36
|
+
export * from "./subgraph/meta/meta";
|
|
34
37
|
export * from "./subgraph/mappedSubgraphTypes";
|
|
35
38
|
export * from "./SFError";
|
|
36
39
|
export * from "./subgraph/subgraphQueryHandler";
|
package/dist/main/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,6BAA6B,CAAC;AAE5C,OAAO,SAAS,MAAM,aAAa,CAAC;AACpC,OAAO,uBAAuB,MAAM,2BAA2B,CAAC;AAChE,OAAO,SAAS,MAAM,aAAa,CAAC;AACpC,OAAO,IAAI,MAAM,QAAQ,CAAC;AAC1B,OAAO,8BAA8B,MAAM,kCAAkC,CAAC;AAC9E,OAAO,KAAK,MAAM,SAAS,CAAC;AAC5B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M,cAAc,CAAC;AAEtC,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AAExB,OAAO,EAAE,SAAS,EAAE,CAAC;AACrB,OAAO,EAAE,UAAU,EAAE,CAAC;AACtB,OAAO,EAAE,UAAU,EAAE,CAAC;AACtB,OAAO,EAAE,KAAK,EAAE,CAAC;AACjB,OAAO,EAAE,uBAAuB,EAAE,CAAC;AACnC,OAAO,EAAE,8BAA8B,EAAE,CAAC;AAC1C,OAAO,EAAE,IAAI,EAAE,CAAC;AAChB,OAAO,EAAE,SAAS,EAAE,CAAC;AAErB,cAAc,qCAAqC,CAAC;AACpD,cAAc,+DAA+D,CAAC;AAC9E,cAAc,iCAAiC,CAAC;AAChD,cAAc,yDAAyD,CAAC;AACxE,cAAc,mCAAmC,CAAC;AAClD,cAAc,+CAA+C,CAAC;AAC9D,cAAc,iCAAiC,CAAC;AAChD,cAAc,mDAAmD,CAAC;AAElE,cAAc,0BAA0B,CAAC;AACzC,cAAc,oCAAoC,CAAC;AACnD,cAAc,qCAAqC,CAAC;AACpD,cAAc,kDAAkD,CAAC;AAEjE,cAAc,sBAAsB,CAAC;AAErC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,WAAW,CAAC;AAC1B,cAAc,iCAAiC,CAAC"}
|
package/dist/main/index.js
CHANGED
|
@@ -17,12 +17,14 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
17
17
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
18
18
|
};
|
|
19
19
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20
|
-
exports.BatchCall = exports.Host = exports.InstantDistributionAgreementV1 = exports.ConstantFlowAgreementV1 = exports.Query = exports.SuperToken = exports.Framework = void 0;
|
|
20
|
+
exports.BatchCall = exports.Host = exports.InstantDistributionAgreementV1 = exports.ConstantFlowAgreementV1 = exports.Query = exports.SuperToken = exports.ERC20Token = exports.Framework = void 0;
|
|
21
21
|
__exportStar(require("./subgraph/schema.generated"), exports);
|
|
22
22
|
const BatchCall_1 = __importDefault(require("./BatchCall"));
|
|
23
23
|
exports.BatchCall = BatchCall_1.default;
|
|
24
24
|
const ConstantFlowAgreementV1_1 = __importDefault(require("./ConstantFlowAgreementV1"));
|
|
25
25
|
exports.ConstantFlowAgreementV1 = ConstantFlowAgreementV1_1.default;
|
|
26
|
+
const ERC20Token_1 = __importDefault(require("./ERC20Token"));
|
|
27
|
+
exports.ERC20Token = ERC20Token_1.default;
|
|
26
28
|
const Framework_1 = __importDefault(require("./Framework"));
|
|
27
29
|
exports.Framework = Framework_1.default;
|
|
28
30
|
const Host_1 = __importDefault(require("./Host"));
|
|
@@ -51,6 +53,7 @@ __exportStar(require("./subgraph/events/events"), exports);
|
|
|
51
53
|
__exportStar(require("./subgraph/events/flowUpdatedEvent"), exports);
|
|
52
54
|
__exportStar(require("./subgraph/events/indexUpdatedEvent"), exports);
|
|
53
55
|
__exportStar(require("./subgraph/events/subscriptionUnitsUpdatedEvents"), exports);
|
|
56
|
+
__exportStar(require("./subgraph/meta/meta"), exports);
|
|
54
57
|
__exportStar(require("./subgraph/mappedSubgraphTypes"), exports);
|
|
55
58
|
__exportStar(require("./SFError"), exports);
|
|
56
59
|
__exportStar(require("./subgraph/subgraphQueryHandler"), exports);
|
package/dist/main/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA,8DAA4C;AAE5C,4DAAoC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA,8DAA4C;AAE5C,4DAAoC;AAuB3B,oBAvBF,mBAAS,CAuBE;AAtBlB,wFAAgE;AAmBvD,kCAnBF,iCAAuB,CAmBE;AAlBhC,8DAAsC;AAe7B,qBAfF,oBAAU,CAeE;AAdnB,4DAAoC;AAa3B,oBAbF,mBAAS,CAaE;AAZlB,kDAA0B;AAkBjB,eAlBF,cAAI,CAkBE;AAjBb,sGAA8E;AAgBrE,yCAhBF,wCAA8B,CAgBE;AAfvC,oDAA4B;AAanB,gBAbF,eAAK,CAaE;AAZd,8DAAsC;AAW7B,qBAXF,oBAAU,CAWE;AATnB,+CAA6B;AAC7B,0CAAwB;AACxB,+CAA6B;AAC7B,6CAA2B;AAC3B,2CAAyB;AACzB,0CAAwB;AAWxB,sEAAoD;AACpD,gGAA8E;AAC9E,kEAAgD;AAChD,0FAAwE;AACxE,oEAAkD;AAClD,gFAA8D;AAC9D,kEAAgD;AAChD,oFAAkE;AAElE,2DAAyC;AACzC,qEAAmD;AACnD,sEAAoD;AACpD,mFAAiE;AAEjE,uDAAqC;AAErC,iEAA+C;AAC/C,4CAA0B;AAC1B,kEAAgD"}
|
|
@@ -10,6 +10,7 @@ export declare type Paging = {
|
|
|
10
10
|
/**
|
|
11
11
|
* For paginating Subgraph queries by using skip and take approach. Good for small result sets, not performant for large sets.
|
|
12
12
|
* Use {@link LastIdPaging} for most performant pagination strategy.
|
|
13
|
+
* NOTE: Also known as "offset based pagination".
|
|
13
14
|
*/
|
|
14
15
|
export declare type SkipPaging = {
|
|
15
16
|
readonly take: number;
|
|
@@ -18,11 +19,34 @@ export declare type SkipPaging = {
|
|
|
18
19
|
/**
|
|
19
20
|
* For paginating Subgraph queries by using the last ID of the previous paged result to get the next page.
|
|
20
21
|
* Relies on Subgraph ordering ID's in ascending order which it always does unless the results are ordered by `id` in `desc` order.
|
|
22
|
+
* NOTE: Also known as "cursor based pagination".
|
|
21
23
|
*/
|
|
22
24
|
export declare type LastIdPaging = {
|
|
23
25
|
readonly take: number;
|
|
24
26
|
readonly lastId: string;
|
|
25
27
|
};
|
|
28
|
+
/**
|
|
29
|
+
* WARNING: Works only with the new QueryHandlers.
|
|
30
|
+
* Essentially the same as @see SkipPaging but with more UI pagination friendly API.
|
|
31
|
+
*/
|
|
32
|
+
export declare type PageNumberPaging = {
|
|
33
|
+
/**
|
|
34
|
+
* Page number starts from 1.
|
|
35
|
+
*/
|
|
36
|
+
readonly pageNumber: number;
|
|
37
|
+
/**
|
|
38
|
+
* "Page size" in other words.
|
|
39
|
+
*/
|
|
40
|
+
readonly take: number;
|
|
41
|
+
};
|
|
42
|
+
/**
|
|
43
|
+
* WARNING: Works only with number literal of @see Number.POSITIVE_INFINITY.
|
|
44
|
+
* WARNING: Works only with the new QueryHandlers.
|
|
45
|
+
* Recursively gets all the possible Subgraph results.
|
|
46
|
+
*/
|
|
47
|
+
export declare type AllPaging = {
|
|
48
|
+
readonly take: number;
|
|
49
|
+
};
|
|
26
50
|
/**
|
|
27
51
|
* @dev PagedResult Interface
|
|
28
52
|
*/
|
|
@@ -36,7 +60,11 @@ export interface PagedResult<T extends ILightEntity> {
|
|
|
36
60
|
* `undefined` when there's no next page.
|
|
37
61
|
*/
|
|
38
62
|
readonly nextPaging?: Paging;
|
|
63
|
+
/**
|
|
64
|
+
* @obsolete Use `items` instead.
|
|
65
|
+
*/
|
|
39
66
|
readonly data: T[];
|
|
67
|
+
readonly items: T[];
|
|
40
68
|
}
|
|
41
69
|
/**
|
|
42
70
|
* Factory function to create a {@link PagedResult}.
|
|
@@ -44,10 +72,18 @@ export interface PagedResult<T extends ILightEntity> {
|
|
|
44
72
|
* @param paging
|
|
45
73
|
*/
|
|
46
74
|
export declare const createPagedResult: <T extends ILightEntity>(dataPlusOne: T[], paging: Paging) => PagedResult<T>;
|
|
75
|
+
export declare function isSkipPaging(paging?: Paging): paging is SkipPaging;
|
|
76
|
+
export declare function isPageNumberPaging(paging?: Paging): paging is PageNumberPaging;
|
|
77
|
+
export declare function isLastIdPaging(paging?: Paging): paging is LastIdPaging;
|
|
78
|
+
export declare function isAllPaging(paging?: Paging): paging is AllPaging;
|
|
47
79
|
export declare const createSkipPaging: ({ skip, take, }?: {
|
|
48
80
|
skip?: number | undefined;
|
|
49
81
|
take?: number | undefined;
|
|
50
82
|
}) => SkipPaging;
|
|
83
|
+
export declare const createPageNumberPaging: ({ pageNumber, take, }?: {
|
|
84
|
+
pageNumber?: number | undefined;
|
|
85
|
+
take?: number | undefined;
|
|
86
|
+
}) => PageNumberPaging;
|
|
51
87
|
export declare const createLastIdPaging: ({ lastId, take, }?: {
|
|
52
88
|
lastId?: string | undefined;
|
|
53
89
|
take?: number | undefined;
|
|
@@ -57,6 +93,7 @@ export declare const createLastIdPaging: ({ lastId, take, }?: {
|
|
|
57
93
|
* @returns the `Paging` class with the next page
|
|
58
94
|
*/
|
|
59
95
|
export declare const nextSkipPaging: (paging: SkipPaging) => SkipPaging;
|
|
96
|
+
export declare const nextPageNumberPaging: (paging: PageNumberPaging) => PageNumberPaging;
|
|
60
97
|
export declare const nextLastIdPaging: (paging: LastIdPaging, nextLastId: string) => LastIdPaging;
|
|
61
98
|
/**
|
|
62
99
|
* @dev Used to determine whether there is another page for pagination.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pagination.d.ts","sourceRoot":"","sources":["../../src/pagination.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAE5C;;GAEG;AACH,oBAAY,MAAM,GAAG;IACjB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;CAC5B,CAAC;AAEF
|
|
1
|
+
{"version":3,"file":"pagination.d.ts","sourceRoot":"","sources":["../../src/pagination.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAE5C;;GAEG;AACH,oBAAY,MAAM,GAAG;IACjB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,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YAAY,CAEtE;AAED,wBAAgB,WAAW,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,IAAI,SAAS,CAOhE;AAED,eAAO,MAAM,gBAAgB;;;MAGpB,UAGP,CAAC;AAEH,eAAO,MAAM,sBAAsB;;;MAG1B,gBAGP,CAAC;AAEH,eAAO,MAAM,kBAAkB;;;MAGtB,YAGP,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,cAAc,WAAY,UAAU,KAAG,UAGlD,CAAC;AAEH,eAAO,MAAM,oBAAoB,WACrB,gBAAgB,KACzB,gBAGD,CAAC;AAEH,eAAO,MAAM,gBAAgB,WACjB,YAAY,cACR,MAAM,KACnB,YAGD,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,WAAW,WAAY,MAAM,WAEzC,CAAC"}
|
package/dist/main/pagination.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.takePlusOne = exports.nextLastIdPaging = exports.nextSkipPaging = exports.createLastIdPaging = exports.createSkipPaging = exports.createPagedResult = void 0;
|
|
3
|
+
exports.takePlusOne = exports.nextLastIdPaging = exports.nextPageNumberPaging = exports.nextSkipPaging = exports.createLastIdPaging = exports.createPageNumberPaging = exports.createSkipPaging = exports.isAllPaging = exports.isLastIdPaging = exports.isPageNumberPaging = exports.isSkipPaging = exports.createPagedResult = void 0;
|
|
4
4
|
/**
|
|
5
5
|
* Factory function to create a {@link PagedResult}.
|
|
6
6
|
* @param dataPlusOne Subgraph queries are executed with one extra result to get which is over the {@link Paging} `take` amount.
|
|
@@ -16,20 +16,46 @@ const createPagedResult = (dataPlusOne, paging) => {
|
|
|
16
16
|
nextPaging: hasNextPage
|
|
17
17
|
? isSkipPaging(paging)
|
|
18
18
|
? (0, exports.nextSkipPaging)(paging)
|
|
19
|
-
: (
|
|
19
|
+
: isLastIdPaging(paging)
|
|
20
|
+
? (0, exports.nextLastIdPaging)(paging, lastId)
|
|
21
|
+
: isPageNumberPaging(paging)
|
|
22
|
+
? (0, exports.nextPageNumberPaging)(paging)
|
|
23
|
+
: undefined
|
|
20
24
|
: undefined,
|
|
21
25
|
data: data,
|
|
26
|
+
items: data,
|
|
22
27
|
};
|
|
23
28
|
};
|
|
24
29
|
exports.createPagedResult = createPagedResult;
|
|
25
30
|
function isSkipPaging(paging) {
|
|
26
|
-
return paging.skip !== undefined;
|
|
31
|
+
return (paging === null || paging === void 0 ? void 0 : paging.skip) !== undefined;
|
|
27
32
|
}
|
|
33
|
+
exports.isSkipPaging = isSkipPaging;
|
|
34
|
+
function isPageNumberPaging(paging) {
|
|
35
|
+
return (paging === null || paging === void 0 ? void 0 : paging.pageNumber) !== undefined;
|
|
36
|
+
}
|
|
37
|
+
exports.isPageNumberPaging = isPageNumberPaging;
|
|
38
|
+
function isLastIdPaging(paging) {
|
|
39
|
+
return (paging === null || paging === void 0 ? void 0 : paging.lastId) !== undefined;
|
|
40
|
+
}
|
|
41
|
+
exports.isLastIdPaging = isLastIdPaging;
|
|
42
|
+
function isAllPaging(paging) {
|
|
43
|
+
return (paging !== undefined &&
|
|
44
|
+
paging.skip === undefined &&
|
|
45
|
+
paging.lastId === undefined &&
|
|
46
|
+
paging.take === Infinity);
|
|
47
|
+
}
|
|
48
|
+
exports.isAllPaging = isAllPaging;
|
|
28
49
|
const createSkipPaging = ({ skip = 0, take = 100, } = {}) => ({
|
|
29
50
|
skip: skip,
|
|
30
51
|
take: take,
|
|
31
52
|
});
|
|
32
53
|
exports.createSkipPaging = createSkipPaging;
|
|
54
|
+
const createPageNumberPaging = ({ pageNumber = 1, take = 100, } = {}) => ({
|
|
55
|
+
take: take,
|
|
56
|
+
pageNumber: pageNumber,
|
|
57
|
+
});
|
|
58
|
+
exports.createPageNumberPaging = createPageNumberPaging;
|
|
33
59
|
const createLastIdPaging = ({ lastId = "", take = 100, } = {}) => ({
|
|
34
60
|
take: take,
|
|
35
61
|
lastId: lastId,
|
|
@@ -44,6 +70,11 @@ const nextSkipPaging = (paging) => ({
|
|
|
44
70
|
take: paging.take,
|
|
45
71
|
});
|
|
46
72
|
exports.nextSkipPaging = nextSkipPaging;
|
|
73
|
+
const nextPageNumberPaging = (paging) => ({
|
|
74
|
+
pageNumber: paging.pageNumber + 1,
|
|
75
|
+
take: paging.take,
|
|
76
|
+
});
|
|
77
|
+
exports.nextPageNumberPaging = nextPageNumberPaging;
|
|
47
78
|
const nextLastIdPaging = (paging, nextLastId) => ({
|
|
48
79
|
take: paging.take,
|
|
49
80
|
lastId: nextLastId,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pagination.js","sourceRoot":"","sources":["../../src/pagination.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"pagination.js","sourceRoot":"","sources":["../../src/pagination.ts"],"names":[],"mappings":";;;AA4EA;;;;GAIG;AACI,MAAM,iBAAiB,GAAG,CAC7B,WAAgB,EAChB,MAAc,EACA,EAAE;;IAChB,MAAM,WAAW,GAAG,WAAW,CAAC,MAAM,GAAG,MAAM,CAAC,IAAI,CAAC;IACrD,MAAM,IAAI,GAAG,WAAW,CAAC,KAAK,CAAC,CAAC,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC;IAC/C,MAAM,MAAM,GAAG,MAAA,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,0CAAE,EAAE,CAAC;IAErC,OAAO;QACH,MAAM,EAAE,EAAE,IAAI,EAAE,MAAM,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,CAAC,IAAI,EAAE;QAChD,UAAU,EAAE,WAAW;YACnB,CAAC,CAAC,YAAY,CAAC,MAAM,CAAC;gBAClB,CAAC,CAAC,IAAA,sBAAc,EAAC,MAAM,CAAC;gBACxB,CAAC,CAAC,cAAc,CAAC,MAAM,CAAC;oBACxB,CAAC,CAAC,IAAA,wBAAgB,EAAC,MAAM,EAAE,MAAO,CAAC;oBACnC,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IACV,UAAU,EAAE,UAAU;CACzB,CAAC,CAAC;AANU,QAAA,sBAAsB,0BAMhC;AAEI,MAAM,kBAAkB,GAAG,CAAC,EAC/B,MAAM,GAAG,EAAE,EACX,IAAI,GAAG,GAAG,GACb,GAAG,EAAE,EAAgB,EAAE,CAAC,CAAC;IACtB,IAAI,EAAE,IAAI;IACV,MAAM,EAAE,MAAM;CACjB,CAAC,CAAC;AANU,QAAA,kBAAkB,sBAM5B;AAEH;;;GAGG;AACI,MAAM,cAAc,GAAG,CAAC,MAAkB,EAAc,EAAE,CAAC,CAAC;IAC/D,IAAI,EAAE,MAAM,CAAC,IAAI,GAAG,MAAM,CAAC,IAAI;IAC/B,IAAI,EAAE,MAAM,CAAC,IAAI;CACpB,CAAC,CAAC;AAHU,QAAA,cAAc,kBAGxB;AAEI,MAAM,oBAAoB,GAAG,CAChC,MAAwB,EACR,EAAE,CAAC,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC,UAAU,GAAG,CAAC;IACjC,IAAI,EAAE,MAAM,CAAC,IAAI;CACpB,CAAC,CAAC;AALU,QAAA,oBAAoB,wBAK9B;AAEI,MAAM,gBAAgB,GAAG,CAC5B,MAAoB,EACpB,UAAkB,EACN,EAAE,CAAC,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC,IAAI;IACjB,MAAM,EAAE,UAAU;CACrB,CAAC,CAAC;AANU,QAAA,gBAAgB,oBAM1B;AAEH;;;GAGG;AACI,MAAM,WAAW,GAAG,CAAC,MAAc,EAAE,EAAE;IAC1C,OAAO,MAAM,CAAC,IAAI,GAAG,CAAC,CAAC;AAC3B,CAAC,CAAC;AAFW,QAAA,WAAW,eAEtB"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { TypedDocumentNode } from "@graphql-typed-document-node/core";
|
|
1
2
|
import { DocumentNode } from "graphql";
|
|
2
3
|
declare type RequestDocument = string | DocumentNode;
|
|
3
4
|
export declare type Variables = {
|
|
@@ -10,8 +11,7 @@ export declare type BatchRequestDocument<V = Variables> = {
|
|
|
10
11
|
export declare class SubgraphClient {
|
|
11
12
|
readonly subgraphUrl: string;
|
|
12
13
|
constructor(subgraphUrl: string);
|
|
13
|
-
request<T = unknown, V = Variables>(document: RequestDocument, variables?: V): Promise<T>;
|
|
14
|
-
batchRequests<T = unknown, V = Variables>(documents: BatchRequestDocument<V>[]): Promise<T>;
|
|
14
|
+
request<T = unknown, V = Variables>(document: RequestDocument | TypedDocumentNode<T, V>, variables?: V): Promise<T>;
|
|
15
15
|
}
|
|
16
16
|
export {};
|
|
17
17
|
//# sourceMappingURL=SubgraphClient.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SubgraphClient.d.ts","sourceRoot":"","sources":["../../../src/subgraph/SubgraphClient.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAKvC,aAAK,eAAe,GAAG,MAAM,GAAG,YAAY,CAAC;AAE7C,MAAM,CAAC,OAAO,MAAM,SAAS,GAAG;IAC5B,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CAC1B,CAAC;AAEF,MAAM,CAAC,OAAO,MAAM,oBAAoB,CAAC,CAAC,GAAG,SAAS,IAAI;IACtD,QAAQ,EAAE,eAAe,CAAC;IAC1B,SAAS,CAAC,EAAE,CAAC,CAAC;CACjB,CAAC;AAEF,qBAAa,cAAc;IACX,QAAQ,CAAC,WAAW,EAAE,MAAM;gBAAnB,WAAW,EAAE,MAAM;IAElC,OAAO,CAAC,CAAC,GAAG,OAAO,EAAE,CAAC,GAAG,SAAS,EACpC,QAAQ,EAAE,eAAe,
|
|
1
|
+
{"version":3,"file":"SubgraphClient.d.ts","sourceRoot":"","sources":["../../../src/subgraph/SubgraphClient.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AACtE,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAKvC,aAAK,eAAe,GAAG,MAAM,GAAG,YAAY,CAAC;AAE7C,MAAM,CAAC,OAAO,MAAM,SAAS,GAAG;IAC5B,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CAC1B,CAAC;AAEF,MAAM,CAAC,OAAO,MAAM,oBAAoB,CAAC,CAAC,GAAG,SAAS,IAAI;IACtD,QAAQ,EAAE,eAAe,CAAC;IAC1B,SAAS,CAAC,EAAE,CAAC,CAAC;CACjB,CAAC;AAEF,qBAAa,cAAc;IACX,QAAQ,CAAC,WAAW,EAAE,MAAM;gBAAnB,WAAW,EAAE,MAAM;IAElC,OAAO,CAAC,CAAC,GAAG,OAAO,EAAE,CAAC,GAAG,SAAS,EACpC,QAAQ,EAAE,eAAe,GAAG,iBAAiB,CAAC,CAAC,EAAE,CAAC,CAAC,EACnD,SAAS,CAAC,EAAE,CAAC,GACd,OAAO,CAAC,CAAC,CAAC;CAehB"}
|
|
@@ -19,18 +19,6 @@ class SubgraphClient {
|
|
|
19
19
|
});
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
|
-
async batchRequests(documents) {
|
|
23
|
-
try {
|
|
24
|
-
return await (0, graphql_request_1.batchRequests)(this.subgraphUrl, documents);
|
|
25
|
-
}
|
|
26
|
-
catch (err) {
|
|
27
|
-
throw new SFError_1.SFError({
|
|
28
|
-
type: "SUBGRAPH_ERROR",
|
|
29
|
-
customMessage: "Failed call to subgraph with query...",
|
|
30
|
-
errorObject: err,
|
|
31
|
-
});
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
22
|
}
|
|
35
23
|
exports.SubgraphClient = SubgraphClient;
|
|
36
24
|
// Inspired by: https://stackoverflow.com/a/38340730
|