@xo-cash/types 0.0.1-development.13474028765

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 GeneralProtocols / XO
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,32 @@
1
+ # @xo-cash/types
2
+
3
+ XO type definitions and interfaces
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ npm install @xo-cash/types
9
+ ```
10
+
11
+ ## Usage
12
+
13
+ ```typescript
14
+ import { XOInvitation, XOTemplate } from '@xo-cash/types';
15
+ ```
16
+
17
+ ## Development
18
+
19
+ ### Formatting
20
+
21
+ Run `npm run style` to format code. This command runs Prettier first, then ESLint with `--fix`.
22
+
23
+ **Note:** Prettier adjusts comment formatting, which conflicts with our ESLint `lines-around-comment` rule. Running ESLint after Prettier restores the preferred comment formatting.
24
+
25
+ ## Links
26
+
27
+ - [Repository](https://gitlab.com/GeneralProtocols/xo/types)
28
+ - [Issues](https://gitlab.com/GeneralProtocols/xo/types/issues)
29
+
30
+ ## License
31
+
32
+ MIT - See [LICENSE](LICENSE) for details.
@@ -0,0 +1,763 @@
1
+ import { Input, Output } from "@bitauth/libauth";
2
+
3
+ //#region source/invitation.d.ts
4
+ /**
5
+ * The requirements for an invitation.
6
+ */
7
+ type XOInvitationRoleRequirement = {
8
+ variables?: string[];
9
+ inputs?: string[];
10
+ outputs?: string[];
11
+ };
12
+ /**
13
+ * The requirements for an invitation with a role.
14
+ */
15
+ type XOInvitationRequirements = XOInvitationRoleRequirement & {
16
+ roles?: Record<string, XOInvitationRoleRequirement>;
17
+ };
18
+ /**
19
+ * The value of a variable in an invitation.
20
+ */
21
+ type XOInvitationVariableValue = bigint | boolean | number | string;
22
+ /**
23
+ * A variable in an invitation.
24
+ */
25
+ type XOInvitationVariable = {
26
+ /**
27
+ * The variable identifier for this variable.
28
+ */
29
+ variableIdentifier: string;
30
+ /**
31
+ * The value of this variable.
32
+ */
33
+ value: XOInvitationVariableValue;
34
+ /**
35
+ * The role identifier this variable belongs to.
36
+ */
37
+ roleIdentifier?: string;
38
+ };
39
+ /**
40
+ * A transaction input in an invitation.
41
+ */
42
+ type XOInvitationInput = Partial<Input> & {
43
+ /**
44
+ * The input identifier for this input.
45
+ */
46
+ inputIdentifier?: string;
47
+ /**
48
+ * The position/index this input should occupy in the final transaction.
49
+ */
50
+ transactionIndex?: number;
51
+ /**
52
+ * The role identifier this input belongs to.
53
+ * If undefined, this is generic data applicable to the whole invitation.
54
+ */
55
+ roleIdentifier?: string;
56
+ /**
57
+ * The parent commit's item that this item extends.
58
+ */
59
+ mergesWith?: {
60
+ /**
61
+ * The commit identifier of the parent commit.
62
+ */
63
+ commitIdentifier: string;
64
+ /**
65
+ * The array index of the item in the parent commit's data array.
66
+ * 0-based index (0 = first item, 1 = second item, etc.)
67
+ */
68
+ index: number;
69
+ };
70
+ };
71
+ /**
72
+ * A transaction output in an invitation.
73
+ */
74
+ type XOInvitationOutput = Partial<Output> & {
75
+ /**
76
+ * The output identifier for this output.
77
+ */
78
+ outputIdentifier?: string;
79
+ /**
80
+ * The position/index this output should occupy in the final transaction.
81
+ */
82
+ transactionIndex?: number;
83
+ /**
84
+ * The secret identifier for this output.
85
+ */
86
+ secretIdentifier?: string;
87
+ /**
88
+ * The role identifier this output belongs to.
89
+ */
90
+ roleIdentifier?: string;
91
+ /**
92
+ * The parent commit's item that this item extends.
93
+ */
94
+ mergesWith?: {
95
+ /**
96
+ * The commit identifier of the parent commit.
97
+ */
98
+ commitIdentifier: string;
99
+ /**
100
+ * The array index of the item in the parent commit's data array.
101
+ * 0-based index (0 = first item, 1 = second item, etc.)
102
+ */
103
+ index: number;
104
+ };
105
+ };
106
+ /**
107
+ * Represents a commit in the invitation.
108
+ */
109
+ type XOInvitationCommit = {
110
+ /**
111
+ * The commit identifier for this commit.
112
+ */
113
+ commitIdentifier: string;
114
+ /**
115
+ * The identifier of the previous commit.
116
+ */
117
+ previousCommitIdentifier: string | undefined;
118
+ /**
119
+ * The entity identifier that made this commit.
120
+ */
121
+ entityIdentifier: string;
122
+ /**
123
+ * The data contributed by this commit.
124
+ */
125
+ data: {
126
+ /**
127
+ * The version of the transaction.
128
+ */
129
+ transactionVersion?: number;
130
+ /**
131
+ * The locktime for the transaction.
132
+ */
133
+ transactionLocktime?: number;
134
+ /**
135
+ * Variables provided in this commit.
136
+ */
137
+ variables?: XOInvitationVariable[];
138
+ /**
139
+ * Transaction inputs provided in this commit.
140
+ */
141
+ inputs?: XOInvitationInput[];
142
+ /**
143
+ * Transaction outputs provided in this commit.
144
+ */
145
+ outputs?: XOInvitationOutput[];
146
+ };
147
+ /**
148
+ * Signature of the entity committing this data.
149
+ */
150
+ signature: string;
151
+ /**
152
+ * Expiration timestamp for this specific commit.
153
+ */
154
+ expiresAtTimestamp: number;
155
+ };
156
+ /**
157
+ * An invitation to be shared among the participants using the xo stack.
158
+ */
159
+ type XOInvitation = {
160
+ /**
161
+ * The invitation identifier for the invitation.
162
+ */
163
+ invitationIdentifier: string;
164
+ /**
165
+ * The timestamp when the invitation was created.
166
+ */
167
+ createdAtTimestamp: number;
168
+ /**
169
+ * The template identifier.
170
+ */
171
+ templateIdentifier: string;
172
+ /**
173
+ * The action identifier.
174
+ */
175
+ actionIdentifier: string;
176
+ /**
177
+ * The commits in the invitation.
178
+ */
179
+ commits: XOInvitationCommit[];
180
+ };
181
+ //#endregion
182
+ //#region source/template.d.ts
183
+ /**
184
+ * Type for satoshis.
185
+ */
186
+ type Satoshis = bigint;
187
+ /**
188
+ * View properties for template elements.
189
+ */
190
+ type XOTemplateViewProperties = {
191
+ /**
192
+ * A name for this item.
193
+ */
194
+ name: string;
195
+ /**
196
+ * A description for this item.
197
+ */
198
+ description: string;
199
+ /**
200
+ * An icon for this item.
201
+ */
202
+ icon?: string;
203
+ };
204
+ /**
205
+ * Slot configuration for a role requirement.
206
+ */
207
+ type XOTemplateRoleSlots = {
208
+ /**
209
+ * Minimum number of slots required for this role.
210
+ */
211
+ min: number;
212
+ /**
213
+ * Maximum number of slots allowed for this role (undefined means unlimited).
214
+ */
215
+ max: number | undefined;
216
+ };
217
+ /**
218
+ * Requirements for a specific role within an action.
219
+ */
220
+ type XOTemplateActionRoleRequirements = {
221
+ /**
222
+ * List of identifiers to generate (e.g., keys, secrets).
223
+ */
224
+ generate?: string[];
225
+ /**
226
+ * List of variable identifiers required for this role.
227
+ */
228
+ variables?: string[];
229
+ /**
230
+ * List of secret identifiers required for this role.
231
+ */
232
+ secrets?: string[];
233
+ /**
234
+ * List of state identifiers required for this role.
235
+ */
236
+ state?: string[];
237
+ /**
238
+ * Slot configuration for this role.
239
+ */
240
+ slots?: XOTemplateRoleSlots;
241
+ };
242
+ /**
243
+ * A role-specific definition within an action.
244
+ */
245
+ type XOTemplateActionRole = Partial<XOTemplateViewProperties> & {
246
+ /**
247
+ * The requirements for this role for this action.
248
+ */
249
+ requirements?: XOTemplateActionRoleRequirements;
250
+ };
251
+ /**
252
+ * A role requirement entry in an action's requirements.
253
+ */
254
+ type XOTemplateActionRoleRequirement = {
255
+ /**
256
+ * The role identifier that this requirement applies to.
257
+ */
258
+ role: string;
259
+ /**
260
+ * Slot configuration for this role.
261
+ */
262
+ slots: XOTemplateRoleSlots;
263
+ /**
264
+ * Optional list of variable identifiers required for this role.
265
+ */
266
+ variables?: string[];
267
+ /**
268
+ * Optional list of state identifiers required for this role.
269
+ */
270
+ state?: string[];
271
+ };
272
+ /**
273
+ * Balance configuration for a locking script role.
274
+ */
275
+ type XOTemplateBalance = {
276
+ /**
277
+ * Whether satoshis should be included in balance.
278
+ * - `boolean`: Whether satoshis should be included in the balance.
279
+ * - `Satoshis`: A specific amount of satoshis to include in the balance.
280
+ * - `string`: A CashASM evaluation expression that resolves to a satoshi amount.
281
+ */
282
+ satoshis: boolean | Satoshis | string;
283
+ /**
284
+ * Whether fungible tokens should be included in balance (boolean or number).
285
+ */
286
+ fungibleTokens: boolean | number;
287
+ };
288
+ /**
289
+ * A constant value definition in the template.
290
+ */
291
+ type XOTemplateConstant = XOTemplateViewProperties & {
292
+ /**
293
+ * The type of this constant.
294
+ */
295
+ type: string;
296
+ /**
297
+ * The value of this constant.
298
+ */
299
+ value?: unknown;
300
+ };
301
+ /**
302
+ * A data field definition in the template.
303
+ */
304
+ type XOTemplateData = {
305
+ /**
306
+ * The value for this data field.
307
+ */
308
+ value: string;
309
+ /**
310
+ * The type of this data field.
311
+ */
312
+ type: string;
313
+ /**
314
+ * An optional hint to help apps and users understand this data field.
315
+ */
316
+ hint?: string;
317
+ };
318
+ /**
319
+ * An icon reference in the template.
320
+ */
321
+ type XOTemplateIcon = {
322
+ /**
323
+ * A name for this icon.
324
+ */
325
+ name: string;
326
+ /**
327
+ * The identifier of the icon resource.
328
+ */
329
+ hash: string;
330
+ };
331
+ /**
332
+ * Change automation configuration for inputs.
333
+ */
334
+ type XOTemplateOmitChangeAmounts = {
335
+ /**
336
+ * The amount of satoshis to omit from the change.
337
+ * - `Satoshis`: A specific amount of satoshis to omit.
338
+ * - `string`: A CashASM evaluation expression that resolves to the amount of satoshis to omit.
339
+ */
340
+ satoshis?: Satoshis | string;
341
+ /**
342
+ * The amount of fungible tokens to omit from the change.
343
+ */
344
+ fungibleTokens?: number | string;
345
+ /**
346
+ * The amount of non-fungible tokens to omit from the change.
347
+ */
348
+ nonfungibleTokens?: number | string;
349
+ };
350
+ /**
351
+ * Token configuration for outputs and inputs.
352
+ */
353
+ type XOTemplateToken = {
354
+ /**
355
+ * The category of the token.
356
+ */
357
+ category: string;
358
+ /**
359
+ * The amount of fungible tokens.
360
+ */
361
+ amount?: string | number | null;
362
+ /**
363
+ * The configuration for the non-fungible token.
364
+ */
365
+ nft?: {
366
+ /**
367
+ * The capability of the NFT.
368
+ */
369
+ capability: string;
370
+ /**
371
+ * The commitment data for the NFT.
372
+ */
373
+ commitment: string;
374
+ } | null;
375
+ };
376
+ /**
377
+ * An input definition in the template.
378
+ */
379
+ type XOTemplateInput = XOTemplateViewProperties & {
380
+ /**
381
+ * The amount of satoshis for this input.
382
+ * - `Satoshis`: A specific amount of satoshis.
383
+ * - `string`: A CashASM evaluation expression that resolves to the satoshi amount.
384
+ */
385
+ valueSatoshis?: Satoshis | string;
386
+ /**
387
+ * Token configuration for this input.
388
+ */
389
+ token?: XOTemplateToken | null;
390
+ /**
391
+ * The outpoint index of this input in the transaction.
392
+ */
393
+ outpointIndex?: number;
394
+ /**
395
+ * The outpoint transaction hash of this input in the transaction.
396
+ */
397
+ outpointTransactionHash?: string;
398
+ /**
399
+ * The sequence number of this input.
400
+ */
401
+ sequenceNumber?: number;
402
+ /**
403
+ * The unlocking script for this input.
404
+ */
405
+ unlockingScript?: string;
406
+ /**
407
+ * Omit amount change configuration for this input.
408
+ */
409
+ omitChangeAmounts?: XOTemplateOmitChangeAmounts;
410
+ };
411
+ /**
412
+ * An action reference within a role.
413
+ */
414
+ type XOTemplateLockingScriptRoleAction = {
415
+ /**
416
+ * The action.
417
+ */
418
+ action: string;
419
+ /**
420
+ * The role identifier for this action.
421
+ */
422
+ role: string;
423
+ /**
424
+ * The secret identifier required for this action.
425
+ */
426
+ secrets?: string | string[];
427
+ };
428
+ /**
429
+ * State configuration for a locking script role.
430
+ */
431
+ type XOTemplateLockingScriptRoleState = {
432
+ /**
433
+ * List of variable identifiers required for this role.
434
+ */
435
+ variables?: string[];
436
+ /**
437
+ * List of secret identifiers required for this role.
438
+ */
439
+ secrets?: string[];
440
+ };
441
+ /**
442
+ * A role definition within a locking script.
443
+ */
444
+ type XOTemplateLockingScriptRole = {
445
+ /**
446
+ * State configuration for this role.
447
+ */
448
+ state?: XOTemplateLockingScriptRoleState;
449
+ /**
450
+ * List of action references available to this role.
451
+ */
452
+ actions?: XOTemplateLockingScriptRoleAction[];
453
+ /**
454
+ * Balance configuration for this role.
455
+ */
456
+ balance?: XOTemplateBalance;
457
+ /**
458
+ * Whether outputs locked to this script should be selectable for coin selection.
459
+ */
460
+ selectable?: boolean;
461
+ /**
462
+ * Whether outputs locked to this script are considered private.
463
+ */
464
+ privacy?: boolean;
465
+ };
466
+ /**
467
+ * A locking script definition in the template.
468
+ */
469
+ type XOTemplateLockingScript = XOTemplateViewProperties & {
470
+ /**
471
+ * The type of locking mechanism.
472
+ */
473
+ lockingType?: string;
474
+ /**
475
+ * The locking script.
476
+ */
477
+ lockingScript?: string;
478
+ /**
479
+ * The unlocking script.
480
+ */
481
+ unlockingScript?: string;
482
+ /**
483
+ * The actions available for this locking script.
484
+ */
485
+ actions?: string[];
486
+ /**
487
+ * The state for this locking script.
488
+ */
489
+ state?: string[];
490
+ /**
491
+ * The secrets for this locking script.
492
+ */
493
+ secrets?: string[];
494
+ /**
495
+ * Whether outputs locked to this script should be included in the balance.
496
+ */
497
+ balance?: boolean;
498
+ /**
499
+ * Whether outputs locked to this script should be selectable.
500
+ */
501
+ selectable?: boolean;
502
+ /**
503
+ * Whether outputs locked to this script are considered private.
504
+ */
505
+ privacy?: boolean;
506
+ /**
507
+ * A map of roles defined for this locking script.
508
+ */
509
+ roles?: {
510
+ [roleId: string]: XOTemplateLockingScriptRole;
511
+ };
512
+ };
513
+ /**
514
+ * An output definition in the template.
515
+ */
516
+ type XOTemplateOutput = XOTemplateViewProperties & {
517
+ /**
518
+ * The outpoint index of this output in the transaction.
519
+ */
520
+ outpointIndex?: number;
521
+ /**
522
+ * The locking script for this output.
523
+ */
524
+ lockscript?: string;
525
+ /**
526
+ * The amount of satoshis for this output.
527
+ * - `Satoshis`: A specific amount of satoshis.
528
+ * - `string`: A CashASM evaluation expression that resolves to the satoshi amount.
529
+ */
530
+ valueSatoshis?: Satoshis | string;
531
+ /**
532
+ * Token configuration for this output.
533
+ */
534
+ token?: XOTemplateToken | null;
535
+ };
536
+ /**
537
+ * A role definition within a template.
538
+ */
539
+ type XOTemplateRoleDescription = XOTemplateViewProperties;
540
+ /**
541
+ * A starting action entry point defined in a template.
542
+ */
543
+ type XOTemplateStartingAction = {
544
+ /**
545
+ * The action that can be initiated.
546
+ */
547
+ action: string;
548
+ /**
549
+ * The role that can initiate this action.
550
+ */
551
+ role: string;
552
+ };
553
+ /**
554
+ * A list of starting actions defined in a template.
555
+ */
556
+ type XOTemplateStartingActions = XOTemplateStartingAction[];
557
+ /**
558
+ * Reference to an input in a transaction definition in the template.
559
+ */
560
+ type XOTemplateTransactionInput = {
561
+ /**
562
+ * The input definition identifier.
563
+ */
564
+ input: string;
565
+ /**
566
+ * Optional index of this input in the transaction.
567
+ */
568
+ index?: number;
569
+ };
570
+ /**
571
+ * Reference to an output in a transaction definition in the template.
572
+ */
573
+ type XOTemplateTransactionOutput = {
574
+ /**
575
+ * The output definition identifier.
576
+ */
577
+ output: string;
578
+ /**
579
+ * Optional index of this output in the transaction.
580
+ */
581
+ index?: number;
582
+ };
583
+ /**
584
+ * Role-specific data for a transaction within a template.
585
+ */
586
+ type XOTemplateTransactionRoleData = Partial<XOTemplateViewProperties> & {
587
+ /**
588
+ * The inputs required for this role.
589
+ */
590
+ inputs?: string[];
591
+ /**
592
+ * The outputs required for this role.
593
+ */
594
+ outputs?: string[];
595
+ };
596
+ /**
597
+ * A transaction template definition.
598
+ */
599
+ type XOTemplateTransaction = XOTemplateViewProperties & {
600
+ /**
601
+ * The version of the transaction.
602
+ */
603
+ version?: number;
604
+ /**
605
+ * The locktime for this transaction.
606
+ */
607
+ locktime?: number;
608
+ /**
609
+ * The inputs for this transaction
610
+ */
611
+ inputs?: XOTemplateTransactionInput[];
612
+ /**
613
+ * The outputs for this transaction
614
+ */
615
+ outputs?: XOTemplateTransactionOutput[];
616
+ /**
617
+ * The roles required for this transaction.
618
+ */
619
+ roles?: Record<string, XOTemplateTransactionRoleData>;
620
+ /**
621
+ * Whether this transaction can be composed with other transactions.
622
+ */
623
+ composable?: boolean;
624
+ };
625
+ /**
626
+ * A variable definition in the template.
627
+ */
628
+ type XOTemplateVariable = XOTemplateViewProperties & {
629
+ /**
630
+ * The data type of this variable.
631
+ */
632
+ type?: string;
633
+ /**
634
+ * A hint to help users understand what value to provide.
635
+ */
636
+ hint?: string;
637
+ };
638
+ /**
639
+ * An action within a template.
640
+ */
641
+ type XOTemplateAction = XOTemplateViewProperties & {
642
+ /**
643
+ * The roles for this action.
644
+ */
645
+ roles?: {
646
+ [roleId: string]: XOTemplateActionRole;
647
+ };
648
+ /**
649
+ * The requirements for this action.
650
+ */
651
+ requirements?: {
652
+ roles?: XOTemplateActionRoleRequirement[];
653
+ variables?: string[];
654
+ state?: string[];
655
+ secrets?: string[];
656
+ };
657
+ /**
658
+ * Optional condition script that must evaluate to true for this action
659
+ * to be available.
660
+ */
661
+ condition?: string;
662
+ /**
663
+ * The transaction that this action may create.
664
+ */
665
+ transaction?: string;
666
+ /**
667
+ * The data that this action may use or modify.
668
+ */
669
+ data?: string[];
670
+ };
671
+ /**
672
+ * The XO Template.
673
+ */
674
+ type XOTemplate = XOTemplateViewProperties & {
675
+ /**
676
+ * The URI that identifies the JSON Schema used by this template.
677
+ * This enables documentation, autocompletion, and validation in JSON documents.
678
+ */
679
+ $schema: string;
680
+ /**
681
+ * A number identifying the format version of this template.
682
+ */
683
+ version?: number;
684
+ /**
685
+ * The supported authentication virtual machine versions or network identifiers for this template.
686
+ */
687
+ supported?: string[];
688
+ /**
689
+ * The roles defined in this template.
690
+ */
691
+ roles?: {
692
+ [roleId: string]: XOTemplateRoleDescription;
693
+ };
694
+ /**
695
+ * A list of entry points defining which actions are available to each role at the start.
696
+ */
697
+ start: XOTemplateStartingActions;
698
+ /**
699
+ * The actions defined in this template.
700
+ */
701
+ actions: {
702
+ [actionId: string]: XOTemplateAction;
703
+ };
704
+ /**
705
+ * The data fields defined in this template.
706
+ */
707
+ data?: {
708
+ [dataId: string]: XOTemplateData;
709
+ };
710
+ /**
711
+ * The transaction templates defined in this template.
712
+ */
713
+ transactions?: {
714
+ [transactionId: string]: XOTemplateTransaction;
715
+ };
716
+ /**
717
+ * The inputs defined in this template.
718
+ */
719
+ inputs: {
720
+ [inputId: string]: XOTemplateInput;
721
+ };
722
+ /**
723
+ * The outputs defined in this template.
724
+ */
725
+ outputs: {
726
+ [outputId: string]: XOTemplateOutput;
727
+ };
728
+ /**
729
+ * The locking script templates defined in this template.
730
+ */
731
+ lockingScripts: {
732
+ [scriptId: string]: XOTemplateLockingScript;
733
+ };
734
+ /**
735
+ * The scripts used in this template.
736
+ */
737
+ scripts: {
738
+ [scriptId: string]: string;
739
+ };
740
+ /**
741
+ * The constants defined in this template.
742
+ */
743
+ constants?: {
744
+ [constantId: string]: XOTemplateConstant;
745
+ };
746
+ /**
747
+ * The variables that must be provided for use in the template's scripts.
748
+ */
749
+ variables?: {
750
+ [variableId: string]: XOTemplateVariable;
751
+ };
752
+ /**
753
+ * The icons available for use throughout the template.
754
+ */
755
+ icons?: XOTemplateIcon[];
756
+ /**
757
+ * The scenarios defined in this template.
758
+ */
759
+ scenarios: unknown;
760
+ };
761
+ //#endregion
762
+ export { Satoshis, XOInvitation, XOInvitationCommit, XOInvitationInput, XOInvitationOutput, XOInvitationRequirements, XOInvitationRoleRequirement, XOInvitationVariable, XOInvitationVariableValue, XOTemplate, XOTemplateAction, XOTemplateActionRole, XOTemplateActionRoleRequirement, XOTemplateActionRoleRequirements, XOTemplateBalance, XOTemplateConstant, XOTemplateData, XOTemplateIcon, XOTemplateInput, XOTemplateLockingScript, XOTemplateLockingScriptRole, XOTemplateLockingScriptRoleAction, XOTemplateLockingScriptRoleState, XOTemplateOmitChangeAmounts, XOTemplateOutput, XOTemplateRoleDescription, XOTemplateRoleSlots, XOTemplateStartingAction, XOTemplateStartingActions, XOTemplateToken, XOTemplateTransaction, XOTemplateTransactionInput, XOTemplateTransactionOutput, XOTemplateTransactionRoleData, XOTemplateVariable, XOTemplateViewProperties };
763
+ //# sourceMappingURL=index.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.mts","names":[],"sources":["../source/invitation.ts","../source/template.ts"],"mappings":";;;;AAKA;;KAAY,2BAAA;EACR,SAAA;EACA,MAAA;EACA,OAAA;AAAA;AAAA;;;AAAA,KAMQ,wBAAA,GAA2B,2BAAA;EACnC,KAAA,GAAQ,MAAA,SAAe,2BAAA;AAAA;AAAA;;;AAAA,KAMf,yBAAA;AAAA;;;AAAA,KAKA,oBAAA;EAAA;;;EAKR,kBAAA;EAAA;;;EAKA,KAAA,EAAO,yBAAA;EAAA;;;EAKP,cAAA;AAAA;AAAA;;;AAAA,KAMQ,iBAAA,GAAoB,OAAA,CAAQ,KAAA;EAAA;;;EAKpC,eAAA;EAAA;;;EAKA,gBAAA;EAAA;;;;EAMA,cAAA;EAAA;;;EAKA,UAAA;IAAA;;;IAKI,gBAAA;IAAA;;;;IAMA,KAAA;EAAA;AAAA;AAAA;;;AAAA,KAOI,kBAAA,GAAqB,OAAA,CAAQ,MAAA;EAAA;;;EAKrC,gBAAA;EAAA;;;EAKA,gBAAA;EAAA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A;EAAA;;;EAMtB,YAAA;IACI,KAAA,GAAQ,+BAAA;IACR,SAAA;IACA,KAAA;IACA,OAAA;EAAA;EAAA;;;;EAOJ,SAAA;EAAA;;;EAKA,WAAA;EAAA;;;EAKA,IAAA;AAAA;AAAA;;;AAAA,KAMQ,UAAA,GAAa,wBAAA;EAAA;;;;EAMrB,OAAA;EAAA;;;EAKA,OAAA;EAAA;;;EAKA,SAAA;EAAA;;;EAKA,KAAA;IAAA,CACK,MAAA,WAAiB,yBAAA;EAAA;EAAA;;;EAMtB,KAAA,EAAO,yBAAA;EAAA;;;EAKP,OAAA;IAAA,CACK,QAAA,WAAmB,gBAAA;EAAA;EAAA;;;EAMxB,IAAA;IAAA,CACK,MAAA,WAAiB,cAAA;EAAA;EAAA;;;EAMtB,YAAA;IAAA,CACK,aAAA,WAAwB,qBAAA;EAAA;EAAA;;;EAM7B,MAAA;IAAA,CACK,OAAA,WAAkB,eAAA;EAAA;EAAA;;;EAMvB,OAAA;IAAA,CACK,QAAA,WAAmB,gBAAA;EAAA;EAAA;;;EAMxB,cAAA;IAAA,CACK,QAAA,WAAmB,uBAAA;EAAA;EAAA;;;EAMxB,OAAA;IAAA,CACK,QAAA;EAAA;EAAA;;;EAML,SAAA;IAAA,CACK,UAAA,WAAqB,kBAAA;EAAA;EAAA;;;EAM1B,SAAA;IAAA,CACK,UAAA,WAAqB,kBAAA;EAAA;EAAA;;;EAM1B,KAAA,GAAQ,cAAA;EAAA;;;EAKR,SAAA;AAAA"}
package/dist/index.mjs ADDED
@@ -0,0 +1 @@
1
+ export { };
package/package.json ADDED
@@ -0,0 +1,66 @@
1
+ {
2
+ "name": "@xo-cash/types",
3
+ "version": "0.0.1-development.13474028765",
4
+ "description": "XO type definitions and interfaces",
5
+ "type": "module",
6
+ "types": "./dist/index.d.mts",
7
+ "source": "./source/index.ts",
8
+ "module": "./dist/index.mjs",
9
+ "exports": {
10
+ "types": "./dist/index.d.mts",
11
+ "default": "./dist/index.mjs"
12
+ },
13
+ "publishConfig": {
14
+ "access": "public"
15
+ },
16
+ "sideEffects": false,
17
+ "scripts": {
18
+ "analyze": "tsdown --clean --no-fixed-extension --sourcemap source/index.ts && esbuild-analyzer dist/",
19
+ "build": "tsdown --clean --sourcemap source/index.ts",
20
+ "docs": "typedoc --hideGenerator --categorizeByGroup",
21
+ "format": "prettier --write . && eslint --fix",
22
+ "spellcheck": "cspell 'source/**' 'test/**' 'playground/**'",
23
+ "style": "eslint",
24
+ "syntax": "tsc --noEmit",
25
+ "test": "vitest --dir test/ --test-timeout=15000 --passWithNoTests --run --coverage"
26
+ },
27
+ "files": [
28
+ "dist"
29
+ ],
30
+ "repository": {
31
+ "type": "git",
32
+ "url": "git+https://gitlab.com/GeneralProtocols/xo/types.git"
33
+ },
34
+ "author": "GeneralProtocols",
35
+ "license": "MIT",
36
+ "bugs": {
37
+ "url": "https://gitlab.com/GeneralProtocols/xo/types/issues"
38
+ },
39
+ "homepage": "https://gitlab.com/GeneralProtocols/xo/types#readme",
40
+ "keywords": [
41
+ "bitcoin cash",
42
+ "xo"
43
+ ],
44
+ "dependencies": {
45
+ "@bitauth/libauth": "^3.1.0-next.8"
46
+ },
47
+ "devDependencies": {
48
+ "@chalp/eslint-airbnb": "^1.3.0",
49
+ "@generalprotocols/cspell-dictionary": "^1.0.1",
50
+ "@stylistic/eslint-plugin": "^5.7.0",
51
+ "@typescript-eslint/eslint-plugin": "^8.53.1",
52
+ "@typescript-eslint/parser": "^8.53.1",
53
+ "@vitest/coverage-v8": "^4.0.17",
54
+ "@viz-kit/esbuild-analyzer": "^1.0.0",
55
+ "@xo-cash/eslint-config": "1.0.1",
56
+ "cspell": "^9.6.0",
57
+ "eslint": "^9.39.2",
58
+ "prettier": "^3.6.2",
59
+ "tsdown": "^0.20.0-beta.4",
60
+ "typedoc": "^0.28.16",
61
+ "typedoc-plugin-coverage": "^4.0.2",
62
+ "typescript": "^5.3.2",
63
+ "typescript-eslint": "^8.53.1",
64
+ "vitest": "^4.0.17"
65
+ }
66
+ }