@hazbase/simplicity 0.1.1 → 0.2.0

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