@xo-cash/templates 0.0.3 → 0.0.4

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/dist/index.d.mts CHANGED
@@ -1,5 +1,758 @@
1
- import { XOTemplate } from "@xo-cash/types";
2
-
1
+ //#region node_modules/@xo-cash/types/dist/index.d.mts
2
+ //#region source/utilities.d.ts
3
+ /**
4
+ * Union of all property values in an object type.
5
+ *
6
+ * Use this to derive a string literal union from a runtime const object declared
7
+ * with `as const`.
8
+ *
9
+ * @example
10
+ * export const XOTemplateLockingTypes = {
11
+ * P2S: 'p2s',
12
+ * P2PKH: 'p2pkh',
13
+ * P2SH: 'p2sh',
14
+ * } as const;
15
+ *
16
+ * export type XOTemplateLockingType = ValueOf<typeof XOTemplateLockingTypes>;
17
+ * // 'p2s' | 'p2pkh' | 'p2sh'
18
+ */
19
+ type ValueOf<T> = T[keyof T];
20
+ //#endregion
21
+ //#region source/template.d.ts
22
+ /**
23
+ * Type for satoshis.
24
+ */
25
+ type Satoshis = bigint;
26
+ /**
27
+ * A fungible token amount.
28
+ */
29
+ type FungibleTokenAmount = bigint;
30
+ /**
31
+ * Values for BCH VM versions that an XO template can declare support for.
32
+ */
33
+ declare const BchVmVersions: {
34
+ readonly BCH_2020_05: "BCH_2020_05";
35
+ readonly BCH_2021_05: "BCH_2021_05";
36
+ readonly BCH_2022_05: "BCH_2022_05";
37
+ readonly BCH_2023_05: "BCH_2023_05";
38
+ readonly BCH_2024_05: "BCH_2024_05";
39
+ readonly BCH_2025_05: "BCH_2025_05";
40
+ readonly BCH_2026_05: "BCH_2026_05";
41
+ };
42
+ /**
43
+ * The set of BCH VM versions that an XO template can declare support for.
44
+ */
45
+ type BchVmVersion = ValueOf<typeof BchVmVersions>;
46
+ /**
47
+ * Values for NFT capability on template token fields.
48
+ */
49
+ declare const XOTemplateNftCapabilities: {
50
+ readonly NONE: "none";
51
+ readonly MUTABLE: "mutable";
52
+ readonly MINTING: "minting";
53
+ };
54
+ /**
55
+ * The capability of a non-fungible token.
56
+ * `minting` can create new NFTs of the same category.
57
+ * `mutable` can update its own commitment data.
58
+ * `none` means the commitment is immutable.
59
+ */
60
+ type XOTemplateNftCapability = ValueOf<typeof XOTemplateNftCapabilities>;
61
+ /**
62
+ * Values for XO template locking script types.
63
+ */
64
+ declare const XOTemplateLockingTypes: {
65
+ readonly P2S: "p2s";
66
+ readonly P2PKH: "p2pkh";
67
+ readonly P2SH: "p2sh";
68
+ };
69
+ /**
70
+ * The standard locking script types supported by XO.
71
+ *
72
+ */
73
+ type XOTemplateLockingType = ValueOf<typeof XOTemplateLockingTypes>;
74
+ /**
75
+ * Values for base types declared in an XO template.
76
+ * Used by constants, variables, and data fields.
77
+ */
78
+ declare const XOTemplateBaseTypes: {
79
+ readonly BOOLEAN: "boolean";
80
+ readonly BYTES: "bytes";
81
+ readonly INTEGER: "integer";
82
+ readonly BIGINT: "bigint";
83
+ readonly STRING: "string";
84
+ };
85
+ /**
86
+ * The base types that can be declared in an XO template.
87
+ * Used by constants, variables, and data fields.
88
+ */
89
+ type XOTemplateBaseType = ValueOf<typeof XOTemplateBaseTypes>;
90
+ /**
91
+ * Values for primitive types declared in an XO template.
92
+ * Used by constants, variables, and data fields.
93
+ */
94
+ declare const XOTemplatePrimitiveTypes: {
95
+ readonly PRIVATE_KEY: "private_key";
96
+ readonly PUBLIC_KEY: "public_key";
97
+ readonly EXTENDED_PUBLIC_KEY: "extended_public_key";
98
+ readonly SATOSHIS: "satoshis";
99
+ readonly FUNGIBLE_TOKEN_AMOUNT: "token_amount";
100
+ readonly NON_FUNGIBLE_TOKEN_CAPABILITY: "token_capability";
101
+ readonly NON_FUNGIBLE_TOKEN_COMMITMENT: "token_commitment";
102
+ readonly TIMESTAMP: "timestamp";
103
+ readonly TOKEN_CATEGORY: "token_category";
104
+ readonly NFT_COMMITMENT: "nft_commitment";
105
+ readonly LOCKING_SCRIPT: "locking_script";
106
+ readonly TRANSACTION_HASH: "transaction_hash";
107
+ readonly TEMPLATE_IDENTIFIER: "template_identifier";
108
+ readonly SCHNORR_SIGNATURE: "signature";
109
+ };
110
+ /**
111
+ * The primitive types that can be declared in an XO template.
112
+ * Used by constants, variables, and data fields.
113
+ */
114
+ type XOTemplatePrimitiveType = ValueOf<typeof XOTemplatePrimitiveTypes>;
115
+ /** Identifies a role defined in the template's roles. */
116
+ type XOTemplateRoleIdentifier = string;
117
+ /** Identifies an action defined in the template's actions. */
118
+ type XOTemplateActionIdentifier = string;
119
+ /** Identifies an input defined in the template's inputs. */
120
+ type XOTemplateInputIdentifier = string;
121
+ /** Identifies an output defined in the template's outputs. */
122
+ type XOTemplateOutputIdentifier = string;
123
+ /** Identifies a locking script defined in the template's lockingScripts. */
124
+ type XOTemplateLockingScriptIdentifier = string;
125
+ /** Identifies a script defined in the template's scripts. */
126
+ type XOTemplateScriptIdentifier = string;
127
+ /** Identifies a transaction defined in the template's transactions. */
128
+ type XOTemplateTransactionIdentifier = string;
129
+ /** Identifies a variable defined in the template's variables. */
130
+ type XOTemplateVariableIdentifier = string;
131
+ /** Identifies a constant defined in the template's constants. */
132
+ type XOTemplateConstantIdentifier = string;
133
+ /** Identifies a data field defined in the template's data. */
134
+ type XOTemplateDataIdentifier = string;
135
+ /** Identifies a secret defined in a role or action's secrets list. */
136
+ type XOTemplateSecretIdentifier = string;
137
+ /** Identifier for an XO template. */
138
+ type XOTemplateIdentifier = string;
139
+ /**
140
+ * Human-readable display properties shared by most template elements.
141
+ */
142
+ type XOTemplateViewProperties = {
143
+ /**
144
+ * A short human-readable label for this element.
145
+ */
146
+ name: string;
147
+ /**
148
+ * A human-readable explanation of what this element does and when it is relevant.
149
+ */
150
+ description: string;
151
+ /**
152
+ * An optional icon identifier.
153
+ */
154
+ icon?: string;
155
+ };
156
+ /**
157
+ * The base intent structure. Describes the common data parameters shared by all intent types
158
+ * regardless of what they target. An optional templateIdentifier allows the intent to reference
159
+ * a target defined in a different template.
160
+ */
161
+ type XOTemplateIntent = {
162
+ /**
163
+ * Optional identifier for the template used in this intent. If not provided, uses the current template.
164
+ */
165
+ templateIdentifier?: XOTemplateIdentifier;
166
+ /**
167
+ * Identifiers for items to generate when this intent is resolved (e.g. keys or secrets).
168
+ */
169
+ generate?: Array<string>;
170
+ /**
171
+ * Variable values to apply when this intent is resolved.
172
+ */
173
+ variables?: Array<Record<XOTemplateVariableIdentifier, unknown>>;
174
+ /**
175
+ * Constant values to apply when this intent is resolved.
176
+ */
177
+ constants?: Array<Record<XOTemplateConstantIdentifier, unknown>>;
178
+ /**
179
+ * Secret values to apply when this intent is resolved.
180
+ */
181
+ secrets?: Array<Record<XOTemplateSecretIdentifier, unknown>>;
182
+ /**
183
+ * Optional identifier for the role used in this intent.
184
+ */
185
+ role?: XOTemplateRoleIdentifier;
186
+ };
187
+ /**
188
+ * An intent that targets a specific action.
189
+ */
190
+ type XOTemplateActionIntent = XOTemplateIntent & {
191
+ /**
192
+ * The identifier for the intended action.
193
+ */
194
+ action: XOTemplateActionIdentifier;
195
+ };
196
+ /**
197
+ * An intent that targets a specific output.
198
+ */
199
+ type XOTemplateOutputIntent = XOTemplateIntent & {
200
+ /**
201
+ * The identifier for the intended output.
202
+ */
203
+ output: XOTemplateOutputIdentifier;
204
+ };
205
+ /**
206
+ * Requirements for a specific role within an action. Describes what data or secrets
207
+ * the role must provide when participating.
208
+ */
209
+ type XOTemplateActionRoleRequirements = {
210
+ /**
211
+ * List of variable identifiers required for this role.
212
+ */
213
+ variables?: Array<XOTemplateVariableIdentifier>;
214
+ /**
215
+ * List of secret identifiers required for this role.
216
+ */
217
+ secrets?: Array<XOTemplateSecretIdentifier>;
218
+ };
219
+ /**
220
+ * A role specific definition within an action.
221
+ */
222
+ type XOTemplateActionRole = Partial<XOTemplateViewProperties> & {
223
+ /**
224
+ * Identifiers for data items that should be generated for this role
225
+ * when participating in the action.
226
+ */
227
+ generate?: Array<string>;
228
+ /**
229
+ * The requirements for this role within this action.
230
+ */
231
+ requirements?: XOTemplateActionRoleRequirements;
232
+ };
233
+ /**
234
+ * Slot configuration for a role. Declares how many participants of a given
235
+ * role are needed to satisfy the action's requirements.
236
+ */
237
+ type XOTemplateRoleSlotsRequirements = {
238
+ /**
239
+ * Minimum number of participants required for this role.
240
+ */
241
+ min: number;
242
+ /**
243
+ * Maximum number of participants allowed for this role. Undefined means unlimited.
244
+ */
245
+ max?: number;
246
+ };
247
+ /**
248
+ * A role entry in an action's requirements block.
249
+ * Declares which role must participate and how many slots are needed.
250
+ */
251
+ type XOTemplateRoleSlot = {
252
+ /**
253
+ * The role identifier that this requirement applies to.
254
+ */
255
+ role: XOTemplateRoleIdentifier;
256
+ /**
257
+ * Slot configuration specifying how many participants of this role are required.
258
+ */
259
+ slots: XOTemplateRoleSlotsRequirements;
260
+ };
261
+ /**
262
+ * Requirements for an action. Declares which roles must participate and what secrets must be available.
263
+ */
264
+ type XOTemplateActionRequirements = {
265
+ /**
266
+ * List of variable identifiers required for this action.
267
+ */
268
+ variables?: Array<XOTemplateVariableIdentifier>;
269
+ /**
270
+ * The participants required for this action.
271
+ */
272
+ participants?: Array<XOTemplateRoleSlot>;
273
+ /**
274
+ * The secrets required for this action.
275
+ */
276
+ secrets?: Array<XOTemplateSecretIdentifier>;
277
+ };
278
+ /**
279
+ * An action within a template.
280
+ */
281
+ type XOTemplateAction = XOTemplateViewProperties & {
282
+ /**
283
+ * Specific context for each role participating in this action.
284
+ */
285
+ roles?: Record<XOTemplateRoleIdentifier, XOTemplateActionRole>;
286
+ /**
287
+ * The requirements for this action.
288
+ */
289
+ requirements?: XOTemplateActionRequirements;
290
+ /**
291
+ * Conditions that must be met for this action to be available.
292
+ *
293
+ * @todo More work needs to be done on this field.
294
+ */
295
+ conditions?: Array<string>;
296
+ /**
297
+ * The identifier of the transaction this action produces, referencing an entry
298
+ * in the template's transactions.
299
+ */
300
+ transaction?: XOTemplateTransactionIdentifier;
301
+ /**
302
+ * The identifier of the data field this action produces, referencing an entry
303
+ * in the template's data.
304
+ *
305
+ * @todo More work needs to be done on this field.
306
+ */
307
+ data?: XOTemplateDataIdentifier;
308
+ };
309
+ /**
310
+ * Non-fungible token configuration within a token field.
311
+ */
312
+ type XOTemplateNonFungibleTokenDetails = {
313
+ /**
314
+ * The capability of the NFT. May be a known capability value or a CashASM expression resolving to a capability.
315
+ */
316
+ capability?: XOTemplateNftCapability | string;
317
+ /**
318
+ * The commitment data for the NFT, as a string or CashASM expression resolving to a commitment.
319
+ */
320
+ commitment?: string;
321
+ };
322
+ /**
323
+ * Token configuration for outputs and inputs.
324
+ */
325
+ type XOTemplateToken = {
326
+ /**
327
+ * The category of the token, as a string or CashASM expression resolving to a category.
328
+ */
329
+ category?: string;
330
+ /**
331
+ * The amount of fungible tokens as a bigint, a CashASM expression resolving to a bigint, or null indicating no FT is present.
332
+ */
333
+ amount?: bigint | string | null;
334
+ /**
335
+ * Non-fungible token configuration. Null indicates no NFT is present.
336
+ */
337
+ nft?: XOTemplateNonFungibleTokenDetails | null;
338
+ };
339
+ /**
340
+ * Asset amounts configuration. Used for balance tracking on locking scripts and their roles, and for omitting change amounts.
341
+ * All fields are optional. Values may be literal amounts or CashASM expressions resolving to amounts.
342
+ */
343
+ type XOTemplateAssetAmounts = {
344
+ /**
345
+ * The satoshi amount.
346
+ * - `Satoshis`: A specific bigint amount.
347
+ * - `string`: A CashASM expression that resolves to the amount.
348
+ * - `true`: all, i.e. the entire amount
349
+ */
350
+ satoshis?: Satoshis | string | true;
351
+ /**
352
+ * The fungible token amount.
353
+ * - `FungibleTokenAmount`: A specific bigint amount.
354
+ * - `string`: A CashASM expression that resolves to the amount.
355
+ * - `true`: all, i.e. the entire amount
356
+ */
357
+ fungibleTokens?: FungibleTokenAmount | string | true;
358
+ /**
359
+ * Whether a non-fungible token is present (0 for absent, 1 for present),
360
+ * or a CashASM expression that evaluates to 0 or 1.
361
+ * - `true`: resolves to 1 if an NFT is present, or 0 if none is present. Use this when
362
+ * the NFT is optional, to express that the NFT is estimated to be part of the balance
363
+ * if present, or absent from it if not.
364
+ * - `0`: None, i.e. nothing is expected to be included
365
+ * - `1`: present and complete, as value > 1 does not make sense for non-fungible tokens
366
+ * - `string`: A CashASM expression that evaluates to 0 or 1.
367
+ */
368
+ nonfungibleTokens?: true | 0 | 1 | string;
369
+ };
370
+ /**
371
+ * State configuration shared by a locking script and its individual roles.
372
+ * Declares which variables and secrets are tracked in the on-chain state for that participant.
373
+ */
374
+ type XOTemplateState = {
375
+ /**
376
+ * List of variable identifiers to track in state.
377
+ */
378
+ variables?: Array<XOTemplateVariableIdentifier>;
379
+ /**
380
+ * List of secret identifiers to track in state.
381
+ */
382
+ secrets?: Array<XOTemplateSecretIdentifier>;
383
+ };
384
+ /**
385
+ * A role definition within a locking script.
386
+ */
387
+ type XOTemplateLockingScriptRole = Partial<XOTemplateViewProperties> & {
388
+ /**
389
+ * List of items to track as state for this role.
390
+ */
391
+ state?: XOTemplateState;
392
+ /**
393
+ * List of action references available to this role.
394
+ */
395
+ actions?: Array<XOTemplateActionIntent>;
396
+ /**
397
+ * Estimated ownership in the optional set of asset amounts specified.
398
+ */
399
+ balance?: Partial<XOTemplateAssetAmounts>;
400
+ /**
401
+ * Whether outputs locked to this script should be available for coin selection.
402
+ */
403
+ selectable?: boolean;
404
+ /**
405
+ * Whether this output or locking script should be tracked by the engine.
406
+ * When omitted, the engine treats this field as true.
407
+ * - `true`: Include it.
408
+ * - `false`: Exclude it.
409
+ * - `string`: A CashASM expression that evaluates to a boolean relevance value.
410
+ */
411
+ relevant?: boolean | string;
412
+ /**
413
+ * Privacy level for outputs locked to this script.
414
+ * - `number`: A numeric privacy level.
415
+ * - `string`: A CashASM expression that evaluates to a privacy level.
416
+ */
417
+ privacy?: number | string;
418
+ };
419
+ /**
420
+ * A locking script definition in the template.
421
+ */
422
+ type XOTemplateLockingScript = XOTemplateViewProperties & {
423
+ /**
424
+ * The type of locking mechanism. Defaults to 'p2s' if not specified.
425
+ */
426
+ lockingType?: XOTemplateLockingType;
427
+ /**
428
+ * The locking script bytecode.
429
+ */
430
+ lockingBytecode: string;
431
+ /**
432
+ * Optional default unlocking bytecode when used in automatic coin selection.
433
+ */
434
+ unlockingBytecode?: string;
435
+ /**
436
+ * The actions available for this locking script.
437
+ */
438
+ actions?: Array<XOTemplateActionIntent>;
439
+ /**
440
+ * List of items to track as state for all participants.
441
+ */
442
+ state?: XOTemplateState;
443
+ /**
444
+ * Estimated ownership in the optional set of asset amounts specified.
445
+ */
446
+ balance?: Partial<XOTemplateAssetAmounts>;
447
+ /**
448
+ * Whether outputs locked to this script should be available for coin selection.
449
+ */
450
+ selectable?: boolean;
451
+ /**
452
+ * Privacy level for outputs locked to this script.
453
+ * - `number`: A numeric privacy level.
454
+ * - `string`: A CashASM expression that evaluates to a privacy level.
455
+ */
456
+ privacy?: number | string;
457
+ /**
458
+ * Specific context for each role participating in this locking script.
459
+ */
460
+ roles?: Record<XOTemplateRoleIdentifier, XOTemplateLockingScriptRole>;
461
+ };
462
+ /**
463
+ * An input definition in the template.
464
+ */
465
+ type XOTemplateInput = XOTemplateViewProperties & {
466
+ /**
467
+ * The amount of satoshis for this input.
468
+ * - `Satoshis`: A specific amount of satoshis.
469
+ * - `string`: A CashASM expression that resolves to the satoshi amount.
470
+ */
471
+ valueSatoshis?: Satoshis | string;
472
+ /**
473
+ * Token configuration for this input.
474
+ */
475
+ token?: XOTemplateToken | null;
476
+ /**
477
+ * The sequence number of this input.
478
+ * - `number`: A specific sequence number.
479
+ * - `string`: A CashASM expression that resolves to the sequence number.
480
+ */
481
+ sequenceNumber?: number | string;
482
+ /**
483
+ * Identifier of the unlocking script to use for the UTXO provided for this input.
484
+ */
485
+ unlockingScript?: string;
486
+ /**
487
+ * Amount of change that should be omitted from the automatic change handling. WARNING: Setting this can result in loss of funds!
488
+ */
489
+ omitChangeAmounts?: XOTemplateAssetAmounts;
490
+ };
491
+ /**
492
+ * An output definition in the template. Inherits all fields from `XOTemplateLockingScript`
493
+ * except `lockingType`, `lockingBytecode` and `unlockingBytecode`: outputs reference a locking script by identifier
494
+ * rather than defining one inline, so repeating any of these fields here would create an ambiguity
495
+ * about which declaration takes precedence.
496
+ */
497
+ type XOTemplateOutput = Omit<XOTemplateLockingScript, 'lockingType' | 'lockingBytecode' | 'unlockingBytecode'> & {
498
+ /**
499
+ * Identifier of the locking script to use for this output.
500
+ */
501
+ lockingScript: XOTemplateLockingScriptIdentifier;
502
+ /**
503
+ * The amount of satoshis for this output.
504
+ * - `Satoshis`: A specific amount of satoshis.
505
+ * - `string`: A CashASM expression that resolves to the satoshi amount.
506
+ */
507
+ valueSatoshis?: Satoshis | string;
508
+ /**
509
+ * Token configuration for this output.
510
+ */
511
+ token?: XOTemplateToken | null;
512
+ };
513
+ /**
514
+ * Reference to an input in a transaction definition in the template.
515
+ */
516
+ type XOTemplateTransactionInput = {
517
+ /**
518
+ * The input definition identifier.
519
+ */
520
+ input: XOTemplateInputIdentifier;
521
+ /**
522
+ * Optional index of this input in the transaction.
523
+ */
524
+ inputIndex?: number;
525
+ };
526
+ /**
527
+ * Reference to an output in a transaction definition in the template.
528
+ */
529
+ type XOTemplateTransactionOutput = {
530
+ /**
531
+ * The output definition identifier.
532
+ */
533
+ output: XOTemplateOutputIdentifier;
534
+ /**
535
+ * Optional index of this output in the transaction.
536
+ */
537
+ outputIndex?: number;
538
+ };
539
+ /**
540
+ * Role-specific data for a transaction within a template.
541
+ */
542
+ type XOTemplateTransactionRoleData = Partial<XOTemplateViewProperties> & {
543
+ /**
544
+ * The inputs required for this role.
545
+ */
546
+ inputs?: Array<XOTemplateTransactionInput>;
547
+ /**
548
+ * The outputs required for this role.
549
+ */
550
+ outputs?: Array<XOTemplateTransactionOutput>;
551
+ };
552
+ /**
553
+ * A transaction template definition.
554
+ */
555
+ type XOTemplateTransaction = XOTemplateViewProperties & {
556
+ /**
557
+ * The version of the transaction.
558
+ */
559
+ version?: number;
560
+ /**
561
+ * The locktime for this transaction.
562
+ * - `number`: A specific locktime value.
563
+ * - `string`: A CashASM expression that resolves to the locktime.
564
+ */
565
+ locktime?: number | string;
566
+ /**
567
+ * The inputs for this transaction.
568
+ */
569
+ inputs: Array<XOTemplateTransactionInput>;
570
+ /**
571
+ * The outputs for this transaction.
572
+ */
573
+ outputs: Array<XOTemplateTransactionOutput>;
574
+ /**
575
+ * Specific context for each role participating in this transaction.
576
+ */
577
+ roles?: Record<XOTemplateRoleIdentifier, XOTemplateTransactionRoleData>;
578
+ /**
579
+ * Whether this transaction can be composed with other transactions.
580
+ */
581
+ composable?: boolean;
582
+ };
583
+ /**
584
+ * A constant value definition in the template.
585
+ */
586
+ type XOTemplateConstant = XOTemplateViewProperties & {
587
+ /**
588
+ * The data type of this constant.
589
+ */
590
+ type: XOTemplateBaseType;
591
+ /**
592
+ * The value of this constant.
593
+ */
594
+ value: unknown;
595
+ /**
596
+ * An optional hint to help apps and users understand what this constant represents.
597
+ */
598
+ hint?: XOTemplatePrimitiveType;
599
+ };
600
+ /**
601
+ * An import default value intent. Extends the base intent with optional view
602
+ * properties that the engine evaluates at runtime to produce human-readable output.
603
+ * The engine overrides whatever values are set here when resolving the target for a participant.
604
+ */
605
+ type XOTemplateImportDefaultValue = XOTemplateIntent & Partial<XOTemplateViewProperties>;
606
+ /**
607
+ * A variable definition in the template.
608
+ */
609
+ type XOTemplateVariable = XOTemplateViewProperties & {
610
+ /**
611
+ * The data type of this variable.
612
+ */
613
+ type?: XOTemplateBaseType;
614
+ /**
615
+ * A hint to help users understand what value to provide.
616
+ */
617
+ hint?: XOTemplatePrimitiveType;
618
+ /**
619
+ * A neutral intent that the engine uses to populate the default value for this variable.
620
+ * View properties (name, description, icon) may contain CashASM expressions that the
621
+ * engine evaluates at runtime to produce human-readable output.
622
+ */
623
+ importDefaultValue?: XOTemplateImportDefaultValue;
624
+ };
625
+ /**
626
+ * A data field definition in the template.
627
+ *
628
+ * @todo More work needs to be done on this type.
629
+ */
630
+ type XOTemplateData = {
631
+ /**
632
+ * The data type of this data field.
633
+ */
634
+ type: XOTemplateBaseType;
635
+ /**
636
+ * The value for this data field.
637
+ */
638
+ value: unknown;
639
+ /**
640
+ * An optional hint to help apps and users understand this data field.
641
+ */
642
+ hint?: XOTemplatePrimitiveType;
643
+ };
644
+ /**
645
+ * An icon reference in the template.
646
+ */
647
+ type XOTemplateIcon = {
648
+ /**
649
+ * A name for this icon.
650
+ */
651
+ name: string;
652
+ /**
653
+ * The identifier of the icon.
654
+ */
655
+ hash: string;
656
+ };
657
+ /**
658
+ * A resource reference attached to a template. Extends view properties with a URL
659
+ * pointing to external documentation or tooling.
660
+ */
661
+ type XOTemplateResource = XOTemplateViewProperties & {
662
+ /**
663
+ * The URL for this resource.
664
+ */
665
+ url: string;
666
+ };
667
+ /**
668
+ * Default settings applied across the template when no explicit per-action overrides are given.
669
+ */
670
+ type XOTemplateDefaults = {
671
+ /**
672
+ * Instructions for how to construct automated change output.
673
+ */
674
+ change?: XOTemplateOutputIntent;
675
+ };
676
+ /**
677
+ * The XO Template.
678
+ */
679
+ type XOTemplate = XOTemplateViewProperties & {
680
+ /**
681
+ * The URI that identifies the JSON Schema used by this template.
682
+ * This enables documentation, autocompletion, and validation in JSON documents.
683
+ */
684
+ $schema: string;
685
+ /**
686
+ * A string identifying the version of this template.
687
+ */
688
+ version?: string;
689
+ /**
690
+ * The BCH VM versions that this template supports. At least one version is required.
691
+ */
692
+ supported: Array<BchVmVersion>;
693
+ /**
694
+ * Optional default settings used in this template.
695
+ */
696
+ defaults?: XOTemplateDefaults;
697
+ /**
698
+ * The roles defined in this template.
699
+ */
700
+ roles: Record<XOTemplateRoleIdentifier, XOTemplateViewProperties>;
701
+ /**
702
+ * A list of entry points defining which actions are available at the start.
703
+ */
704
+ start: Array<XOTemplateActionIntent>;
705
+ /**
706
+ * The actions defined in this template.
707
+ */
708
+ actions: Record<XOTemplateActionIdentifier, XOTemplateAction>;
709
+ /**
710
+ * The data fields defined in this template.
711
+ */
712
+ data?: Record<XOTemplateDataIdentifier, XOTemplateData>;
713
+ /**
714
+ * The transaction templates defined in this template.
715
+ */
716
+ transactions?: Record<XOTemplateTransactionIdentifier, XOTemplateTransaction>;
717
+ /**
718
+ * The inputs defined in this template.
719
+ */
720
+ inputs: Record<XOTemplateInputIdentifier, XOTemplateInput>;
721
+ /**
722
+ * The outputs defined in this template.
723
+ */
724
+ outputs: Record<XOTemplateOutputIdentifier, XOTemplateOutput>;
725
+ /**
726
+ * The locking script templates defined in this template.
727
+ */
728
+ lockingScripts: Record<XOTemplateLockingScriptIdentifier, XOTemplateLockingScript>;
729
+ /**
730
+ * The scripts used in this template, The keys are identifiers of the scripts and
731
+ * the values are the bytecode or cashASM expressions.
732
+ */
733
+ scripts: Record<XOTemplateScriptIdentifier, string>;
734
+ /**
735
+ * The constants defined in this template.
736
+ */
737
+ constants?: Record<XOTemplateConstantIdentifier, XOTemplateConstant>;
738
+ /**
739
+ * The variables that must be provided for use in the template's scripts.
740
+ */
741
+ variables?: Record<XOTemplateVariableIdentifier, XOTemplateVariable>;
742
+ /**
743
+ * Resource references providing external documentation or tooling links.
744
+ */
745
+ resources?: Array<XOTemplateResource>;
746
+ /**
747
+ * The icons available for use throughout the template.
748
+ */
749
+ icons?: Array<XOTemplateIcon>;
750
+ /**
751
+ * The scenarios defined in this template.
752
+ */
753
+ scenarios?: unknown;
754
+ };
755
+ //#endregion
3
756
  //#region source/p2pkh.d.ts
