prividium 0.18.0 → 0.18.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/sdk/create-prividium-client.js +1 -1
- package/dist/sdk/selective-disclosure/account-properties.d.ts +1 -1
- package/dist/sdk/selective-disclosure/account-properties.js +5 -5
- package/dist/sdk/selective-disclosure/actions.d.ts +1 -1
- package/dist/sdk/selective-disclosure/disclosure-result.d.ts +1 -1
- package/dist/sdk/selective-disclosure/index.d.ts +7 -7
- package/dist/sdk/selective-disclosure/index.js +7 -7
- package/dist/sdk/selective-disclosure/state-commitment.js +1 -1
- package/dist/sdk/selective-disclosure/verifiy-proofs.js +1 -1
- package/dist/sdk/selective-disclosure/verify-disclosure.d.ts +1 -1
- package/dist/sdk/selective-disclosure/verify-disclosure.js +3 -3
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createClient, publicActions } from 'viem';
|
|
2
|
-
import { selectiveDisclosureActions } from './selective-disclosure/actions';
|
|
2
|
+
import { selectiveDisclosureActions } from './selective-disclosure/actions.js';
|
|
3
3
|
function prividiumActions(client) {
|
|
4
4
|
return {
|
|
5
5
|
call: (args) => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type Address, type Hex, type PublicClient } from 'viem';
|
|
2
|
-
import type { AccountDataDisclosureResult, AccountProperties } from './disclosure-result';
|
|
2
|
+
import type { AccountDataDisclosureResult, AccountProperties } from './disclosure-result.js';
|
|
3
3
|
export declare function encodeAccountProperties(params: AccountProperties): Hex;
|
|
4
4
|
/**
|
|
5
5
|
* Compute the internal bytecode hash: blake2s(code || padding || artifacts)
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { bytesToHex, hexToBigInt, hexToBytes, keccak256, pad } from 'viem';
|
|
2
|
-
import { encodeBatchInfo } from './batch-info';
|
|
3
|
-
import { computeStateCommitment } from './state-commitment';
|
|
4
|
-
import { blake2s256 } from './utils';
|
|
5
|
-
import { calculateStateMerkleRoot } from './verifiy-proofs';
|
|
6
|
-
import { DIAMOND_ABI } from './verify-disclosure';
|
|
2
|
+
import { encodeBatchInfo } from './batch-info.js';
|
|
3
|
+
import { computeStateCommitment } from './state-commitment.js';
|
|
4
|
+
import { blake2s256 } from './utils.js';
|
|
5
|
+
import { calculateStateMerkleRoot } from './verifiy-proofs.js';
|
|
6
|
+
import { DIAMOND_ABI } from './verify-disclosure.js';
|
|
7
7
|
const PUSH1 = 0x60;
|
|
8
8
|
const PUSH32 = 0x7f;
|
|
9
9
|
const JUMPDEST = 0x5b;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type Account, type Address, type BlockTag, type Chain, type Client, type Hex, type RpcSchema, type Transport } from 'viem';
|
|
2
|
-
import type { AccountDataDisclosureResult, EthCallDisclosureResult } from './disclosure-result';
|
|
2
|
+
import type { AccountDataDisclosureResult, EthCallDisclosureResult } from './disclosure-result.js';
|
|
3
3
|
export type DisclosureBlockNumber = number | bigint | Hex | BlockTag;
|
|
4
4
|
export type SelectiveDisclosureActions = {
|
|
5
5
|
tokenSupplyDisclosure: (tokenAddress: Address, blockNumber: DisclosureBlockNumber) => Promise<EthCallDisclosureResult>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export * from './account-properties';
|
|
2
|
-
export * from './actions';
|
|
3
|
-
export * from './batch-info';
|
|
4
|
-
export * from './disclosure-result';
|
|
5
|
-
export * from './state-commitment';
|
|
6
|
-
export * from './verifiy-proofs';
|
|
7
|
-
export * from './verify-disclosure';
|
|
1
|
+
export * from './account-properties.js';
|
|
2
|
+
export * from './actions.js';
|
|
3
|
+
export * from './batch-info.js';
|
|
4
|
+
export * from './disclosure-result.js';
|
|
5
|
+
export * from './state-commitment.js';
|
|
6
|
+
export * from './verifiy-proofs.js';
|
|
7
|
+
export * from './verify-disclosure.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export * from './account-properties';
|
|
2
|
-
export * from './actions';
|
|
3
|
-
export * from './batch-info';
|
|
4
|
-
export * from './disclosure-result';
|
|
5
|
-
export * from './state-commitment';
|
|
6
|
-
export * from './verifiy-proofs';
|
|
7
|
-
export * from './verify-disclosure';
|
|
1
|
+
export * from './account-properties.js';
|
|
2
|
+
export * from './actions.js';
|
|
3
|
+
export * from './batch-info.js';
|
|
4
|
+
export * from './disclosure-result.js';
|
|
5
|
+
export * from './state-commitment.js';
|
|
6
|
+
export * from './verifiy-proofs.js';
|
|
7
|
+
export * from './verify-disclosure.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { bytesToHex, hexToBytes } from 'viem';
|
|
2
|
-
import { blake2s256, concatBytes } from './utils';
|
|
2
|
+
import { blake2s256, concatBytes } from './utils.js';
|
|
3
3
|
export function computeStateCommitment(treeRoot, nextFreeSlot, blockNumber, last256BlockHashesBlake, lastBlockTimestamp) {
|
|
4
4
|
const nextFreeSlotBytes = new Uint8Array(8);
|
|
5
5
|
new DataView(nextFreeSlotBytes.buffer).setBigUint64(0, nextFreeSlot, false); // big-endian
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { bytesToHex, hexToBytes, pad } from 'viem';
|
|
2
|
-
import { blake2s256, concatBytes } from './utils';
|
|
2
|
+
import { blake2s256, concatBytes } from './utils.js';
|
|
3
3
|
function deriveFlatKey(address, storageKey) {
|
|
4
4
|
// blake2s(pad32(address) || storageKey)
|
|
5
5
|
const addressBytes = hexToBytes(pad(address));
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type Address, type Hex, type PublicClient } from 'viem';
|
|
2
|
-
import type { EthCallDisclosureResult } from './disclosure-result';
|
|
2
|
+
import type { EthCallDisclosureResult } from './disclosure-result.js';
|
|
3
3
|
export declare const DIAMOND_ABI: {
|
|
4
4
|
readonly name: "storedBatchHash";
|
|
5
5
|
readonly type: "function";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { keccak256, pad, parseAbiItem } from 'viem';
|
|
2
|
-
import { encodeBatchInfo } from './batch-info';
|
|
3
|
-
import { computeStateCommitment } from './state-commitment';
|
|
4
|
-
import { calculateStateMerkleRoot } from './verifiy-proofs';
|
|
2
|
+
import { encodeBatchInfo } from './batch-info.js';
|
|
3
|
+
import { computeStateCommitment } from './state-commitment.js';
|
|
4
|
+
import { calculateStateMerkleRoot } from './verifiy-proofs.js';
|
|
5
5
|
export const DIAMOND_ABI = [
|
|
6
6
|
parseAbiItem('function storedBatchHash(uint256 _batchNumber) external view returns (bytes32)')
|
|
7
7
|
];
|