@permissionless-technologies/upp-sdk 0.2.1 → 0.3.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/chunk-3YZSIYJC.cjs +154 -0
- package/dist/chunk-3YZSIYJC.cjs.map +1 -0
- package/dist/{chunk-64RTC5ML.js → chunk-4EDTZQ44.js} +2 -2
- package/dist/{chunk-64RTC5ML.js.map → chunk-4EDTZQ44.js.map} +1 -1
- package/dist/{chunk-43U5RGYE.cjs → chunk-4EMXHMJ5.cjs} +2 -2
- package/dist/{chunk-43U5RGYE.cjs.map → chunk-4EMXHMJ5.cjs.map} +1 -1
- package/dist/{chunk-46GGZ3TC.cjs → chunk-4MOXKZSE.cjs} +17 -17
- package/dist/{chunk-46GGZ3TC.cjs.map → chunk-4MOXKZSE.cjs.map} +1 -1
- package/dist/{chunk-C7QQOJ7T.cjs → chunk-52PPS4AT.cjs} +4 -22
- package/dist/chunk-52PPS4AT.cjs.map +1 -0
- package/dist/{chunk-CZ23JMAQ.js → chunk-56LZ2RV6.js} +17 -17
- package/dist/{chunk-CZ23JMAQ.js.map → chunk-56LZ2RV6.js.map} +1 -1
- package/dist/{chunk-NUIQHTSA.js → chunk-7F75NGNB.js} +76 -3
- package/dist/chunk-7F75NGNB.js.map +1 -0
- package/dist/{chunk-SGZZL5AC.js → chunk-GS4UCMW4.js} +4 -20
- package/dist/chunk-GS4UCMW4.js.map +1 -0
- package/dist/{chunk-GXZ3MTCQ.cjs → chunk-IYOR5TCO.cjs} +77 -2
- package/dist/chunk-IYOR5TCO.cjs.map +1 -0
- package/dist/{chunk-GQV47S3N.cjs → chunk-PTDVGWHU.cjs} +2 -2
- package/dist/{chunk-GQV47S3N.cjs.map → chunk-PTDVGWHU.cjs.map} +1 -1
- package/dist/{chunk-NCW4AE7L.js → chunk-UAVWYXDN.js} +2 -2
- package/dist/chunk-UAVWYXDN.js.map +1 -0
- package/dist/chunk-XBNYAAMU.js +140 -0
- package/dist/chunk-XBNYAAMU.js.map +1 -0
- package/dist/core/index.cjs +68 -62
- package/dist/core/index.d.cts +3 -2
- package/dist/core/index.d.ts +3 -2
- package/dist/core/index.js +6 -4
- package/dist/{index-BGvapsJy.d.cts → index-B45-okum.d.cts} +19 -3
- package/dist/{index-ChGaGPzP.d.ts → index-BIcvNMPt.d.ts} +19 -3
- package/dist/{index-BBzvvrhG.d.ts → index-DwAJBoU7.d.ts} +122 -96
- package/dist/{index-C-jSNw6j.d.cts → index-o-Ds3YAq.d.cts} +122 -96
- package/dist/index.cjs +229 -176
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +4 -3
- package/dist/index.d.ts +4 -3
- package/dist/index.js +8 -7
- package/dist/index.js.map +1 -1
- package/dist/indexer/index.cjs +6 -6
- package/dist/indexer/index.d.cts +6 -5
- package/dist/indexer/index.d.ts +6 -5
- package/dist/indexer/index.js +1 -1
- package/dist/react/index.cjs +107 -102
- package/dist/react/index.cjs.map +1 -1
- package/dist/react/index.d.cts +2 -2
- package/dist/react/index.d.ts +2 -2
- package/dist/react/index.js +100 -95
- package/dist/react/index.js.map +1 -1
- package/dist/stark-BcTD1OaJ.d.cts +185 -0
- package/dist/stark-BcTD1OaJ.d.ts +185 -0
- package/dist/{transfer-4OF2JWXX.js → transfer-4GJJTWMH.js} +4 -4
- package/dist/{transfer-4OF2JWXX.js.map → transfer-4GJJTWMH.js.map} +1 -1
- package/dist/{transfer-DKZuJnRM.d.cts → transfer-BzyernBd.d.cts} +1 -3
- package/dist/{transfer-SA4NHNJ7.cjs → transfer-CLBDOA63.cjs} +10 -10
- package/dist/{transfer-SA4NHNJ7.cjs.map → transfer-CLBDOA63.cjs.map} +1 -1
- package/dist/{transfer-BlmbO-Rd.d.ts → transfer-sqS6mJko.d.ts} +1 -3
- package/dist/utils/index.cjs +54 -1
- package/dist/utils/index.d.cts +2 -0
- package/dist/utils/index.d.ts +2 -0
- package/dist/utils/index.js +2 -1
- package/package.json +2 -2
- package/src/deployments/11155111.json +13 -13
- package/src/deployments/31337.json +1 -1
- package/dist/chunk-C7QQOJ7T.cjs.map +0 -1
- package/dist/chunk-GXZ3MTCQ.cjs.map +0 -1
- package/dist/chunk-NCW4AE7L.js.map +0 -1
- package/dist/chunk-NUIQHTSA.js.map +0 -1
- package/dist/chunk-SGZZL5AC.js.map +0 -1
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
import { Address, Hex } from 'viem';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* STARK Utilities — Amount scaling, witness building, Fiat-Shamir
|
|
5
|
+
*
|
|
6
|
+
* These functions must produce identical outputs to the Rust Stwo prover
|
|
7
|
+
* (stwo-prover/src/) and the Solidity verifier.
|
|
8
|
+
*
|
|
9
|
+
* M31 field: p = 2^31 - 1 = 2,147,483,647
|
|
10
|
+
* Amount precision: 0.001 tokens (1e15 wei scale factor)
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
/** Matches Solidity STARK_AMOUNT_SCALE = 1e15 */
|
|
14
|
+
declare const STARK_AMOUNT_SCALE: bigint;
|
|
15
|
+
/** State tree depth (Merkle tree for commitments) */
|
|
16
|
+
declare const STARK_STATE_TREE_DEPTH = 32;
|
|
17
|
+
/** ASP tree depth */
|
|
18
|
+
declare const STARK_ASP_TREE_DEPTH = 20;
|
|
19
|
+
/** Check if a wei amount is STARK-scale aligned and fits in M31. */
|
|
20
|
+
declare function isStarkAligned(amount: bigint): boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Scale a wei amount down for the STARK circuit.
|
|
23
|
+
* Precision: 0.001 tokens (1e15 wei). Max: ~2.1M tokens.
|
|
24
|
+
*
|
|
25
|
+
* @returns The scaled amount as a number (fits in M31)
|
|
26
|
+
* @throws If not aligned to STARK_AMOUNT_SCALE or exceeds M31
|
|
27
|
+
*/
|
|
28
|
+
declare function scaleAmountForStark(weiAmount: bigint): number;
|
|
29
|
+
/** Truncate a bigint to fit in M31 (modular reduction). */
|
|
30
|
+
declare function truncateToM31(value: bigint): number;
|
|
31
|
+
/** Convert an Ethereum address to an M31 field element (truncated). */
|
|
32
|
+
declare function addressToM31(addr: Address): number;
|
|
33
|
+
/**
|
|
34
|
+
* Split a 254-bit spending secret into 8 M31 limbs (248 bits of entropy).
|
|
35
|
+
*
|
|
36
|
+
* Each limb holds 31 bits (reduced mod M31_P). The secret is split
|
|
37
|
+
* little-endian: limb[0] = lowest 31 bits, limb[7] = highest bits.
|
|
38
|
+
*
|
|
39
|
+
* This matches the Rust prover's expectation of `[M31; 8]` for owner_secret.
|
|
40
|
+
*/
|
|
41
|
+
declare function splitSecretToM31Limbs(secret: bigint): number[];
|
|
42
|
+
/**
|
|
43
|
+
* Pack an M31 digest (4 M31 elements) into a uint128 for Solidity.
|
|
44
|
+
* Each element occupies 32 bits (little-endian packing).
|
|
45
|
+
*/
|
|
46
|
+
declare function packM31Digest(digest: [number, number, number, number]): bigint;
|
|
47
|
+
/**
|
|
48
|
+
* Compute the Fiat-Shamir public inputs seed for a STARK withdrawal.
|
|
49
|
+
* Must produce the same hash as Solidity and Rust.
|
|
50
|
+
*/
|
|
51
|
+
declare function computeWithdrawPublicInputsSeed(params: {
|
|
52
|
+
nullifier: Hex;
|
|
53
|
+
stateRoot: bigint;
|
|
54
|
+
aspRoot: bigint;
|
|
55
|
+
aspId: bigint;
|
|
56
|
+
token: Address;
|
|
57
|
+
amount: bigint;
|
|
58
|
+
recipient: Address;
|
|
59
|
+
isRagequit: boolean;
|
|
60
|
+
}): Hex;
|
|
61
|
+
/**
|
|
62
|
+
* Compute the Fiat-Shamir public inputs seed for a STARK transfer.
|
|
63
|
+
* Must produce the same hash as Solidity and Rust.
|
|
64
|
+
*/
|
|
65
|
+
declare function computeTransferPublicInputsSeed(params: {
|
|
66
|
+
nullifier: Hex;
|
|
67
|
+
stateRoot: bigint;
|
|
68
|
+
aspRoot: bigint;
|
|
69
|
+
token: Address;
|
|
70
|
+
outputCommitment1: Hex;
|
|
71
|
+
outputCommitment2: Hex;
|
|
72
|
+
}): Hex;
|
|
73
|
+
/**
|
|
74
|
+
* Witness inputs for the STARK withdrawal prover.
|
|
75
|
+
* All numeric values are u32 (must fit in M31 field, i.e. < 2^31 - 1).
|
|
76
|
+
* Hex string fields are for Fiat-Shamir seed binding.
|
|
77
|
+
*/
|
|
78
|
+
interface StarkWithdrawWitness {
|
|
79
|
+
owner_secret: number[];
|
|
80
|
+
input_amount: number;
|
|
81
|
+
input_blinding: number;
|
|
82
|
+
input_origin: number;
|
|
83
|
+
token: number;
|
|
84
|
+
leaf_index: number;
|
|
85
|
+
state_path_elements: number[];
|
|
86
|
+
state_path_indices: number[];
|
|
87
|
+
asp_path_elements: number[];
|
|
88
|
+
asp_path_indices: number[];
|
|
89
|
+
withdraw_amount: number;
|
|
90
|
+
change_amount: number;
|
|
91
|
+
change_blinding: number;
|
|
92
|
+
recipient: number;
|
|
93
|
+
is_ragequit: number;
|
|
94
|
+
nullifier_hex: string;
|
|
95
|
+
state_root_hex: string;
|
|
96
|
+
asp_root_hex: string;
|
|
97
|
+
asp_id_hex: string;
|
|
98
|
+
token_address_hex: string;
|
|
99
|
+
amount_hex: string;
|
|
100
|
+
recipient_address_hex: string;
|
|
101
|
+
is_ragequit_bool: boolean;
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* Witness inputs for the STARK transfer prover (1-in-2-out).
|
|
105
|
+
* All numeric values are u32 (must fit in M31 field).
|
|
106
|
+
*/
|
|
107
|
+
interface StarkTransferWitness {
|
|
108
|
+
owner_secret: number[];
|
|
109
|
+
input_amount: number;
|
|
110
|
+
input_blinding: number;
|
|
111
|
+
input_origin: number;
|
|
112
|
+
token: number;
|
|
113
|
+
leaf_index: number;
|
|
114
|
+
state_path_elements: number[];
|
|
115
|
+
state_path_indices: number[];
|
|
116
|
+
asp_path_elements: number[];
|
|
117
|
+
asp_path_indices: number[];
|
|
118
|
+
output1_amount: number;
|
|
119
|
+
output1_owner_hash: [number, number, number, number];
|
|
120
|
+
output1_blinding: number;
|
|
121
|
+
output1_origin: number;
|
|
122
|
+
output2_amount: number;
|
|
123
|
+
output2_owner_hash: [number, number, number, number];
|
|
124
|
+
output2_blinding: number;
|
|
125
|
+
output2_origin: number;
|
|
126
|
+
is_ragequit: number;
|
|
127
|
+
nullifier_hex: string;
|
|
128
|
+
state_root_hex: string;
|
|
129
|
+
asp_root_hex: string;
|
|
130
|
+
token_address_hex: string;
|
|
131
|
+
output_commitment_1_hex: string;
|
|
132
|
+
output_commitment_2_hex: string;
|
|
133
|
+
}
|
|
134
|
+
/**
|
|
135
|
+
* Build a complete STARK withdrawal witness from note data.
|
|
136
|
+
*/
|
|
137
|
+
declare function buildStarkWithdrawWitness(params: {
|
|
138
|
+
ownerSecret: number[];
|
|
139
|
+
inputAmount: number;
|
|
140
|
+
inputBlinding: number;
|
|
141
|
+
inputOrigin: number;
|
|
142
|
+
token: number;
|
|
143
|
+
leafIndex: number;
|
|
144
|
+
withdrawAmount: number;
|
|
145
|
+
changeAmount: number;
|
|
146
|
+
changeBlinding: number;
|
|
147
|
+
recipient: number;
|
|
148
|
+
isRagequit: number;
|
|
149
|
+
nullifierHex: Hex;
|
|
150
|
+
stateRootBigInt: bigint;
|
|
151
|
+
aspRootBigInt: bigint;
|
|
152
|
+
aspIdBigInt: bigint;
|
|
153
|
+
tokenAddress: Address;
|
|
154
|
+
amountWei: bigint;
|
|
155
|
+
recipientAddress: Address;
|
|
156
|
+
isRagequitBool: boolean;
|
|
157
|
+
}): StarkWithdrawWitness;
|
|
158
|
+
/**
|
|
159
|
+
* Build a complete STARK transfer witness (1-in-2-out).
|
|
160
|
+
*/
|
|
161
|
+
declare function buildStarkTransferWitness(params: {
|
|
162
|
+
ownerSecret: number[];
|
|
163
|
+
inputAmount: number;
|
|
164
|
+
inputBlinding: number;
|
|
165
|
+
inputOrigin: number;
|
|
166
|
+
token: number;
|
|
167
|
+
leafIndex: number;
|
|
168
|
+
output1Amount: number;
|
|
169
|
+
output1OwnerHash: [number, number, number, number];
|
|
170
|
+
output1Blinding: number;
|
|
171
|
+
output1Origin: number;
|
|
172
|
+
output2Amount: number;
|
|
173
|
+
output2OwnerHash: [number, number, number, number];
|
|
174
|
+
output2Blinding: number;
|
|
175
|
+
output2Origin: number;
|
|
176
|
+
isRagequit: number;
|
|
177
|
+
nullifierHex: Hex;
|
|
178
|
+
stateRootBigInt: bigint;
|
|
179
|
+
aspRootBigInt: bigint;
|
|
180
|
+
tokenAddress: Address;
|
|
181
|
+
outputCommitment1Hex: Hex;
|
|
182
|
+
outputCommitment2Hex: Hex;
|
|
183
|
+
}): StarkTransferWitness;
|
|
184
|
+
|
|
185
|
+
export { STARK_AMOUNT_SCALE as S, STARK_ASP_TREE_DEPTH as a, STARK_STATE_TREE_DEPTH as b, type StarkTransferWitness as c, type StarkWithdrawWitness as d, addressToM31 as e, buildStarkTransferWitness as f, buildStarkWithdrawWitness as g, computeTransferPublicInputsSeed as h, computeWithdrawPublicInputsSeed as i, isStarkAligned as j, splitSecretToM31Limbs as k, packM31Digest as p, scaleAmountForStark as s, truncateToM31 as t };
|
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
import { Address, Hex } from 'viem';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* STARK Utilities — Amount scaling, witness building, Fiat-Shamir
|
|
5
|
+
*
|
|
6
|
+
* These functions must produce identical outputs to the Rust Stwo prover
|
|
7
|
+
* (stwo-prover/src/) and the Solidity verifier.
|
|
8
|
+
*
|
|
9
|
+
* M31 field: p = 2^31 - 1 = 2,147,483,647
|
|
10
|
+
* Amount precision: 0.001 tokens (1e15 wei scale factor)
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
/** Matches Solidity STARK_AMOUNT_SCALE = 1e15 */
|
|
14
|
+
declare const STARK_AMOUNT_SCALE: bigint;
|
|
15
|
+
/** State tree depth (Merkle tree for commitments) */
|
|
16
|
+
declare const STARK_STATE_TREE_DEPTH = 32;
|
|
17
|
+
/** ASP tree depth */
|
|
18
|
+
declare const STARK_ASP_TREE_DEPTH = 20;
|
|
19
|
+
/** Check if a wei amount is STARK-scale aligned and fits in M31. */
|
|
20
|
+
declare function isStarkAligned(amount: bigint): boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Scale a wei amount down for the STARK circuit.
|
|
23
|
+
* Precision: 0.001 tokens (1e15 wei). Max: ~2.1M tokens.
|
|
24
|
+
*
|
|
25
|
+
* @returns The scaled amount as a number (fits in M31)
|
|
26
|
+
* @throws If not aligned to STARK_AMOUNT_SCALE or exceeds M31
|
|
27
|
+
*/
|
|
28
|
+
declare function scaleAmountForStark(weiAmount: bigint): number;
|
|
29
|
+
/** Truncate a bigint to fit in M31 (modular reduction). */
|
|
30
|
+
declare function truncateToM31(value: bigint): number;
|
|
31
|
+
/** Convert an Ethereum address to an M31 field element (truncated). */
|
|
32
|
+
declare function addressToM31(addr: Address): number;
|
|
33
|
+
/**
|
|
34
|
+
* Split a 254-bit spending secret into 8 M31 limbs (248 bits of entropy).
|
|
35
|
+
*
|
|
36
|
+
* Each limb holds 31 bits (reduced mod M31_P). The secret is split
|
|
37
|
+
* little-endian: limb[0] = lowest 31 bits, limb[7] = highest bits.
|
|
38
|
+
*
|
|
39
|
+
* This matches the Rust prover's expectation of `[M31; 8]` for owner_secret.
|
|
40
|
+
*/
|
|
41
|
+
declare function splitSecretToM31Limbs(secret: bigint): number[];
|
|
42
|
+
/**
|
|
43
|
+
* Pack an M31 digest (4 M31 elements) into a uint128 for Solidity.
|
|
44
|
+
* Each element occupies 32 bits (little-endian packing).
|
|
45
|
+
*/
|
|
46
|
+
declare function packM31Digest(digest: [number, number, number, number]): bigint;
|
|
47
|
+
/**
|
|
48
|
+
* Compute the Fiat-Shamir public inputs seed for a STARK withdrawal.
|
|
49
|
+
* Must produce the same hash as Solidity and Rust.
|
|
50
|
+
*/
|
|
51
|
+
declare function computeWithdrawPublicInputsSeed(params: {
|
|
52
|
+
nullifier: Hex;
|
|
53
|
+
stateRoot: bigint;
|
|
54
|
+
aspRoot: bigint;
|
|
55
|
+
aspId: bigint;
|
|
56
|
+
token: Address;
|
|
57
|
+
amount: bigint;
|
|
58
|
+
recipient: Address;
|
|
59
|
+
isRagequit: boolean;
|
|
60
|
+
}): Hex;
|
|
61
|
+
/**
|
|
62
|
+
* Compute the Fiat-Shamir public inputs seed for a STARK transfer.
|
|
63
|
+
* Must produce the same hash as Solidity and Rust.
|
|
64
|
+
*/
|
|
65
|
+
declare function computeTransferPublicInputsSeed(params: {
|
|
66
|
+
nullifier: Hex;
|
|
67
|
+
stateRoot: bigint;
|
|
68
|
+
aspRoot: bigint;
|
|
69
|
+
token: Address;
|
|
70
|
+
outputCommitment1: Hex;
|
|
71
|
+
outputCommitment2: Hex;
|
|
72
|
+
}): Hex;
|
|
73
|
+
/**
|
|
74
|
+
* Witness inputs for the STARK withdrawal prover.
|
|
75
|
+
* All numeric values are u32 (must fit in M31 field, i.e. < 2^31 - 1).
|
|
76
|
+
* Hex string fields are for Fiat-Shamir seed binding.
|
|
77
|
+
*/
|
|
78
|
+
interface StarkWithdrawWitness {
|
|
79
|
+
owner_secret: number[];
|
|
80
|
+
input_amount: number;
|
|
81
|
+
input_blinding: number;
|
|
82
|
+
input_origin: number;
|
|
83
|
+
token: number;
|
|
84
|
+
leaf_index: number;
|
|
85
|
+
state_path_elements: number[];
|
|
86
|
+
state_path_indices: number[];
|
|
87
|
+
asp_path_elements: number[];
|
|
88
|
+
asp_path_indices: number[];
|
|
89
|
+
withdraw_amount: number;
|
|
90
|
+
change_amount: number;
|
|
91
|
+
change_blinding: number;
|
|
92
|
+
recipient: number;
|
|
93
|
+
is_ragequit: number;
|
|
94
|
+
nullifier_hex: string;
|
|
95
|
+
state_root_hex: string;
|
|
96
|
+
asp_root_hex: string;
|
|
97
|
+
asp_id_hex: string;
|
|
98
|
+
token_address_hex: string;
|
|
99
|
+
amount_hex: string;
|
|
100
|
+
recipient_address_hex: string;
|
|
101
|
+
is_ragequit_bool: boolean;
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* Witness inputs for the STARK transfer prover (1-in-2-out).
|
|
105
|
+
* All numeric values are u32 (must fit in M31 field).
|
|
106
|
+
*/
|
|
107
|
+
interface StarkTransferWitness {
|
|
108
|
+
owner_secret: number[];
|
|
109
|
+
input_amount: number;
|
|
110
|
+
input_blinding: number;
|
|
111
|
+
input_origin: number;
|
|
112
|
+
token: number;
|
|
113
|
+
leaf_index: number;
|
|
114
|
+
state_path_elements: number[];
|
|
115
|
+
state_path_indices: number[];
|
|
116
|
+
asp_path_elements: number[];
|
|
117
|
+
asp_path_indices: number[];
|
|
118
|
+
output1_amount: number;
|
|
119
|
+
output1_owner_hash: [number, number, number, number];
|
|
120
|
+
output1_blinding: number;
|
|
121
|
+
output1_origin: number;
|
|
122
|
+
output2_amount: number;
|
|
123
|
+
output2_owner_hash: [number, number, number, number];
|
|
124
|
+
output2_blinding: number;
|
|
125
|
+
output2_origin: number;
|
|
126
|
+
is_ragequit: number;
|
|
127
|
+
nullifier_hex: string;
|
|
128
|
+
state_root_hex: string;
|
|
129
|
+
asp_root_hex: string;
|
|
130
|
+
token_address_hex: string;
|
|
131
|
+
output_commitment_1_hex: string;
|
|
132
|
+
output_commitment_2_hex: string;
|
|
133
|
+
}
|
|
134
|
+
/**
|
|
135
|
+
* Build a complete STARK withdrawal witness from note data.
|
|
136
|
+
*/
|
|
137
|
+
declare function buildStarkWithdrawWitness(params: {
|
|
138
|
+
ownerSecret: number[];
|
|
139
|
+
inputAmount: number;
|
|
140
|
+
inputBlinding: number;
|
|
141
|
+
inputOrigin: number;
|
|
142
|
+
token: number;
|
|
143
|
+
leafIndex: number;
|
|
144
|
+
withdrawAmount: number;
|
|
145
|
+
changeAmount: number;
|
|
146
|
+
changeBlinding: number;
|
|
147
|
+
recipient: number;
|
|
148
|
+
isRagequit: number;
|
|
149
|
+
nullifierHex: Hex;
|
|
150
|
+
stateRootBigInt: bigint;
|
|
151
|
+
aspRootBigInt: bigint;
|
|
152
|
+
aspIdBigInt: bigint;
|
|
153
|
+
tokenAddress: Address;
|
|
154
|
+
amountWei: bigint;
|
|
155
|
+
recipientAddress: Address;
|
|
156
|
+
isRagequitBool: boolean;
|
|
157
|
+
}): StarkWithdrawWitness;
|
|
158
|
+
/**
|
|
159
|
+
* Build a complete STARK transfer witness (1-in-2-out).
|
|
160
|
+
*/
|
|
161
|
+
declare function buildStarkTransferWitness(params: {
|
|
162
|
+
ownerSecret: number[];
|
|
163
|
+
inputAmount: number;
|
|
164
|
+
inputBlinding: number;
|
|
165
|
+
inputOrigin: number;
|
|
166
|
+
token: number;
|
|
167
|
+
leafIndex: number;
|
|
168
|
+
output1Amount: number;
|
|
169
|
+
output1OwnerHash: [number, number, number, number];
|
|
170
|
+
output1Blinding: number;
|
|
171
|
+
output1Origin: number;
|
|
172
|
+
output2Amount: number;
|
|
173
|
+
output2OwnerHash: [number, number, number, number];
|
|
174
|
+
output2Blinding: number;
|
|
175
|
+
output2Origin: number;
|
|
176
|
+
isRagequit: number;
|
|
177
|
+
nullifierHex: Hex;
|
|
178
|
+
stateRootBigInt: bigint;
|
|
179
|
+
aspRootBigInt: bigint;
|
|
180
|
+
tokenAddress: Address;
|
|
181
|
+
outputCommitment1Hex: Hex;
|
|
182
|
+
outputCommitment2Hex: Hex;
|
|
183
|
+
}): StarkTransferWitness;
|
|
184
|
+
|
|
185
|
+
export { STARK_AMOUNT_SCALE as S, STARK_ASP_TREE_DEPTH as a, STARK_STATE_TREE_DEPTH as b, type StarkTransferWitness as c, type StarkWithdrawWitness as d, addressToM31 as e, buildStarkTransferWitness as f, buildStarkWithdrawWitness as g, computeTransferPublicInputsSeed as h, computeWithdrawPublicInputsSeed as i, isStarkAligned as j, splitSecretToM31Limbs as k, packM31Digest as p, scaleAmountForStark as s, truncateToM31 as t };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export { buildTransfer, buildUPPTransferCircuitInputs, computeNullifier, formatOutputForContract, getMerkleProofsForNotes, syncMerkleTree } from './chunk-
|
|
2
|
-
import './chunk-P37MRZ73.js';
|
|
1
|
+
export { buildTransfer, buildUPPTransferCircuitInputs, computeNullifier, formatOutputForContract, getMerkleProofsForNotes, syncMerkleTree } from './chunk-56LZ2RV6.js';
|
|
3
2
|
import './chunk-ZU6J7KMY.js';
|
|
3
|
+
import './chunk-P37MRZ73.js';
|
|
4
4
|
import './chunk-V23OSL25.js';
|
|
5
5
|
import './chunk-S4B7GYLN.js';
|
|
6
6
|
import './chunk-Z6ZWNWWR.js';
|
|
7
|
-
//# sourceMappingURL=transfer-
|
|
8
|
-
//# sourceMappingURL=transfer-
|
|
7
|
+
//# sourceMappingURL=transfer-4GJJTWMH.js.map
|
|
8
|
+
//# sourceMappingURL=transfer-4GJJTWMH.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"transfer-
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"transfer-4GJJTWMH.js"}
|
|
@@ -165,8 +165,6 @@ type Commitment = Hex;
|
|
|
165
165
|
*/
|
|
166
166
|
type Nullifier = Hex;
|
|
167
167
|
|
|
168
|
-
/** STARK amount scaling: 1e15 wei per STARK unit (matches contract) */
|
|
169
|
-
declare const STARK_AMOUNT_SCALE: bigint;
|
|
170
168
|
/**
|
|
171
169
|
* A private STARK note in the Universal Private Pool.
|
|
172
170
|
*
|
|
@@ -1267,4 +1265,4 @@ declare function formatOutputForContract(note: NoteCreationResult): {
|
|
|
1267
1265
|
encryptedNote: Hex;
|
|
1268
1266
|
};
|
|
1269
1267
|
|
|
1270
|
-
export {
|
|
1268
|
+
export { computeCancelKeyHash as $, type ASPProof as A, type StealthMetaAddress as B, type CircuitArtifacts as C, DEMO_ASP_ID as D, type EncryptedNote as E, type SwapFillEvent as F, type SwapFillParams as G, type SwapOrder as H, type SwapOrderEvent as I, type SwapOrderParams as J, type TransferContext as K, type TransferParams as L, type MergeParams as M, NOTE_VERSION as N, type TransferStage as O, type Proof as P, type UPPCircuitType as Q, RATE_PRECISION as R, STATE_TREE_DEPTH as S, type TransferBuildResult as T, type UPPCircuitInputs as U, type UPPTransferCircuitInputs as V, type UPPWithdrawCircuitInputs as W, type WithdrawParams as X, buildASPTree as Y, buildTransfer as Z, buildUPPTransferCircuitInputs as _, type ASPRoot as a, computeFillPercentage as a0, computeGiveAmount as a1, computeMultiOriginASPRoot as a2, computeNullifier as a3, computeRate as a4, computeSingleOriginASPRoot as a5, computeTakeAmount as a6, computeTotalBuyAmount as a7, createDemoASPRoot as a8, filterOrdersByASP as a9, UPPAccountProvider as aA, type UPPAccountContextType as aB, type ProofSystemType as aC, type IndexerConfig as aD, type SignTypedDataFn as aE, ASP_TREE_DEPTH as aF, filterOrdersByTokenPair as aa, formatOutputForContract as ab, formatProofForContract as ac, formatRate as ad, generateASPProof as ae, generateCancelSecret as af, generateMultiOriginASPProof as ag, generateProof as ah, generateSingleOriginASPProof as ai, generateStealthProof as aj, generateUPPProof as ak, getCancelSecret as al, getMerkleProofsForNotes as am, getOwnOrderIds as an, getStealthCircuitArtifacts as ao, getUPPCircuitArtifacts as ap, isFillerASPAccepted as aq, isOrderActive as ar, removeCancelSecret as as, storeCancelSecret as at, syncMerkleTree as au, verifyASPProof as av, verifyProof as aw, type NoteCreationResult as ax, type ShieldedNote as ay, useUPPAccount as az, ASP_TREE_DEPTH$1 as b, type CircuitType as c, type Commitment as d, DEMO_ASP_NAME as e, type MergeRecord as f, type MerkleProofWithNote as g, type Note as h, type NoteWithAmount as i, type Nullifier as j, type ProofResult as k, SWAP_EVENTS_ABI as l, SWAP_ORDER_CANCELLED_EVENT as m, SWAP_ORDER_CLAIMED_EVENT as n, SWAP_ORDER_FILLED_EVENT as o, SWAP_ORDER_PLACED_EVENT as p, type ShieldParams as q, type SpendableNote as r, type StarkNote as s, type StarkProof as t, type StarkStealthMetaAddress as u, type Stealth1x2CircuitInputs as v, type Stealth2x2CircuitInputs as w, type StealthAddress as x, type StealthCircuitInputs as y, type StealthCircuitType as z };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('./chunk-NDM5EJEV.cjs');
|
|
3
|
+
var chunk4MOXKZSE_cjs = require('./chunk-4MOXKZSE.cjs');
|
|
5
4
|
require('./chunk-EUP7MBAH.cjs');
|
|
5
|
+
require('./chunk-NDM5EJEV.cjs');
|
|
6
6
|
require('./chunk-JWNXBALH.cjs');
|
|
7
7
|
require('./chunk-SQKBT2SH.cjs');
|
|
8
8
|
require('./chunk-G7VZBCD6.cjs');
|
|
@@ -11,27 +11,27 @@ require('./chunk-G7VZBCD6.cjs');
|
|
|
11
11
|
|
|
12
12
|
Object.defineProperty(exports, "buildTransfer", {
|
|
13
13
|
enumerable: true,
|
|
14
|
-
get: function () { return
|
|
14
|
+
get: function () { return chunk4MOXKZSE_cjs.buildTransfer; }
|
|
15
15
|
});
|
|
16
16
|
Object.defineProperty(exports, "buildUPPTransferCircuitInputs", {
|
|
17
17
|
enumerable: true,
|
|
18
|
-
get: function () { return
|
|
18
|
+
get: function () { return chunk4MOXKZSE_cjs.buildUPPTransferCircuitInputs; }
|
|
19
19
|
});
|
|
20
20
|
Object.defineProperty(exports, "computeNullifier", {
|
|
21
21
|
enumerable: true,
|
|
22
|
-
get: function () { return
|
|
22
|
+
get: function () { return chunk4MOXKZSE_cjs.computeNullifier; }
|
|
23
23
|
});
|
|
24
24
|
Object.defineProperty(exports, "formatOutputForContract", {
|
|
25
25
|
enumerable: true,
|
|
26
|
-
get: function () { return
|
|
26
|
+
get: function () { return chunk4MOXKZSE_cjs.formatOutputForContract; }
|
|
27
27
|
});
|
|
28
28
|
Object.defineProperty(exports, "getMerkleProofsForNotes", {
|
|
29
29
|
enumerable: true,
|
|
30
|
-
get: function () { return
|
|
30
|
+
get: function () { return chunk4MOXKZSE_cjs.getMerkleProofsForNotes; }
|
|
31
31
|
});
|
|
32
32
|
Object.defineProperty(exports, "syncMerkleTree", {
|
|
33
33
|
enumerable: true,
|
|
34
|
-
get: function () { return
|
|
34
|
+
get: function () { return chunk4MOXKZSE_cjs.syncMerkleTree; }
|
|
35
35
|
});
|
|
36
|
-
//# sourceMappingURL=transfer-
|
|
37
|
-
//# sourceMappingURL=transfer-
|
|
36
|
+
//# sourceMappingURL=transfer-CLBDOA63.cjs.map
|
|
37
|
+
//# sourceMappingURL=transfer-CLBDOA63.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"transfer-
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"transfer-CLBDOA63.cjs"}
|
|
@@ -165,8 +165,6 @@ type Commitment = Hex;
|
|
|
165
165
|
*/
|
|
166
166
|
type Nullifier = Hex;
|
|
167
167
|
|
|
168
|
-
/** STARK amount scaling: 1e15 wei per STARK unit (matches contract) */
|
|
169
|
-
declare const STARK_AMOUNT_SCALE: bigint;
|
|
170
168
|
/**
|
|
171
169
|
* A private STARK note in the Universal Private Pool.
|
|
172
170
|
*
|
|
@@ -1267,4 +1265,4 @@ declare function formatOutputForContract(note: NoteCreationResult): {
|
|
|
1267
1265
|
encryptedNote: Hex;
|
|
1268
1266
|
};
|
|
1269
1267
|
|
|
1270
|
-
export {
|
|
1268
|
+
export { computeCancelKeyHash as $, type ASPProof as A, type StealthMetaAddress as B, type CircuitArtifacts as C, DEMO_ASP_ID as D, type EncryptedNote as E, type SwapFillEvent as F, type SwapFillParams as G, type SwapOrder as H, type SwapOrderEvent as I, type SwapOrderParams as J, type TransferContext as K, type TransferParams as L, type MergeParams as M, NOTE_VERSION as N, type TransferStage as O, type Proof as P, type UPPCircuitType as Q, RATE_PRECISION as R, STATE_TREE_DEPTH as S, type TransferBuildResult as T, type UPPCircuitInputs as U, type UPPTransferCircuitInputs as V, type UPPWithdrawCircuitInputs as W, type WithdrawParams as X, buildASPTree as Y, buildTransfer as Z, buildUPPTransferCircuitInputs as _, type ASPRoot as a, computeFillPercentage as a0, computeGiveAmount as a1, computeMultiOriginASPRoot as a2, computeNullifier as a3, computeRate as a4, computeSingleOriginASPRoot as a5, computeTakeAmount as a6, computeTotalBuyAmount as a7, createDemoASPRoot as a8, filterOrdersByASP as a9, UPPAccountProvider as aA, type UPPAccountContextType as aB, type ProofSystemType as aC, type IndexerConfig as aD, type SignTypedDataFn as aE, ASP_TREE_DEPTH as aF, filterOrdersByTokenPair as aa, formatOutputForContract as ab, formatProofForContract as ac, formatRate as ad, generateASPProof as ae, generateCancelSecret as af, generateMultiOriginASPProof as ag, generateProof as ah, generateSingleOriginASPProof as ai, generateStealthProof as aj, generateUPPProof as ak, getCancelSecret as al, getMerkleProofsForNotes as am, getOwnOrderIds as an, getStealthCircuitArtifacts as ao, getUPPCircuitArtifacts as ap, isFillerASPAccepted as aq, isOrderActive as ar, removeCancelSecret as as, storeCancelSecret as at, syncMerkleTree as au, verifyASPProof as av, verifyProof as aw, type NoteCreationResult as ax, type ShieldedNote as ay, useUPPAccount as az, ASP_TREE_DEPTH$1 as b, type CircuitType as c, type Commitment as d, DEMO_ASP_NAME as e, type MergeRecord as f, type MerkleProofWithNote as g, type Note as h, type NoteWithAmount as i, type Nullifier as j, type ProofResult as k, SWAP_EVENTS_ABI as l, SWAP_ORDER_CANCELLED_EVENT as m, SWAP_ORDER_CLAIMED_EVENT as n, SWAP_ORDER_FILLED_EVENT as o, SWAP_ORDER_PLACED_EVENT as p, type ShieldParams as q, type SpendableNote as r, type StarkNote as s, type StarkProof as t, type StarkStealthMetaAddress as u, type Stealth1x2CircuitInputs as v, type Stealth2x2CircuitInputs as w, type StealthAddress as x, type StealthCircuitInputs as y, type StealthCircuitType as z };
|
package/dist/utils/index.cjs
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
require('../chunk-
|
|
3
|
+
require('../chunk-PTDVGWHU.cjs');
|
|
4
4
|
var chunkTSF6HEVS_cjs = require('../chunk-TSF6HEVS.cjs');
|
|
5
|
+
var chunk3YZSIYJC_cjs = require('../chunk-3YZSIYJC.cjs');
|
|
5
6
|
var chunkEUP7MBAH_cjs = require('../chunk-EUP7MBAH.cjs');
|
|
6
7
|
var chunkBH24DZ5S_cjs = require('../chunk-BH24DZ5S.cjs');
|
|
7
8
|
var chunk3HQ7A6ZM_cjs = require('../chunk-3HQ7A6ZM.cjs');
|
|
@@ -58,6 +59,58 @@ Object.defineProperty(exports, "tupleToPoint", {
|
|
|
58
59
|
enumerable: true,
|
|
59
60
|
get: function () { return chunkTSF6HEVS_cjs.tupleToPoint; }
|
|
60
61
|
});
|
|
62
|
+
Object.defineProperty(exports, "STARK_AMOUNT_SCALE", {
|
|
63
|
+
enumerable: true,
|
|
64
|
+
get: function () { return chunk3YZSIYJC_cjs.STARK_AMOUNT_SCALE; }
|
|
65
|
+
});
|
|
66
|
+
Object.defineProperty(exports, "STARK_ASP_TREE_DEPTH", {
|
|
67
|
+
enumerable: true,
|
|
68
|
+
get: function () { return chunk3YZSIYJC_cjs.STARK_ASP_TREE_DEPTH; }
|
|
69
|
+
});
|
|
70
|
+
Object.defineProperty(exports, "STARK_STATE_TREE_DEPTH", {
|
|
71
|
+
enumerable: true,
|
|
72
|
+
get: function () { return chunk3YZSIYJC_cjs.STARK_STATE_TREE_DEPTH; }
|
|
73
|
+
});
|
|
74
|
+
Object.defineProperty(exports, "addressToM31", {
|
|
75
|
+
enumerable: true,
|
|
76
|
+
get: function () { return chunk3YZSIYJC_cjs.addressToM31; }
|
|
77
|
+
});
|
|
78
|
+
Object.defineProperty(exports, "buildStarkTransferWitness", {
|
|
79
|
+
enumerable: true,
|
|
80
|
+
get: function () { return chunk3YZSIYJC_cjs.buildStarkTransferWitness; }
|
|
81
|
+
});
|
|
82
|
+
Object.defineProperty(exports, "buildStarkWithdrawWitness", {
|
|
83
|
+
enumerable: true,
|
|
84
|
+
get: function () { return chunk3YZSIYJC_cjs.buildStarkWithdrawWitness; }
|
|
85
|
+
});
|
|
86
|
+
Object.defineProperty(exports, "computeTransferPublicInputsSeed", {
|
|
87
|
+
enumerable: true,
|
|
88
|
+
get: function () { return chunk3YZSIYJC_cjs.computeTransferPublicInputsSeed; }
|
|
89
|
+
});
|
|
90
|
+
Object.defineProperty(exports, "computeWithdrawPublicInputsSeed", {
|
|
91
|
+
enumerable: true,
|
|
92
|
+
get: function () { return chunk3YZSIYJC_cjs.computeWithdrawPublicInputsSeed; }
|
|
93
|
+
});
|
|
94
|
+
Object.defineProperty(exports, "isStarkAligned", {
|
|
95
|
+
enumerable: true,
|
|
96
|
+
get: function () { return chunk3YZSIYJC_cjs.isStarkAligned; }
|
|
97
|
+
});
|
|
98
|
+
Object.defineProperty(exports, "packM31Digest", {
|
|
99
|
+
enumerable: true,
|
|
100
|
+
get: function () { return chunk3YZSIYJC_cjs.packM31Digest; }
|
|
101
|
+
});
|
|
102
|
+
Object.defineProperty(exports, "scaleAmountForStark", {
|
|
103
|
+
enumerable: true,
|
|
104
|
+
get: function () { return chunk3YZSIYJC_cjs.scaleAmountForStark; }
|
|
105
|
+
});
|
|
106
|
+
Object.defineProperty(exports, "splitSecretToM31Limbs", {
|
|
107
|
+
enumerable: true,
|
|
108
|
+
get: function () { return chunk3YZSIYJC_cjs.splitSecretToM31Limbs; }
|
|
109
|
+
});
|
|
110
|
+
Object.defineProperty(exports, "truncateToM31", {
|
|
111
|
+
enumerable: true,
|
|
112
|
+
get: function () { return chunk3YZSIYJC_cjs.truncateToM31; }
|
|
113
|
+
});
|
|
61
114
|
Object.defineProperty(exports, "MAX_TREE_DEPTH", {
|
|
62
115
|
enumerable: true,
|
|
63
116
|
get: function () { return chunkEUP7MBAH_cjs.MAX_TREE_DEPTH; }
|
package/dist/utils/index.d.cts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
export { M as MAX_TREE_DEPTH, a as MerkleProof, b as MerkleTree, P as Point, c as addPoints, d as buildMerkleTree, e as computeSharedSecret, f as deriveDecryptionViewingKey, g as deriveEncryptionViewingKey, h as getBasePoint, i as getMerkleProof, j as getSubOrder, k as isOnCurve, m as mulPointScalar, p as packPoint, l as pointToTuple, n as privateToPublic, t as tupleToPoint, v as verifyMerkleProof } from '../merkle-mteVOlDf.cjs';
|
|
2
|
+
export { S as STARK_AMOUNT_SCALE, a as STARK_ASP_TREE_DEPTH, b as STARK_STATE_TREE_DEPTH, c as StarkTransferWitness, d as StarkWithdrawWitness, e as addressToM31, f as buildStarkTransferWitness, g as buildStarkWithdrawWitness, h as computeTransferPublicInputsSeed, i as computeWithdrawPublicInputsSeed, j as isStarkAligned, p as packM31Digest, s as scaleAmountForStark, k as splitSecretToM31Limbs, t as truncateToM31 } from '../stark-BcTD1OaJ.cjs';
|
|
2
3
|
export { D as DIGEST_SIZE, a as M31Digest, M as M31Secret, b as M31_P, S as SECRET_LIMBS, c as computeStarkCommitment, d as computeStarkNullifier, e as computeStarkOwnerHash, k as keccakHashTwo, f as keccakM31, s as splitToM31Limbs } from '../keccak-m31-B_AqBbRF.cjs';
|
|
4
|
+
import 'viem';
|
|
3
5
|
|
|
4
6
|
/**
|
|
5
7
|
* Poseidon Hash Utilities
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
export { M as MAX_TREE_DEPTH, a as MerkleProof, b as MerkleTree, P as Point, c as addPoints, d as buildMerkleTree, e as computeSharedSecret, f as deriveDecryptionViewingKey, g as deriveEncryptionViewingKey, h as getBasePoint, i as getMerkleProof, j as getSubOrder, k as isOnCurve, m as mulPointScalar, p as packPoint, l as pointToTuple, n as privateToPublic, t as tupleToPoint, v as verifyMerkleProof } from '../merkle-mteVOlDf.js';
|
|
2
|
+
export { S as STARK_AMOUNT_SCALE, a as STARK_ASP_TREE_DEPTH, b as STARK_STATE_TREE_DEPTH, c as StarkTransferWitness, d as StarkWithdrawWitness, e as addressToM31, f as buildStarkTransferWitness, g as buildStarkWithdrawWitness, h as computeTransferPublicInputsSeed, i as computeWithdrawPublicInputsSeed, j as isStarkAligned, p as packM31Digest, s as scaleAmountForStark, k as splitSecretToM31Limbs, t as truncateToM31 } from '../stark-BcTD1OaJ.js';
|
|
2
3
|
export { D as DIGEST_SIZE, a as M31Digest, M as M31Secret, b as M31_P, S as SECRET_LIMBS, c as computeStarkCommitment, d as computeStarkNullifier, e as computeStarkOwnerHash, k as keccakHashTwo, f as keccakM31, s as splitToM31Limbs } from '../keccak-m31-B_AqBbRF.js';
|
|
4
|
+
import 'viem';
|
|
3
5
|
|
|
4
6
|
/**
|
|
5
7
|
* Poseidon Hash Utilities
|
package/dist/utils/index.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import '../chunk-
|
|
1
|
+
import '../chunk-UAVWYXDN.js';
|
|
2
2
|
export { addPoints, computeSharedSecret, deriveDecryptionViewingKey, deriveEncryptionViewingKey, getBasePoint, getSubOrder, isOnCurve, mulPointScalar, packPoint, pointToTuple, privateToPublic, tupleToPoint } from '../chunk-YOWDERVC.js';
|
|
3
|
+
export { STARK_AMOUNT_SCALE, STARK_ASP_TREE_DEPTH, STARK_STATE_TREE_DEPTH, addressToM31, buildStarkTransferWitness, buildStarkWithdrawWitness, computeTransferPublicInputsSeed, computeWithdrawPublicInputsSeed, isStarkAligned, packM31Digest, scaleAmountForStark, splitSecretToM31Limbs, truncateToM31 } from '../chunk-XBNYAAMU.js';
|
|
3
4
|
export { MAX_TREE_DEPTH, MerkleTree, buildMerkleTree, getMerkleProof, verifyMerkleProof } from '../chunk-ZU6J7KMY.js';
|
|
4
5
|
export { DIGEST_SIZE, M31_P, SECRET_LIMBS, computeStarkCommitment, computeStarkNullifier, computeStarkOwnerHash, keccakHashTwo, keccakM31, splitToM31Limbs } from '../chunk-5V5HSN6Y.js';
|
|
5
6
|
export { bigintToBytes, bytesToBigint, bytesToHex, hexToBytes, randomBytes, randomFieldElement } from '../chunk-W77GRBO4.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@permissionless-technologies/upp-sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"description": "Universal Private Pool SDK - Privacy-preserving token operations for any ERC20",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
"circuits:setup": "node scripts/setup-circuits.js",
|
|
61
61
|
"circuits:verifiers": "node scripts/generate-verifiers.js",
|
|
62
62
|
"deploy:local": "forge script src/contracts/script/DeployUPP.s.sol:DeployUPPLocal --rpc-url http://localhost:8545 --broadcast --private-key 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 && node scripts/extract-deployment.js 31337",
|
|
63
|
-
"deploy:sepolia": "source .env && forge script src/contracts/script/DeployUPP.s.sol:DeployUPPSepolia --rpc-url ${RPC_ENDPOINT_TESTNET} --broadcast --private-key ${PRIVATE_KEY_TESTNET} && node scripts/extract-deployment.js 11155111",
|
|
63
|
+
"deploy:sepolia": "source .env && ASP_REGISTRY=${ASP_REGISTRY:-0xfd11c56a23314aa88dfbcc36254f33e5e8b010df} forge script src/contracts/script/DeployUPP.s.sol:DeployUPPSepolia --rpc-url ${RPC_ENDPOINT_TESTNET} --broadcast --private-key ${PRIVATE_KEY_TESTNET} && node scripts/extract-deployment.js 11155111",
|
|
64
64
|
"extract:deployment": "node scripts/extract-deployment.js",
|
|
65
65
|
"generate:abis": "node scripts/generate-abis.js"
|
|
66
66
|
},
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
{
|
|
2
|
-
"UniversalPrivatePool": "
|
|
3
|
-
"ASPRegistryHub": "
|
|
4
|
-
"TestToken": "
|
|
5
|
-
"TestToken2": "
|
|
2
|
+
"UniversalPrivatePool": "0x95c800a58ff37c85a15f435cf7bca2af288cb5c7",
|
|
3
|
+
"ASPRegistryHub": "0xfd11c56a23314aa88dfbcc36254f33e5e8b010df",
|
|
4
|
+
"TestToken": "0xf68645ce430256917ca434a4063c81db59dda611",
|
|
5
|
+
"TestToken2": "0xe159f88d97ba9663b0c586fc720ec637783db1d4",
|
|
6
6
|
"verifiers": {
|
|
7
|
-
"TransferVerifier": "
|
|
8
|
-
"MergeVerifier": "
|
|
9
|
-
"WithdrawVerifier": "
|
|
10
|
-
"JoinSplitVerifier": "
|
|
11
|
-
"MergeTransfer2x2Verifier": "
|
|
12
|
-
"MergeTransfer4x2Verifier": "
|
|
7
|
+
"TransferVerifier": "0x465261fd85c80e8278a30f04ad4f4558710d6cd3",
|
|
8
|
+
"MergeVerifier": "0x219e26676e6a72a00ede08e4ebf7d6aa27005676",
|
|
9
|
+
"WithdrawVerifier": "0x7405f0e1e44d5355d4913543125961790e8b52c0",
|
|
10
|
+
"JoinSplitVerifier": "0x18e3daed50ca37a1acdea4a26c71ae39ff9b0fb1",
|
|
11
|
+
"MergeTransfer2x2Verifier": "0x365f5c0ac64f07bc779cdbbcf695ad5024971e06",
|
|
12
|
+
"MergeTransfer4x2Verifier": "0xbab9f475bcf9377675d01a640b1b70d5a27a8af4"
|
|
13
13
|
},
|
|
14
14
|
"starkVerifiers": {
|
|
15
|
-
"CircleStarkVerifier": "
|
|
15
|
+
"CircleStarkVerifier": "0x4a911db5b613b399a2622da296c5163c059714ec"
|
|
16
16
|
},
|
|
17
|
-
"deployBlock":
|
|
18
|
-
"deployTimestamp":
|
|
17
|
+
"deployBlock": 10534869,
|
|
18
|
+
"deployTimestamp": 1774642370446
|
|
19
19
|
}
|