@snapshot-labs/snapshot.js 0.4.21 → 0.4.22
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 +11 -0
- package/dist/snapshot.cjs.js +30 -0
- package/dist/snapshot.esm.js +30 -0
- package/dist/snapshot.min.js +7 -7
- package/package.json +1 -1
- package/src/networks.json +14 -0
- package/src/sign/index.ts +11 -1
- package/src/sign/types.json +2 -1
- package/src/sign/types.ts +13 -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 } from './types';
|
|
3
|
+
import { Space, Proposal, CancelProposal, Vote, Follow, Unfollow, Subscribe, Unsubscribe, Profile, Alias, DeleteSpace } from './types';
|
|
4
4
|
export declare const domain: {
|
|
5
5
|
name: string;
|
|
6
6
|
version: string;
|
|
@@ -20,4 +20,5 @@ export default class Client {
|
|
|
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
22
|
alias(web3: Web3Provider | Wallet, address: string, message: Alias): Promise<unknown>;
|
|
23
|
+
deleteSpace(web3: Web3Provider | Wallet, address: string, message: DeleteSpace): Promise<unknown>;
|
|
23
24
|
}
|
package/dist/sign/types.d.ts
CHANGED
|
@@ -66,6 +66,11 @@ export interface Alias {
|
|
|
66
66
|
alias: string;
|
|
67
67
|
timestamp?: number;
|
|
68
68
|
}
|
|
69
|
+
export interface DeleteSpace {
|
|
70
|
+
from?: string;
|
|
71
|
+
space: string;
|
|
72
|
+
timestamp?: number;
|
|
73
|
+
}
|
|
69
74
|
export declare const spaceTypes: {
|
|
70
75
|
Space: {
|
|
71
76
|
name: string;
|
|
@@ -162,3 +167,9 @@ export declare const aliasTypes: {
|
|
|
162
167
|
type: string;
|
|
163
168
|
}[];
|
|
164
169
|
};
|
|
170
|
+
export declare const deleteSpaceType: {
|
|
171
|
+
DeleteSpace: {
|
|
172
|
+
name: string;
|
|
173
|
+
type: string;
|
|
174
|
+
}[];
|
|
175
|
+
};
|
package/dist/snapshot.cjs.js
CHANGED
|
@@ -244,6 +244,12 @@ var aliasTypes = {
|
|
|
244
244
|
{ name: 'from', type: 'address' },
|
|
245
245
|
{ name: 'alias', type: 'address' }
|
|
246
246
|
]
|
|
247
|
+
};
|
|
248
|
+
var deleteSpaceType = {
|
|
249
|
+
DeleteSpace: [
|
|
250
|
+
{ name: 'from', type: 'address' },
|
|
251
|
+
{ name: 'space', type: 'string' }
|
|
252
|
+
]
|
|
247
253
|
};
|
|
248
254
|
|
|
249
255
|
var hubs = [
|
|
@@ -434,6 +440,16 @@ var Client = /** @class */ (function () {
|
|
|
434
440
|
});
|
|
435
441
|
});
|
|
436
442
|
};
|
|
443
|
+
Client.prototype.deleteSpace = function (web3, address, message) {
|
|
444
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
445
|
+
return __generator(this, function (_a) {
|
|
446
|
+
switch (_a.label) {
|
|
447
|
+
case 0: return [4 /*yield*/, this.sign(web3, address, message, deleteSpaceType)];
|
|
448
|
+
case 1: return [2 /*return*/, _a.sent()];
|
|
449
|
+
}
|
|
450
|
+
});
|
|
451
|
+
});
|
|
452
|
+
};
|
|
437
453
|
return Client;
|
|
438
454
|
}());
|
|
439
455
|
|
|
@@ -2125,6 +2141,20 @@ var networks = {
|
|
|
2125
2141
|
explorer: "https://phiscan.com",
|
|
2126
2142
|
start: 360030,
|
|
2127
2143
|
logo: "ipfs://bafkreid6pm3mic7izp3a6zlfwhhe7etd276bjfsq2xash6a4s2vmcdf65a"
|
|
2144
|
+
},
|
|
2145
|
+
"188": {
|
|
2146
|
+
key: "188",
|
|
2147
|
+
name: "Bytom Sidechain",
|
|
2148
|
+
shortName: "BMC",
|
|
2149
|
+
chainId: 188,
|
|
2150
|
+
network: "mainnet",
|
|
2151
|
+
multicall: "0xDA09528B093246eC70139b657d3B7A3bd5F4C859",
|
|
2152
|
+
rpc: [
|
|
2153
|
+
"https://mainnet.bmcchain.com/"
|
|
2154
|
+
],
|
|
2155
|
+
explorer: "https://bmc.blockmeta.com/",
|
|
2156
|
+
start: 4720651,
|
|
2157
|
+
logo: "ipfs://bafkreiabhsxuq35pp4kmrbptdeypd6clhcy3ue7ydpppo6onoo4igcjqia"
|
|
2128
2158
|
},
|
|
2129
2159
|
"246": {
|
|
2130
2160
|
key: "246",
|
package/dist/snapshot.esm.js
CHANGED
|
@@ -235,6 +235,12 @@ var aliasTypes = {
|
|
|
235
235
|
{ name: 'from', type: 'address' },
|
|
236
236
|
{ name: 'alias', type: 'address' }
|
|
237
237
|
]
|
|
238
|
+
};
|
|
239
|
+
var deleteSpaceType = {
|
|
240
|
+
DeleteSpace: [
|
|
241
|
+
{ name: 'from', type: 'address' },
|
|
242
|
+
{ name: 'space', type: 'string' }
|
|
243
|
+
]
|
|
238
244
|
};
|
|
239
245
|
|
|
240
246
|
var hubs = [
|
|
@@ -425,6 +431,16 @@ var Client = /** @class */ (function () {
|
|
|
425
431
|
});
|
|
426
432
|
});
|
|
427
433
|
};
|
|
434
|
+
Client.prototype.deleteSpace = function (web3, address, message) {
|
|
435
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
436
|
+
return __generator(this, function (_a) {
|
|
437
|
+
switch (_a.label) {
|
|
438
|
+
case 0: return [4 /*yield*/, this.sign(web3, address, message, deleteSpaceType)];
|
|
439
|
+
case 1: return [2 /*return*/, _a.sent()];
|
|
440
|
+
}
|
|
441
|
+
});
|
|
442
|
+
});
|
|
443
|
+
};
|
|
428
444
|
return Client;
|
|
429
445
|
}());
|
|
430
446
|
|
|
@@ -2116,6 +2132,20 @@ var networks = {
|
|
|
2116
2132
|
explorer: "https://phiscan.com",
|
|
2117
2133
|
start: 360030,
|
|
2118
2134
|
logo: "ipfs://bafkreid6pm3mic7izp3a6zlfwhhe7etd276bjfsq2xash6a4s2vmcdf65a"
|
|
2135
|
+
},
|
|
2136
|
+
"188": {
|
|
2137
|
+
key: "188",
|
|
2138
|
+
name: "Bytom Sidechain",
|
|
2139
|
+
shortName: "BMC",
|
|
2140
|
+
chainId: 188,
|
|
2141
|
+
network: "mainnet",
|
|
2142
|
+
multicall: "0xDA09528B093246eC70139b657d3B7A3bd5F4C859",
|
|
2143
|
+
rpc: [
|
|
2144
|
+
"https://mainnet.bmcchain.com/"
|
|
2145
|
+
],
|
|
2146
|
+
explorer: "https://bmc.blockmeta.com/",
|
|
2147
|
+
start: 4720651,
|
|
2148
|
+
logo: "ipfs://bafkreiabhsxuq35pp4kmrbptdeypd6clhcy3ue7ydpppo6onoo4igcjqia"
|
|
2119
2149
|
},
|
|
2120
2150
|
"246": {
|
|
2121
2151
|
key: "246",
|