@snapshot-labs/snapshot.js 0.4.93 → 0.4.95
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/sign/index.d.ts +2 -1
- package/dist/sign/types.d.ts +13 -0
- package/dist/snapshot.cjs.js +51 -0
- package/dist/snapshot.esm.js +51 -0
- package/dist/snapshot.min.js +7 -7
- package/package.json +1 -1
- package/src/networks.json +33 -1
- package/src/sign/index.ts +11 -1
- package/src/sign/types.json +2 -1
- package/src/sign/types.ts +18 -0
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) {
|
|
@@ -2778,6 +2797,21 @@ var networks = {
|
|
|
2778
2797
|
},
|
|
2779
2798
|
start: 4364,
|
|
2780
2799
|
logo: "ipfs://QmPXPCBho3kGLt5rhG9JGkKmzdtLvqZmJqGzzijVCuggWY"
|
|
2800
|
+
},
|
|
2801
|
+
"5555": {
|
|
2802
|
+
key: "5555",
|
|
2803
|
+
name: "Chain Verse Mainnet",
|
|
2804
|
+
shortName: "ChainVerse",
|
|
2805
|
+
chainId: 5555,
|
|
2806
|
+
network: "ChainVerse",
|
|
2807
|
+
multicall: "0xcA11bde05977b3631167028862bE2a173976CA11",
|
|
2808
|
+
rpc: [
|
|
2809
|
+
"https://rpc.chainverse.info"
|
|
2810
|
+
],
|
|
2811
|
+
explorer: {
|
|
2812
|
+
url: "https://explorer.chainverse.info"
|
|
2813
|
+
},
|
|
2814
|
+
logo: "ipfs://QmQyJt28h4wN3QHPXUQJQYQqGiFUD77han3zibZPzHbitk"
|
|
2781
2815
|
},
|
|
2782
2816
|
"5851": {
|
|
2783
2817
|
key: "5851",
|
|
@@ -3163,6 +3197,23 @@ var networks = {
|
|
|
3163
3197
|
},
|
|
3164
3198
|
start: 62,
|
|
3165
3199
|
logo: "ipfs://QmZNkpVgPbuVbDcsi6arwH1om3456FGnwfDqYQJWUfHDEx"
|
|
3200
|
+
},
|
|
3201
|
+
"59140": {
|
|
3202
|
+
key: "59140",
|
|
3203
|
+
name: "Linea Goerli test network",
|
|
3204
|
+
shortName: "Linea Goerli",
|
|
3205
|
+
chainId: 59140,
|
|
3206
|
+
network: "testnet",
|
|
3207
|
+
testnet: true,
|
|
3208
|
+
multicall: "0xcA11bde05977b3631167028862bE2a173976CA11",
|
|
3209
|
+
rpc: [
|
|
3210
|
+
"https://rpc.goerli.linea.build"
|
|
3211
|
+
],
|
|
3212
|
+
explorer: {
|
|
3213
|
+
url: "https://explorer.goerli.linea.build"
|
|
3214
|
+
},
|
|
3215
|
+
start: 498623,
|
|
3216
|
+
logo: "ipfs://QmSwCnEeLoyMApQd1YfhmGvLt97bH5mLPoabjKqUSuQHHF"
|
|
3166
3217
|
},
|
|
3167
3218
|
"60001": {
|
|
3168
3219
|
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) {
|
|
@@ -2769,6 +2788,21 @@ var networks = {
|
|
|
2769
2788
|
},
|
|
2770
2789
|
start: 4364,
|
|
2771
2790
|
logo: "ipfs://QmPXPCBho3kGLt5rhG9JGkKmzdtLvqZmJqGzzijVCuggWY"
|
|
2791
|
+
},
|
|
2792
|
+
"5555": {
|
|
2793
|
+
key: "5555",
|
|
2794
|
+
name: "Chain Verse Mainnet",
|
|
2795
|
+
shortName: "ChainVerse",
|
|
2796
|
+
chainId: 5555,
|
|
2797
|
+
network: "ChainVerse",
|
|
2798
|
+
multicall: "0xcA11bde05977b3631167028862bE2a173976CA11",
|
|
2799
|
+
rpc: [
|
|
2800
|
+
"https://rpc.chainverse.info"
|
|
2801
|
+
],
|
|
2802
|
+
explorer: {
|
|
2803
|
+
url: "https://explorer.chainverse.info"
|
|
2804
|
+
},
|
|
2805
|
+
logo: "ipfs://QmQyJt28h4wN3QHPXUQJQYQqGiFUD77han3zibZPzHbitk"
|
|
2772
2806
|
},
|
|
2773
2807
|
"5851": {
|
|
2774
2808
|
key: "5851",
|
|
@@ -3154,6 +3188,23 @@ var networks = {
|
|
|
3154
3188
|
},
|
|
3155
3189
|
start: 62,
|
|
3156
3190
|
logo: "ipfs://QmZNkpVgPbuVbDcsi6arwH1om3456FGnwfDqYQJWUfHDEx"
|
|
3191
|
+
},
|
|
3192
|
+
"59140": {
|
|
3193
|
+
key: "59140",
|
|
3194
|
+
name: "Linea Goerli test network",
|
|
3195
|
+
shortName: "Linea Goerli",
|
|
3196
|
+
chainId: 59140,
|
|
3197
|
+
network: "testnet",
|
|
3198
|
+
testnet: true,
|
|
3199
|
+
multicall: "0xcA11bde05977b3631167028862bE2a173976CA11",
|
|
3200
|
+
rpc: [
|
|
3201
|
+
"https://rpc.goerli.linea.build"
|
|
3202
|
+
],
|
|
3203
|
+
explorer: {
|
|
3204
|
+
url: "https://explorer.goerli.linea.build"
|
|
3205
|
+
},
|
|
3206
|
+
start: 498623,
|
|
3207
|
+
logo: "ipfs://QmSwCnEeLoyMApQd1YfhmGvLt97bH5mLPoabjKqUSuQHHF"
|
|
3157
3208
|
},
|
|
3158
3209
|
"60001": {
|
|
3159
3210
|
key: "60001",
|