From d4614efd7ccbac92f96d64dd50637db2d1ae332f Mon Sep 17 00:00:00 2001 From: rvcas Date: Tue, 14 May 2024 21:25:08 -0400 Subject: [PATCH] feat(examples): add blaze to hello world --- examples/hello_world/.gitignore | 1 + examples/hello_world/aiken.lock | 4 +- examples/hello_world/aiken.toml | 2 +- examples/hello_world/hello_world-lock.ts | 72 - examples/hello_world/package.json | 24 + examples/hello_world/plutus.json | 6 +- examples/hello_world/pnpm-lock.yaml | 1163 +++++++++++++++++ .../{ => src}/generate-credentials.ts | 0 examples/hello_world/src/hello_world-lock.ts | 73 ++ .../{ => src}/hello_world-unlock.ts | 0 examples/hello_world/tsconfig.json | 7 + 11 files changed, 1274 insertions(+), 78 deletions(-) delete mode 100644 examples/hello_world/hello_world-lock.ts create mode 100644 examples/hello_world/package.json create mode 100644 examples/hello_world/pnpm-lock.yaml rename examples/hello_world/{ => src}/generate-credentials.ts (100%) create mode 100644 examples/hello_world/src/hello_world-lock.ts rename examples/hello_world/{ => src}/hello_world-unlock.ts (100%) create mode 100644 examples/hello_world/tsconfig.json diff --git a/examples/hello_world/.gitignore b/examples/hello_world/.gitignore index a0f888da0..97ce4428a 100644 --- a/examples/hello_world/.gitignore +++ b/examples/hello_world/.gitignore @@ -2,3 +2,4 @@ artifacts/ build/ *.sk *.addr +node_modules/ diff --git a/examples/hello_world/aiken.lock b/examples/hello_world/aiken.lock index 21fbf8f4e..65d64dba0 100644 --- a/examples/hello_world/aiken.lock +++ b/examples/hello_world/aiken.lock @@ -3,12 +3,12 @@ [[requirements]] name = "aiken-lang/stdlib" -version = "main" +version = "1.8.0" source = "github" [[packages]] name = "aiken-lang/stdlib" -version = "main" +version = "1.8.0" requirements = [] source = "github" diff --git a/examples/hello_world/aiken.toml b/examples/hello_world/aiken.toml index 3b523f226..4e6adcd98 100644 --- a/examples/hello_world/aiken.toml +++ b/examples/hello_world/aiken.toml @@ -5,5 +5,5 @@ description = "Aiken contracts for project 'aiken-lang/hello_world'" [[dependencies]] name = "aiken-lang/stdlib" -version = "main" +version = "1.8.0" source = "github" diff --git a/examples/hello_world/hello_world-lock.ts b/examples/hello_world/hello_world-lock.ts deleted file mode 100644 index 8acdfd3aa..000000000 --- a/examples/hello_world/hello_world-lock.ts +++ /dev/null @@ -1,72 +0,0 @@ -import { - Blockfrost, - Constr, - Data, - fromHex, - Lucid, - SpendingValidator, - toHex, - TxHash, -} from "https://deno.land/x/lucid@0.8.3/mod.ts"; -import * as cbor from "https://deno.land/x/cbor@v1.4.1/index.js"; - -const lucid = await Lucid.new( - new Blockfrost( - "https://cardano-preview.blockfrost.io/api/v0", - Deno.env.get("BLOCKFROST_API_KEY"), - ), - "Preview", -); - -lucid.selectWalletFromPrivateKey(await Deno.readTextFile("./key.sk")); - -const validator = await readValidator(); - -// --- Supporting functions - -async function readValidator(): Promise { - const validator = JSON - .parse(await Deno.readTextFile("plutus.json")) - .validators[0]; - - return { - type: "PlutusV2", - script: toHex(cbor.encode(fromHex(validator.compiledCode))), - }; -} - -const publicKeyHash = lucid.utils - .getAddressDetails(await lucid.wallet.address()) - .paymentCredential - ?.hash; - -const datum = Data.to(new Constr(0, [publicKeyHash])); - -const txHash = await lock(1000000n, { into: validator, owner: datum }); - -await lucid.awaitTx(txHash); - -console.log(`1 tADA locked into the contract at: - Tx ID: ${txHash} - Datum: ${datum} -`); - -// --- Supporting functions - -async function lock( - lovelace: bigint, - { into, owner }: { into: SpendingValidator; owner: string }, -): Promise { - const contractAddress = lucid.utils.validatorToAddress(into); - - const tx = await lucid - .newTx() - .payToContract(contractAddress, { inline: owner }, { lovelace }) - .complete(); - - const signedTx = await tx - .sign() - .complete(); - - return signedTx.submit(); -} diff --git a/examples/hello_world/package.json b/examples/hello_world/package.json new file mode 100644 index 000000000..dfe697b58 --- /dev/null +++ b/examples/hello_world/package.json @@ -0,0 +1,24 @@ +{ + "name": "hello_world", + "version": "1.0.0", + "description": "Aiken hello world tutorial", + "type": "module", + "scripts": { + "generate": "tsx src/generate-credentials.ts", + "lock": "tsx src/hello_world-lock.ts", + "unlock": "tsx src/hello_world-unlock.ts" + }, + "keywords": [], + "author": "", + "license": "ISC", + "devDependencies": { + "@tsconfig/node20": "^20.1.4", + "@types/node": "^20.12.12", + "tsx": "^4.10.2" + }, + "dependencies": { + "@blaze-cardano/core": "^0.1.1", + "@blaze-cardano/sdk": "^0.0.9", + "@blaze-cardano/wallet": "^0.0.8" + } +} diff --git a/examples/hello_world/plutus.json b/examples/hello_world/plutus.json index a0fab8431..74132f1f7 100644 --- a/examples/hello_world/plutus.json +++ b/examples/hello_world/plutus.json @@ -6,7 +6,7 @@ "plutusVersion": "v2", "compiler": { "name": "Aiken", - "version": "v1.0.19-alpha+d56d518" + "version": "v1.0.26-alpha+075668b" } }, "validators": [ @@ -24,8 +24,8 @@ "$ref": "#/definitions/hello_world~1Redeemer" } }, - "compiledCode": "58f2010000323232323232323222232325333008323232533300b002100114a06644646600200200644a66602200229404c8c94ccc040cdc78010028a511330040040013014002375c60240026eb0c038c03cc03cc03cc03cc03cc03cc03cc03cc020c008c020014dd71801180400399b8f375c6002600e00a91010d48656c6c6f2c20576f726c6421002300d00114984d958c94ccc020cdc3a400000226464a66601a601e0042930b1bae300d00130060041630060033253330073370e900000089919299980618070010a4c2c6eb8c030004c01401058c01400c8c014dd5000918019baa0015734aae7555cf2ab9f5742ae881", - "hash": "6fb13cf9efdbe986e784d1983b21d3fb90231c1745925f536a820fb4" + "compiledCode": "58e901000032323232323223223225333006323253330083371e6eb8c008c028dd5002a4410d48656c6c6f2c20576f726c642100100114a06644646600200200644a66601c00229404c94ccc030cdc79bae301000200414a226600600600260200026eb0c02cc030c030c030c030c030c030c030c030c024dd5180098049baa002375c600260126ea80188c02c0045261365653330043370e900018029baa001132325333009300b002149858dd7180480098031baa0011653330023370e900018019baa0011323253330073009002149858dd7180380098021baa001165734aae7555cf2ab9f5742ae881", + "hash": "c1fe430f19ac248a8a7ea47db106002c4327e542c3fdc60ad6481103" } ], "definitions": { diff --git a/examples/hello_world/pnpm-lock.yaml b/examples/hello_world/pnpm-lock.yaml new file mode 100644 index 000000000..e29e4f052 --- /dev/null +++ b/examples/hello_world/pnpm-lock.yaml @@ -0,0 +1,1163 @@ +lockfileVersion: '9.0' + +settings: + autoInstallPeers: true + excludeLinksFromLockfile: false + +importers: + + .: + dependencies: + '@blaze-cardano/core': + specifier: ^0.1.1 + version: 0.1.1 + '@blaze-cardano/sdk': + specifier: ^0.0.9 + version: 0.0.9 + '@blaze-cardano/wallet': + specifier: ^0.0.8 + version: 0.0.8 + devDependencies: + '@tsconfig/node20': + specifier: ^20.1.4 + version: 20.1.4 + '@types/node': + specifier: ^20.12.12 + version: 20.12.12 + tsx: + specifier: ^4.10.2 + version: 4.10.2 + +packages: + + '@blaze-cardano/blueprint@0.0.1': + resolution: {integrity: sha512-wmxRpaS+Qh7kYJMCmallyfrgSSONtCNfH1xXP12icUTZvj2jDFSV5Z7A+3og+JEymP87YdmBTRXoLcBRoPBExw==} + + '@blaze-cardano/core@0.1.1': + resolution: {integrity: sha512-NfCJ3r85rSrNLo7+X+sfvUYGnJhfBqCStJZKdph3RdVdVw3JXqX+10tAV6HYPOD9wFLOVN34QhfTG3hzaEVBFw==} + + '@blaze-cardano/query@0.0.4': + resolution: {integrity: sha512-EH1E8UaxgyA6nGo4fM4q1cvEBe8qCESVVlykb+Slixxl6+V3dLbofv64UU0hMlmy44AEn1iyKWd0nW7pKz6iiQ==} + + '@blaze-cardano/sdk@0.0.9': + resolution: {integrity: sha512-x8nn56EV+6rQ9Av7fc2hj1FUoghhy4zLctWju8ZswKlxANdiWypm4wzB/OaFwz0PHwbnEyRE6yaYPopNnal5/g==} + + '@blaze-cardano/tx@0.0.7': + resolution: {integrity: sha512-LS+22EDRh1TZRW3TvdoHaiup8N+sa544cMVDz9zoHpqYDu7WHIfJqA57StTYuvU+h5u9wN2alP4I01yMdGeqPQ==} + + '@blaze-cardano/wallet@0.0.8': + resolution: {integrity: sha512-WyiF2OT5LGXT558TPX+kT9SFZChoq8QuEOV/Qm9HAbSneOKGlZjItwrepPq3a4+NlNAEkFhu2iUAOBnyr7S+BA==} + + '@cardano-ogmios/client@5.6.0': + resolution: {integrity: sha512-F0kWQ+TTc3OvSsp9CmxAPqo7fpB9yjrK+Lp52IqGG2YJVwyIynvHwlOW0cZNsRLO+KXwJrSoKdj9rHI0Vix4iw==} + engines: {node: '>=14'} + + '@cardano-ogmios/schema@5.6.0': + resolution: {integrity: sha512-JTlh/gOS5iM4b7CKc3dFRs2UC6fY+PeLiOv6fKxFSOSRMZ59sLgv+oGqjnzyVeZFUt6o683C9zFmBzh60l8KnA==} + engines: {node: '>=14'} + + '@cardano-sdk/core@0.30.2': + resolution: {integrity: sha512-aFlLfM0pqjhjAE5oMyUcnhl+mhpzXva9bAOuTGvOUDQbIRPZtvr2UVv3rXpqFy6FvtNr8WIA7moSrePRPm9aCA==} + engines: {node: '>=16.20.2'} + peerDependencies: + rxjs: ^7.4.0 + peerDependenciesMeta: + rxjs: + optional: true + + '@cardano-sdk/crypto@0.1.23': + resolution: {integrity: sha512-CKdlDin8FPkO1w/5rK6W8mj42IzLjXxpvr0XucAs4tylsPo8to74ORjTLdbJvKIkSNJeL4TBQ/gx1Qrg+hAzqg==} + engines: {node: '>=16.20.2'} + peerDependencies: + '@dcspark/cardano-multiplatform-lib-asmjs': ^3.1.1 + '@dcspark/cardano-multiplatform-lib-browser': ^3.1.1 + '@dcspark/cardano-multiplatform-lib-nodejs': ^3.1.1 + peerDependenciesMeta: + '@dcspark/cardano-multiplatform-lib-asmjs': + optional: true + '@dcspark/cardano-multiplatform-lib-browser': + optional: true + '@dcspark/cardano-multiplatform-lib-nodejs': + optional: true + + '@cardano-sdk/util@0.15.1': + resolution: {integrity: sha512-57IQCmM5Z603psL+ZyfxBAr4GEmvKi4Qk5XM2/6kF+6CnH7XbiJwQL2aaaqV2QPshabMaJVtpmlrVrL7KtfwUg==} + engines: {node: '>=16.20.2'} + + '@cardanosolutions/json-bigint@1.0.1': + resolution: {integrity: sha512-mbYL6jtHqMFCZnTFhmkmoeDzHMBino0gMiGQnOJE7CwzZzkK2HCpH0MTBk+84QDadMEGX7iFt7uB+levm1a+bQ==} + + '@esbuild/aix-ppc64@0.20.2': + resolution: {integrity: sha512-D+EBOJHXdNZcLJRBkhENNG8Wji2kgc9AZ9KiPr1JuZjsNtyHzrsfLRrY0tk2H2aoFu6RANO1y1iPPUCDYWkb5g==} + engines: {node: '>=12'} + cpu: [ppc64] + os: [aix] + + '@esbuild/android-arm64@0.20.2': + resolution: {integrity: sha512-mRzjLacRtl/tWU0SvD8lUEwb61yP9cqQo6noDZP/O8VkwafSYwZ4yWy24kan8jE/IMERpYncRt2dw438LP3Xmg==} + engines: {node: '>=12'} + cpu: [arm64] + os: [android] + + '@esbuild/android-arm@0.20.2': + resolution: {integrity: sha512-t98Ra6pw2VaDhqNWO2Oph2LXbz/EJcnLmKLGBJwEwXX/JAN83Fym1rU8l0JUWK6HkIbWONCSSatf4sf2NBRx/w==} + engines: {node: '>=12'} + cpu: [arm] + os: [android] + + '@esbuild/android-x64@0.20.2': + resolution: {integrity: sha512-btzExgV+/lMGDDa194CcUQm53ncxzeBrWJcncOBxuC6ndBkKxnHdFJn86mCIgTELsooUmwUm9FkhSp5HYu00Rg==} + engines: {node: '>=12'} + cpu: [x64] + os: [android] + + '@esbuild/darwin-arm64@0.20.2': + resolution: {integrity: sha512-4J6IRT+10J3aJH3l1yzEg9y3wkTDgDk7TSDFX+wKFiWjqWp/iCfLIYzGyasx9l0SAFPT1HwSCR+0w/h1ES/MjA==} + engines: {node: '>=12'} + cpu: [arm64] + os: [darwin] + + '@esbuild/darwin-x64@0.20.2': + resolution: {integrity: sha512-tBcXp9KNphnNH0dfhv8KYkZhjc+H3XBkF5DKtswJblV7KlT9EI2+jeA8DgBjp908WEuYll6pF+UStUCfEpdysA==} + engines: {node: '>=12'} + cpu: [x64] + os: [darwin] + + '@esbuild/freebsd-arm64@0.20.2': + resolution: {integrity: sha512-d3qI41G4SuLiCGCFGUrKsSeTXyWG6yem1KcGZVS+3FYlYhtNoNgYrWcvkOoaqMhwXSMrZRl69ArHsGJ9mYdbbw==} + engines: {node: '>=12'} + cpu: [arm64] + os: [freebsd] + + '@esbuild/freebsd-x64@0.20.2': + resolution: {integrity: sha512-d+DipyvHRuqEeM5zDivKV1KuXn9WeRX6vqSqIDgwIfPQtwMP4jaDsQsDncjTDDsExT4lR/91OLjRo8bmC1e+Cw==} + engines: {node: '>=12'} + cpu: [x64] + os: [freebsd] + + '@esbuild/linux-arm64@0.20.2': + resolution: {integrity: sha512-9pb6rBjGvTFNira2FLIWqDk/uaf42sSyLE8j1rnUpuzsODBq7FvpwHYZxQ/It/8b+QOS1RYfqgGFNLRI+qlq2A==} + engines: {node: '>=12'} + cpu: [arm64] + os: [linux] + + '@esbuild/linux-arm@0.20.2': + resolution: {integrity: sha512-VhLPeR8HTMPccbuWWcEUD1Az68TqaTYyj6nfE4QByZIQEQVWBB8vup8PpR7y1QHL3CpcF6xd5WVBU/+SBEvGTg==} + engines: {node: '>=12'} + cpu: [arm] + os: [linux] + + '@esbuild/linux-ia32@0.20.2': + resolution: {integrity: sha512-o10utieEkNPFDZFQm9CoP7Tvb33UutoJqg3qKf1PWVeeJhJw0Q347PxMvBgVVFgouYLGIhFYG0UGdBumROyiig==} + engines: {node: '>=12'} + cpu: [ia32] + os: [linux] + + '@esbuild/linux-loong64@0.20.2': + resolution: {integrity: sha512-PR7sp6R/UC4CFVomVINKJ80pMFlfDfMQMYynX7t1tNTeivQ6XdX5r2XovMmha/VjR1YN/HgHWsVcTRIMkymrgQ==} + engines: {node: '>=12'} + cpu: [loong64] + os: [linux] + + '@esbuild/linux-mips64el@0.20.2': + resolution: {integrity: sha512-4BlTqeutE/KnOiTG5Y6Sb/Hw6hsBOZapOVF6njAESHInhlQAghVVZL1ZpIctBOoTFbQyGW+LsVYZ8lSSB3wkjA==} + engines: {node: '>=12'} + cpu: [mips64el] + os: [linux] + + '@esbuild/linux-ppc64@0.20.2': + resolution: {integrity: sha512-rD3KsaDprDcfajSKdn25ooz5J5/fWBylaaXkuotBDGnMnDP1Uv5DLAN/45qfnf3JDYyJv/ytGHQaziHUdyzaAg==} + engines: {node: '>=12'} + cpu: [ppc64] + os: [linux] + + '@esbuild/linux-riscv64@0.20.2': + resolution: {integrity: sha512-snwmBKacKmwTMmhLlz/3aH1Q9T8v45bKYGE3j26TsaOVtjIag4wLfWSiZykXzXuE1kbCE+zJRmwp+ZbIHinnVg==} + engines: {node: '>=12'} + cpu: [riscv64] + os: [linux] + + '@esbuild/linux-s390x@0.20.2': + resolution: {integrity: sha512-wcWISOobRWNm3cezm5HOZcYz1sKoHLd8VL1dl309DiixxVFoFe/o8HnwuIwn6sXre88Nwj+VwZUvJf4AFxkyrQ==} + engines: {node: '>=12'} + cpu: [s390x] + os: [linux] + + '@esbuild/linux-x64@0.20.2': + resolution: {integrity: sha512-1MdwI6OOTsfQfek8sLwgyjOXAu+wKhLEoaOLTjbijk6E2WONYpH9ZU2mNtR+lZ2B4uwr+usqGuVfFT9tMtGvGw==} + engines: {node: '>=12'} + cpu: [x64] + os: [linux] + + '@esbuild/netbsd-x64@0.20.2': + resolution: {integrity: sha512-K8/DhBxcVQkzYc43yJXDSyjlFeHQJBiowJ0uVL6Tor3jGQfSGHNNJcWxNbOI8v5k82prYqzPuwkzHt3J1T1iZQ==} + engines: {node: '>=12'} + cpu: [x64] + os: [netbsd] + + '@esbuild/openbsd-x64@0.20.2': + resolution: {integrity: sha512-eMpKlV0SThJmmJgiVyN9jTPJ2VBPquf6Kt/nAoo6DgHAoN57K15ZghiHaMvqjCye/uU4X5u3YSMgVBI1h3vKrQ==} + engines: {node: '>=12'} + cpu: [x64] + os: [openbsd] + + '@esbuild/sunos-x64@0.20.2': + resolution: {integrity: sha512-2UyFtRC6cXLyejf/YEld4Hajo7UHILetzE1vsRcGL3earZEW77JxrFjH4Ez2qaTiEfMgAXxfAZCm1fvM/G/o8w==} + engines: {node: '>=12'} + cpu: [x64] + os: [sunos] + + '@esbuild/win32-arm64@0.20.2': + resolution: {integrity: sha512-GRibxoawM9ZCnDxnP3usoUDO9vUkpAxIIZ6GQI+IlVmr5kP3zUq+l17xELTHMWTWzjxa2guPNyrpq1GWmPvcGQ==} + engines: {node: '>=12'} + cpu: [arm64] + os: [win32] + + '@esbuild/win32-ia32@0.20.2': + resolution: {integrity: sha512-HfLOfn9YWmkSKRQqovpnITazdtquEW8/SoHW7pWpuEeguaZI4QnCRW6b+oZTztdBnZOS2hqJ6im/D5cPzBTTlQ==} + engines: {node: '>=12'} + cpu: [ia32] + os: [win32] + + '@esbuild/win32-x64@0.20.2': + resolution: {integrity: sha512-N49X4lJX27+l9jbLKSqZ6bKNjzQvHaT8IIFUy+YIqmXQdjYCToGWwOItDrfby14c78aDd5NHQl29xingXfCdLQ==} + engines: {node: '>=12'} + cpu: [x64] + os: [win32] + + '@foxglove/crc@0.0.3': + resolution: {integrity: sha512-DjIZsnL3CyP/yQ/vUYA9cjrD0a/8YXejI5ZmsaOiT16cLfZcTwaCxIN01/ys4jsy+dZCQ/9DnWFn7AEFbiMDaA==} + + '@noble/curves@1.4.0': + resolution: {integrity: sha512-p+4cb332SFCrReJkCYe8Xzm0OWi4Jji5jVdIZRL/PmacmDkFNw6MrrV+gGpiPxLHbV+zKFRywUWbaseT+tZRXg==} + + '@noble/ed25519@2.1.0': + resolution: {integrity: sha512-KM4qTyXPinyCgMzeYJH/UudpdL+paJXtY3CHtHYZQtBkS8MZoPr4rOikZllIutJe0d06QDQKisyn02gxZ8TcQA==} + + '@noble/hashes@1.4.0': + resolution: {integrity: sha512-V1JJ1WTRUqHHrOSh597hURcMqVKVGL/ea3kv0gSnEdsEZ0/+VyPghM1lMNGc00z7CIQorSvbKpuJkxvuHbvdbg==} + engines: {node: '>= 16'} + + '@scure/base@1.1.6': + resolution: {integrity: sha512-ok9AWwhcgYuGG3Zfhyqg+zwl+Wn5uE+dwC0NV/2qQkx4dABbb/bx96vWu8NSj+BNjjSjno+JRYRjle1jV08k3g==} + + '@scure/bip39@1.3.0': + resolution: {integrity: sha512-disdg7gHuTDZtY+ZdkmLpPCk7fxZSu3gBiEGuoC1XYxv9cGx3Z6cpTggCgW6odSOOIXCiDjuGejW+aJKCY/pIQ==} + + '@tsconfig/node20@20.1.4': + resolution: {integrity: sha512-sqgsT69YFeLWf5NtJ4Xq/xAF8p4ZQHlmGW74Nu2tD4+g5fAsposc4ZfaaPixVu4y01BEiDCWLRDCvDM5JOsRxg==} + + '@types/json-bigint@1.0.4': + resolution: {integrity: sha512-ydHooXLbOmxBbubnA7Eh+RpBzuaIiQjh8WGJYQB50JFGFrdxW7JzVlyEV7fAXw0T2sqJ1ysTneJbiyNLqZRAag==} + + '@types/node@20.12.12': + resolution: {integrity: sha512-eWLDGF/FOSPtAvEqeRAQ4C8LSA7M1I7i0ky1I8U7kD1J5ITyW3AsRhQrKVoWf5pFKZ2kILsEGJhsI9r93PYnOw==} + + '@zxing/text-encoding@0.9.0': + resolution: {integrity: sha512-U/4aVJ2mxI0aDNI8Uq0wEhMgY+u4CNtEb0om3+y3+niDAsoTCOB33UF0sxpzqzdqXLqmvc+vZyAt4O8pPdfkwA==} + + available-typed-arrays@1.0.7: + resolution: {integrity: sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==} + engines: {node: '>= 0.4'} + + b4a@1.6.6: + resolution: {integrity: sha512-5Tk1HLk6b6ctmjIkAcU/Ujv/1WqiDl0F0JdRCR80VsOcUlHcu7pWeWRlOqQLHfDEsVx9YH/aif5AG4ehoCtTmg==} + + bech32@2.0.0: + resolution: {integrity: sha512-LcknSilhIGatDAsY1ak2I8VtGaHNhgMSYVxFrGLXv+xLHytaKZKcaUJJUE7qmBr7h33o5YQwP55pMI0xmkpJwg==} + + bignumber.js@9.1.2: + resolution: {integrity: sha512-2/mKyZH9K85bzOEfhXDBFZTGd1CTs+5IHpeFQo9luiBG7hghdC851Pj2WAhb6E3R6b9tZj/XKhbg4fum+Kepug==} + + blake2b-wasm@2.4.0: + resolution: {integrity: sha512-S1kwmW2ZhZFFFOghcx73+ZajEfKBqhP82JMssxtLVMxlaPea1p9uoLiUZ5WYyHn0KddwbLc+0vh4wR0KBNoT5w==} + + blake2b@2.1.4: + resolution: {integrity: sha512-AyBuuJNI64gIvwx13qiICz6H6hpmjvYS5DGkG6jbXMOT8Z3WUJ3V1X0FlhIoT1b/5JtHE3ki+xjtMvu1nn+t9A==} + + blakejs@1.2.1: + resolution: {integrity: sha512-QXUSXI3QVc/gJME0dBpXrag1kbzOqCjCX8/b54ntNyW6sjtoqxqRk3LTmXzaJoh71zMsDCjM+47jS7XiwN/+fQ==} + + call-bind@1.0.7: + resolution: {integrity: sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==} + engines: {node: '>= 0.4'} + + cipher-base@1.0.4: + resolution: {integrity: sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==} + + create-hash@1.2.0: + resolution: {integrity: sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==} + + create-hmac@1.1.7: + resolution: {integrity: sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==} + + cross-fetch@3.1.8: + resolution: {integrity: sha512-cvA+JwZoU0Xq+h6WkMvAUqPEYy92Obet6UdKLfW60qn99ftItKjB5T+BkyWOFWe2pUyfQ+IJHmpOTznqk1M6Kg==} + + define-data-property@1.1.4: + resolution: {integrity: sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==} + engines: {node: '>= 0.4'} + + es-define-property@1.0.0: + resolution: {integrity: sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==} + engines: {node: '>= 0.4'} + + es-errors@1.3.0: + resolution: {integrity: sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==} + engines: {node: '>= 0.4'} + + esbuild@0.20.2: + resolution: {integrity: sha512-WdOOppmUNU+IbZ0PaDiTst80zjnrOkyJNHoKupIcVyU8Lvla3Ugx94VzkQ32Ijqd7UhHJy75gNWDMUekcrSJ6g==} + engines: {node: '>=12'} + hasBin: true + + fastq@1.17.1: + resolution: {integrity: sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==} + + for-each@0.3.3: + resolution: {integrity: sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==} + + fraction.js@4.0.1: + resolution: {integrity: sha512-NQYzZw8MUsxSZFQo6E8tKOlmSd/BlDTNOR4puXFSHSwFwNaIlmbortQy5PDN/KnVQ4xWG2NtN0J0hjPw7eE06A==} + + fsevents@2.3.3: + resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==} + engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} + os: [darwin] + + function-bind@1.1.2: + resolution: {integrity: sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==} + + get-intrinsic@1.2.4: + resolution: {integrity: sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==} + engines: {node: '>= 0.4'} + + get-tsconfig@4.7.5: + resolution: {integrity: sha512-ZCuZCnlqNzjb4QprAzXKdpp/gh6KTxSJuw3IBsPnV/7fV4NxC9ckB+vPTt8w7fJA0TaSD7c55BR47JD6MEDyDw==} + + gopd@1.0.1: + resolution: {integrity: sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==} + + has-property-descriptors@1.0.2: + resolution: {integrity: sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==} + + has-proto@1.0.3: + resolution: {integrity: sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==} + engines: {node: '>= 0.4'} + + has-symbols@1.0.3: + resolution: {integrity: sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==} + engines: {node: '>= 0.4'} + + has-tostringtag@1.0.2: + resolution: {integrity: sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==} + engines: {node: '>= 0.4'} + + hash-base@3.1.0: + resolution: {integrity: sha512-1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA==} + engines: {node: '>=4'} + + hasown@2.0.2: + resolution: {integrity: sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==} + engines: {node: '>= 0.4'} + + i@0.3.7: + resolution: {integrity: sha512-FYz4wlXgkQwIPqhzC5TdNMLSE5+GS1IIDJZY/1ZiEPCT2S3COUVZeT5OW4BmW4r5LHLQuOosSwsvnroG9GR59Q==} + engines: {node: '>=0.4'} + + inherits@2.0.4: + resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==} + + ip-address@8.1.0: + resolution: {integrity: sha512-Wz91gZKpNKoXtqvY8ScarKYwhXoK4r/b5QuT+uywe/azv0/nUCo7Bh0IRRI7F9DHR06kJNWtzMGLIbXavngbKA==} + engines: {node: '>= 12'} + + is-arguments@1.1.1: + resolution: {integrity: sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA==} + engines: {node: '>= 0.4'} + + is-callable@1.2.7: + resolution: {integrity: sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==} + engines: {node: '>= 0.4'} + + is-generator-function@1.0.10: + resolution: {integrity: sha512-jsEjy9l3yiXEQ+PsXdmBwEPcOxaXWLspKdplFUVI9vq1iZgIekeC0L167qeu86czQaxed3q/Uzuw0swL0irL8A==} + engines: {node: '>= 0.4'} + + is-typed-array@1.1.13: + resolution: {integrity: sha512-uZ25/bUAlUY5fR4OKT4rZQEBrzQWYV9ZJYGGsUmEJ6thodVJ1HX64ePQ6Z0qPWP+m+Uq6e9UugrE38jeYsDSMw==} + engines: {node: '>= 0.4'} + + isomorphic-ws@4.0.1: + resolution: {integrity: sha512-BhBvN2MBpWTaSHdWRb/bwdZJ1WaehQ2L1KngkCkfLUGF0mAWAT1sQUQacEmQ0jXkFw/czDXPNQSL5u2/Krsz1w==} + peerDependencies: + ws: '*' + + jsbn@1.1.0: + resolution: {integrity: sha512-4bYVV3aAMtDTTu4+xsDYa6sy9GyJ69/amsu9sYF2zqjiEoZA5xJi3BrfX3uY+/IekIu7MwdObdbDWpoZdBv3/A==} + + libsodium-sumo@0.7.13: + resolution: {integrity: sha512-zTGdLu4b9zSNLfovImpBCbdAA4xkpkZbMnSQjP8HShyOutnGjRHmSOKlsylh1okao6QhLiz7nG98EGn+04cZjQ==} + + libsodium-wrappers-sumo@0.7.13: + resolution: {integrity: sha512-lz4YdplzDRh6AhnLGF2Dj2IUj94xRN6Bh8T0HLNwzYGwPehQJX6c7iYVrFUPZ3QqxE0bqC+K0IIqqZJYWumwSQ==} + + lodash@4.17.21: + resolution: {integrity: sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==} + + md5.js@1.3.5: + resolution: {integrity: sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==} + + nanoassert@2.0.0: + resolution: {integrity: sha512-7vO7n28+aYO4J+8w96AzhmU8G+Y/xpPDJz/se19ICsqj/momRbb9mh9ZUtkoJ5X3nTnPdhEJyc0qnM6yAsHBaA==} + + nanoid@3.3.7: + resolution: {integrity: sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==} + engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} + hasBin: true + + node-fetch@2.7.0: + resolution: {integrity: sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==} + engines: {node: 4.x || >=6.0.0} + peerDependencies: + encoding: ^0.1.0 + peerDependenciesMeta: + encoding: + optional: true + + npm@9.9.3: + resolution: {integrity: sha512-Z1l+rcQ5kYb17F3hHtO601arEpvdRYnCLtg8xo3AGtyj3IthwaraEOexI9903uANkifFbqHC8hT53KIrozWg8A==} + engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} + hasBin: true + bundledDependencies: + - '@isaacs/string-locale-compare' + - '@npmcli/arborist' + - '@npmcli/config' + - '@npmcli/fs' + - '@npmcli/map-workspaces' + - '@npmcli/package-json' + - '@npmcli/promise-spawn' + - '@npmcli/run-script' + - abbrev + - archy + - cacache + - chalk + - ci-info + - cli-columns + - cli-table3 + - columnify + - fastest-levenshtein + - fs-minipass + - glob + - graceful-fs + - hosted-git-info + - ini + - init-package-json + - is-cidr + - json-parse-even-better-errors + - libnpmaccess + - libnpmdiff + - libnpmexec + - libnpmfund + - libnpmhook + - libnpmorg + - libnpmpack + - libnpmpublish + - libnpmsearch + - libnpmteam + - libnpmversion + - make-fetch-happen + - minimatch + - minipass + - minipass-pipeline + - ms + - node-gyp + - nopt + - normalize-package-data + - npm-audit-report + - npm-install-checks + - npm-package-arg + - npm-pick-manifest + - npm-profile + - npm-registry-fetch + - npm-user-validate + - npmlog + - p-map + - pacote + - parse-conflict-json + - proc-log + - qrcode-terminal + - read + - semver + - sigstore + - spdx-expression-parse + - ssri + - supports-color + - tar + - text-table + - tiny-relative-date + - treeverse + - validate-npm-package-name + - which + - write-file-atomic + + pbkdf2@3.1.2: + resolution: {integrity: sha512-iuh7L6jA7JEGu2WxDwtQP1ddOpaJNC4KlDEFfdQajSGgGPNi4OyDc2R7QnbY2bR9QjBVGwgvTdNJZoE7RaxUMA==} + engines: {node: '>=0.12'} + + possible-typed-array-names@1.0.0: + resolution: {integrity: sha512-d7Uw+eZoloe0EHDIYoe+bQ5WXnGMOpmiZFTuMWCwpjzzkL2nTjcKiAk4hh8TjnGye2TwWOk3UXucZ+3rbmBa8Q==} + engines: {node: '>= 0.4'} + + readable-stream@3.6.2: + resolution: {integrity: sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==} + engines: {node: '>= 6'} + + resolve-pkg-maps@1.0.0: + resolution: {integrity: sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==} + + reusify@1.0.4: + resolution: {integrity: sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==} + engines: {iojs: '>=1.0.0', node: '>=0.10.0'} + + ripemd160@2.0.2: + resolution: {integrity: sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==} + + rxjs@7.8.1: + resolution: {integrity: sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg==} + + safe-buffer@5.2.1: + resolution: {integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==} + + serialize-error@8.1.0: + resolution: {integrity: sha512-3NnuWfM6vBYoy5gZFvHiYsVbafvI9vZv/+jlIigFn4oP4zjNPK3LhcY0xSCgeb1a5L8jO71Mit9LlNoi2UfDDQ==} + engines: {node: '>=10'} + + set-function-length@1.2.2: + resolution: {integrity: sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==} + engines: {node: '>= 0.4'} + + sha.js@2.4.11: + resolution: {integrity: sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==} + hasBin: true + + sprintf-js@1.1.2: + resolution: {integrity: sha512-VE0SOVEHCk7Qc8ulkWw3ntAzXuqf7S2lvwQaDLRnUeIEaKNQJzV6BwmLKhOqT61aGhfUMrXeaBk+oDGCzvhcug==} + + string_decoder@1.3.0: + resolution: {integrity: sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==} + + tr46@0.0.3: + resolution: {integrity: sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==} + + ts-custom-error@3.3.1: + resolution: {integrity: sha512-5OX1tzOjxWEgsr/YEUWSuPrQ00deKLh6D7OTWcvNHm12/7QPyRh8SYpyWvA4IZv8H/+GQWQEh/kwo95Q9OVW1A==} + engines: {node: '>=14.0.0'} + + ts-log@2.2.5: + resolution: {integrity: sha512-PGcnJoTBnVGy6yYNFxWVNkdcAuAMstvutN9MgDJIV6L0oG8fB+ZNNy1T+wJzah8RPGor1mZuPQkVfXNDpy9eHA==} + + tslib@2.6.2: + resolution: {integrity: sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==} + + tsx@4.10.2: + resolution: {integrity: sha512-gOfACgv1ElsIjvt7Fp0rMJKGnMGjox0JfGOfX3kmZCV/yZumaNqtHGKBXt1KgaYS9KjDOmqGeI8gHk/W7kWVZg==} + engines: {node: '>=18.0.0'} + hasBin: true + + type-fest@0.20.2: + resolution: {integrity: sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==} + engines: {node: '>=10'} + + type-fest@2.19.0: + resolution: {integrity: sha512-RAH822pAdBgcNMAfWnCBU3CFZcfZ/i1eZjwFU/dsLKumyuuP3niueg2UAukXYF0E2AAoc82ZSSf9J0WQBinzHA==} + engines: {node: '>=12.20'} + + undici-types@5.26.5: + resolution: {integrity: sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==} + + uplc-node@0.0.3: + resolution: {integrity: sha512-4vr7+RzsRmzS2xuMMMsAs7/VgUzq0Y6ha03IKY1yvTwTz4JQcrlOB0wISzpQ0wJUCxXCirsWKh95BJdrC9OT+w==} + + util-deprecate@1.0.2: + resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==} + + util@0.12.5: + resolution: {integrity: sha512-kZf/K6hEIrWHI6XqOFUiiMa+79wE/D8Q+NCNAWclkyg3b4d2k7s0QGepNjiABc+aR3N1PAyHL7p6UcLY6LmrnA==} + + web-encoding@1.1.5: + resolution: {integrity: sha512-HYLeVCdJ0+lBYV2FvNZmv3HJ2Nt0QYXqZojk3d9FJOLkwnuhzM9tmamh8d7HPM8QqjKH8DeHkFTx+CFlWpZZDA==} + + webidl-conversions@3.0.1: + resolution: {integrity: sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==} + + whatwg-url@5.0.0: + resolution: {integrity: sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==} + + which-typed-array@1.1.15: + resolution: {integrity: sha512-oV0jmFtUky6CXfkqehVvBP/LSWJ2sy4vWMioiENyJLePrBO/yKyV9OyJySfAKosh+RYkIl5zJCNZ8/4JncrpdA==} + engines: {node: '>= 0.4'} + + ws@7.5.9: + resolution: {integrity: sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q==} + engines: {node: '>=8.3.0'} + peerDependencies: + bufferutil: ^4.0.1 + utf-8-validate: ^5.0.2 + peerDependenciesMeta: + bufferutil: + optional: true + utf-8-validate: + optional: true + +snapshots: + + '@blaze-cardano/blueprint@0.0.1': {} + + '@blaze-cardano/core@0.1.1': + dependencies: + '@cardano-sdk/core': 0.30.2(rxjs@7.8.1) + '@cardano-sdk/crypto': 0.1.23 + '@cardano-sdk/util': 0.15.1 + '@noble/curves': 1.4.0 + '@noble/ed25519': 2.1.0 + '@noble/hashes': 1.4.0 + '@scure/bip39': 1.3.0 + blakejs: 1.2.1 + rxjs: 7.8.1 + transitivePeerDependencies: + - '@dcspark/cardano-multiplatform-lib-asmjs' + - '@dcspark/cardano-multiplatform-lib-browser' + - '@dcspark/cardano-multiplatform-lib-nodejs' + - bufferutil + - encoding + - utf-8-validate + + '@blaze-cardano/query@0.0.4': + dependencies: + '@blaze-cardano/core': 0.1.1 + transitivePeerDependencies: + - '@dcspark/cardano-multiplatform-lib-asmjs' + - '@dcspark/cardano-multiplatform-lib-browser' + - '@dcspark/cardano-multiplatform-lib-nodejs' + - bufferutil + - encoding + - utf-8-validate + + '@blaze-cardano/sdk@0.0.9': + dependencies: + '@blaze-cardano/blueprint': 0.0.1 + '@blaze-cardano/core': 0.1.1 + '@blaze-cardano/query': 0.0.4 + '@blaze-cardano/tx': 0.0.7 + '@blaze-cardano/wallet': 0.0.8 + transitivePeerDependencies: + - '@dcspark/cardano-multiplatform-lib-asmjs' + - '@dcspark/cardano-multiplatform-lib-browser' + - '@dcspark/cardano-multiplatform-lib-nodejs' + - bufferutil + - encoding + - utf-8-validate + + '@blaze-cardano/tx@0.0.7': + dependencies: + '@blaze-cardano/core': 0.1.1 + uplc-node: 0.0.3 + transitivePeerDependencies: + - '@dcspark/cardano-multiplatform-lib-asmjs' + - '@dcspark/cardano-multiplatform-lib-browser' + - '@dcspark/cardano-multiplatform-lib-nodejs' + - bufferutil + - encoding + - utf-8-validate + + '@blaze-cardano/wallet@0.0.8': + dependencies: + '@blaze-cardano/core': 0.1.1 + '@blaze-cardano/query': 0.0.4 + '@blaze-cardano/tx': 0.0.7 + transitivePeerDependencies: + - '@dcspark/cardano-multiplatform-lib-asmjs' + - '@dcspark/cardano-multiplatform-lib-browser' + - '@dcspark/cardano-multiplatform-lib-nodejs' + - bufferutil + - encoding + - utf-8-validate + + '@cardano-ogmios/client@5.6.0': + dependencies: + '@cardano-ogmios/schema': 5.6.0 + '@cardanosolutions/json-bigint': 1.0.1 + '@types/json-bigint': 1.0.4 + cross-fetch: 3.1.8 + fastq: 1.17.1 + isomorphic-ws: 4.0.1(ws@7.5.9) + nanoid: 3.3.7 + ts-custom-error: 3.3.1 + ws: 7.5.9 + transitivePeerDependencies: + - bufferutil + - encoding + - utf-8-validate + + '@cardano-ogmios/schema@5.6.0': {} + + '@cardano-sdk/core@0.30.2(rxjs@7.8.1)': + dependencies: + '@cardano-ogmios/client': 5.6.0 + '@cardano-ogmios/schema': 5.6.0 + '@cardano-sdk/crypto': 0.1.23 + '@cardano-sdk/util': 0.15.1 + '@foxglove/crc': 0.0.3 + '@scure/base': 1.1.6 + fraction.js: 4.0.1 + ip-address: 8.1.0 + lodash: 4.17.21 + ts-custom-error: 3.3.1 + ts-log: 2.2.5 + web-encoding: 1.1.5 + optionalDependencies: + rxjs: 7.8.1 + transitivePeerDependencies: + - '@dcspark/cardano-multiplatform-lib-asmjs' + - '@dcspark/cardano-multiplatform-lib-browser' + - '@dcspark/cardano-multiplatform-lib-nodejs' + - bufferutil + - encoding + - utf-8-validate + + '@cardano-sdk/crypto@0.1.23': + dependencies: + '@cardano-sdk/util': 0.15.1 + blake2b: 2.1.4 + i: 0.3.7 + libsodium-wrappers-sumo: 0.7.13 + lodash: 4.17.21 + npm: 9.9.3 + pbkdf2: 3.1.2 + ts-custom-error: 3.3.1 + ts-log: 2.2.5 + + '@cardano-sdk/util@0.15.1': + dependencies: + bech32: 2.0.0 + lodash: 4.17.21 + serialize-error: 8.1.0 + ts-custom-error: 3.3.1 + ts-log: 2.2.5 + type-fest: 2.19.0 + + '@cardanosolutions/json-bigint@1.0.1': + dependencies: + bignumber.js: 9.1.2 + + '@esbuild/aix-ppc64@0.20.2': + optional: true + + '@esbuild/android-arm64@0.20.2': + optional: true + + '@esbuild/android-arm@0.20.2': + optional: true + + '@esbuild/android-x64@0.20.2': + optional: true + + '@esbuild/darwin-arm64@0.20.2': + optional: true + + '@esbuild/darwin-x64@0.20.2': + optional: true + + '@esbuild/freebsd-arm64@0.20.2': + optional: true + + '@esbuild/freebsd-x64@0.20.2': + optional: true + + '@esbuild/linux-arm64@0.20.2': + optional: true + + '@esbuild/linux-arm@0.20.2': + optional: true + + '@esbuild/linux-ia32@0.20.2': + optional: true + + '@esbuild/linux-loong64@0.20.2': + optional: true + + '@esbuild/linux-mips64el@0.20.2': + optional: true + + '@esbuild/linux-ppc64@0.20.2': + optional: true + + '@esbuild/linux-riscv64@0.20.2': + optional: true + + '@esbuild/linux-s390x@0.20.2': + optional: true + + '@esbuild/linux-x64@0.20.2': + optional: true + + '@esbuild/netbsd-x64@0.20.2': + optional: true + + '@esbuild/openbsd-x64@0.20.2': + optional: true + + '@esbuild/sunos-x64@0.20.2': + optional: true + + '@esbuild/win32-arm64@0.20.2': + optional: true + + '@esbuild/win32-ia32@0.20.2': + optional: true + + '@esbuild/win32-x64@0.20.2': + optional: true + + '@foxglove/crc@0.0.3': {} + + '@noble/curves@1.4.0': + dependencies: + '@noble/hashes': 1.4.0 + + '@noble/ed25519@2.1.0': {} + + '@noble/hashes@1.4.0': {} + + '@scure/base@1.1.6': {} + + '@scure/bip39@1.3.0': + dependencies: + '@noble/hashes': 1.4.0 + '@scure/base': 1.1.6 + + '@tsconfig/node20@20.1.4': {} + + '@types/json-bigint@1.0.4': {} + + '@types/node@20.12.12': + dependencies: + undici-types: 5.26.5 + + '@zxing/text-encoding@0.9.0': + optional: true + + available-typed-arrays@1.0.7: + dependencies: + possible-typed-array-names: 1.0.0 + + b4a@1.6.6: {} + + bech32@2.0.0: {} + + bignumber.js@9.1.2: {} + + blake2b-wasm@2.4.0: + dependencies: + b4a: 1.6.6 + nanoassert: 2.0.0 + + blake2b@2.1.4: + dependencies: + blake2b-wasm: 2.4.0 + nanoassert: 2.0.0 + + blakejs@1.2.1: {} + + call-bind@1.0.7: + dependencies: + es-define-property: 1.0.0 + es-errors: 1.3.0 + function-bind: 1.1.2 + get-intrinsic: 1.2.4 + set-function-length: 1.2.2 + + cipher-base@1.0.4: + dependencies: + inherits: 2.0.4 + safe-buffer: 5.2.1 + + create-hash@1.2.0: + dependencies: + cipher-base: 1.0.4 + inherits: 2.0.4 + md5.js: 1.3.5 + ripemd160: 2.0.2 + sha.js: 2.4.11 + + create-hmac@1.1.7: + dependencies: + cipher-base: 1.0.4 + create-hash: 1.2.0 + inherits: 2.0.4 + ripemd160: 2.0.2 + safe-buffer: 5.2.1 + sha.js: 2.4.11 + + cross-fetch@3.1.8: + dependencies: + node-fetch: 2.7.0 + transitivePeerDependencies: + - encoding + + define-data-property@1.1.4: + dependencies: + es-define-property: 1.0.0 + es-errors: 1.3.0 + gopd: 1.0.1 + + es-define-property@1.0.0: + dependencies: + get-intrinsic: 1.2.4 + + es-errors@1.3.0: {} + + esbuild@0.20.2: + optionalDependencies: + '@esbuild/aix-ppc64': 0.20.2 + '@esbuild/android-arm': 0.20.2 + '@esbuild/android-arm64': 0.20.2 + '@esbuild/android-x64': 0.20.2 + '@esbuild/darwin-arm64': 0.20.2 + '@esbuild/darwin-x64': 0.20.2 + '@esbuild/freebsd-arm64': 0.20.2 + '@esbuild/freebsd-x64': 0.20.2 + '@esbuild/linux-arm': 0.20.2 + '@esbuild/linux-arm64': 0.20.2 + '@esbuild/linux-ia32': 0.20.2 + '@esbuild/linux-loong64': 0.20.2 + '@esbuild/linux-mips64el': 0.20.2 + '@esbuild/linux-ppc64': 0.20.2 + '@esbuild/linux-riscv64': 0.20.2 + '@esbuild/linux-s390x': 0.20.2 + '@esbuild/linux-x64': 0.20.2 + '@esbuild/netbsd-x64': 0.20.2 + '@esbuild/openbsd-x64': 0.20.2 + '@esbuild/sunos-x64': 0.20.2 + '@esbuild/win32-arm64': 0.20.2 + '@esbuild/win32-ia32': 0.20.2 + '@esbuild/win32-x64': 0.20.2 + + fastq@1.17.1: + dependencies: + reusify: 1.0.4 + + for-each@0.3.3: + dependencies: + is-callable: 1.2.7 + + fraction.js@4.0.1: {} + + fsevents@2.3.3: + optional: true + + function-bind@1.1.2: {} + + get-intrinsic@1.2.4: + dependencies: + es-errors: 1.3.0 + function-bind: 1.1.2 + has-proto: 1.0.3 + has-symbols: 1.0.3 + hasown: 2.0.2 + + get-tsconfig@4.7.5: + dependencies: + resolve-pkg-maps: 1.0.0 + + gopd@1.0.1: + dependencies: + get-intrinsic: 1.2.4 + + has-property-descriptors@1.0.2: + dependencies: + es-define-property: 1.0.0 + + has-proto@1.0.3: {} + + has-symbols@1.0.3: {} + + has-tostringtag@1.0.2: + dependencies: + has-symbols: 1.0.3 + + hash-base@3.1.0: + dependencies: + inherits: 2.0.4 + readable-stream: 3.6.2 + safe-buffer: 5.2.1 + + hasown@2.0.2: + dependencies: + function-bind: 1.1.2 + + i@0.3.7: {} + + inherits@2.0.4: {} + + ip-address@8.1.0: + dependencies: + jsbn: 1.1.0 + sprintf-js: 1.1.2 + + is-arguments@1.1.1: + dependencies: + call-bind: 1.0.7 + has-tostringtag: 1.0.2 + + is-callable@1.2.7: {} + + is-generator-function@1.0.10: + dependencies: + has-tostringtag: 1.0.2 + + is-typed-array@1.1.13: + dependencies: + which-typed-array: 1.1.15 + + isomorphic-ws@4.0.1(ws@7.5.9): + dependencies: + ws: 7.5.9 + + jsbn@1.1.0: {} + + libsodium-sumo@0.7.13: {} + + libsodium-wrappers-sumo@0.7.13: + dependencies: + libsodium-sumo: 0.7.13 + + lodash@4.17.21: {} + + md5.js@1.3.5: + dependencies: + hash-base: 3.1.0 + inherits: 2.0.4 + safe-buffer: 5.2.1 + + nanoassert@2.0.0: {} + + nanoid@3.3.7: {} + + node-fetch@2.7.0: + dependencies: + whatwg-url: 5.0.0 + + npm@9.9.3: {} + + pbkdf2@3.1.2: + dependencies: + create-hash: 1.2.0 + create-hmac: 1.1.7 + ripemd160: 2.0.2 + safe-buffer: 5.2.1 + sha.js: 2.4.11 + + possible-typed-array-names@1.0.0: {} + + readable-stream@3.6.2: + dependencies: + inherits: 2.0.4 + string_decoder: 1.3.0 + util-deprecate: 1.0.2 + + resolve-pkg-maps@1.0.0: {} + + reusify@1.0.4: {} + + ripemd160@2.0.2: + dependencies: + hash-base: 3.1.0 + inherits: 2.0.4 + + rxjs@7.8.1: + dependencies: + tslib: 2.6.2 + + safe-buffer@5.2.1: {} + + serialize-error@8.1.0: + dependencies: + type-fest: 0.20.2 + + set-function-length@1.2.2: + dependencies: + define-data-property: 1.1.4 + es-errors: 1.3.0 + function-bind: 1.1.2 + get-intrinsic: 1.2.4 + gopd: 1.0.1 + has-property-descriptors: 1.0.2 + + sha.js@2.4.11: + dependencies: + inherits: 2.0.4 + safe-buffer: 5.2.1 + + sprintf-js@1.1.2: {} + + string_decoder@1.3.0: + dependencies: + safe-buffer: 5.2.1 + + tr46@0.0.3: {} + + ts-custom-error@3.3.1: {} + + ts-log@2.2.5: {} + + tslib@2.6.2: {} + + tsx@4.10.2: + dependencies: + esbuild: 0.20.2 + get-tsconfig: 4.7.5 + optionalDependencies: + fsevents: 2.3.3 + + type-fest@0.20.2: {} + + type-fest@2.19.0: {} + + undici-types@5.26.5: {} + + uplc-node@0.0.3: {} + + util-deprecate@1.0.2: {} + + util@0.12.5: + dependencies: + inherits: 2.0.4 + is-arguments: 1.1.1 + is-generator-function: 1.0.10 + is-typed-array: 1.1.13 + which-typed-array: 1.1.15 + + web-encoding@1.1.5: + dependencies: + util: 0.12.5 + optionalDependencies: + '@zxing/text-encoding': 0.9.0 + + webidl-conversions@3.0.1: {} + + whatwg-url@5.0.0: + dependencies: + tr46: 0.0.3 + webidl-conversions: 3.0.1 + + which-typed-array@1.1.15: + dependencies: + available-typed-arrays: 1.0.7 + call-bind: 1.0.7 + for-each: 0.3.3 + gopd: 1.0.1 + has-tostringtag: 1.0.2 + + ws@7.5.9: {} diff --git a/examples/hello_world/generate-credentials.ts b/examples/hello_world/src/generate-credentials.ts similarity index 100% rename from examples/hello_world/generate-credentials.ts rename to examples/hello_world/src/generate-credentials.ts diff --git a/examples/hello_world/src/hello_world-lock.ts b/examples/hello_world/src/hello_world-lock.ts new file mode 100644 index 000000000..f4f5c17d4 --- /dev/null +++ b/examples/hello_world/src/hello_world-lock.ts @@ -0,0 +1,73 @@ +import { + Blockfrost, + Constr, + Data, + fromHex, + Blaze, + SpendingValidator, + toHex, +} from "@blaze-cardano/sdk"; +import { TransactionId } from "@blaze-cardano/core"; +import * as cbor from "https://deno.land/x/cbor@v1.4.1/index.js"; + +const blaze = new Blaze( + new Blockfrost({ + network: "cardano-preview", + projectId: process.env.BLOCKFROST_API_KEY ?? "", + }), + "Preview", +); + +blaze.selectWalletFromPrivateKey(await Deno.readTextFile("./key.sk")); + +const validator = await readValidator(); + +// --- Supporting functions + +async function readValidator(): Promise { + const validator = JSON.parse(await Deno.readTextFile("plutus.json")) + .validators[0]; + + return { + type: "PlutusV2", + script: toHex(cbor.encode(fromHex(validator.compiledCode))), + }; +} + +const publicKeyHash = blaze.utils.getAddressDetails( + await blaze.wallet.address(), +).paymentCredential?.hash; + +const datum = Data.to(new Constr(0, [publicKeyHash])); + +const txId = await lock(1000000n, { into: validator, owner: datum }); + +await blaze.provider.awaitTransactionConfirmation(txId); + +console.log(`1 tADA locked into the contract at: + Tx ID: ${txHash} + Datum: ${datum} +`); + +// --- Supporting functions + +async function lock( + lovelace: bigint, + { into, owner }: { into: SpendingValidator; owner: string }, +): Promise { + const contractAddress = blaze.utils.validatorToAddress(into); + + const txBuilder = await blaze.newTransaction(); + + const tx = await txBuilder + .lockLovelace(contractAddress, lovelace, owner) + .complete(); + + const witnessSet = await blaze.wallet.signTransaction(tx, false); + + tx.setWitnessSet(witnessSet); + + const txId = await blaze.wallet.postTransaction(tx); + + return txId; +} diff --git a/examples/hello_world/hello_world-unlock.ts b/examples/hello_world/src/hello_world-unlock.ts similarity index 100% rename from examples/hello_world/hello_world-unlock.ts rename to examples/hello_world/src/hello_world-unlock.ts diff --git a/examples/hello_world/tsconfig.json b/examples/hello_world/tsconfig.json new file mode 100644 index 000000000..b6cfb901d --- /dev/null +++ b/examples/hello_world/tsconfig.json @@ -0,0 +1,7 @@ +{ + "$schema": "https://json.schemastore.org/tsconfig", + "extends": "@tsconfig/node20/tsconfig.json", + "compilerOptions": { + "module": "NodeNext" + } +}