4
757
  declare const p2pkhTemplate: XOTemplate;
5
758
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.mts","names":[],"sources":["../source/p2pkh.ts"],"mappings":";;;cAEa,aAAA,EAAe,UAAA"}
1
+ {"version":3,"file":"index.d.mts","names":[],"sources":["../node_modules/@xo-cash/types/dist/index.d.mts","../source/p2pkh.ts"],"x_google_ignoreList":[0],"mappings":";;;;;;;;;;;;;;;;;;KAmBK,QAAQ,KAAK,QAAQ;;;;;;KAMrB;;;;KAIA;;;;cAIS;WACH;WACA;WACA;WACA;WACA;WACA;WACA;;;;;KAKN,eAAe,e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A4B;;;;EAI5C,OAAO,OAAO,0BAA0B;;;;EAIxC,eAAe,OAAO,iCAAiC;;;;EAIvD,QAAQ,OAAO,2BAA2B;;;;EAI1C,SAAS,OAAO,4BAA4B;;;;EAI5C,gBAAgB,OAAO,mCAAmC;;;;;EAK1D,SAAS,OAAO;;;;EAIhB,YAAY,OAAO,8BAA8B;;;;EAIjD,YAAY,OAAO,8BAA8B;;;;EAIjD,YAAY,MAAM;;;;EAIlB,QAAQ,MAAM;;;;EAId;;;;cCxvBW,eAAe"}
package/dist/index.mjs CHANGED
@@ -1033,7 +1033,7 @@ const p2pkhTemplate = {
1033
1033
  }
1034
1034
  }]
1035
1035
  };
1036
-
1037
1036
  //#endregion
1038
1037
  export { p2pkhTemplate };
