{"_id":"@candlefinance/react-native-candle","_rev":"2-26708a1355190461ec80a539d0fd325c","name":"@candlefinance/react-native-candle","dist-tags":{"latest":"0.1.1"},"versions":{"0.1.0":{"name":"@candlefinance/react-native-candle","version":"0.1.0","keywords":["react-native","nitro","nitro-modile","expo","apple","ai"],"author":{"name":"Gary Tokman"},"license":"MIT","_id":"@candlefinance/react-native-candle@0.1.0","maintainers":[{"name":"gtokman","email":"contact@trycandle.com"},{"name":"6ary","email":"gary@trycandle.com"},{"name":"liambutler-lawrence","email":"liam@trycandle.com"},{"name":"nikolai-wotton","email":"wottonn@gmail.com"}],"homepage":"https://github.com/candlefinance/candle-react-native","bugs":{"url":"https://github.com/candlefinance/candle-react-native/issues"},"dist":{"shasum":"d67783b891fa1ef24f257fccb43333af1697f359","tarball":"https://registry.npmjs.org/@candlefinance/react-native-candle/-/react-native-candle-0.1.0.tgz","fileCount":54,"integrity":"sha512-1gdF66JDN+T6v6ENQVmFQWYWACjjwK8qFTmNcXfGOTg5IuDba3vLe4ocoj6ieW2wPs1rSpwuRn2tUfeGqpgxTA==","signatures":[{"sig":"MEUCIFJ0qZlVA0SkRhAKbuOBnUQLeWIsc3OQ9M8ML9wqFQvjAiEApPj46I+BQSgfhcIlIYSFHik41icHHW2MMpFuEtFHSlI=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":99035},"main":"./lib/commonjs/index.js","types":"./lib/typescript/commonjs/src/index.d.ts","module":"./lib/module/index.js","source":"src/index","gitHead":"adc4dd1481b4ea629941e94e8adf1afcb4c68820","scripts":{"build":"rm -rf lib && bun typecheck && bob build","clean":"rm -rf android/build node_modules/**/android/build lib android/.cxx node_modules/**/android/.cxx","specs":"bun typecheck && nitro-codegen --logLevel=\\\"debug\\\" && bun run build","release":"release-it","specs:pod":"bun specs && bun --cwd ../example pod","typecheck":"tsc --noEmit"},"_npmUser":{"name":"6ary","email":"gary@trycandle.com"},"release-it":{"git":false,"npm":{"publish":true},"hooks":{"after:bump":"bun build","before:init":"bun typecheck"},"github":{"release":false}},"repository":{"url":"git+https://github.com/candlefinance/candle-react-native.git","type":"git"},"_npmVersion":"10.8.2","description":"Candle SDK for React Native","directories":{},"_nodeVersion":"20.18.0","eslintIgnore":["node_modules/","lib/"],"react-native":"src/index","publishConfig":{"registry":"https://npm.pkg.github.com/"},"_hasShrinkwrap":false,"devDependencies":{"react":"^18.3.1","release-it":"^18.1.2","react-native":"^0.78.1","nitro-codegen":"^0.25.2","@release-it/bumper":"^7.0.1","@expo/config-plugins":"^9.0.10","react-native-builder-bob":"^0.35.2","react-native-nitro-modules":"^0.25.2","@release-it/conventional-changelog":"^10.0.0"},"peerDependencies":{"react":"*","react-native":"*","react-native-nitro-modules":"*"},"_npmOperationalInternal":{"tmp":"tmp/react-native-candle_0.1.0_1743717816181_0.22679233787864095","host":"s3://npm-registry-packages-npm-production"},"react-native-builder-bob":{"output":"lib","source":"src","targets":[["commonjs",{"esm":true}],["module",{"esm":true}],["typescript",{"esm":true}]]}},"0.1.1":{"name":"@candlefinance/react-native-candle","version":"0.1.1","description":"Candle SDK for React Native","main":"./lib/commonjs/index.js","module":"./lib/module/index.js","types":"./lib/typescript/commonjs/src/index.d.ts","react-native":"src/index","source":"src/index","scripts":{"build":"rm -rf lib && bun typecheck && bob build","typecheck":"tsc --noEmit","clean":"rm -rf android/build node_modules/**/android/build lib android/.cxx node_modules/**/android/.cxx","release":"release-it","specs":"bun typecheck && nitro-codegen --logLevel=\\\"debug\\\" && bun run build","specs:pod":"bun specs && bun --cwd ../example pod"},"keywords":["react-native","nitro","nitro-modile","expo","apple","ai"],"repository":{"type":"git","url":"git+https://github.com/candlefinance/candle-react-native.git"},"author":{"name":"Gary Tokman"},"license":"MIT","bugs":{"url":"https://github.com/candlefinance/candle-react-native/issues"},"homepage":"https://github.com/candlefinance/candle-react-native","publishConfig":{"registry":"https://npm.pkg.github.com/"},"devDependencies":{"@expo/config-plugins":"^9.0.10","react":"^18.3.1","react-native":"^0.78.1","nitro-codegen":"^0.25.2","react-native-nitro-modules":"^0.25.2","react-native-builder-bob":"^0.35.2","release-it":"^18.1.2","@release-it/bumper":"^7.0.1","@release-it/conventional-changelog":"^10.0.0"},"peerDependencies":{"react":"*","react-native":"*","react-native-nitro-modules":"*"},"release-it":{"npm":{"publish":true},"git":false,"github":{"release":false},"hooks":{"before:init":"bun typecheck","after:bump":"bun build"}},"react-native-builder-bob":{"source":"src","output":"lib","targets":[["commonjs",{"esm":true}],["module",{"esm":true}],["typescript",{"esm":true}]]},"eslintIgnore":["node_modules/","lib/"],"_id":"@candlefinance/react-native-candle@0.1.1","gitHead":"2bf232a55839c4ea68a9cfe1f0cfc5b0c3c92691","_nodeVersion":"20.18.0","_npmVersion":"10.8.2","dist":{"integrity":"sha512-gqmiN6PGTK4nRaT1B/Q8CRRU2DzRAPuRRQXXtdSMUTZQZdn1NalnJZrT1vnNRdtEwNDpYCyg/r5ZetPQ0JG87w==","shasum":"45b97b5f29d5da6f8967aa0c014287fef220a73a","tarball":"https://registry.npmjs.org/@candlefinance/react-native-candle/-/react-native-candle-0.1.1.tgz","fileCount":54,"unpackedSize":99930,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDD5zh87r56VLgmL8CI1lIRmBSlml+e+dKiX0Px9SvxLgIge9K+4garRErKnwGrvM59GsC5jhU+TUaedX3/foELQNY="}]},"_npmUser":{"name":"6ary","email":"gary@trycandle.com"},"directories":{},"maintainers":[{"name":"gtokman","email":"contact@trycandle.com"},{"name":"6ary","email":"gary@trycandle.com"},{"name":"liambutler-lawrence","email":"liam@trycandle.com"},{"name":"nikolai-wotton","email":"wottonn@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/react-native-candle_0.1.1_1743777732563_0.3510525145924386"},"_hasShrinkwrap":false}},"time":{"created":"2025-04-03T22:03:36.065Z","modified":"2025-04-04T14:42:12.986Z","0.1.0":"2025-04-03T22:03:36.413Z","0.1.1":"2025-04-04T14:42:12.789Z"},"bugs":{"url":"https://github.com/candlefinance/candle-react-native/issues"},"author":{"name":"Gary Tokman"},"license":"MIT","homepage":"https://github.com/candlefinance/candle-react-native","keywords":["react-native","nitro","nitro-modile","expo","apple","ai"],"repository":{"type":"git","url":"git+https://github.com/candlefinance/candle-react-native.git"},"description":"Candle SDK for React Native","maintainers":[{"name":"gtokman","email":"contact@trycandle.com"},{"name":"6ary","email":"gary@trycandle.com"},{"name":"liambutler-lawrence","email":"liam@trycandle.com"},{"name":"nikolai-wotton","email":"wottonn@gmail.com"}],"readme":"# react-native-candle\n\n---\n\n## Installation\n\n```\nnpm install react-native-candle react-native-nitro-modules\n```\n\n```\nyarn add react-native-candle react-native-nitro-modules\n```\n\n```\nbun add react-native-candle react-native-nitro-modules\n```\n\nIf you are using Expo add the plugin to your `app.json`\n\n```json\n\"plugins\": [\n  // other plugins\n  \"react-native-candle\",\n  [\n    \"expo-build-properties\",\n    {\n      \"ios\": {\n        \"deploymentTarget\": \"17.0\",\n        \"useFrameworks\": \"dynamic\"\n      }\n    }\n  ]\n],\n```\n\n## Usage\n\n#### Public API\n\n```ts\nimport { useState } from \"react\";\nimport { ActivityIndicator, Button, StyleSheet, View } from \"react-native\";\nimport {\n  deleteUser,\n  unlinkAccount,\n  executeTool,\n  getAvailableTools,\n  getFiatAccounts,\n  getActivity,\n  getLinkedAccounts,\n  presentCandleLinkSheet,\n} from \"react-native-candle\";\n\nexport default function TabOneScreen() {\n  const [isLoading, setIsLoading] = useState(false);\n  return (\n    <View style={[styles.container]}>\n      <ActivityIndicator animating={isLoading} />\n      <Button\n        title=\"Unlink Account\"\n        onPress={() => {\n          setIsLoading(true);\n          unlinkAccount(\"linkedAccountID\") // Replace with actual linked account ID\n            .then(() => {\n              console.log(\"User unlinked successfully.\");\n              setIsLoading(false);\n            })\n            .catch((error) => {\n              console.error(\"Error unlinking user:\", error);\n              setIsLoading(false);\n            });\n        }}\n      />\n      <Button\n        title=\"Delete User\"\n        onPress={() => {\n          setIsLoading(true);\n          deleteUser()\n            .then(() => {\n              console.log(\"User deleted successfully.\");\n              setIsLoading(false);\n            })\n            .catch((error) => {\n              console.error(\"Error deleting user:\", error);\n              setIsLoading(false);\n            });\n        }}\n      />\n      <Button\n        title=\"Get Available Tools\"\n        onPress={() => {\n          setIsLoading(true);\n          getAvailableTools()\n            .then((tools) => {\n              console.log(\"Available tools:\", tools);\n              setIsLoading(false);\n            })\n            .catch((error) => {\n              console.error(\"Error fetching available tools:\", error);\n              setIsLoading(false);\n            });\n        }}\n      />\n      <Button\n        title=\"Execute Tool\"\n        onPress={() => {\n          setIsLoading(true);\n          executeTool({ arguments: \"\", name: \"get_linked_accounts\" })\n            .then((result) => {\n              console.log(\"Tool executed successfully:\", result);\n              setIsLoading(false);\n            })\n            .catch((error) => {\n              console.error(\"Error executing tool:\", error);\n              setIsLoading(false);\n            });\n        }}\n      />\n      <Button\n        title=\"Get Fiat Accounts\"\n        onPress={() => {\n          setIsLoading(true);\n          getFiatAccounts()\n            .then((accounts) => {\n              console.log(\"Fiat accounts:\", accounts);\n              setIsLoading(false);\n            })\n            .catch((error) => {\n              console.error(\"Error fetching fiat accounts:\", error);\n              setIsLoading(false);\n            });\n        }}\n      />\n      <Button\n        title=\"Get Activity\"\n        onPress={() => {\n          setIsLoading(true);\n          getActivity(\"P1D\")\n            .then((activity) => {\n              console.log(\"Activity:\", activity);\n              setIsLoading(false);\n            })\n            .catch((error) => {\n              console.error(\"Error fetching activity:\", error);\n              setIsLoading(false);\n            });\n        }}\n      />\n      <Button\n        title=\"Get Linked Accounts\"\n        onPress={() => {\n          setIsLoading(true);\n          getLinkedAccounts()\n            .then((accounts) => {\n              console.log(\"Linked accounts:\", accounts);\n              setIsLoading(false);\n            })\n            .catch((error) => {\n              console.error(\"Error fetching linked accounts:\", error);\n            });\n        }}\n      />\n      <Button\n        title=\"Show Candle Sheet\"\n        onPress={() => {\n          presentCandleLinkSheet({\n            onSuccess: (linkedAccount) => {\n              console.log(\"Account selected:\", linkedAccount);\n            },\n            customerName: \"Akme Inc.\",\n            presentationStyle: \"fullScreen\",\n          });\n        }}\n      />\n    </View>\n  );\n}\n\nconst styles = StyleSheet.create({\n  container: {\n    flex: 1,\n    backgroundColor: \"#fff\",\n    alignItems: \"center\",\n    justifyContent: \"center\",\n  },\n});\n```\n","readmeFilename":"README.md"}