-
Notifications
You must be signed in to change notification settings - Fork 261
Expand file tree
/
Copy pathindexArgs.ts
More file actions
82 lines (75 loc) · 2.58 KB
/
indexArgs.ts
File metadata and controls
82 lines (75 loc) · 2.58 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
import {type BaseSuperTokenMutation, type NothingString} from '../../../argTypes';
/**
* Creates an IDA Index.
*/
export interface IndexCreateMutation extends BaseSuperTokenMutation {
/** The id of the index. */
indexId: string;
/** Extra user data provided. */
userDataBytes: string | NothingString;
}
/**
* Updates the `units` allocated to a Subscription.
*/
export interface IndexUpdateSubscriptionUnitsMutation extends BaseSuperTokenMutation {
/** The subscriber address whose units you want to update. */
subscriberAddress: string;
/** The id of the index. */
indexId: string;
/** The amount of units you want to update to. */
unitsNumber: string;
/** Extra user data provided. */
userDataBytes: string | NothingString;
}
/**
* Deletes a Subscription by setting the `units` allocated to the Subscriber to 0.
*/
export interface IndexDeleteSubscriptionMutation extends BaseSuperTokenMutation {
/** The id of the index. */
indexId: string;
/** The subscriber address whose subscription you want to delete. */
publisherAddress: string;
/** The publisher address of the index you are targeting. */
subscriberAddress: string;
/** Extra user data provided. */
userDataBytes: string | NothingString;
}
/**
* Distributes `amount` of token to an index
*/
export interface IndexDistributeMutation extends BaseSuperTokenMutation {
/** The id of the index. */
indexId: string;
/** The amount of tokens to be distributed. */
amountWei: string;
/** Extra user data provided. */
userDataBytes: string | NothingString;
}
/**
* Approves a Subscription, so the Subscriber won't need to claim tokens when the Publisher distributes.
*/
export interface IndexSubscriptionApproveMutation extends BaseSuperTokenMutation {
indexId: string;
publisherAddress: string;
userDataBytes: string | NothingString;
}
/**
* Revokes a Subscription, so the Subscriber will need to claim tokens when the Publisher distributes.
*/
export interface IndexSubscriptionRevokeMutation extends BaseSuperTokenMutation {
/** The id of the index. */
indexId: string;
/** The index publisher address you want to revoke for the subscriber. */
publisherAddress: string;
/** Extra user data provided. */
userDataBytes: string | NothingString;
}
/**
* Claims any pending tokens allocated to the Subscription (unapproved).
*/
export interface IndexSubscriptionClaimMutation extends BaseSuperTokenMutation {
indexId: string;
publisherAddress: string;
subscriberAddress: string;
userDataBytes: string | NothingString;
}