{
  "type": "script",
  "title": "Generate 3 Gift Wallets and fund them",
  "description": "Generate 3 QR Encrypted Gift Wallets for onboarding users in an event and fund them with assets on a single transaction to save on fees. Files will be downloaded as PNG files for printing or showing on screens. Password can be customized but here is autogenerated",
  "run": {
    "wallets": {
      "type": "walletGenerator",
      "amount": 3,
      "defaultNamePattern": "Attendee {index}",
      "defaultDescriptionPattern": "Wallet for Attendee #{index}",
      "defaultKeyPattern": "{index}",
      "defaultHintPattern": "Your password is '{password}'",
      "qr": true,
      "download": true,
      "legacy": false
    },
    "assets": {
      "type": "data",
      "value": [
        {
          "policyId": "ada",
          "assetName": "ada",
          "quantity": "1000000"
        }
      ]
    },
    "buildAirdrop": {
      "type": "buildTx",
      "title": "💝 Event Airdrop",
      "returnURLPattern": "https://preprod.cardanoscan.io/transaction/{txHash}",
      "tx": {
        "outputs": [
          {
            "address": "{get('cache.wallets.0.address')}",
            "assets": "{get('cache.assets')}"
          },
          {
            "address": "{get('cache.wallets.1.address')}",
            "assets": "{get('cache.assets')}"
          },
          {
            "address": "{get('cache.wallets.2.address')}",
            "assets": "{get('cache.assets')}"
          }
        ],
        "auxiliaryData": {
          "674": {
            "msg": [
              "Welcome to The Event!\n",
              "Onboarding you into Cardano\n",
              "By GameChanger Wallet\n"
            ]
          }
        }
      }
    },
    "signAirdrop": {
      "type": "signTxs",
      "txs": [
        "{get('cache.buildAirdrop.txHex')}"
      ],
      "detailedPermissions": false
    },
    "submitAirdrop": {
      "type": "submitTxs",
      "txs": "{get('cache.signAirdrop')}"
    },
    "finally": {
      "type": "script",
      "exportAs": "onboarding",
      "run": {
        "wallets": {
          "type": "macro",
          "run": "{get('cache.wallets')}"
        },
        "txHash": {
          "type": "macro",
          "run": "{get('cache.buildAirdrop.txHash')}"
        }
      }
    }
  }
}