{"_id":"@assetify/react-native-breez-sdk","_rev":"2-d619f3eff95d6534ce1c9b30a088b7f7","name":"@assetify/react-native-breez-sdk","dist-tags":{"latest":"1.0.2"},"versions":{"1.0.0":{"name":"@assetify/react-native-breez-sdk","version":"1.0.0","keywords":["react-native","ios","android","breez","breez-sdk","lightning","bitcoin","lnurl"],"author":{"url":"https://github.com/satimoto","name":"Ross Savage","email":"hello@satimoto.com"},"license":"MIT","_id":"@assetify/react-native-breez-sdk@1.0.0","maintainers":[{"name":"assetify","email":"dev@assetify.net"}],"homepage":"https://breez.technology/","bugs":{"url":"https://github.com/breez/breez-sdk/issues"},"dist":{"shasum":"2c6ee2085b7bbbf3df3374c0b5dcefde2c684bf0","tarball":"https://registry.npmjs.org/@assetify/react-native-breez-sdk/-/react-native-breez-sdk-1.0.0.tgz","fileCount":183,"integrity":"sha512-n3OEIOQ+bL857HOySFWNMvWXZF+owntcP53wAY8pAr2c1RUUAOtxa4Ob6HXK6ZNlLoaCrMAU/p8nF1Y+3+qFJA==","signatures":[{"sig":"MEUCIQCxLsD5i4Pi646wT5U4apbdN1TNbM49WzY+/aBDUYmUDAIgXYZHRYdth7GnCrHdv/SU2VqSB4ZJD2FJAhJKe+SP4KY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":2499154},"jest":{"preset":"react-native","modulePathIgnorePatterns":["<rootDir>/example/node_modules","<rootDir>/lib/"]},"main":"lib/commonjs/index","types":"lib/typescript/index.d.ts","module":"lib/module/index","source":"src/index","scripts":{"lint":"eslint \"**/*.{js,ts,tsx}\"","pods":"cd example/ios && pod install","test":"jest","example":"yarn --cwd example","prepare":"bob build","release":"release-it","bootstrap":"rm -rf node_modules && rm -rf example/node_modules && yarn && yarn example && yarn pods","typescript":"tsc --noEmit"},"_npmUser":{"name":"assetify","email":"dev@assetify.net"},"prettier":{"semi":false,"tabWidth":4,"endOfLine":"lf","printWidth":150,"singleQuote":false,"trailingComma":"none"},"commitlint":{"extends":["@commitlint/config-conventional"]},"release-it":{"git":{"tagName":"v${version}","commitMessage":"chore: release ${version}"},"npm":{"publish":true},"github":{"release":true},"plugins":{"@release-it/conventional-changelog":{"preset":"angular"}}},"repository":{"url":"https://github.com/breez/breez-sdk","type":"git"},"description":"React Native Breez SDK","directories":{},"licenseText":"MIT License\n\nCopyright (c) 2023 Breez\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","dependencies":{},"eslintConfig":{"root":true,"rules":{"prettier/prettier":["error",{"semi":false,"tabWidth":4,"endOfLine":"lf","printWidth":150,"singleQuote":false,"trailingComma":"none"}]},"extends":["@react-native-community","prettier"]},"eslintIgnore":["node_modules/","lib/"],"react-native":"src/index","publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.0.1","husky":"^6.0.0","react":"18.1.0","eslint":"^7.2.0","prettier":"^2.0.5","commitlint":"^11.0.0","release-it":"^17.0.3","typescript":"^4.1.3","@types/jest":"^26.0.0","pod-install":"^0.1.0","@types/react":"^16.9.19","react-native":"0.70.15","@types/react-native":"0.62.13","eslint-config-prettier":"^7.0.0","eslint-plugin-prettier":"^3.1.3","react-native-builder-bob":"^0.18.0","@commitlint/config-conventional":"^11.0.0","@release-it/conventional-changelog":"^2.0.0","@react-native-community/eslint-config":"^2.0.0"},"peerDependencies":{"react":"*","react-native":"*"},"_npmOperationalInternal":{"tmp":"tmp/react-native-breez-sdk_1.0.0_1722420847667_0.1608250777075697","host":"s3://npm-registry-packages"},"react-native-builder-bob":{"output":"lib","source":"src","targets":["commonjs","module",["typescript",{"project":"tsconfig.build.json"}]]}},"1.0.1":{"name":"@assetify/react-native-breez-sdk","version":"1.0.1","keywords":["react-native","ios","android","breez","breez-sdk","lightning","bitcoin","lnurl"],"author":{"url":"https://github.com/satimoto","name":"Ross Savage","email":"hello@satimoto.com"},"license":"MIT","_id":"@assetify/react-native-breez-sdk@1.0.1","maintainers":[{"name":"assetify","email":"dev@assetify.net"}],"homepage":"https://breez.technology/","bugs":{"url":"https://github.com/breez/breez-sdk/issues"},"dist":{"shasum":"429446d5579d4db1b09a28764e3632edc4a26770","tarball":"https://registry.npmjs.org/@assetify/react-native-breez-sdk/-/react-native-breez-sdk-1.0.1.tgz","fileCount":183,"integrity":"sha512-a6MGzjecKvP3Yj7/0C25QyKfiqZwnMbppU4LiZSD0nvG9Uyls2nS7OO5aD99RNhEt5/OCD4kSkNXiTNH/rS9Mg==","signatures":[{"sig":"MEUCIQCiYbmN+iPDIQta3Dg8ihldNzsYrL7W4vfDwszOOFo1/gIgFhUWsCjTG8NEnQMbjOIkMFgCOsusoaT+I6OvoxWuBIU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":2486250},"jest":{"preset":"react-native","modulePathIgnorePatterns":["<rootDir>/example/node_modules","<rootDir>/lib/"]},"main":"lib/commonjs/index","types":"lib/typescript/index.d.ts","module":"lib/module/index","source":"src/index","scripts":{"lint":"eslint \"**/*.{js,ts,tsx}\"","pods":"cd example/ios && pod install","test":"jest","example":"yarn --cwd example","prepare":"bob build","release":"release-it","bootstrap":"rm -rf node_modules && rm -rf example/node_modules && yarn && yarn example && yarn pods","typescript":"tsc --noEmit"},"_npmUser":{"name":"assetify","email":"dev@assetify.net"},"prettier":{"semi":false,"tabWidth":4,"endOfLine":"lf","printWidth":150,"singleQuote":false,"trailingComma":"none"},"commitlint":{"extends":["@commitlint/config-conventional"]},"release-it":{"git":{"tagName":"v${version}","commitMessage":"chore: release ${version}"},"npm":{"publish":true},"github":{"release":true},"plugins":{"@release-it/conventional-changelog":{"preset":"angular"}}},"repository":{"url":"https://github.com/breez/breez-sdk","type":"git"},"description":"React Native Breez SDK","directories":{},"licenseText":"MIT License\n\nCopyright (c) 2023 Breez\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","dependencies":{},"eslintConfig":{"root":true,"rules":{"prettier/prettier":["error",{"semi":false,"tabWidth":4,"endOfLine":"lf","printWidth":150,"singleQuote":false,"trailingComma":"none"}]},"extends":["@react-native-community","prettier"]},"eslintIgnore":["node_modules/","lib/"],"react-native":"src/index","publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.0.1","husky":"^6.0.0","react":"18.1.0","eslint":"^7.2.0","prettier":"^2.0.5","commitlint":"^11.0.0","release-it":"^17.0.3","typescript":"^4.1.3","@types/jest":"^26.0.0","pod-install":"^0.1.0","@types/react":"^16.9.19","react-native":"0.70.15","@types/react-native":"0.62.13","eslint-config-prettier":"^7.0.0","eslint-plugin-prettier":"^3.1.3","react-native-builder-bob":"^0.18.0","@commitlint/config-conventional":"^11.0.0","@release-it/conventional-changelog":"^2.0.0","@react-native-community/eslint-config":"^2.0.0"},"peerDependencies":{"react":"*","react-native":"*"},"_npmOperationalInternal":{"tmp":"tmp/react-native-breez-sdk_1.0.1_1722433037033_0.06718579234971966","host":"s3://npm-registry-packages"},"react-native-builder-bob":{"output":"lib","source":"src","targets":["commonjs","module",["typescript",{"project":"tsconfig.build.json"}]]}},"1.0.2":{"name":"@assetify/react-native-breez-sdk","version":"1.0.2","description":"React Native Breez SDK","main":"lib/commonjs/index","module":"lib/module/index","types":"lib/typescript/index.d.ts","react-native":"src/index","source":"src/index","scripts":{"test":"jest","typescript":"tsc --noEmit","lint":"eslint \"**/*.{js,ts,tsx}\"","prepare":"bob build","release":"release-it","example":"yarn --cwd example","pods":"cd example/ios && pod install","bootstrap":"rm -rf node_modules && rm -rf example/node_modules && yarn && yarn example && yarn pods"},"keywords":["react-native","ios","android","breez","breez-sdk","lightning","bitcoin","lnurl"],"repository":{"type":"git","url":"https://github.com/breez/breez-sdk"},"author":{"name":"Ross Savage","email":"hello@satimoto.com","url":"https://github.com/satimoto"},"license":"MIT","bugs":{"url":"https://github.com/breez/breez-sdk/issues"},"homepage":"https://breez.technology/","publishConfig":{"registry":"https://registry.npmjs.org/","access":"public"},"devDependencies":{"@commitlint/config-conventional":"^11.0.0","@react-native-community/eslint-config":"^2.0.0","@release-it/conventional-changelog":"^2.0.0","@types/jest":"^26.0.0","@types/react":"^16.9.19","@types/react-native":"0.62.13","commitlint":"^11.0.0","eslint":"^7.2.0","eslint-config-prettier":"^7.0.0","eslint-plugin-prettier":"^3.1.3","husky":"^6.0.0","jest":"^26.0.1","pod-install":"^0.1.0","prettier":"^2.0.5","react":"18.1.0","react-native":"0.70.15","react-native-builder-bob":"^0.18.0","release-it":"^17.0.3","typescript":"^4.1.3"},"peerDependencies":{"react":"*","react-native":"*"},"jest":{"preset":"react-native","modulePathIgnorePatterns":["<rootDir>/example/node_modules","<rootDir>/lib/"]},"commitlint":{"extends":["@commitlint/config-conventional"]},"release-it":{"git":{"commitMessage":"chore: release ${version}","tagName":"v${version}"},"npm":{"publish":true},"github":{"release":true},"plugins":{"@release-it/conventional-changelog":{"preset":"angular"}}},"eslintConfig":{"root":true,"extends":["@react-native-community","prettier"],"rules":{"prettier/prettier":["error",{"endOfLine":"lf","printWidth":150,"semi":false,"singleQuote":false,"tabWidth":4,"trailingComma":"none"}]}},"eslintIgnore":["node_modules/","lib/"],"prettier":{"endOfLine":"lf","printWidth":150,"semi":false,"singleQuote":false,"tabWidth":4,"trailingComma":"none"},"react-native-builder-bob":{"source":"src","output":"lib","targets":["commonjs","module",["typescript",{"project":"tsconfig.build.json"}]]},"dependencies":{},"licenseText":"MIT License\n\nCopyright (c) 2023 Breez\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_id":"@assetify/react-native-breez-sdk@1.0.2","dist":{"shasum":"b934be76d9df4b2350367a08eae6231dda68553e","integrity":"sha512-KBaSsow6cB1disBcLTd5UmCYhFmiKBFmfXfnhhJqcjWwzDHrXfh0Zk5KGWoZn5nZl4k+N94IgmtMolOm4RzI8A==","tarball":"https://registry.npmjs.org/@assetify/react-native-breez-sdk/-/react-native-breez-sdk-1.0.2.tgz","fileCount":183,"unpackedSize":2486275,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC/kdkQMVXR1mBMBpvKwzqScJ1AVHDscGnexeJOyUyT1QIhAJZZjlkHJ82jki/O9aCCGypLuVCreal5ECgyM8ofIRSK"}]},"_npmUser":{"name":"assetify","email":"dev@assetify.net"},"directories":{},"maintainers":[{"name":"assetify","email":"dev@assetify.net"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-native-breez-sdk_1.0.2_1722514021313_0.3682529147839624"},"_hasShrinkwrap":false}},"time":{"created":"2024-07-31T10:14:07.559Z","modified":"2024-08-01T12:07:01.726Z","1.0.0":"2024-07-31T10:14:07.823Z","1.0.1":"2024-07-31T13:37:17.334Z","1.0.2":"2024-08-01T12:07:01.561Z"},"bugs":{"url":"https://github.com/breez/breez-sdk/issues"},"author":{"name":"Ross Savage","email":"hello@satimoto.com","url":"https://github.com/satimoto"},"license":"MIT","homepage":"https://breez.technology/","keywords":["react-native","ios","android","breez","breez-sdk","lightning","bitcoin","lnurl"],"repository":{"type":"git","url":"https://github.com/breez/breez-sdk"},"description":"React Native Breez SDK","maintainers":[{"name":"assetify","email":"dev@assetify.net"}],"readme":"# React Native Breez SDK\n\nThe Breez SDK enables mobile developers to integrate Lightning and bitcoin payments into their apps with a very shallow learning curve. The use cases are endless – from social apps that want to integrate tipping between users to content-creation apps interested in adding bitcoin monetization. Crucially, this SDK is an end-to-end, non-custodial, drop-in solution powered by Greenlight, a built-in LSP, on-chain interoperability, third-party fiat on-ramps, and other services users and operators need.\n   \nThe Breez SDK provides the following services:\n* Sending payments (via various protocols such as: bolt11, keysend, lnurl-pay, lightning address, etc.)\n* Receiving payments (via various protocols such as: bolt11, lnurl-withdraw, etc.)\n* Fetching node status (e.g. balance, max allow to pay, max allow to receive, on-chain balance, etc.)\n* Connecting to a new or existing node.\n\n## Installation\n\n```bash\nnpm install @breeztech/react-native-breez-sdk\n```\nor\n\n```bash\nyarn add @breeztech/react-native-breez-sdk\n```\n\n### Important fix for React Native versions below 0.71.0\n\nIf your project uses a React Native version less < 0.71.0, and you want to build your app for Android, you might run into an error like this:\n\n```\n 2 files found with path 'lib/arm64-v8a/libc++_shared.so' from inputs:\n      - /(...)/.gradle/caches/transforms-3/c476ede63d070b991438fe0d1c323931/transformed/jetified-react-native-0.68.6/jni/arm64-v8a/libc++_shared.so\n      - /(...)/.gradle/caches/transforms-3/7c318ac8dd87c1f0c7540616d6d47bd8/transformed/jetified-breez-sdk-0.1.3/jni/arm64-v8a/libc++_shared.so\n```\n\nTo fix this you need to disambiguate which file to use by adding the following snippet to your app's `android/app/build.gradle`:\n\n```gradle\nandroid {\n    // ...\n    packagingOptions {\n        pickFirst 'lib/x86/libc++_shared.so'\n        pickFirst 'lib/x86_64/libc++_shared.so'\n        pickFirst 'lib/armeabi-v7a/libc++_shared.so'\n        pickFirst 'lib/arm64-v8a/libc++_shared.so'\n    }\n}\n```\n\nBoth the Breez SDK as well as React Native package the `libc++_shared.so` native library.\nReact Native versions below 0.71.0 have a [bug](https://github.com/facebook/react-native/issues/30297) where they cannot automatically handle multiple versions of this file.\nThis has been [fixed](https://github.com/facebook/react-native/pull/35093) in React Native 0.71.0 and thus the above snippet only needs to be added to projects using React Native < 0.71.0.\n\n## Usage\n\nFor a more in-depth look at using the Breez SDK, you can follow [these examples](https://sdk-doc.breez.technology/) in the SDK overview.\n\nPlease contact [support@breez.technology](mailto:support@breez.technology?subject=Breez%20API%20Key) to request a Breez API Key. \n```ts\nimport React, { useEffect } from \"react\"\nimport { \n    BreezEvent,\n    defaultConfig,\n    EnvironmentType,   \n    NodeConfigVariant, \n    sendPayment,\n    connect \n} from \"@breeztech/react-native-breez-sdk\";\nimport BuildConfig from \"react-native-build-config\"\n\nconst App = () => (\n    ...\n\n    const onEvent = (breezEvent: BreezEvent) => {\n        console.log(`${JSON.stringify(breezEvent)}`)\n    }\n\n    const payInvoice = async (bolt11: string, amountMsat?: number) => {\n        // Pay invoice\n        const payment = await sendPayment({ bolt11, amountMsat });\n    }\n\n    useEffect(() => {\n        const asyncFn = async () => {\n            // Create the specific node configuration\n            const nodeConfig = {\n                type: NodeConfigVariant.GREENLIGHT,\n                config: {\n                    partnerCredentials: {\n                        deviceKey: null,\n                        deviceCert: null\n                    }\n                }\n            }\n            \n            // Construct the sdk default config\n            const config = await defaultConfig(EnvironmentType.PRODUCTION, BuildConfig.BREEZ_API_KEY, nodeConfig)            \n\n             // Connect to the Breez SDK make it ready to use\n            await connect(config, seed, onEvent)            \n        }\n\n        asyncFn()\n    }, [])\n\n    ...\n)\n\nexport default App\n```\n\n## Example\n\nIn the `example` folder of the [Breez SDK repository](https://github.com/breez/breez-sdk/tree/main/libs/sdk-react-native/example) you will find a basic application for using Breez SDK. Change directory into the folder and install the dependencies:\n```bash\nyarn\n```\nThen to run on android:\n```bash\nyarn android\n```\nor for iOS:\n```bash\nyarn pods && yarn ios\n```\n","readmeFilename":"README.md"}