@hazbase/simplicity 0.1.1 → 0.2.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.
Files changed (39) hide show
  1. package/README.md +143 -1531
  2. package/dist/cli.js +1128 -1
  3. package/dist/client/SimplicityClient.d.ts +30 -3
  4. package/dist/client/SimplicityClient.js +28 -0
  5. package/dist/core/lineage.d.ts +18 -0
  6. package/dist/core/lineage.js +30 -0
  7. package/dist/core/reporting.d.ts +22 -0
  8. package/dist/core/reporting.js +40 -0
  9. package/dist/core/schnorr.d.ts +3 -3
  10. package/dist/core/schnorr.js +19 -7
  11. package/dist/core/types.d.ts +256 -5
  12. package/dist/docs/definitions/fund-capital-call-refund-only.simf +36 -2
  13. package/dist/docs/definitions/receivable-definition.json +10 -0
  14. package/dist/docs/definitions/receivable-funding-claim.json +13 -0
  15. package/dist/docs/definitions/receivable-funding-claim.simf +58 -0
  16. package/dist/docs/definitions/receivable-repayment-claim-partial.json +13 -0
  17. package/dist/docs/definitions/receivable-repayment-claim.json +13 -0
  18. package/dist/docs/definitions/receivable-repayment-claim.simf +59 -0
  19. package/dist/docs/definitions/receivable-state-funded.json +21 -0
  20. package/dist/docs/definitions/receivable-state-originated.json +20 -0
  21. package/dist/docs/definitions/receivable-state-partially-repaid.json +21 -0
  22. package/dist/docs/definitions/receivable-state-repaid.json +21 -0
  23. package/dist/domain/bond.d.ts +82 -15
  24. package/dist/domain/bond.js +159 -10
  25. package/dist/domain/bondValidation.d.ts +31 -1
  26. package/dist/domain/bondValidation.js +73 -9
  27. package/dist/domain/fund.d.ts +451 -68
  28. package/dist/domain/fund.js +460 -88
  29. package/dist/domain/fundValidation.d.ts +33 -3
  30. package/dist/domain/fundValidation.js +137 -5
  31. package/dist/domain/policies.d.ts +13 -0
  32. package/dist/domain/policies.js +50 -30
  33. package/dist/domain/receivable.d.ts +825 -0
  34. package/dist/domain/receivable.js +1385 -0
  35. package/dist/domain/receivableValidation.d.ts +150 -0
  36. package/dist/domain/receivableValidation.js +874 -0
  37. package/dist/index.d.ts +5 -3
  38. package/dist/index.js +55 -3
  39. package/package.json +6 -1
