{"_id":"@cashconnect-js/wallet","_rev":"4-f5f3c904119ae9d2e8f9b6bd1fa44d8b","name":"@cashconnect-js/wallet","dist-tags":{"latest":"1.0.0-alpha.4"},"versions":{"1.0.0-alpha.1":{"name":"@cashconnect-js/wallet","version":"1.0.0-alpha.1","keywords":[],"author":"","license":"MIT","_id":"@cashconnect-js/wallet@1.0.0-alpha.1","maintainers":[{"name":"jimtendo","email":"zuccon@gmail.com"}],"homepage":"https://gitlab.com/cashconnect-js/cashconnect-js","bugs":{"url":"https://gitlab.com/cashconnect-js/cashconnect-js/-/issues"},"dist":{"shasum":"0162bf3b03728edce6b5269b23e341d2f993c334","tarball":"https://registry.npmjs.org/@cashconnect-js/wallet/-/wallet-1.0.0-alpha.1.tgz","fileCount":5,"integrity":"sha512-pdkdwLBPy4NWWT1B58A0Tx4KZOwSjb+Z0Spy6ERzZyoRnxzrYZ3PyrGz8E45ytRZCBeLKpROOZyL1vz1f5Juyw==","signatures":[{"sig":"MEQCIBaB6Tjva4f+vgeE/ySHvj2uSn0nSjY9bIP3ZHyhtz/tAiAD/ZWRCPp1VUp3ta2+wjgRueYKoz0i18sKkC7XuQxVXg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":64529},"type":"module","types":"dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs.js","require":"./dist/index.cjs.js"}},"gitHead":"f8b90b7af5a157e6e83d4b6b6efa82c67a173529","scripts":{"dev":"tsx watch ./src/app.ts","lint":"eslint --ext .js,.ts,.vue ./","test":"vitest --run","build":"npm run clean && npm run compile && npm run rollup","clean":"rm -rf ./build && rm -rf ./dist","start":"npm run clean && tsc-watch --onSuccess \"npm run build\"","format":"prettier --write \"**/*.{js,ts,vue,scss,html,md,json}\" --ignore-path .gitignore","rollup":"rollup -c","compile":"tsc -p tsconfig.build.json","lint:fix":"eslint --fix --ext .js,.ts,.vue ./","test:watch":"vitest","test:coverage":"vitest run --coverage","prepublishOnly":"npm run build"},"_npmUser":{"name":"jimtendo","email":"zuccon@gmail.com"},"repository":{"url":"git+https://gitlab.com/cashconnect-js/cashconnect-js.git","type":"git"},"_npmVersion":"10.9.7","description":"A WalletConnect implementation that uses CashRPC payloads and methods.","directories":{},"_nodeVersion":"22.22.2","dependencies":{"@bitauth/libauth":"^3.1.0-next.2","@reown/walletkit":"^1.2.10","@walletconnect/core":"^2.21.8","@cashconnect-js/core":"1.0.0-alpha.1","@walletconnect/sign-client":"^2.23.0"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"^8.10.0","rollup":"^3.29.2","vitest":"^3.2.4","prettier":"^2.5.1","tsc-watch":"^6.0.4","typescript":"^5.9.3","rollup-plugin-dts":"^6.0.2","@walletconnect/types":"^2.23.0","eslint-config-prettier":"^8.1.0","@typescript-eslint/parser":"^6.3.0","@typescript-eslint/eslint-plugin":"^6.3.0"},"_npmOperationalInternal":{"tmp":"tmp/wallet_1.0.0-alpha.1_1776253182420_0.8194086552579452","host":"s3://npm-registry-packages-npm-production"}},"1.0.0-alpha.2":{"name":"@cashconnect-js/wallet","version":"1.0.0-alpha.2","keywords":[],"author":"","license":"MIT","_id":"@cashconnect-js/wallet@1.0.0-alpha.2","maintainers":[{"name":"jimtendo","email":"zuccon@gmail.com"}],"homepage":"https://gitlab.com/cashconnect-js/cashconnect-js","bugs":{"url":"https://gitlab.com/cashconnect-js/cashconnect-js/-/issues"},"dist":{"shasum":"7bd287224adbb5f5b6c01ee7278bf40ec3b755e2","tarball":"https://registry.npmjs.org/@cashconnect-js/wallet/-/wallet-1.0.0-alpha.2.tgz","fileCount":5,"integrity":"sha512-UURFiNo8/oFjJmKe2QHotSvlqFjCT83K8xu6M/7uSzGPeT3DDN6JZBIkMJE7Km6cbZylMsK5kfAt0h6rQnxKog==","signatures":[{"sig":"MEQCIAUOOfszsP5da5a5tnOYH/ImGFBbqM1g3o+a3UN3OkDQAiB6s8ukVA9a05U7WLfCOKBdHuil3k20oAmvWFzSO3/F1A==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":64529},"type":"module","types":"dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs.js","require":"./dist/index.cjs.js"}},"gitHead":"d16bb2e845e90425cf71b66ca3597d8b4ffcb6c8","scripts":{"dev":"tsx watch ./src/app.ts","lint":"eslint --ext .js,.ts,.vue ./","test":"vitest --run","build":"npm run clean && npm run compile && npm run rollup","clean":"rm -rf ./build && rm -rf ./dist","start":"npm run clean && tsc-watch --onSuccess \"npm run build\"","format":"prettier --write \"**/*.{js,ts,vue,scss,html,md,json}\" --ignore-path .gitignore","rollup":"rollup -c","compile":"tsc -p tsconfig.build.json","lint:fix":"eslint --fix --ext .js,.ts,.vue ./","test:watch":"vitest","test:coverage":"vitest run --coverage","prepublishOnly":"npm run build"},"_npmUser":{"name":"jimtendo","email":"zuccon@gmail.com"},"repository":{"url":"git+https://gitlab.com/cashconnect-js/cashconnect-js.git","type":"git"},"_npmVersion":"10.9.7","description":"A WalletConnect implementation that uses CashRPC payloads and methods.","directories":{},"_nodeVersion":"22.22.2","dependencies":{"@bitauth/libauth":"^3.1.0-next.2","@reown/walletkit":"^1.2.10","@walletconnect/core":"^2.21.8","@cashconnect-js/core":"1.0.0-alpha.2","@walletconnect/sign-client":"^2.23.0"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"^8.10.0","rollup":"^3.29.2","vitest":"^3.2.4","prettier":"^2.5.1","tsc-watch":"^6.0.4","typescript":"^5.9.3","rollup-plugin-dts":"^6.0.2","@walletconnect/types":"^2.23.0","eslint-config-prettier":"^8.1.0","@typescript-eslint/parser":"^6.3.0","@typescript-eslint/eslint-plugin":"^6.3.0"},"_npmOperationalInternal":{"tmp":"tmp/wallet_1.0.0-alpha.2_1776257447317_0.4446435555078614","host":"s3://npm-registry-packages-npm-production"}},"1.0.0-alpha.3":{"name":"@cashconnect-js/wallet","version":"1.0.0-alpha.3","keywords":[],"author":"","license":"MIT","_id":"@cashconnect-js/wallet@1.0.0-alpha.3","maintainers":[{"name":"jimtendo","email":"zuccon@gmail.com"}],"homepage":"https://gitlab.com/cashconnect-js/cashconnect-js","bugs":{"url":"https://gitlab.com/cashconnect-js/cashconnect-js/-/issues"},"dist":{"shasum":"80528e0073ede300464cb45d6304a418605bfd15","tarball":"https://registry.npmjs.org/@cashconnect-js/wallet/-/wallet-1.0.0-alpha.3.tgz","fileCount":5,"integrity":"sha512-AhYdPrepvzQ0N2JoSkm/LRW8ege25eUHiN+ofMGM2hf+yO2xYrP/uVuGVzxV7TwARRfQpS8CyO6tnFCkAjVmNg==","signatures":[{"sig":"MEUCIETqV0zeYgfnVhJla+ZcLvrw7Fge7knOG+SsxKU9WgZZAiEAwlkCem25HbOBLWJVT5FxVTraRboKy81/45k8TplqxY8=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":64529},"type":"module","types":"dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs.js","require":"./dist/index.cjs.js"}},"gitHead":"e076e62c5ce40df1bf5b739f0bdb52ffaa6fbe51","scripts":{"dev":"tsx watch ./src/app.ts","lint":"eslint --ext .js,.ts,.vue ./","test":"vitest --run","build":"npm run clean && npm run compile && npm run rollup","clean":"rm -rf ./build && rm -rf ./dist","start":"npm run clean && tsc-watch --onSuccess \"npm run build\"","format":"prettier --write \"**/*.{js,ts,vue,scss,html,md,json}\" --ignore-path .gitignore","rollup":"rollup -c","compile":"tsc -p tsconfig.build.json","lint:fix":"eslint --fix --ext .js,.ts,.vue ./","test:watch":"vitest","test:coverage":"vitest run --coverage","prepublishOnly":"npm run build"},"_npmUser":{"name":"jimtendo","email":"zuccon@gmail.com"},"repository":{"url":"git+https://gitlab.com/cashconnect-js/cashconnect-js.git","type":"git"},"_npmVersion":"10.9.7","description":"A WalletConnect implementation that uses CashRPC payloads and methods.","directories":{},"_nodeVersion":"22.22.2","dependencies":{"@bitauth/libauth":"^3.1.0-next.2","@reown/walletkit":"^1.2.10","@walletconnect/core":"^2.21.8","@cashconnect-js/core":"1.0.0-alpha.3","@walletconnect/sign-client":"^2.23.0"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"^8.10.0","rollup":"^3.29.2","vitest":"^3.2.4","prettier":"^2.5.1","tsc-watch":"^6.0.4","typescript":"^5.9.3","rollup-plugin-dts":"^6.0.2","@walletconnect/types":"^2.23.0","eslint-config-prettier":"^8.1.0","@typescript-eslint/parser":"^6.3.0","@typescript-eslint/eslint-plugin":"^6.3.0"},"_npmOperationalInternal":{"tmp":"tmp/wallet_1.0.0-alpha.3_1776263643173_0.09403165236448974","host":"s3://npm-registry-packages-npm-production"}},"1.0.0-alpha.4":{"name":"@cashconnect-js/wallet","type":"module","version":"1.0.0-alpha.4","description":"A WalletConnect implementation that uses CashRPC payloads and methods.","types":"dist/index.d.ts","exports":{".":{"import":"./dist/index.mjs.js","require":"./dist/index.cjs.js","types":"./dist/index.d.ts"}},"scripts":{"build":"npm run clean && npm run compile && npm run rollup","clean":"rm -rf ./build && rm -rf ./dist","compile":"tsc -p tsconfig.build.json","rollup":"rollup -c","start":"npm run clean && tsc-watch --onSuccess \"npm run build\"","dev":"tsx watch ./src/app.ts","lint":"eslint --ext .js,.ts,.vue ./","lint:fix":"eslint --fix --ext .js,.ts,.vue ./","format":"prettier --write \"**/*.{js,ts,vue,scss,html,md,json}\" --ignore-path .gitignore","prepublishOnly":"npm run build","test":"vitest --run","test:coverage":"vitest run --coverage","test:watch":"vitest"},"repository":{"type":"git","url":"git+https://gitlab.com/cashconnect-js/cashconnect-js.git"},"bugs":{"url":"https://gitlab.com/cashconnect-js/cashconnect-js/-/issues"},"homepage":"https://gitlab.com/cashconnect-js/cashconnect-js","keywords":[],"author":"","license":"MIT","devDependencies":{"@typescript-eslint/eslint-plugin":"^6.3.0","@typescript-eslint/parser":"^6.3.0","@walletconnect/types":"^2.23.0","eslint":"^8.10.0","eslint-config-prettier":"^8.1.0","prettier":"^2.5.1","rollup":"^3.29.2","rollup-plugin-dts":"^6.0.2","tsc-watch":"^6.0.4","typescript":"^5.9.3","vitest":"^3.2.4"},"dependencies":{"@bitauth/libauth":"^3.1.0-next.2","@cashconnect-js/core":"1.0.0-alpha.4","@reown/walletkit":"^1.2.10","@walletconnect/core":"^2.21.8","@walletconnect/sign-client":"^2.23.0"},"_id":"@cashconnect-js/wallet@1.0.0-alpha.4","gitHead":"0273cc20d196504e06b397d54c47e1b47ec080f0","_nodeVersion":"22.22.2","_npmVersion":"10.9.7","dist":{"integrity":"sha512-txn5XS8IqmPV2AnyzcgSsl7EBoNOXyvdue1qvwCMc0hlFakzo1LA2JZYBtXZ87DQHkC66LPsNzPxHvqklsLVnA==","shasum":"b71164444b764b7f3cd81a29f160997e7ac33075","tarball":"https://registry.npmjs.org/@cashconnect-js/wallet/-/wallet-1.0.0-alpha.4.tgz","fileCount":5,"unpackedSize":64525,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDYOXbTwPXAeQJPL3+QF/fflAT/tAn/wsUdT5tfIFA5mAIgCuNxJhla3RdP4cG9LfS4tkCD5GZAFavZsml4ZF+t2HA="}]},"_npmUser":{"name":"jimtendo","email":"zuccon@gmail.com"},"directories":{},"maintainers":[{"name":"jimtendo","email":"zuccon@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/wallet_1.0.0-alpha.4_1777606420383_0.7923449249034336"},"_hasShrinkwrap":false}},"time":{"created":"2026-04-15T11:39:42.343Z","modified":"2026-05-01T03:33:40.658Z","1.0.0-alpha.1":"2026-04-15T11:39:42.552Z","1.0.0-alpha.2":"2026-04-15T12:50:47.687Z","1.0.0-alpha.3":"2026-04-15T14:34:03.344Z","1.0.0-alpha.4":"2026-05-01T03:33:40.526Z"},"bugs":{"url":"https://gitlab.com/cashconnect-js/cashconnect-js/-/issues"},"license":"MIT","homepage":"https://gitlab.com/cashconnect-js/cashconnect-js","keywords":[],"repository":{"type":"git","url":"git+https://gitlab.com/cashconnect-js/cashconnect-js.git"},"description":"A WalletConnect implementation that uses CashRPC payloads and methods.","maintainers":[{"name":"jimtendo","email":"zuccon@gmail.com"}],"readme":"# CashConnect\n\nA WalletConnect implementation that uses CashRPC payloads and methods.\n\n## Dapp Integration\n\nTODO\n\n## Wallet Integration\n\n```ts\n// Instantiate an instance of the Cash Connect Wallet Service.\nconst cashConnectWallet = new CashConnectWallet(\n  // Master Private Key\n  // NOTE: Each service will derive its own \"sandboxed\" key for use using:\n  //       sha256(sha256(masterPrivateKey) + sha256(':cashconnect:' + domain));\n  privateKey,\n  // WC Project ID\n  projectId,\n  // WC Metadata\n  metadata,\n  // UI Event callbacks.\n  // NOTE: Throw an exception to reject approval.\n  {\n    onSessionProposal: async (proposalEvent) => {\n      // TODO: Display the proposal and request approval.\n    },\n    onSessionsUpdated: async (sessions) => {\n      // TODO: Update UI to show active sessions.\n    },\n    onRPCRequest: async (session, request, response) => {\n      // TODO: Display the request and request approval.\n    },\n    onError: async (error) => {\n      // TODO: Display the error.\n    }\n  },\n  // CashRPC Options/Hooks\n  {\n    // Network-related\n    network: {\n      getSourceOutput: (transactionHash, outpointIndex) {\n        // TODO: Retrieve source output from Network (e.g. Electrum).\n\n        // Expects LibAuth Output.\n        return {\n          valueSatoshis: 1000n,\n          lockingBytecode: new Uint8Array(),\n          token: {\n            category: new Uint8Array();\n            amount: 1000n,\n          }\n        }\n      }\n    },\n    // Wallet-related\n    wallet: {\n      // Get a list of unspents (UTXOs) belonging to the wallet.\n      getUnspents: () => {\n        // TODO: Retrieve a list of UTXOs from Network or Wallet-state.\n\n        // Return an array of these unspents.\n        // NOTE: Each UTXO MUST use a template for the unlocking script.\n        return [{\n          outpointTransactionHash: utxo.txid,\n          outpointIndex: utxo.vout,\n          lockingBytecode: utxo.lockingBytecode,\n          unlockingBytecode: {\n            template: authenticationTemplateP2pkhNonHd,\n            valueSatoshis: utxo.valueSatoshis,\n            script: 'unlock',\n            data: {\n              keys: {\n                privateKeys: {\n                  key: walletsPrivateKey,\n                },\n              },\n            },\n            token,\n          }\n        }]\n      },\n      // Get the change template to when constructing Change Outputs.\n      getChangeTemplate: () => {\n        return {\n          template: authenticationTemplateP2pkhNonHd,\n          data: {\n            keys: {\n              privateKeys: {\n                key: walletsPrivateKey\n              }\n            }\n          }\n        }\n      }\n    }\n  }\n);\n\n// Start the Wallet Service.\nawait cashConnectWallet.start();\n```\n\nFor an example Wallet Integration, see the [Cashonize Repository](https://github.com/developers-cash/cashonize/blob/cashconnect/cash-connect.js).\n","readmeFilename":"README.md"}