@snapshot-labs/snapshot.js 0.12.0 → 0.12.1
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/snapshot.cjs.js +4 -4
- package/dist/snapshot.esm.js +4 -4
- package/dist/src/verify/index.d.ts +1 -1
- package/package.json +1 -1
- package/src/constants.json +1 -1
- package/src/sign/index.ts +3 -3
- package/src/verify/index.ts +1 -1
package/dist/snapshot.cjs.js
CHANGED
|
@@ -260,7 +260,7 @@ const deleteSpaceType = {
|
|
|
260
260
|
]
|
|
261
261
|
};
|
|
262
262
|
|
|
263
|
-
var
|
|
263
|
+
var mainnet = {
|
|
264
264
|
hub: "https://hub.snapshot.org",
|
|
265
265
|
sequencer: "https://seq.snapshot.org"
|
|
266
266
|
};
|
|
@@ -273,7 +273,7 @@ var local = {
|
|
|
273
273
|
sequencer: "http://localhost:3001"
|
|
274
274
|
};
|
|
275
275
|
var constants = {
|
|
276
|
-
|
|
276
|
+
mainnet: mainnet,
|
|
277
277
|
testnet: testnet,
|
|
278
278
|
local: local
|
|
279
279
|
};
|
|
@@ -286,8 +286,8 @@ const domain = {
|
|
|
286
286
|
// chainId: 1
|
|
287
287
|
};
|
|
288
288
|
class Client {
|
|
289
|
-
constructor(address = constants.
|
|
290
|
-
address = address.replace(constants.
|
|
289
|
+
constructor(address = constants.mainnet.sequencer, options = {}) {
|
|
290
|
+
address = address.replace(constants.mainnet.hub, constants.mainnet.sequencer);
|
|
291
291
|
address = address.replace(constants.testnet.hub, constants.testnet.sequencer);
|
|
292
292
|
address = address.replace(constants.local.hub, constants.local.sequencer);
|
|
293
293
|
this.address = address;
|
package/dist/snapshot.esm.js
CHANGED
|
@@ -250,7 +250,7 @@ const deleteSpaceType = {
|
|
|
250
250
|
]
|
|
251
251
|
};
|
|
252
252
|
|
|
253
|
-
var
|
|
253
|
+
var mainnet = {
|
|
254
254
|
hub: "https://hub.snapshot.org",
|
|
255
255
|
sequencer: "https://seq.snapshot.org"
|
|
256
256
|
};
|
|
@@ -263,7 +263,7 @@ var local = {
|
|
|
263
263
|
sequencer: "http://localhost:3001"
|
|
264
264
|
};
|
|
265
265
|
var constants = {
|
|
266
|
-
|
|
266
|
+
mainnet: mainnet,
|
|
267
267
|
testnet: testnet,
|
|
268
268
|
local: local
|
|
269
269
|
};
|
|
@@ -276,8 +276,8 @@ const domain = {
|
|
|
276
276
|
// chainId: 1
|
|
277
277
|
};
|
|
278
278
|
class Client {
|
|
279
|
-
constructor(address = constants.
|
|
280
|
-
address = address.replace(constants.
|
|
279
|
+
constructor(address = constants.mainnet.sequencer, options = {}) {
|
|
280
|
+
address = address.replace(constants.mainnet.hub, constants.mainnet.sequencer);
|
|
281
281
|
address = address.replace(constants.testnet.hub, constants.testnet.sequencer);
|
|
282
282
|
address = address.replace(constants.local.hub, constants.local.sequencer);
|
|
283
283
|
this.address = address;
|
|
@@ -2,7 +2,7 @@ import type { StarkNetType } from 'starknet';
|
|
|
2
2
|
import type { TypedDataField } from '@ethersproject/abstract-signer';
|
|
3
3
|
import type { ProviderOptions } from '../utils/provider';
|
|
4
4
|
export type SignaturePayload = {
|
|
5
|
-
domain: Record<string, string>;
|
|
5
|
+
domain: Record<string, string | number>;
|
|
6
6
|
types: Record<string, StarkNetType[] | TypedDataField[]>;
|
|
7
7
|
primaryType?: string;
|
|
8
8
|
message: Record<string, any>;
|
package/package.json
CHANGED
package/src/constants.json
CHANGED
package/src/sign/index.ts
CHANGED
|
@@ -57,10 +57,10 @@ export default class Client {
|
|
|
57
57
|
readonly address: string;
|
|
58
58
|
readonly options: any;
|
|
59
59
|
|
|
60
|
-
constructor(address: string = constants.
|
|
60
|
+
constructor(address: string = constants.mainnet.sequencer, options = {}) {
|
|
61
61
|
address = address.replace(
|
|
62
|
-
constants.
|
|
63
|
-
constants.
|
|
62
|
+
constants.mainnet.hub,
|
|
63
|
+
constants.mainnet.sequencer
|
|
64
64
|
);
|
|
65
65
|
address = address.replace(
|
|
66
66
|
constants.testnet.hub,
|
package/src/verify/index.ts
CHANGED
|
@@ -6,7 +6,7 @@ import type { TypedDataField } from '@ethersproject/abstract-signer';
|
|
|
6
6
|
import type { ProviderOptions } from '../utils/provider';
|
|
7
7
|
|
|
8
8
|
export type SignaturePayload = {
|
|
9
|
-
domain: Record<string, string>;
|
|
9
|
+
domain: Record<string, string | number>;
|
|
10
10
|
types: Record<string, StarkNetType[] | TypedDataField[]>;
|
|
11
11
|
primaryType?: string;
|
|
12
12
|
message: Record<string, any>;
|