1038
+
1039
1039
  //# sourceMappingURL=index.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","names":[],"sources":["../source/p2pkh.ts"],"sourcesContent":["import type { XOTemplate } from '@xo-cash/types';\n\nexport const p2pkhTemplate: XOTemplate = {\n $schema: 'https://libauth.org/schemas/wallet-template-v0.schema.json',\n\n // Name for this template.\n name: 'Wallet (P2PKH)',\n\n // Description for this template.\n description: 'A standard single-factor wallet template that uses Pay-to-Public-Key-Hash (P2PKH) locking scripts.',\n\n // Icon for this template.\n icon: 'wallet',\n\n // Version number for this template.\n version: '1',\n\n // List of VM versions that can be used to run this template.\n supported: [ 'BCH_2023_05', 'BCH_2024_05', 'BCH_2025_05', 'BCH_2026_05' ],\n\n // Sets optional default values to be used with this template.\n defaults: {\n // Configures a default intent structure for creating change outputs and locking scripts.\n // NOTE: This is used when the engine needs to make change for an output created by\n // this template and there is no other policy provided elsewhere that takes precedence.\n // NOTE: It is recommended that templates that create outputs with the 'selectable' property\n // either provides a change policy here, or a comment that explain that they\n // intentionally omit the change policy and why.\n change: {\n output: 'changeOutput',\n role: 'receiver',\n generate: [ 'ownerKey' ],\n },\n },\n\n // Describe a list of roles that are used in this template.\n // NOTE: Template roles are held only for the duration of one specific action/invitation.\n // For example, the same entity that acts as 'receiver' when creating/receiving an output\n // can later act as 'sender' (or 'owner') when performing a follow-up action.\n roles: {\n owner: {\n name: 'Wallet Owner',\n description: 'The party who can spend from this wallet.',\n icon: 'owner',\n },\n receiver: {\n name: 'Receiver',\n description: 'A party that is receiving value.',\n icon: 'receiver',\n },\n sender: {\n name: 'Sender',\n description: 'A party that is sending value.',\n icon: 'sender',\n },\n },\n\n // Define a list of entrypoints supported by this template.\n start: [\n {\n action: 'receive',\n role: 'receiver',\n generate: [ 'ownerKey' ],\n },\n {\n action: 'requestSatoshis',\n role: 'receiver',\n generate: [ 'ownerKey' ],\n },\n {\n action: 'requestFungibleTokens',\n role: 'receiver',\n generate: [ 'ownerKey' ],\n },\n {\n action: 'requestNonfungibleTokens',\n role: 'receiver',\n generate: [ 'ownerKey' ],\n },\n ],\n\n // Define a list of actions that can be taken by this template.\n // NOTE: There is no action to generate an address, but a wallet can create an invitation to a receive action and\n // extract the generated lockscript as needed as the engine will track all lockscripts it generates.\n actions: {\n receive: {\n // TODO: Consider rewriting to be generic/role-less.\n name: 'Receive',\n description: 'Receive an unspecified amount of cash and/or tokens from one or more senders.',\n icon: 'receive',\n\n roles: {\n receiver: {\n name: 'Receive',\n description: 'Receive an unspecified amount of cash and/or tokens from one or more senders.',\n icon: 'receive',\n\n requirements: {\n secrets: [ 'ownerKey' ],\n },\n },\n sender: {\n name: 'Send',\n description: 'Send an unspecified amount of cash and/or tokens to the provided receiver.',\n icon: 'send',\n\n requirements: {\n variables: [ 'transferredSatoshis' ],\n },\n },\n },\n\n requirements: {\n participants: [\n {\n role: 'receiver',\n slots: { min: 1, max: 1 },\n },\n {\n role: 'sender',\n slots: { min: 1, max: undefined },\n },\n ],\n },\n\n transaction: 'receiveTransaction',\n },\n requestSatoshis: {\n // TODO: Consider rewriting to be generic/role-less.\n name: 'Request Satoshis',\n description: 'Requests a specific amount of Bitcoin Cash from one or more senders.',\n icon: 'request',\n\n roles: {\n receiver: {\n name: 'Request Satoshis',\n description: 'Requests a specific amount of Bitcoin Cash from one or more senders.',\n icon: 'request',\n\n requirements: {\n secrets: [ 'ownerKey' ],\n variables: [ 'requestedSatoshis' ],\n },\n },\n sender: {\n name: 'Send',\n description: 'Send a specific amount of Bitcoin Cash to the provided receiver.',\n icon: 'send',\n\n // The sender only need to provide blockchain-level requirements.\n // NOTE: This field is not required when empty, but shown here for illustrative purposes.\n requirements: {},\n },\n },\n\n requirements: {\n participants: [\n {\n role: 'receiver',\n slots: { min: 1, max: 1 },\n },\n {\n role: 'sender',\n slots: { min: 1, max: undefined },\n },\n ],\n },\n\n transaction: 'requestSatoshisTransaction',\n },\n requestFungibleTokens: {\n // TODO: Consider rewriting to be generic/role-less.\n name: 'Request Fungible Tokens',\n description: 'Requests a specific amount of a fungible tokens from one or more senders.',\n icon: 'request',\n\n roles: {\n receiver: {\n name: 'Request Fungible Tokens',\n description: 'Requests a specific amount of a fungible tokens from one or more senders.',\n icon: 'request',\n\n requirements: {\n secrets: [ 'ownerKey' ],\n variables: [ 'requestedTokenCategory', 'requestedTokenAmount' ],\n },\n },\n sender: {\n name: 'Send',\n description: 'Send a specific amount of fungible tokens to the provided receiver.',\n icon: 'send',\n\n // The sender only need to provide blockchain-level requirements.\n // NOTE: This field is not required when empty, but shown here for illustrative purposes.\n requirements: {},\n },\n },\n\n requirements: {\n participants: [\n {\n role: 'receiver',\n slots: { min: 1, max: 1 },\n },\n {\n role: 'sender',\n slots: { min: 1, max: undefined },\n },\n ],\n },\n\n transaction: 'requestFungibleTokensTransaction',\n },\n requestNonfungibleTokens: {\n // TODO: Consider rewriting to be generic/role-less.\n name: 'Request a Non-fungible Token',\n description: 'Requests a non-fungible token from one or more senders.',\n icon: 'request',\n\n roles: {\n receiver: {\n name: 'Request a Non-fungible Token',\n description: 'Requests a non-fungible token from one or more senders.',\n icon: 'request',\n\n requirements: {\n secrets: [ 'ownerKey' ],\n variables: [ 'requestedTokenCategory', 'requestedTokenCapability', 'requestedTokenCommitment' ],\n },\n },\n sender: {\n name: 'Send',\n description: 'Send a non-fungible token to the provided receiver.',\n icon: 'send',\n\n // The sender only need to provide blockchain-level requirements.\n // NOTE: This field is not required when empty, but shown here for illustrative purposes.\n requirements: {},\n },\n },\n\n requirements: {\n participants: [\n {\n role: 'receiver',\n slots: { min: 1, max: 1 },\n },\n {\n role: 'sender',\n slots: { min: 1, max: undefined },\n },\n ],\n },\n\n transaction: 'requestNonfungibleTokensTransaction',\n },\n\n // NOTE: Sending value can be done without explicit template support.\n // NOTE: This feature is explicitly defined in this template to demonstrate how versatile templates can be, and\n // to ensure the feature is discoverable by the user from outputs that hold value.\n sendSatoshis: {\n name: 'Send Satoshis',\n description: 'Sends a specific amount of Bitcoin Cash to a given recipient.',\n icon: 'send',\n\n roles: {\n sender: {\n requirements: {\n variables: [ 'transferredSatoshis', 'recipientLockingscript' ],\n secrets: [ 'ownerKey' ],\n },\n },\n },\n\n requirements: {\n participants: [\n {\n role: 'sender',\n slots: { min: 1, max: 1 },\n },\n ],\n },\n\n // Sending is only available for outputs that have sufficient satoshis on them.\n // NOTE: Dust is enforced here according to standardness rules.\n conditions: [ '$(OP_INPUTINDEX OP_UTXOVALUE <dustLimit> OP_GREATERTHAN)' ],\n\n transaction: 'transferSatoshisTransaction',\n },\n sendFungibleTokens: {\n name: 'Send Fungible Tokens',\n description: 'Send a specific amount of a fungible token to a given recipient.',\n icon: 'send',\n\n roles: {\n sender: {\n requirements: {\n variables: [ 'transferredTokenCategory', 'transferredTokenAmount', 'recipientLockingscript' ],\n secrets: [ 'ownerKey' ],\n },\n },\n },\n\n requirements: {\n participants: [\n {\n role: 'sender',\n slots: { min: 1, max: 1 },\n },\n ],\n },\n\n // Sending is only available for outputs that have fungible tokens on them.\n conditions: [ '$(OP_INPUTINDEX OP_UTXOTOKENAMOUNT <0> OP_GREATERTHAN)' ],\n\n transaction: 'transferFungibleTokensTransaction',\n },\n sendNonfungibleTokens: {\n name: 'Send a Non-fungible Token',\n description: 'Send a non-fungible token to a given recipient.',\n icon: 'send',\n\n roles: {\n sender: {\n requirements: {\n variables: [ 'transferredTokenCategory', 'transferredTokenCapability', 'transferredTokenCommitment', 'recipientLockingscript' ],\n secrets: [ 'ownerKey' ],\n },\n },\n },\n\n requirements: {\n participants: [\n {\n role: 'sender',\n slots: { min: 1, max: 1 },\n },\n ],\n },\n\n // Sending is only available for outputs that have a non-fungible token on them.\n conditions: [ '$(OP_INPUTINDEX OP_UTXOTOKENCATEGORY OP_SIZE OP_NIP <32> OP_GREATERTHAN)' ],\n\n transaction: 'transferNonfungibleTokensTransaction',\n },\n\n // NOTE: Burning tokens can be done without explicit template support.\n // NOTE: This feature is explicitly defined in this template to demonstrate how versatile templates can be, and\n // to ensure the feature is discoverable by the user from outputs that hold tokens.\n burnFungibleTokens: {\n name: 'Delete Fungible Tokens',\n description: 'Permanently and irreversibly deletes one or more fungible tokens.',\n icon: 'burn',\n\n roles: {\n owner: {\n requirements: {\n variables: [ 'burnedTokenCategory', 'burnedTokenAmount' ],\n secrets: [ 'ownerKey' ],\n },\n },\n },\n\n requirements: {\n participants: [\n {\n role: 'owner',\n slots: { min: 1, max: 1 },\n },\n ],\n },\n\n // Burning is only available for outputs that have fungible tokens on them.\n conditions: [ '$(OP_INPUTINDEX OP_UTXOTOKENAMOUNT <0> OP_GREATERTHAN)' ],\n\n transaction: 'burnFungibleTokensTransaction',\n },\n burnNonfungibleTokens: {\n name: 'Delete a Non-fungible Token',\n description: 'Permanently and irreversibly deletes one non-fungible token.',\n icon: 'burn',\n\n roles: {\n owner: {\n requirements: {\n variables: [ 'burnedTokenCategory', 'burnedTokenCapability', 'burnedTokenCommitment' ],\n secrets: [ 'ownerKey' ],\n },\n },\n },\n\n requirements: {\n participants: [\n {\n role: 'owner',\n slots: { min: 1, max: 1 },\n },\n ],\n },\n\n // Burning is only available for outputs that have non-fungible tokens on them.\n conditions: [ '$(OP_INPUTINDEX OP_UTXOTOKENCATEGORY OP_SIZE OP_NIP <32> OP_GREATERTHAN)' ],\n\n transaction: 'burnNonfungibleTokenTransaction',\n },\n\n sign: {\n name: 'Sign Message',\n description: 'Signs a provided message using the Bitcoin message signing protocol.',\n icon: 'sign',\n\n roles: {\n owner: {\n requirements: {\n variables: [ 'messageToSign' ],\n secrets: [ 'ownerKey' ],\n },\n },\n },\n\n requirements: {\n participants: [\n {\n role: 'owner',\n slots: { min: 1, max: 1 },\n },\n ],\n },\n\n data: 'messageSignature',\n },\n verify: {\n name: 'Verify Message Signature',\n description: 'Verifies a provided message signature according to the Bitcoin message signing protocol.',\n icon: 'verify',\n\n roles: {\n owner: {\n requirements: {\n variables: [ 'messageSignature', 'messageToVerify' ],\n secrets: [ 'ownerKey' ],\n },\n },\n },\n\n requirements: {\n participants: [\n {\n role: 'owner',\n slots: { min: 1, max: 1 },\n },\n ],\n },\n\n data: 'messageSignatureValidity',\n },\n },\n\n // Define a set of data that can be used in this template.\n data: {\n messageSignature: {\n // Evaluate CashASM expression to get the signature needed.\n // NOTE: Pushes the prefix and message, then concatenates them together to form the data to sign.\n // NOTE: In libauth today, it seems that this is done by defining the signature as a variable, and tying it to the key and message,\n // and so this is different\n // TODO: Check with Jason and see if there is any reason why this cannot be done like this.\n value: '$(<messagePrefix> <message> OP_CAT <ownerKey.data_signature.top_stack_element>)',\n type: 'bytes',\n hint: 'signature',\n },\n messageSignatureValidity: {\n // Evaluate the validity of the message with the owners public key.\n value: '$(<messageSignature> <messagePrefix> <message> OP_CAT <ownerKey.public_key> OP_CHECKDATASIG)',\n type: 'integer',\n },\n },\n\n // Define a set of transactions that can be used in this template.\n transactions: {\n receiveTransaction: {\n name: 'Transfer Completed',\n description: 'Transferred an unspecified amount of cash and/or tokens.',\n icon: 'request',\n\n roles: {\n receiver: {\n name: 'Received',\n description: 'Received an unspecified amount of cash and/or tokens.',\n icon: 'receive',\n },\n sender: {\n name: 'Sent',\n description: 'Sent an unspecified amount of cash and/or tokens.',\n icon: 'send',\n },\n },\n\n // Inputs and outputs that must exist in the transaction.\n // NOTE: There is no inputs required, but the engine should detect that there is not sufficient input value to\n // match the output and thus generate an invitation to participate in this action.\n // When the invitation is shared, the other parties can add as many inputs and change outputs as needed.\n inputs: [],\n outputs: [\n {\n output: 'receiveOutput',\n outputIndex: undefined,\n },\n ],\n\n // Standard transaction without a locktime.\n version: 2,\n locktime: 0,\n\n // ...\n composable: true,\n },\n requestSatoshisTransaction: {\n name: 'Satoshis Transferred',\n description: 'Transferred $(<requestedSatoshis>) satoshis.',\n icon: 'request',\n\n roles: {\n receiver: {\n name: 'Received',\n description: 'Received $(<requestedSatoshis>) satoshis.',\n icon: 'receive',\n },\n sender: {\n name: 'Sent',\n description: 'Sent $(<requestedSatoshis>) satoshis.',\n icon: 'send',\n },\n },\n\n // Inputs and outputs that must exist in the transaction.\n // NOTE: There is no inputs required, but the engine should detect that there is not sufficient input value to\n // match the output and thus generate an invitation to participate in this action.\n // When the invitation is shared, the other party can add as many inputs and outputs as needed since this transaction is composable.\n inputs: [],\n outputs: [\n {\n output: 'requestSatoshisOutput',\n outputIndex: undefined,\n },\n ],\n\n // Standard transaction without a locktime.\n version: 2,\n locktime: 0,\n\n // ...\n composable: true,\n },\n requestFungibleTokensTransaction: {\n name: 'Fungible Tokens Transferred',\n description:\n 'Transferred $(<requestedTokenAmount> <requestedTokenCategory.decimalsFactor> OP_DIV).$(<requestedTokenAmount> <requestedTokenCategory.decimalsFactor> OP_MOD) $(<requestedTokenCategory.symbol>) tokens.',\n icon: 'request',\n\n roles: {\n receiver: {\n name: 'Received',\n description:\n 'Received $(<requestedTokenAmount> <requestedTokenCategory.decimalsFactor> OP_DIV).$(<requestedTokenAmount> <requestedTokenCategory.decimalsFactor> OP_MOD) $(<requestedTokenCategory.symbol>) tokens.',\n icon: 'receive',\n },\n sender: {\n name: 'Sent',\n description:\n 'Sent $(<requestedTokenAmount> <requestedTokenCategory.decimalsFactor> OP_DIV).$(<requestedTokenAmount> <requestedTokenCategory.decimalsFactor> OP_MOD) $(<requestedTokenCategory.symbol>) tokens.',\n icon: 'send',\n },\n },\n\n // Inputs and outputs that must exist in the transaction.\n // NOTE: There is no inputs required, but the engine should detect that there is not sufficient input value to\n // match the output and thus generate an invitation to participate in this action.\n // When the invitation is shared, the other party can add as many inputs and outputs as needed since this transaction is composable.\n inputs: [],\n outputs: [\n {\n output: 'requestFungibleTokensOutput',\n outputIndex: undefined,\n },\n ],\n\n // Standard transaction without a locktime.\n version: 2,\n locktime: 0,\n\n // ...\n composable: true,\n },\n requestNonfungibleTokensTransaction: {\n name: 'Non-Fungible Token Transferred',\n description:\n 'Transferred one non-fungible $(<requestedTokenCapability> <0x02> OP_EQUAL OP_IF <\"minting\"> OP_ELSE <requestedTokenCapability> <0x01> OP_EQUAL OP_IF <\"mutable\"> OP_ELSE <\"immutable\"> OP_ENDIF OP_ENDIF) (<requestedTokenCategory.symbol>) token, with $(<requestedTokenCommitment>) commitment.',\n icon: 'request',\n\n roles: {\n receiver: {\n name: 'Received',\n description:\n 'Received one non-fungible $(<requestedTokenCapability> <0x02> OP_EQUAL OP_IF <\"minting\"> OP_ELSE <requestedTokenCapability> <0x01> OP_EQUAL OP_IF <\"mutable\"> OP_ELSE <\"immutable\"> OP_ENDIF OP_ENDIF) (<requestedTokenCategory.symbol>) token, with $(<requestedTokenCommitment>) commitment.',\n icon: 'receive',\n },\n sender: {\n name: 'Sent',\n description:\n 'Sent the requested non-fungible $(<requestedTokenCapability> <0x02> OP_EQUAL OP_IF <\"minting\"> OP_ELSE <requestedTokenCapability> <0x01> OP_EQUAL OP_IF <\"mutable\"> OP_ELSE <\"immutable\"> OP_ENDIF OP_ENDIF) (<requestedTokenCategory.symbol>) token, with $(<requestedTokenCommitment>) commitment.',\n icon: 'send',\n },\n },\n\n // Inputs and outputs that must exist in the transaction.\n // NOTE: There is no inputs required, but the engine should detect that there is not sufficient input value to\n // match the output and thus generate an invitation to participate in this action.\n // When the invitation is shared, the other party can add as many inputs and outputs as needed since this transaction is composable.\n inputs: [],\n outputs: [\n {\n output: 'requestNonfungibleTokensOutput',\n outputIndex: undefined,\n },\n ],\n\n // Standard transaction without a locktime.\n version: 2,\n locktime: 0,\n\n // ...\n composable: true,\n },\n\n transferSatoshisTransaction: {\n name: 'Satoshis Transferred',\n description: '$(<transferredSatoshis>) satoshis were transferred to a recipient.',\n icon: 'send',\n\n roles: {\n receiver: {\n name: 'Received',\n description: 'Received $(<transferredSatoshis>) satoshis.',\n icon: 'receive',\n },\n sender: {\n name: 'Sent',\n description: 'Sent $(<transferredSatoshis>) satoshis.',\n icon: 'send',\n },\n },\n\n // Enforce the inputs and outputs required by the transaction.\n // NOTE: The input is provided from the action since it is only available on outputs with satoshis.\n inputs: [],\n outputs: [\n {\n output: 'transferSatoshisOutput',\n outputIndex: undefined,\n },\n ],\n\n // Standard transaction without a locktime.\n version: 2,\n locktime: 0,\n\n // ...\n composable: true,\n },\n transferFungibleTokensTransaction: {\n name: 'Fungible Tokens Transferred',\n description:\n '$(<transferredTokenAmount> <transferredTokenCategory.decimalsFactor> OP_DIV).$(<transferredTokenAmount> <transferredTokenCategory.decimalsFactor> OP_MOD) $(<transferredTokenCategory.symbol>) tokens were transferred to a recipient.',\n icon: 'send',\n\n roles: {\n receiver: {\n name: 'Received',\n description:\n 'Received $(<transferredTokenAmount> <transferredTokenCategory.decimalsFactor> OP_DIV).$(<transferredTokenAmount> <transferredTokenCategory.decimalsFactor> OP_MOD) $(<transferredTokenCategory.symbol>) tokens.',\n icon: 'receive',\n },\n sender: {\n name: 'Sent',\n description:\n 'Sent $(<transferredTokenAmount> <transferredTokenCategory.decimalsFactor> OP_DIV).$(<transferredTokenAmount> <transferredTokenCategory.decimalsFactor> OP_MOD) $(<transferredTokenCategory.symbol>) tokens.',\n icon: 'send',\n },\n },\n\n // Enforce the inputs and outputs required by the transaction.\n // NOTE: The input is provided from the action since it is only available on outputs with fungible tokens.\n inputs: [],\n outputs: [\n {\n output: 'transferFungibleTokensOutput',\n outputIndex: undefined,\n },\n ],\n\n // Standard transaction without a locktime.\n version: 2,\n locktime: 0,\n\n // ...\n composable: true,\n },\n transferNonfungibleTokensTransaction: {\n name: 'Non-fungible Token Transferred',\n description:\n 'One non-fungible $(<transferredTokenCapability> <0x02> OP_EQUAL OP_IF <\"minting\"> OP_ELSE <transferredTokenCapability> <0x01> OP_EQUAL OP_IF <\"mutable\"> OP_ELSE <\"immutable\"> OP_ENDIF OP_ENDIF) $(<transferredTokenCategory.symbol>) token was transferred to a recipient, with $(<transferredTokenCommitment>) commitment.',\n icon: 'send',\n\n roles: {\n receiver: {\n name: 'Received',\n description:\n 'Received one non-fungible $(<transferredTokenCapability> <0x02> OP_EQUAL OP_IF <\"minting\"> OP_ELSE <transferredTokenCapability> <0x01> OP_EQUAL OP_IF <\"mutable\"> OP_ELSE <\"immutable\"> OP_ENDIF OP_ENDIF) (<transferredTokenCategory.symbol>) token, with $(<transferredTokenCommitment>) commitment.',\n icon: 'receive',\n },\n sender: {\n name: 'Sent',\n description:\n 'Sent one non-fungible $(<transferredTokenCapability> <0x02> OP_EQUAL OP_IF <\"minting\"> OP_ELSE <transferredTokenCapability> <0x01> OP_EQUAL OP_IF <\"mutable\"> OP_ELSE <\"immutable\"> OP_ENDIF OP_ENDIF) (<transferredTokenCategory.symbol>) token, with $(<transferredTokenCommitment>) commitment.',\n icon: 'send',\n },\n },\n\n // Enforce the inputs and outputs required by the transaction.\n // NOTE: The input is provided from the action since it is only available on outputs with a non-fungible token.\n inputs: [],\n outputs: [\n {\n output: 'transferNonfungibleTokenOutput',\n outputIndex: undefined,\n },\n ],\n\n // Standard transaction without a locktime.\n version: 2,\n locktime: 0,\n\n // ...\n composable: true,\n },\n\n burnFungibleTokensTransaction: {\n name: 'Deleted fungible tokens',\n description:\n 'Permanently and irreversibly deleted $(<burnedTokenAmount> <burnedTokenCategory.decimalsFactor> OP_DIV).$(<burnedTokenAmount> <burnedTokenCategory.decimalsFactor> OP_MOD) $(<burnedTokenCategory.symbol>) tokens.',\n icon: 'burn',\n\n // Inputs and outputs that must exist in the transaction.\n // NOTE: There is no defined outputs as any non-burned value is automatically returned as change.\n inputs: [\n {\n input: 'burnFungibleTokensInput',\n inputIndex: undefined,\n },\n ],\n\n outputs: [],\n\n // Standard transaction without a locktime.\n version: 2,\n locktime: 0,\n\n // ...\n composable: true,\n },\n burnNonfungibleTokenTransaction: {\n name: 'Deleted non fungible token',\n description:\n 'Permanently and irreversibly deleted a non-fungible $(<burnedTokenCapability> <0x02> OP_EQUAL OP_IF <\"minting\"> OP_ELSE <burnedTokenCapability> <0x01> OP_EQUAL OP_IF <\"mutable\"> OP_ELSE <\"immutable\"> OP_ENDIF OP_ENDIF) (<burnedTokenCategory.symbol>) token, with $(<burnedTokenCommitment>) commitment.',\n icon: 'burn',\n\n // Inputs and outputs that must exist in the transaction.\n // NOTE: There is no defined outputs as any non-burned value is automatically returned as change.\n inputs: [\n {\n input: 'burnNonfungibleTokenInput',\n inputIndex: undefined,\n },\n ],\n outputs: [],\n\n // Standard transaction without a locktime.\n version: 2,\n locktime: 0,\n\n // ...\n composable: true,\n },\n },\n\n // Define a set of outputs that can be used within transactions in this template.\n outputs: {\n changeOutput: {\n name: 'Change',\n description: 'Funds returned as change.',\n icon: 'receive',\n\n // Defines how the requested funds should be locked.\n lockingScript: 'receivingLockingScript',\n },\n receiveOutput: {\n name: 'Recipient output',\n description: 'Transferred an unspecified amount of cash and/or tokens to a recipient.',\n icon: 'receive',\n\n roles: {\n receiver: {\n name: 'Received',\n description: 'Received an unspecified amount of cash and/or tokens.',\n },\n sender: {\n name: 'Sent',\n description: 'Sent an unspecified amount of cash and/or tokens.',\n },\n },\n\n // Defines how the requested funds should be locked.\n lockingScript: 'receivingLockingScript',\n\n // Set the amount of cash and/or tokens to transfer.\n valueSatoshis: '$(<transferredSatoshis>)',\n token: null,\n },\n requestSatoshisOutput: {\n name: 'Satoshis',\n description: '$(<requestedSatoshis>) satoshis.',\n icon: 'request',\n\n roles: {\n receiver: {\n name: 'Satoshis Received',\n description: 'Received $(<requestedSatoshis>) satoshis.',\n },\n sender: {\n name: 'Satoshis Sent',\n description: 'Sent $(<requestedSatoshis>) satoshis.',\n },\n },\n\n // Defines how the requested funds should be locked.\n lockingScript: 'receivingLockingScript',\n\n // Require the specified number of satoshis and no tokens.\n valueSatoshis: '$(<requestedSatoshis>)',\n token: null,\n },\n requestFungibleTokensOutput: {\n name: 'Fungible $(<requestedTokenCategory.symbol>) Tokens',\n description:\n '$(<requestedTokenAmount> <requestedTokenCategory.decimalsFactor> OP_DIV).$(<requestedTokenAmount> <requestedTokenCategory.decimalsFactor> OP_MOD) $(<requestedTokenCategory.symbol>) tokens.',\n icon: 'request',\n\n roles: {\n receiver: {\n name: 'Fungible $(<requestedTokenCategory.symbol>) Tokens Received',\n description:\n 'Received $(<requestedTokenAmount> <requestedTokenCategory.decimalsFactor> OP_DIV).$(<requestedTokenAmount> <requestedTokenCategory.decimalsFactor> OP_MOD) $(<requestedTokenCategory.symbol>) tokens.',\n },\n sender: {\n name: 'Fungible $(<requestedTokenCategory.symbol>) Tokens Sent',\n description:\n 'Sent $(<requestedTokenAmount> <requestedTokenCategory.decimalsFactor> OP_DIV).$(<requestedTokenAmount> <requestedTokenCategory.decimalsFactor> OP_MOD) $(<requestedTokenCategory.symbol>) tokens.',\n },\n },\n\n // Defines how the requested funds should be locked.\n lockingScript: 'receivingLockingScript',\n\n // Require a flat 1000 satoshis to ensure the fungible tokens remains transferrable.\n valueSatoshis: '1000',\n\n // Require only the specified amount and type of fungible tokens.\n // NOTE: This can be composed with a request for a non-fungible token, but will always result in two separate outputs.\n token: {\n category: '$(<requestedTokenCategory>)',\n amount: '$(<requestedTokenAmount>)',\n nft: null,\n },\n },\n requestNonfungibleTokensOutput: {\n name: 'Non-fungible $(<requestedTokenCategory.symbol>) Token',\n description:\n 'Transferred one non-fungible $(<requestedTokenCapability> <0x02> OP_EQUAL OP_IF <\"minting\"> OP_ELSE <requestedTokenCapability> <0x01> OP_EQUAL OP_IF <\"mutable\"> OP_ELSE <\"immutable\"> OP_ENDIF OP_ENDIF) $(<requestedTokenCategory.symbol>) token to a recipient, with $(<requestedTokenCommitment>) commitment.',\n icon: 'request',\n\n roles: {\n receiver: {\n name: 'Non-fungible $(<requestedTokenCategory.symbol>) Token Received',\n description:\n 'Received one non-fungible $(<requestedTokenCapability> <0x02> OP_EQUAL OP_IF <\"minting\"> OP_ELSE <requestedTokenCapability> <0x01> OP_EQUAL OP_IF <\"mutable\"> OP_ELSE <\"immutable\"> OP_ENDIF OP_ENDIF) $(<requestedTokenCategory.symbol>) token, with $(<requestedTokenCommitment>) commitment.',\n },\n sender: {\n name: 'Non-fungible $(<requestedTokenCategory.symbol>) Token Sent',\n description:\n 'Sent the requested non-fungible $(<requestedTokenCapability> <0x02> OP_EQUAL OP_IF <\"minting\"> OP_ELSE <requestedTokenCapability> <0x01> OP_EQUAL OP_IF <\"mutable\"> OP_ELSE <\"immutable\"> OP_ENDIF OP_ENDIF) $(<requestedTokenCategory.symbol>) token, with $(<requestedTokenCommitment>) commitment.',\n },\n },\n\n // Defines how the requested funds should be locked.\n lockingScript: 'receivingLockingScript',\n\n // Require a flat 1000 satoshis to ensure the non-fungible token remains transferrable.\n valueSatoshis: '1000',\n\n // Require only an NFT with specified category, capability and commitment.\n // NOTE: This can be composed with a request for fungible token amounts, but will always result in two separate outputs.\n token: {\n category: '$(<requestedTokenCategory>)',\n amount: null,\n nft: {\n capability: '$(<requestedTokenCapability>)',\n commitment: '$(<requestedTokenCommitment>)',\n },\n },\n },\n\n transferSatoshisOutput: {\n name: 'Recipient output',\n description: 'Transferred $(<transferredSatoshis>) satoshis to a recipient.',\n icon: 'send',\n\n roles: {\n receiver: {\n name: 'Received',\n description: 'Received $(<transferredSatoshis>) satoshis.',\n },\n sender: {\n name: 'Sent',\n description: 'Sent $(<transferredSatoshis>) satoshis.',\n },\n },\n\n // Use the recipients lockscript.\n lockingScript: 'sendingLockingscript',\n\n // Set the amount of satoshis to transfer.\n valueSatoshis: '$(<transferredSatoshis>)',\n },\n transferFungibleTokensOutput: {\n name: 'Recipient output',\n description:\n 'Transferred $(<transferredTokenAmount> <transferredTokenCategory.decimalsFactor> OP_DIV).$(<transferredTokenAmount> <transferredTokenCategory.decimalsFactor> OP_MOD) $(<transferredTokenCategory.symbol>) tokens to a recipient.',\n icon: 'send',\n\n roles: {\n receiver: {\n name: 'Received',\n description:\n 'Received $(<transferredTokenAmount> <transferredTokenCategory.decimalsFactor> OP_DIV).$(<transferredTokenAmount> <transferredTokenCategory.decimalsFactor> OP_MOD) $(<transferredTokenCategory.symbol>) tokens.',\n },\n sender: {\n name: 'Sent',\n description:\n 'Sent $(<transferredTokenAmount> <transferredTokenCategory.decimalsFactor> OP_DIV).$(<transferredTokenAmount> <transferredTokenCategory.decimalsFactor> OP_MOD) $(<transferredTokenCategory.symbol>) tokens.',\n },\n },\n\n // Use the recipients lockscript.\n lockingScript: 'sendingLockingscript',\n\n // Set the amount of fungible tokens to transfer.\n token: {\n category: '$(<transferredTokenCategory>)',\n amount: '$(<transferredTokenAmount>)',\n },\n },\n transferNonfungibleTokenOutput: {\n name: 'Recipient output',\n description:\n 'Transferred one non-fungible $(<transferredTokenCapability> <0x02> OP_EQUAL OP_IF <\"minting\"> OP_ELSE <transferredTokenCapability> <0x01> OP_EQUAL OP_IF <\"mutable\"> OP_ELSE <\"immutable\"> OP_ENDIF OP_ENDIF) $(<transferredTokenCategory.symbol>) token to a recipient, with $(<transferredTokenCommitment>) commitment.',\n icon: 'send',\n\n roles: {\n receiver: {\n name: 'Received',\n description:\n 'Received one non-fungible $(<transferredTokenCapability> <0x02> OP_EQUAL OP_IF <\"minting\"> OP_ELSE <transferredTokenCapability> <0x01> OP_EQUAL OP_IF <\"mutable\"> OP_ELSE <\"immutable\"> OP_ENDIF OP_ENDIF) $(<transferredTokenCategory.symbol>) token, with $(<transferredTokenCommitment>) commitment.',\n },\n sender: {\n name: 'Sent',\n description:\n 'Sent one non-fungible $(<transferredTokenCapability> <0x02> OP_EQUAL OP_IF <\"minting\"> OP_ELSE <transferredTokenCapability> <0x01> OP_EQUAL OP_IF <\"mutable\"> OP_ELSE <\"immutable\"> OP_ENDIF OP_ENDIF) $(<transferredTokenCategory.symbol>) token, with $(<transferredTokenCommitment>) commitment.',\n },\n },\n\n // Use the recipients lockscript.\n lockingScript: 'sendingLockingscript',\n\n // Set the non-fungible token to transfer.\n token: {\n category: '$(<transferredTokenCategory>)',\n nft: {\n capability: '$(<transferredTokenCapability>)',\n commitment: '$(<transferredTokenCommitment>)',\n },\n },\n },\n },\n\n inputs: {\n burnFungibleTokensInput: {\n name: 'Deleted fungible tokens',\n description: 'Permanently and irreversibly deleted $(<burnedTokenAmount>) $(<burnedTokenCategory>).',\n icon: 'burn',\n\n // Define which unlocking script unlocks this input.\n unlockingScript: 'unlockP2PKH',\n\n // Require a fungible token of the requested token category, with an amount larger than or equal to the requested amount to burn.\n token: {\n category: '$(<burnedTokenCategory>)',\n amount: '$(<this.fungibleTokenAmount> <burnedTokenAmount> OP_GREATERTHANOREQUAL OP_IF <this.fungibleTokens> OP_ENDIF)',\n },\n\n // Ignore the burned token amount when determining change for this output.\n // NOTE: The engine must check that this does not exceed the input value.\n omitChangeAmounts: {\n fungibleTokens: '${<burnedTokenAmount>}',\n },\n },\n burnNonfungibleTokenInput: {\n name: 'Deleted non-fungible token',\n description:\n 'Permanently and irreversibly burned one non-fungible $(<burnedTokenCapability> <0x02> OP_EQUAL OP_IF <\"minting\"> OP_ELSE <burnedTokenCapability> <0x01> OP_EQUAL OP_IF <\"mutable\"> OP_ELSE <\"immutable\"> OP_ENDIF OP_ENDIF) token of category $(<burnedTokenCategory>), with a $(<burnedTokenCommitment>) commitment.',\n icon: 'burn',\n\n // Define which unlocking script unlocks this input.\n unlockingScript: 'unlockP2PKH',\n\n // Require a non-fungible token of the specified category, capability and commitment to burn.\n token: {\n category: '$(<burnedTokenCategory>)',\n nft: {\n capability: '$(<burnedTokenCapability>)',\n commitment: '$(<burnedTokenCommitment>)',\n },\n },\n\n // Ignore the burned token when determining change for this output.\n // NOTE: The engine must check that this does not exceed the input value.\n omitChangeAmounts: {\n nonfungibleTokens: 1,\n },\n },\n },\n\n // Define locking scripts used by this template.\n // NOTE: Template supported wallets should automatically track all generated lockscripts for on-chain events.\n lockingScripts: {\n sendingLockingscript: {\n // TODO: This currently describes outputs locked to this script, but all actions creating such outputs already have descriptions.\n // This can either be dropped, or maybe more importantly, should be disambiguated so that lockscripts can provide separate\n // descriptions for their script and the outputs that are locked to them. Leaving as a TODO for now and will address later.\n name: 'Sent',\n description: 'Funds sent to an external recipient',\n icon: 'address',\n\n // ...\n lockingType: 'p2pkh',\n lockingBytecode: 'lockToRecipient',\n\n // Indicate that the sent output does not belong to the initiating user.\n // NOTE: These values default to false/empty, but added here for additional clarity.\n actions: [],\n state: { variables: [], secrets: [] },\n balance: {},\n selectable: false,\n },\n receivingLockingScript: {\n // NOTE: Outputs to this lockscript by external actors defaults to this description when detected on-chain.\n name: 'Received',\n description: 'Funds received without wallet coordination.',\n icon: 'address',\n\n // Defines how spending future received funds should be locked.\n lockingType: 'p2pkh',\n lockingBytecode: 'lockP2PKH',\n\n // Define a default unlocking script to be used when no action provided script is present.\n unlockingBytecode: 'unlockP2PKH',\n\n // Participants without a role or observers cannot take any further actions.\n // NOTE: This is not required but shown here for illustrative purposes.\n actions: [],\n\n roles: {\n receiver: {\n // The only state that is required to be persisted when receiving funds is the owners private key.\n // NOTE: This is defined as a secret to not leak when creating invitations for others to participate in request or send actions.\n state: {\n variables: [],\n secrets: [ 'ownerKey' ],\n },\n\n // List actions that can be taken with the ownerKey for each address/lockscript.\n actions: [\n {\n action: 'sign',\n role: 'owner',\n secrets: [{ ownerKey: null }],\n },\n {\n action: 'verify',\n role: 'owner',\n secrets: [{ ownerKey: null }],\n },\n {\n action: 'sendSatoshis',\n role: 'sender',\n secrets: [{ ownerKey: null }],\n },\n {\n action: 'sendFungibleTokens',\n role: 'sender',\n secrets: [{ ownerKey: null }],\n },\n {\n action: 'sendNonfungibleTokens',\n role: 'sender',\n secrets: [{ ownerKey: null }],\n },\n {\n action: 'burnFungibleTokens',\n role: 'sender',\n secrets: [{ ownerKey: null }],\n },\n {\n action: 'burnNonfungibleTokens',\n role: 'sender',\n secrets: [{ ownerKey: null }],\n },\n ],\n\n // Indicates how much of received funds should be part of a wallets total balance.\n // NOTE: Evaluates in the context of the source transaction, with the current outputs technical data available under this.output.*\n // NOTE: A CashASM expression of '1' means include 100% of this asset in the balance.\n // NOTE: Since we know that the owner controls all assets, we short-cut the evaluations by setting 1 directly.\n balance: {\n satoshis: true,\n fungibleTokens: true,\n nonfungibleTokens: true,\n },\n\n // Indicate when received funds should be considered in automatic coin selection to meet input requirements of other transactions.\n // NOTE: Evaluates in the context of the source transaction, with the current outputs technical data available under this.output.*\n // NOTE: This evaluates to a boolean. If non-true, the output should not be considered for automatic coin selection.\n // NOTE: Since we know that the secret key exist for the owner, this template short-cuts the evaluation by setting true directly.\n selectable: true,\n },\n },\n },\n },\n\n // Define a set of scripts that can be used in this template.\n scripts: {\n lockP2PKH: 'OP_DUP OP_HASH160 <$(<ownerKey.public_key> OP_HASH160)> OP_EQUALVERIFY OP_CHECKSIG',\n unlockP2PKH: '<ownerKey.schnorr_signature.all_outputs> <ownerKey.public_key>',\n lockToRecipient: '<recipientLockingscript>',\n },\n\n // TODO: Add icons\n constants: {\n dustLimit: {\n name: 'Dust Limit',\n description: 'Standard required minimum satoshis for Pay to Public Key Hash outputs.',\n type: 'integer',\n value: 546,\n },\n\n // Define a message prefix for use in arbitrary message signing.\n messagePrefix: {\n name: 'Message Prefix',\n description: 'Standard message prefix used in the bitcoin signed message protocol.',\n type: 'bytes',\n\n // Value is enforced to the bitcoin signing magic string:\n // \"\\x18Bitcoin Signed Message:\\n\"\n value: '0x18426974636f696e205369676e6564204d6573736167653a0a',\n },\n },\n\n // TODO: Add icons\n variables: {\n // Describe the secret private key.\n ownerKey: {\n name: 'Owners Private Key',\n description: 'The private key used to authorize spending of received funds.',\n type: 'bytes',\n hint: 'private_key',\n },\n\n messageToSign: {\n name: 'Message',\n description: 'The text message to sign.',\n type: 'string',\n },\n messageToVerify: {\n name: 'Message',\n description: 'The text message to verify.',\n type: 'string',\n },\n messageSignature: {\n name: 'Message Signature',\n description: 'The signature for the message.',\n type: 'bytes',\n hint: 'signature',\n },\n\n // Describe the parameters used when requesting value.\n requestedSatoshis: {\n name: 'Requested Amount',\n description: 'The Bitcoin Cash amount requested',\n type: 'integer',\n hint: 'satoshis',\n },\n transferredSatoshis: {\n name: 'Transferred Amount',\n description: 'The Bitcoin Cash amount transferred',\n type: 'integer',\n hint: 'satoshis',\n },\n requestedTokenCategory: {\n name: 'Requested Token Category',\n description: 'The token category requested',\n type: 'bytes',\n hint: 'token_category',\n },\n requestedTokenAmount: {\n name: 'Requested Token Amount',\n description: 'The fungible token amount requested',\n type: 'integer',\n hint: 'token_amount',\n },\n requestedTokenCapability: {\n name: 'Requested Token Capability',\n description: 'The non-fungible token capability requested',\n type: 'bytes',\n hint: 'token_capability',\n },\n requestedTokenCommitment: {\n name: 'Requested Token Commitment',\n description: 'The non-fungible token commitment requested',\n type: 'bytes',\n hint: 'token_commitment',\n },\n transferredTokenCategory: {\n name: 'Sending Token Category',\n description: 'The token category of the token(s) to send',\n type: 'bytes',\n hint: 'token_category',\n },\n transferredTokenAmount: {\n name: 'Sending Token Amount',\n description: 'The fungible token amount to send',\n type: 'integer',\n hint: 'token_amount',\n },\n transferredTokenCapability: {\n name: 'Sending Token Capability',\n description: 'The token capability for the non-fungible token to send',\n type: 'bytes',\n hint: 'token_capability',\n },\n transferredTokenCommitment: {\n name: 'Sending Token Commitment',\n description: 'The token commitment for the non-fungible token to send',\n type: 'bytes',\n hint: 'token_commitment',\n },\n burnedTokenCategory: {\n name: 'Deleted Token Category',\n description: 'The token category of the token(s) to delete',\n type: 'bytes',\n hint: 'token_category',\n },\n burnedTokenAmount: {\n name: 'Deleted Token Amount',\n description: 'The fungible token amount to delete',\n type: 'integer',\n hint: 'token_amount',\n },\n burnedTokenCapability: {\n name: 'Deleted Token Capability',\n description: 'The token capability for the non-fungible token to delete',\n type: 'bytes',\n hint: 'token_capability',\n },\n burnedTokenCommitment: {\n name: 'Deleted Token Commitment',\n description: 'The token commitment for the non-fungible token to delete',\n type: 'bytes',\n hint: 'token_commitment',\n },\n },\n\n // Define a list of re-usable icons that can be used as part of metadata.\n // NOTE: the actual icons are not embedded in the template but only referenced by hashes here,\n // and can be distributed either as an asset pack or looked up through something like IPFS.\n icons: [\n {\n name: 'wallet',\n hash: '0000000000000000000000',\n },\n {\n name: 'owner',\n hash: '0000000000000000000000',\n },\n {\n name: 'sender',\n hash: '0000000000000000000000',\n },\n {\n name: 'address',\n hash: '0000000000000000000000',\n },\n {\n name: 'receive',\n hash: '0000000000000000000000',\n },\n {\n name: 'request',\n hash: '0000000000000000000000',\n },\n {\n name: 'send',\n hash: '0000000000000000000000',\n },\n {\n name: 'burn',\n hash: '0000000000000000000000',\n },\n {\n name: 'sign',\n hash: '0000000000000000000000',\n },\n {\n name: 'verify',\n hash: '0000000000000000000000',\n },\n ],\n\n scenarios: [\n {\n name: 'requesting satoshis',\n description: 'happy-path evaluation for requesting satoshis.',\n\n // The action being run in the scenario.\n action: 'requestSatoshis',\n\n // List of roles taken in this scenario, and the resources they provided.\n roles: [\n {\n role: 'receiver',\n values: {\n generated: {\n ownerKey: 'KyRQa5pEXuzVcDwnXRLpYAascjchQW5DoxVRMbj4DTxS83573mz8',\n },\n variables: {\n requestedSatoshis: 2000,\n },\n secrets: {\n // This scenario does not carry any secrets.\n },\n inputs: [],\n outputs: [\n {\n lockingBytecode: '76a91475c715ecb74178fe87933e57e947e5e92d904b8188ac',\n valueSatoshis: 2000,\n },\n ],\n },\n },\n {\n role: 'sender',\n values: {\n // The sender provides no raw data to the action.\n generated: {},\n variables: {},\n secrets: {},\n\n // The sender does provide input and change.\n inputs: [\n {\n outpointTransactionHash: '4ef28553a31a266719e66ba97fee3aeecd6d1788f7ff6ab12f8ebceda49660c0',\n outpointIndex: 0,\n sequenceNumber: 0,\n unlockingBytecode:\n '41226b2be7c2890c8bbde2f79e79640e56d866843f2e822ec51c469019d13db04a422c9ee49f5eefd26fee24e91910edbbb032b90cc54c34da80a61e69b0ee3d22412103e7ab26c36a7c7f45b2c26f33c08b0fa43a633268700f47216646d4cb37ae5696',\n },\n ],\n outputs: [\n {\n lockingBytecode: '76a91475c715ecb74178fe87933e57e947e5e92d904b8188ac',\n valueSatoshis: 2000,\n },\n ],\n },\n },\n ],\n\n // List of resources provided outside the context of a role.\n values: {\n generated: {\n // This scenario does not have any non-role generated values.\n },\n variables: {\n // This scenario does not have any non-role variables.\n },\n secrets: {\n // This scenario does not have any non-role secrets.\n },\n },\n\n // Outcomes provides the set of resulting values created from the action.\n outcome: {\n roles: {\n receiver: {\n name: 'Request',\n description: 'Requested a specific amount of satoshis from one or more senders.',\n icon: 'request',\n },\n sender: {\n name: 'Send',\n description: 'Sent a specific amount of satoshis to the provided receiver.',\n icon: 'send',\n },\n },\n\n transactions: [\n {\n transaction:\n '0200000001c06096a4edbc8e2fb16afff788176dcdee3aee7fa96be61967261aa35385f24e000000006441226b2be7c2890c8bbde2f79e79640e56d866843f2e822ec51c469019d13db04a422c9ee49f5eefd26fee24e91910edbbb032b90cc54c34da80a61e69b0ee3d22412103e7ab26c36a7c7f45b2c26f33c08b0fa43a633268700f47216646d4cb37ae5696000000000267530300000000001976a91475c715ecb74178fe87933e57e947e5e92d904b8188acd0070000000000001976a91475c715ecb74178fe87933e57e947e5e92d904b8188ac00000000',\n value: '',\n },\n ],\n },\n },\n ],\n};\n"],"mappings":";AAEA,MAAa,gBAA4B;CACrC,SAAS;CAGT,MAAM;CAGN,aAAa;CAGb,MAAM;CAGN,SAAS;CAGT,WAAW;EAAE;EAAe;EAAe;EAAe;EAAe;CAGzE,UAAU,EAON,QAAQ;EACJ,QAAQ;EACR,MAAM;EACN,UAAU,CAAE,WAAY;EAC3B,EACJ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M;GACT;EAGD,mBAAmB;GACf,MAAM;GACN,aAAa;GACb,MAAM;GACN,MAAM;GACT;EACD,qBAAqB;GACjB,MAAM;GACN,aAAa;GACb,MAAM;GACN,MAAM;GACT;EACD,wBAAwB;GACpB,MAAM;GACN,aAAa;GACb,MAAM;GACN,MAAM;GACT;EACD,sBAAsB;GAClB,MAAM;GACN,aAAa;GACb,MAAM;GACN,MAAM;GACT;EACD,0BAA0B;GACtB,MAAM;GACN,aAAa;GACb,MAAM;GACN,MAAM;GACT;EACD,0BAA0B;GACtB,MAAM;GACN,aAAa;GACb,MAAM;GACN,MAAM;GACT;EACD,0BAA0B;GACtB,MAAM;GACN,aAAa;GACb,MAAM;GACN,MAAM;GACT;EACD,wBAAwB;GACpB,MAAM;GACN,aAAa;GACb,MAAM;GACN,MAAM;GACT;EACD,4BAA4B;GACxB,MAAM;GACN,aAAa;GACb,MAAM;GACN,MAAM;GACT;EACD,4BAA4B;GACxB,MAAM;GACN,aAAa;GACb,MAAM;GACN,MAAM;GACT;EACD,qBAAqB;GACjB,MAAM;GACN,aAAa;GACb,MAAM;GACN,MAAM;GACT;EACD,mBAAmB;GACf,MAAM;GACN,aAAa;GACb,MAAM;GACN,MAAM;GACT;EACD,uBAAuB;GACnB,MAAM;GACN,aAAa;GACb,MAAM;GACN,MAAM;GACT;EACD,uBAAuB;GACnB,MAAM;GACN,aAAa;GACb,MAAM;GACN,MAAM;GACT;EACJ;CAKD,OAAO;EACH;GACI,MAAM;GACN,MAAM;GACT;EACD;GACI,MAAM;GACN,MAAM;GACT;EACD;GACI,MAAM;GACN,MAAM;GACT;EACD;GACI,MAAM;GACN,MAAM;GACT;EACD;GACI,MAAM;GACN,MAAM;GACT;EACD;GACI,MAAM;GACN,MAAM;GACT;EACD;GACI,MAAM;GACN,MAAM;GACT;EACD;GACI,MAAM;GACN,MAAM;GACT;EACD;GACI,MAAM;GACN,MAAM;GACT;EACD;GACI,MAAM;GACN,MAAM;GACT;EACJ;CAED,WAAW,CACP;EACI,MAAM;EACN,aAAa;EAGb,QAAQ;EAGR,OAAO,CACH;GACI,MAAM;GACN,QAAQ;IACJ,WAAW,EACP,UAAU,wDACb;IACD,WAAW,EACP,mBAAmB,KACtB;IACD,SAAS,EAER;IACD,QAAQ,EAAE;IACV,SAAS,CACL;KACI,iBAAiB;KACjB,eAAe;KAClB,CACJ;IACJ;GACJ,EACD;GACI,MAAM;GACN,QAAQ;IAEJ,WAAW,EAAE;IACb,WAAW,EAAE;IACb,SAAS,EAAE;IAGX,QAAQ,CACJ;KACI,yBAAyB;KACzB,eAAe;KACf,gBAAgB;KAChB,mBACI;KACP,CACJ;IACD,SAAS,CACL;KACI,iBAAiB;KACjB,eAAe;KAClB,CACJ;IACJ;GACJ,CACJ;EAGD,QAAQ;GACJ,WAAW,EAEV;GACD,WAAW,EAEV;GACD,SAAS,EAER;GACJ;EAGD,SAAS;GACL,OAAO;IACH,UAAU;KACN,MAAM;KACN,aAAa;KACb,MAAM;KACT;IACD,QAAQ;KACJ,MAAM;KACN,aAAa;KACb,MAAM;KACT;IACJ;GAED,cAAc,CACV;IACI,aACI;IACJ,OAAO;IACV,CACJ;GACJ;EACJ,CACJ;CACJ"}
