@xo-cash/templates 0.0.1-development.13507467492

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 GeneralProtocols / XO
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,24 @@
1
+ # @xo-cash/templates
2
+
3
+ XO templates
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ npm install @xo-cash/templates
9
+ ```
10
+
11
+ ## Usage
12
+
13
+ ```typescript
14
+ import { p2pkhTemplate } from '@xo-cash/templates';
15
+ ```
16
+
17
+ ## Links
18
+
19
+ - [Repository](https://gitlab.com/GeneralProtocols/xo/templates)
20
+ - [Issues](https://gitlab.com/GeneralProtocols/xo/templates/issues)
21
+
22
+ ## License
23
+
24
+ MIT - See [LICENSE](LICENSE) for details.
@@ -0,0 +1,7 @@
1
+ import { XOTemplate } from "@xo-cash/types";
2
+
3
+ //#region source/p2pkh.d.ts
4
+ declare const p2pkhTemplate: XOTemplate;
5
+ //#endregion
6
+ export { p2pkhTemplate };
7
+ //# sourceMappingURL=index.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.mts","names":[],"sources":["../source/p2pkh.ts"],"mappings":";;;cAEa,aAAA,EAAe,UAAA"}
package/dist/index.mjs ADDED
@@ -0,0 +1,1011 @@
1
+ //#region source/p2pkh.ts
2
+ const p2pkhTemplate = {
3
+ $schema: "https://libauth.org/schemas/wallet-template-v0.schema.json",
4
+ name: "Wallet (P2PKH)",
5
+ description: "A standard single-factor wallet template that uses Pay-to-Public-Key-Hash (P2PKH) locking scripts.",
6
+ icon: "wallet",
7
+ version: 0,
8
+ supported: [
9
+ "BCH_2023_05",
10
+ "BCH_2024_05",
11
+ "BCH_2025_05",
12
+ "BCH_2026_05"
13
+ ],
14
+ roles: {
15
+ owner: {
16
+ name: "Wallet Owner",
17
+ description: "The party who can spend from this wallet.",
18
+ icon: "owner"
19
+ },
20
+ receiver: {
21
+ name: "Receiver",
22
+ description: "A party that is receiving value.",
23
+ icon: "receiver"
24
+ },
25
+ sender: {
26
+ name: "Sender",
27
+ description: "A party that is sending value.",
28
+ icon: "sender"
29
+ }
30
+ },
31
+ start: [
32
+ {
33
+ action: "receive",
34
+ role: "receiver"
35
+ },
36
+ {
37
+ action: "requestSatoshis",
38
+ role: "receiver"
39
+ },
40
+ {
41
+ action: "requestFungibleTokens",
42
+ role: "receiver"
43
+ },
44
+ {
45
+ action: "requestNonfungibleTokens",
46
+ role: "receiver"
47
+ }
48
+ ],
49
+ actions: {
50
+ receive: {
51
+ name: "Receive",
52
+ description: "Receive an unspecified amount of cash and/or tokens from one or more senders.",
53
+ icon: "receive",
54
+ roles: {
55
+ receiver: {
56
+ name: "Receive",
57
+ description: "Receive an unspecified amount of cash and/or tokens from one or more senders.",
58
+ icon: "receive",
59
+ requirements: { generate: ["ownerKey"] }
60
+ },
61
+ sender: {
62
+ name: "Send",
63
+ description: "Send an unspecified amount of cash and/or tokens to the provided receiver.",
64
+ icon: "send"
65
+ }
66
+ },
67
+ requirements: { roles: [{
68
+ role: "receiver",
69
+ slots: {
70
+ min: 1,
71
+ max: 1
72
+ }
73
+ }, {
74
+ role: "sender",
75
+ slots: {
76
+ min: 1,
77
+ max: void 0
78
+ }
79
+ }] },
80
+ transaction: "receiveTransaction"
81
+ },
82
+ requestSatoshis: {
83
+ name: "Request Satoshis",
84
+ description: "Requests a specific amount of Bitcoin Cash from one or more senders.",
85
+ icon: "request",
86
+ roles: {
87
+ receiver: {
88
+ name: "Request Satoshis",
89
+ description: "Requests a specific amount of Bitcoin Cash from one or more senders.",
90
+ icon: "request",
91
+ requirements: {
92
+ generate: ["ownerKey"],
93
+ variables: ["requestedSatoshis"]
94
+ }
95
+ },
96
+ sender: {
97
+ name: "Send",
98
+ description: "Send a specific amount of Bitcoin Cash to the provided receiver.",
99
+ icon: "send"
100
+ }
101
+ },
102
+ requirements: { roles: [{
103
+ role: "receiver",
104
+ slots: {
105
+ min: 1,
106
+ max: 1
107
+ }
108
+ }, {
109
+ role: "sender",
110
+ slots: {
111
+ min: 1,
112
+ max: void 0
113
+ }
114
+ }] },
115
+ transaction: "requestSatoshisTransaction"
116
+ },
117
+ requestFungibleTokens: {
118
+ name: "Request Fungible Tokens",
119
+ description: "Requests a specific amount of a fungible tokens from one or more senders.",
120
+ icon: "request",
121
+ roles: {
122
+ receiver: {
123
+ name: "Request Fungible Tokens",
124
+ description: "Requests a specific amount of a fungible tokens from one or more senders.",
125
+ icon: "request",
126
+ requirements: {
127
+ generate: ["ownerKey"],
128
+ variables: ["requestedTokenCategory", "requestedTokenAmount"]
129
+ }
130
+ },
131
+ sender: {
132
+ name: "Send",
133
+ description: "Send a specific amount of fungible tokens to the provided receiver.",
134
+ icon: "send"
135
+ }
136
+ },
137
+ requirements: { roles: [{
138
+ role: "receiver",
139
+ slots: {
140
+ min: 1,
141
+ max: 1
142
+ }
143
+ }, {
144
+ role: "sender",
145
+ slots: {
146
+ min: 1,
147
+ max: void 0
148
+ }
149
+ }] },
150
+ transaction: "requestFungibleTokensTransaction"
151
+ },
152
+ requestNonfungibleTokens: {
153
+ name: "Request a Non-fungible Token",
154
+ description: "Requests a non-fungible token from one or more senders.",
155
+ icon: "request",
156
+ roles: {
157
+ receiver: {
158
+ name: "Request a Non-fungible Token",
159
+ description: "Requests a non-fungible token from one or more senders.",
160
+ icon: "request",
161
+ requirements: {
162
+ generate: ["ownerKey"],
163
+ variables: [
164
+ "requestedTokenCategory",
165
+ "requestedTokenCapability",
166
+ "requestedTokenCommitment"
167
+ ]
168
+ }
169
+ },
170
+ sender: {
171
+ name: "Send",
172
+ description: "Send a non-fungible token to the provided receiver.",
173
+ icon: "send"
174
+ }
175
+ },
176
+ requirements: { roles: [{
177
+ role: "receiver",
178
+ slots: {
179
+ min: 1,
180
+ max: 1
181
+ }
182
+ }, {
183
+ role: "sender",
184
+ slots: {
185
+ min: 1,
186
+ max: void 0
187
+ }
188
+ }] },
189
+ transaction: "requestNonfungibleTokensTransaction"
190
+ },
191
+ sendSatoshis: {
192
+ name: "Send Satoshis",
193
+ description: "Sends a specific amount of Bitcoin Cash to a given recipient.",
194
+ icon: "send",
195
+ roles: { sender: { requirements: {
196
+ variables: ["transferredSatoshis", "recipientLockingscript"],
197
+ secrets: ["ownerKey"]
198
+ } } },
199
+ requirements: { roles: [{
200
+ role: "sender",
201
+ slots: {
202
+ min: 1,
203
+ max: 1
204
+ }
205
+ }] },
206
+ condition: "$(OP_INPUTINDEX OP_UTXOVALUE <dustLimit> OP_GREATERTHAN)",
207
+ transaction: "transferSatoshisTransaction"
208
+ },
209
+ sendFungibleTokens: {
210
+ name: "Send Fungible Tokens",
211
+ description: "Send a specific amount of a fungible token to a given recipient.",
212
+ icon: "send",
213
+ roles: { sender: { requirements: {
214
+ variables: [
215
+ "transferredTokenCategory",
216
+ "transferredTokenAmount",
217
+ "recipientLockingscript"
218
+ ],
219
+ secrets: ["ownerKey"]
220
+ } } },
221
+ requirements: { roles: [{
222
+ role: "sender",
223
+ slots: {
224
+ min: 1,
225
+ max: 1
226
+ }
227
+ }] },
228
+ condition: "$(OP_INPUTINDEX OP_UTXOTOKENAMOUNT <0> OP_GREATERTHAN)",
229
+ transaction: "transferFungibleTokensTransaction"
230
+ },
231
+ sendNonfungibleTokens: {
232
+ name: "Send a Non-fungible Token",
233
+ description: "Send a non-fungible token to a given recipient.",
234
+ icon: "send",
235
+ roles: { sender: { requirements: {
236
+ variables: [
237
+ "transferredTokenCategory",
238
+ "transferredTokenCapability",
239
+ "transferredTokenCommitment",
240
+ "recipientLockingscript"
241
+ ],
242
+ secrets: ["ownerKey"]
243
+ } } },
244
+ requirements: { roles: [{
245
+ role: "sender",
246
+ slots: {
247
+ min: 1,
248
+ max: 1
249
+ }
250
+ }] },
251
+ condition: "$(OP_INPUTINDEX OP_UTXOTOKENCATEGORY OP_SIZE OP_NIP <32> OP_GREATERTHAN)",
252
+ transaction: "transferNonfungibleTokensTransaction"
253
+ },
254
+ burnFungibleTokens: {
255
+ name: "Delete Fungible Tokens",
256
+ description: "Permanently and irreversibly deletes one or more fungible tokens.",
257
+ icon: "burn",
258
+ roles: { owner: { requirements: {
259
+ variables: ["burnedTokenCategory", "burnedTokenAmount"],
260
+ secrets: ["ownerKey"]
261
+ } } },
262
+ requirements: { roles: [{
263
+ role: "owner",
264
+ slots: {
265
+ min: 1,
266
+ max: 1
267
+ }
268
+ }] },
269
+ condition: "$(OP_INPUTINDEX OP_UTXOTOKENAMOUNT <0> OP_GREATERTHAN)",
270
+ transaction: "burnFungibleTokensTransaction"
271
+ },
272
+ burnNonfungibleTokens: {
273
+ name: "Delete a Non-fungible Token",
274
+ description: "Permanently and irreversibly deletes one non-fungible token.",
275
+ icon: "burn",
276
+ roles: { owner: { requirements: {
277
+ variables: [
278
+ "burnedTokenCategory",
279
+ "burnedTokenCapability",
280
+ "burnedTokenCommitment"
281
+ ],
282
+ secrets: ["ownerKey"]
283
+ } } },
284
+ requirements: { roles: [{
285
+ role: "owner",
286
+ slots: {
287
+ min: 1,
288
+ max: 1
289
+ }
290
+ }] },
291
+ condition: "$(OP_INPUTINDEX OP_UTXOTOKENCATEGORY OP_SIZE OP_NIP <32> OP_GREATERTHAN)",
292
+ transaction: "burnNonfungibleTokenTransaction"
293
+ },
294
+ sign: {
295
+ name: "Sign Message",
296
+ description: "Signs a provided message using the Bitcoin message signing protocol.",
297
+ icon: "sign",
298
+ roles: { owner: { requirements: {
299
+ variables: ["messageToSign"],
300
+ secrets: ["ownerKey"]
301
+ } } },
302
+ requirements: { roles: [{
303
+ role: "owner",
304
+ slots: {
305
+ min: 1,
306
+ max: 1
307
+ }
308
+ }] },
309
+ data: ["messageSignature"]
310
+ },
311
+ verify: {
312
+ name: "Verify Message Signature",
313
+ description: "Verifies a provided message signature according to the Bitcoin message signing protocol.",
314
+ icon: "verify",
315
+ roles: { owner: { requirements: {
316
+ variables: ["messageSignature", "messageToVerify"],
317
+ secrets: ["ownerKey"]
318
+ } } },
319
+ requirements: { roles: [{
320
+ role: "owner",
321
+ slots: {
322
+ min: 1,
323
+ max: 1
324
+ }
325
+ }] },
326
+ data: ["messageSignatureValidity"]
327
+ }
328
+ },
329
+ data: {
330
+ messageSignature: {
331
+ value: "$(<messagePrefix> <message> OP_CAT <ownerKey.data_signature.top_stack_element>)",
332
+ type: "bytes",
333
+ hint: "signature"
334
+ },
335
+ messageSignatureValidity: {
336
+ value: "$(<messageSignature> <messagePrefix> <message> OP_CAT <ownerKey.public_key> OP_CHECKDATASIG)",
337
+ type: "integer",
338
+ hint: "script_boolean"
339
+ }
340
+ },
341
+ transactions: {
342
+ receiveTransaction: {
343
+ name: "Transfer request",
344
+ description: "Transfer request for an unspecified amount of cash and/or tokens.",
345
+ icon: "request",
346
+ roles: {
347
+ receiver: {
348
+ name: "Received",
349
+ description: "Received an unspecified amount of cash and/or tokens.",
350
+ icon: "receive"
351
+ },
352
+ sender: {
353
+ name: "Sent",
354
+ description: "Sent an unspecified amount of cash and/or tokens.",
355
+ icon: "send"
356
+ }
357
+ },
358
+ inputs: [],
359
+ outputs: [{
360
+ output: "receiveOutput",
361
+ index: void 0
362
+ }],
363
+ version: 2,
364
+ locktime: 0,
365
+ composable: true
366
+ },
367
+ requestSatoshisTransaction: {
368
+ name: "Transfer request",
369
+ description: "Transfer request for $(<requestedSatoshis>) satoshis.",
370
+ icon: "request",
371
+ roles: {
372
+ receiver: {
373
+ name: "Received",
374
+ description: "Received $(<requestedSatoshis>) satoshis.",
375
+ icon: "receive"
376
+ },
377
+ sender: {
378
+ name: "Sent",
379
+ description: "Sent $(<requestedSatoshis>) satoshis.",
380
+ icon: "send"
381
+ }
382
+ },
383
+ inputs: [],
384
+ outputs: [{
385
+ output: "requestSatoshisOutput",
386
+ index: void 0
387
+ }],
388
+ version: 2,
389
+ locktime: 0,
390
+ composable: true
391
+ },
392
+ requestFungibleTokensTransaction: {
393
+ name: "Transfer request",
394
+ description: "Transfer request for $(<requestedTokenAmount> <requestedTokenCategory.decimalsFactor> OP_DIV).$(<requestedTokenAmount> <requestedTokenCategory.decimalsFactor> OP_MOD) $(<requestedTokenCategory.symbol>) tokens.",
395
+ icon: "request",
396
+ roles: {
397
+ receiver: {
398
+ name: "Received",
399
+ description: "Received $(<requestedTokenAmount> <requestedTokenCategory.decimalsFactor> OP_DIV).$(<requestedTokenAmount> <requestedTokenCategory.decimalsFactor> OP_MOD) $(<requestedTokenCategory.symbol>) tokens.",
400
+ icon: "receive"
401
+ },
402
+ sender: {
403
+ name: "Sent",
404
+ description: "Sent $(<requestedTokenAmount> <requestedTokenCategory.decimalsFactor> OP_DIV).$(<requestedTokenAmount> <requestedTokenCategory.decimalsFactor> OP_MOD) $(<requestedTokenCategory.symbol>) tokens.",
405
+ icon: "send"
406
+ }
407
+ },
408
+ inputs: [],
409
+ outputs: [{
410
+ output: "requestFungibleTokensOutput",
411
+ index: void 0
412
+ }],
413
+ version: 2,
414
+ locktime: 0,
415
+ composable: true
416
+ },
417
+ requestNonfungibleTokensTransaction: {
418
+ name: "Transfer request",
419
+ description: "Transfer request for 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.",
420
+ icon: "request",
421
+ roles: {
422
+ receiver: {
423
+ name: "Received",
424
+ description: "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.",
425
+ icon: "receive"
426
+ },
427
+ sender: {
428
+ name: "Sent",
429
+ description: "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.",
430
+ icon: "send"
431
+ }
432
+ },
433
+ inputs: [],
434
+ outputs: [{
435
+ output: "requestNonfungibleTokensOutput",
436
+ index: void 0
437
+ }],
438
+ version: 2,
439
+ locktime: 0,
440
+ composable: true
441
+ },
442
+ transferSatoshisTransaction: {
443
+ name: "Satoshis Transferred",
444
+ description: "$(<transferredSatoshis>) satoshis were transferred to a recipient.",
445
+ icon: "send",
446
+ roles: {
447
+ receiver: {
448
+ name: "Received",
449
+ description: "Received $(<transferredSatoshis>) satoshis.",
450
+ icon: "receive"
451
+ },
452
+ sender: {
453
+ name: "Sent",
454
+ description: "Sent $(<transferredSatoshis>) satoshis.",
455
+ icon: "send"
456
+ }
457
+ },
458
+ inputs: [],
459
+ outputs: [{
460
+ output: "transferSatoshisOutput",
461
+ index: void 0
462
+ }],
463
+ version: 2,
464
+ locktime: 0,
465
+ composable: true
466
+ },
467
+ transferFungibleTokensTransaction: {
468
+ name: "Fungible Tokens Transferred",
469
+ description: "$(<transferredTokenAmount> <transferredTokenCategory.decimalsFactor> OP_DIV).$(<transferredTokenAmount> <transferredTokenCategory.decimalsFactor> OP_MOD) $(<transferredTokenCategory.symbol>) tokens were transferred to a recipient.",
470
+ icon: "send",
471
+ roles: {
472
+ receiver: {
473
+ name: "Received",
474
+ description: "Received $(<transferredTokenAmount> <transferredTokenCategory.decimalsFactor> OP_DIV).$(<transferredTokenAmount> <transferredTokenCategory.decimalsFactor> OP_MOD) $(<transferredTokenCategory.symbol>) tokens.",
475
+ icon: "receive"
476
+ },
477
+ sender: {
478
+ name: "Sent",
479
+ description: "Sent $(<transferredTokenAmount> <transferredTokenCategory.decimalsFactor> OP_DIV).$(<transferredTokenAmount> <transferredTokenCategory.decimalsFactor> OP_MOD) $(<transferredTokenCategory.symbol>) tokens.",
480
+ icon: "send"
481
+ }
482
+ },
483
+ inputs: [],
484
+ outputs: [{
485
+ output: "transferFungibleTokensOutput",
486
+ index: void 0
487
+ }],
488
+ version: 2,
489
+ locktime: 0,
490
+ composable: true
491
+ },
492
+ transferNonfungibleTokensTransaction: {
493
+ name: "Non-fungible Token Transferred",
494
+ description: "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.",
495
+ icon: "send",
496
+ roles: {
497
+ receiver: {
498
+ name: "Received",
499
+ description: "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.",
500
+ icon: "receive"
501
+ },
502
+ sender: {
503
+ name: "Sent",
504
+ description: "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.",
505
+ icon: "send"
506
+ }
507
+ },
508
+ inputs: [],
509
+ outputs: [{
510
+ output: "transferNonfungibleTokenOutput",
511
+ index: void 0
512
+ }],
513
+ version: 2,
514
+ locktime: 0,
515
+ composable: true
516
+ },
517
+ burnFungibleTokensTransaction: {
518
+ name: "Deleted fungible tokens",
519
+ description: "Permanently and irreversibly deleted $(<burnedTokenAmount> <burnedTokenCategory.decimalsFactor> OP_DIV).$(<burnedTokenAmount> <burnedTokenCategory.decimalsFactor> OP_MOD) $(<burnedTokenCategory.symbol>) tokens.",
520
+ icon: "burn",
521
+ inputs: [{
522
+ input: "burnFungibleTokensInput",
523
+ index: void 0
524
+ }],
525
+ outputs: [],
526
+ version: 2,
527
+ locktime: 0,
528
+ composable: true
529
+ },
530
+ burnNonfungibleTokenTransaction: {
531
+ name: "Deleted non fungible token",
532
+ description: "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.",
533
+ icon: "burn",
534
+ inputs: [{
535
+ input: "burnNonfungibleTokenInput",
536
+ index: void 0
537
+ }],
538
+ outputs: [],
539
+ version: 2,
540
+ locktime: 0,
541
+ composable: true
542
+ }
543
+ },
544
+ outputs: {
545
+ receiveOutput: {
546
+ name: "Recipient output",
547
+ description: "Transferred an unspecified amount of cash and/or tokens to a recipient.",
548
+ icon: "receive",
549
+ roles: {
550
+ receiver: {
551
+ name: "Received",
552
+ description: "Received an unspecified amount of cash and/or tokens."
553
+ },
554
+ sender: {
555
+ name: "Sent",
556
+ description: "Sent an unspecified amount of cash and/or tokens."
557
+ }
558
+ },
559
+ lockscript: "receivingLockingScript"
560
+ },
561
+ requestSatoshisOutput: {
562
+ name: "Recipient output",
563
+ description: "Transferred $(<requestedSatoshis>) satoshis to a recipient.",
564
+ icon: "request",
565
+ roles: {
566
+ receiver: {
567
+ name: "Received",
568
+ description: "Received $(<requestedSatoshis>) satoshis."
569
+ },
570
+ sender: {
571
+ name: "Sent",
572
+ description: "Sent $(<requestedSatoshis>) satoshis."
573
+ }
574
+ },
575
+ lockscript: "receivingLockingScript",
576
+ valueSatoshis: "$(<requestedSatoshis>)",
577
+ token: null
578
+ },
579
+ requestFungibleTokensOutput: {
580
+ name: "Recipient output",
581
+ description: "Transferred $(<requestedTokenAmount> <requestedTokenCategory.decimalsFactor> OP_DIV).$(<requestedTokenAmount> <requestedTokenCategory.decimalsFactor> OP_MOD) $(<requestedTokenCategory.symbol>) tokens to a recipient.",
582
+ icon: "request",
583
+ roles: {
584
+ receiver: {
585
+ name: "Received",
586
+ description: "Received $(<requestedTokenAmount> <requestedTokenCategory.decimalsFactor> OP_DIV).$(<requestedTokenAmount> <requestedTokenCategory.decimalsFactor> OP_MOD) $(<requestedTokenCategory.symbol>) tokens."
587
+ },
588
+ sender: {
589
+ name: "Sent",
590
+ description: "Sent $(<requestedTokenAmount> <requestedTokenCategory.decimalsFactor> OP_DIV).$(<requestedTokenAmount> <requestedTokenCategory.decimalsFactor> OP_MOD) $(<requestedTokenCategory.symbol>) tokens."
591
+ }
592
+ },
593
+ lockscript: "receivingLockingScript",
594
+ valueSatoshis: "1000",
595
+ token: {
596
+ category: "$(<requestedTokenCategory>)",
597
+ amount: "$(<requestedTokenAmount>)",
598
+ nft: null
599
+ }
600
+ },
601
+ requestNonfungibleTokensOutput: {
602
+ name: "Recipient output",
603
+ description: "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.",
604
+ icon: "request",
605
+ roles: {
606
+ receiver: {
607
+ name: "Received",
608
+ description: "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."
609
+ },
610
+ sender: {
611
+ name: "Sent",
612
+ description: "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."
613
+ }
614
+ },
615
+ lockscript: "receivingLockingScript",
616
+ valueSatoshis: "1000",
617
+ token: {
618
+ category: "$(<requestedTokenCategory>)",
619
+ amount: null,
620
+ nft: {
621
+ capability: "$(<requestedTokenCapability>)",
622
+ commitment: "$(<requestedTokenCommitment>)"
623
+ }
624
+ }
625
+ },
626
+ transferSatoshisOutput: {
627
+ name: "Recipient output",
628
+ description: "Transferred $(<transferredSatoshis>) satoshis to a recipient.",
629
+ icon: "send",
630
+ roles: {
631
+ receiver: {
632
+ name: "Received",
633
+ description: "Received $(<transferredSatoshis>) satoshis."
634
+ },
635
+ sender: {
636
+ name: "Sent",
637
+ description: "Sent $(<transferredSatoshis>) satoshis."
638
+ }
639
+ },
640
+ lockscript: "sendingLockingscript",
641
+ valueSatoshis: "$(<transferredSatoshis>)"
642
+ },
643
+ transferFungibleTokensOutput: {
644
+ name: "Recipient output",
645
+ description: "Transferred $(<transferredTokenAmount> <transferredTokenCategory.decimalsFactor> OP_DIV).$(<transferredTokenAmount> <transferredTokenCategory.decimalsFactor> OP_MOD) $(<transferredTokenCategory.symbol>) tokens to a recipient.",
646
+ icon: "send",
647
+ roles: {
648
+ receiver: {
649
+ name: "Received",
650
+ description: "Received $(<transferredTokenAmount> <transferredTokenCategory.decimalsFactor> OP_DIV).$(<transferredTokenAmount> <transferredTokenCategory.decimalsFactor> OP_MOD) $(<transferredTokenCategory.symbol>) tokens."
651
+ },
652
+ sender: {
653
+ name: "Sent",
654
+ description: "Sent $(<transferredTokenAmount> <transferredTokenCategory.decimalsFactor> OP_DIV).$(<transferredTokenAmount> <transferredTokenCategory.decimalsFactor> OP_MOD) $(<transferredTokenCategory.symbol>) tokens."
655
+ }
656
+ },
657
+ lockscript: "sendingLockingscript",
658
+ token: {
659
+ category: "$(<transferredTokenCategory>)",
660
+ amount: "$(<transferredTokenAmount>)"
661
+ }
662
+ },
663
+ transferNonfungibleTokenOutput: {
664
+ name: "Recipient output",
665
+ description: "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.",
666
+ icon: "send",
667
+ roles: {
668
+ receiver: {
669
+ name: "Received",
670
+ description: "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."
671
+ },
672
+ sender: {
673
+ name: "Sent",
674
+ description: "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."
675
+ }
676
+ },
677
+ lockscript: "sendingLockingscript",
678
+ token: {
679
+ category: "$(<transferredTokenCategory>)",
680
+ nft: {
681
+ capability: "$(<transferredTokenCapability>)",
682
+ commitment: "$(<transferredTokenCommitment>)"
683
+ }
684
+ }
685
+ }
686
+ },
687
+ inputs: {
688
+ burnFungibleTokensInput: {
689
+ name: "Deleted fungible tokens",
690
+ description: "Permanently and irreversibly deleted $(<burnedTokenAmount>) $(<burnedTokenCategory>).",
691
+ icon: "burn",
692
+ unlockingScript: "unlockP2PKH",
693
+ token: {
694
+ category: "$(<burnedTokenCategory>)",
695
+ amount: "$(<this.fungibleTokenAmount> <burnedTokenAmount> OP_GREATERTHANOREQUAL OP_IF <this.fungibleTokens> OP_ENDIF)"
696
+ },
697
+ omitChangeAmounts: { fungibleTokens: "${<burnedTokenAmount>}" }
698
+ },
699
+ burnNonfungibleTokenInput: {
700
+ name: "Deleted non-fungible token",
701
+ description: "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.",
702
+ icon: "burn",
703
+ unlockingScript: "unlockP2PKH",
704
+ token: {
705
+ category: "$(<burnedTokenCategory>)",
706
+ nft: {
707
+ capability: "$(<burnedTokenCapability>)",
708
+ commitment: "$(<burnedTokenCommitment>)"
709
+ }
710
+ },
711
+ omitChangeAmounts: { nonfungibleTokens: 1 }
712
+ }
713
+ },
714
+ lockingScripts: {
715
+ sendingLockingscript: {
716
+ name: "Sent",
717
+ description: "Funds sent to an external recipient",
718
+ icon: "address",
719
+ lockingType: "standard",
720
+ lockingScript: "lockToRecipient",
721
+ actions: [],
722
+ state: [],
723
+ secrets: [],
724
+ balance: false,
725
+ selectable: false,
726
+ privacy: false
727
+ },
728
+ receivingLockingScript: {
729
+ name: "Received",
730
+ description: "Funds received without wallet coordination.",
731
+ icon: "address",
732
+ lockingType: "standard",
733
+ lockingScript: "lockP2PKH",
734
+ unlockingScript: "unlockP2PKH",
735
+ roles: { receiver: {
736
+ state: {
737
+ variables: [],
738
+ secrets: ["ownerKey"]
739
+ },
740
+ actions: [
741
+ {
742
+ action: "sign",
743
+ role: "owner",
744
+ secrets: ["ownerKey"]
745
+ },
746
+ {
747
+ action: "verify",
748
+ role: "owner",
749
+ secrets: ["ownerKey"]
750
+ },
751
+ {
752
+ action: "sendSatoshis",
753
+ role: "sender",
754
+ secrets: ["ownerKey"]
755
+ },
756
+ {
757
+ action: "sendFungibleTokens",
758
+ role: "sender",
759
+ secrets: ["ownerKey"]
760
+ },
761
+ {
762
+ action: "sendNonfungibleTokens",
763
+ role: "sender",
764
+ secrets: ["ownerKey"]
765
+ },
766
+ {
767
+ action: "burnFungibleTokens",
768
+ role: "sender",
769
+ secrets: ["ownerKey"]
770
+ },
771
+ {
772
+ action: "burnNonfungibleTokens",
773
+ role: "sender",
774
+ secrets: ["ownerKey"]
775
+ }
776
+ ],
777
+ balance: {
778
+ satoshis: true,
779
+ fungibleTokens: true
780
+ },
781
+ selectable: true,
782
+ privacy: false
783
+ } }
784
+ }
785
+ },
786
+ scripts: {
787
+ lockP2PKH: "OP_DUP OP_HASH160 <$(<ownerKey.public_key> OP_HASH160)> OP_EQUALVERIFY OP_CHECKSIG",
788
+ unlockP2PKH: "<ownerKey.schnorr_signature.all_outputs> <ownerKey.public_key>",
789
+ lockToRecipient: "<recipientLockingscript>"
790
+ },
791
+ constants: {
792
+ dustLimit: {
793
+ name: "Dust Limit",
794
+ description: "Standard required minimum satoshis for Pay to Public Key Hash outputs.",
795
+ type: "integer",
796
+ value: 546
797
+ },
798
+ messagePrefix: {
799
+ name: "Message Prefix",
800
+ description: "Standard message prefix used in the bitcoin signed message protocol.",
801
+ type: "bytes",
802
+ value: "0x18426974636f696e205369676e6564204d6573736167653a0a"
803
+ }
804
+ },
805
+ variables: {
806
+ ownerKey: {
807
+ name: "Owners Private Key",
808
+ description: "The private key used to authorize spending of received funds.",
809
+ type: "bytes",
810
+ hint: "private_key"
811
+ },
812
+ messageToSign: {
813
+ name: "Message",
814
+ description: "The text message to sign.",
815
+ type: "string"
816
+ },
817
+ messageToVerify: {
818
+ name: "Message",
819
+ description: "The text message to verify.",
820
+ type: "string"
821
+ },
822
+ messageSignature: {
823
+ name: "Message Signature",
824
+ description: "The signature for the message.",
825
+ type: "bytes",
826
+ hint: "signature"
827
+ },
828
+ requestedSatoshis: {
829
+ name: "Requested Amount",
830
+ description: "The Bitcoin Cash amount requested",
831
+ type: "integer",
832
+ hint: "satoshis"
833
+ },
834
+ requestedTokenCategory: {
835
+ name: "Requested Token Category",
836
+ description: "The token category requested",
837
+ type: "bytes",
838
+ hint: "token_category"
839
+ },
840
+ requestedTokenAmount: {
841
+ name: "Requested Token Amount",
842
+ description: "The fungible token amount requested",
843
+ type: "integer",
844
+ hint: "token_amount"
845
+ },
846
+ requestedTokenCapability: {
847
+ name: "Requested Token Capability",
848
+ description: "The non-fungible token capability requested",
849
+ type: "bytes",
850
+ hint: "token_capability"
851
+ },
852
+ requestedTokenCommitment: {
853
+ name: "Requested Token Commitment",
854
+ description: "The non-fungible token commitment requested",
855
+ type: "bytes",
856
+ hint: "token_commitment"
857
+ },
858
+ transferredTokenCategory: {
859
+ name: "Sending Token Category",
860
+ description: "The token category of the token(s) to send",
861
+ type: "bytes",
862
+ hint: "token_category"
863
+ },
864
+ transferredTokenAmount: {
865
+ name: "Sending Token Amount",
866
+ description: "The fungible token amount to send",
867
+ type: "integer",
868
+ hint: "token_amount"
869
+ },
870
+ transferredTokenCapability: {
871
+ name: "Sending Token Capability",
872
+ description: "The token capability for the non-fungible token to send",
873
+ type: "bytes",
874
+ hint: "token_capability"
875
+ },
876
+ transferredTokenCommitment: {
877
+ name: "Sending Token Commitment",
878
+ description: "The token commitment for the non-fungible token to send",
879
+ type: "bytes",
880
+ hint: "token_commitment"
881
+ },
882
+ burnedTokenCategory: {
883
+ name: "Deleted Token Category",
884
+ description: "The token category of the token(s) to delete",
885
+ type: "bytes",
886
+ hint: "token_category"
887
+ },
888
+ burnedTokenAmount: {
889
+ name: "Deleted Token Amount",
890
+ description: "The fungible token amount to delete",
891
+ type: "integer",
892
+ hint: "token_amount"
893
+ },
894
+ burnedTokenCapability: {
895
+ name: "Deleted Token Capability",
896
+ description: "The token capability for the non-fungible token to delete",
897
+ type: "bytes",
898
+ hint: "token_capability"
899
+ },
900
+ burnedTokenCommitment: {
901
+ name: "Deleted Token Commitment",
902
+ description: "The token commitment for the non-fungible token to delete",
903
+ type: "bytes",
904
+ hint: "token_commitment"
905
+ }
906
+ },
907
+ icons: [
908
+ {
909
+ name: "wallet",
910
+ hash: "0000000000000000000000"
911
+ },
912
+ {
913
+ name: "owner",
914
+ hash: "0000000000000000000000"
915
+ },
916
+ {
917
+ name: "sender",
918
+ hash: "0000000000000000000000"
919
+ },
920
+ {
921
+ name: "address",
922
+ hash: "0000000000000000000000"
923
+ },
924
+ {
925
+ name: "receive",
926
+ hash: "0000000000000000000000"
927
+ },
928
+ {
929
+ name: "request",
930
+ hash: "0000000000000000000000"
931
+ },
932
+ {
933
+ name: "send",
934
+ hash: "0000000000000000000000"
935
+ },
936
+ {
937
+ name: "burn",
938
+ hash: "0000000000000000000000"
939
+ },
940
+ {
941
+ name: "sign",
942
+ hash: "0000000000000000000000"
943
+ },
944
+ {
945
+ name: "verify",
946
+ hash: "0000000000000000000000"
947
+ }
948
+ ],
949
+ scenarios: [{
950
+ name: "requesting satoshis",
951
+ description: "happy-path evaluation for requesting satoshis.",
952
+ action: "requestSatoshis",
953
+ roles: [{
954
+ role: "receiver",
955
+ values: {
956
+ generated: { ownerKey: "KyRQa5pEXuzVcDwnXRLpYAascjchQW5DoxVRMbj4DTxS83573mz8" },
957
+ variables: { requestedSatoshis: 2e3 },
958
+ secrets: {},
959
+ inputs: [],
960
+ outputs: [{
961
+ lockingBytecode: "76a91475c715ecb74178fe87933e57e947e5e92d904b8188ac",
962
+ valueSatoshis: 2e3
963
+ }]
964
+ }
965
+ }, {
966
+ role: "sender",
967
+ values: {
968
+ generated: {},
969
+ variables: {},
970
+ secrets: {},
971
+ inputs: [{
972
+ outpointTransactionHash: "4ef28553a31a266719e66ba97fee3aeecd6d1788f7ff6ab12f8ebceda49660c0",
973
+ outpointIndex: 0,
974
+ sequenceNumber: 0,
975
+ unlockingBytecode: "41226b2be7c2890c8bbde2f79e79640e56d866843f2e822ec51c469019d13db04a422c9ee49f5eefd26fee24e91910edbbb032b90cc54c34da80a61e69b0ee3d22412103e7ab26c36a7c7f45b2c26f33c08b0fa43a633268700f47216646d4cb37ae5696"
976
+ }],
977
+ outputs: [{
978
+ lockingBytecode: "76a91475c715ecb74178fe87933e57e947e5e92d904b8188ac",
979
+ valueSatoshis: 2e3
980
+ }]
981
+ }
982
+ }],
983
+ values: {
984
+ generated: {},
985
+ variables: {},
986
+ secrets: {}
987
+ },
988
+ outcome: {
989
+ roles: {
990
+ receiver: {
991
+ name: "Request",
992
+ description: "Requested a specific amount of satoshis from one or more senders.",
993
+ icon: "request"
994
+ },
995
+ sender: {
996
+ name: "Send",
997
+ description: "Sent a specific amount of satoshis to the provided receiver.",
998
+ icon: "send"
999
+ }
1000
+ },
1001
+ transactions: [{
1002
+ transaction: "0200000001c06096a4edbc8e2fb16afff788176dcdee3aee7fa96be61967261aa35385f24e000000006441226b2be7c2890c8bbde2f79e79640e56d866843f2e822ec51c469019d13db04a422c9ee49f5eefd26fee24e91910edbbb032b90cc54c34da80a61e69b0ee3d22412103e7ab26c36a7c7f45b2c26f33c08b0fa43a633268700f47216646d4cb37ae5696000000000267530300000000001976a91475c715ecb74178fe87933e57e947e5e92d904b8188acd0070000000000001976a91475c715ecb74178fe87933e57e947e5e92d904b8188ac00000000",
1003
+ value: ""
1004
+ }]
1005
+ }
1006
+ }]
1007
+ };
1008
+
1009
+ //#endregion
1010
+ export { p2pkhTemplate };
1011
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +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: 0,\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 // Describe a list of roles that are used in this template.\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 },\n {\n action: 'requestSatoshis',\n role: 'receiver',\n },\n {\n action: 'requestFungibleTokens',\n role: 'receiver',\n },\n {\n action: 'requestNonfungibleTokens',\n role: 'receiver',\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 generate: [ '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 },\n\n requirements: {\n roles: [\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 generate: [ '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 },\n\n requirements: {\n roles: [\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 generate: [ '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 },\n\n requirements: {\n roles: [\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 generate: [ '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 },\n\n requirements: {\n roles: [\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 roles: [\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 condition: '$(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 roles: [\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 condition: '$(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 roles: [\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 condition: '$(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 roles: [\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 condition: '$(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 roles: [\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 condition: '$(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 roles: [\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 roles: [\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 hint: 'script_boolean',\n },\n },\n\n // Define a set of transactions that can be used in this template.\n transactions: {\n receiveTransaction: {\n name: 'Transfer request',\n description: 'Transfer request for 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 index: 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: 'Transfer request',\n description: 'Transfer request for $(<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 index: 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: 'Transfer request',\n description:\n 'Transfer request for $(<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 index: 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: 'Transfer request',\n description:\n 'Transfer request for 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 index: 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 index: 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 index: 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 index: 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 index: 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 index: 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 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 lockscript: 'receivingLockingScript',\n },\n requestSatoshisOutput: {\n name: 'Recipient output',\n description: 'Transferred $(<requestedSatoshis>) satoshis to a recipient.',\n icon: 'request',\n\n roles: {\n receiver: {\n name: 'Received',\n description: 'Received $(<requestedSatoshis>) satoshis.',\n },\n sender: {\n name: 'Sent',\n description: 'Sent $(<requestedSatoshis>) satoshis.',\n },\n },\n\n // Defines how the requested funds should be locked.\n lockscript: 'receivingLockingScript',\n\n // Require the specified number of satoshis and no tokens.\n valueSatoshis: '$(<requestedSatoshis>)',\n token: null,\n },\n requestFungibleTokensOutput: {\n name: 'Recipient output',\n description:\n 'Transferred $(<requestedTokenAmount> <requestedTokenCategory.decimalsFactor> OP_DIV).$(<requestedTokenAmount> <requestedTokenCategory.decimalsFactor> OP_MOD) $(<requestedTokenCategory.symbol>) tokens to a recipient.',\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 },\n sender: {\n name: '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 lockscript: '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: 'Recipient output',\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: '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: '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 lockscript: '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 lockscript: '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 lockscript: '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 lockscript: '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: 'standard',\n lockingScript: '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: [],\n secrets: [],\n balance: false,\n selectable: false,\n privacy: 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: 'standard',\n lockingScript: 'lockP2PKH',\n\n // Define a default unlocking script to be used when no action provided script is present.\n unlockingScript: 'unlockP2PKH',\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' ],\n },\n {\n action: 'verify',\n role: 'owner',\n secrets: [ 'ownerKey' ],\n },\n {\n action: 'sendSatoshis',\n role: 'sender',\n secrets: [ 'ownerKey' ],\n },\n {\n action: 'sendFungibleTokens',\n role: 'sender',\n secrets: [ 'ownerKey' ],\n },\n {\n action: 'sendNonfungibleTokens',\n role: 'sender',\n secrets: [ 'ownerKey' ],\n },\n {\n action: 'burnFungibleTokens',\n role: 'sender',\n secrets: [ 'ownerKey' ],\n },\n {\n action: 'burnNonfungibleTokens',\n role: 'sender',\n secrets: [ 'ownerKey' ],\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: This can either evaluate to a boolean or a number. If evaluated to a boolean, then true means 100% of the output.\n // NOTE: Since we know that the owner controls all assets, we short-cut the evaluations by setting true directly.\n balance: {\n satoshis: true,\n fungibleTokens: true,\n // nonFungibleToken: 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 // Indicate that received funds are not considered good privacy.\n // NOTE: This information allows wallets to make better privacy decisions, like avoid mixing private and non-private outputs.\n privacy: false,\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 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,OAAO;EACH,OAAO;GACH,MAAM;GACN,aAAa;GACb,MAAM;GACT;EACD,UAAU;GACN,MAAM;GACN,aAAa;GACb,MAAM;GACT;EACD,QAAQ;GACJ,MAAM;GACN,aAAa;GACb,MAAM;GACT;EACJ;CA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B;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"}
package/package.json ADDED
@@ -0,0 +1,66 @@
1
+ {
2
+ "name": "@xo-cash/templates",
3
+ "version": "0.0.1-development.13507467492",
4
+ "description": "XO templates",
5
+ "type": "module",
6
+ "types": "./dist/index.d.mts",
7
+ "source": "./source/index.ts",
8
+ "module": "./dist/index.mjs",
9
+ "exports": {
10
+ "types": "./dist/index.d.mts",
11
+ "default": "./dist/index.mjs"
12
+ },
13
+ "publishConfig": {
14
+ "access": "public"
15
+ },
16
+ "sideEffects": false,
17
+ "scripts": {
18
+ "analyze": "tsdown --clean --no-fixed-extension --sourcemap source/index.ts && esbuild-analyzer dist/",
19
+ "build": "tsdown --clean --sourcemap source/index.ts",
20
+ "docs": "typedoc --hideGenerator --categorizeByGroup",
21
+ "format": "prettier --write . && eslint --fix",
22
+ "spellcheck": "cspell 'source/**' 'test/**'",
23
+ "style": "eslint",
24
+ "syntax": "tsc --noEmit",
25
+ "test": "vitest --dir test/ --test-timeout=15000 --passWithNoTests --run --coverage"
26
+ },
27
+ "files": [
28
+ "dist"
29
+ ],
30
+ "repository": {
31
+ "type": "git",
32
+ "url": "git+https://gitlab.com/GeneralProtocols/xo/templates.git"
33
+ },
34
+ "author": "GeneralProtocols",
35
+ "license": "MIT",
36
+ "bugs": {
37
+ "url": "https://gitlab.com/GeneralProtocols/xo/templates/issues"
38
+ },
39
+ "homepage": "https://gitlab.com/GeneralProtocols/xo/templates#readme",
40
+ "keywords": [
41
+ "bitcoin cash",
42
+ "xo"
43
+ ],
44
+ "dependencies": {
45
+ "@xo-cash/types": "0.0.1-development.13504604083"
46
+ },
47
+ "devDependencies": {
48
+ "@chalp/eslint-airbnb": "^1.3.0",
49
+ "@generalprotocols/cspell-dictionary": "^1.0.1",
50
+ "@stylistic/eslint-plugin": "^5.7.0",
51
+ "@typescript-eslint/eslint-plugin": "^8.53.1",
52
+ "@typescript-eslint/parser": "^8.53.1",
53
+ "@vitest/coverage-v8": "^4.0.17",
54
+ "@viz-kit/esbuild-analyzer": "^1.0.0",
55
+ "@xo-cash/eslint-config": "1.0.1",
56
+ "cspell": "^9.6.0",
57
+ "eslint": "^9.39.2",
58
+ "prettier": "^3.6.2",
59
+ "tsdown": "^0.20.0-beta.4",
60
+ "typedoc": "^0.28.16",
61
+ "typedoc-plugin-coverage": "^4.0.2",
62
+ "typescript": "^5.3.2",
63
+ "typescript-eslint": "^8.53.1",
64
+ "vitest": "^4.0.17"
65
+ }
66
+ }