@snapshot-labs/snapshot.js 0.4.92 → 0.4.94
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/index.d.ts +24 -2
- package/dist/schemas/index.d.ts +24 -2
- package/dist/sign/index.d.ts +2 -1
- package/dist/sign/types.d.ts +13 -0
- package/dist/snapshot.cjs.js +83 -4
- package/dist/snapshot.esm.js +83 -4
- package/dist/snapshot.min.js +7 -7
- package/package.json +1 -1
- package/src/networks.json +35 -3
- package/src/schemas/space.json +25 -2
- package/src/sign/index.ts +11 -1
- package/src/sign/types.json +2 -1
- package/src/sign/types.ts +18 -0
package/dist/index.d.ts
CHANGED
|
@@ -235,8 +235,30 @@ declare const _default: {
|
|
|
235
235
|
required: string[];
|
|
236
236
|
additionalProperties: boolean;
|
|
237
237
|
};
|
|
238
|
-
|
|
239
|
-
|
|
238
|
+
delegationPortal: {
|
|
239
|
+
delegationType: {
|
|
240
|
+
type: string;
|
|
241
|
+
title: string;
|
|
242
|
+
description: string;
|
|
243
|
+
anyOf: {
|
|
244
|
+
const: string;
|
|
245
|
+
title: string;
|
|
246
|
+
}[];
|
|
247
|
+
};
|
|
248
|
+
delegationContract: {
|
|
249
|
+
type: string;
|
|
250
|
+
format: string;
|
|
251
|
+
title: string;
|
|
252
|
+
description: string;
|
|
253
|
+
examples: string[];
|
|
254
|
+
};
|
|
255
|
+
delegationApi: {
|
|
256
|
+
type: string;
|
|
257
|
+
format: string;
|
|
258
|
+
title: string;
|
|
259
|
+
description: string;
|
|
260
|
+
examples: string[];
|
|
261
|
+
};
|
|
240
262
|
};
|
|
241
263
|
allowAlias: {
|
|
242
264
|
type: string;
|
package/dist/schemas/index.d.ts
CHANGED
|
@@ -231,8 +231,30 @@ declare const _default: {
|
|
|
231
231
|
required: string[];
|
|
232
232
|
additionalProperties: boolean;
|
|
233
233
|
};
|
|
234
|
-
|
|
235
|
-
|
|
234
|
+
delegationPortal: {
|
|
235
|
+
delegationType: {
|
|
236
|
+
type: string;
|
|
237
|
+
title: string;
|
|
238
|
+
description: string;
|
|
239
|
+
anyOf: {
|
|
240
|
+
const: string;
|
|
241
|
+
title: string;
|
|
242
|
+
}[];
|
|
243
|
+
};
|
|
244
|
+
delegationContract: {
|
|
245
|
+
type: string;
|
|
246
|
+
format: string;
|
|
247
|
+
title: string;
|
|
248
|
+
description: string;
|
|
249
|
+
examples: string[];
|
|
250
|
+
};
|
|
251
|
+
delegationApi: {
|
|
252
|
+
type: string;
|
|
253
|
+
format: string;
|
|
254
|
+
title: string;
|
|
255
|
+
description: string;
|
|
256
|
+
examples: string[];
|
|
257
|
+
};
|
|
236
258
|
};
|
|
237
259
|
allowAlias: {
|
|
238
260
|
type: string;
|
package/dist/sign/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Web3Provider } from '@ethersproject/providers';
|
|
2
2
|
import { Wallet } from '@ethersproject/wallet';
|
|
3
|
-
import { Space, Proposal, CancelProposal, Vote, Follow, Unfollow, Subscribe, Unsubscribe, Profile, Alias, DeleteSpace } from './types';
|
|
3
|
+
import { Space, Proposal, CancelProposal, Vote, Follow, Unfollow, Subscribe, Unsubscribe, Profile, Alias, DeleteSpace, Statement } from './types';
|
|
4
4
|
export declare const domain: {
|
|
5
5
|
name: string;
|
|
6
6
|
version: string;
|
|
@@ -19,6 +19,7 @@ export default class Client {
|
|
|
19
19
|
subscribe(web3: Web3Provider | Wallet, address: string, message: Subscribe): Promise<unknown>;
|
|
20
20
|
unsubscribe(web3: Web3Provider | Wallet, address: string, message: Unsubscribe): Promise<unknown>;
|
|
21
21
|
profile(web3: Web3Provider | Wallet, address: string, message: Profile): Promise<unknown>;
|
|
22
|
+
statement(web3: Web3Provider | Wallet, address: string, message: Statement): Promise<unknown>;
|
|
22
23
|
alias(web3: Web3Provider | Wallet, address: string, message: Alias): Promise<unknown>;
|
|
23
24
|
deleteSpace(web3: Web3Provider | Wallet, address: string, message: DeleteSpace): Promise<unknown>;
|
|
24
25
|
}
|
package/dist/sign/types.d.ts
CHANGED
|
@@ -65,6 +65,13 @@ export interface Profile {
|
|
|
65
65
|
timestamp?: number;
|
|
66
66
|
profile: string;
|
|
67
67
|
}
|
|
68
|
+
export interface Statement {
|
|
69
|
+
from?: string;
|
|
70
|
+
timestamp?: number;
|
|
71
|
+
space: string;
|
|
72
|
+
about: string;
|
|
73
|
+
statement: string;
|
|
74
|
+
}
|
|
68
75
|
export interface Alias {
|
|
69
76
|
from?: string;
|
|
70
77
|
alias: string;
|
|
@@ -165,6 +172,12 @@ export declare const profileTypes: {
|
|
|
165
172
|
type: string;
|
|
166
173
|
}[];
|
|
167
174
|
};
|
|
175
|
+
export declare const statementTypes: {
|
|
176
|
+
Statement: {
|
|
177
|
+
name: string;
|
|
178
|
+
type: string;
|
|
179
|
+
}[];
|
|
180
|
+
};
|
|
168
181
|
export declare const aliasTypes: {
|
|
169
182
|
Alias: {
|
|
170
183
|
name: string;
|
package/dist/snapshot.cjs.js
CHANGED
|
@@ -252,6 +252,15 @@ var profileTypes = {
|
|
|
252
252
|
{ name: 'profile', type: 'string' }
|
|
253
253
|
]
|
|
254
254
|
};
|
|
255
|
+
var statementTypes = {
|
|
256
|
+
Statement: [
|
|
257
|
+
{ name: 'from', type: 'address' },
|
|
258
|
+
{ name: 'timestamp', type: 'uint64' },
|
|
259
|
+
{ name: 'space', type: 'string' },
|
|
260
|
+
{ name: 'about', type: 'string' },
|
|
261
|
+
{ name: 'statement', type: 'string' }
|
|
262
|
+
]
|
|
263
|
+
};
|
|
255
264
|
var aliasTypes = {
|
|
256
265
|
Alias: [
|
|
257
266
|
{ name: 'from', type: 'address' },
|
|
@@ -466,6 +475,16 @@ var Client = /** @class */ (function () {
|
|
|
466
475
|
});
|
|
467
476
|
});
|
|
468
477
|
};
|
|
478
|
+
Client.prototype.statement = function (web3, address, message) {
|
|
479
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
480
|
+
return __generator(this, function (_a) {
|
|
481
|
+
switch (_a.label) {
|
|
482
|
+
case 0: return [4 /*yield*/, this.sign(web3, address, message, statementTypes)];
|
|
483
|
+
case 1: return [2 /*return*/, _a.sent()];
|
|
484
|
+
}
|
|
485
|
+
});
|
|
486
|
+
});
|
|
487
|
+
};
|
|
469
488
|
Client.prototype.alias = function (web3, address, message) {
|
|
470
489
|
return __awaiter(this, void 0, void 0, function () {
|
|
471
490
|
return __generator(this, function (_a) {
|
|
@@ -732,8 +751,36 @@ var definitions = {
|
|
|
732
751
|
],
|
|
733
752
|
additionalProperties: false
|
|
734
753
|
},
|
|
735
|
-
|
|
736
|
-
|
|
754
|
+
delegationPortal: {
|
|
755
|
+
delegationType: {
|
|
756
|
+
type: "string",
|
|
757
|
+
title: "Delegation type",
|
|
758
|
+
description: "Specify the type of delegation that you are using",
|
|
759
|
+
anyOf: [
|
|
760
|
+
{
|
|
761
|
+
"const": "compound-governor",
|
|
762
|
+
title: "Compound governor"
|
|
763
|
+
}
|
|
764
|
+
]
|
|
765
|
+
},
|
|
766
|
+
delegationContract: {
|
|
767
|
+
type: "string",
|
|
768
|
+
format: "address",
|
|
769
|
+
title: "Contract address",
|
|
770
|
+
description: "The address of your delegation contract",
|
|
771
|
+
examples: [
|
|
772
|
+
"0x3901D0fDe202aF1427216b79f5243f8A022d68cf"
|
|
773
|
+
]
|
|
774
|
+
},
|
|
775
|
+
delegationApi: {
|
|
776
|
+
type: "string",
|
|
777
|
+
format: "uri",
|
|
778
|
+
title: "Delegation API",
|
|
779
|
+
description: "The URL of your delegation API (e.g a subgraph)",
|
|
780
|
+
examples: [
|
|
781
|
+
"https://api.thegraph.com/subgraphs/name/arr00/uniswap-governance-v2"
|
|
782
|
+
]
|
|
783
|
+
}
|
|
737
784
|
},
|
|
738
785
|
allowAlias: {
|
|
739
786
|
type: "boolean"
|
|
@@ -1350,8 +1397,8 @@ var networks = {
|
|
|
1350
1397
|
},
|
|
1351
1398
|
"5": {
|
|
1352
1399
|
key: "5",
|
|
1353
|
-
name: "Ethereum Testnet
|
|
1354
|
-
shortName: "
|
|
1400
|
+
name: "Ethereum Testnet Goerli",
|
|
1401
|
+
shortName: "Goerli",
|
|
1355
1402
|
chainId: 5,
|
|
1356
1403
|
network: "goerli",
|
|
1357
1404
|
testnet: true,
|
|
@@ -2778,6 +2825,21 @@ var networks = {
|
|
|
2778
2825
|
},
|
|
2779
2826
|
start: 4364,
|
|
2780
2827
|
logo: "ipfs://QmPXPCBho3kGLt5rhG9JGkKmzdtLvqZmJqGzzijVCuggWY"
|
|
2828
|
+
},
|
|
2829
|
+
"5555": {
|
|
2830
|
+
key: "5555",
|
|
2831
|
+
name: "Chain Verse Mainnet",
|
|
2832
|
+
shortName: "ChainVerse",
|
|
2833
|
+
chainId: 5555,
|
|
2834
|
+
network: "ChainVerse",
|
|
2835
|
+
multicall: "0xcA11bde05977b3631167028862bE2a173976CA11",
|
|
2836
|
+
rpc: [
|
|
2837
|
+
"https://rpc.chainverse.info"
|
|
2838
|
+
],
|
|
2839
|
+
explorer: {
|
|
2840
|
+
url: "https://explorer.chainverse.info"
|
|
2841
|
+
},
|
|
2842
|
+
logo: "ipfs://QmQyJt28h4wN3QHPXUQJQYQqGiFUD77han3zibZPzHbitk"
|
|
2781
2843
|
},
|
|
2782
2844
|
"5851": {
|
|
2783
2845
|
key: "5851",
|
|
@@ -3163,6 +3225,23 @@ var networks = {
|
|
|
3163
3225
|
},
|
|
3164
3226
|
start: 62,
|
|
3165
3227
|
logo: "ipfs://QmZNkpVgPbuVbDcsi6arwH1om3456FGnwfDqYQJWUfHDEx"
|
|
3228
|
+
},
|
|
3229
|
+
"59140": {
|
|
3230
|
+
key: "59140",
|
|
3231
|
+
name: "Linea Goerli test network",
|
|
3232
|
+
shortName: "Linea Goerli",
|
|
3233
|
+
chainId: 59140,
|
|
3234
|
+
network: "testnet",
|
|
3235
|
+
testnet: true,
|
|
3236
|
+
multicall: "0xcA11bde05977b3631167028862bE2a173976CA11",
|
|
3237
|
+
rpc: [
|
|
3238
|
+
"https://rpc.goerli.linea.build"
|
|
3239
|
+
],
|
|
3240
|
+
explorer: {
|
|
3241
|
+
url: "https://explorer.goerli.linea.build"
|
|
3242
|
+
},
|
|
3243
|
+
start: 498623,
|
|
3244
|
+
logo: "ipfs://QmSwCnEeLoyMApQd1YfhmGvLt97bH5mLPoabjKqUSuQHHF"
|
|
3166
3245
|
},
|
|
3167
3246
|
"60001": {
|
|
3168
3247
|
key: "60001",
|
package/dist/snapshot.esm.js
CHANGED
|
@@ -243,6 +243,15 @@ var profileTypes = {
|
|
|
243
243
|
{ name: 'profile', type: 'string' }
|
|
244
244
|
]
|
|
245
245
|
};
|
|
246
|
+
var statementTypes = {
|
|
247
|
+
Statement: [
|
|
248
|
+
{ name: 'from', type: 'address' },
|
|
249
|
+
{ name: 'timestamp', type: 'uint64' },
|
|
250
|
+
{ name: 'space', type: 'string' },
|
|
251
|
+
{ name: 'about', type: 'string' },
|
|
252
|
+
{ name: 'statement', type: 'string' }
|
|
253
|
+
]
|
|
254
|
+
};
|
|
246
255
|
var aliasTypes = {
|
|
247
256
|
Alias: [
|
|
248
257
|
{ name: 'from', type: 'address' },
|
|
@@ -457,6 +466,16 @@ var Client = /** @class */ (function () {
|
|
|
457
466
|
});
|
|
458
467
|
});
|
|
459
468
|
};
|
|
469
|
+
Client.prototype.statement = function (web3, address, message) {
|
|
470
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
471
|
+
return __generator(this, function (_a) {
|
|
472
|
+
switch (_a.label) {
|
|
473
|
+
case 0: return [4 /*yield*/, this.sign(web3, address, message, statementTypes)];
|
|
474
|
+
case 1: return [2 /*return*/, _a.sent()];
|
|
475
|
+
}
|
|
476
|
+
});
|
|
477
|
+
});
|
|
478
|
+
};
|
|
460
479
|
Client.prototype.alias = function (web3, address, message) {
|
|
461
480
|
return __awaiter(this, void 0, void 0, function () {
|
|
462
481
|
return __generator(this, function (_a) {
|
|
@@ -723,8 +742,36 @@ var definitions = {
|
|
|
723
742
|
],
|
|
724
743
|
additionalProperties: false
|
|
725
744
|
},
|
|
726
|
-
|
|
727
|
-
|
|
745
|
+
delegationPortal: {
|
|
746
|
+
delegationType: {
|
|
747
|
+
type: "string",
|
|
748
|
+
title: "Delegation type",
|
|
749
|
+
description: "Specify the type of delegation that you are using",
|
|
750
|
+
anyOf: [
|
|
751
|
+
{
|
|
752
|
+
"const": "compound-governor",
|
|
753
|
+
title: "Compound governor"
|
|
754
|
+
}
|
|
755
|
+
]
|
|
756
|
+
},
|
|
757
|
+
delegationContract: {
|
|
758
|
+
type: "string",
|
|
759
|
+
format: "address",
|
|
760
|
+
title: "Contract address",
|
|
761
|
+
description: "The address of your delegation contract",
|
|
762
|
+
examples: [
|
|
763
|
+
"0x3901D0fDe202aF1427216b79f5243f8A022d68cf"
|
|
764
|
+
]
|
|
765
|
+
},
|
|
766
|
+
delegationApi: {
|
|
767
|
+
type: "string",
|
|
768
|
+
format: "uri",
|
|
769
|
+
title: "Delegation API",
|
|
770
|
+
description: "The URL of your delegation API (e.g a subgraph)",
|
|
771
|
+
examples: [
|
|
772
|
+
"https://api.thegraph.com/subgraphs/name/arr00/uniswap-governance-v2"
|
|
773
|
+
]
|
|
774
|
+
}
|
|
728
775
|
},
|
|
729
776
|
allowAlias: {
|
|
730
777
|
type: "boolean"
|
|
@@ -1341,8 +1388,8 @@ var networks = {
|
|
|
1341
1388
|
},
|
|
1342
1389
|
"5": {
|
|
1343
1390
|
key: "5",
|
|
1344
|
-
name: "Ethereum Testnet
|
|
1345
|
-
shortName: "
|
|
1391
|
+
name: "Ethereum Testnet Goerli",
|
|
1392
|
+
shortName: "Goerli",
|
|
1346
1393
|
chainId: 5,
|
|
1347
1394
|
network: "goerli",
|
|
1348
1395
|
testnet: true,
|
|
@@ -2769,6 +2816,21 @@ var networks = {
|
|
|
2769
2816
|
},
|
|
2770
2817
|
start: 4364,
|
|
2771
2818
|
logo: "ipfs://QmPXPCBho3kGLt5rhG9JGkKmzdtLvqZmJqGzzijVCuggWY"
|
|
2819
|
+
},
|
|
2820
|
+
"5555": {
|
|
2821
|
+
key: "5555",
|
|
2822
|
+
name: "Chain Verse Mainnet",
|
|
2823
|
+
shortName: "ChainVerse",
|
|
2824
|
+
chainId: 5555,
|
|
2825
|
+
network: "ChainVerse",
|
|
2826
|
+
multicall: "0xcA11bde05977b3631167028862bE2a173976CA11",
|
|
2827
|
+
rpc: [
|
|
2828
|
+
"https://rpc.chainverse.info"
|
|
2829
|
+
],
|
|
2830
|
+
explorer: {
|
|
2831
|
+
url: "https://explorer.chainverse.info"
|
|
2832
|
+
},
|
|
2833
|
+
logo: "ipfs://QmQyJt28h4wN3QHPXUQJQYQqGiFUD77han3zibZPzHbitk"
|
|
2772
2834
|
},
|
|
2773
2835
|
"5851": {
|
|
2774
2836
|
key: "5851",
|
|
@@ -3154,6 +3216,23 @@ var networks = {
|
|
|
3154
3216
|
},
|
|
3155
3217
|
start: 62,
|
|
3156
3218
|
logo: "ipfs://QmZNkpVgPbuVbDcsi6arwH1om3456FGnwfDqYQJWUfHDEx"
|
|
3219
|
+
},
|
|
3220
|
+
"59140": {
|
|
3221
|
+
key: "59140",
|
|
3222
|
+
name: "Linea Goerli test network",
|
|
3223
|
+
shortName: "Linea Goerli",
|
|
3224
|
+
chainId: 59140,
|
|
3225
|
+
network: "testnet",
|
|
3226
|
+
testnet: true,
|
|
3227
|
+
multicall: "0xcA11bde05977b3631167028862bE2a173976CA11",
|
|
3228
|
+
rpc: [
|
|
3229
|
+
"https://rpc.goerli.linea.build"
|
|
3230
|
+
],
|
|
3231
|
+
explorer: {
|
|
3232
|
+
url: "https://explorer.goerli.linea.build"
|
|
3233
|
+
},
|
|
3234
|
+
start: 498623,
|
|
3235
|
+
logo: "ipfs://QmSwCnEeLoyMApQd1YfhmGvLt97bH5mLPoabjKqUSuQHHF"
|
|
3157
3236
|
},
|
|
3158
3237
|
"60001": {
|
|
3159
3238
|
key: "60001",
|