1
+ {"version":3,"file":"index.mjs","names":[],"sources":["../source/p2pkh.ts"],"sourcesContent":["import type { XOTemplate } from '@xo-cash/types';\n\nexport const p2pkhTemplate: XOTemplate = {\n $schema: 'https://libauth.org/schemas/wallet-template-v0.schema.json',\n\n // Name for this template.\n name: 'Wallet (P2PKH)',\n\n // Description for this template.\n description: 'A standard single-factor wallet template that uses Pay-to-Public-Key-Hash (P2PKH) locking scripts.',\n\n // Icon for this template.\n icon: 'wallet',\n\n // Version number for this template.\n version: '1',\n\n // List of VM versions that can be used to run this template.\n supported: [ 'BCH_2023_05', 'BCH_2024_05', 'BCH_2025_05', 'BCH_2026_05' ],\n\n // Sets optional default values to be used with this template.\n defaults: {\n // Configures a default intent structure for creating change outputs and locking scripts.\n // NOTE: This is used when the engine needs to make change for an output created by\n // this template and there is no other policy provided elsewhere that takes precedence.\n // NOTE: It is recommended that templates that create outputs with the 'selectable' property\n // either provides a change policy here, or a comment that explain that they\n // intentionally omit the change policy and why.\n change: {\n output: 'changeOutput',\n role: 'receiver',\n generate: [ 'ownerKey' ],\n },\n },\n\n // Describe a list of roles that are used in this template.\n // NOTE: Template roles are held only for the duration of one specific action/invitation.\n // For example, the same entity that acts as 'receiver' when creating/receiving an output\n // can later act as 'sender' (or 'owner') when performing a follow-up action.\n roles: {\n owner: {\n name: 'Wallet Owner',\n description: 'The party who can spend from this wallet.',\n icon: 'owner',\n },\n receiver: {\n name: 'Receiver',\n description: 'A party that is receiving value.',\n icon: 'receiver',\n },\n sender: {\n name: 'Sender',\n description: 'A party that is sending value.',\n icon: 'sender',\n },\n },\n\n // Define a list of entrypoints supported by this template.\n start: [\n {\n action: 'receive',\n role: 'receiver',\n generate: [ 'ownerKey' ],\n },\n {\n action: 'requestSatoshis',\n role: 'receiver',\n generate: [ 'ownerKey' ],\n },\n {\n action: 'requestFungibleTokens',\n role: 'receiver',\n generate: [ 'ownerKey' ],\n },\n {\n action: 'requestNonfungibleTokens',\n role: 'receiver',\n generate: [ 'ownerKey' ],\n },\n ],\n\n // Define a list of actions that can be taken by this template.\n // NOTE: There is no action to generate an address, but a wallet can create an invitation to a receive action and\n // extract the generated lockscript as needed as the engine will track all lockscripts it generates.\n actions: {\n receive: {\n // TODO: Consider rewriting to be generic/role-less.\n name: 'Receive',\n description: 'Receive an unspecified amount of cash and/or tokens from one or more senders.',\n icon: 'receive',\n\n roles: {\n receiver: {\n name: 'Receive',\n description: 'Receive an unspecified amount of cash and/or tokens from one or more senders.',\n icon: 'receive',\n\n requirements: {\n secrets: [ 'ownerKey' ],\n },\n },\n sender: {\n name: 'Send',\n description: 'Send an unspecified amount of cash and/or tokens to the provided receiver.',\n icon: 'send',\n\n requirements: {\n variables: [ 'transferredSatoshis' ],\n },\n },\n },\n\n requirements: {\n participants: [\n {\n role: 'receiver',\n slots: { min: 1, max: 1 },\n },\n {\n role: 'sender',\n slots: { min: 1, max: undefined },\n },\n ],\n },\n\n transaction: 'receiveTransaction',\n },\n requestSatoshis: {\n // TODO: Consider rewriting to be generic/role-less.\n name: 'Request Satoshis',\n description: 'Requests a specific amount of Bitcoin Cash from one or more senders.',\n icon: 'request',\n\n roles: {\n receiver: {\n name: 'Request Satoshis',\n description: 'Requests a specific amount of Bitcoin Cash from one or more senders.',\n icon: 'request',\n\n requirements: {\n secrets: [ 'ownerKey' ],\n variables: [ 'requestedSatoshis' ],\n },\n },\n sender: {\n name: 'Send',\n description: 'Send a specific amount of Bitcoin Cash to the provided receiver.',\n icon: 'send',\n\n // The sender only need to provide blockchain-level requirements.\n // NOTE: This field is not required when empty, but shown here for illustrative purposes.\n requirements: {},\n },\n },\n\n requirements: {\n participants: [\n {\n role: 'receiver',\n slots: { min: 1, max: 1 },\n },\n {\n role: 'sender',\n slots: { min: 1, max: undefined },\n },\n ],\n },\n\n transaction: 'requestSatoshisTransaction',\n },\n requestFungibleTokens: {\n // TODO: Consider rewriting to be generic/role-less.\n name: 'Request Fungible Tokens',\n description: 'Requests a specific amount of a fungible tokens from one or more senders.',\n icon: 'request',\n\n roles: {\n receiver: {\n name: 'Request Fungible Tokens',\n description: 'Requests a specific amount of a fungible tokens from one or more senders.',\n icon: 'request',\n\n requirements: {\n secrets: [ 'ownerKey' ],\n variables: [ 'requestedTokenCategory', 'requestedTokenAmount' ],\n },\n },\n sender: {\n name: 'Send',\n description: 'Send a specific amount of fungible tokens to the provided receiver.',\n icon: 'send',\n\n // The sender only need to provide blockchain-level requirements.\n // NOTE: This field is not required when empty, but shown here for illustrative purposes.\n requirements: {},\n },\n },\n\n requirements: {\n participants: [\n {\n role: 'receiver',\n slots: { min: 1, max: 1 },\n },\n {\n role: 'sender',\n slots: { min: 1, max: undefined },\n },\n ],\n },\n\n transaction: 'requestFungibleTokensTransaction',\n },\n requestNonfungibleTokens: {\n // TODO: Consider rewriting to be generic/role-less.\n name: 'Request a Non-fungible Token',\n description: 'Requests a non-fungible token from one or more senders.',\n icon: 'request',\n\n roles: {\n receiver: {\n name: 'Request a Non-fungible Token',\n description: 'Requests a non-fungible token from one or more senders.',\n icon: 'request',\n\n requirements: {\n secrets: [ 'ownerKey' ],\n variables: [ 'requestedTokenCategory', 'requestedTokenCapability', 'requestedTokenCommitment' ],\n },\n },\n sender: {\n name: 'Send',\n description: 'Send a non-fungible token to the provided receiver.',\n icon: 'send',\n\n // The sender only need to provide blockchain-level requirements.\n // NOTE: This field is not required when empty, but shown here for illustrative purposes.\n requirements: {},\n },\n },\n\n requirements: {\n participants: [\n {\n role: 'receiver',\n slots: { min: 1, max: 1 },\n },\n {\n role: 'sender',\n slots: { min: 1, max: undefined },\n },\n ],\n },\n\n transaction: 'requestNonfungibleTokensTransaction',\n },\n\n // NOTE: Sending value can be done without explicit template support.\n // NOTE: This feature is explicitly defined in this template to demonstrate how versatile templates can be, and\n // to ensure the feature is discoverable by the user from outputs that hold value.\n sendSatoshis: {\n name: 'Send Satoshis',\n description: 'Sends a specific amount of Bitcoin Cash to a given recipient.',\n icon: 'send',\n\n roles: {\n sender: {\n requirements: {\n variables: [ 'transferredSatoshis', 'recipientLockingscript' ],\n secrets: [ 'ownerKey' ],\n },\n },\n },\n\n requirements: {\n participants: [\n {\n role: 'sender',\n slots: { min: 1, max: 1 },\n },\n ],\n },\n\n // Sending is only available for outputs that have sufficient satoshis on them.\n // NOTE: Dust is enforced here according to standardness rules.\n conditions: [ '$(OP_INPUTINDEX OP_UTXOVALUE <dustLimit> OP_GREATERTHAN)' ],\n\n transaction: 'transferSatoshisTransaction',\n },\n sendFungibleTokens: {\n name: 'Send Fungible Tokens',\n description: 'Send a specific amount of a fungible token to a given recipient.',\n icon: 'send',\n\n roles: {\n sender: {\n requirements: {\n variables: [ 'transferredTokenCategory', 'transferredTokenAmount', 'recipientLockingscript' ],\n secrets: [ 'ownerKey' ],\n },\n },\n },\n\n requirements: {\n participants: [\n {\n role: 'sender',\n slots: { min: 1, max: 1 },\n },\n ],\n },\n\n // Sending is only available for outputs that have fungible tokens on them.\n conditions: [ '$(OP_INPUTINDEX OP_UTXOTOKENAMOUNT <0> OP_GREATERTHAN)' ],\n\n transaction: 'transferFungibleTokensTransaction',\n },\n sendNonfungibleTokens: {\n name: 'Send a Non-fungible Token',\n description: 'Send a non-fungible token to a given recipient.',\n icon: 'send',\n\n roles: {\n sender: {\n requirements: {\n variables: [ 'transferredTokenCategory', 'transferredTokenCapability', 'transferredTokenCommitment', 'recipientLockingscript' ],\n secrets: [ 'ownerKey' ],\n },\n },\n },\n\n requirements: {\n participants: [\n {\n role: 'sender',\n slots: { min: 1, max: 1 },\n },\n ],\n },\n\n // Sending is only available for outputs that have a non-fungible token on them.\n conditions: [ '$(OP_INPUTINDEX OP_UTXOTOKENCATEGORY OP_SIZE OP_NIP <32> OP_GREATERTHAN)' ],\n\n transaction: 'transferNonfungibleTokensTransaction',\n },\n\n // NOTE: Burning tokens can be done without explicit template support.\n // NOTE: This feature is explicitly defined in this template to demonstrate how versatile templates can be, and\n // to ensure the feature is discoverable by the user from outputs that hold tokens.\n burnFungibleTokens: {\n name: 'Delete Fungible Tokens',\n description: 'Permanently and irreversibly deletes one or more fungible tokens.',\n icon: 'burn',\n\n roles: {\n owner: {\n requirements: {\n variables: [ 'burnedTokenCategory', 'burnedTokenAmount' ],\n secrets: [ 'ownerKey' ],\n },\n },\n },\n\n requirements: {\n participants: [\n {\n role: 'owner',\n slots: { min: 1, max: 1 },\n },\n ],\n },\n\n // Burning is only available for outputs that have fungible tokens on them.\n conditions: [ '$(OP_INPUTINDEX OP_UTXOTOKENAMOUNT <0> OP_GREATERTHAN)' ],\n\n transaction: 'burnFungibleTokensTransaction',\n },\n burnNonfungibleTokens: {\n name: 'Delete a Non-fungible Token',\n description: 'Permanently and irreversibly deletes one non-fungible token.',\n icon: 'burn',\n\n roles: {\n owner: {\n requirements: {\n variables: [ 'burnedTokenCategory', 'burnedTokenCapability', 'burnedTokenCommitment' ],\n secrets: [ 'ownerKey' ],\n },\n },\n },\n\n requirements: {\n participants: [\n {\n role: 'owner',\n slots: { min: 1, max: 1 },\n },\n ],\n },\n\n // Burning is only available for outputs that have non-fungible tokens on them.\n conditions: [ '$(OP_INPUTINDEX OP_UTXOTOKENCATEGORY OP_SIZE OP_NIP <32> OP_GREATERTHAN)' ],\n\n transaction: 'burnNonfungibleTokenTransaction',\n },\n\n sign: {\n name: 'Sign Message',\n description: 'Signs a provided message using the Bitcoin message signing protocol.',\n icon: 'sign',\n\n roles: {\n owner: {\n requirements: {\n variables: [ 'messageToSign' ],\n secrets: [ 'ownerKey' ],\n },\n },\n },\n\n requirements: {\n participants: [\n {\n role: 'owner',\n slots: { min: 1, max: 1 },\n },\n ],\n },\n\n data: 'messageSignature',\n },\n verify: {\n name: 'Verify Message Signature',\n description: 'Verifies a provided message signature according to the Bitcoin message signing protocol.',\n icon: 'verify',\n\n roles: {\n owner: {\n requirements: {\n variables: [ 'messageSignature', 'messageToVerify' ],\n secrets: [ 'ownerKey' ],\n },\n },\n },\n\n requirements: {\n participants: [\n {\n role: 'owner',\n slots: { min: 1, max: 1 },\n },\n ],\n },\n\n data: 'messageSignatureValidity',\n },\n },\n\n // Define a set of data that can be used in this template.\n data: {\n messageSignature: {\n // Evaluate CashASM expression to get the signature needed.\n // NOTE: Pushes the prefix and message, then concatenates them together to form the data to sign.\n // NOTE: In libauth today, it seems that this is done by defining the signature as a variable, and tying it to the key and message,\n // and so this is different\n // TODO: Check with Jason and see if there is any reason why this cannot be done like this.\n value: '$(<messagePrefix> <message> OP_CAT <ownerKey.data_signature.top_stack_element>)',\n type: 'bytes',\n hint: 'signature',\n },\n messageSignatureValidity: {\n // Evaluate the validity of the message with the owners public key.\n value: '$(<messageSignature> <messagePrefix> <message> OP_CAT <ownerKey.public_key> OP_CHECKDATASIG)',\n type: 'integer',\n },\n },\n\n // Define a set of transactions that can be used in this template.\n transactions: {\n receiveTransaction: {\n name: 'Transfer Completed',\n description: 'Transferred an unspecified amount of cash and/or tokens.',\n icon: 'request',\n\n roles: {\n receiver: {\n name: 'Received',\n description: 'Received an unspecified amount of cash and/or tokens.',\n icon: 'receive',\n },\n sender: {\n name: 'Sent',\n description: 'Sent an unspecified amount of cash and/or tokens.',\n icon: 'send',\n },\n },\n\n // Inputs and outputs that must exist in the transaction.\n // NOTE: There is no inputs required, but the engine should detect that there is not sufficient input value to\n // match the output and thus generate an invitation to participate in this action.\n // When the invitation is shared, the other parties can add as many inputs and change outputs as needed.\n inputs: [],\n outputs: [\n {\n output: 'receiveOutput',\n outputIndex: undefined,\n },\n ],\n\n // Standard transaction without a locktime.\n version: 2,\n locktime: 0,\n\n // ...\n composable: true,\n },\n requestSatoshisTransaction: {\n name: 'Satoshis Transferred',\n description: 'Transferred $(<requestedSatoshis>) satoshis.',\n icon: 'request',\n\n roles: {\n receiver: {\n name: 'Received',\n description: 'Received $(<requestedSatoshis>) satoshis.',\n icon: 'receive',\n },\n sender: {\n name: 'Sent',\n description: 'Sent $(<requestedSatoshis>) satoshis.',\n icon: 'send',\n },\n },\n\n // Inputs and outputs that must exist in the transaction.\n // NOTE: There is no inputs required, but the engine should detect that there is not sufficient input value to\n // match the output and thus generate an invitation to participate in this action.\n // When the invitation is shared, the other party can add as many inputs and outputs as needed since this transaction is composable.\n inputs: [],\n outputs: [\n {\n output: 'requestSatoshisOutput',\n outputIndex: undefined,\n },\n ],\n\n // Standard transaction without a locktime.\n version: 2,\n locktime: 0,\n\n // ...\n composable: true,\n },\n requestFungibleTokensTransaction: {\n name: 'Fungible Tokens Transferred',\n description:\n 'Transferred $(<requestedTokenAmount> <requestedTokenCategory.decimalsFactor> OP_DIV).$(<requestedTokenAmount> <requestedTokenCategory.decimalsFactor> OP_MOD) $(<requestedTokenCategory.symbol>) tokens.',\n icon: 'request',\n\n roles: {\n receiver: {\n name: 'Received',\n description:\n 'Received $(<requestedTokenAmount> <requestedTokenCategory.decimalsFactor> OP_DIV).$(<requestedTokenAmount> <requestedTokenCategory.decimalsFactor> OP_MOD) $(<requestedTokenCategory.symbol>) tokens.',\n icon: 'receive',\n },\n sender: {\n name: 'Sent',\n description:\n 'Sent $(<requestedTokenAmount> <requestedTokenCategory.decimalsFactor> OP_DIV).$(<requestedTokenAmount> <requestedTokenCategory.decimalsFactor> OP_MOD) $(<requestedTokenCategory.symbol>) tokens.',\n icon: 'send',\n },\n },\n\n // Inputs and outputs that must exist in the transaction.\n // NOTE: There is no inputs required, but the engine should detect that there is not sufficient input value to\n // match the output and thus generate an invitation to participate in this action.\n // When the invitation is shared, the other party can add as many inputs and outputs as needed since this transaction is composable.\n inputs: [],\n outputs: [\n {\n output: 'requestFungibleTokensOutput',\n outputIndex: undefined,\n },\n ],\n\n // Standard transaction without a locktime.\n version: 2,\n locktime: 0,\n\n // ...\n composable: true,\n },\n requestNonfungibleTokensTransaction: {\n name: 'Non-Fungible Token Transferred',\n description:\n 'Transferred one non-fungible $(<requestedTokenCapability> <0x02> OP_EQUAL OP_IF <\"minting\"> OP_ELSE <requestedTokenCapability> <0x01> OP_EQUAL OP_IF <\"mutable\"> OP_ELSE <\"immutable\"> OP_ENDIF OP_ENDIF) (<requestedTokenCategory.symbol>) token, with $(<requestedTokenCommitment>) commitment.',\n icon: 'request',\n\n roles: {\n receiver: {\n name: 'Received',\n description:\n 'Received one non-fungible $(<requestedTokenCapability> <0x02> OP_EQUAL OP_IF <\"minting\"> OP_ELSE <requestedTokenCapability> <0x01> OP_EQUAL OP_IF <\"mutable\"> OP_ELSE <\"immutable\"> OP_ENDIF OP_ENDIF) (<requestedTokenCategory.symbol>) token, with $(<requestedTokenCommitment>) commitment.',\n icon: 'receive',\n },\n sender: {\n name: 'Sent',\n description:\n 'Sent the requested non-fungible $(<requestedTokenCapability> <0x02> OP_EQUAL OP_IF <\"minting\"> OP_ELSE <requestedTokenCapability> <0x01> OP_EQUAL OP_IF <\"mutable\"> OP_ELSE <\"immutable\"> OP_ENDIF OP_ENDIF) (<requestedTokenCategory.symbol>) token, with $(<requestedTokenCommitment>) commitment.',\n icon: 'send',\n },\n },\n\n // Inputs and outputs that must exist in the transaction.\n // NOTE: There is no inputs required, but the engine should detect that there is not sufficient input value to\n // match the output and thus generate an invitation to participate in this action.\n // When the invitation is shared, the other party can add as many inputs and outputs as needed since this transaction is composable.\n inputs: [],\n outputs: [\n {\n output: 'requestNonfungibleTokensOutput',\n outputIndex: undefined,\n },\n ],\n\n // Standard transaction without a locktime.\n version: 2,\n locktime: 0,\n\n // ...\n composable: true,\n },\n\n transferSatoshisTransaction: {\n name: 'Satoshis Transferred',\n description: '$(<transferredSatoshis>) satoshis were transferred to a recipient.',\n icon: 'send',\n\n roles: {\n receiver: {\n name: 'Received',\n description: 'Received $(<transferredSatoshis>) satoshis.',\n icon: 'receive',\n },\n sender: {\n name: 'Sent',\n description: 'Sent $(<transferredSatoshis>) satoshis.',\n icon: 'send',\n },\n },\n\n // Enforce the inputs and outputs required by the transaction.\n // NOTE: The input is provided from the action since it is only available on outputs with satoshis.\n inputs: [],\n outputs: [\n {\n output: 'transferSatoshisOutput',\n outputIndex: undefined,\n },\n ],\n\n // Standard transaction without a locktime.\n version: 2,\n locktime: 0,\n\n // ...\n composable: true,\n },\n transferFungibleTokensTransaction: {\n name: 'Fungible Tokens Transferred',\n description:\n '$(<transferredTokenAmount> <transferredTokenCategory.decimalsFactor> OP_DIV).$(<transferredTokenAmount> <transferredTokenCategory.decimalsFactor> OP_MOD) $(<transferredTokenCategory.symbol>) tokens were transferred to a recipient.',\n icon: 'send',\n\n roles: {\n receiver: {\n name: 'Received',\n description:\n 'Received $(<transferredTokenAmount> <transferredTokenCategory.decimalsFactor> OP_DIV).$(<transferredTokenAmount> <transferredTokenCategory.decimalsFactor> OP_MOD) $(<transferredTokenCategory.symbol>) tokens.',\n icon: 'receive',\n },\n sender: {\n name: 'Sent',\n description:\n 'Sent $(<transferredTokenAmount> <transferredTokenCategory.decimalsFactor> OP_DIV).$(<transferredTokenAmount> <transferredTokenCategory.decimalsFactor> OP_MOD) $(<transferredTokenCategory.symbol>) tokens.',\n icon: 'send',\n },\n },\n\n // Enforce the inputs and outputs required by the transaction.\n // NOTE: The input is provided from the action since it is only available on outputs with fungible tokens.\n inputs: [],\n outputs: [\n {\n output: 'transferFungibleTokensOutput',\n outputIndex: undefined,\n },\n ],\n\n // Standard transaction without a locktime.\n version: 2,\n locktime: 0,\n\n // ...\n composable: true,\n },\n transferNonfungibleTokensTransaction: {\n name: 'Non-fungible Token Transferred',\n description:\n 'One non-fungible $(<transferredTokenCapability> <0x02> OP_EQUAL OP_IF <\"minting\"> OP_ELSE <transferredTokenCapability> <0x01> OP_EQUAL OP_IF <\"mutable\"> OP_ELSE <\"immutable\"> OP_ENDIF OP_ENDIF) $(<transferredTokenCategory.symbol>) token was transferred to a recipient, with $(<transferredTokenCommitment>) commitment.',\n icon: 'send',\n\n roles: {\n receiver: {\n name: 'Received',\n description:\n 'Received one non-fungible $(<transferredTokenCapability> <0x02> OP_EQUAL OP_IF <\"minting\"> OP_ELSE <transferredTokenCapability> <0x01> OP_EQUAL OP_IF <\"mutable\"> OP_ELSE <\"immutable\"> OP_ENDIF OP_ENDIF) (<transferredTokenCategory.symbol>) token, with $(<transferredTokenCommitment>) commitment.',\n icon: 'receive',\n },\n sender: {\n name: 'Sent',\n description:\n 'Sent one non-fungible $(<transferredTokenCapability> <0x02> OP_EQUAL OP_IF <\"minting\"> OP_ELSE <transferredTokenCapability> <0x01> OP_EQUAL OP_IF <\"mutable\"> OP_ELSE <\"immutable\"> OP_ENDIF OP_ENDIF) (<transferredTokenCategory.symbol>) token, with $(<transferredTokenCommitment>) commitment.',\n icon: 'send',\n },\n },\n\n // Enforce the inputs and outputs required by the transaction.\n // NOTE: The input is provided from the action since it is only available on outputs with a non-fungible token.\n inputs: [],\n outputs: [\n {\n output: 'transferNonfungibleTokenOutput',\n outputIndex: undefined,\n },\n ],\n\n // Standard transaction without a locktime.\n version: 2,\n locktime: 0,\n\n // ...\n composable: true,\n },\n\n burnFungibleTokensTransaction: {\n name: 'Deleted fungible tokens',\n description:\n 'Permanently and irreversibly deleted $(<burnedTokenAmount> <burnedTokenCategory.decimalsFactor> OP_DIV).$(<burnedTokenAmount> <burnedTokenCategory.decimalsFactor> OP_MOD) $(<burnedTokenCategory.symbol>) tokens.',\n icon: 'burn',\n\n // Inputs and outputs that must exist in the transaction.\n // NOTE: There is no defined outputs as any non-burned value is automatically returned as change.\n inputs: [\n {\n input: 'burnFungibleTokensInput',\n inputIndex: undefined,\n },\n ],\n\n outputs: [],\n\n // Standard transaction without a locktime.\n version: 2,\n locktime: 0,\n\n // ...\n composable: true,\n },\n burnNonfungibleTokenTransaction: {\n name: 'Deleted non fungible token',\n description:\n 'Permanently and irreversibly deleted a non-fungible $(<burnedTokenCapability> <0x02> OP_EQUAL OP_IF <\"minting\"> OP_ELSE <burnedTokenCapability> <0x01> OP_EQUAL OP_IF <\"mutable\"> OP_ELSE <\"immutable\"> OP_ENDIF OP_ENDIF) (<burnedTokenCategory.symbol>) token, with $(<burnedTokenCommitment>) commitment.',\n icon: 'burn',\n\n // Inputs and outputs that must exist in the transaction.\n // NOTE: There is no defined outputs as any non-burned value is automatically returned as change.\n inputs: [\n {\n input: 'burnNonfungibleTokenInput',\n inputIndex: undefined,\n },\n ],\n outputs: [],\n\n // Standard transaction without a locktime.\n version: 2,\n locktime: 0,\n\n // ...\n composable: true,\n },\n },\n\n // Define a set of outputs that can be used within transactions in this template.\n outputs: {\n changeOutput: {\n name: 'Change',\n description: 'Funds returned as change.',\n icon: 'receive',\n\n // Defines how the requested funds should be locked.\n lockingScript: 'receivingLockingScript',\n },\n receiveOutput: {\n name: 'Recipient output',\n description: 'Transferred an unspecified amount of cash and/or tokens to a recipient.',\n icon: 'receive',\n\n roles: {\n receiver: {\n name: 'Received',\n description: 'Received an unspecified amount of cash and/or tokens.',\n },\n sender: {\n name: 'Sent',\n description: 'Sent an unspecified amount of cash and/or tokens.',\n },\n },\n\n // Defines how the requested funds should be locked.\n lockingScript: 'receivingLockingScript',\n\n // Set the amount of cash and/or tokens to transfer.\n valueSatoshis: '$(<transferredSatoshis>)',\n token: null,\n },\n requestSatoshisOutput: {\n name: 'Satoshis',\n description: '$(<requestedSatoshis>) satoshis.',\n icon: 'request',\n\n roles: {\n receiver: {\n name: 'Satoshis Received',\n description: 'Received $(<requestedSatoshis>) satoshis.',\n },\n sender: {\n name: 'Satoshis Sent',\n description: 'Sent $(<requestedSatoshis>) satoshis.',\n },\n },\n\n // Defines how the requested funds should be locked.\n lockingScript: 'receivingLockingScript',\n\n // Require the specified number of satoshis and no tokens.\n valueSatoshis: '$(<requestedSatoshis>)',\n token: null,\n },\n requestFungibleTokensOutput: {\n name: 'Fungible $(<requestedTokenCategory.symbol>) Tokens',\n description:\n '$(<requestedTokenAmount> <requestedTokenCategory.decimalsFactor> OP_DIV).$(<requestedTokenAmount> <requestedTokenCategory.decimalsFactor> OP_MOD) $(<requestedTokenCategory.symbol>) tokens.',\n icon: 'request',\n\n roles: {\n receiver: {\n name: 'Fungible $(<requestedTokenCategory.symbol>) Tokens Received',\n description:\n 'Received $(<requestedTokenAmount> <requestedTokenCategory.decimalsFactor> OP_DIV).$(<requestedTokenAmount> <requestedTokenCategory.decimalsFactor> OP_MOD) $(<requestedTokenCategory.symbol>) tokens.',\n },\n sender: {\n name: 'Fungible $(<requestedTokenCategory.symbol>) Tokens Sent',\n description:\n 'Sent $(<requestedTokenAmount> <requestedTokenCategory.decimalsFactor> OP_DIV).$(<requestedTokenAmount> <requestedTokenCategory.decimalsFactor> OP_MOD) $(<requestedTokenCategory.symbol>) tokens.',\n },\n },\n\n // Defines how the requested funds should be locked.\n lockingScript: 'receivingLockingScript',\n\n // Require a flat 1000 satoshis to ensure the fungible tokens remains transferrable.\n valueSatoshis: '1000',\n\n // Require only the specified amount and type of fungible tokens.\n // NOTE: This can be composed with a request for a non-fungible token, but will always result in two separate outputs.\n token: {\n category: '$(<requestedTokenCategory>)',\n amount: '$(<requestedTokenAmount>)',\n nft: null,\n },\n },\n requestNonfungibleTokensOutput: {\n name: 'Non-fungible $(<requestedTokenCategory.symbol>) Token',\n description:\n 'Transferred one non-fungible $(<requestedTokenCapability> <0x02> OP_EQUAL OP_IF <\"minting\"> OP_ELSE <requestedTokenCapability> <0x01> OP_EQUAL OP_IF <\"mutable\"> OP_ELSE <\"immutable\"> OP_ENDIF OP_ENDIF) $(<requestedTokenCategory.symbol>) token to a recipient, with $(<requestedTokenCommitment>) commitment.',\n icon: 'request',\n\n roles: {\n receiver: {\n name: 'Non-fungible $(<requestedTokenCategory.symbol>) Token Received',\n description:\n 'Received one non-fungible $(<requestedTokenCapability> <0x02> OP_EQUAL OP_IF <\"minting\"> OP_ELSE <requestedTokenCapability> <0x01> OP_EQUAL OP_IF <\"mutable\"> OP_ELSE <\"immutable\"> OP_ENDIF OP_ENDIF) $(<requestedTokenCategory.symbol>) token, with $(<requestedTokenCommitment>) commitment.',\n },\n sender: {\n name: 'Non-fungible $(<requestedTokenCategory.symbol>) Token Sent',\n description:\n 'Sent the requested non-fungible $(<requestedTokenCapability> <0x02> OP_EQUAL OP_IF <\"minting\"> OP_ELSE <requestedTokenCapability> <0x01> OP_EQUAL OP_IF <\"mutable\"> OP_ELSE <\"immutable\"> OP_ENDIF OP_ENDIF) $(<requestedTokenCategory.symbol>) token, with $(<requestedTokenCommitment>) commitment.',\n },\n },\n\n // Defines how the requested funds should be locked.\n lockingScript: 'receivingLockingScript',\n\n // Require a flat 1000 satoshis to ensure the non-fungible token remains transferrable.\n valueSatoshis: '1000',\n\n // Require only an NFT with specified category, capability and commitment.\n // NOTE: This can be composed with a request for fungible token amounts, but will always result in two separate outputs.\n token: {\n category: '$(<requestedTokenCategory>)',\n amount: null,\n nft: {\n capability: '$(<requestedTokenCapability>)',\n commitment: '$(<requestedTokenCommitment>)',\n },\n },\n },\n\n transferSatoshisOutput: {\n name: 'Recipient output',\n description: 'Transferred $(<transferredSatoshis>) satoshis to a recipient.',\n icon: 'send',\n\n roles: {\n receiver: {\n name: 'Received',\n description: 'Received $(<transferredSatoshis>) satoshis.',\n },\n sender: {\n name: 'Sent',\n description: 'Sent $(<transferredSatoshis>) satoshis.',\n },\n },\n\n // Use the recipients lockscript.\n lockingScript: 'sendingLockingscript',\n\n // Set the amount of satoshis to transfer.\n valueSatoshis: '$(<transferredSatoshis>)',\n },\n transferFungibleTokensOutput: {\n name: 'Recipient output',\n description:\n 'Transferred $(<transferredTokenAmount> <transferredTokenCategory.decimalsFactor> OP_DIV).$(<transferredTokenAmount> <transferredTokenCategory.decimalsFactor> OP_MOD) $(<transferredTokenCategory.symbol>) tokens to a recipient.',\n icon: 'send',\n\n roles: {\n receiver: {\n name: 'Received',\n description:\n 'Received $(<transferredTokenAmount> <transferredTokenCategory.decimalsFactor> OP_DIV).$(<transferredTokenAmount> <transferredTokenCategory.decimalsFactor> OP_MOD) $(<transferredTokenCategory.symbol>) tokens.',\n },\n sender: {\n name: 'Sent',\n description:\n 'Sent $(<transferredTokenAmount> <transferredTokenCategory.decimalsFactor> OP_DIV).$(<transferredTokenAmount> <transferredTokenCategory.decimalsFactor> OP_MOD) $(<transferredTokenCategory.symbol>) tokens.',\n },\n },\n\n // Use the recipients lockscript.\n lockingScript: 'sendingLockingscript',\n\n // Set the amount of fungible tokens to transfer.\n token: {\n category: '$(<transferredTokenCategory>)',\n amount: '$(<transferredTokenAmount>)',\n },\n },\n transferNonfungibleTokenOutput: {\n name: 'Recipient output',\n description:\n 'Transferred one non-fungible $(<transferredTokenCapability> <0x02> OP_EQUAL OP_IF <\"minting\"> OP_ELSE <transferredTokenCapability> <0x01> OP_EQUAL OP_IF <\"mutable\"> OP_ELSE <\"immutable\"> OP_ENDIF OP_ENDIF) $(<transferredTokenCategory.symbol>) token to a recipient, with $(<transferredTokenCommitment>) commitment.',\n icon: 'send',\n\n roles: {\n receiver: {\n name: 'Received',\n description:\n 'Received one non-fungible $(<transferredTokenCapability> <0x02> OP_EQUAL OP_IF <\"minting\"> OP_ELSE <transferredTokenCapability> <0x01> OP_EQUAL OP_IF <\"mutable\"> OP_ELSE <\"immutable\"> OP_ENDIF OP_ENDIF) $(<transferredTokenCategory.symbol>) token, with $(<transferredTokenCommitment>) commitment.',\n },\n sender: {\n name: 'Sent',\n description:\n 'Sent one non-fungible $(<transferredTokenCapability> <0x02> OP_EQUAL OP_IF <\"minting\"> OP_ELSE <transferredTokenCapability> <0x01> OP_EQUAL OP_IF <\"mutable\"> OP_ELSE <\"immutable\"> OP_ENDIF OP_ENDIF) $(<transferredTokenCategory.symbol>) token, with $(<transferredTokenCommitment>) commitment.',\n },\n },\n\n // Use the recipients lockscript.\n lockingScript: 'sendingLockingscript',\n\n // Set the non-fungible token to transfer.\n token: {\n category: '$(<transferredTokenCategory>)',\n nft: {\n capability: '$(<transferredTokenCapability>)',\n commitment: '$(<transferredTokenCommitment>)',\n },\n },\n },\n },\n\n inputs: {\n burnFungibleTokensInput: {\n name: 'Deleted fungible tokens',\n description: 'Permanently and irreversibly deleted $(<burnedTokenAmount>) $(<burnedTokenCategory>).',\n icon: 'burn',\n\n // Define which unlocking script unlocks this input.\n unlockingScript: 'unlockP2PKH',\n\n // Require a fungible token of the requested token category, with an amount larger than or equal to the requested amount to burn.\n token: {\n category: '$(<burnedTokenCategory>)',\n amount: '$(<this.fungibleTokenAmount> <burnedTokenAmount> OP_GREATERTHANOREQUAL OP_IF <this.fungibleTokens> OP_ENDIF)',\n },\n\n // Ignore the burned token amount when determining change for this output.\n // NOTE: The engine must check that this does not exceed the input value.\n omitChangeAmounts: {\n fungibleTokens: '${<burnedTokenAmount>}',\n },\n },\n burnNonfungibleTokenInput: {\n name: 'Deleted non-fungible token',\n description:\n 'Permanently and irreversibly burned one non-fungible $(<burnedTokenCapability> <0x02> OP_EQUAL OP_IF <\"minting\"> OP_ELSE <burnedTokenCapability> <0x01> OP_EQUAL OP_IF <\"mutable\"> OP_ELSE <\"immutable\"> OP_ENDIF OP_ENDIF) token of category $(<burnedTokenCategory>), with a $(<burnedTokenCommitment>) commitment.',\n icon: 'burn',\n\n // Define which unlocking script unlocks this input.\n unlockingScript: 'unlockP2PKH',\n\n // Require a non-fungible token of the specified category, capability and commitment to burn.\n token: {\n category: '$(<burnedTokenCategory>)',\n nft: {\n capability: '$(<burnedTokenCapability>)',\n commitment: '$(<burnedTokenCommitment>)',\n },\n },\n\n // Ignore the burned token when determining change for this output.\n // NOTE: The engine must check that this does not exceed the input value.\n omitChangeAmounts: {\n nonfungibleTokens: 1,\n },\n },\n },\n\n // Define locking scripts used by this template.\n // NOTE: Template supported wallets should automatically track all generated lockscripts for on-chain events.\n lockingScripts: {\n sendingLockingscript: {\n // TODO: This currently describes outputs locked to this script, but all actions creating such outputs already have descriptions.\n // This can either be dropped, or maybe more importantly, should be disambiguated so that lockscripts can provide separate\n // descriptions for their script and the outputs that are locked to them. Leaving as a TODO for now and will address later.\n name: 'Sent',\n description: 'Funds sent to an external recipient',\n icon: 'address',\n\n // ...\n lockingType: 'p2pkh',\n lockingBytecode: 'lockToRecipient',\n\n // Indicate that the sent output does not belong to the initiating user.\n // NOTE: These values default to false/empty, but added here for additional clarity.\n actions: [],\n state: { variables: [], secrets: [] },\n balance: {},\n selectable: false,\n },\n receivingLockingScript: {\n // NOTE: Outputs to this lockscript by external actors defaults to this description when detected on-chain.\n name: 'Received',\n description: 'Funds received without wallet coordination.',\n icon: 'address',\n\n // Defines how spending future received funds should be locked.\n lockingType: 'p2pkh',\n lockingBytecode: 'lockP2PKH',\n\n // Define a default unlocking script to be used when no action provided script is present.\n unlockingBytecode: 'unlockP2PKH',\n\n // Participants without a role or observers cannot take any further actions.\n // NOTE: This is not required but shown here for illustrative purposes.\n actions: [],\n\n roles: {\n receiver: {\n // The only state that is required to be persisted when receiving funds is the owners private key.\n // NOTE: This is defined as a secret to not leak when creating invitations for others to participate in request or send actions.\n state: {\n variables: [],\n secrets: [ 'ownerKey' ],\n },\n\n // List actions that can be taken with the ownerKey for each address/lockscript.\n actions: [\n {\n action: 'sign',\n role: 'owner',\n secrets: [{ ownerKey: null }],\n },\n {\n action: 'verify',\n role: 'owner',\n secrets: [{ ownerKey: null }],\n },\n {\n action: 'sendSatoshis',\n role: 'sender',\n secrets: [{ ownerKey: null }],\n },\n {\n action: 'sendFungibleTokens',\n role: 'sender',\n secrets: [{ ownerKey: null }],\n },\n {\n action: 'sendNonfungibleTokens',\n role: 'sender',\n secrets: [{ ownerKey: null }],\n },\n {\n action: 'burnFungibleTokens',\n role: 'sender',\n secrets: [{ ownerKey: null }],\n },\n {\n action: 'burnNonfungibleTokens',\n role: 'sender',\n secrets: [{ ownerKey: null }],\n },\n ],\n\n // Indicates how much of received funds should be part of a wallets total balance.\n // NOTE: Evaluates in the context of the source transaction, with the current outputs technical data available under this.output.*\n // NOTE: A CashASM expression of '1' means include 100% of this asset in the balance.\n // NOTE: Since we know that the owner controls all assets, we short-cut the evaluations by setting 1 directly.\n balance: {\n satoshis: true,\n fungibleTokens: true,\n nonfungibleTokens: true,\n },\n\n // Indicate when received funds should be considered in automatic coin selection to meet input requirements of other transactions.\n // NOTE: Evaluates in the context of the source transaction, with the current outputs technical data available under this.output.*\n // NOTE: This evaluates to a boolean. If non-true, the output should not be considered for automatic coin selection.\n // NOTE: Since we know that the secret key exist for the owner, this template short-cuts the evaluation by setting true directly.\n selectable: true,\n },\n },\n },\n },\n\n // Define a set of scripts that can be used in this template.\n scripts: {\n lockP2PKH: 'OP_DUP OP_HASH160 <$(<ownerKey.public_key> OP_HASH160)> OP_EQUALVERIFY OP_CHECKSIG',\n unlockP2PKH: '<ownerKey.schnorr_signature.all_outputs> <ownerKey.public_key>',\n lockToRecipient: '<recipientLockingscript>',\n },\n\n // TODO: Add icons\n constants: {\n dustLimit: {\n name: 'Dust Limit',\n description: 'Standard required minimum satoshis for Pay to Public Key Hash outputs.',\n type: 'integer',\n value: 546,\n },\n\n // Define a message prefix for use in arbitrary message signing.\n messagePrefix: {\n name: 'Message Prefix',\n description: 'Standard message prefix used in the bitcoin signed message protocol.',\n type: 'bytes',\n\n // Value is enforced to the bitcoin signing magic string:\n // \"\\x18Bitcoin Signed Message:\\n\"\n value: '0x18426974636f696e205369676e6564204d6573736167653a0a',\n },\n },\n\n // TODO: Add icons\n variables: {\n // Describe the secret private key.\n ownerKey: {\n name: 'Owners Private Key',\n description: 'The private key used to authorize spending of received funds.',\n type: 'bytes',\n hint: 'private_key',\n },\n\n messageToSign: {\n name: 'Message',\n description: 'The text message to sign.',\n type: 'string',\n },\n messageToVerify: {\n name: 'Message',\n description: 'The text message to verify.',\n type: 'string',\n },\n messageSignature: {\n name: 'Message Signature',\n description: 'The signature for the message.',\n type: 'bytes',\n hint: 'signature',\n },\n\n // Describe the parameters used when requesting value.\n requestedSatoshis: {\n name: 'Requested Amount',\n description: 'The Bitcoin Cash amount requested',\n type: 'integer',\n hint: 'satoshis',\n },\n transferredSatoshis: {\n name: 'Transferred Amount',\n description: 'The Bitcoin Cash amount transferred',\n type: 'integer',\n hint: 'satoshis',\n },\n requestedTokenCategory: {\n name: 'Requested Token Category',\n description: 'The token category requested',\n type: 'bytes',\n hint: 'token_category',\n },\n requestedTokenAmount: {\n name: 'Requested Token Amount',\n description: 'The fungible token amount requested',\n type: 'integer',\n hint: 'token_amount',\n },\n requestedTokenCapability: {\n name: 'Requested Token Capability',\n description: 'The non-fungible token capability requested',\n type: 'bytes',\n hint: 'token_capability',\n },\n requestedTokenCommitment: {\n name: 'Requested Token Commitment',\n description: 'The non-fungible token commitment requested',\n type: 'bytes',\n hint: 'token_commitment',\n },\n transferredTokenCategory: {\n name: 'Sending Token Category',\n description: 'The token category of the token(s) to send',\n type: 'bytes',\n hint: 'token_category',\n },\n transferredTokenAmount: {\n name: 'Sending Token Amount',\n description: 'The fungible token amount to send',\n type: 'integer',\n hint: 'token_amount',\n },\n transferredTokenCapability: {\n name: 'Sending Token Capability',\n description: 'The token capability for the non-fungible token to send',\n type: 'bytes',\n hint: 'token_capability',\n },\n transferredTokenCommitment: {\n name: 'Sending Token Commitment',\n description: 'The token commitment for the non-fungible token to send',\n type: 'bytes',\n hint: 'token_commitment',\n },\n burnedTokenCategory: {\n name: 'Deleted Token Category',\n description: 'The token category of the token(s) to delete',\n type: 'bytes',\n hint: 'token_category',\n },\n burnedTokenAmount: {\n name: 'Deleted Token Amount',\n description: 'The fungible token amount to delete',\n type: 'integer',\n hint: 'token_amount',\n },\n burnedTokenCapability: {\n name: 'Deleted Token Capability',\n description: 'The token capability for the non-fungible token to delete',\n type: 'bytes',\n hint: 'token_capability',\n },\n burnedTokenCommitment: {\n name: 'Deleted Token Commitment',\n description: 'The token commitment for the non-fungible token to delete',\n type: 'bytes',\n hint: 'token_commitment',\n },\n },\n\n // Define a list of re-usable icons that can be used as part of metadata.\n // NOTE: the actual icons are not embedded in the template but only referenced by hashes here,\n // and can be distributed either as an asset pack or looked up through something like IPFS.\n icons: [\n {\n name: 'wallet',\n hash: '0000000000000000000000',\n },\n {\n name: 'owner',\n hash: '0000000000000000000000',\n },\n {\n name: 'sender',\n hash: '0000000000000000000000',\n },\n {\n name: 'address',\n hash: '0000000000000000000000',\n },\n {\n name: 'receive',\n hash: '0000000000000000000000',\n },\n {\n name: 'request',\n hash: '0000000000000000000000',\n },\n {\n name: 'send',\n hash: '0000000000000000000000',\n },\n {\n name: 'burn',\n hash: '0000000000000000000000',\n },\n {\n name: 'sign',\n hash: '0000000000000000000000',\n },\n {\n name: 'verify',\n hash: '0000000000000000000000',\n },\n ],\n\n scenarios: [\n {\n name: 'requesting satoshis',\n description: 'happy-path evaluation for requesting satoshis.',\n\n // The action being run in the scenario.\n action: 'requestSatoshis',\n\n // List of roles taken in this scenario, and the resources they provided.\n roles: [\n {\n role: 'receiver',\n values: {\n generated: {\n ownerKey: 'KyRQa5pEXuzVcDwnXRLpYAascjchQW5DoxVRMbj4DTxS83573mz8',\n },\n variables: {\n requestedSatoshis: 2000,\n },\n secrets: {\n // This scenario does not carry any secrets.\n },\n inputs: [],\n outputs: [\n {\n lockingBytecode: '76a91475c715ecb74178fe87933e57e947e5e92d904b8188ac',\n valueSatoshis: 2000,\n },\n ],\n },\n },\n {\n role: 'sender',\n values: {\n // The sender provides no raw data to the action.\n generated: {},\n variables: {},\n secrets: {},\n\n // The sender does provide input and change.\n inputs: [\n {\n outpointTransactionHash: '4ef28553a31a266719e66ba97fee3aeecd6d1788f7ff6ab12f8ebceda49660c0',\n outpointIndex: 0,\n sequenceNumber: 0,\n unlockingBytecode:\n '41226b2be7c2890c8bbde2f79e79640e56d866843f2e822ec51c469019d13db04a422c9ee49f5eefd26fee24e91910edbbb032b90cc54c34da80a61e69b0ee3d22412103e7ab26c36a7c7f45b2c26f33c08b0fa43a633268700f47216646d4cb37ae5696',\n },\n ],\n outputs: [\n {\n lockingBytecode: '76a91475c715ecb74178fe87933e57e947e5e92d904b8188ac',\n valueSatoshis: 2000,\n },\n ],\n },\n },\n ],\n\n // List of resources provided outside the context of a role.\n values: {\n generated: {\n // This scenario does not have any non-role generated values.\n },\n variables: {\n // This scenario does not have any non-role variables.\n },\n secrets: {\n // This scenario does not have any non-role secrets.\n },\n },\n\n // Outcomes provides the set of resulting values created from the action.\n outcome: {\n roles: {\n receiver: {\n name: 'Request',\n description: 'Requested a specific amount of satoshis from one or more senders.',\n icon: 'request',\n },\n sender: {\n name: 'Send',\n description: 'Sent a specific amount of satoshis to the provided receiver.',\n icon: 'send',\n },\n },\n\n transactions: [\n {\n transaction:\n '0200000001c06096a4edbc8e2fb16afff788176dcdee3aee7fa96be61967261aa35385f24e000000006441226b2be7c2890c8bbde2f79e79640e56d866843f2e822ec51c469019d13db04a422c9ee49f5eefd26fee24e91910edbbb032b90cc54c34da80a61e69b0ee3d22412103e7ab26c36a7c7f45b2c26f33c08b0fa43a633268700f47216646d4cb37ae5696000000000267530300000000001976a91475c715ecb74178fe87933e57e947e5e92d904b8188acd0070000000000001976a91475c715ecb74178fe87933e57e947e5e92d904b8188ac00000000',\n value: '',\n },\n ],\n },\n },\n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CAGA,WAAW;EACP,WAAW;GACP,MAAM;GACN,aAAa;GACb,MAAM;GACN,OAAO;EACX;EAGA,eAAe;GACX,MAAM;GACN,aAAa;GACb,MAAM;GAIN,OAAO;EACX;CACJ;CAGA,WAAW;EAEP,UAAU;GACN,MAAM;GACN,aAAa;GACb,MAAM;GACN,MAAM;EACV;EAEA,eAAe;GACX,MAAM;GACN,aAAa;GACb,MAAM;EACV;EACA,iBAAiB;GACb,MAAM;GACN,aAAa;GACb,MAAM;EACV;EACA,kBAAkB;GACd,MAAM;GACN,aAAa;GACb,MAAM;GACN,MAAM;EACV;EAGA,mBAAmB;GACf,MAAM;GACN,aAAa;GACb,MAAM;GACN,MAAM;EACV;EACA,qBAAqB;GACjB,MAAM;GACN,aAAa;GACb,MAAM;GACN,MAAM;EACV;EACA,wBAAwB;GACpB,MAAM;GACN,aAAa;GACb,MAAM;GACN,MAAM;EACV;EACA,sBAAsB;GAClB,MAAM;GACN,aAAa;GACb,MAAM;GACN,MAAM;EACV;EACA,0BAA0B;GACtB,MAAM;GACN,aAAa;GACb,MAAM;GACN,MAAM;EACV;EACA,0BAA0B;GACtB,MAAM;GACN,aAAa;GACb,MAAM;GACN,MAAM;EACV;EACA,0BAA0B;GACtB,MAAM;GACN,aAAa;GACb,MAAM;GACN,MAAM;EACV;EACA,wBAAwB;GACpB,MAAM;GACN,aAAa;GACb,MAAM;GACN,MAAM;EACV;EACA,4BAA4B;GACxB,MAAM;GACN,aAAa;GACb,MAAM;GACN,MAAM;EACV;EACA,4BAA4B;GACxB,MAAM;GACN,aAAa;GACb,MAAM;GACN,MAAM;EACV;EACA,qBAAqB;GACjB,MAAM;GACN,aAAa;GACb,MAAM;GACN,MAAM;EACV;EACA,mBAAmB;GACf,MAAM;GACN,aAAa;GACb,MAAM;GACN,MAAM;EACV;EACA,uBAAuB;GACnB,MAAM;GACN,aAAa;GACb,MAAM;GACN,MAAM;EACV;EACA,uBAAuB;GACnB,MAAM;GACN,aAAa;GACb,MAAM;GACN,MAAM;EACV;CACJ;CAKA,OAAO;EACH;GACI,MAAM;GACN,MAAM;EACV;EACA;GACI,MAAM;GACN,MAAM;EACV;EACA;GACI,MAAM;GACN,MAAM;EACV;EACA;GACI,MAAM;GACN,MAAM;EACV;EACA;GACI,MAAM;GACN,MAAM;EACV;EACA;GACI,MAAM;GACN,MAAM;EACV;EACA;GACI,MAAM;GACN,MAAM;EACV;EACA;GACI,MAAM;GACN,MAAM;EACV;EACA;GACI,MAAM;GACN,MAAM;EACV;EACA;GACI,MAAM;GACN,MAAM;EACV;CACJ;CAEA,WAAW,CACP;EACI,MAAM;EACN,aAAa;EAGb,QAAQ;EAGR,OAAO,CACH;GACI,MAAM;GACN,QAAQ;IACJ,WAAW,EACP,UAAU,uDACd;IACA,WAAW,EACP,mBAAmB,IACvB;IACA,SAAS,CAET;IACA,QAAQ,CAAC;IACT,SAAS,CACL;KACI,iBAAiB;KACjB,eAAe;IACnB,CACJ;GACJ;EACJ,GACA;GACI,MAAM;GACN,QAAQ;IAEJ,WAAW,CAAC;IACZ,WAAW,CAAC;IACZ,SAAS,CAAC;IAGV,QAAQ,CACJ;KACI,yBAAyB;KACzB,eAAe;KACf,gBAAgB;KAChB,mBACI;IACR,CACJ;IACA,SAAS,CACL;KACI,iBAAiB;KACjB,eAAe;IACnB,CACJ;GACJ;EACJ,CACJ;EAGA,QAAQ;GACJ,WAAW,CAEX;GACA,WAAW,CAEX;GACA,SAAS,CAET;EACJ;EAGA,SAAS;GACL,OAAO;IACH,UAAU;KACN,MAAM;KACN,aAAa;KACb,MAAM;IACV;IACA,QAAQ;KACJ,MAAM;KACN,aAAa;KACb,MAAM;IACV;GACJ;GAEA,cAAc,CACV;IACI,aACI;IACJ,OAAO;GACX,CACJ;EACJ;CACJ,CACJ;AACJ"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xo-cash/templates",
3
- "version": "0.0.3",
3
+ "version": "0.0.4",
4
4
  "description": "XO templates",
5
5
  "type": "module",
6
6
  "types": "./dist/index.d.mts",
@@ -41,9 +41,6 @@
41
41
  "bitcoin cash",
42
42
  "xo"
43
43
  ],
44
- "dependencies": {
45
- "@xo-cash/types": "0.0.4"
46
- },
47
44
  "overrides": {
48
45
  "echarts": "6.1.0",
49
46
  "minimatch": "10.2.6"
@@ -51,12 +48,12 @@
51
48
  "devDependencies": {
52
49
  "@generalprotocols/cspell-dictionary": "^1.0.1",
53
50
  "@vitest/coverage-v8": "^4.0.17",
54
- "@viz-kit/esbuild-analyzer": "^1.0.0",
55
51
  "@xo-cash/eslint-config": "1.0.2",
52
+ "@xo-cash/types": "^0.0.5",
56
53
  "cspell": "^9.6.0",
57
54
  "eslint": "^9.39.2",
58
55
  "prettier": "^3.6.2",
59
- "tsdown": "^0.20.0-beta.4",
56
+ "tsdown": "^0.22.14",
60
57
  "typedoc": "^0.28.16",
61
58
  "typedoc-plugin-coverage": "^4.0.2",
62
59
  "typescript": "^5.3.2",