@snapshot-labs/snapshot.js 0.11.37 → 0.11.39

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.
@@ -1,4 +1,4 @@
1
- import { StaticJsonRpcProvider } from '@ethersproject/providers';
2
- export declare function verifyDefault(address: string, sig: string, hash: string, provider: StaticJsonRpcProvider): Promise<boolean>;
3
- export declare function verifyOldVersion(address: string, sig: string, hash: string, provider: StaticJsonRpcProvider): Promise<boolean>;
4
- export declare function verify(address: any, sig: any, hash: any, network?: string, options?: {}): Promise<boolean>;
1
+ import { StaticJsonRpcProvider } from '@ethersproject/providers';
2
+ export declare function verifyDefault(address: string, sig: string, hash: string, provider: StaticJsonRpcProvider): Promise<boolean>;
3
+ export declare function verifyOldVersion(address: string, sig: string, hash: string, provider: StaticJsonRpcProvider): Promise<boolean>;
4
+ export declare function verify(address: any, sig: any, hash: any, network?: string, options?: {}): Promise<boolean>;
@@ -1,29 +1,29 @@
1
- import { Web3Provider } from '@ethersproject/providers';
2
- import { Wallet } from '@ethersproject/wallet';
3
- import { Space, Proposal, UpdateProposal, FlagProposal, CancelProposal, Vote, Follow, Unfollow, Subscribe, Unsubscribe, Profile, Alias, DeleteSpace, Statement } from './types';
4
- export declare const domain: {
5
- name: string;
6
- version: string;
7
- chainId?: number;
8
- };
9
- export default class Client {
10
- readonly address: string;
11
- readonly options: any;
12
- constructor(address?: string, options?: {});
13
- sign(web3: Web3Provider | Wallet, address: string, message: any, types: any): Promise<unknown>;
14
- send(envelop: any): Promise<unknown>;
15
- space(web3: Web3Provider | Wallet, address: string, message: Space): Promise<unknown>;
16
- proposal(web3: Web3Provider | Wallet, address: string, message: Proposal): Promise<unknown>;
17
- updateProposal(web3: Web3Provider | Wallet, address: string, message: UpdateProposal): Promise<unknown>;
18
- flagProposal(web3: Web3Provider | Wallet, address: string, message: FlagProposal): Promise<unknown>;
19
- cancelProposal(web3: Web3Provider | Wallet, address: string, message: CancelProposal): Promise<unknown>;
20
- vote(web3: Web3Provider | Wallet, address: string, message: Vote): Promise<unknown>;
21
- follow(web3: Web3Provider | Wallet, address: string, message: Follow): Promise<unknown>;
22
- unfollow(web3: Web3Provider | Wallet, address: string, message: Unfollow): Promise<unknown>;
23
- subscribe(web3: Web3Provider | Wallet, address: string, message: Subscribe): Promise<unknown>;
24
- unsubscribe(web3: Web3Provider | Wallet, address: string, message: Unsubscribe): Promise<unknown>;
25
- profile(web3: Web3Provider | Wallet, address: string, message: Profile): Promise<unknown>;
26
- statement(web3: Web3Provider | Wallet, address: string, message: Statement): Promise<unknown>;
27
- alias(web3: Web3Provider | Wallet, address: string, message: Alias): Promise<unknown>;
28
- deleteSpace(web3: Web3Provider | Wallet, address: string, message: DeleteSpace): Promise<unknown>;
29
- }
1
+ import { Web3Provider } from '@ethersproject/providers';
2
+ import { Wallet } from '@ethersproject/wallet';
3
+ import { Space, Proposal, UpdateProposal, FlagProposal, CancelProposal, Vote, Follow, Unfollow, Subscribe, Unsubscribe, Profile, Alias, DeleteSpace, Statement } from './types';
4
+ export declare const domain: {
5
+ name: string;
6
+ version: string;
7
+ chainId?: number;
8
+ };
9
+ export default class Client {
10
+ readonly address: string;
11
+ readonly options: any;
12
+ constructor(address?: string, options?: {});
13
+ sign(web3: Web3Provider | Wallet, address: string, message: any, types: any): Promise<unknown>;
14
+ send(envelop: any): Promise<unknown>;
15
+ space(web3: Web3Provider | Wallet, address: string, message: Space): Promise<unknown>;
16
+ proposal(web3: Web3Provider | Wallet, address: string, message: Proposal): Promise<unknown>;
17
+ updateProposal(web3: Web3Provider | Wallet, address: string, message: UpdateProposal): Promise<unknown>;
18
+ flagProposal(web3: Web3Provider | Wallet, address: string, message: FlagProposal): Promise<unknown>;
19
+ cancelProposal(web3: Web3Provider | Wallet, address: string, message: CancelProposal): Promise<unknown>;
20
+ vote(web3: Web3Provider | Wallet, address: string, message: Vote): Promise<unknown>;
21
+ follow(web3: Web3Provider | Wallet, address: string, message: Follow): Promise<unknown>;
22
+ unfollow(web3: Web3Provider | Wallet, address: string, message: Unfollow): Promise<unknown>;
23
+ subscribe(web3: Web3Provider | Wallet, address: string, message: Subscribe): Promise<unknown>;
24
+ unsubscribe(web3: Web3Provider | Wallet, address: string, message: Unsubscribe): Promise<unknown>;
25
+ profile(web3: Web3Provider | Wallet, address: string, message: Profile): Promise<unknown>;
26
+ statement(web3: Web3Provider | Wallet, address: string, message: Statement): Promise<unknown>;
27
+ alias(web3: Web3Provider | Wallet, address: string, message: Alias): Promise<unknown>;
28
+ deleteSpace(web3: Web3Provider | Wallet, address: string, message: DeleteSpace): Promise<unknown>;
29
+ }
@@ -1,227 +1,227 @@
1
- export interface Space {
2
- from?: string;
3
- space: string;
4
- timestamp?: number;
5
- settings: string;
6
- }
7
- export declare type ProposalType = 'single-choice' | 'approval' | 'quadratic' | 'ranked-choice' | 'weighted' | 'basic';
8
- export interface Proposal {
9
- from?: string;
10
- space: string;
11
- timestamp?: number;
12
- type: ProposalType;
13
- title: string;
14
- body: string;
15
- discussion: string;
16
- choices: string[];
17
- start: number;
18
- end: number;
19
- snapshot: number;
20
- plugins: string;
21
- app?: string;
22
- }
23
- export interface UpdateProposal {
24
- proposal: string;
25
- from?: string;
26
- space: string;
27
- timestamp?: number;
28
- type: ProposalType;
29
- title: string;
30
- body: string;
31
- discussion: string;
32
- choices: string[];
33
- plugins: string;
34
- }
35
- export interface FlagProposal {
36
- from?: string;
37
- space: string;
38
- proposal: string;
39
- timestamp?: number;
40
- }
41
- export interface CancelProposal {
42
- from?: string;
43
- space: string;
44
- timestamp?: number;
45
- proposal: string;
46
- }
47
- export interface Vote {
48
- from?: string;
49
- space: string;
50
- timestamp?: number;
51
- proposal: string;
52
- type: ProposalType;
53
- choice: number | number[] | string | {
54
- [key: string]: number;
55
- };
56
- privacy?: string;
57
- reason?: string;
58
- app?: string;
59
- metadata?: string;
60
- }
61
- export interface Follow {
62
- from?: string;
63
- network?: string;
64
- space: string;
65
- timestamp?: number;
66
- }
67
- export interface Unfollow {
68
- from?: string;
69
- network?: string;
70
- space: string;
71
- timestamp?: number;
72
- }
73
- export interface Subscribe {
74
- from?: string;
75
- space: string;
76
- timestamp?: number;
77
- }
78
- export interface Unsubscribe {
79
- from?: string;
80
- space: string;
81
- timestamp?: number;
82
- }
83
- export interface Profile {
84
- from?: string;
85
- timestamp?: number;
86
- profile: string;
87
- }
88
- export interface Statement {
89
- from?: string;
90
- timestamp?: number;
91
- space: string;
92
- about: string;
93
- statement: string;
94
- discourse?: string;
95
- status?: string;
96
- network?: string;
97
- }
98
- export interface Alias {
99
- from?: string;
100
- alias: string;
101
- timestamp?: number;
102
- }
103
- export interface DeleteSpace {
104
- from?: string;
105
- space: string;
106
- timestamp?: number;
107
- }
108
- export declare const spaceTypes: {
109
- Space: {
110
- name: string;
111
- type: string;
112
- }[];
113
- };
114
- export declare const proposalTypes: {
115
- Proposal: {
116
- name: string;
117
- type: string;
118
- }[];
119
- };
120
- export declare const updateProposalTypes: {
121
- UpdateProposal: {
122
- name: string;
123
- type: string;
124
- }[];
125
- };
126
- export declare const flagProposalTypes: {
127
- FlagProposal: {
128
- name: string;
129
- type: string;
130
- }[];
131
- };
132
- export declare const cancelProposalTypes: {
133
- CancelProposal: {
134
- name: string;
135
- type: string;
136
- }[];
137
- };
138
- export declare const cancelProposal2Types: {
139
- CancelProposal: {
140
- name: string;
141
- type: string;
142
- }[];
143
- };
144
- export declare const voteTypes: {
145
- Vote: {
146
- name: string;
147
- type: string;
148
- }[];
149
- };
150
- export declare const voteArrayTypes: {
151
- Vote: {
152
- name: string;
153
- type: string;
154
- }[];
155
- };
156
- export declare const voteStringTypes: {
157
- Vote: {
158
- name: string;
159
- type: string;
160
- }[];
161
- };
162
- export declare const vote2Types: {
163
- Vote: {
164
- name: string;
165
- type: string;
166
- }[];
167
- };
168
- export declare const voteArray2Types: {
169
- Vote: {
170
- name: string;
171
- type: string;
172
- }[];
173
- };
174
- export declare const voteString2Types: {
175
- Vote: {
176
- name: string;
177
- type: string;
178
- }[];
179
- };
180
- export declare const followTypes: {
181
- Follow: {
182
- name: string;
183
- type: string;
184
- }[];
185
- };
186
- export declare const unfollowTypes: {
187
- Unfollow: {
188
- name: string;
189
- type: string;
190
- }[];
191
- };
192
- export declare const subscribeTypes: {
193
- Subscribe: {
194
- name: string;
195
- type: string;
196
- }[];
197
- };
198
- export declare const unsubscribeTypes: {
199
- Unsubscribe: {
200
- name: string;
201
- type: string;
202
- }[];
203
- };
204
- export declare const profileTypes: {
205
- Profile: {
206
- name: string;
207
- type: string;
208
- }[];
209
- };
210
- export declare const statementTypes: {
211
- Statement: {
212
- name: string;
213
- type: string;
214
- }[];
215
- };
216
- export declare const aliasTypes: {
217
- Alias: {
218
- name: string;
219
- type: string;
220
- }[];
221
- };
222
- export declare const deleteSpaceType: {
223
- DeleteSpace: {
224
- name: string;
225
- type: string;
226
- }[];
227
- };
1
+ export interface Space {
2
+ from?: string;
3
+ space: string;
4
+ timestamp?: number;
5
+ settings: string;
6
+ }
7
+ export type ProposalType = 'single-choice' | 'approval' | 'quadratic' | 'ranked-choice' | 'weighted' | 'basic';
8
+ export interface Proposal {
9
+ from?: string;
10
+ space: string;
11
+ timestamp?: number;
12
+ type: ProposalType;
13
+ title: string;
14
+ body: string;
15
+ discussion: string;
16
+ choices: string[];
17
+ start: number;
18
+ end: number;
19
+ snapshot: number;
20
+ plugins: string;
21
+ app?: string;
22
+ }
23
+ export interface UpdateProposal {
24
+ proposal: string;
25
+ from?: string;
26
+ space: string;
27
+ timestamp?: number;
28
+ type: ProposalType;
29
+ title: string;
30
+ body: string;
31
+ discussion: string;
32
+ choices: string[];
33
+ plugins: string;
34
+ }
35
+ export interface FlagProposal {
36
+ from?: string;
37
+ space: string;
38
+ proposal: string;
39
+ timestamp?: number;
40
+ }
41
+ export interface CancelProposal {
42
+ from?: string;
43
+ space: string;
44
+ timestamp?: number;
45
+ proposal: string;
46
+ }
47
+ export interface Vote {
48
+ from?: string;
49
+ space: string;
50
+ timestamp?: number;
51
+ proposal: string;
52
+ type: ProposalType;
53
+ choice: number | number[] | string | {
54
+ [key: string]: number;
55
+ };
56
+ privacy?: string;
57
+ reason?: string;
58
+ app?: string;
59
+ metadata?: string;
60
+ }
61
+ export interface Follow {
62
+ from?: string;
63
+ network?: string;
64
+ space: string;
65
+ timestamp?: number;
66
+ }
67
+ export interface Unfollow {
68
+ from?: string;
69
+ network?: string;
70
+ space: string;
71
+ timestamp?: number;
72
+ }
73
+ export interface Subscribe {
74
+ from?: string;
75
+ space: string;
76
+ timestamp?: number;
77
+ }
78
+ export interface Unsubscribe {
79
+ from?: string;
80
+ space: string;
81
+ timestamp?: number;
82
+ }
83
+ export interface Profile {
84
+ from?: string;
85
+ timestamp?: number;
86
+ profile: string;
87
+ }
88
+ export interface Statement {
89
+ from?: string;
90
+ timestamp?: number;
91
+ space: string;
92
+ about: string;
93
+ statement: string;
94
+ discourse?: string;
95
+ status?: string;
96
+ network?: string;
97
+ }
98
+ export interface Alias {
99
+ from?: string;
100
+ alias: string;
101
+ timestamp?: number;
102
+ }
103
+ export interface DeleteSpace {
104
+ from?: string;
105
+ space: string;
106
+ timestamp?: number;
107
+ }
108
+ export declare const spaceTypes: {
109
+ Space: {
110
+ name: string;
111
+ type: string;
112
+ }[];
113
+ };
114
+ export declare const proposalTypes: {
115
+ Proposal: {
116
+ name: string;
117
+ type: string;
118
+ }[];
119
+ };
120
+ export declare const updateProposalTypes: {
121
+ UpdateProposal: {
122
+ name: string;
123
+ type: string;
124
+ }[];
125
+ };
126
+ export declare const flagProposalTypes: {
127
+ FlagProposal: {
128
+ name: string;
129
+ type: string;
130
+ }[];
131
+ };
132
+ export declare const cancelProposalTypes: {
133
+ CancelProposal: {
134
+ name: string;
135
+ type: string;
136
+ }[];
137
+ };
138
+ export declare const cancelProposal2Types: {
139
+ CancelProposal: {
140
+ name: string;
141
+ type: string;
142
+ }[];
143
+ };
144
+ export declare const voteTypes: {
145
+ Vote: {
146
+ name: string;
147
+ type: string;
148
+ }[];
149
+ };
150
+ export declare const voteArrayTypes: {
151
+ Vote: {
152
+ name: string;
153
+ type: string;
154
+ }[];
155
+ };
156
+ export declare const voteStringTypes: {
157
+ Vote: {
158
+ name: string;
159
+ type: string;
160
+ }[];
161
+ };
162
+ export declare const vote2Types: {
163
+ Vote: {
164
+ name: string;
165
+ type: string;
166
+ }[];
167
+ };
168
+ export declare const voteArray2Types: {
169
+ Vote: {
170
+ name: string;
171
+ type: string;
172
+ }[];
173
+ };
174
+ export declare const voteString2Types: {
175
+ Vote: {
176
+ name: string;
177
+ type: string;
178
+ }[];
179
+ };
180
+ export declare const followTypes: {
181
+ Follow: {
182
+ name: string;
183
+ type: string;
184
+ }[];
185
+ };
186
+ export declare const unfollowTypes: {
187
+ Unfollow: {
188
+ name: string;
189
+ type: string;
190
+ }[];
191
+ };
192
+ export declare const subscribeTypes: {
193
+ Subscribe: {
194
+ name: string;
195
+ type: string;
196
+ }[];
197
+ };
198
+ export declare const unsubscribeTypes: {
199
+ Unsubscribe: {
200
+ name: string;
201
+ type: string;
202
+ }[];
203
+ };
204
+ export declare const profileTypes: {
205
+ Profile: {
206
+ name: string;
207
+ type: string;
208
+ }[];
209
+ };
210
+ export declare const statementTypes: {
211
+ Statement: {
212
+ name: string;
213
+ type: string;
214
+ }[];
215
+ };
216
+ export declare const aliasTypes: {
217
+ Alias: {
218
+ name: string;
219
+ type: string;
220
+ }[];
221
+ };
222
+ export declare const deleteSpaceType: {
223
+ DeleteSpace: {
224
+ name: string;
225
+ type: string;
226
+ }[];
227
+ };
@@ -1,2 +1,2 @@
1
- export declare function getHash(data: any): string;
2
- export declare function verify(address: any, sig: any, data: any, network?: string, options?: {}): Promise<boolean>;
1
+ export declare function getHash(data: any): string;
2
+ export declare function verify(address: any, sig: any, data: any, network?: string, options?: {}): Promise<boolean>;