@arcanetech/privacy-sdk-stellar 0.3.0 → 0.4.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/README.md +6 -6
- package/dist/index.d.ts +306 -159
- package/dist/index.js +2295 -1804
- package/dist/index.js.map +1 -1
- package/dist/node.d.ts +49 -118
- package/dist/node.js +1260 -1568
- package/dist/node.js.map +1 -1
- package/dist/state/index.d.ts +7 -122
- package/dist/state/index.js +96 -490
- package/dist/state/index.js.map +1 -1
- package/dist/testing/index.d.ts +14 -32
- package/dist/transact/index.d.ts +362 -61
- package/dist/transact/index.js +2371 -940
- package/dist/transact/index.js.map +1 -1
- package/generated/contract/README.md +4 -4
- package/generated/contract/dist/index.d.ts +231 -256
- package/generated/contract/dist/index.js +71 -57
- package/generated/contract/package.json +1 -1
- package/generated/contract/src/index.ts +211 -242
- package/generated/registry/README.md +4 -4
- package/generated/registry/dist/index.d.ts +56 -123
- package/generated/registry/dist/index.js +39 -37
- package/generated/registry/package.json +1 -1
- package/generated/registry/src/index.ts +56 -132
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -3,10 +3,8 @@ import { OperationKind, DepositIntent, TransferIntent, WithdrawIntent, createRej
|
|
|
3
3
|
export { isPreparedOperation } from '@arcanetech/privacy-sdk-core';
|
|
4
4
|
import * as _arcanetech_privacy_sdk_core_state from '@arcanetech/privacy-sdk-core/state';
|
|
5
5
|
import { StateBridgeAdapter, StateBridgeDefinition } from '@arcanetech/privacy-sdk-core/state';
|
|
6
|
-
import {
|
|
7
|
-
export {
|
|
8
|
-
import { DepositObject, CoinData, AuditPublicKey, PrivacyPoolSDK, StateFile, TransactionAuditParams, InspectKytPassageApproved } from '@auditable/privacy-pool-zk-sdk';
|
|
9
|
-
export { DEFAULT_STEALTH_SIGN_NONCE as DEFAULT_PRIVATE_ADDRESS_SIGN_NONCE } from '@auditable/privacy-pool-zk-sdk';
|
|
6
|
+
import { DepositObject, CoinData, ZkCircuitLayoutFields, BundledZkCircuit, AuditPublicKey, SpendScalarDomain, PrivacyPoolSDK, StateFile, TransactionAuditParams, InspectKytPassageApproved } from '@arcanetech/stellar-privacy-pool-zk-sdk';
|
|
7
|
+
export { BundledZkCircuit, DEFAULT_STEALTH_SIGN_NONCE as DEFAULT_PRIVATE_ADDRESS_SIGN_NONCE, OWNER_BOUND_NOTE_SCHEMA_VERSION, SpendScalarDomain, spendScalarHexFromStellarSignature } from '@arcanetech/stellar-privacy-pool-zk-sdk';
|
|
10
8
|
import { Buffer as Buffer$1 } from 'buffer';
|
|
11
9
|
|
|
12
10
|
type StellarPrivateRecordStatus = 'pending' | 'finalized' | 'spent';
|
|
@@ -81,35 +79,6 @@ interface StellarLeafEphemeral {
|
|
|
81
79
|
yHex: string;
|
|
82
80
|
cachedAt?: string;
|
|
83
81
|
}
|
|
84
|
-
interface StellarPendingClaim {
|
|
85
|
-
id: string;
|
|
86
|
-
owner: StellarAddress;
|
|
87
|
-
asset: StellarAssetId;
|
|
88
|
-
amount: bigint;
|
|
89
|
-
createdAt: string;
|
|
90
|
-
poolTxId?: string;
|
|
91
|
-
commitmentHex?: string;
|
|
92
|
-
nullifierHex?: string;
|
|
93
|
-
futureNullifierHashHex?: string;
|
|
94
|
-
assetHiHex?: string;
|
|
95
|
-
assetLoHex?: string;
|
|
96
|
-
nullifierFieldHex?: string;
|
|
97
|
-
secretHex?: string;
|
|
98
|
-
tempPublicKeyXHex?: string;
|
|
99
|
-
tempPublicKeyYHex?: string;
|
|
100
|
-
encryptedRecoveryBase64?: string;
|
|
101
|
-
createdAtLedger?: number;
|
|
102
|
-
}
|
|
103
|
-
interface StellarPendingClaimsPagination {
|
|
104
|
-
total: number;
|
|
105
|
-
page: number;
|
|
106
|
-
pageSize: number;
|
|
107
|
-
hasMore: boolean;
|
|
108
|
-
}
|
|
109
|
-
interface StellarPendingClaimsState {
|
|
110
|
-
items: StellarPendingClaim[];
|
|
111
|
-
pagination?: StellarPendingClaimsPagination;
|
|
112
|
-
}
|
|
113
82
|
interface StellarIncomingDelivery {
|
|
114
83
|
id: number;
|
|
115
84
|
privateAddress: string;
|
|
@@ -164,10 +133,6 @@ interface StellarAvailablePrivateRecordsFilter {
|
|
|
164
133
|
privateAddress?: string;
|
|
165
134
|
asset?: StellarAssetId;
|
|
166
135
|
}
|
|
167
|
-
interface StellarPendingClaimsFilter {
|
|
168
|
-
owner?: StellarAddress;
|
|
169
|
-
asset?: StellarAssetId;
|
|
170
|
-
}
|
|
171
136
|
interface StellarIncomingDeliveriesFilter {
|
|
172
137
|
privateAddress: string;
|
|
173
138
|
asset?: StellarAssetId;
|
|
@@ -181,11 +146,13 @@ type AlignedDepositSlot = {
|
|
|
181
146
|
depositScalarHex: string;
|
|
182
147
|
precommitementHex: string;
|
|
183
148
|
};
|
|
184
|
-
type KytApplicationIdHints = [
|
|
149
|
+
type KytApplicationIdHints = string[];
|
|
185
150
|
type ProofResult = {
|
|
186
151
|
proof_hex: string;
|
|
187
152
|
public_hex: string;
|
|
188
153
|
applicationIdsPlaintext: KytApplicationIdHints;
|
|
154
|
+
ciphertext_hex?: string;
|
|
155
|
+
output_note_ephemeral_scalars?: string[];
|
|
189
156
|
};
|
|
190
157
|
type ProofWithChange = ProofResult & {
|
|
191
158
|
changeCoin?: {
|
|
@@ -196,14 +163,7 @@ type ProofWithChange = ProofResult & {
|
|
|
196
163
|
};
|
|
197
164
|
};
|
|
198
165
|
|
|
199
|
-
type
|
|
200
|
-
kind: 'pendingClaim';
|
|
201
|
-
claimId: string;
|
|
202
|
-
} | {
|
|
203
|
-
kind: 'pendingClaim';
|
|
204
|
-
claim: StellarPendingClaim;
|
|
205
|
-
};
|
|
206
|
-
type StellarTransferFromAddress = StellarAddress | StellarPendingClaimSource;
|
|
166
|
+
type StellarTransferFromAddress = StellarAddress;
|
|
207
167
|
|
|
208
168
|
interface PoolMerkleStatePort {
|
|
209
169
|
get(poolContract: string): Promise<StellarPoolMerkleState | undefined>;
|
|
@@ -225,39 +185,68 @@ type StellarSignTransaction = (input: {
|
|
|
225
185
|
signedTxXdr: string;
|
|
226
186
|
}>;
|
|
227
187
|
|
|
188
|
+
type StellarBundledZkCircuitDefinition = ZkCircuitLayoutFields & {
|
|
189
|
+
circuit: BundledZkCircuit;
|
|
190
|
+
};
|
|
191
|
+
type StellarCustomZkCircuitDefinition = ZkCircuitLayoutFields & {
|
|
192
|
+
zkeyUrl: string;
|
|
193
|
+
circuitGraphUrl: string;
|
|
194
|
+
r1csUrl: string;
|
|
195
|
+
provingKeyUrl: string;
|
|
196
|
+
};
|
|
197
|
+
type StellarZkCircuitDefinition = StellarBundledZkCircuitDefinition | StellarCustomZkCircuitDefinition;
|
|
198
|
+
declare const DEFAULT_STELLAR_ZK_CIRCUITS: Record<string, StellarBundledZkCircuitDefinition>;
|
|
199
|
+
declare function optionalZkArtifactBaseUrl(value: string | undefined): {
|
|
200
|
+
zkArtifactBaseUrl?: string;
|
|
201
|
+
};
|
|
202
|
+
|
|
228
203
|
interface TransferTemporaryRecipientKey {
|
|
229
204
|
temporaryScalarHex: string;
|
|
230
205
|
temporaryPrivateAddressStpl1: string;
|
|
231
206
|
}
|
|
232
|
-
interface
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
207
|
+
interface TransferEscrowSend {
|
|
208
|
+
nonceDecimal: string;
|
|
209
|
+
recipientHi: string;
|
|
210
|
+
recipientLo: string;
|
|
211
|
+
recipientStellarAddress: string;
|
|
212
|
+
}
|
|
213
|
+
interface TransferEscrowClaimantLimbs {
|
|
214
|
+
recipientHi: string;
|
|
215
|
+
recipientLo: string;
|
|
216
|
+
nonceDecimal?: string;
|
|
237
217
|
}
|
|
238
218
|
interface TransferRecipientExecutionContext {
|
|
239
219
|
recipientPrivateAddressStpl1: string;
|
|
240
220
|
recipientStellarAddress?: string;
|
|
221
|
+
escrowSend?: TransferEscrowSend;
|
|
241
222
|
temporaryRecipientKey?: TransferTemporaryRecipientKey;
|
|
242
223
|
}
|
|
243
|
-
interface BuildTransferOnboardingAtExecuteInput {
|
|
244
|
-
ownerStellarAddress: string;
|
|
245
|
-
temporaryRecipientKey: TransferTemporaryRecipientKey;
|
|
246
|
-
recipientNote: TransferOnboardingRecipientNoteInput$1;
|
|
247
|
-
}
|
|
248
224
|
interface StellarKytEnvironment {
|
|
249
225
|
apiBaseUrl: string;
|
|
250
226
|
kytPassageRegistryContract: string;
|
|
251
227
|
registerPassageOnChain?: boolean;
|
|
228
|
+
inspectAuthorization?: string;
|
|
252
229
|
}
|
|
253
230
|
interface StellarTransactEnvironment {
|
|
254
231
|
network: StellarNetworkConfig;
|
|
255
232
|
/**
|
|
256
233
|
* Nonce (persistent storage key) of the pool's `ZkConfig` entry this
|
|
257
|
-
* environment's proofs/circuit shape target. Defaults to `
|
|
258
|
-
*
|
|
234
|
+
* environment's proofs/circuit shape target. Defaults to `2n` (Commitment
|
|
235
|
+
* V2, 95 public signals) when omitted. Nonce `0` is the retired 93-signal
|
|
236
|
+
* layout and must be passed explicitly.
|
|
259
237
|
*/
|
|
260
238
|
zkConfigNonce?: bigint;
|
|
239
|
+
/**
|
|
240
|
+
* Optional nonce-keyed circuit map. Defaults to the SDK bundled 2×2 (nonce 2)
|
|
241
|
+
* and 6×6 (nonce 6) schemes. URL fields are only for a custom/dev circuit.
|
|
242
|
+
*/
|
|
243
|
+
zkCircuits?: Record<string, StellarZkCircuitDefinition>;
|
|
244
|
+
/**
|
|
245
|
+
* Directory or HTTP prefix for graph / r1cs / proving-key files.
|
|
246
|
+
* Defaults to the GitHub release for `@arcanetech/stellar-privacy-pool-zk-sdk`.
|
|
247
|
+
* Staging and local stands override this to serve files from disk.
|
|
248
|
+
*/
|
|
249
|
+
zkArtifactBaseUrl?: string;
|
|
261
250
|
auditPublicKey?: AuditPublicKey;
|
|
262
251
|
kyt: StellarKytEnvironment;
|
|
263
252
|
signTransaction?: StellarSignTransaction;
|
|
@@ -273,7 +262,6 @@ interface StellarTransactEnvironment {
|
|
|
273
262
|
recipientStellarAddress: string;
|
|
274
263
|
walletPublicKey: string;
|
|
275
264
|
}) => Promise<TransferRecipientExecutionContext>;
|
|
276
|
-
buildTransferOnboardingAtExecute?: (input: BuildTransferOnboardingAtExecuteInput) => Promise<OnboardingPayload>;
|
|
277
265
|
resolveWalletPublicKey?: () => Promise<string>;
|
|
278
266
|
poolMerkleState?: PoolMerkleStatePort;
|
|
279
267
|
leafEphemeral?: LeafEphemeralStatePort;
|
|
@@ -300,16 +288,25 @@ interface StellarSubmissionPayload {
|
|
|
300
288
|
interface StellarTransactArtifacts {
|
|
301
289
|
proofHex?: string;
|
|
302
290
|
publicHex?: string;
|
|
291
|
+
ciphertextHex?: string;
|
|
292
|
+
outputNoteEphemeralScalars?: string[];
|
|
303
293
|
applicationIdsPlaintext?: KytApplicationIdHints;
|
|
304
294
|
tokenAddress?: string;
|
|
305
295
|
depositScalarHex?: string;
|
|
306
296
|
precommitementHex?: string;
|
|
307
297
|
commitmentHex?: string;
|
|
308
298
|
walletPublicKey?: string;
|
|
309
|
-
|
|
299
|
+
escrowRecipient?: string;
|
|
300
|
+
escrowAuthorization?: string;
|
|
301
|
+
escrowSend?: boolean;
|
|
302
|
+
escrowSpendScalarHex?: string;
|
|
303
|
+
escrowClaimantLimbs?: {
|
|
304
|
+
recipientHi: string;
|
|
305
|
+
recipientLo: string;
|
|
306
|
+
nonceDecimal?: string;
|
|
307
|
+
};
|
|
310
308
|
executeFinalizeRequired?: boolean;
|
|
311
|
-
|
|
312
|
-
spendSource?: 'privateAddress' | 'pendingClaim';
|
|
309
|
+
spendSource?: 'privateAddress' | 'escrow';
|
|
313
310
|
}
|
|
314
311
|
interface StellarOperationReceipt {
|
|
315
312
|
operationId: string;
|
|
@@ -325,8 +322,6 @@ interface StellarNetworkConfig {
|
|
|
325
322
|
}
|
|
326
323
|
interface StellarBrowserAssets {
|
|
327
324
|
sdkWasm: ArrayBuffer;
|
|
328
|
-
circuitWasm: ArrayBuffer;
|
|
329
|
-
provingKey: ArrayBuffer;
|
|
330
325
|
}
|
|
331
326
|
interface StellarWalletAdapter {
|
|
332
327
|
getAddress(): Promise<StellarAddress>;
|
|
@@ -425,22 +420,6 @@ declare function composeStellarPrivacyClient(config: ResolvedStellarPrivacyClien
|
|
|
425
420
|
getIncomingDeliveries: (filter: StellarIncomingDeliveriesFilter) => Promise<StellarIncomingDelivery[]>;
|
|
426
421
|
upsertIncomingDeliveries: (deliveries: StellarIncomingDelivery[]) => Promise<void>;
|
|
427
422
|
markDeliveryProcessed(id: number): Promise<void>;
|
|
428
|
-
getPendingClaims: (filter?: StellarPendingClaimsFilter) => Promise<StellarPendingClaimsState>;
|
|
429
|
-
getPendingClaimsCount(owner: StellarAddress): Promise<number | undefined>;
|
|
430
|
-
appendPendingClaims: (claims: StellarPendingClaim[], paginationInfo: StellarPendingClaimsPagination) => Promise<void>;
|
|
431
|
-
replacePendingClaimsPage: (input: {
|
|
432
|
-
owner: StellarAddress;
|
|
433
|
-
claims: StellarPendingClaim[];
|
|
434
|
-
paginationInfo: StellarPendingClaimsPagination;
|
|
435
|
-
count?: number;
|
|
436
|
-
}) => Promise<void>;
|
|
437
|
-
upsertPendingClaims: (claims: StellarPendingClaim[]) => Promise<void>;
|
|
438
|
-
removePendingClaims: (ids: string[]) => Promise<void>;
|
|
439
|
-
clearPendingClaims: (input?: {
|
|
440
|
-
owner?: StellarAddress;
|
|
441
|
-
asset?: StellarAssetId;
|
|
442
|
-
}) => Promise<void>;
|
|
443
|
-
setPendingClaimsCount: (owner: StellarAddress, count: number) => Promise<void>;
|
|
444
423
|
getLeafEphemeral(input: {
|
|
445
424
|
poolContract: string;
|
|
446
425
|
leafIndex: number;
|
|
@@ -512,6 +491,7 @@ declare function composeStellarPrivacyClient(config: ResolvedStellarPrivacyClien
|
|
|
512
491
|
poolContractId?: string;
|
|
513
492
|
nullifier: string;
|
|
514
493
|
walletPublicKey: string;
|
|
494
|
+
privKeyScalarHex: string;
|
|
515
495
|
}) => Promise<{
|
|
516
496
|
spent: boolean;
|
|
517
497
|
nullifierHashHex: string;
|
|
@@ -557,18 +537,6 @@ declare function composeStellarPrivacyClient(config: ResolvedStellarPrivacyClien
|
|
|
557
537
|
};
|
|
558
538
|
type ComposedStellarPrivacyClient = ReturnType<typeof composeStellarPrivacyClient>;
|
|
559
539
|
|
|
560
|
-
interface LoadPendingClaimsFromBackendInput {
|
|
561
|
-
backendBaseUrl: string;
|
|
562
|
-
ownerAddress: StellarAddress;
|
|
563
|
-
asset?: StellarAssetId;
|
|
564
|
-
page?: number;
|
|
565
|
-
pageSize?: number;
|
|
566
|
-
}
|
|
567
|
-
interface LoadPendingClaimsCountFromBackendInput {
|
|
568
|
-
backendBaseUrl: string;
|
|
569
|
-
ownerAddress: StellarAddress;
|
|
570
|
-
}
|
|
571
|
-
|
|
572
540
|
declare function readPrivateRecordsFromStateSnapshot(state: unknown): StellarPrivateRecord[];
|
|
573
541
|
declare function readWalletPrivateAddressScalarFromStateSnapshot(input: {
|
|
574
542
|
state: unknown;
|
|
@@ -632,22 +600,6 @@ declare function composeStellarStateService(adapter: StateBridgeAdapter): {
|
|
|
632
600
|
getIncomingDeliveries: (filter: StellarIncomingDeliveriesFilter) => Promise<StellarIncomingDelivery[]>;
|
|
633
601
|
upsertIncomingDeliveries: (deliveries: StellarIncomingDelivery[]) => Promise<void>;
|
|
634
602
|
markDeliveryProcessed(id: number): Promise<void>;
|
|
635
|
-
getPendingClaims: (filter?: StellarPendingClaimsFilter) => Promise<StellarPendingClaimsState>;
|
|
636
|
-
getPendingClaimsCount(owner: StellarAddress): Promise<number | undefined>;
|
|
637
|
-
appendPendingClaims: (claims: StellarPendingClaim[], paginationInfo: StellarPendingClaimsPagination) => Promise<void>;
|
|
638
|
-
replacePendingClaimsPage: (input: {
|
|
639
|
-
owner: StellarAddress;
|
|
640
|
-
claims: StellarPendingClaim[];
|
|
641
|
-
paginationInfo: StellarPendingClaimsPagination;
|
|
642
|
-
count?: number;
|
|
643
|
-
}) => Promise<void>;
|
|
644
|
-
upsertPendingClaims: (claims: StellarPendingClaim[]) => Promise<void>;
|
|
645
|
-
removePendingClaims: (ids: string[]) => Promise<void>;
|
|
646
|
-
clearPendingClaims: (input?: {
|
|
647
|
-
owner?: StellarAddress;
|
|
648
|
-
asset?: StellarAssetId;
|
|
649
|
-
}) => Promise<void>;
|
|
650
|
-
setPendingClaimsCount: (owner: StellarAddress, count: number) => Promise<void>;
|
|
651
603
|
getLeafEphemeral(input: {
|
|
652
604
|
poolContract: string;
|
|
653
605
|
leafIndex: number;
|
|
@@ -729,16 +681,6 @@ declare function createStateDelegates(state: StellarStateService): {
|
|
|
729
681
|
markDeliveryProcessed: (id: Parameters<StellarStateService["markDeliveryProcessed"]>[0]) => Promise<void>;
|
|
730
682
|
getDeliverySyncState: (input: Parameters<StellarStateService["getDeliverySyncState"]>[0]) => Promise<StellarDeliverySyncState | undefined>;
|
|
731
683
|
setDeliverySyncState: (syncState: Parameters<StellarStateService["setDeliverySyncState"]>[0]) => Promise<void>;
|
|
732
|
-
appendPendingClaims: (claims: Parameters<StellarStateService["appendPendingClaims"]>[0], paginationInfo: Parameters<StellarStateService["appendPendingClaims"]>[1]) => Promise<void>;
|
|
733
|
-
loadPendingClaimsFromBackend: (input: LoadPendingClaimsFromBackendInput) => Promise<void>;
|
|
734
|
-
loadPendingClaimsCountFromBackend: (input: LoadPendingClaimsCountFromBackendInput) => Promise<void>;
|
|
735
|
-
replacePendingClaimsPage: (input: Parameters<StellarStateService["replacePendingClaimsPage"]>[0]) => Promise<void>;
|
|
736
|
-
upsertPendingClaims: (claims: Parameters<StellarStateService["upsertPendingClaims"]>[0]) => Promise<void>;
|
|
737
|
-
removePendingClaims: (ids: Parameters<StellarStateService["removePendingClaims"]>[0]) => Promise<void>;
|
|
738
|
-
clearPendingClaims: (input?: Parameters<StellarStateService["clearPendingClaims"]>[0]) => Promise<void>;
|
|
739
|
-
getPendingClaims: (filter?: Parameters<StellarStateService["getPendingClaims"]>[0]) => Promise<StellarPendingClaimsState>;
|
|
740
|
-
getPendingClaimsCount: (owner: Parameters<StellarStateService["getPendingClaimsCount"]>[0]) => Promise<number | undefined>;
|
|
741
|
-
setPendingClaimsCount: (owner: Parameters<StellarStateService["setPendingClaimsCount"]>[0], count: Parameters<StellarStateService["setPendingClaimsCount"]>[1]) => Promise<void>;
|
|
742
684
|
getPoolMerkleState: (poolContract: Parameters<StellarStateService["getPoolMerkleState"]>[0]) => Promise<StellarPoolMerkleState | undefined>;
|
|
743
685
|
setPoolMerkleState: (poolState: Parameters<StellarStateService["setPoolMerkleState"]>[0]) => Promise<void>;
|
|
744
686
|
appendPoolCommitments: (input: Parameters<StellarStateService["appendPoolCommitments"]>[0]) => Promise<void>;
|
|
@@ -808,23 +750,44 @@ declare function createStellarPolicyAdapterFromEnvironment(transactEnvironment:
|
|
|
808
750
|
inspectOperation: (_kind: StellarPreparedOperation["kind"], _intent: StellarPreparedOperation["intent"]) => Promise<void>;
|
|
809
751
|
};
|
|
810
752
|
|
|
753
|
+
type DecodedPrivateAddress = {
|
|
754
|
+
x: string;
|
|
755
|
+
y: string;
|
|
756
|
+
};
|
|
757
|
+
type PrivateAddressGenerator = (signature: string, domain: SpendScalarDomain) => string | Promise<string>;
|
|
758
|
+
type PrivateAddressSdk = {
|
|
759
|
+
generatePrivateAddressFromStellarSignature: PrivateAddressGenerator;
|
|
760
|
+
};
|
|
761
|
+
declare function buildPrivateAddressSignMessage(publicKey: string, domain: SpendScalarDomain, nonce?: string): string;
|
|
762
|
+
declare function decodePrivateAddress(value: string): DecodedPrivateAddress;
|
|
763
|
+
declare function encodePrivateAddress(decoded: DecodedPrivateAddress): string;
|
|
764
|
+
declare function encodePrivateAddressFromHexCoordinates(publicKeyXHex: string, publicKeyYHex: string): string;
|
|
765
|
+
declare function recipientPublicKeysDecimalFromPrivateAddress(value: string): unknown;
|
|
766
|
+
declare function privateAddressSdk(sdk: PrivacyPoolSDK): PrivateAddressSdk;
|
|
767
|
+
|
|
811
768
|
declare class PrivacyPoolService {
|
|
812
769
|
private readonly assets?;
|
|
813
770
|
private readonly applicationId?;
|
|
814
771
|
private readonly auditPublicKey?;
|
|
772
|
+
private readonly zkCircuits?;
|
|
773
|
+
private readonly zkConfigNonce?;
|
|
774
|
+
private readonly zkArtifactBaseUrl?;
|
|
815
775
|
private sdk;
|
|
816
776
|
private initPromise;
|
|
817
|
-
constructor(assets?: StellarBrowserAssets | undefined, applicationId?: string | undefined, auditPublicKey?: [string, string] | undefined);
|
|
777
|
+
constructor(assets?: StellarBrowserAssets | undefined, applicationId?: string | undefined, auditPublicKey?: [string, string] | undefined, zkCircuits?: Record<string, StellarZkCircuitDefinition> | undefined, zkConfigNonce?: bigint | undefined, zkArtifactBaseUrl?: string | undefined);
|
|
818
778
|
private ensureInit;
|
|
819
779
|
getInitializedSdk(): Promise<PrivacyPoolSDK>;
|
|
820
780
|
getAuditPublicKey(): [string, string] | undefined;
|
|
821
781
|
getApplicationId(): string;
|
|
822
|
-
generatePrivateAddressFromStellarSignature(signature: string): Promise<string>;
|
|
782
|
+
generatePrivateAddressFromStellarSignature(signature: string, domain: SpendScalarDomain): Promise<string>;
|
|
823
783
|
sharedSecretX(recipientScalarHex: string, ephemeralKeyEncoded: string): Promise<string>;
|
|
824
784
|
buildAlignedDepositSlot(parameters: {
|
|
825
785
|
privateAddressStpl1: string;
|
|
826
786
|
amountStroops: bigint;
|
|
827
787
|
tokenAddress: string;
|
|
788
|
+
escrowNonce?: string;
|
|
789
|
+
recipientHi?: string;
|
|
790
|
+
recipientLo?: string;
|
|
828
791
|
}): Promise<AlignedDepositSlot>;
|
|
829
792
|
createAlignedShieldCoinData(parameters: {
|
|
830
793
|
privateAddressStpl1: string;
|
|
@@ -838,7 +801,7 @@ declare class PrivacyPoolService {
|
|
|
838
801
|
merkleRootBytes: Buffer$1;
|
|
839
802
|
tokenAddress: string;
|
|
840
803
|
}): Promise<ProofResult>;
|
|
841
|
-
calculateNullifierHash(nullifier: string): Promise<string>;
|
|
804
|
+
calculateNullifierHash(nullifier: string, privKeyScalar: string): Promise<string>;
|
|
842
805
|
prepareWithdrawTransactProof(parameters: {
|
|
843
806
|
coin: CoinData;
|
|
844
807
|
state: StateFile;
|
|
@@ -867,6 +830,9 @@ declare function createPrivacyPoolService(input?: {
|
|
|
867
830
|
assets?: StellarBrowserAssets;
|
|
868
831
|
applicationId?: string;
|
|
869
832
|
auditPublicKey?: [string, string];
|
|
833
|
+
zkCircuits?: Record<string, StellarZkCircuitDefinition>;
|
|
834
|
+
zkConfigNonce?: bigint;
|
|
835
|
+
zkArtifactBaseUrl?: string;
|
|
870
836
|
}): PrivacyPoolService;
|
|
871
837
|
declare function configurePrivacyPoolService(service: PrivacyPoolService): void;
|
|
872
838
|
declare function getPrivacyPoolService(): PrivacyPoolService;
|
|
@@ -875,28 +841,111 @@ declare function parseAuditPublicKeyFromEnvHex(raw: string): AuditPublicKey;
|
|
|
875
841
|
declare function buildPoolTransactionAuditParameters(input: {
|
|
876
842
|
applicationId: string;
|
|
877
843
|
auditPublicKey?: AuditPublicKey;
|
|
844
|
+
nAuditSlots?: number;
|
|
878
845
|
}): TransactionAuditParams;
|
|
879
846
|
declare function resolvePoolApplicationId(applicationId: string | undefined): string;
|
|
880
847
|
|
|
881
|
-
type
|
|
882
|
-
|
|
883
|
-
|
|
848
|
+
type BlindedRecipientTagChallengeFields = {
|
|
849
|
+
stellarAddress: string;
|
|
850
|
+
networkPassphrase: string;
|
|
851
|
+
issuedAt: string;
|
|
852
|
+
expiresAt: string;
|
|
853
|
+
nonce: string;
|
|
884
854
|
};
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
855
|
+
declare function buildBlindedRecipientTagChallengeMessage(fields: BlindedRecipientTagChallengeFields): string;
|
|
856
|
+
|
|
857
|
+
type DerivedEscrowRecipient = {
|
|
858
|
+
nonceDecimal: string;
|
|
859
|
+
recipientHi: string;
|
|
860
|
+
recipientLo: string;
|
|
861
|
+
recipientStellarAddress: string;
|
|
862
|
+
privateAddressStpl1: string;
|
|
863
|
+
scalarHex: string;
|
|
888
864
|
};
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
declare function
|
|
865
|
+
type DerivedEscrowKeyFn = (nonce: bigint, recipientHi: bigint, recipientLo: bigint) => Promise<{
|
|
866
|
+
scalarHex: string;
|
|
867
|
+
pointXHex: string;
|
|
868
|
+
pointYHex: string;
|
|
869
|
+
}>;
|
|
870
|
+
declare function deriveEscrowRecipientFromStellarAddress(input: {
|
|
871
|
+
recipientStellarAddress: string;
|
|
872
|
+
nonceDecimal?: string;
|
|
873
|
+
deriveKey?: DerivedEscrowKeyFn;
|
|
874
|
+
}): Promise<DerivedEscrowRecipient>;
|
|
875
|
+
|
|
876
|
+
declare function assertEscrowSweepClaimant(input: {
|
|
877
|
+
walletPublicKey: string;
|
|
878
|
+
claimantAddress: string;
|
|
879
|
+
}): void;
|
|
880
|
+
|
|
881
|
+
type EscrowOutputNoteCiphertextEvent = {
|
|
882
|
+
outputIndex: number;
|
|
883
|
+
commitmentHashHex: string;
|
|
884
|
+
createdEphemeralKey: readonly [string, string];
|
|
885
|
+
ciphertext: readonly string[];
|
|
886
|
+
tag: string;
|
|
887
|
+
};
|
|
888
|
+
type ReconstructedEscrowNote = {
|
|
889
|
+
coin: CoinData;
|
|
890
|
+
scalarHex: string;
|
|
891
|
+
privateAddressStpl1: string;
|
|
892
|
+
recipientHi: string;
|
|
893
|
+
recipientLo: string;
|
|
894
|
+
nonceDecimal: string;
|
|
895
|
+
tokenAddress: string;
|
|
896
|
+
commitmentHex: string;
|
|
897
|
+
};
|
|
898
|
+
type DecryptEscrowOutputNote = (input: {
|
|
899
|
+
recipientScalarHex: string;
|
|
900
|
+
commitmentHashHex: string;
|
|
901
|
+
createdEphemeralKey: readonly [string, string];
|
|
902
|
+
ciphertext: readonly string[];
|
|
903
|
+
tag: string;
|
|
904
|
+
ownerMode?: bigint;
|
|
905
|
+
}) => Promise<{
|
|
906
|
+
value: string;
|
|
907
|
+
assetHi: string;
|
|
908
|
+
assetLo: string;
|
|
909
|
+
nullifier: string;
|
|
910
|
+
secret: string;
|
|
911
|
+
applicationId: string;
|
|
912
|
+
commitmentHex: string;
|
|
913
|
+
commitmentMatches: boolean;
|
|
914
|
+
}>;
|
|
915
|
+
declare function reconstructEscrowNote(input: {
|
|
916
|
+
claimantAddress: string;
|
|
917
|
+
nonceDecimal: string;
|
|
918
|
+
seq: number;
|
|
919
|
+
events: readonly EscrowOutputNoteCiphertextEvent[];
|
|
920
|
+
decrypt?: DecryptEscrowOutputNote;
|
|
921
|
+
deriveKey?: DerivedEscrowKeyFn;
|
|
922
|
+
}): Promise<ReconstructedEscrowNote>;
|
|
923
|
+
|
|
924
|
+
type PrepareEscrowSweepInput = {
|
|
925
|
+
walletPublicKey: string;
|
|
926
|
+
claimantAddress: string;
|
|
927
|
+
registeredPrivateAddress: string;
|
|
928
|
+
reconstructed: ReconstructedEscrowNote;
|
|
929
|
+
poolContract: string;
|
|
930
|
+
asset: string;
|
|
931
|
+
};
|
|
932
|
+
declare function attachEscrowAuthorization(prepared: StellarPreparedOperation, escrowAuthorization: string): StellarPreparedOperation;
|
|
933
|
+
declare function prepareEscrowSweepOperation(input: PrepareEscrowSweepInput): StellarPreparedOperation;
|
|
934
|
+
|
|
935
|
+
declare function fetchEscrowOutputNoteEvents(input: {
|
|
936
|
+
transactEnvironment: StellarTransactEnvironment;
|
|
937
|
+
txId: string;
|
|
938
|
+
poolAddress: string;
|
|
939
|
+
}): Promise<EscrowOutputNoteCiphertextEvent[]>;
|
|
940
|
+
|
|
941
|
+
declare function unsignedEscrowAuthorizationForSweep(input: {
|
|
942
|
+
prepared: StellarPreparedOperation;
|
|
943
|
+
transactEnvironment: StellarTransactEnvironment;
|
|
944
|
+
relayerPublicKey: string;
|
|
945
|
+
}): Promise<string>;
|
|
895
946
|
|
|
896
947
|
interface LoadBrowserAssetsInput {
|
|
897
948
|
sdkWasmUrl: string;
|
|
898
|
-
circuitWasmUrl: string;
|
|
899
|
-
provingKeyUrl: string;
|
|
900
949
|
cacheBust?: boolean;
|
|
901
950
|
}
|
|
902
951
|
declare function loadStellarBrowserAssets(input: LoadBrowserAssetsInput): Promise<StellarBrowserAssets>;
|
|
@@ -904,30 +953,18 @@ declare function loadDefaultStellarBrowserAssets(options?: {
|
|
|
904
953
|
cacheBust?: boolean;
|
|
905
954
|
}): Promise<StellarBrowserAssets>;
|
|
906
955
|
|
|
956
|
+
declare const STANDARD_ZK_CONFIG_NONCE = 0n;
|
|
957
|
+
declare const COMMITMENT_V2_ZK_NONCE = 2n;
|
|
958
|
+
declare const SIX_BY_SIX_ZK_NONCE = 6n;
|
|
959
|
+
declare const DEFAULT_ZK_CONFIG_NONCE = 3n;
|
|
960
|
+
declare function resolveZkConfigNonce(transactEnvironment: StellarTransactEnvironment): bigint;
|
|
961
|
+
|
|
962
|
+
declare function generateRandomDepositScalarHex(): Promise<string>;
|
|
907
963
|
declare function generateTemporaryRecipientPrivateAddress(): Promise<{
|
|
908
964
|
temporaryScalarHex: string;
|
|
909
965
|
temporaryPrivateAddressStpl1: string;
|
|
910
966
|
}>;
|
|
911
967
|
|
|
912
|
-
type TransferOnboardingRecipientNoteInput = {
|
|
913
|
-
tokenAddress: string;
|
|
914
|
-
nullifier: string;
|
|
915
|
-
secret: string;
|
|
916
|
-
value: string;
|
|
917
|
-
};
|
|
918
|
-
type TemporaryRecipientKeyMaterial = {
|
|
919
|
-
temporaryScalarHex: string;
|
|
920
|
-
temporaryPrivateAddressStpl1: string;
|
|
921
|
-
};
|
|
922
|
-
declare function generateRandomDepositScalarHex(): Promise<string>;
|
|
923
|
-
declare function buildOnboardingPayload(parameters: {
|
|
924
|
-
ownerStellarAddress: string;
|
|
925
|
-
temporaryKey: TemporaryRecipientKeyMaterial;
|
|
926
|
-
recipientNotes: TransferOnboardingRecipientNoteInput[];
|
|
927
|
-
permanentPrivateAddressStpl1?: string;
|
|
928
|
-
}): OnboardingPayload;
|
|
929
|
-
declare function buildTransferOnboardingAtExecute(input: BuildTransferOnboardingAtExecuteInput): Promise<OnboardingPayload>;
|
|
930
|
-
|
|
931
968
|
declare class KytInspectError extends Error {
|
|
932
969
|
readonly reasonCode: string;
|
|
933
970
|
readonly decisionId?: string;
|
|
@@ -963,7 +1000,8 @@ interface SubmitSorobanConfidentialTransferInput {
|
|
|
963
1000
|
walletPublicKey: string;
|
|
964
1001
|
proofHex: string;
|
|
965
1002
|
publicHex: string;
|
|
966
|
-
|
|
1003
|
+
ciphertextHex?: string;
|
|
1004
|
+
outputNoteEphemeralScalars?: string[];
|
|
967
1005
|
applicationIdsPlaintext?: KytApplicationIdHints;
|
|
968
1006
|
networkPassphrase: string;
|
|
969
1007
|
sorobanRpcUrl: string;
|
|
@@ -985,7 +1023,6 @@ type PrepareConfidentialTransferProofDualParameters = {
|
|
|
985
1023
|
coinA: CoinData;
|
|
986
1024
|
coinB: CoinData;
|
|
987
1025
|
state: StateFile;
|
|
988
|
-
senderGAddress: string;
|
|
989
1026
|
senderPrivKeyScalarHex: string;
|
|
990
1027
|
ephemeralAKey: string;
|
|
991
1028
|
ephemeralBKey: string;
|
|
@@ -993,10 +1030,14 @@ type PrepareConfidentialTransferProofDualParameters = {
|
|
|
993
1030
|
recipientPrivateAddressStpl1: string;
|
|
994
1031
|
selfPrivateAddressStpl1ForChange: string | undefined;
|
|
995
1032
|
tokenAddress: string;
|
|
1033
|
+
escrowSend?: TransferEscrowSend;
|
|
1034
|
+
escrowClaimantLimbs?: TransferEscrowClaimantLimbs;
|
|
996
1035
|
};
|
|
997
1036
|
type PrepareConfidentialTransferProofDualResult = {
|
|
998
1037
|
proof_hex: string;
|
|
999
1038
|
public_hex: string;
|
|
1039
|
+
ciphertext_hex?: string;
|
|
1040
|
+
output_note_ephemeral_scalars?: string[];
|
|
1000
1041
|
applicationIdsPlaintext: KytApplicationIdHints;
|
|
1001
1042
|
recipientCoin: GeneratedOutputCoin;
|
|
1002
1043
|
changeCoin?: GeneratedOutputCoin;
|
|
@@ -1006,17 +1047,20 @@ declare function prepareConfidentialTransferProofDual(parameters: PrepareConfide
|
|
|
1006
1047
|
type PrepareConfidentialTransferProofParameters = {
|
|
1007
1048
|
coin: CoinData;
|
|
1008
1049
|
state: StateFile;
|
|
1009
|
-
senderGAddress: string;
|
|
1010
1050
|
senderPrivKeyScalarHex: string;
|
|
1011
1051
|
depositorEphemeralKey: string;
|
|
1012
1052
|
transferStroops: bigint;
|
|
1013
1053
|
recipientPrivateAddressStpl1: string;
|
|
1014
1054
|
selfPrivateAddressStpl1ForChange: string | undefined;
|
|
1015
1055
|
tokenAddress: string;
|
|
1056
|
+
escrowSend?: TransferEscrowSend;
|
|
1057
|
+
escrowClaimantLimbs?: TransferEscrowClaimantLimbs;
|
|
1016
1058
|
};
|
|
1017
1059
|
type PrepareConfidentialTransferProofResult = {
|
|
1018
1060
|
proof_hex: string;
|
|
1019
1061
|
public_hex: string;
|
|
1062
|
+
ciphertext_hex?: string;
|
|
1063
|
+
output_note_ephemeral_scalars?: string[];
|
|
1020
1064
|
applicationIdsPlaintext: KytApplicationIdHints;
|
|
1021
1065
|
recipientCoin: GeneratedOutputCoin;
|
|
1022
1066
|
changeCoin?: GeneratedOutputCoin;
|
|
@@ -1036,7 +1080,8 @@ interface RequestKytPassageForPoolInteractionInput {
|
|
|
1036
1080
|
poolContract: string;
|
|
1037
1081
|
proofHex: string;
|
|
1038
1082
|
publicHex: string;
|
|
1039
|
-
|
|
1083
|
+
ciphertextHex?: string;
|
|
1084
|
+
outputNoteEphemeralScalars?: string[];
|
|
1040
1085
|
decryptedAuditSlots?: DecryptedKytAuditSlot[];
|
|
1041
1086
|
applicationIdsPlaintext?: KytApplicationIdHints;
|
|
1042
1087
|
networkPassphrase: string;
|
|
@@ -1054,4 +1099,106 @@ declare function runTtlPreflight(assembledTransaction: unknown): Promise<void>;
|
|
|
1054
1099
|
|
|
1055
1100
|
declare function attachPoolStatePorts(transactEnvironment: StellarTransactEnvironment | undefined, state: StateBridgeAdapter): StellarTransactEnvironment | undefined;
|
|
1056
1101
|
|
|
1057
|
-
|
|
1102
|
+
declare function finalizeSpendOperationAtExecute(prepared: StellarPreparedOperation, environment: StellarTransactEnvironment, poolService: PrivacyPoolService): Promise<StellarPreparedOperation>;
|
|
1103
|
+
|
|
1104
|
+
declare const RELAY_TRANSACT_PACKAGE_VERSION_V1 = 1;
|
|
1105
|
+
declare const RELAY_TRANSACT_SUPPORTED_SIGNAL_COUNT = 93;
|
|
1106
|
+
declare const RELAY_TRANSACT_FIELD_BYTES = 32;
|
|
1107
|
+
declare const RELAY_TRANSACT_SIGNAL_PREFIX_BYTES = 4;
|
|
1108
|
+
declare const RELAY_SIGNAL_INDEX_NULLIFIER_0 = 0;
|
|
1109
|
+
declare const RELAY_SIGNAL_INDEX_NULLIFIER_1 = 1;
|
|
1110
|
+
declare const RELAY_SIGNAL_INDEX_STATE_ROOT = 82;
|
|
1111
|
+
declare const RELAY_SIGNAL_INDEX_WITHDRAW_ADDRESS_HI = 83;
|
|
1112
|
+
declare const RELAY_SIGNAL_INDEX_WITHDRAW_ADDRESS_LO = 84;
|
|
1113
|
+
declare const RELAY_SIGNAL_INDEX_ESCROW_RECIPIENT_HI = 85;
|
|
1114
|
+
declare const RELAY_SIGNAL_INDEX_ESCROW_RECIPIENT_LO = 86;
|
|
1115
|
+
declare const RELAY_SIGNAL_INDEX_PUBLIC_WITHDRAWAL_ASSET_HI = 87;
|
|
1116
|
+
declare const RELAY_SIGNAL_INDEX_PUBLIC_WITHDRAWAL_ASSET_LO = 88;
|
|
1117
|
+
declare const RELAY_SIGNAL_INDEX_PUBLIC_DEPOSIT_ASSET_HI = 89;
|
|
1118
|
+
declare const RELAY_SIGNAL_INDEX_PUBLIC_DEPOSIT_ASSET_LO = 90;
|
|
1119
|
+
declare const RELAY_SIGNAL_INDEX_PUBLIC_DEPOSIT = 91;
|
|
1120
|
+
declare const RELAY_SIGNAL_INDEX_PUBLIC_WITHDRAWAL = 92;
|
|
1121
|
+
|
|
1122
|
+
type RelayTransactPackageVersion = typeof RELAY_TRANSACT_PACKAGE_VERSION_V1;
|
|
1123
|
+
type RelayKeyVersionHints = [
|
|
1124
|
+
number | undefined,
|
|
1125
|
+
number | undefined,
|
|
1126
|
+
number | undefined,
|
|
1127
|
+
number | undefined
|
|
1128
|
+
];
|
|
1129
|
+
type RelayTransactPackageV1 = {
|
|
1130
|
+
version: RelayTransactPackageVersion;
|
|
1131
|
+
poolSelector: string;
|
|
1132
|
+
zkConfigNonce: bigint;
|
|
1133
|
+
proofBytes: string;
|
|
1134
|
+
publicSignals: string;
|
|
1135
|
+
ciphertextBytes?: string;
|
|
1136
|
+
outputNoteEphemeralScalars?: string[];
|
|
1137
|
+
applicationIdHints: KytApplicationIdHints;
|
|
1138
|
+
escrowAuthorization?: string;
|
|
1139
|
+
keyVersionHints?: RelayKeyVersionHints;
|
|
1140
|
+
};
|
|
1141
|
+
type PrepareRelayTransactPackageInput = {
|
|
1142
|
+
poolSelector: string;
|
|
1143
|
+
proofBytes: string;
|
|
1144
|
+
publicSignals: string;
|
|
1145
|
+
ciphertextBytes?: string;
|
|
1146
|
+
outputNoteEphemeralScalars?: string[];
|
|
1147
|
+
applicationIdHints: KytApplicationIdHints;
|
|
1148
|
+
zkConfigNonce?: bigint;
|
|
1149
|
+
escrowAuthorization?: string;
|
|
1150
|
+
keyVersionHints?: RelayKeyVersionHints;
|
|
1151
|
+
};
|
|
1152
|
+
|
|
1153
|
+
declare function prepareRelayTransactPackage(input: PrepareRelayTransactPackageInput): RelayTransactPackageV1;
|
|
1154
|
+
|
|
1155
|
+
type PrepareRelayTransactPackageFromPreparedInput = {
|
|
1156
|
+
prepared: StellarPreparedOperation;
|
|
1157
|
+
poolSelector: string;
|
|
1158
|
+
zkConfigNonce?: bigint;
|
|
1159
|
+
keyVersionHints?: RelayKeyVersionHints;
|
|
1160
|
+
};
|
|
1161
|
+
declare function prepareRelayTransactPackageFromPrepared(input: PrepareRelayTransactPackageFromPreparedInput): RelayTransactPackageV1;
|
|
1162
|
+
|
|
1163
|
+
type RelayTransactPublicLegContext = {
|
|
1164
|
+
stateRoot: string;
|
|
1165
|
+
withdrawAddressHi: string;
|
|
1166
|
+
withdrawAddressLo: string;
|
|
1167
|
+
escrowRecipientHi: string;
|
|
1168
|
+
escrowRecipientLo: string;
|
|
1169
|
+
publicWithdrawalAssetHi: string;
|
|
1170
|
+
publicWithdrawalAssetLo: string;
|
|
1171
|
+
publicDepositAssetHi: string;
|
|
1172
|
+
publicDepositAssetLo: string;
|
|
1173
|
+
publicDepositAmount: string;
|
|
1174
|
+
publicWithdrawalAmount: string;
|
|
1175
|
+
};
|
|
1176
|
+
type RelayTransactSupportedProfile = {
|
|
1177
|
+
orderedNullifiers: [string, string];
|
|
1178
|
+
publicLegContext: RelayTransactPublicLegContext;
|
|
1179
|
+
};
|
|
1180
|
+
declare function readRelayTransactSupportedProfile(prepared: RelayTransactPackageV1): RelayTransactSupportedProfile;
|
|
1181
|
+
|
|
1182
|
+
declare const SUBMISSION_METHOD: {
|
|
1183
|
+
readonly direct: "direct";
|
|
1184
|
+
readonly relay: "relay";
|
|
1185
|
+
};
|
|
1186
|
+
type SubmissionMethod = (typeof SUBMISSION_METHOD)[keyof typeof SUBMISSION_METHOD];
|
|
1187
|
+
declare const ESCROW_SUBMISSION_REFUSAL: {
|
|
1188
|
+
readonly positivePublicDeposit: "escrow_positive_public_deposit";
|
|
1189
|
+
};
|
|
1190
|
+
type EscrowSubmissionRefusal = (typeof ESCROW_SUBMISSION_REFUSAL)[keyof typeof ESCROW_SUBMISSION_REFUSAL];
|
|
1191
|
+
type RequiredSubmissionMethodResult = {
|
|
1192
|
+
method: SubmissionMethod;
|
|
1193
|
+
} | {
|
|
1194
|
+
refused: EscrowSubmissionRefusal;
|
|
1195
|
+
};
|
|
1196
|
+
declare class EscrowSubmissionRefusedError extends Error {
|
|
1197
|
+
readonly reason: EscrowSubmissionRefusal;
|
|
1198
|
+
constructor(reason: EscrowSubmissionRefusal);
|
|
1199
|
+
}
|
|
1200
|
+
declare function isEscrowPreparedOperation(prepared: StellarPreparedOperation): boolean;
|
|
1201
|
+
declare function evaluateRequiredSubmissionMethod(prepared: StellarPreparedOperation, zkConfigNonce?: bigint): RequiredSubmissionMethodResult;
|
|
1202
|
+
declare function requiredSubmissionMethod(prepared: StellarPreparedOperation, zkConfigNonce?: bigint): SubmissionMethod;
|
|
1203
|
+
|
|
1204
|
+
export { type AlignedDepositSlot, type BlindedRecipientTagChallengeFields, COMMITMENT_V2_ZK_NONCE, type CreateStellarPrivacyClientResult, DEFAULT_STELLAR_ZK_CIRCUITS, DEFAULT_ZK_CONFIG_NONCE, ESCROW_SUBMISSION_REFUSAL, type EscrowOutputNoteCiphertextEvent, type EscrowSubmissionRefusal, EscrowSubmissionRefusedError, type KytApplicationIdHints, KytInspectError, type LoadBrowserAssetsInput, MIN_CONFIDENTIAL_TRANSFER_STROOPS, type PrepareRelayTransactPackageFromPreparedInput, type PrepareRelayTransactPackageInput, PrivacyPoolService, type ProofResult, type ProofWithChange, RELAY_SIGNAL_INDEX_ESCROW_RECIPIENT_HI, RELAY_SIGNAL_INDEX_ESCROW_RECIPIENT_LO, RELAY_SIGNAL_INDEX_NULLIFIER_0, RELAY_SIGNAL_INDEX_NULLIFIER_1, RELAY_SIGNAL_INDEX_PUBLIC_DEPOSIT, RELAY_SIGNAL_INDEX_PUBLIC_DEPOSIT_ASSET_HI, RELAY_SIGNAL_INDEX_PUBLIC_DEPOSIT_ASSET_LO, RELAY_SIGNAL_INDEX_PUBLIC_WITHDRAWAL, RELAY_SIGNAL_INDEX_PUBLIC_WITHDRAWAL_ASSET_HI, RELAY_SIGNAL_INDEX_PUBLIC_WITHDRAWAL_ASSET_LO, RELAY_SIGNAL_INDEX_STATE_ROOT, RELAY_SIGNAL_INDEX_WITHDRAW_ADDRESS_HI, RELAY_SIGNAL_INDEX_WITHDRAW_ADDRESS_LO, RELAY_TRANSACT_FIELD_BYTES, RELAY_TRANSACT_PACKAGE_VERSION_V1, RELAY_TRANSACT_SIGNAL_PREFIX_BYTES, RELAY_TRANSACT_SUPPORTED_SIGNAL_COUNT, type ReconstructedEscrowNote, type RelayKeyVersionHints, type RelayTransactPackageV1, type RelayTransactPackageVersion, type RelayTransactPublicLegContext, type RelayTransactSupportedProfile, type RequestKytPassageForPoolInteractionInput, type RequiredSubmissionMethodResult, SIX_BY_SIX_ZK_NONCE, STANDARD_ZK_CONFIG_NONCE, SUBMISSION_METHOD, type StellarAddress, type StellarAsset, type StellarAssetId, type StellarAssetsCatalog, type StellarAvailablePrivateRecordsFilter, type StellarBrowserAssets, type StellarBrowserPrivacyClientConfig, type StellarBundledZkCircuitDefinition, type StellarCustomZkCircuitDefinition, type StellarDeliverySyncState, type StellarIncomingDeliveriesFilter, type StellarIncomingDelivery, type StellarKytEnvironment, type StellarLeafEphemeral, type StellarNetworkConfig, type StellarOperationReceipt, type StellarPolicyAdapter, type StellarPoolMerkleState, type StellarPreparedOperation, type StellarPrivacyClient, type StellarPrivacyClientConfig, type StellarPrivateAssetRow, type StellarPrivateRecord, type StellarPrivateRecordStatus, type StellarPublicBalance, type StellarPublicBalanceInput, type StellarRegistryLookup, type StellarStateAdapter, type StellarSubmissionPayload, type StellarTransactEngine, type StellarTransactEnvironment, type StellarTransactionDetails, type StellarTransactionStatus, type StellarTransferFromAddress, type StellarTransferIntent, type StellarZkCircuitDefinition, type SubmissionMethod, type TransferEscrowClaimantLimbs, type TransferEscrowSend, type TransferRecipientExecutionContext, type TransferTemporaryRecipientKey, ZERO_STROOPS, assertEscrowSweepClaimant, assetLegToTokenAddress, attachEscrowAuthorization, attachPoolStatePorts, buildBlindedRecipientTagChallengeMessage, buildPoolTransactionAuditParameters, buildPrivateAddressSignMessage, configurePrivacyPoolService, createDefaultTransactEngine, createPrivacyPoolService, createStellarPolicyAdapterFromEnvironment, createStellarPrivacyClient, createStellarPrivacyClientFromResolvedConfig, decodePrivateAddress, deriveEscrowRecipientFromStellarAddress, encodePrivateAddress, encodePrivateAddressFromHexCoordinates, evaluateRequiredSubmissionMethod, fetchAndMergeMerkleState, fetchEscrowOutputNoteEvents, finalizeSpendOperationAtExecute, frDecimalToPaddedBytes32, generateRandomDepositScalarHex, generateTemporaryRecipientPrivateAddress, getPrivacyPoolService, isEscrowPreparedOperation, isStellarPrivacyClient, listWalletPrivateAddressRecordsForOwnerFromStateSnapshot, listWalletPrivateAddressScalarsForOwnerFromStateSnapshot, loadDefaultStellarBrowserAssets, loadStellarBrowserAssets, optionalZkArtifactBaseUrl, parseAuditPublicKeyFromEnvHex, parseKytReasonCode, prepareConfidentialTransferProof, prepareConfidentialTransferProofDual, prepareEscrowSweepOperation, prepareRelayTransactPackage, prepareRelayTransactPackageFromPrepared, privateAddressSdk, readLeafEphemeralHex, readPrivateRecordsFromStateSnapshot, readRelayTransactSupportedProfile, readWalletDefaultPrivateAddressNonceFromStateSnapshot, readWalletPrivateAddressRecordFromStateSnapshot, readWalletPrivateAddressScalarFromStateSnapshot, recipientPublicKeysDecimalFromPrivateAddress, reconstructEscrowNote, requestKytPassageForPoolInteraction, requiredSubmissionMethod, resolvePoolApplicationId, resolveStellarPrivacyClientConfig, resolveZkConfigNonce, runTtlPreflight, stellarStateDefinitions, submitSorobanConfidentialTransfer, submitSorobanDeposit, tokenAddressToAssetLeg, unsignedEscrowAuthorizationForSweep };
|