{"_id":"@azguardwallet/aztec-wallet","_rev":"5-4f7644cef04adc1f39233d790d5d934a","name":"@azguardwallet/aztec-wallet","dist-tags":{"latest":"4.1.0-rc.4"},"versions":{"2.0.3":{"name":"@azguardwallet/aztec-wallet","version":"2.0.3","author":{"name":"Azguard Wallet"},"license":"MIT","_id":"@azguardwallet/aztec-wallet@2.0.3","maintainers":[{"name":"azguardwallet","email":"hello@azguardwallet.io"}],"homepage":"https://github.com/AzguardWallet/aztec-wallet","bugs":{"url":"https://github.com/AzguardWallet/aztec-wallet/issues"},"dist":{"shasum":"d56f94c1c9cb6a7625bd75c8e64a7e925b800f27","tarball":"https://registry.npmjs.org/@azguardwallet/aztec-wallet/-/aztec-wallet-2.0.3.tgz","fileCount":11,"integrity":"sha512-MQtAlcEN0vn3pNmv9jV453VO1/cW38pNmJmyb4Hh/D/QrFG4K8MGaPaKOpqSLI3P7JL4kJ5FEKn8ltzBgoB+0w==","signatures":[{"sig":"MEUCIQDGaG8fIXbyVuHqz8YUvCNZbGcM/T9MjjYJ8pZB/hu/PQIgc+FIasr1EQZXtm9yaFW2YdSjvBnH2wfB0e4UneBG7JQ=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":32876},"exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"}},"gitHead":"9af270a6ece4c95db5dabbb814927e1e0ee27eb5","scripts":{"build":"rm -rf dist && tsc"},"_npmUser":{"name":"azguardwallet","email":"hello@azguardwallet.io"},"repository":{"url":"git+https://github.com/AzguardWallet/aztec-wallet.git","type":"git"},"_npmVersion":"10.9.2","description":"Azguard Wallet client fully compatible with Aztec.js' Wallet interface","directories":{},"_nodeVersion":"22.16.0","dependencies":{"zod":"^3.23.8","@aztec/stdlib":"2.0.3","@aztec/aztec.js":"2.0.3","@aztec/foundation":"2.0.3","@aztec/entrypoints":"2.0.3","@azguardwallet/types":"0.5.0","@azguardwallet/client":"0.5.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/aztec-wallet_2.0.3_1759838891253_0.23126477078632512","host":"s3://npm-registry-packages-npm-production"}},"3.0.0-devnet.5":{"name":"@azguardwallet/aztec-wallet","version":"3.0.0-devnet.5","author":{"name":"Azguard Wallet"},"license":"MIT","_id":"@azguardwallet/aztec-wallet@3.0.0-devnet.5","maintainers":[{"name":"azguardwallet","email":"hello@azguardwallet.io"}],"homepage":"https://github.com/AzguardWallet/aztec-wallet","bugs":{"url":"https://github.com/AzguardWallet/aztec-wallet/issues"},"dist":{"shasum":"6d37be9ec742de2648f3547ea4464c6cd259252b","tarball":"https://registry.npmjs.org/@azguardwallet/aztec-wallet/-/aztec-wallet-3.0.0-devnet.5.tgz","fileCount":11,"integrity":"sha512-wdy3wSKxXZiq87iC3sAG+wz3qvR/DbAal9kmK/LXmYlqz1OBT5KJOqVqBgYTKZ1yxaR10UmRWniseTBj3RwcyA==","signatures":[{"sig":"MEYCIQDZ+TI3hKl45gJG6IgoFVki50f8HauSziih8GYcQcBNzQIhAO+1TG1Tiz8cY0A/wKY6WttlEGxawpyzNRV2f4TOU07J","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":23384},"exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"}},"gitHead":"61ccd63cbb97217eb47cd01d2fbe04a8e8e33509","scripts":{"build":"rm -rf dist && tsc"},"_npmUser":{"name":"azguardwallet","email":"hello@azguardwallet.io"},"repository":{"url":"git+https://github.com/AzguardWallet/aztec-wallet.git","type":"git"},"_npmVersion":"10.8.2","description":"Azguard Wallet client fully compatible with Aztec.js' Wallet interface","directories":{},"_nodeVersion":"20.19.5","dependencies":{"zod":"^3.23.8","@aztec/stdlib":"3.0.0-devnet.5","@aztec/aztec.js":"3.0.0-devnet.5","@aztec/foundation":"3.0.0-devnet.5","@aztec/entrypoints":"3.0.0-devnet.5","@azguardwallet/types":"0.6.0","@azguardwallet/client":"0.6.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/aztec-wallet_3.0.0-devnet.5_1762982009915_0.8081808233336183","host":"s3://npm-registry-packages-npm-production"}},"3.0.0-devnet.20251212":{"name":"@azguardwallet/aztec-wallet","version":"3.0.0-devnet.20251212","author":{"name":"Azguard Wallet"},"license":"MIT","_id":"@azguardwallet/aztec-wallet@3.0.0-devnet.20251212","maintainers":[{"name":"azguardwallet","email":"hello@azguardwallet.io"}],"homepage":"https://github.com/AzguardWallet/aztec-wallet","bugs":{"url":"https://github.com/AzguardWallet/aztec-wallet/issues"},"dist":{"shasum":"040b4ae907f505e8f6509d75df44a0272d86bfcb","tarball":"https://registry.npmjs.org/@azguardwallet/aztec-wallet/-/aztec-wallet-3.0.0-devnet.20251212.tgz","fileCount":11,"integrity":"sha512-ebihwqshU/AoY/EW+OtcMaY6or97QWYUvfO4wTTZTD+5/WvGAUz866Rled5b7FtS9UWSRE6puyMeRD9GqZaqJQ==","signatures":[{"sig":"MEUCIHEvblhLattjxEN/pUO92xit3z2wjAwz1YuHot+1bRrkAiEA0MCifzVWRZn8n8YoXJlKWaH+FYz0Yjj/EwmsaVj685M=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":23889},"exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"}},"gitHead":"283267d5874d94c7fd28bcc34006157ccdf1a954","scripts":{"build":"rm -rf dist && tsc"},"_npmUser":{"name":"azguardwallet","email":"hello@azguardwallet.io"},"repository":{"url":"git+https://github.com/AzguardWallet/aztec-wallet.git","type":"git"},"_npmVersion":"10.8.2","description":"Azguard Wallet client fully compatible with Aztec.js' Wallet interface","directories":{},"_nodeVersion":"20.19.6","dependencies":{"zod":"^3.23.8","@aztec/stdlib":"3.0.0-devnet.20251212","@aztec/aztec.js":"3.0.0-devnet.20251212","@aztec/foundation":"3.0.0-devnet.20251212","@aztec/entrypoints":"3.0.0-devnet.20251212","@azguardwallet/types":"0.7.0","@azguardwallet/client":"0.7.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/aztec-wallet_3.0.0-devnet.20251212_1767340108182_0.9496932580223876","host":"s3://npm-registry-packages-npm-production"}},"4.0.0-devnet.2-patch.2":{"name":"@azguardwallet/aztec-wallet","version":"4.0.0-devnet.2-patch.2","author":{"name":"Azguard Wallet"},"license":"MIT","_id":"@azguardwallet/aztec-wallet@4.0.0-devnet.2-patch.2","maintainers":[{"name":"azguardwallet","email":"hello@azguardwallet.io"}],"homepage":"https://github.com/AzguardWallet/aztec-wallet","bugs":{"url":"https://github.com/AzguardWallet/aztec-wallet/issues"},"dist":{"shasum":"f6578be59ecb16b6e6801d8715bee274736cb803","tarball":"https://registry.npmjs.org/@azguardwallet/aztec-wallet/-/aztec-wallet-4.0.0-devnet.2-patch.2.tgz","fileCount":11,"integrity":"sha512-heOBBTkkMP+mevYVCDkU0LeuZtwjrtZNrOgPaBPOmgpUcCausaeNXvX/d/GzJtB+ypJyOFNd6Wtg0Jh9rhcqRg==","signatures":[{"sig":"MEQCIBoAldxZ0XSLpf/gMLADpUeCNVvXEou86Cy+jdaEbEAIAiAdV2rK9ooBah8Be4aVj4cu9Fr+VVz1F4hLm3d36Oe0Wg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":28795},"exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"}},"gitHead":"c3f813b66c748dd7d6928c0312db6a4776623897","scripts":{"build":"rm -rf dist && tsc"},"_npmUser":{"name":"azguardwallet","email":"hello@azguardwallet.io"},"repository":{"url":"git+https://github.com/AzguardWallet/aztec-wallet.git","type":"git"},"_npmVersion":"10.8.2","description":"Azguard Wallet client fully compatible with Aztec.js' Wallet interface","directories":{},"_nodeVersion":"20.20.0","dependencies":{"zod":"^3.23.8","@aztec/stdlib":"4.0.0-devnet.2-patch.2","@aztec/aztec.js":"4.0.0-devnet.2-patch.2","@aztec/foundation":"4.0.0-devnet.2-patch.2","@aztec/entrypoints":"4.0.0-devnet.2-patch.2","@azguardwallet/types":"0.8.0","@azguardwallet/client":"0.8.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/aztec-wallet_4.0.0-devnet.2-patch.2_1772213275708_0.07343933177176742","host":"s3://npm-registry-packages-npm-production"}},"4.1.0-rc.4":{"name":"@azguardwallet/aztec-wallet","version":"4.1.0-rc.4","description":"Azguard Wallet client fully compatible with Aztec.js' Wallet interface","author":{"name":"Azguard Wallet"},"homepage":"https://github.com/AzguardWallet/aztec-wallet","repository":{"type":"git","url":"git+https://github.com/AzguardWallet/aztec-wallet.git"},"license":"MIT","exports":{".":{"default":"./dist/index.js","types":"./dist/index.d.ts"}},"scripts":{"build":"rm -rf dist && tsc"},"dependencies":{"@azguardwallet/client":"0.9.0","@azguardwallet/types":"0.9.0","@aztec/aztec.js":"4.1.0-rc.4","@aztec/entrypoints":"4.1.0-rc.4","@aztec/foundation":"4.1.0-rc.4","@aztec/stdlib":"4.1.0-rc.4","zod":"^3.23.8"},"_id":"@azguardwallet/aztec-wallet@4.1.0-rc.4","gitHead":"972163663256184a5651694b2c7e60cf256df1e7","bugs":{"url":"https://github.com/AzguardWallet/aztec-wallet/issues"},"_nodeVersion":"20.20.1","_npmVersion":"10.8.2","dist":{"integrity":"sha512-eb02Iz/GJPtpU10c0V8sOvPP/JqPOuT54Lh4ulmRunB6xoHeFwaCaejf+EJqt1d2utBQvbJZB8PGFadntyKduA==","shasum":"26031b314c67dc88e08af9795b1caef2f65f7a50","tarball":"https://registry.npmjs.org/@azguardwallet/aztec-wallet/-/aztec-wallet-4.1.0-rc.4.tgz","fileCount":11,"unpackedSize":29179,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIBa9LvnC2BWPRf3rh2w4r23hVKGoUalZuy/yz5YqCVuEAiEAtHRT2o3P+zBaM/jxoybDUEXxKjsbnzv3GCZt2v9YR4w="}]},"_npmUser":{"name":"azguardwallet","email":"hello@azguardwallet.io"},"directories":{},"maintainers":[{"name":"azguardwallet","email":"hello@azguardwallet.io"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/aztec-wallet_4.1.0-rc.4_1774016272360_0.8343418959061759"},"_hasShrinkwrap":false}},"time":{"created":"2025-10-07T12:08:11.140Z","modified":"2026-03-20T14:17:52.589Z","2.0.3":"2025-10-07T12:08:11.443Z","3.0.0-devnet.5":"2025-11-12T21:13:30.101Z","3.0.0-devnet.20251212":"2026-01-02T07:48:28.345Z","4.0.0-devnet.2-patch.2":"2026-02-27T17:27:55.846Z","4.1.0-rc.4":"2026-03-20T14:17:52.501Z"},"bugs":{"url":"https://github.com/AzguardWallet/aztec-wallet/issues"},"author":{"name":"Azguard Wallet"},"license":"MIT","homepage":"https://github.com/AzguardWallet/aztec-wallet","repository":{"type":"git","url":"git+https://github.com/AzguardWallet/aztec-wallet.git"},"description":"Azguard Wallet client fully compatible with Aztec.js' Wallet interface","maintainers":[{"name":"azguardwallet","email":"hello@azguardwallet.io"}],"readme":"# @azguardwallet/aztec-wallet\n\n[![GitHub License](https://img.shields.io/github/license/AzguardWallet/aztec-wallet)](https://github.com/AzguardWallet/aztec-wallet/blob/main/LICENSE)\n[![NPM Version](https://img.shields.io/npm/v/@azguardwallet/aztec-wallet)](https://www.npmjs.com/package/@azguardwallet/aztec-wallet)\n[![NPM Downloads](https://img.shields.io/npm/dt/@azguardwallet/aztec-wallet)](https://www.npmjs.com/package/@azguardwallet/aztec-wallet)\n\nAzguard Wallet client fully compatible with Aztec.js' `Wallet` interface, enabling seamless integration.\n\n## How to use\n\nInstall the package:\n\n```shell\nnpm install @azguardwallet/aztec-wallet\n```\n\nConnect the wallet:\n\n```js\nimport { AztecWallet } from \"@azguardwallet/aztec-wallet\";\n\n// the simplest way\nconst wallet = await AztecWallet.connect();\n\n// or you can additionally provide the dapp metadata and the chain\nconst wallet = await AztecWallet.connect(\n    {\n        name: \"My Dapp\",\n        description: \"The best dapp in the world\",\n        logo: \"...\",\n        url: \"...\"\n    },\n    \"devnet\" // or \"sandbox\", or CAIP-string like \"aztec:604129785\"\n);\n```\n\nThen use this `wallet` for interaction with Aztec.js:\n\n```js\nimport { AztecAddress } from '@aztec/aztec.js/addresses';\nimport { SponsoredFeePaymentMethod } from '@aztec/aztec.js/fee';\nimport { createAztecNodeClient } from '@aztec/aztec.js/node';\nimport { TokenContract, TokenContractArtifact } from '@aztec/noir-contracts.js/Token';\n\nconst accounts = await wallet.getAccounts();\nconst address = accounts[0].item;\n\nconst tokenAddress = AztecAddress.fromString(\"0x...\");\nconst tokenContract = TokenContract.at(tokenAddress, wallet);\n\n// register token contract in user's PXE\n\nconst node = createAztecNodeClient(\"https://next.devnet.aztec-labs.com\");\nconst tokenInstance = await node.getContract(tokenAddress);\nawait wallet.registerContract(tokenInstance, TokenContractArtifact);\n\n// get token private balance\n\nconst prvBalance = await tokenContract.methods\n    .balance_of_private(address)\n    .simulate({from: address});\n\nconsole.log(\"Private balance\", prvBalance);\n\n// get token public balance\n\nconst pubBalance = await tokenContract.methods\n    .balance_of_public(address)\n    .simulate({from: address});\n\nconsole.log(\"Public balance\", pubBalance);\n\n// send token\n\nconst feeOptions = {\n    paymentMethod: new SponsoredFeePaymentMethod(\n        AztecAddress.fromString(\"0x...\"),\n    ),\n};\n\nconst txReceipt = await tokenContract.methods\n    .transfer(AztecAddress.fromString(\"0x...\"), 100000000n)\n    .send({from: address, fee: feeOptions});\n\nconsole.log(\"Tx hash\", txReceipt.txHash);\n```\n\nThat's pretty much it! See more Aztec.js examples at https://docs.aztec.network.\n\n## Connection state\n\nWhen Azguard user confirms connection from a dapp (`AztecWallet.connect()`), a dapp session is opened, and while this session is active, the dapp is allowed to interact with the wallet. If the dapp session is expired or closed (either by the dapp or by the user), the interaction is no longer allowed.\n\nEven though the `AztecWallet` client reconnects automatically, you might want to additionally track the connection state. You can do the following:\n\n```js\n// connect the wallet\n// (it's lazily called under the hood, so you don't have to call it manually,\n// unless you want to connect immediately)\nawait wallet.connect();\n\n// check if the wallet is connected\nconsole.log(wallet.connected);\n\n// track connection/disconnection events\nwallet.onConnected.addHandler(() => console.log(\"Azguard connected\"));\nwallet.onDisconnected.addHandler(() => console.log(\"Azguard disconnected\"));\n\n// in the end you can disconnect and close the session\nawait wallet.disconnect();\n```\n\n## Support channels\n\nIf you have any questions, feel free to contact us in:\n- Telegram: https://t.me/azguardwallet\n- Twitter: https://twitter.com/AzguardWallet\n\nCheers! 🍺\n","readmeFilename":"README.md"}