{"_id":"@bbachain/mobile-wallet-adapter-protocol","_rev":"3-105d5d64a99f696f9f454584640b8308","name":"@bbachain/mobile-wallet-adapter-protocol","dist-tags":{"latest":"0.1.4"},"versions":{"0.1.0":{"name":"@bbachain/mobile-wallet-adapter-protocol","version":"0.1.0","author":{"name":"BBAChain Labs","email":"developers@bbachain.com"},"license":"Apache-2.0","_id":"@bbachain/mobile-wallet-adapter-protocol@0.1.0","maintainers":[{"name":"bbachain123","email":"bbachain123@gmail.com"},{"name":"peternock","email":"peternock195@gmail.com"},{"name":"bba-maintainer","email":"maintainer@bbachain.com"},{"name":"philipjames","email":"philip@btigroup.ee"}],"homepage":"https://github.com/bbachain/mobile-wallet-adapter#readme","bugs":{"url":"https://github.com/bbachain/mobile-wallet-adapter/issues"},"dist":{"shasum":"7031e042cda0b7002fa740d26579d82b34e727a4","tarball":"https://registry.npmjs.org/@bbachain/mobile-wallet-adapter-protocol/-/mobile-wallet-adapter-protocol-0.1.0.tgz","fileCount":28,"integrity":"sha512-aOBv+6FRTUjfIvQf2U97skzrVWIos84YU6TWEi91H3WmyZTeteGuOl+Ss6b8rSuzho+d46wYJeXHVlVVu0RLTA==","signatures":[{"sig":"MEYCIQCdTfziCQ9Vpgo7mmEzft4xXVutP2VdIy+MBpWMkuOVcAIhAIhkEUYZBhETVOK1gUK81BactBa2zZuZTiRNRTFSa2CR","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":343590},"main":"lib/cjs/index.js","type":"module","types":"lib/types/index.d.ts","module":"lib/esm/index.js","browser":{"./lib/cjs/index.js":"./lib/cjs/index.browser.js","./lib/esm/index.js":"./lib/esm/index.browser.js"},"exports":{".":{"types":"./lib/types/index.d.ts","import":"./lib/esm/index.js","require":"./lib/cjs/index.js"},"./package.json":"./package.json"},"gitHead":"cc4e44a4ef9d008179b85f1f754da3a2ec8c6d86","scripts":{"build":"yarn clean && rollup --config ../../rollup.config.ts --configPlugin rollup-plugin-ts","clean":"shx rm -rf lib/*","postbuild":"cross-env echo {\\\"type\\\":\\\"commonjs\\\"} | npx json > lib/cjs/package.json && echo {\\\"type\\\":\\\"module\\\"} | npx json > lib/esm/package.json","build:watch":"yarn clean && rollup --config ../../rollup.config.ts --configPlugin rollup-plugin-ts --watch","prepublishOnly":"agadoo"},"_npmUser":{"name":"philipjames","email":"philip@btigroup.ee"},"repository":{"url":"git+https://github.com/bbachain/mobile-wallet-adapter.git","type":"git"},"_npmVersion":"10.8.2","description":"An implementation of the BBAChain Mobile Wallet Adapter protocol. Use this to open a session with a mobile wallet app, and to issue API calls to it.","directories":{},"sideEffects":false,"_nodeVersion":"20.18.1","dependencies":{"js-base64":"^3.7.5","@wallet-standard/core":"^1.0.3","@bbachain/wallet-standard":"^0.1.0","@bbachain/wallet-standard-util":"^0.1.0"},"react-native":"lib/cjs/index.native.js","codegenConfig":{"name":"SolanaMobileWalletAdapter","type":"all","android":{"javaPackageName":"com.solanamobile.mobilewalletadapter.reactnative"},"jsSrcsDir":"./src/codegenSpec"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"shx":"^0.3.4","agadoo":"^3.0.0","cross-env":"^7.0.3","@bbachain/web3.js":"^1.1.3","@types/react-native":"^0.69.3"},"peerDependencies":{"react-native":">0.69","@bbachain/web3.js":"^1.1.3"},"_npmOperationalInternal":{"tmp":"tmp/mobile-wallet-adapter-protocol_0.1.0_1739813721363_0.5799853458385222","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@bbachain/mobile-wallet-adapter-protocol","version":"0.1.1","author":{"name":"BBAChain Labs","email":"developers@bbachain.com"},"license":"Apache-2.0","_id":"@bbachain/mobile-wallet-adapter-protocol@0.1.1","maintainers":[{"name":"bbachain123","email":"bbachain123@gmail.com"},{"name":"peternock","email":"peternock195@gmail.com"},{"name":"bba-maintainer","email":"maintainer@bbachain.com"},{"name":"philipjames","email":"philip@btigroup.ee"}],"homepage":"https://github.com/bbachain/mobile-wallet-adapter#readme","bugs":{"url":"https://github.com/bbachain/mobile-wallet-adapter/issues"},"dist":{"shasum":"1555df8069e60fac9b19cc8f9d68336bb95c2bdc","tarball":"https://registry.npmjs.org/@bbachain/mobile-wallet-adapter-protocol/-/mobile-wallet-adapter-protocol-0.1.1.tgz","fileCount":28,"integrity":"sha512-emRcdnx9epClGDurMVedgyCjm6/3jZUUHtvsbXVAnRLArMahm2fXvCLkXzxr5CCjDjjmT8eCoDHBLoj6HzUMLQ==","signatures":[{"sig":"MEQCICa6sMNmfWgV44uS384QZzskKivmpbXiXD+OgTpma7KaAiBiuAkYmaSXn/tndvvEi4n2QLM4WWjIQFztYhdfYB8mdg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":342122},"main":"lib/cjs/index.js","type":"module","types":"lib/types/index.d.ts","module":"lib/esm/index.js","browser":{"./lib/cjs/index.js":"./lib/cjs/index.browser.js","./lib/esm/index.js":"./lib/esm/index.browser.js"},"exports":{".":{"types":"./lib/types/index.d.ts","import":"./lib/esm/index.js","require":"./lib/cjs/index.js"},"./package.json":"./package.json"},"gitHead":"cc4e44a4ef9d008179b85f1f754da3a2ec8c6d86","scripts":{"build":"yarn clean && rollup --config ../../rollup.config.ts --configPlugin rollup-plugin-ts","clean":"shx rm -rf lib/*","postbuild":"cross-env echo {\\\"type\\\":\\\"commonjs\\\"} | npx json > lib/cjs/package.json && echo {\\\"type\\\":\\\"module\\\"} | npx json > lib/esm/package.json","build:watch":"yarn clean && rollup --config ../../rollup.config.ts --configPlugin rollup-plugin-ts --watch","prepublishOnly":"agadoo"},"_npmUser":{"name":"philipjames","email":"philip@btigroup.ee"},"repository":{"url":"git+https://github.com/bbachain/mobile-wallet-adapter.git","type":"git"},"_npmVersion":"10.8.2","description":"An implementation of the BBAChain Mobile Wallet Adapter protocol. Use this to open a session with a mobile wallet app, and to issue API calls to it.","directories":{},"sideEffects":false,"_nodeVersion":"20.18.1","dependencies":{"js-base64":"^3.7.5","@wallet-standard/core":"^1.0.3","@bbachain/wallet-standard":"^0.1.0","@bbachain/wallet-standard-util":"^0.1.0"},"react-native":"lib/cjs/index.native.js","codegenConfig":{"name":"SolanaMobileWalletAdapter","type":"all","android":{"javaPackageName":"com.solanamobile.mobilewalletadapter.reactnative"},"jsSrcsDir":"./src/codegenSpec"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"shx":"^0.3.4","agadoo":"^3.0.0","cross-env":"^7.0.3","@bbachain/web3.js":"^1.1.3","@types/react-native":"^0.69.3"},"peerDependencies":{"react-native":">0.69","@bbachain/web3.js":"^1.1.3"},"_npmOperationalInternal":{"tmp":"tmp/mobile-wallet-adapter-protocol_0.1.1_1739816404918_0.8845509484752903","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"@bbachain/mobile-wallet-adapter-protocol","version":"0.1.2","author":{"name":"BBAChain Labs","email":"developers@bbachain.com"},"license":"Apache-2.0","_id":"@bbachain/mobile-wallet-adapter-protocol@0.1.2","maintainers":[{"name":"bbachain123","email":"bbachain123@gmail.com"},{"name":"peternock","email":"peternock195@gmail.com"},{"name":"bba-maintainer","email":"maintainer@bbachain.com"},{"name":"philipjames","email":"philip@btigroup.ee"}],"homepage":"https://github.com/bbachain/mobile-wallet-adapter#readme","bugs":{"url":"https://github.com/bbachain/mobile-wallet-adapter/issues"},"dist":{"shasum":"fa3ec3b6d0618beae64460a65dba23a8e1ce3be0","tarball":"https://registry.npmjs.org/@bbachain/mobile-wallet-adapter-protocol/-/mobile-wallet-adapter-protocol-0.1.2.tgz","fileCount":26,"integrity":"sha512-OBq1EHlk18kessJ24CxRzPSu1sFhsVMHRC1yRedUEAuluoWEyzvPwcYMD5i/T7ICeJVe8gi8OLsionN1KpF64g==","signatures":[{"sig":"MEUCIFtw++c16Cqa/gQKuo0NsvYZlT7MV8E7oEPfqPRzjh5kAiEAg9QOf4/9HRuhw3G25p33Oo3x6tzsZOlUeygF016Q4fc=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":287397},"main":"lib/cjs/index.js","type":"module","types":"lib/types/index.d.ts","module":"lib/esm/index.js","browser":{"./lib/cjs/index.js":"./lib/cjs/index.browser.js","./lib/esm/index.js":"./lib/esm/index.browser.js"},"exports":{".":{"import":"./lib/esm/index.js","require":"./lib/cjs/index.js"},"./package.json":"./package.json"},"gitHead":"877eb057e654c624768c093164b16656cbe1d77b","scripts":{"build":"yarn clean && rollup --config ../../rollup.config.ts --configPlugin rollup-plugin-ts","clean":"shx rm -rf lib/*","postbuild":"cross-env echo {\\\"type\\\":\\\"commonjs\\\"} | npx json > lib/cjs/package.json && echo {\\\"type\\\":\\\"module\\\"} | npx json > lib/esm/package.json","build:watch":"yarn clean && rollup --config ../../rollup.config.ts --configPlugin rollup-plugin-ts --watch"},"_npmUser":{"name":"philipjames","email":"philip@btigroup.ee"},"repository":{"url":"git+https://github.com/bbachain/mobile-wallet-adapter.git","type":"git"},"_npmVersion":"10.8.2","description":"An implementation of the BBAChain Mobile Mobile Wallet Adapter protocol. Use this to open a session with a mobile wallet app, and to issue API calls to it.","directories":{},"sideEffects":false,"_nodeVersion":"20.18.1","react-native":"lib/cjs/index.native.js","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"agadoo":"^2.0.0","cross-env":"^7.0.3","@bbachain/web3.js":"^1.1.3","@types/react-native":"^0.69.3","@wallet-standard/core":"^1.0.3","@bbachain/wallet-standard":"^0.1.2"},"peerDependencies":{"react-native":">0.69"},"_npmOperationalInternal":{"tmp":"tmp/mobile-wallet-adapter-protocol_0.1.2_1739904471254_0.6620073109421389","host":"s3://npm-registry-packages-npm-production"}},"0.1.4":{"name":"@bbachain/mobile-wallet-adapter-protocol","description":"An implementation of the BBAChain Mobile Mobile Wallet Adapter protocol. Use this to open a session with a mobile wallet app, and to issue API calls to it.","version":"0.1.4","author":{"name":"BBAChain Labs","email":"developers@bbachain.com"},"repository":{"type":"git","url":"git+https://github.com/bbachain/mobile-wallet-adapter.git"},"license":"Apache-2.0","type":"module","sideEffects":false,"main":"lib/cjs/index.js","react-native":"lib/cjs/index.native.js","module":"lib/esm/index.js","types":"lib/types/index.d.ts","browser":{"./lib/cjs/index.js":"./lib/cjs/index.browser.js","./lib/esm/index.js":"./lib/esm/index.browser.js"},"exports":{"./package.json":"./package.json",".":{"import":"./lib/esm/index.js","require":"./lib/cjs/index.js"}},"publishConfig":{"access":"public"},"scripts":{"clean":"shx rm -rf lib/*","build":"yarn clean && rollup --config ../../rollup.config.ts --configPlugin rollup-plugin-ts","build:watch":"yarn clean && rollup --config ../../rollup.config.ts --configPlugin rollup-plugin-ts --watch","postbuild":"cross-env echo {\\\"type\\\":\\\"commonjs\\\"} | npx json > lib/cjs/package.json && echo {\\\"type\\\":\\\"module\\\"} | npx json > lib/esm/package.json","prepublishOnly":"agadoo"},"dependencies":{"@bbachain/wallet-standard":"^0.1.2","@bbachain/wallet-standard-util":"^0.1.2","@wallet-standard/core":"^1.0.3","js-base64":"^3.7.5"},"devDependencies":{"@bbachain/web3.js":"^1.1.3","@types/react-native":"^0.69.3","agadoo":"^3.0.0","cross-env":"^7.0.3","shx":"^0.3.4"},"peerDependencies":{"@bbachain/web3.js":"^1.1.3","react-native":">0.69"},"codegenConfig":{"name":"SolanaMobileWalletAdapter","type":"all","jsSrcsDir":"./src/codegenSpec","android":{"javaPackageName":"com.solanamobile.mobilewalletadapter.reactnative"}},"_id":"@bbachain/mobile-wallet-adapter-protocol@0.1.4","gitHead":"e0cac5185baaded3f77307b3b91da7a6bf8f1cd2","bugs":{"url":"https://github.com/bbachain/mobile-wallet-adapter/issues"},"homepage":"https://github.com/bbachain/mobile-wallet-adapter#readme","_nodeVersion":"20.17.0","_npmVersion":"10.8.2","dist":{"integrity":"sha512-UZs7eUClvzt1wSPaBD18MVUY2SSx913FJaMoYdTR6tZfk7bEx9P99kwS4WOG79pUkgq2kMpQZkBjNoJRgTXVDQ==","shasum":"1abb6e469fc17683ea38929b87a9848c9acdfd55","tarball":"https://registry.npmjs.org/@bbachain/mobile-wallet-adapter-protocol/-/mobile-wallet-adapter-protocol-0.1.4.tgz","fileCount":28,"unpackedSize":342054,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDcgYSR4M6dQL+aMmO2NsIkHXxKNyHRdu2DgV8t5dGjvAIhAP+WsplX/uvYHTT8PSqhrOrhRrLmHkKOftxvHJXgvBuP"}]},"_npmUser":{"name":"philipjames","email":"philip@btigroup.ee"},"directories":{},"maintainers":[{"name":"bbachain123","email":"bbachain123@gmail.com"},{"name":"peternock","email":"peternock195@gmail.com"},{"name":"bba-maintainer","email":"maintainer@bbachain.com"},{"name":"philipjames","email":"philip@btigroup.ee"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/mobile-wallet-adapter-protocol_0.1.4_1739952831327_0.026923935700458923"},"_hasShrinkwrap":false}},"time":{"created":"2025-02-17T17:35:21.265Z","modified":"2025-02-19T08:13:51.796Z","0.1.0":"2025-02-17T17:35:21.628Z","0.1.1":"2025-02-17T18:20:05.184Z","0.1.2":"2025-02-18T18:47:51.473Z","0.1.4":"2025-02-19T08:13:51.569Z"},"bugs":{"url":"https://github.com/bbachain/mobile-wallet-adapter/issues"},"author":{"name":"BBAChain Labs","email":"developers@bbachain.com"},"license":"Apache-2.0","homepage":"https://github.com/bbachain/mobile-wallet-adapter#readme","repository":{"type":"git","url":"git+https://github.com/bbachain/mobile-wallet-adapter.git"},"description":"An implementation of the BBAChain Mobile Mobile Wallet Adapter protocol. Use this to open a session with a mobile wallet app, and to issue API calls to it.","maintainers":[{"name":"bbachain123","email":"bbachain123@gmail.com"},{"name":"peternock","email":"peternock195@gmail.com"},{"name":"bba-maintainer","email":"maintainer@bbachain.com"},{"name":"philipjames","email":"philip@btigroup.ee"}],"readme":"# `@solana-mobile/mobile-wallet-adapter-protocol`\n\nThis is a reference implementation of the [Mobile Wallet Adapter specification](https://github.com/solana-mobile/mobile-wallet-adapter/blob/main/spec/spec.md) in JavaScript. Use this to start a session with a mobile wallet in which you can issue API calls to it (eg. `sign_messages`) as per the spec.\n\nIf you are simply looking to integrate a JavaScript application with mobile wallets, see [`@solana-mobile/wallet-adapter-mobile`](https://www.npmjs.com/package/@solana-mobile/wallet-adapter-mobile) instead.\n\n## Learn how to use this API on our [documentation website](https://docs.solanamobile.com/):\n- React Native\n    - [Quickstart Setup](https://docs.solanamobile.com/react-native/quickstart)\n    - [dApp Integration Guide](https://docs.solanamobile.com/react-native/mwa_integration_rn)\n    - [Hello World Tutorial](https://docs.solanamobile.com/getting-started/hello_world_tutorial)\n- [Sample App Reference](https://docs.solanamobile.com/sample-apps/sample_app_overview)\n\n## Quick start\n\nUse this API to start a session:\n\n```typescript\nimport {transact} from '@solana-mobile/mobile-wallet-adapter-protocol';\n\nawait transact(async (wallet) => {\n    /* ... */\n});\n```\n\nThe callback you provide will be called once a session has been established with a wallet. It will recieve the `MobileWallet` API as an argument. You can call protocol-specified methods using this function. Whatever you return from this callback will be returned by `transact`.\n\n```typescript\nconst signedPayloads = await transact(async (wallet) => {\n    const {signed_payloads} = await wallet.signMessages({\n        auth_token,\n        payloads: [/* ... */],\n    });\n    return signed_payloads;\n});\n```\n\nThe wallet session will stay active until your callback returns. Typically, wallets will redirect back to your app once the session ends.\n\n## Exception handling\n\nYou can catch exceptions at any level. See `errors.ts` for a list of exceptions that might be thrown.\n\n```typescript\ntry {\n    await transact(async (wallet) => {\n        try {\n            await wallet.signTransactions(/* ... */);\n        } catch (e) {\n            if (\n                e instanceof SolanaMobileWalletAdapterProtocolError &&\n                e.code === SolanaMobileWalletAdapterProtocolErrorCode.ERROR_REAUTHORIZE\n            ) {\n                console.error('The auth token has gone stale');\n                await wallet.reauthorize({auth_token, identity});\n                // Retry...\n            }\n            throw e;\n        }\n    });\n} catch(e) {\n    if (\n        e instanceof SolanaMobileWalletAdapterError &&\n        e.code === SolanaMobileWalletAdapterErrorCode.ERROR_WALLET_NOT_FOUND\n    ) {\n        /* ... */\n    }\n    throw e;\n}\n```","readmeFilename":"README.md"}