@arcanetech/privacy-sdk-stellar 0.2.0 → 0.2.3

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.
@@ -0,0 +1,753 @@
1
+ import { z } from 'zod';
2
+ import * as _arcanetech_privacy_sdk_core_state from '@arcanetech/privacy-sdk-core/state';
3
+ import { StateBridgeDefinition, StateBridgeAdapter } from '@arcanetech/privacy-sdk-core/state';
4
+
5
+ declare const STELLAR_STATE_PATHS: {
6
+ readonly privateRecords: "$.privateRecords";
7
+ readonly pendingClaimsItems: "$.pendingClaims.items";
8
+ readonly pendingClaimsPagination: "$.pendingClaims.pagination";
9
+ readonly pendingClaimsCountByOwner: "$.pendingClaims.countByOwner";
10
+ readonly registryPrivateAddresses: "$.registry.privateAddresses";
11
+ readonly registryRegisteredAddresses: "$.registry.registeredAddresses";
12
+ readonly registryLookups: "$.registry.lookups";
13
+ readonly assets: "$.assets";
14
+ readonly assetsById: "$.assets.byId";
15
+ readonly assetsListOrder: "$.assets.listOrder";
16
+ readonly publicBalances: "$.balances.publicByOwnerAsset";
17
+ readonly poolsByContract: "$.pools.byContract";
18
+ readonly poolsLeafEphemeral: "$.pools.leafEphemeralByContractAndIndex";
19
+ readonly deliveriesIncomingById: "$.deliveries.incomingById";
20
+ readonly deliveriesSync: "$.deliveries.syncByPrivateAddressAsset";
21
+ readonly transactionsByHash: "$.transactions.byHash";
22
+ readonly walletPrivateAddressScalars: "$.wallet.privateAddressScalars";
23
+ readonly walletPrivateAddressRecords: "$.wallet.privateAddressRecords";
24
+ readonly walletDefaultPrivateAddressNonce: "$.wallet.defaultPrivateAddressNonce";
25
+ };
26
+
27
+ type StellarAddress = string;
28
+ type StellarAssetId = string;
29
+
30
+ interface StellarStorageAdapter {
31
+ listPrivateRecords(filter: {
32
+ owner?: StellarAddress;
33
+ privateAddress?: string;
34
+ asset?: StellarAssetId;
35
+ amount?: bigint;
36
+ }): Promise<StellarPrivateRecord[]>;
37
+ savePrivateRecords(records: StellarPrivateRecord[]): Promise<void>;
38
+ markPrivateRecordsUsed(records: StellarPrivateRecord[]): Promise<void>;
39
+ }
40
+
41
+ type StellarPrivateRecordStatus = 'pending' | 'finalized' | 'spent';
42
+ interface StellarPrivateCoinNote {
43
+ value: string;
44
+ nullifier: string;
45
+ secret: string;
46
+ commitment: string;
47
+ asset_hi: string;
48
+ asset_lo: string;
49
+ application_id?: string;
50
+ }
51
+ type StellarRegistryStatus = 'registered' | 'unregistered';
52
+ type StellarTrustlineStatus = 'active' | 'inactive' | 'none';
53
+ type StellarTransactionConfirmationStatus = 'pending' | 'success' | 'failed';
54
+ interface StellarAsset {
55
+ id: number;
56
+ assetId: StellarAssetId;
57
+ name: string;
58
+ logoUrl: string | null;
59
+ issuerAddress: string | null;
60
+ clientContract: string | null;
61
+ poolContracts: string[];
62
+ poolContract: string;
63
+ mintable: boolean;
64
+ mintAmount: string | null;
65
+ decimals?: number | null;
66
+ }
67
+ interface StellarAssetsCatalog {
68
+ byId: Record<StellarAssetId, StellarAsset>;
69
+ listOrder: StellarAssetId[];
70
+ }
71
+ interface StellarPublicBalance {
72
+ owner: StellarAddress;
73
+ asset: StellarAssetId;
74
+ balance: string;
75
+ trustlineStatus: StellarTrustlineStatus;
76
+ }
77
+ interface StellarRegistryLookup {
78
+ owner: StellarAddress;
79
+ status: StellarRegistryStatus;
80
+ privateAddressStpl1?: string;
81
+ publicKeyXHex?: string;
82
+ publicKeyYHex?: string;
83
+ updatedAtLedger?: number;
84
+ cachedAt?: string;
85
+ }
86
+ interface StellarWalletPrivateAddressScalar {
87
+ owner: StellarAddress;
88
+ nonce: string;
89
+ scalarHex: string;
90
+ updatedAt?: string;
91
+ }
92
+ interface StellarWalletPrivateAddressRecord {
93
+ owner: StellarAddress;
94
+ nonce: string;
95
+ privateAddress: string;
96
+ createdAt: number;
97
+ }
98
+ interface StellarPoolMerkleState {
99
+ poolContract: string;
100
+ commitments: string[];
101
+ commitmentCount: number;
102
+ merkleRootHex: string;
103
+ updatedAt: number;
104
+ syncedLedger?: number;
105
+ }
106
+ interface StellarLeafEphemeral {
107
+ poolContract: string;
108
+ leafIndex: number;
109
+ xHex: string;
110
+ yHex: string;
111
+ cachedAt?: string;
112
+ }
113
+ interface StellarPendingClaim {
114
+ id: string;
115
+ owner: StellarAddress;
116
+ asset: StellarAssetId;
117
+ amount: bigint;
118
+ createdAt: string;
119
+ poolTxId?: string;
120
+ commitmentHex?: string;
121
+ nullifierHex?: string;
122
+ futureNullifierHashHex?: string;
123
+ assetHiHex?: string;
124
+ assetLoHex?: string;
125
+ nullifierFieldHex?: string;
126
+ secretHex?: string;
127
+ tempPublicKeyXHex?: string;
128
+ tempPublicKeyYHex?: string;
129
+ encryptedRecoveryBase64?: string;
130
+ createdAtLedger?: number;
131
+ }
132
+ interface StellarPendingClaimsPagination {
133
+ total: number;
134
+ page: number;
135
+ pageSize: number;
136
+ hasMore: boolean;
137
+ }
138
+ interface StellarPendingClaimsState {
139
+ items: StellarPendingClaim[];
140
+ pagination?: StellarPendingClaimsPagination;
141
+ }
142
+ interface StellarIncomingDelivery {
143
+ id: number;
144
+ privateAddress: string;
145
+ asset: StellarAssetId;
146
+ ciphertextBase64: string;
147
+ ephemeralKey: string;
148
+ tagBase64: string;
149
+ createdAt: string;
150
+ processed?: boolean;
151
+ }
152
+ interface StellarDeliverySyncState {
153
+ privateAddress: string;
154
+ asset: StellarAssetId;
155
+ bloomM: number;
156
+ bloomK: number;
157
+ bloomBitsBase64?: string;
158
+ lastPage?: number;
159
+ lastPolledAt?: string;
160
+ }
161
+ interface StellarPrivateRecord {
162
+ id: string;
163
+ owner: StellarAddress;
164
+ asset: StellarAssetId;
165
+ amount: bigint;
166
+ consumed: boolean;
167
+ status?: StellarPrivateRecordStatus;
168
+ poolContract?: string;
169
+ commitmentHex?: string;
170
+ nullifierHex?: string;
171
+ amountDisplay?: number;
172
+ deliveryId?: number;
173
+ privateAddress?: string;
174
+ txHash?: string;
175
+ coinNote?: StellarPrivateCoinNote;
176
+ depositScalarHex?: string;
177
+ precommitementHex?: string;
178
+ }
179
+ interface StellarPrivateAssetRow {
180
+ assetId: StellarAssetId;
181
+ poolContract: string;
182
+ totalAmount: bigint;
183
+ totalAmountDisplay: number;
184
+ }
185
+ interface StellarTransactionStatus {
186
+ txHash: string;
187
+ status: StellarTransactionConfirmationStatus;
188
+ ledger?: number;
189
+ createdAt?: string;
190
+ }
191
+ interface StellarAvailablePrivateRecordsFilter {
192
+ owner?: StellarAddress;
193
+ privateAddress?: string;
194
+ asset?: StellarAssetId;
195
+ }
196
+ interface StellarPendingClaimsFilter {
197
+ owner?: StellarAddress;
198
+ asset?: StellarAssetId;
199
+ }
200
+ interface StellarIncomingDeliveriesFilter {
201
+ privateAddress: string;
202
+ asset?: StellarAssetId;
203
+ includeProcessed?: boolean;
204
+ }
205
+
206
+ declare function readPrivateRecordsFromStateSnapshot(state: unknown): StellarPrivateRecord[];
207
+ declare function readWalletPrivateAddressScalarFromStateSnapshot(input: {
208
+ state: unknown;
209
+ owner: string;
210
+ nonce: string;
211
+ }): StellarWalletPrivateAddressScalar | undefined;
212
+ declare function readWalletPrivateAddressRecordFromStateSnapshot(input: {
213
+ state: unknown;
214
+ owner: string;
215
+ nonce: string;
216
+ }): StellarWalletPrivateAddressRecord | undefined;
217
+ declare function readWalletDefaultPrivateAddressNonceFromStateSnapshot(input: {
218
+ state: unknown;
219
+ owner: string;
220
+ }): string | undefined;
221
+ declare function listWalletPrivateAddressScalarsForOwnerFromStateSnapshot(input: {
222
+ state: unknown;
223
+ owner: string;
224
+ }): StellarWalletPrivateAddressScalar[];
225
+ declare function listWalletPrivateAddressRecordsForOwnerFromStateSnapshot(input: {
226
+ state: unknown;
227
+ owner: string;
228
+ }): StellarWalletPrivateAddressRecord[];
229
+
230
+ declare const pendingClaimSchema: z.ZodObject<{
231
+ id: z.ZodString;
232
+ owner: z.ZodString;
233
+ asset: z.ZodString;
234
+ amount: z.ZodBigInt;
235
+ createdAt: z.ZodString;
236
+ poolTxId: z.ZodOptional<z.ZodString>;
237
+ commitmentHex: z.ZodOptional<z.ZodString>;
238
+ nullifierHex: z.ZodOptional<z.ZodString>;
239
+ futureNullifierHashHex: z.ZodOptional<z.ZodString>;
240
+ assetHiHex: z.ZodOptional<z.ZodString>;
241
+ assetLoHex: z.ZodOptional<z.ZodString>;
242
+ nullifierFieldHex: z.ZodOptional<z.ZodString>;
243
+ secretHex: z.ZodOptional<z.ZodString>;
244
+ tempPublicKeyXHex: z.ZodOptional<z.ZodString>;
245
+ tempPublicKeyYHex: z.ZodOptional<z.ZodString>;
246
+ encryptedRecoveryBase64: z.ZodOptional<z.ZodString>;
247
+ createdAtLedger: z.ZodOptional<z.ZodNumber>;
248
+ }, "strip", z.ZodTypeAny, {
249
+ id: string;
250
+ owner: string;
251
+ asset: string;
252
+ amount: bigint;
253
+ createdAt: string;
254
+ poolTxId?: string | undefined;
255
+ commitmentHex?: string | undefined;
256
+ nullifierHex?: string | undefined;
257
+ futureNullifierHashHex?: string | undefined;
258
+ assetHiHex?: string | undefined;
259
+ assetLoHex?: string | undefined;
260
+ nullifierFieldHex?: string | undefined;
261
+ secretHex?: string | undefined;
262
+ tempPublicKeyXHex?: string | undefined;
263
+ tempPublicKeyYHex?: string | undefined;
264
+ encryptedRecoveryBase64?: string | undefined;
265
+ createdAtLedger?: number | undefined;
266
+ }, {
267
+ id: string;
268
+ owner: string;
269
+ asset: string;
270
+ amount: bigint;
271
+ createdAt: string;
272
+ poolTxId?: string | undefined;
273
+ commitmentHex?: string | undefined;
274
+ nullifierHex?: string | undefined;
275
+ futureNullifierHashHex?: string | undefined;
276
+ assetHiHex?: string | undefined;
277
+ assetLoHex?: string | undefined;
278
+ nullifierFieldHex?: string | undefined;
279
+ secretHex?: string | undefined;
280
+ tempPublicKeyXHex?: string | undefined;
281
+ tempPublicKeyYHex?: string | undefined;
282
+ encryptedRecoveryBase64?: string | undefined;
283
+ createdAtLedger?: number | undefined;
284
+ }>;
285
+ declare const paginationSchema: z.ZodObject<{
286
+ total: z.ZodNumber;
287
+ page: z.ZodNumber;
288
+ pageSize: z.ZodNumber;
289
+ hasMore: z.ZodBoolean;
290
+ }, "strip", z.ZodTypeAny, {
291
+ total: number;
292
+ page: number;
293
+ pageSize: number;
294
+ hasMore: boolean;
295
+ }, {
296
+ total: number;
297
+ page: number;
298
+ pageSize: number;
299
+ hasMore: boolean;
300
+ }>;
301
+ declare const privateRecordSchema: z.ZodObject<{
302
+ id: z.ZodString;
303
+ owner: z.ZodString;
304
+ asset: z.ZodString;
305
+ amount: z.ZodBigInt;
306
+ consumed: z.ZodBoolean;
307
+ status: z.ZodOptional<z.ZodEnum<["pending", "finalized", "spent"]>>;
308
+ poolContract: z.ZodOptional<z.ZodString>;
309
+ commitmentHex: z.ZodOptional<z.ZodString>;
310
+ nullifierHex: z.ZodOptional<z.ZodString>;
311
+ amountDisplay: z.ZodOptional<z.ZodNumber>;
312
+ deliveryId: z.ZodOptional<z.ZodNumber>;
313
+ privateAddress: z.ZodOptional<z.ZodString>;
314
+ txHash: z.ZodOptional<z.ZodString>;
315
+ coinNote: z.ZodOptional<z.ZodObject<{
316
+ value: z.ZodString;
317
+ nullifier: z.ZodString;
318
+ secret: z.ZodString;
319
+ commitment: z.ZodString;
320
+ asset_hi: z.ZodString;
321
+ asset_lo: z.ZodString;
322
+ application_id: z.ZodOptional<z.ZodString>;
323
+ }, "strip", z.ZodTypeAny, {
324
+ value: string;
325
+ nullifier: string;
326
+ secret: string;
327
+ commitment: string;
328
+ asset_hi: string;
329
+ asset_lo: string;
330
+ application_id?: string | undefined;
331
+ }, {
332
+ value: string;
333
+ nullifier: string;
334
+ secret: string;
335
+ commitment: string;
336
+ asset_hi: string;
337
+ asset_lo: string;
338
+ application_id?: string | undefined;
339
+ }>>;
340
+ depositScalarHex: z.ZodOptional<z.ZodString>;
341
+ precommitementHex: z.ZodOptional<z.ZodString>;
342
+ }, "strip", z.ZodTypeAny, {
343
+ id: string;
344
+ owner: string;
345
+ asset: string;
346
+ amount: bigint;
347
+ consumed: boolean;
348
+ privateAddress?: string | undefined;
349
+ commitmentHex?: string | undefined;
350
+ nullifierHex?: string | undefined;
351
+ status?: "pending" | "finalized" | "spent" | undefined;
352
+ poolContract?: string | undefined;
353
+ amountDisplay?: number | undefined;
354
+ deliveryId?: number | undefined;
355
+ txHash?: string | undefined;
356
+ coinNote?: {
357
+ value: string;
358
+ nullifier: string;
359
+ secret: string;
360
+ commitment: string;
361
+ asset_hi: string;
362
+ asset_lo: string;
363
+ application_id?: string | undefined;
364
+ } | undefined;
365
+ depositScalarHex?: string | undefined;
366
+ precommitementHex?: string | undefined;
367
+ }, {
368
+ id: string;
369
+ owner: string;
370
+ asset: string;
371
+ amount: bigint;
372
+ consumed: boolean;
373
+ privateAddress?: string | undefined;
374
+ commitmentHex?: string | undefined;
375
+ nullifierHex?: string | undefined;
376
+ status?: "pending" | "finalized" | "spent" | undefined;
377
+ poolContract?: string | undefined;
378
+ amountDisplay?: number | undefined;
379
+ deliveryId?: number | undefined;
380
+ txHash?: string | undefined;
381
+ coinNote?: {
382
+ value: string;
383
+ nullifier: string;
384
+ secret: string;
385
+ commitment: string;
386
+ asset_hi: string;
387
+ asset_lo: string;
388
+ application_id?: string | undefined;
389
+ } | undefined;
390
+ depositScalarHex?: string | undefined;
391
+ precommitementHex?: string | undefined;
392
+ }>;
393
+ declare const assetSchema: z.ZodObject<{
394
+ id: z.ZodNumber;
395
+ assetId: z.ZodString;
396
+ name: z.ZodString;
397
+ logoUrl: z.ZodNullable<z.ZodString>;
398
+ issuerAddress: z.ZodNullable<z.ZodString>;
399
+ clientContract: z.ZodNullable<z.ZodString>;
400
+ poolContracts: z.ZodArray<z.ZodString, "many">;
401
+ poolContract: z.ZodString;
402
+ mintable: z.ZodBoolean;
403
+ mintAmount: z.ZodNullable<z.ZodString>;
404
+ decimals: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
405
+ }, "strip", z.ZodTypeAny, {
406
+ id: number;
407
+ poolContract: string;
408
+ assetId: string;
409
+ name: string;
410
+ logoUrl: string | null;
411
+ issuerAddress: string | null;
412
+ clientContract: string | null;
413
+ poolContracts: string[];
414
+ mintable: boolean;
415
+ mintAmount: string | null;
416
+ decimals?: number | null | undefined;
417
+ }, {
418
+ id: number;
419
+ poolContract: string;
420
+ assetId: string;
421
+ name: string;
422
+ logoUrl: string | null;
423
+ issuerAddress: string | null;
424
+ clientContract: string | null;
425
+ poolContracts: string[];
426
+ mintable: boolean;
427
+ mintAmount: string | null;
428
+ decimals?: number | null | undefined;
429
+ }>;
430
+ declare const publicBalanceSchema: z.ZodObject<{
431
+ owner: z.ZodString;
432
+ asset: z.ZodString;
433
+ balance: z.ZodString;
434
+ trustlineStatus: z.ZodEnum<["active", "inactive", "none"]>;
435
+ }, "strip", z.ZodTypeAny, {
436
+ owner: string;
437
+ asset: string;
438
+ balance: string;
439
+ trustlineStatus: "active" | "inactive" | "none";
440
+ }, {
441
+ owner: string;
442
+ asset: string;
443
+ balance: string;
444
+ trustlineStatus: "active" | "inactive" | "none";
445
+ }>;
446
+ declare const registryLookupSchema: z.ZodObject<{
447
+ owner: z.ZodString;
448
+ status: z.ZodEnum<["registered", "unregistered"]>;
449
+ privateAddressStpl1: z.ZodOptional<z.ZodString>;
450
+ publicKeyXHex: z.ZodOptional<z.ZodString>;
451
+ publicKeyYHex: z.ZodOptional<z.ZodString>;
452
+ updatedAtLedger: z.ZodOptional<z.ZodNumber>;
453
+ cachedAt: z.ZodOptional<z.ZodString>;
454
+ }, "strip", z.ZodTypeAny, {
455
+ owner: string;
456
+ status: "registered" | "unregistered";
457
+ privateAddressStpl1?: string | undefined;
458
+ publicKeyXHex?: string | undefined;
459
+ publicKeyYHex?: string | undefined;
460
+ updatedAtLedger?: number | undefined;
461
+ cachedAt?: string | undefined;
462
+ }, {
463
+ owner: string;
464
+ status: "registered" | "unregistered";
465
+ privateAddressStpl1?: string | undefined;
466
+ publicKeyXHex?: string | undefined;
467
+ publicKeyYHex?: string | undefined;
468
+ updatedAtLedger?: number | undefined;
469
+ cachedAt?: string | undefined;
470
+ }>;
471
+ declare const poolMerkleStateSchema: z.ZodObject<{
472
+ poolContract: z.ZodString;
473
+ commitments: z.ZodArray<z.ZodString, "many">;
474
+ commitmentCount: z.ZodNumber;
475
+ merkleRootHex: z.ZodString;
476
+ updatedAt: z.ZodNumber;
477
+ syncedLedger: z.ZodOptional<z.ZodNumber>;
478
+ }, "strip", z.ZodTypeAny, {
479
+ poolContract: string;
480
+ updatedAt: number;
481
+ commitments: string[];
482
+ commitmentCount: number;
483
+ merkleRootHex: string;
484
+ syncedLedger?: number | undefined;
485
+ }, {
486
+ poolContract: string;
487
+ updatedAt: number;
488
+ commitments: string[];
489
+ commitmentCount: number;
490
+ merkleRootHex: string;
491
+ syncedLedger?: number | undefined;
492
+ }>;
493
+ declare const leafEphemeralSchema: z.ZodObject<{
494
+ poolContract: z.ZodString;
495
+ leafIndex: z.ZodNumber;
496
+ xHex: z.ZodString;
497
+ yHex: z.ZodString;
498
+ cachedAt: z.ZodOptional<z.ZodString>;
499
+ }, "strip", z.ZodTypeAny, {
500
+ poolContract: string;
501
+ leafIndex: number;
502
+ xHex: string;
503
+ yHex: string;
504
+ cachedAt?: string | undefined;
505
+ }, {
506
+ poolContract: string;
507
+ leafIndex: number;
508
+ xHex: string;
509
+ yHex: string;
510
+ cachedAt?: string | undefined;
511
+ }>;
512
+ declare const incomingDeliverySchema: z.ZodObject<{
513
+ id: z.ZodNumber;
514
+ privateAddress: z.ZodString;
515
+ asset: z.ZodString;
516
+ ciphertextBase64: z.ZodString;
517
+ ephemeralKey: z.ZodString;
518
+ tagBase64: z.ZodString;
519
+ createdAt: z.ZodString;
520
+ processed: z.ZodOptional<z.ZodBoolean>;
521
+ }, "strip", z.ZodTypeAny, {
522
+ privateAddress: string;
523
+ id: number;
524
+ asset: string;
525
+ createdAt: string;
526
+ ciphertextBase64: string;
527
+ ephemeralKey: string;
528
+ tagBase64: string;
529
+ processed?: boolean | undefined;
530
+ }, {
531
+ privateAddress: string;
532
+ id: number;
533
+ asset: string;
534
+ createdAt: string;
535
+ ciphertextBase64: string;
536
+ ephemeralKey: string;
537
+ tagBase64: string;
538
+ processed?: boolean | undefined;
539
+ }>;
540
+ declare const deliverySyncStateSchema: z.ZodObject<{
541
+ privateAddress: z.ZodString;
542
+ asset: z.ZodString;
543
+ bloomM: z.ZodNumber;
544
+ bloomK: z.ZodNumber;
545
+ bloomBitsBase64: z.ZodOptional<z.ZodString>;
546
+ lastPage: z.ZodOptional<z.ZodNumber>;
547
+ lastPolledAt: z.ZodOptional<z.ZodString>;
548
+ }, "strip", z.ZodTypeAny, {
549
+ privateAddress: string;
550
+ asset: string;
551
+ bloomM: number;
552
+ bloomK: number;
553
+ bloomBitsBase64?: string | undefined;
554
+ lastPage?: number | undefined;
555
+ lastPolledAt?: string | undefined;
556
+ }, {
557
+ privateAddress: string;
558
+ asset: string;
559
+ bloomM: number;
560
+ bloomK: number;
561
+ bloomBitsBase64?: string | undefined;
562
+ lastPage?: number | undefined;
563
+ lastPolledAt?: string | undefined;
564
+ }>;
565
+ declare const transactionStatusSchema: z.ZodObject<{
566
+ txHash: z.ZodString;
567
+ status: z.ZodEnum<["pending", "success", "failed"]>;
568
+ ledger: z.ZodOptional<z.ZodNumber>;
569
+ createdAt: z.ZodOptional<z.ZodString>;
570
+ }, "strip", z.ZodTypeAny, {
571
+ status: "pending" | "success" | "failed";
572
+ txHash: string;
573
+ createdAt?: string | undefined;
574
+ ledger?: number | undefined;
575
+ }, {
576
+ status: "pending" | "success" | "failed";
577
+ txHash: string;
578
+ createdAt?: string | undefined;
579
+ ledger?: number | undefined;
580
+ }>;
581
+
582
+ declare const stellarStateDefinitions: StateBridgeDefinition[];
583
+
584
+ declare const stellarStateCallTypes: {
585
+ readonly pendingClaims: "pendingClaims";
586
+ readonly clearPendingClaims: "clearPendingClaims";
587
+ readonly readPendingClaims: "readPendingClaims";
588
+ readonly replacePendingClaimsPage: "replacePendingClaimsPage";
589
+ readonly upsertPendingClaims: "upsertPendingClaims";
590
+ readonly removePendingClaims: "removePendingClaims";
591
+ readonly setPendingClaimsCount: "setPendingClaimsCount";
592
+ readonly readPendingClaimsCount: "readPendingClaimsCount";
593
+ readonly readStellarAddressRegistered: "readStellarAddressRegistered";
594
+ readonly readCachedPrivateAddress: "readCachedPrivateAddress";
595
+ readonly readRegistryLookup: "readRegistryLookup";
596
+ readonly saveRegisteredPrivateAddress: "saveRegisteredPrivateAddress";
597
+ readonly saveRegistryLookup: "saveRegistryLookup";
598
+ readonly invalidateRegisteredAddress: "invalidateRegisteredAddress";
599
+ readonly invalidateRegistryLookup: "invalidateRegistryLookup";
600
+ readonly readAssetsCatalog: "readAssetsCatalog";
601
+ readonly readAsset: "readAsset";
602
+ readonly replaceAssets: "replaceAssets";
603
+ readonly upsertAssets: "upsertAssets";
604
+ readonly readPublicBalance: "readPublicBalance";
605
+ readonly readPublicBalances: "readPublicBalances";
606
+ readonly setPublicBalance: "setPublicBalance";
607
+ readonly setPublicBalances: "setPublicBalances";
608
+ readonly readPoolMerkleState: "readPoolMerkleState";
609
+ readonly setPoolMerkleState: "setPoolMerkleState";
610
+ readonly readLeafEphemeral: "readLeafEphemeral";
611
+ readonly setLeafEphemeral: "setLeafEphemeral";
612
+ readonly listPrivateRecords: "listPrivateRecords";
613
+ readonly savePrivateRecords: "savePrivateRecords";
614
+ readonly replacePrivateRecords: "replacePrivateRecords";
615
+ readonly upsertPrivateRecords: "upsertPrivateRecords";
616
+ readonly pruneConsumedPrivateRecords: "pruneConsumedPrivateRecords";
617
+ readonly readIncomingDeliveries: "readIncomingDeliveries";
618
+ readonly upsertIncomingDeliveries: "upsertIncomingDeliveries";
619
+ readonly readDeliverySyncState: "readDeliverySyncState";
620
+ readonly setDeliverySyncState: "setDeliverySyncState";
621
+ readonly readTransactionStatus: "readTransactionStatus";
622
+ readonly setTransactionStatus: "setTransactionStatus";
623
+ readonly clearTransactionStatus: "clearTransactionStatus";
624
+ readonly saveWalletPrivateAddressScalar: "saveWalletPrivateAddressScalar";
625
+ readonly readWalletPrivateAddressScalar: "readWalletPrivateAddressScalar";
626
+ readonly saveWalletPrivateAddressRecord: "saveWalletPrivateAddressRecord";
627
+ readonly readWalletPrivateAddressRecord: "readWalletPrivateAddressRecord";
628
+ readonly setWalletDefaultPrivateAddressNonce: "setWalletDefaultPrivateAddressNonce";
629
+ readonly readWalletDefaultPrivateAddressNonce: "readWalletDefaultPrivateAddressNonce";
630
+ readonly deleteWalletPrivateAddressScalar: "deleteWalletPrivateAddressScalar";
631
+ };
632
+ type StellarStateDefinition = StateBridgeDefinition;
633
+ interface StellarPublicBalanceInput {
634
+ owner: StellarAddress;
635
+ asset: StellarAssetId;
636
+ balance: string;
637
+ trustlineStatus: 'active' | 'inactive' | 'none';
638
+ }
639
+
640
+ declare function composeStellarStateService(adapter: StateBridgeAdapter): {
641
+ getTransactionStatus(txHash: string): Promise<StellarTransactionStatus | undefined>;
642
+ setTransactionStatus(status: StellarTransactionStatus): Promise<void>;
643
+ clearTransactionStatus(txHash: string): Promise<void>;
644
+ pruneConsumedPrivateRecords: () => Promise<void>;
645
+ getPrivateRecords: () => Promise<StellarPrivateRecord[]>;
646
+ getAvailablePrivateRecords: (filter: StellarAvailablePrivateRecordsFilter) => Promise<StellarPrivateRecord[]>;
647
+ listPrivateRecords: (filter: {
648
+ owner?: StellarAddress;
649
+ privateAddress?: string;
650
+ asset?: StellarAssetId;
651
+ amount?: bigint;
652
+ }) => Promise<StellarPrivateRecord[]>;
653
+ savePrivateRecords: (records: StellarPrivateRecord[]) => Promise<void>;
654
+ upsertPrivateRecords: (records: StellarPrivateRecord[]) => Promise<void>;
655
+ markPrivateRecordsUsed: (records: StellarPrivateRecord[]) => Promise<void>;
656
+ markPrivateRecordsStatus: (records: StellarPrivateRecord[], status: StellarPrivateRecordStatus) => Promise<void>;
657
+ getPrivateBalance: (input: {
658
+ owner: StellarAddress;
659
+ asset: StellarAssetId;
660
+ }) => Promise<bigint>;
661
+ getPrivateAssetRows: (owner: StellarAddress) => Promise<StellarPrivateAssetRow[]>;
662
+ getDeliverySyncState(input: {
663
+ privateAddress: string;
664
+ asset: StellarAssetId;
665
+ }): Promise<StellarDeliverySyncState | undefined>;
666
+ setDeliverySyncState(syncState: StellarDeliverySyncState): Promise<void>;
667
+ getIncomingDeliveries: (filter: StellarIncomingDeliveriesFilter) => Promise<StellarIncomingDelivery[]>;
668
+ upsertIncomingDeliveries: (deliveries: StellarIncomingDelivery[]) => Promise<void>;
669
+ markDeliveryProcessed(id: number): Promise<void>;
670
+ getPendingClaims: (filter?: StellarPendingClaimsFilter) => Promise<StellarPendingClaimsState>;
671
+ getPendingClaimsCount(owner: StellarAddress): Promise<number | undefined>;
672
+ appendPendingClaims: (claims: StellarPendingClaim[], paginationInfo: StellarPendingClaimsPagination) => Promise<void>;
673
+ replacePendingClaimsPage: (input: {
674
+ owner: StellarAddress;
675
+ claims: StellarPendingClaim[];
676
+ paginationInfo: StellarPendingClaimsPagination;
677
+ count?: number;
678
+ }) => Promise<void>;
679
+ upsertPendingClaims: (claims: StellarPendingClaim[]) => Promise<void>;
680
+ removePendingClaims: (ids: string[]) => Promise<void>;
681
+ clearPendingClaims: (input?: {
682
+ owner?: StellarAddress;
683
+ asset?: StellarAssetId;
684
+ }) => Promise<void>;
685
+ setPendingClaimsCount: (owner: StellarAddress, count: number) => Promise<void>;
686
+ getLeafEphemeral(input: {
687
+ poolContract: string;
688
+ leafIndex: number;
689
+ }): Promise<StellarLeafEphemeral | undefined>;
690
+ setLeafEphemeral(ephemeral: StellarLeafEphemeral): Promise<void>;
691
+ getPoolMerkleState(poolContract: string): Promise<StellarPoolMerkleState | undefined>;
692
+ setPoolMerkleState(state: StellarPoolMerkleState): Promise<void>;
693
+ appendPoolCommitments(input: {
694
+ poolContract: string;
695
+ commitments: string[];
696
+ merkleRootHex: string;
697
+ syncedLedger?: number;
698
+ }): Promise<void>;
699
+ getWalletPrivateAddressRecord(input: {
700
+ owner: StellarAddress;
701
+ nonce: string;
702
+ }): Promise<StellarWalletPrivateAddressRecord | undefined>;
703
+ saveWalletPrivateAddressRecord(record: StellarWalletPrivateAddressRecord): Promise<void>;
704
+ getWalletDefaultPrivateAddressNonce(owner: StellarAddress): Promise<string | undefined>;
705
+ setWalletDefaultPrivateAddressNonce(input: {
706
+ owner: StellarAddress;
707
+ nonce: string;
708
+ }): Promise<void>;
709
+ getWalletPrivateAddressScalar(input: {
710
+ owner: StellarAddress;
711
+ nonce: string;
712
+ }): Promise<StellarWalletPrivateAddressScalar | undefined>;
713
+ saveWalletPrivateAddressScalar(scalar: StellarWalletPrivateAddressScalar): Promise<void>;
714
+ deleteWalletPrivateAddressScalar(input: {
715
+ owner: StellarAddress;
716
+ nonce: string;
717
+ }): Promise<void>;
718
+ saveRegistryLookup(lookup: StellarRegistryLookup): Promise<void>;
719
+ saveRegisteredPrivateAddress(input: {
720
+ address: StellarAddress;
721
+ privateAddress: string;
722
+ registered: boolean;
723
+ }): Promise<void>;
724
+ invalidateRegistryLookup: (address: StellarAddress) => Promise<void>;
725
+ invalidateRegisteredAddress(address: StellarAddress): Promise<void>;
726
+ getRegistryLookup: (address: StellarAddress) => Promise<StellarRegistryLookup | undefined>;
727
+ isStellarAddressRegistered(address: StellarAddress): Promise<boolean | undefined>;
728
+ getCachedPrivateAddress: (address: StellarAddress) => Promise<string | undefined>;
729
+ getPublicBalance(input: {
730
+ owner: StellarAddress;
731
+ asset: StellarAssetId;
732
+ }): Promise<StellarPublicBalance | undefined>;
733
+ getPublicBalances(owner: StellarAddress): Promise<StellarPublicBalance[]>;
734
+ setPublicBalance(balance: StellarPublicBalanceInput): Promise<void>;
735
+ setPublicBalances(input: {
736
+ owner: StellarAddress;
737
+ balances: StellarPublicBalanceInput[];
738
+ }): Promise<void>;
739
+ upsertAssets(assets: StellarAsset[]): Promise<void>;
740
+ getAssetsCatalog: () => Promise<StellarAssetsCatalog>;
741
+ getAsset(assetId: StellarAssetId): Promise<StellarAsset | undefined>;
742
+ getAssets(): Promise<StellarAsset[]>;
743
+ getAssetsForPool(poolContract: string): Promise<StellarAsset[]>;
744
+ replaceAssets: (assets: StellarAsset[]) => Promise<void>;
745
+ bridge: _arcanetech_privacy_sdk_core_state.StateBridge;
746
+ };
747
+ type ComposedStellarStateService = ReturnType<typeof composeStellarStateService>;
748
+
749
+ type StellarStateService = ComposedStellarStateService;
750
+ declare function createStellarStateService(adapter: StateBridgeAdapter): StellarStateService;
751
+ declare function createStellarStorageAdapterFromState(state: StellarStateService): StellarStorageAdapter;
752
+
753
+ export { STELLAR_STATE_PATHS, type StellarAsset, type StellarAssetsCatalog, type StellarAvailablePrivateRecordsFilter, type StellarDeliverySyncState, type StellarIncomingDeliveriesFilter, type StellarIncomingDelivery, type StellarLeafEphemeral, type StellarPendingClaim, type StellarPendingClaimsFilter, type StellarPendingClaimsPagination, type StellarPendingClaimsState, type StellarPoolMerkleState, type StellarPrivateAssetRow, type StellarPrivateRecordStatus, type StellarPublicBalance, type StellarPublicBalanceInput, type StellarRegistryLookup, type StellarStateDefinition, type StellarStateService, type StellarTransactionStatus, assetSchema, createStellarStateService, createStellarStorageAdapterFromState, deliverySyncStateSchema, incomingDeliverySchema, leafEphemeralSchema, listWalletPrivateAddressRecordsForOwnerFromStateSnapshot, listWalletPrivateAddressScalarsForOwnerFromStateSnapshot, paginationSchema, pendingClaimSchema, poolMerkleStateSchema, privateRecordSchema, publicBalanceSchema, readPrivateRecordsFromStateSnapshot, readWalletDefaultPrivateAddressNonceFromStateSnapshot, readWalletPrivateAddressRecordFromStateSnapshot, readWalletPrivateAddressScalarFromStateSnapshot, registryLookupSchema, stellarStateCallTypes, stellarStateDefinitions, transactionStatusSchema };