@snapshot-labs/snapshot.js 0.14.8 → 0.14.9
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 +3 -3
- package/dist/snapshot.esm.js +3 -3
- package/dist/snapshot.min.js +1 -1
- package/dist/src/utils.d.ts +2 -1
- package/package.json +1 -1
- package/src/utils.spec.js +1 -2
- package/src/utils.ts +2 -3
package/dist/src/utils.d.ts
CHANGED
|
@@ -55,7 +55,8 @@ export declare function getJSON(uri: any, options?: any): Promise<any>;
|
|
|
55
55
|
export declare function ipfsGet(gateway: string, ipfsHash: string, protocolType?: string): Promise<any>;
|
|
56
56
|
export declare function sendTransaction(web3: any, contractAddress: string, abi: any[], action: string, params: any[], overrides?: {}): Promise<any>;
|
|
57
57
|
export declare function getScores(space: string, strategies: Strategy[], network: string, addresses: string[], snapshot?: number | string, scoreApiUrl?: string, options?: any): Promise<any>;
|
|
58
|
-
export declare function getVp(address: string, network: string, strategies: Strategy[], snapshot: number | 'latest', space: string, delegation:
|
|
58
|
+
export declare function getVp(address: string, network: string, strategies: Strategy[], snapshot: number | 'latest', space: string, delegation: false, // @deprecated - kept for backward compatibility for integrators using this function, no longer sent to API
|
|
59
|
+
options?: Options): Promise<any>;
|
|
59
60
|
export declare function validate(validation: string, author: string, space: string, network: string, snapshot: number | 'latest', params: any, options?: Options): Promise<any>;
|
|
60
61
|
interface validateSchemaOptions {
|
|
61
62
|
snapshotEnv?: string;
|
package/package.json
CHANGED
package/src/utils.spec.js
CHANGED
|
@@ -372,7 +372,6 @@ describe('utils', () => {
|
|
|
372
372
|
],
|
|
373
373
|
snapshot: 7929876,
|
|
374
374
|
space: 'test.eth',
|
|
375
|
-
delegation: false,
|
|
376
375
|
options: undefined
|
|
377
376
|
};
|
|
378
377
|
|
|
@@ -383,7 +382,7 @@ describe('utils', () => {
|
|
|
383
382
|
strategies ?? payload.strategies,
|
|
384
383
|
snapshot ?? payload.snapshot,
|
|
385
384
|
'test.eth' ?? payload.space,
|
|
386
|
-
false
|
|
385
|
+
false,
|
|
387
386
|
options ?? payload.options
|
|
388
387
|
);
|
|
389
388
|
}
|
package/src/utils.ts
CHANGED
|
@@ -484,7 +484,7 @@ export async function getVp(
|
|
|
484
484
|
strategies: Strategy[],
|
|
485
485
|
snapshot: number | 'latest',
|
|
486
486
|
space: string,
|
|
487
|
-
delegation:
|
|
487
|
+
delegation: false, // @deprecated - kept for backward compatibility for integrators using this function, no longer sent to API
|
|
488
488
|
options?: Options
|
|
489
489
|
) {
|
|
490
490
|
const { url, headers } = formatScoreAPIUrl(options?.url);
|
|
@@ -520,8 +520,7 @@ export async function getVp(
|
|
|
520
520
|
network,
|
|
521
521
|
strategies,
|
|
522
522
|
snapshot,
|
|
523
|
-
space
|
|
524
|
-
delegation
|
|
523
|
+
space
|
|
525
524
|
}
|
|
526
525
|
})
|
|
527
526
|
};
|