@@ -0,0 +1,825 @@
1
+ import type { SimplicityClient } from "../client/SimplicityClient";
2
+ import type { BondOutputBindingMode, OutputAmountForm, OutputAssetForm, OutputNonceForm, OutputRawFields, OutputRangeProofForm, ReceivableClosingDescriptor, ReceivableDefinition, ReceivableEvidenceBundle, ReceivableFinalityPayload, ReceivableFundingClaimDescriptor, ReceivableRepaymentClaimDescriptor, ReceivableState, ReceivableVerificationReport, SimplicityArtifact } from "../core/types";
3
+ type ReceivablePayoutDescriptor = {
4
+ receiverAddress: string;
5
+ nextOutputHash?: string;
6
+ nextOutputScriptHash?: string;
7
+ amountSat: number;
8
+ assetId: string;
9
+ requestedOutputBindingMode?: BondOutputBindingMode;
10
+ outputForm?: {
11
+ assetForm?: OutputAssetForm;
12
+ amountForm?: OutputAmountForm;
13
+ nonceForm?: OutputNonceForm;
14
+ rangeProofForm?: OutputRangeProofForm;
15
+ };
16
+ rawOutput?: Partial<OutputRawFields>;
17
+ feeIndex: number;
18
+ nextOutputIndex: number;
19
+ maxFeeSat: number;
20
+ outputBindingMode: BondOutputBindingMode;
21
+ };
22
+ export declare function define(sdk: SimplicityClient, input: {
23
+ definitionPath?: string;
24
+ definitionValue?: ReceivableDefinition;
25
+ }): Promise<{
26
+ ok: boolean;
27
+ definition: import("../core/types").DefinitionDescriptor;
28
+ definitionValue: ReceivableDefinition;
29
+ summary: {
30
+ canonicalJson: string;
31
+ hash: string;
32
+ };
33
+ }>;
34
+ export declare function verify(sdk: SimplicityClient, input: {
35
+ definitionPath?: string;
36
+ definitionValue?: ReceivableDefinition;
37
+ statePath?: string;
38
+ stateValue?: ReceivableState;
39
+ }): Promise<{
40
+ verified: boolean;
41
+ definition: import("../core/types").DefinitionDescriptor;
42
+ definitionValue: ReceivableDefinition;
43
+ definitionSummary: {
44
+ canonicalJson: string;
45
+ hash: string;
46
+ };
47
+ state: import("../core/types").StateDocumentDescriptor;
48
+ stateValue: ReceivableState;
49
+ stateSummary: {
50
+ canonicalJson: string;
51
+ hash: string;
52
+ };
53
+ crossChecks: {
54
+ receivableIdMatch: boolean;
55
+ originatorMatch: boolean;
56
+ debtorMatch: boolean;
57
+ currencyMatch: boolean;
58
+ controllerMatch: boolean;
59
+ faceValueMatch: boolean;
60
+ arithmeticValid: boolean;
61
+ };
62
+ report: ReceivableVerificationReport;
63
+ trustSummary: import("../core/types").VerificationTrustSummary;
64
+ }>;
65
+ export declare function load(sdk: SimplicityClient, input: Parameters<typeof verify>[1]): Promise<{
66
+ definition: import("../core/types").DefinitionDescriptor;
67
+ definitionValue: ReceivableDefinition;
68
+ definitionSummary: {
69
+ canonicalJson: string;
70
+ hash: string;
71
+ };
72
+ state: import("../core/types").StateDocumentDescriptor;
73
+ stateValue: ReceivableState;
74
+ stateSummary: {
75
+ canonicalJson: string;
76
+ hash: string;
77
+ };
78
+ crossChecks: {
79
+ receivableIdMatch: boolean;
80
+ originatorMatch: boolean;
81
+ debtorMatch: boolean;
82
+ currencyMatch: boolean;
83
+ controllerMatch: boolean;
84
+ faceValueMatch: boolean;
85
+ arithmeticValid: boolean;
86
+ };
87
+ report: ReceivableVerificationReport;
88
+ trustSummary: import("../core/types").VerificationTrustSummary;
89
+ }>;
90
+ export declare function verifyStateHistory(sdk: SimplicityClient, input: {
91
+ definitionPath?: string;
92
+ definitionValue?: ReceivableDefinition;
93
+ stateHistoryPaths?: string[];
94
+ stateHistoryValues?: ReceivableState[];
95
+ }): Promise<{
96
+ verified: boolean;
97
+ definition: import("../core/types").DefinitionDescriptor;
98
+ definitionValue: ReceivableDefinition;
99
+ definitionSummary: {
100
+ canonicalJson: string;
101
+ hash: string;
102
+ };
103
+ latestState: import("../core/types").StateDocumentDescriptor;
104
+ latestStateValue: ReceivableState;
105
+ latestStateSummary: {
106
+ canonicalJson: string;
107
+ hash: string;
108
+ };
109
+ stateHistory: import("../core/types").StateDocumentDescriptor[];
110
+ stateHistoryValues: ReceivableState[];
111
+ stateHistorySummaries: {
112
+ canonicalJson: string;
113
+ hash: string;
114
+ }[];
115
+ checks: {
116
+ chainLength: number;
117
+ startsAtGenesis: boolean;
118
+ latestStatus: import("../core/types").ReceivableStatus;
119
+ allPreviousStateHashMatch: boolean;
120
+ receivableIdConsistent: boolean;
121
+ originatorConsistent: boolean;
122
+ debtorConsistent: boolean;
123
+ currencyConsistent: boolean;
124
+ controllerConsistent: boolean;
125
+ faceValueConsistent: boolean;
126
+ allArithmeticValid: boolean;
127
+ allStatusProgressionValid: boolean;
128
+ fullHistoryVerified: boolean;
129
+ summaries: {
130
+ hash: string;
131
+ }[];
132
+ };
133
+ report: ReceivableVerificationReport;
134
+ trustSummary: import("../core/types").VerificationTrustSummary;
135
+ }>;
136
+ export declare function prepareFunding(sdk: SimplicityClient, input: {
137
+ definitionPath?: string;
138
+ definitionValue?: ReceivableDefinition;
139
+ previousStatePath?: string;
140
+ previousStateValue?: ReceivableState;
141
+ nextStatePath?: string;
142
+ nextStateValue?: ReceivableState;
143
+ stateId?: string;
144
+ holderEntityId?: string;
145
+ holderClaimantXonly?: string;
146
+ fundedAt?: string;
147
+ }): Promise<{
148
+ verified: boolean;
149
+ definition: import("../core/types").DefinitionDescriptor;
150
+ definitionValue: ReceivableDefinition;
151
+ definitionSummary: {
152
+ canonicalJson: string;
153
+ hash: string;
154
+ };
155
+ previousState: import("../core/types").StateDocumentDescriptor;
156
+ previousStateValue: ReceivableState;
157
+ previousStateSummary: {
158
+ canonicalJson: string;
159
+ hash: string;
160
+ };
161
+ nextState: import("../core/types").StateDocumentDescriptor;
162
+ nextStateValue: ReceivableState;
163
+ nextStateSummary: {
164
+ canonicalJson: string;
165
+ hash: string;
166
+ };
167
+ report: ReceivableVerificationReport;
168
+ trustSummary: import("../core/types").VerificationTrustSummary;
169
+ }>;
170
+ export declare function verifyFunding(sdk: SimplicityClient, input: {
171
+ definitionPath?: string;
172
+ definitionValue?: ReceivableDefinition;
173
+ previousStatePath?: string;
174
+ previousStateValue?: ReceivableState;
175
+ nextStatePath?: string;
176
+ nextStateValue?: ReceivableState;
177
+ }): Promise<{
178
+ verified: boolean;
179
+ definition: import("../core/types").DefinitionDescriptor;
180
+ definitionValue: ReceivableDefinition;
181
+ definitionSummary: {
182
+ canonicalJson: string;
183
+ hash: string;
184
+ };
185
+ previousState: import("../core/types").StateDocumentDescriptor;
186
+ previousStateValue: ReceivableState;
187
+ previousStateSummary: {
188
+ canonicalJson: string;
189
+ hash: string;
190
+ };
191
+ nextState: import("../core/types").StateDocumentDescriptor;
192
+ nextStateValue: ReceivableState;
193
+ nextStateSummary: {
194
+ canonicalJson: string;
195
+ hash: string;
196
+ };
197
+ report: ReceivableVerificationReport;
198
+ trustSummary: import("../core/types").VerificationTrustSummary;
199
+ }>;
200
+ export declare function prepareRepayment(sdk: SimplicityClient, input: {
201
+ definitionPath?: string;
202
+ definitionValue?: ReceivableDefinition;
203
+ previousStatePath?: string;
204
+ previousStateValue?: ReceivableState;
205
+ nextStatePath?: string;
206
+ nextStateValue?: ReceivableState;
207
+ stateId?: string;
208
+ amount?: number;
209
+ repaidAt?: string;
210
+ }): Promise<{
211
+ verified: boolean;
212
+ definition: import("../core/types").DefinitionDescriptor;
213
+ definitionValue: ReceivableDefinition;
214
+ definitionSummary: {
215
+ canonicalJson: string;
216
+ hash: string;
217
+ };
218
+ previousState: import("../core/types").StateDocumentDescriptor;
219
+ previousStateValue: ReceivableState;
220
+ previousStateSummary: {
221
+ canonicalJson: string;
222
+ hash: string;
223
+ };
224
+ nextState: import("../core/types").StateDocumentDescriptor;
225
+ nextStateValue: ReceivableState;
226
+ nextStateSummary: {
227
+ canonicalJson: string;
228
+ hash: string;
229
+ };
230
+ report: ReceivableVerificationReport;
231
+ trustSummary: import("../core/types").VerificationTrustSummary;
232
+ }>;
233
+ export declare function verifyRepayment(sdk: SimplicityClient, input: {
234
+ definitionPath?: string;
235
+ definitionValue?: ReceivableDefinition;
236
+ previousStatePath?: string;
237
+ previousStateValue?: ReceivableState;
238
+ nextStatePath?: string;
239
+ nextStateValue?: ReceivableState;
240
+ }): Promise<{
241
+ verified: boolean;
242
+ definition: import("../core/types").DefinitionDescriptor;
243
+ definitionValue: ReceivableDefinition;
244
+ definitionSummary: {
245
+ canonicalJson: string;
246
+ hash: string;
247
+ };
248
+ previousState: import("../core/types").StateDocumentDescriptor;
249
+ previousStateValue: ReceivableState;
250
+ previousStateSummary: {
251
+ canonicalJson: string;
252
+ hash: string;
253
+ };
254
+ nextState: import("../core/types").StateDocumentDescriptor;
255
+ nextStateValue: ReceivableState;
256
+ nextStateSummary: {
257
+ canonicalJson: string;
258
+ hash: string;
259
+ };
260
+ report: ReceivableVerificationReport;
261
+ trustSummary: import("../core/types").VerificationTrustSummary;
262
+ }>;
263
+ export declare function prepareFundingClaim(sdk: SimplicityClient, input: {
264
+ definitionPath?: string;
265
+ definitionValue?: ReceivableDefinition;
266
+ currentStatePath?: string;
267
+ currentStateValue?: ReceivableState;
268
+ stateHistoryPaths?: string[];
269
+ stateHistoryValues?: ReceivableState[];
270
+ fundingClaimPath?: string;
271
+ fundingClaimValue?: ReceivableFundingClaimDescriptor;
272
+ claimId?: string;
273
+ payerEntityId?: string;
274
+ payeeEntityId?: string;
275
+ claimantXonly?: string;
276
+ amountSat?: number;
277
+ eventTimestamp?: string;
278
+ simfPath?: string;
279
+ artifactPath?: string;
280
+ }): Promise<{
281
+ compiled: import("..").CompiledContract;
282
+ claim: import("../core/types").StateDocumentDescriptor;
283
+ claimValue: ReceivableFundingClaimDescriptor | ReceivableRepaymentClaimDescriptor;
284
+ claimSummary: {
285
+ canonicalJson: string;
286
+ hash: string;
287
+ } | {
288
+ canonicalJson: string;
289
+ hash: string;
290
+ };
291
+ report: ReceivableVerificationReport;
292
+ trustSummary: import("../core/types").VerificationTrustSummary;
293
+ stateHistory?: import("../core/types").StateDocumentDescriptor[] | undefined;
294
+ stateHistoryValues?: ReceivableState[] | undefined;
295
+ stateHistorySummaries?: {
296
+ canonicalJson: string;
297
+ hash: string;
298
+ }[] | undefined;
299
+ verified: boolean;
300
+ artifact: SimplicityArtifact | undefined;
301
+ artifactVerification: {
302
+ definition?: Awaited<ReturnType<SimplicityClient["verifyDefinitionAgainstArtifact"]>>;
303
+ state?: Awaited<ReturnType<SimplicityClient["verifyStateAgainstArtifact"]>>;
304
+ } | undefined;
305
+ definition: import("../core/types").DefinitionDescriptor;
306
+ definitionValue: ReceivableDefinition;
307
+ definitionSummary: {
308
+ canonicalJson: string;
309
+ hash: string;
310
+ };
311
+ currentState: import("../core/types").StateDocumentDescriptor;
312
+ currentStateValue: ReceivableState;
313
+ currentStateSummary: {
314
+ canonicalJson: string;
315
+ hash: string;
316
+ };
317
+ }>;
318
+ export declare function verifyFundingClaim(sdk: SimplicityClient, input: {
319
+ artifactPath?: string;
320
+ artifact?: SimplicityArtifact;
321
+ definitionPath?: string;
322
+ definitionValue?: ReceivableDefinition;
323
+ currentStatePath?: string;
324
+ currentStateValue?: ReceivableState;
325
+ stateHistoryPaths?: string[];
326
+ stateHistoryValues?: ReceivableState[];
327
+ fundingClaimPath?: string;
328
+ fundingClaimValue?: ReceivableFundingClaimDescriptor;
329
+ }): Promise<{
330
+ claim: import("../core/types").StateDocumentDescriptor;
331
+ claimValue: ReceivableFundingClaimDescriptor | ReceivableRepaymentClaimDescriptor;
332
+ claimSummary: {
333
+ canonicalJson: string;
334
+ hash: string;
335
+ } | {
336
+ canonicalJson: string;
337
+ hash: string;
338
+ };
339
+ report: ReceivableVerificationReport;
340
+ trustSummary: import("../core/types").VerificationTrustSummary;
341
+ stateHistory?: import("../core/types").StateDocumentDescriptor[] | undefined;
342
+ stateHistoryValues?: ReceivableState[] | undefined;
343
+ stateHistorySummaries?: {
344
+ canonicalJson: string;
345
+ hash: string;
346
+ }[] | undefined;
347
+ verified: boolean;
348
+ artifact: SimplicityArtifact | undefined;
349
+ artifactVerification: {
350
+ definition?: Awaited<ReturnType<SimplicityClient["verifyDefinitionAgainstArtifact"]>>;
351
+ state?: Awaited<ReturnType<SimplicityClient["verifyStateAgainstArtifact"]>>;
352
+ } | undefined;
353
+ definition: import("../core/types").DefinitionDescriptor;
354
+ definitionValue: ReceivableDefinition;
355
+ definitionSummary: {
356
+ canonicalJson: string;
357
+ hash: string;
358
+ };
359
+ currentState: import("../core/types").StateDocumentDescriptor;
360
+ currentStateValue: ReceivableState;
361
+ currentStateSummary: {
362
+ canonicalJson: string;
363
+ hash: string;
364
+ };
365
+ }>;
366
+ export declare function inspectFundingClaim(sdk: SimplicityClient, input: Parameters<typeof verifyFundingClaim>[1] & {
367
+ payoutAddress: string;
368
+ nextOutputHash?: string;
369
+ outputForm?: {
370
+ assetForm?: OutputAssetForm;
371
+ amountForm?: OutputAmountForm;
372
+ nonceForm?: OutputNonceForm;
373
+ rangeProofForm?: OutputRangeProofForm;
374
+ };
375
+ rawOutput?: Partial<OutputRawFields>;
376
+ outputBindingMode?: BondOutputBindingMode;
377
+ wallet: string;
378
+ signer: {
379
+ type: "schnorrPrivkeyHex";
380
+ privkeyHex: string;
381
+ };
382
+ feeSat?: number;
383
+ utxoPolicy?: "smallest_over" | "largest" | "newest";
384
+ }): Promise<{
385
+ payoutDescriptor: ReceivablePayoutDescriptor;
386
+ inspect: import("../core/types").InspectResult;
387
+ report: ReceivableVerificationReport;
388
+ trustSummary: import("../core/types").VerificationTrustSummary;
389
+ claim: import("../core/types").StateDocumentDescriptor;
390
+ claimValue: ReceivableFundingClaimDescriptor | ReceivableRepaymentClaimDescriptor;
391
+ claimSummary: {
392
+ canonicalJson: string;
393
+ hash: string;
394
+ } | {
395
+ canonicalJson: string;
396
+ hash: string;
397
+ };
398
+ stateHistory?: import("../core/types").StateDocumentDescriptor[] | undefined;
399
+ stateHistoryValues?: ReceivableState[] | undefined;
400
+ stateHistorySummaries?: {
401
+ canonicalJson: string;
402
+ hash: string;
403
+ }[] | undefined;
404
+ verified: boolean;
405
+ artifact: SimplicityArtifact | undefined;
406
+ artifactVerification: {
407
+ definition?: Awaited<ReturnType<SimplicityClient["verifyDefinitionAgainstArtifact"]>>;
408
+ state?: Awaited<ReturnType<SimplicityClient["verifyStateAgainstArtifact"]>>;
409
+ } | undefined;
410
+ definition: import("../core/types").DefinitionDescriptor;
411
+ definitionValue: ReceivableDefinition;
412
+ definitionSummary: {
413
+ canonicalJson: string;
414
+ hash: string;
415
+ };
416
+ currentState: import("../core/types").StateDocumentDescriptor;
417
+ currentStateValue: ReceivableState;
418
+ currentStateSummary: {
419
+ canonicalJson: string;
420
+ hash: string;
421
+ };
422
+ }>;
423
+ export declare function executeFundingClaim(sdk: SimplicityClient, input: Parameters<typeof inspectFundingClaim>[1] & {
424
+ broadcast?: boolean;
425
+ }): Promise<{
426
+ execution: import("../core/types").ExecuteResult;
427
+ payoutDescriptor: ReceivablePayoutDescriptor;
428
+ inspect: import("../core/types").InspectResult;
429
+ report: ReceivableVerificationReport;
430
+ trustSummary: import("../core/types").VerificationTrustSummary;
431
+ claim: import("../core/types").StateDocumentDescriptor;
432
+ claimValue: ReceivableFundingClaimDescriptor | ReceivableRepaymentClaimDescriptor;
433
+ claimSummary: {
434
+ canonicalJson: string;
435
+ hash: string;
436
+ } | {
437
+ canonicalJson: string;
438
+ hash: string;
439
+ };
440
+ stateHistory?: import("../core/types").StateDocumentDescriptor[] | undefined;
441
+ stateHistoryValues?: ReceivableState[] | undefined;
442
+ stateHistorySummaries?: {
443
+ canonicalJson: string;
444
+ hash: string;
445
+ }[] | undefined;
446
+ verified: boolean;
447
+ artifact: SimplicityArtifact | undefined;
448
+ artifactVerification: {
449
+ definition?: Awaited<ReturnType<SimplicityClient["verifyDefinitionAgainstArtifact"]>>;
450
+ state?: Awaited<ReturnType<SimplicityClient["verifyStateAgainstArtifact"]>>;
451
+ } | undefined;
452
+ definition: import("../core/types").DefinitionDescriptor;
453
+ definitionValue: ReceivableDefinition;
454
+ definitionSummary: {
455
+ canonicalJson: string;
456
+ hash: string;
457
+ };
458
+ currentState: import("../core/types").StateDocumentDescriptor;
459
+ currentStateValue: ReceivableState;
460
+ currentStateSummary: {
461
+ canonicalJson: string;
462
+ hash: string;
463
+ };
464
+ }>;
465
+ export declare function prepareRepaymentClaim(sdk: SimplicityClient, input: {
466
+ definitionPath?: string;
467
+ definitionValue?: ReceivableDefinition;
468
+ currentStatePath?: string;
469
+ currentStateValue?: ReceivableState;
470
+ stateHistoryPaths?: string[];
471
+ stateHistoryValues?: ReceivableState[];
472
+ repaymentClaimPath?: string;
473
+ repaymentClaimValue?: ReceivableRepaymentClaimDescriptor;
474
+ claimId?: string;
475
+ payerEntityId?: string;
476
+ payeeEntityId?: string;
477
+ claimantXonly?: string;
478
+ amountSat?: number;
479
+ eventTimestamp?: string;
480
+ simfPath?: string;
481
+ artifactPath?: string;
482
+ }): Promise<{
483
+ compiled: import("..").CompiledContract;
484
+ claim: import("../core/types").StateDocumentDescriptor;
485
+ claimValue: ReceivableFundingClaimDescriptor | ReceivableRepaymentClaimDescriptor;
486
+ claimSummary: {
487
+ canonicalJson: string;
488
+ hash: string;
489
+ } | {
490
+ canonicalJson: string;
491
+ hash: string;
492
+ };
493
+ report: ReceivableVerificationReport;
494
+ trustSummary: import("../core/types").VerificationTrustSummary;
495
+ stateHistory?: import("../core/types").StateDocumentDescriptor[] | undefined;
496
+ stateHistoryValues?: ReceivableState[] | undefined;
497
+ stateHistorySummaries?: {
498
+ canonicalJson: string;
499
+ hash: string;
500
+ }[] | undefined;
501
+ verified: boolean;
502
+ artifact: SimplicityArtifact | undefined;
503
+ artifactVerification: {
504
+ definition?: Awaited<ReturnType<SimplicityClient["verifyDefinitionAgainstArtifact"]>>;
505
+ state?: Awaited<ReturnType<SimplicityClient["verifyStateAgainstArtifact"]>>;
506
+ } | undefined;
507
+ definition: import("../core/types").DefinitionDescriptor;
508
+ definitionValue: ReceivableDefinition;
509
+ definitionSummary: {
510
+ canonicalJson: string;
511
+ hash: string;
512
+ };
513
+ currentState: import("../core/types").StateDocumentDescriptor;
514
+ currentStateValue: ReceivableState;
515
+ currentStateSummary: {
516
+ canonicalJson: string;
517
+ hash: string;
518
+ };
519
+ }>;
520
+ export declare function verifyRepaymentClaim(sdk: SimplicityClient, input: {
521
+ artifactPath?: string;
522
+ artifact?: SimplicityArtifact;
523
+ definitionPath?: string;
524
+ definitionValue?: ReceivableDefinition;
525
+ currentStatePath?: string;
526
+ currentStateValue?: ReceivableState;
527
+ stateHistoryPaths?: string[];
528
+ stateHistoryValues?: ReceivableState[];
529
+ repaymentClaimPath?: string;
530
+ repaymentClaimValue?: ReceivableRepaymentClaimDescriptor;
531
+ }): Promise<{
532
+ claim: import("../core/types").StateDocumentDescriptor;
533
+ claimValue: ReceivableFundingClaimDescriptor | ReceivableRepaymentClaimDescriptor;
534
+ claimSummary: {
535
+ canonicalJson: string;
536
+ hash: string;
537
+ } | {
538
+ canonicalJson: string;
539
+ hash: string;
540
+ };
541
+ report: ReceivableVerificationReport;
542
+ trustSummary: import("../core/types").VerificationTrustSummary;
543
+ stateHistory?: import("../core/types").StateDocumentDescriptor[] | undefined;
544
+ stateHistoryValues?: ReceivableState[] | undefined;
545
+ stateHistorySummaries?: {
546
+ canonicalJson: string;
547
+ hash: string;
548
+ }[] | undefined;
549
+ verified: boolean;
550
+ artifact: SimplicityArtifact | undefined;
551
+ artifactVerification: {
552
+ definition?: Awaited<ReturnType<SimplicityClient["verifyDefinitionAgainstArtifact"]>>;
553
+ state?: Awaited<ReturnType<SimplicityClient["verifyStateAgainstArtifact"]>>;
554
+ } | undefined;
555
+ definition: import("../core/types").DefinitionDescriptor;
556
+ definitionValue: ReceivableDefinition;
557
+ definitionSummary: {
558
+ canonicalJson: string;
559
+ hash: string;
560
+ };
561
+ currentState: import("../core/types").StateDocumentDescriptor;
562
+ currentStateValue: ReceivableState;
563
+ currentStateSummary: {
564
+ canonicalJson: string;
565
+ hash: string;
566
+ };
567
+ }>;
568
+ export declare function inspectRepaymentClaim(sdk: SimplicityClient, input: Parameters<typeof verifyRepaymentClaim>[1] & {
569
+ payoutAddress: string;
570
+ nextOutputHash?: string;
571
+ outputForm?: {
572
+ assetForm?: OutputAssetForm;
573
+ amountForm?: OutputAmountForm;
574
+ nonceForm?: OutputNonceForm;
575
+ rangeProofForm?: OutputRangeProofForm;
576
+ };
577
+ rawOutput?: Partial<OutputRawFields>;
578
+ outputBindingMode?: BondOutputBindingMode;
579
+ wallet: string;
580
+ signer: {
581
+ type: "schnorrPrivkeyHex";
582
+ privkeyHex: string;
583
+ };
584
+ feeSat?: number;
585
+ utxoPolicy?: "smallest_over" | "largest" | "newest";
586
+ }): Promise<{
587
+ payoutDescriptor: ReceivablePayoutDescriptor;
588
+ inspect: import("../core/types").InspectResult;
589
+ report: ReceivableVerificationReport;
590
+ trustSummary: import("../core/types").VerificationTrustSummary;
591
+ claim: import("../core/types").StateDocumentDescriptor;
592
+ claimValue: ReceivableFundingClaimDescriptor | ReceivableRepaymentClaimDescriptor;
593
+ claimSummary: {
594
+ canonicalJson: string;
595
+ hash: string;
596
+ } | {
597
+ canonicalJson: string;
598
+ hash: string;
599
+ };
600
+ stateHistory?: import("../core/types").StateDocumentDescriptor[] | undefined;
601
+ stateHistoryValues?: ReceivableState[] | undefined;
602
+ stateHistorySummaries?: {
603
+ canonicalJson: string;
604
+ hash: string;
605
+ }[] | undefined;
606
+ verified: boolean;
607
+ artifact: SimplicityArtifact | undefined;
608
+ artifactVerification: {
609
+ definition?: Awaited<ReturnType<SimplicityClient["verifyDefinitionAgainstArtifact"]>>;
610
+ state?: Awaited<ReturnType<SimplicityClient["verifyStateAgainstArtifact"]>>;
611
+ } | undefined;
612
+ definition: import("../core/types").DefinitionDescriptor;
613
+ definitionValue: ReceivableDefinition;
614
+ definitionSummary: {
615
+ canonicalJson: string;
616
+ hash: string;
617
+ };
618
+ currentState: import("../core/types").StateDocumentDescriptor;
619
+ currentStateValue: ReceivableState;
620
+ currentStateSummary: {
621
+ canonicalJson: string;
622
+ hash: string;
623
+ };
624
+ }>;
625
+ export declare function executeRepaymentClaim(sdk: SimplicityClient, input: Parameters<typeof inspectRepaymentClaim>[1] & {
626
+ broadcast?: boolean;
627
+ }): Promise<{
628
+ execution: import("../core/types").ExecuteResult;
629
+ payoutDescriptor: ReceivablePayoutDescriptor;
630
+ inspect: import("../core/types").InspectResult;
631
+ report: ReceivableVerificationReport;
632
+ trustSummary: import("../core/types").VerificationTrustSummary;
633
+ claim: import("../core/types").StateDocumentDescriptor;
634
+ claimValue: ReceivableFundingClaimDescriptor | ReceivableRepaymentClaimDescriptor;
635
+ claimSummary: {
636
+ canonicalJson: string;
637
+ hash: string;
638
+ } | {
639
+ canonicalJson: string;
640
+ hash: string;
641
+ };
642
+ stateHistory?: import("../core/types").StateDocumentDescriptor[] | undefined;
643
+ stateHistoryValues?: ReceivableState[] | undefined;
644
+ stateHistorySummaries?: {
645
+ canonicalJson: string;
646
+ hash: string;
647
+ }[] | undefined;
648
+ verified: boolean;
649
+ artifact: SimplicityArtifact | undefined;
650
+ artifactVerification: {
651
+ definition?: Awaited<ReturnType<SimplicityClient["verifyDefinitionAgainstArtifact"]>>;
652
+ state?: Awaited<ReturnType<SimplicityClient["verifyStateAgainstArtifact"]>>;
653
+ } | undefined;
654
+ definition: import("../core/types").DefinitionDescriptor;
655
+ definitionValue: ReceivableDefinition;
656
+ definitionSummary: {
657
+ canonicalJson: string;
658
+ hash: string;
659
+ };
660
+ currentState: import("../core/types").StateDocumentDescriptor;
661
+ currentStateValue: ReceivableState;
662
+ currentStateSummary: {
663
+ canonicalJson: string;
664
+ hash: string;
665
+ };
666
+ }>;
667
+ export declare function prepareWriteOff(sdk: SimplicityClient, input: {
668
+ definitionPath?: string;
669
+ definitionValue?: ReceivableDefinition;
670
+ previousStatePath?: string;
671
+ previousStateValue?: ReceivableState;
672
+ nextStatePath?: string;
673
+ nextStateValue?: ReceivableState;
674
+ stateId?: string;
675
+ defaultedAt?: string;
676
+ writeOffAmount?: number;
677
+ }): Promise<{
678
+ verified: boolean;
679
+ definition: import("../core/types").DefinitionDescriptor;
680
+ definitionValue: ReceivableDefinition;
681
+ definitionSummary: {
682
+ canonicalJson: string;
683
+ hash: string;
684
+ };
685
+ previousState: import("../core/types").StateDocumentDescriptor;
686
+ previousStateValue: ReceivableState;
687
+ previousStateSummary: {
688
+ canonicalJson: string;
689
+ hash: string;
690
+ };
691
+ nextState: import("../core/types").StateDocumentDescriptor;
692
+ nextStateValue: ReceivableState;
693
+ nextStateSummary: {
694
+ canonicalJson: string;
695
+ hash: string;
696
+ };
697
+ report: ReceivableVerificationReport;
698
+ trustSummary: import("../core/types").VerificationTrustSummary;
699
+ }>;
700
+ export declare function verifyWriteOff(sdk: SimplicityClient, input: {
701
+ definitionPath?: string;
702
+ definitionValue?: ReceivableDefinition;
703
+ previousStatePath?: string;
704
+ previousStateValue?: ReceivableState;
705
+ nextStatePath?: string;
706
+ nextStateValue?: ReceivableState;
707
+ }): Promise<{
708
+ verified: boolean;
709
+ definition: import("../core/types").DefinitionDescriptor;
710
+ definitionValue: ReceivableDefinition;
711
+ definitionSummary: {
712
+ canonicalJson: string;
713
+ hash: string;
714
+ };
715
+ previousState: import("../core/types").StateDocumentDescriptor;
716
+ previousStateValue: ReceivableState;
717
+ previousStateSummary: {
718
+ canonicalJson: string;
719
+ hash: string;
720
+ };
721
+ nextState: import("../core/types").StateDocumentDescriptor;
722
+ nextStateValue: ReceivableState;
723
+ nextStateSummary: {
724
+ canonicalJson: string;
725
+ hash: string;
726
+ };
727
+ report: ReceivableVerificationReport;
728
+ trustSummary: import("../core/types").VerificationTrustSummary;
729
+ }>;
730
+ export declare function prepareClosing(sdk: SimplicityClient, input: {
731
+ definitionPath?: string;
732
+ definitionValue?: ReceivableDefinition;
733
+ latestStatePath?: string;
734
+ latestStateValue?: ReceivableState;
735
+ stateHistoryPaths?: string[];
736
+ stateHistoryValues?: ReceivableState[];
737
+ closingPath?: string;
738
+ closingValue?: ReceivableClosingDescriptor;
739
+ closingId?: string;
740
+ closedAt?: string;
741
+ closingReason?: ReceivableClosingDescriptor["closingReason"];
742
+ }): Promise<{
743
+ closing: import("../core/types").StateDocumentDescriptor;
744
+ closingValue: ReceivableClosingDescriptor;
745
+ closingSummary: {
746
+ canonicalJson: string;
747
+ hash: string;
748
+ };
749
+ report: ReceivableVerificationReport;
750
+ trustSummary: import("../core/types").VerificationTrustSummary;
751
+ stateHistory?: import("../core/types").StateDocumentDescriptor[] | undefined;
752
+ stateHistoryValues?: ReceivableState[] | undefined;
753
+ stateHistorySummaries?: {
754
+ canonicalJson: string;
755
+ hash: string;
756
+ }[] | undefined;
757
+ verified: boolean;
758
+ definition: import("../core/types").DefinitionDescriptor;
759
+ definitionValue: ReceivableDefinition;
760
+ definitionSummary: {
761
+ canonicalJson: string;
762
+ hash: string;
763
+ };
764
+ latestState: import("../core/types").StateDocumentDescriptor;
765
+ latestStateValue: ReceivableState;
766
+ latestStateSummary: {
767
+ canonicalJson: string;
768
+ hash: string;
769
+ };
770
+ }>;
771
+ export declare function verifyClosing(sdk: SimplicityClient, input: {
772
+ definitionPath?: string;
773
+ definitionValue?: ReceivableDefinition;
774
+ latestStatePath?: string;
775
+ latestStateValue?: ReceivableState;
776
+ stateHistoryPaths?: string[];
777
+ stateHistoryValues?: ReceivableState[];
778
+ closingPath?: string;
779
+ closingValue?: ReceivableClosingDescriptor;
780
+ }): Promise<{
781
+ closing: import("../core/types").StateDocumentDescriptor;
782
+ closingValue: ReceivableClosingDescriptor;
783
+ closingSummary: {
784
+ canonicalJson: string;
785
+ hash: string;
786
+ };
787
+ report: ReceivableVerificationReport;
788
+ trustSummary: import("../core/types").VerificationTrustSummary;
789
+ stateHistory?: import("../core/types").StateDocumentDescriptor[] | undefined;
790
+ stateHistoryValues?: ReceivableState[] | undefined;
791
+ stateHistorySummaries?: {
792
+ canonicalJson: string;
793
+ hash: string;
794
+ }[] | undefined;
795
+ verified: boolean;
796
+ definition: import("../core/types").DefinitionDescriptor;
797
+ definitionValue: ReceivableDefinition;
798
+ definitionSummary: {
799
+ canonicalJson: string;
800
+ hash: string;
801
+ };
802
+ latestState: import("../core/types").StateDocumentDescriptor;
803
+ latestStateValue: ReceivableState;
804
+ latestStateSummary: {
805
+ canonicalJson: string;
806
+ hash: string;
807
+ };
808
+ }>;
809
+ export declare function exportEvidence(sdk: SimplicityClient, input: {
810
+ definitionPath?: string;
811
+ definitionValue?: ReceivableDefinition;
812
+ statePath?: string;
813
+ stateValue?: ReceivableState;
814
+ stateHistoryPaths?: string[];
815
+ stateHistoryValues?: ReceivableState[];
816
+ fundingClaimPath?: string;
817
+ fundingClaimValue?: ReceivableFundingClaimDescriptor;
818
+ repaymentClaimPath?: string;
819
+ repaymentClaimValue?: ReceivableRepaymentClaimDescriptor;
820
+ closingPath?: string;
821
+ closingValue?: ReceivableClosingDescriptor;
822
+ verificationReportValue?: ReceivableVerificationReport;
823
+ }): Promise<ReceivableEvidenceBundle>;
824
+ export declare function exportFinalityPayload(sdk: SimplicityClient, input: Parameters<typeof exportEvidence>[1]): Promise<ReceivableFinalityPayload>;
825
+ export {};