{"_id":"@bbachain/wallet-adapter-mobile","_rev":"3-0c0e683db0f05c4f84d852195ef38a9b","name":"@bbachain/wallet-adapter-mobile","dist-tags":{"latest":"0.1.4"},"versions":{"0.1.0":{"name":"@bbachain/wallet-adapter-mobile","version":"0.1.0","author":{"name":"BBAChain Labs","email":"developers@bbachain.com"},"license":"Apache-2.0","_id":"@bbachain/wallet-adapter-mobile@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":"51d6bb8739f1a54597c19e441152b0a0bb247e64","tarball":"https://registry.npmjs.org/@bbachain/wallet-adapter-mobile/-/wallet-adapter-mobile-0.1.0.tgz","fileCount":16,"integrity":"sha512-UX7uGzQB2EBVbXF1Gx8CsgfD3JuQF58cZ8n+KyV50+YkC+rpjvdgCOrmNhyReLwkUT9vXoF+4oPKUqNoKwG2iw==","signatures":[{"sig":"MEQCIFE/Bxt9KJOMSk48pQCCIcTX1PWqpJZ7TQD9V5PlOkXZAiBkalK4l9wF7HUHQc8ClNfcK03u+cK6xC0RlslMaGWBJQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":340574},"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 adapter for mobile wallet apps that conform to the BBAChain Mobile Wallet Adapter protocol","directories":{},"sideEffects":false,"_nodeVersion":"20.18.1","dependencies":{"qrcode":"^1.5.4","js-base64":"^3.7.5","@bbachain/wallet-adapter-base":"^0.1.1","@bbachain/wallet-standard-features":"^0.1.1","@bbachain/mobile-wallet-adapter-protocol-web3js":"^0.1.1"},"react-native":"lib/cjs/index.native.js","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"shx":"^0.3.4","agadoo":"^3.0.0","cross-env":"^7.0.3","@types/qrcode":"^1.5.5","@bbachain/web3.js":"^1.1.3"},"peerDependencies":{"@bbachain/web3.js":"^1.1.3"},"optionalDependencies":{"@react-native-async-storage/async-storage":"^1.17.7"},"_npmOperationalInternal":{"tmp":"tmp/wallet-adapter-mobile_0.1.0_1739816872579_0.7710832608165195","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"@bbachain/wallet-adapter-mobile","version":"0.1.2","author":{"name":"BBAChain Labs","email":"developers@bbachain.com"},"license":"Apache-2.0","_id":"@bbachain/wallet-adapter-mobile@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":"bd88d6c9ca61358baf5fbd81f4b38eb9b773d00c","tarball":"https://registry.npmjs.org/@bbachain/wallet-adapter-mobile/-/wallet-adapter-mobile-0.1.2.tgz","fileCount":16,"integrity":"sha512-f/S652AUblBZRr5VHu8pxELQoiR93Ulw1VL8lohNTQXXsxuRZH1r9X/KV7yYfXIjqU8nxWv/asBgQsRmVjBgLA==","signatures":[{"sig":"MEUCICDtaaLPZw0qtyBtgrR0K36H33zfLy1/MLAJYSHHhpQwAiEA23Rzb9s6JdjJjtD9SmP9krI0BN+GxfZIsNsasxHtFv4=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":153388},"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","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 adapter for mobile wallet apps that conform to the Solana Mobile Wallet Adapter protocol","directories":{},"sideEffects":false,"_nodeVersion":"20.18.1","dependencies":{"js-base64":"^3.7.2","@bbachain/wallet-adapter-base":"^0.1.1","@bbachain/wallet-standard-features":"^0.1.2","@bbachain/mobile-wallet-adapter-protocol-web3js":"^0.1.2"},"react-native":"lib/cjs/index.native.js","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"shx":"^0.3.4","agadoo":"^2.0.0","cross-env":"^7.0.3","@bbachain/web3.js":"^1.1.3"},"peerDependencies":{"@bbachain/web3.js":"^1.1.3"},"optionalDependencies":{"@react-native-async-storage/async-storage":"^1.17.7"},"_npmOperationalInternal":{"tmp":"tmp/wallet-adapter-mobile_0.1.2_1739904557650_0.1976335215813343","host":"s3://npm-registry-packages-npm-production"}},"0.1.3":{"name":"@bbachain/wallet-adapter-mobile","version":"0.1.3","author":{"name":"BBAChain Labs","email":"developers@bbachain.com"},"license":"Apache-2.0","_id":"@bbachain/wallet-adapter-mobile@0.1.3","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":"200482e7a74d548e8171d0ab600c770bd532413f","tarball":"https://registry.npmjs.org/@bbachain/wallet-adapter-mobile/-/wallet-adapter-mobile-0.1.3.tgz","fileCount":16,"integrity":"sha512-wxa8XYqVbL1OzxwnkdE44vN9NC9Xteb6a+QfDjp+g+0ZGf4RqJbo/Q6pAAX79JjJaMqcFTPWkuAWNzCByLQn/w==","signatures":[{"sig":"MEUCIG8A33nSASgezj1qiLr0RM9jO9qVeJIzO4n1LvBZPdExAiEAuxG+nE/vhdhS/BerAFAmpwn0gzx+oJWGqUQk1E7Bfig=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":153388},"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","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 adapter for mobile wallet apps that conform to the Solana Mobile Wallet Adapter protocol","directories":{},"sideEffects":false,"_nodeVersion":"20.17.0","dependencies":{"js-base64":"^3.7.2","@bbachain/wallet-adapter-base":"^0.1.2","@bbachain/wallet-standard-features":"^0.1.2","@bbachain/mobile-wallet-adapter-protocol-web3js":"^0.1.2"},"react-native":"lib/cjs/index.native.js","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"shx":"^0.3.4","agadoo":"^2.0.0","cross-env":"^7.0.3","@bbachain/web3.js":"^1.1.3"},"peerDependencies":{"@bbachain/web3.js":"^1.1.3"},"optionalDependencies":{"@react-native-async-storage/async-storage":"^1.17.7"},"_npmOperationalInternal":{"tmp":"tmp/wallet-adapter-mobile_0.1.3_1739947636279_0.4733805484767406","host":"s3://npm-registry-packages-npm-production"}},"0.1.4":{"name":"@bbachain/wallet-adapter-mobile","description":"An adapter for mobile wallet apps that conform to the BBAChain Mobile Wallet Adapter protocol","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","module":"lib/esm/index.js","react-native":"lib/cjs/index.native.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","types":"./lib/types/index.d.ts"}},"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"},"peerDependencies":{"@bbachain/web3.js":"^1.1.3"},"dependencies":{"@bbachain/mobile-wallet-adapter-protocol-web3js":"^0.1.4","@bbachain/wallet-adapter-base":"^0.1.2","@bbachain/wallet-standard-features":"^0.1.2","js-base64":"^3.7.5","qrcode":"^1.5.4"},"optionalDependencies":{"@react-native-async-storage/async-storage":"^1.17.7"},"devDependencies":{"@bbachain/web3.js":"^1.1.3","@types/qrcode":"^1.5.5","agadoo":"^3.0.0","cross-env":"^7.0.3","shx":"^0.3.4"},"_id":"@bbachain/wallet-adapter-mobile@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-51GaPXpMfkgfjSQoJYDND+KX+wQSxEucGmiWy3BbEyC7zPNmEgbGC33D9w89Ypsmh/cIMDonmbFV+L1kH7fzaQ==","shasum":"8be23ca2d763d3dc29b567592525343615836be6","tarball":"https://registry.npmjs.org/@bbachain/wallet-adapter-mobile/-/wallet-adapter-mobile-0.1.4.tgz","fileCount":16,"unpackedSize":340530,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIA0OWzH3WXT8xG0ubAOuSadzYnSqCS4kRB1CMABR86GLAiBF+j6Ko+/7ort0L8Dk1eiWMsw7FWvUyGUzPLQX7b0wYQ=="}]},"_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/wallet-adapter-mobile_0.1.4_1739953040072_0.3088167168917826"},"_hasShrinkwrap":false}},"time":{"created":"2025-02-17T18:27:52.475Z","modified":"2025-02-19T08:17:20.518Z","0.1.0":"2025-02-17T18:27:52.809Z","0.1.2":"2025-02-18T18:49:17.838Z","0.1.3":"2025-02-19T06:47:16.467Z","0.1.4":"2025-02-19T08:17:20.248Z"},"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 adapter for mobile wallet apps that conform to the BBAChain Mobile Wallet Adapter protocol","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/wallet-adapter-mobile`\n\nThis is a plugin for use with [`@solana/wallet-adapter`](https://github.com/solana-labs/wallet-adapter). It enables apps to use a native wallet app on a mobile device to sign messages and transactions, and to send transactions if the wallet offers support for sending transactions.\n\n## Usage\n\nUsers of these libraries do not need to take any extra steps:\n\n* `@solana/wallet-adapter-react@\">=0.15.21\"`\n\nThose libraries automatically bundle the Mobile Wallet Adapter plugin, and enable it when running in a compatible mobile environment.\n\n## Advanced usage\n\nDevelopers might wish to customize the behavior of this plugin for their app. Specifying the app's name and icon, deciding which address to select in the event the wallet authorizes the app to use more than one, specifying which network cluster to communicate with, and more are made possible by creating an instance of the mobile wallet adapter like this.\n\n```typescript\nnew SolanaMobileWalletAdapter({\n    addressSelector: createDefaultAddressSelector(),\n    appIdentity: {\n        name: 'My app',\n        uri: 'https://myapp.io',\n        icon: 'relative/path/to/icon.png',\n    },\n    authorizationResultCache: createDefaultAuthorizationResultCache(),\n    cluster: WalletAdapterNetwork.Devnet,\n    onWalletNotFound: createDefaultWalletNotFoundHandler(),\n});\n```\n\nDevelopers who use `@solana/wallet-adapter-react@\">=0.15.21\"` can supply this custom instance to `WalletProvider` which will use it to override the default one. \n\n```typescript\nconst wallets = useMemo(\n    () => [\n        new SolanaMobileWalletAdapter({\n            addressSelector: createDefaultAddressSelector(),\n            appIdentity: {\n                name: 'My app',\n                uri: 'https://myapp.io',\n                icon: 'relative/path/to/icon.png',\n            },\n            authorizationResultCache: createDefaultAuthorizationResultCache(),\n            cluster: WalletAdapterNetwork.Devnet,\n            onWalletNotFound: createDefaultWalletNotFoundHandler(),\n        }),\n    ],\n    [],\n);\n\nreturn (\n    <ConnectionProvider endpoint={clusterApiUrl(WalletAdapterNetwork.Devnet)}>\n        <WalletProvider wallets={wallets}>\n            <MyApp />\n        </WalletProvider>\n    </ConnectionProvider>\n)\n```\n\nFor more information about how to use wallet adapter plugins, visit https://github.com/solana-labs/wallet-adapter\n\n## Configuration\n\n### App identity\n\nThe `AppIdentity` config identifies your app to a native mobile wallet. When someone connects to a wallet for the first time, the wallet may present this information in the on-screen prompt where the ask if the visitor would like to authorize your app for use with their account.\n\n- `name` &ndash; The plain-language name of your application.\n- `uri` &ndash; The uri of your application. This uri may be required to participate in [dApp identity verification](https://github.com/solana-mobile/mobile-wallet-adapter/blob/main/spec/spec.md#dapp-identity-verification) as part of the mobile wallet adapter protocol specification.\n- `icon` &ndash; An icon file path, relative to the `uri`.\n\n### Address selector\n\nThe Mobile Wallet Adapter specification allows a wallet to authorize a dApp to use one or more addresses. dApps must supply code to select a single address for use in the adapter. That code must conform to the `AddressSelector` interface.\n\n```typescript\nexport interface AddressSelector {\n    select(addresses: Base64EncodedAddress[]): Promise<Base64EncodedAddress>;\n}\n```\n\nAlternatively, you can use the included `createDefaultAddressSelector()` method to create a selector that always chooses the first address in the list.\n\n### Authorization result cache\n\nThe first time that someone authorizes a native wallet app for use with your application, you should cache that authorization for future use. You can supply your own implementation that conforms to the `AuthorizationResultCache` interface.\n\n```typescript\nexport interface AuthorizationResultCache {\n    clear(): Promise<void>;\n    get(): Promise<AuthorizationResult | undefined>;\n    set(authorizationResult: AuthorizationResult): Promise<void>;\n}\n```\n\nAlternatively, you can use the included `createDefaultAuthorizationResultCache()` method to create a cache that reads and writes the adapter's last-obtained `AuthorizationResult` to your browser's local storage, if available.\n\n### Cluster\n\nEach authorization a dApp makes with a wallet is tied to a particular Solana cluster. If a dApp wants to change the cluster on which to transact, it must seek an authorization for that cluster.\n\n### Wallet-not-found handler\n\nWhen you call `connect()` but no wallet responds within a reasonable amount of time, it is presumed that no compatible wallet is installed. You must supply an `onWalletNotFound` function to handle this case.\n\nAlternatively, you can use the included `createDefaultWalletNotFoundHandler()` method to create a function that opens the Solana Mobile ecosystem wallets webpage.\n\n## Android Chrome Browser Issues\nChrome on Android has a policy of blocking all navigation that does not come from explicit user gestures (click, tap, swipe, keypress). As a result, MWA Intent navigation to a wallet app will be blocked if it does not come from a user gesture. \n\nYou will see an error like:\n\n```\nNavigation is blocked: solana-wallet:/v1/associate...\n```\n\nThere isn't a way around this on the Android Chrome Browser, but you can write a mobile app if you need this behavior.\n\n\n","readmeFilename":"README.md"}