@superfluid-finance/sdk-core 1.0.1-dev.0846cd5.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/LICENSE +9 -0
- package/README.md +487 -0
- package/dist/main/BatchCall.d.ts +53 -0
- package/dist/main/ConstantFlowAgreementV1.d.ts +74 -0
- package/dist/main/Framework.d.ts +75 -0
- package/dist/main/Host.d.ts +18 -0
- package/dist/main/InstantDistributionAgreementV1.d.ts +107 -0
- package/dist/main/Operation.d.ts +38 -0
- package/dist/main/Query.d.ts +24 -0
- package/dist/main/SFError.d.ts +13 -0
- package/dist/main/SuperToken.d.ts +191 -0
- package/dist/main/Token.d.ts +76 -0
- package/dist/main/constants.d.ts +10 -0
- package/dist/main/events.d.ts +254 -0
- package/dist/main/frameworkHelpers.d.ts +20 -0
- package/dist/main/index.d.ts +19 -0
- package/dist/main/index.js +10780 -0
- package/dist/main/interfaces.d.ts +309 -0
- package/dist/main/mapGetAllEventsQueryEvents.d.ts +3 -0
- package/dist/main/pagination.d.ts +31 -0
- package/dist/main/scripts/setup.d.ts +22 -0
- package/dist/main/subgraph/SubgraphClient.d.ts +16 -0
- package/dist/main/subgraph/queries/getAccountTokenSnapshots.generated.d.ts +41 -0
- package/dist/main/subgraph/queries/getAllEvents.generated.d.ts +578 -0
- package/dist/main/subgraph/queries/getIndexSubscriptions.generated.d.ts +42 -0
- package/dist/main/subgraph/queries/getIndexes.generated.d.ts +40 -0
- package/dist/main/subgraph/queries/getStreams.generated.d.ts +54 -0
- package/dist/main/subgraph/queries/getTokens.generated.d.ts +23 -0
- package/dist/main/subgraph/schema.generated.d.ts +6907 -0
- package/dist/main/typechain/ERC20WithTokenInfo.d.ts +159 -0
- package/dist/main/typechain/IConstantFlowAgreementV1.d.ts +305 -0
- package/dist/main/typechain/IInstantDistributionAgreementV1.d.ts +585 -0
- package/dist/main/typechain/IResolver.d.ts +57 -0
- package/dist/main/typechain/SuperToken.d.ts +1011 -0
- package/dist/main/typechain/Superfluid.d.ts +780 -0
- package/dist/main/typechain/SuperfluidLoader.d.ts +55 -0
- package/dist/main/typechain/TestToken.d.ts +207 -0
- package/dist/main/typechain/common.d.ts +21 -0
- package/dist/main/typechain/factories/ERC20WithTokenInfo__factory.d.ts +35 -0
- package/dist/main/typechain/factories/IConstantFlowAgreementV1__factory.d.ts +35 -0
- package/dist/main/typechain/factories/IInstantDistributionAgreementV1__factory.d.ts +35 -0
- package/dist/main/typechain/factories/IResolver__factory.d.ts +22 -0
- package/dist/main/typechain/factories/SuperToken__factory.d.ts +46 -0
- package/dist/main/typechain/factories/SuperfluidLoader__factory.d.ts +37 -0
- package/dist/main/typechain/factories/Superfluid__factory.d.ts +82 -0
- package/dist/main/typechain/factories/TestToken__factory.d.ts +46 -0
- package/dist/main/typechain/index.d.ts +16 -0
- package/dist/main/types.d.ts +2 -0
- package/dist/main/utils.d.ts +89 -0
- package/dist/main/validation.d.ts +8 -0
- package/dist/module/BatchCall.d.ts +53 -0
- package/dist/module/ConstantFlowAgreementV1.d.ts +74 -0
- package/dist/module/Framework.d.ts +75 -0
- package/dist/module/Host.d.ts +18 -0
- package/dist/module/InstantDistributionAgreementV1.d.ts +107 -0
- package/dist/module/Operation.d.ts +38 -0
- package/dist/module/Query.d.ts +24 -0
- package/dist/module/SFError.d.ts +13 -0
- package/dist/module/SuperToken.d.ts +191 -0
- package/dist/module/Token.d.ts +76 -0
- package/dist/module/constants.d.ts +10 -0
- package/dist/module/events.d.ts +254 -0
- package/dist/module/frameworkHelpers.d.ts +20 -0
- package/dist/module/index.d.ts +19 -0
- package/dist/module/index.js +10749 -0
- package/dist/module/interfaces.d.ts +309 -0
- package/dist/module/mapGetAllEventsQueryEvents.d.ts +3 -0
- package/dist/module/pagination.d.ts +31 -0
- package/dist/module/scripts/setup.d.ts +22 -0
- package/dist/module/subgraph/SubgraphClient.d.ts +16 -0
- package/dist/module/subgraph/queries/getAccountTokenSnapshots.generated.d.ts +41 -0
- package/dist/module/subgraph/queries/getAllEvents.generated.d.ts +578 -0
- package/dist/module/subgraph/queries/getIndexSubscriptions.generated.d.ts +42 -0
- package/dist/module/subgraph/queries/getIndexes.generated.d.ts +40 -0
- package/dist/module/subgraph/queries/getStreams.generated.d.ts +54 -0
- package/dist/module/subgraph/queries/getTokens.generated.d.ts +23 -0
- package/dist/module/subgraph/schema.generated.d.ts +6907 -0
- package/dist/module/typechain/ERC20WithTokenInfo.d.ts +159 -0
- package/dist/module/typechain/IConstantFlowAgreementV1.d.ts +305 -0
- package/dist/module/typechain/IInstantDistributionAgreementV1.d.ts +585 -0
- package/dist/module/typechain/IResolver.d.ts +57 -0
- package/dist/module/typechain/SuperToken.d.ts +1011 -0
- package/dist/module/typechain/Superfluid.d.ts +780 -0
- package/dist/module/typechain/SuperfluidLoader.d.ts +55 -0
- package/dist/module/typechain/TestToken.d.ts +207 -0
- package/dist/module/typechain/common.d.ts +21 -0
- package/dist/module/typechain/factories/ERC20WithTokenInfo__factory.d.ts +35 -0
- package/dist/module/typechain/factories/IConstantFlowAgreementV1__factory.d.ts +35 -0
- package/dist/module/typechain/factories/IInstantDistributionAgreementV1__factory.d.ts +35 -0
- package/dist/module/typechain/factories/IResolver__factory.d.ts +22 -0
- package/dist/module/typechain/factories/SuperToken__factory.d.ts +46 -0
- package/dist/module/typechain/factories/SuperfluidLoader__factory.d.ts +37 -0
- package/dist/module/typechain/factories/Superfluid__factory.d.ts +82 -0
- package/dist/module/typechain/factories/TestToken__factory.d.ts +46 -0
- package/dist/module/typechain/index.d.ts +16 -0
- package/dist/module/types.d.ts +2 -0
- package/dist/module/utils.d.ts +89 -0
- package/dist/module/validation.d.ts +8 -0
- package/dist/umd/BatchCall.d.ts +53 -0
- package/dist/umd/ConstantFlowAgreementV1.d.ts +74 -0
- package/dist/umd/Framework.d.ts +75 -0
- package/dist/umd/Host.d.ts +18 -0
- package/dist/umd/InstantDistributionAgreementV1.d.ts +107 -0
- package/dist/umd/Operation.d.ts +38 -0
- package/dist/umd/Query.d.ts +24 -0
- package/dist/umd/SFError.d.ts +13 -0
- package/dist/umd/SuperToken.d.ts +191 -0
- package/dist/umd/Token.d.ts +76 -0
- package/dist/umd/constants.d.ts +10 -0
- package/dist/umd/events.d.ts +254 -0
- package/dist/umd/frameworkHelpers.d.ts +20 -0
- package/dist/umd/index.d.ts +19 -0
- package/dist/umd/index.js +10782 -0
- package/dist/umd/interfaces.d.ts +309 -0
- package/dist/umd/mapGetAllEventsQueryEvents.d.ts +3 -0
- package/dist/umd/pagination.d.ts +31 -0
- package/dist/umd/scripts/setup.d.ts +22 -0
- package/dist/umd/subgraph/SubgraphClient.d.ts +16 -0
- package/dist/umd/subgraph/queries/getAccountTokenSnapshots.generated.d.ts +41 -0
- package/dist/umd/subgraph/queries/getAllEvents.generated.d.ts +578 -0
- package/dist/umd/subgraph/queries/getIndexSubscriptions.generated.d.ts +42 -0
- package/dist/umd/subgraph/queries/getIndexes.generated.d.ts +40 -0
- package/dist/umd/subgraph/queries/getStreams.generated.d.ts +54 -0
- package/dist/umd/subgraph/queries/getTokens.generated.d.ts +23 -0
- package/dist/umd/subgraph/schema.generated.d.ts +6907 -0
- package/dist/umd/typechain/ERC20WithTokenInfo.d.ts +159 -0
- package/dist/umd/typechain/IConstantFlowAgreementV1.d.ts +305 -0
- package/dist/umd/typechain/IInstantDistributionAgreementV1.d.ts +585 -0
- package/dist/umd/typechain/IResolver.d.ts +57 -0
- package/dist/umd/typechain/SuperToken.d.ts +1011 -0
- package/dist/umd/typechain/Superfluid.d.ts +780 -0
- package/dist/umd/typechain/SuperfluidLoader.d.ts +55 -0
- package/dist/umd/typechain/TestToken.d.ts +207 -0
- package/dist/umd/typechain/common.d.ts +21 -0
- package/dist/umd/typechain/factories/ERC20WithTokenInfo__factory.d.ts +35 -0
- package/dist/umd/typechain/factories/IConstantFlowAgreementV1__factory.d.ts +35 -0
- package/dist/umd/typechain/factories/IInstantDistributionAgreementV1__factory.d.ts +35 -0
- package/dist/umd/typechain/factories/IResolver__factory.d.ts +22 -0
- package/dist/umd/typechain/factories/SuperToken__factory.d.ts +46 -0
- package/dist/umd/typechain/factories/SuperfluidLoader__factory.d.ts +37 -0
- package/dist/umd/typechain/factories/Superfluid__factory.d.ts +82 -0
- package/dist/umd/typechain/factories/TestToken__factory.d.ts +46 -0
- package/dist/umd/typechain/index.d.ts +16 -0
- package/dist/umd/types.d.ts +2 -0
- package/dist/umd/utils.d.ts +89 -0
- package/dist/umd/validation.d.ts +8 -0
- package/package.json +76 -0
|
@@ -0,0 +1,309 @@
|
|
|
1
|
+
import { ethers } from "ethers";
|
|
2
|
+
export interface IAccountTokenSnapshotFilter {
|
|
3
|
+
readonly account?: string;
|
|
4
|
+
readonly token?: string;
|
|
5
|
+
}
|
|
6
|
+
export interface IAccountEventsFilter {
|
|
7
|
+
readonly account: string;
|
|
8
|
+
readonly timestamp_gte: number;
|
|
9
|
+
}
|
|
10
|
+
export interface IIndexRequestFilter {
|
|
11
|
+
readonly indexId?: string;
|
|
12
|
+
readonly publisher?: string;
|
|
13
|
+
readonly token?: string;
|
|
14
|
+
}
|
|
15
|
+
export interface IStreamRequestFilter {
|
|
16
|
+
readonly sender?: string;
|
|
17
|
+
readonly receiver?: string;
|
|
18
|
+
readonly token?: string;
|
|
19
|
+
}
|
|
20
|
+
export interface IIndexSubscriptionRequestFilter {
|
|
21
|
+
readonly subscriber?: string;
|
|
22
|
+
readonly approved?: boolean;
|
|
23
|
+
}
|
|
24
|
+
export interface ISuperTokenRequestFilter {
|
|
25
|
+
readonly isListed?: boolean;
|
|
26
|
+
}
|
|
27
|
+
export interface ISuperTokenModifyFlowParams {
|
|
28
|
+
readonly flowRate?: string;
|
|
29
|
+
readonly receiver: string;
|
|
30
|
+
readonly sender?: string;
|
|
31
|
+
readonly userData?: string;
|
|
32
|
+
}
|
|
33
|
+
export interface ISuperTokenCreateFlowParams extends ISuperTokenModifyFlowParams {
|
|
34
|
+
readonly flowRate: string;
|
|
35
|
+
readonly sender: string;
|
|
36
|
+
}
|
|
37
|
+
export interface ISuperTokenUpdateFlowParams extends ISuperTokenCreateFlowParams {
|
|
38
|
+
}
|
|
39
|
+
export interface ISuperTokenDeleteFlowParams extends ISuperTokenModifyFlowParams {
|
|
40
|
+
readonly sender: string;
|
|
41
|
+
}
|
|
42
|
+
export interface ISuperTokenBaseIDAParams {
|
|
43
|
+
readonly indexId: string;
|
|
44
|
+
readonly userData?: string;
|
|
45
|
+
}
|
|
46
|
+
export interface ISuperTokenGetSubscriptionParams {
|
|
47
|
+
readonly indexId: string;
|
|
48
|
+
readonly publisher: string;
|
|
49
|
+
readonly subscriber: string;
|
|
50
|
+
readonly providerOrSigner: ethers.providers.Provider | ethers.Signer;
|
|
51
|
+
}
|
|
52
|
+
export interface ISuperTokenGetIndexParams {
|
|
53
|
+
readonly indexId: string;
|
|
54
|
+
readonly publisher: string;
|
|
55
|
+
readonly providerOrSigner: ethers.providers.Provider | ethers.Signer;
|
|
56
|
+
}
|
|
57
|
+
export interface ISuperTokenPublisherParams extends ISuperTokenBaseIDAParams {
|
|
58
|
+
readonly publisher: string;
|
|
59
|
+
readonly providerOrSigner: ethers.providers.Provider | ethers.Signer;
|
|
60
|
+
}
|
|
61
|
+
export interface ISuperTokenPubSubParams {
|
|
62
|
+
readonly indexId: string;
|
|
63
|
+
readonly userData?: string;
|
|
64
|
+
readonly publisher: string;
|
|
65
|
+
readonly subscriber: string;
|
|
66
|
+
}
|
|
67
|
+
export interface ISuperTokenPublisherOperationParams {
|
|
68
|
+
readonly indexId: string;
|
|
69
|
+
readonly publisher: string;
|
|
70
|
+
readonly userData?: string;
|
|
71
|
+
}
|
|
72
|
+
export interface ISuperTokenDistributeParams {
|
|
73
|
+
readonly indexId: string;
|
|
74
|
+
readonly userData?: string;
|
|
75
|
+
readonly amount: string;
|
|
76
|
+
}
|
|
77
|
+
export interface ISuperTokenUpdateIndexValueParams {
|
|
78
|
+
readonly indexId: string;
|
|
79
|
+
readonly userData?: string;
|
|
80
|
+
readonly indexValue: string;
|
|
81
|
+
}
|
|
82
|
+
export interface ISuperTokenUpdateSubscriptionUnitsParams {
|
|
83
|
+
readonly indexId: string;
|
|
84
|
+
readonly subscriber: string;
|
|
85
|
+
readonly userData?: string;
|
|
86
|
+
readonly units: string;
|
|
87
|
+
}
|
|
88
|
+
export interface IModifyFlowParams {
|
|
89
|
+
readonly receiver: string;
|
|
90
|
+
readonly superToken: string;
|
|
91
|
+
readonly flowRate?: string;
|
|
92
|
+
readonly sender?: string;
|
|
93
|
+
readonly userData?: string;
|
|
94
|
+
}
|
|
95
|
+
export interface ICreateFlowParams extends IModifyFlowParams {
|
|
96
|
+
readonly flowRate: string;
|
|
97
|
+
}
|
|
98
|
+
export interface IUpdateFlowParams extends ICreateFlowParams {
|
|
99
|
+
}
|
|
100
|
+
export interface IDeleteFlowParams extends IModifyFlowParams {
|
|
101
|
+
readonly sender: string;
|
|
102
|
+
}
|
|
103
|
+
export interface IRealtimeBalanceOfParams {
|
|
104
|
+
readonly providerOrSigner: ethers.providers.Provider | ethers.Signer;
|
|
105
|
+
readonly account: string;
|
|
106
|
+
readonly timestamp?: number;
|
|
107
|
+
}
|
|
108
|
+
export interface IBaseSuperTokenParams {
|
|
109
|
+
readonly receiver: string;
|
|
110
|
+
readonly amount: string;
|
|
111
|
+
}
|
|
112
|
+
export interface ITransferFromParams {
|
|
113
|
+
readonly sender: string;
|
|
114
|
+
readonly receiver: string;
|
|
115
|
+
readonly amount: string;
|
|
116
|
+
}
|
|
117
|
+
export interface ISuperTokenGetFlowParams {
|
|
118
|
+
readonly sender: string;
|
|
119
|
+
readonly receiver: string;
|
|
120
|
+
readonly providerOrSigner: ethers.providers.Provider | ethers.Signer;
|
|
121
|
+
}
|
|
122
|
+
export interface ISuperTokenGetFlowInfoParams {
|
|
123
|
+
readonly account: string;
|
|
124
|
+
readonly providerOrSigner: ethers.providers.Provider | ethers.Signer;
|
|
125
|
+
}
|
|
126
|
+
export interface IGetFlowParams {
|
|
127
|
+
readonly superToken: string;
|
|
128
|
+
readonly sender: string;
|
|
129
|
+
readonly receiver: string;
|
|
130
|
+
readonly providerOrSigner: ethers.providers.Provider | ethers.Signer;
|
|
131
|
+
}
|
|
132
|
+
export interface IGetAccountFlowInfoParams {
|
|
133
|
+
readonly superToken: string;
|
|
134
|
+
readonly account: string;
|
|
135
|
+
readonly providerOrSigner: ethers.providers.Provider | ethers.Signer;
|
|
136
|
+
}
|
|
137
|
+
export interface IBaseIDAParams {
|
|
138
|
+
readonly indexId: string;
|
|
139
|
+
readonly superToken: string;
|
|
140
|
+
readonly publisher?: string;
|
|
141
|
+
readonly userData?: string;
|
|
142
|
+
}
|
|
143
|
+
export interface IBaseSubscriptionParams extends IBaseIDAParams {
|
|
144
|
+
readonly subscriber: string;
|
|
145
|
+
}
|
|
146
|
+
export interface IGetSubscriptionParams extends IBaseIDAParams {
|
|
147
|
+
readonly publisher: string;
|
|
148
|
+
readonly subscriber: string;
|
|
149
|
+
readonly providerOrSigner: ethers.providers.Provider | ethers.Signer;
|
|
150
|
+
}
|
|
151
|
+
export interface IGetIndexParams extends IBaseIDAParams {
|
|
152
|
+
readonly publisher: string;
|
|
153
|
+
readonly providerOrSigner: ethers.providers.Provider | ethers.Signer;
|
|
154
|
+
}
|
|
155
|
+
export interface IDistributeParams extends IBaseIDAParams {
|
|
156
|
+
readonly amount: string;
|
|
157
|
+
}
|
|
158
|
+
export interface IUpdateIndexValueParams extends IBaseIDAParams {
|
|
159
|
+
readonly indexValue: string;
|
|
160
|
+
}
|
|
161
|
+
export interface IUpdateSubscriptionUnitsParams extends IBaseSubscriptionParams {
|
|
162
|
+
readonly units: string;
|
|
163
|
+
}
|
|
164
|
+
export interface IApproveSubscriptionParams extends IBaseSubscriptionParams {
|
|
165
|
+
readonly publisher: string;
|
|
166
|
+
}
|
|
167
|
+
export interface IRevokeSubscriptionParams extends IBaseSubscriptionParams {
|
|
168
|
+
readonly publisher: string;
|
|
169
|
+
}
|
|
170
|
+
export interface ILightEntity {
|
|
171
|
+
readonly id: string;
|
|
172
|
+
}
|
|
173
|
+
export interface IEventEntityBase {
|
|
174
|
+
readonly id: string;
|
|
175
|
+
readonly blockNumber: number;
|
|
176
|
+
readonly timestamp: number;
|
|
177
|
+
readonly transactionHash: string;
|
|
178
|
+
}
|
|
179
|
+
export interface IFlowUpdatedEvent extends IEventEntityBase {
|
|
180
|
+
readonly token: string;
|
|
181
|
+
readonly sender: string;
|
|
182
|
+
readonly receiver: string;
|
|
183
|
+
readonly flowRate: string;
|
|
184
|
+
readonly totalSenderFlowRate: string;
|
|
185
|
+
readonly totalReceiverFlowRate: string;
|
|
186
|
+
readonly userData: string;
|
|
187
|
+
readonly oldFlowRate: string;
|
|
188
|
+
readonly type: number;
|
|
189
|
+
readonly totalAmountStreamedUntilTimestamp: string;
|
|
190
|
+
}
|
|
191
|
+
export interface IHOLEntityBase {
|
|
192
|
+
readonly id: string;
|
|
193
|
+
readonly createdAtTimestamp: number;
|
|
194
|
+
readonly createdAtBlockNumber: number;
|
|
195
|
+
}
|
|
196
|
+
export interface IHOLUpdateable extends IHOLEntityBase {
|
|
197
|
+
readonly updatedAtTimestamp: number;
|
|
198
|
+
readonly updatedAtBlockNumber: number;
|
|
199
|
+
}
|
|
200
|
+
export interface IIndex extends IHOLUpdateable {
|
|
201
|
+
readonly indexId: string;
|
|
202
|
+
readonly indexValue: string;
|
|
203
|
+
readonly totalSubscriptionsWithUnits: number;
|
|
204
|
+
readonly totalUnitsPending: string;
|
|
205
|
+
readonly totalUnitsApproved: string;
|
|
206
|
+
readonly totalUnits: string;
|
|
207
|
+
readonly totalAmountDistributedUntilUpdatedAt: string;
|
|
208
|
+
readonly token: ISuperToken;
|
|
209
|
+
readonly publisher: string;
|
|
210
|
+
}
|
|
211
|
+
export interface IIndexSubscription extends IHOLUpdateable {
|
|
212
|
+
readonly subscriber: string;
|
|
213
|
+
readonly approved: boolean;
|
|
214
|
+
readonly units: string;
|
|
215
|
+
readonly totalAmountReceivedUntilUpdatedAt: string;
|
|
216
|
+
readonly indexValueUntilUpdatedAt: string;
|
|
217
|
+
readonly index: IIndexSubscriptionIndex;
|
|
218
|
+
}
|
|
219
|
+
export interface IIndexSubscriptionIndex {
|
|
220
|
+
readonly id: string;
|
|
221
|
+
readonly indexId: string;
|
|
222
|
+
readonly indexValue: string;
|
|
223
|
+
readonly token: ISuperToken;
|
|
224
|
+
}
|
|
225
|
+
export interface IStream extends IHOLUpdateable {
|
|
226
|
+
readonly currentFlowRate: string;
|
|
227
|
+
readonly streamedUntilUpdatedAt: string;
|
|
228
|
+
readonly token: ISuperToken;
|
|
229
|
+
readonly sender: string;
|
|
230
|
+
readonly receiver: string;
|
|
231
|
+
readonly flowUpdatedEvents: IStreamFlowUpdatedEvent[];
|
|
232
|
+
}
|
|
233
|
+
export interface IStreamFlowUpdatedEvent extends IFlowUpdatedEvent {
|
|
234
|
+
}
|
|
235
|
+
export interface ISuperToken extends IHOLEntityBase {
|
|
236
|
+
readonly name: string;
|
|
237
|
+
readonly symbol: string;
|
|
238
|
+
readonly isListed: boolean;
|
|
239
|
+
readonly underlyingAddress: string;
|
|
240
|
+
}
|
|
241
|
+
export interface IAggregateEntityBase {
|
|
242
|
+
readonly id: string;
|
|
243
|
+
readonly updatedAtTimestamp: number;
|
|
244
|
+
readonly updatedAtBlockNumber: number;
|
|
245
|
+
}
|
|
246
|
+
export interface ILightAccountTokenSnapshot extends IAggregateEntityBase {
|
|
247
|
+
readonly totalNumberOfActiveStreams: number;
|
|
248
|
+
readonly totalNumberOfClosedStreams: number;
|
|
249
|
+
readonly totalSubscriptionsWithUnits: number;
|
|
250
|
+
readonly totalApprovedSubscriptions: number;
|
|
251
|
+
readonly balanceUntilUpdatedAt: string;
|
|
252
|
+
readonly totalNetFlowRate: string;
|
|
253
|
+
readonly totalInflowRate: string;
|
|
254
|
+
readonly totalOutflowRate: string;
|
|
255
|
+
readonly totalAmountStreamedUntilUpdatedAt: string;
|
|
256
|
+
readonly totalAmountTransferredUntilUpdatedAt: string;
|
|
257
|
+
readonly account: string;
|
|
258
|
+
readonly token: ISuperToken;
|
|
259
|
+
}
|
|
260
|
+
export interface IResolverData {
|
|
261
|
+
readonly subgraphAPIEndpoint: string;
|
|
262
|
+
readonly networkName: string;
|
|
263
|
+
readonly resolverAddress: string;
|
|
264
|
+
}
|
|
265
|
+
export interface ISignerConstructorOptions {
|
|
266
|
+
readonly web3Provider?: ethers.providers.Web3Provider;
|
|
267
|
+
readonly provider?: ethers.providers.Provider;
|
|
268
|
+
readonly privateKey?: string;
|
|
269
|
+
readonly signer?: ethers.Signer;
|
|
270
|
+
}
|
|
271
|
+
export interface IConfig {
|
|
272
|
+
readonly hostAddress: string;
|
|
273
|
+
readonly superTokenFactoryAddress: string;
|
|
274
|
+
readonly cfaV1Address: string;
|
|
275
|
+
readonly idaV1Address: string;
|
|
276
|
+
}
|
|
277
|
+
export interface IAgreementV1Options {
|
|
278
|
+
readonly config: IConfig;
|
|
279
|
+
}
|
|
280
|
+
export interface IWeb3RealTimeBalanceOf {
|
|
281
|
+
readonly availableBalance: string;
|
|
282
|
+
readonly deposit: string;
|
|
283
|
+
readonly owedDeposit: string;
|
|
284
|
+
readonly timestamp: Date;
|
|
285
|
+
}
|
|
286
|
+
export interface IWeb3Subscription {
|
|
287
|
+
readonly exist: boolean;
|
|
288
|
+
readonly approved: boolean;
|
|
289
|
+
readonly units: string;
|
|
290
|
+
readonly pendingDistribution: string;
|
|
291
|
+
}
|
|
292
|
+
export interface IWeb3Index {
|
|
293
|
+
readonly exist: boolean;
|
|
294
|
+
readonly indexValue: string;
|
|
295
|
+
readonly totalUnitsApproved: string;
|
|
296
|
+
readonly totalUnitsPending: string;
|
|
297
|
+
}
|
|
298
|
+
export interface IWeb3FlowInfoParams {
|
|
299
|
+
readonly timestamp: ethers.BigNumber;
|
|
300
|
+
readonly flowRate: ethers.BigNumber;
|
|
301
|
+
readonly deposit: ethers.BigNumber;
|
|
302
|
+
readonly owedDeposit: ethers.BigNumber;
|
|
303
|
+
}
|
|
304
|
+
export interface IWeb3FlowInfo {
|
|
305
|
+
readonly timestamp: Date;
|
|
306
|
+
readonly flowRate: string;
|
|
307
|
+
readonly deposit: string;
|
|
308
|
+
readonly owedDeposit: string;
|
|
309
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @dev Paging Helper Class
|
|
3
|
+
*/
|
|
4
|
+
export declare class Paging {
|
|
5
|
+
readonly skip: number;
|
|
6
|
+
readonly take: number;
|
|
7
|
+
constructor({ skip, take }?: {
|
|
8
|
+
skip?: number | undefined;
|
|
9
|
+
take?: number | undefined;
|
|
10
|
+
});
|
|
11
|
+
/**
|
|
12
|
+
* @dev Used to determine whether there is another page for pagination.
|
|
13
|
+
* @returns the user's specified `take` plus one
|
|
14
|
+
*/
|
|
15
|
+
takePlusOne(): number;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* @dev PagedResult Interface
|
|
19
|
+
*/
|
|
20
|
+
export interface PagedResult<T> {
|
|
21
|
+
readonly hasNextPage: boolean;
|
|
22
|
+
readonly skip: number;
|
|
23
|
+
readonly take: number;
|
|
24
|
+
readonly data: T[];
|
|
25
|
+
}
|
|
26
|
+
export declare const createPagedResult: <T>(dataPlusOne: T[], paging: Paging) => PagedResult<T>;
|
|
27
|
+
/**
|
|
28
|
+
* @dev Gets the next page given the skip/take used to initialize the `PagedResult` interface.
|
|
29
|
+
* @returns the `Paging` class with the next page
|
|
30
|
+
*/
|
|
31
|
+
export declare const nextPage: (paging: Paging) => Paging;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { IConstantFlowAgreementV1, IInstantDistributionAgreementV1, SuperToken, TestToken } from "../typechain";
|
|
2
|
+
import { DataMode, Framework } from "..";
|
|
3
|
+
export declare const RESOLVER_ADDRESS = "0xe7f1725E7734CE288F8367e1Bb143E90bb3F0512";
|
|
4
|
+
export declare const HARDHAT_PRIVATE_KEY = "0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80";
|
|
5
|
+
interface ISetupProps {
|
|
6
|
+
readonly amount?: string;
|
|
7
|
+
readonly dataMode?: DataMode;
|
|
8
|
+
readonly subgraphEndpoint?: string;
|
|
9
|
+
}
|
|
10
|
+
export declare const setup: (props: ISetupProps) => Promise<{
|
|
11
|
+
CFAV1: IConstantFlowAgreementV1;
|
|
12
|
+
IDAV1: IInstantDistributionAgreementV1;
|
|
13
|
+
frameworkClass: Framework;
|
|
14
|
+
Deployer: any;
|
|
15
|
+
Alpha: any;
|
|
16
|
+
Bravo: any;
|
|
17
|
+
Charlie: any;
|
|
18
|
+
SuperToken: SuperToken;
|
|
19
|
+
Token: TestToken;
|
|
20
|
+
SignerCount: number;
|
|
21
|
+
}>;
|
|
22
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { DocumentNode } from "graphql";
|
|
2
|
+
declare type RequestDocument = string | DocumentNode;
|
|
3
|
+
export declare type Variables = {
|
|
4
|
+
[key: string]: any;
|
|
5
|
+
};
|
|
6
|
+
export declare type BatchRequestDocument<V = Variables> = {
|
|
7
|
+
document: RequestDocument;
|
|
8
|
+
variables?: V;
|
|
9
|
+
};
|
|
10
|
+
export declare class SubgraphClient {
|
|
11
|
+
readonly subgraphUrl: string;
|
|
12
|
+
constructor(subgraphUrl: string);
|
|
13
|
+
request<T = any, V = Variables>(document: RequestDocument, variables?: V): Promise<T>;
|
|
14
|
+
batchRequests<T = any, V = Variables>(documents: BatchRequestDocument<V>[]): Promise<T>;
|
|
15
|
+
}
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import * as Types from "../schema.generated";
|
|
2
|
+
import { TypedDocumentNode as DocumentNode } from "@graphql-typed-document-node/core";
|
|
3
|
+
export declare type GetAccountTokenSnapshotsQueryVariables = Types.Exact<{
|
|
4
|
+
where: Types.AccountTokenSnapshot_Filter;
|
|
5
|
+
skip: Types.Scalars["Int"];
|
|
6
|
+
first: Types.Scalars["Int"];
|
|
7
|
+
}>;
|
|
8
|
+
export declare type GetAccountTokenSnapshotsQuery = {
|
|
9
|
+
result: Array<{
|
|
10
|
+
id: string;
|
|
11
|
+
updatedAtTimestamp: string;
|
|
12
|
+
updatedAtBlockNumber: string;
|
|
13
|
+
totalNumberOfActiveStreams: number;
|
|
14
|
+
totalNumberOfClosedStreams: number;
|
|
15
|
+
totalSubscriptionsWithUnits: number;
|
|
16
|
+
totalApprovedSubscriptions: number;
|
|
17
|
+
balanceUntilUpdatedAt: string;
|
|
18
|
+
totalNetFlowRate: string;
|
|
19
|
+
totalInflowRate: string;
|
|
20
|
+
totalOutflowRate: string;
|
|
21
|
+
totalAmountStreamedUntilUpdatedAt: string;
|
|
22
|
+
totalAmountTransferredUntilUpdatedAt: string;
|
|
23
|
+
account: {
|
|
24
|
+
id: string;
|
|
25
|
+
};
|
|
26
|
+
token: {
|
|
27
|
+
id: string;
|
|
28
|
+
createdAtTimestamp: string;
|
|
29
|
+
createdAtBlockNumber: string;
|
|
30
|
+
name: string;
|
|
31
|
+
symbol: string;
|
|
32
|
+
isListed: boolean;
|
|
33
|
+
underlyingAddress: string;
|
|
34
|
+
};
|
|
35
|
+
}>;
|
|
36
|
+
};
|
|
37
|
+
export declare const GetAccountTokenSnapshotsDocument: DocumentNode<GetAccountTokenSnapshotsQuery, Types.Exact<{
|
|
38
|
+
where: Types.AccountTokenSnapshot_Filter;
|
|
39
|
+
skip: Types.Scalars["Int"];
|
|
40
|
+
first: Types.Scalars["Int"];
|
|
41
|
+
}>>;
|