@human-protocol/sdk 4.2.0 → 5.0.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/constants.js +4 -4
- package/dist/error.d.ts +16 -4
- package/dist/error.d.ts.map +1 -1
- package/dist/error.js +18 -6
- package/dist/escrow.d.ts +238 -28
- package/dist/escrow.d.ts.map +1 -1
- package/dist/escrow.js +255 -152
- package/dist/graphql/queries/escrow.d.ts +3 -1
- package/dist/graphql/queries/escrow.d.ts.map +1 -1
- package/dist/graphql/queries/escrow.js +49 -1
- package/dist/graphql/queries/operator.d.ts.map +1 -1
- package/dist/graphql/queries/operator.js +11 -9
- package/dist/graphql/queries/staking.d.ts +4 -0
- package/dist/graphql/queries/staking.d.ts.map +1 -0
- package/dist/graphql/queries/staking.js +71 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -1
- package/dist/interfaces.d.ts +56 -16
- package/dist/interfaces.d.ts.map +1 -1
- package/dist/operator.d.ts.map +1 -1
- package/dist/operator.js +53 -58
- package/dist/staking.d.ts +21 -1
- package/dist/staking.d.ts.map +1 -1
- package/dist/staking.js +84 -1
- package/dist/types.d.ts +39 -15
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +4 -0
- package/package.json +2 -2
- package/src/constants.ts +4 -4
- package/src/error.ts +25 -7
- package/src/escrow.ts +416 -113
- package/src/graphql/queries/escrow.ts +52 -1
- package/src/graphql/queries/operator.ts +11 -9
- package/src/graphql/queries/staking.ts +80 -0
- package/src/index.ts +2 -1
- package/src/interfaces.ts +63 -18
- package/src/operator.ts +62 -76
- package/src/staking.ts +106 -3
- package/src/types.ts +40 -15
package/src/types.ts
CHANGED
|
@@ -30,6 +30,10 @@ export enum EscrowStatus {
|
|
|
30
30
|
* Escrow is cancelled.
|
|
31
31
|
*/
|
|
32
32
|
Cancelled,
|
|
33
|
+
/**
|
|
34
|
+
* Escrow is cancelled.
|
|
35
|
+
*/
|
|
36
|
+
ToCancel,
|
|
33
37
|
}
|
|
34
38
|
|
|
35
39
|
/**
|
|
@@ -139,20 +143,6 @@ export type NetworkData = {
|
|
|
139
143
|
oldFactoryAddress: string;
|
|
140
144
|
};
|
|
141
145
|
|
|
142
|
-
/**
|
|
143
|
-
* Represents the response data for an escrow cancellation.
|
|
144
|
-
*/
|
|
145
|
-
export type EscrowCancel = {
|
|
146
|
-
/**
|
|
147
|
-
* The hash of the transaction associated with the escrow cancellation.
|
|
148
|
-
*/
|
|
149
|
-
txHash: string;
|
|
150
|
-
/**
|
|
151
|
-
* The amount refunded in the escrow cancellation.
|
|
152
|
-
*/
|
|
153
|
-
amountRefunded: bigint;
|
|
154
|
-
};
|
|
155
|
-
|
|
156
146
|
/**
|
|
157
147
|
* Represents the response data for an escrow withdrawal.
|
|
158
148
|
*/
|
|
@@ -168,7 +158,7 @@ export type EscrowWithdraw = {
|
|
|
168
158
|
/**
|
|
169
159
|
* The amount withdrawn from the escrow.
|
|
170
160
|
*/
|
|
171
|
-
|
|
161
|
+
withdrawnAmount: bigint;
|
|
172
162
|
};
|
|
173
163
|
|
|
174
164
|
/**
|
|
@@ -197,4 +187,39 @@ export type Payout = {
|
|
|
197
187
|
createdAt: number;
|
|
198
188
|
};
|
|
199
189
|
|
|
190
|
+
/**
|
|
191
|
+
* Represents a cancellation refund event.
|
|
192
|
+
*/
|
|
193
|
+
export type CancellationRefund = {
|
|
194
|
+
/**
|
|
195
|
+
* Unique identifier of the cancellation refund event.
|
|
196
|
+
*/
|
|
197
|
+
id: string;
|
|
198
|
+
/**
|
|
199
|
+
* The address of the escrow associated with the cancellation refund.
|
|
200
|
+
*/
|
|
201
|
+
escrowAddress: string;
|
|
202
|
+
/**
|
|
203
|
+
* The address of the receiver who received the refund.
|
|
204
|
+
*/
|
|
205
|
+
receiver: string;
|
|
206
|
+
/**
|
|
207
|
+
* The amount refunded to the receiver.
|
|
208
|
+
*/
|
|
209
|
+
amount: bigint;
|
|
210
|
+
/**
|
|
211
|
+
* The block number in which the cancellation refund event occurred.
|
|
212
|
+
*/
|
|
213
|
+
|
|
214
|
+
block: number;
|
|
215
|
+
/**
|
|
216
|
+
* The timestamp when the cancellation refund event occurred (in UNIX format).
|
|
217
|
+
*/
|
|
218
|
+
timestamp: number;
|
|
219
|
+
/**
|
|
220
|
+
* The transaction hash of the cancellation refund event.
|
|
221
|
+
*/
|
|
222
|
+
txHash: string;
|
|
223
|
+
};
|
|
224
|
+
|
|
200
225
|
export type TransactionLikeWithNonce = TransactionLike & { nonce: number };
|