@xo-cash/templates 0.0.2 → 0.0.3

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.mjs CHANGED
@@ -71,7 +71,7 @@ const p2pkhTemplate = {
71
71
  name: "Send",
72
72
  description: "Send an unspecified amount of cash and/or tokens to the provided receiver.",
73
73
  icon: "send",
74
- requirements: {}
74
+ requirements: { variables: ["transferredSatoshis"] }
75
75
  }
76
76
  },
77
77
  requirements: { participants: [{
@@ -347,8 +347,7 @@ const p2pkhTemplate = {
347
347
  },
348
348
  messageSignatureValidity: {
349
349
  value: "$(<messageSignature> <messagePrefix> <message> OP_CAT <ownerKey.public_key> OP_CHECKDATASIG)",
350
- type: "integer",
351
- hint: "script_boolean"
350
+ type: "integer"
352
351
  }
353
352
  },
354
353
  transactions: {
@@ -575,7 +574,9 @@ const p2pkhTemplate = {
575
574
  description: "Sent an unspecified amount of cash and/or tokens."
576
575
  }
577
576
  },
578
- lockingScript: "receivingLockingScript"
577
+ lockingScript: "receivingLockingScript",
578
+ valueSatoshis: "$(<transferredSatoshis>)",
579
+ token: null
579
580
  },
580
581
  requestSatoshisOutput: {
581
582
  name: "Satoshis",
@@ -852,6 +853,12 @@ const p2pkhTemplate = {
852
853
  type: "integer",
853
854
  hint: "satoshis"
854
855
  },
856
+ transferredSatoshis: {
857
+ name: "Transferred Amount",
858
+ description: "The Bitcoin Cash amount transferred",
859
+ type: "integer",
860
+ hint: "satoshis"
861
+ },
855
862
  requestedTokenCategory: {
856
863
  name: "Requested Token Category",
857
864
  description: "The token category requested",
@@ -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 // 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: '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 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 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 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 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;CAMD,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;CAGD,OAAO;EACH;GACI,QAAQ;GACR,MAAM;GACN,UAAU,CAAE,WAAY;GAC3B;EACD;GACI,QAAQ;GACR,MAAM;GACN,UAAU,CAAE,WAAY;GAC3B;EACD;GACI,QAAQ;GACR,MAAM;GACN,UAAU,CAAE,WAAY;GAC3B;EACD;GACI,QAAQ;GACR,MAAM;GACN,UAAU,CAAE,WAAY;GAC3B;EACJ;CAKD,SAAS;EACL,SAAS;GAEL,MAAM;GACN,aAAa;GACb,MAAM;GAEN,OAAO;IACH,UAAU;KACN,MAAM;KACN,aAAa;KACb,MAAM;KAEN,cAAc,EACV,SAAS,CAAE,WAAY,EAC1B;KACJ;IACD,QAAQ;KACJ,MAAM;KACN,aAAa;KACb,MAAM;KAIN,cAAc,EAAE;KACnB;IACJ;GAED,cAAc,EACV,cAAc,CACV;IACI,MAAM;IACN,OAAO;KAAE,KAAK;KAAG,KAAK;KAAG;IAC5B,EACD;IACI,MAAM;IACN,OAAO;KAAE,KAAK;KAAG,KAAK;KAAW;IACpC,CACJ,EACJ;GAED,aAAa;GAChB;EACD,iBAAiB;GA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;EACP,WAAW;GACP,MAAM;GACN,aAAa;GACb,MAAM;GACN,OAAO;GACV;EAGD,eAAe;GACX,MAAM;GACN,aAAa;GACb,MAAM;GAIN,OAAO;GACV;EACJ;CAGD,WAAW;EAEP,UAAU;GACN,MAAM;GACN,aAAa;GACb,MAAM;GACN,MAAM;GACT;EAED,eAAe;GACX,MAAM;GACN,aAAa;GACb,MAAM;GACT;EACD,iBAAiB;GACb,MAAM;GACN,aAAa;GACb,MAAM;GACT;EACD,kBAAkB;GACd,MAAM;GACN,aAAa;GACb,MAAM;GACN,MAAM;GACT;EAGD,mBAAmB;GACf,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 ],\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;CAMD,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;CAGD,OAAO;EACH;GACI,QAAQ;GACR,MAAM;GACN,UAAU,CAAE,WAAY;GAC3B;EACD;GACI,QAAQ;GACR,MAAM;GACN,UAAU,CAAE,WAAY;GAC3B;EACD;GACI,QAAQ;GACR,MAAM;GACN,UAAU,CAAE,WAAY;GAC3B;EACD;GACI,QAAQ;GACR,MAAM;GACN,UAAU,CAAE,WAAY;GAC3B;EACJ;CAKD,SAAS;EACL,SAAS;GAEL,MAAM;GACN,aAAa;GACb,MAAM;GAEN,OAAO;IACH,UAAU;KACN,MAAM;KACN,aAAa;KACb,MAAM;KAEN,cAAc,EACV,SAAS,CAAE,WAAY,EAC1B;KACJ;IACD,QAAQ;KACJ,MAAM;KACN,aAAa;KACb,MAAM;KAEN,cAAc,EACV,WAAW,CAAE,sBAAuB,EACvC;KACJ;IACJ;GAED,cAAc,EACV,cAAc,CACV;IACI,MAAM;IACN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;KACJ;IAMD,SAAS;KACL,UAAU;KACV,gBAAgB;KAChB,mBAAmB;KACtB;IAMD,YAAY;IACf,EACJ;GACJ;EACJ;CAGD,SAAS;EACL,WAAW;EACX,aAAa;EACb,iBAAiB;EACpB;CAGD,WAAW;EACP,WAAW;GACP,MAAM;GACN,aAAa;GACb,MAAM;GACN,OAAO;GACV;EAGD,eAAe;GACX,MAAM;GACN,aAAa;GACb,MAAM;GAIN,OAAO;GACV;EACJ;CAGD,WAAW;EAEP,UAAU;GACN,MAAM;GACN,aAAa;GACb,MAAM;GACN,MAAM;GACT;EAED,eAAe;GACX,MAAM;GACN,aAAa;GACb,MAAM;GACT;EACD,iBAAiB;GACb,MAAM;GACN,aAAa;GACb,MAAM;GACT;EACD,kBAAkB;GACd,MAAM;GACN,aAAa;GACb,MAAM;GACN,MAAM;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,MAA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;EACJ,CACJ;CACJ"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xo-cash/templates",
3
- "version": "0.0.2",
3
+ "version": "0.0.3",
4
4
  "description": "XO templates",
5
5
  "type": "module",
6
6
  "types": "./dist/index.d.mts",
@@ -42,20 +42,17 @@
42
42
  "xo"
43
43
  ],
44
44
  "dependencies": {
45
- "@xo-cash/types": "0.0.3"
45
+ "@xo-cash/types": "0.0.4"
46
46
  },
47
47
  "overrides": {
48
- "echarts": "6.1.0"
48
+ "echarts": "6.1.0",
49
+ "minimatch": "10.2.6"
49
50
  },
50
51
  "devDependencies": {
51
- "@chalp/eslint-airbnb": "^1.3.0",
52
52
  "@generalprotocols/cspell-dictionary": "^1.0.1",
53
- "@stylistic/eslint-plugin": "^5.7.0",
54
- "@typescript-eslint/eslint-plugin": "^8.53.1",
55
- "@typescript-eslint/parser": "^8.53.1",
56
53
  "@vitest/coverage-v8": "^4.0.17",
57
54
  "@viz-kit/esbuild-analyzer": "^1.0.0",
58
- "@xo-cash/eslint-config": "1.0.1",
55
+ "@xo-cash/eslint-config": "1.0.2",
59
56
  "cspell": "^9.6.0",
60
57
  "eslint": "^9.39.2",
61
58
  "prettier": "^3.6.2",
@@ -63,7 +60,6 @@
63
60
  "typedoc": "^0.28.16",
64
61
  "typedoc-plugin-coverage": "^4.0.2",
65
62
  "typescript": "^5.3.2",
66
- "typescript-eslint": "^8.53.1",
67
63
  "vitest": "^4.0.17"
68
64
  }
69
65
  }