{"_id":"@altrx/gundb-expo-sqlite-adapter","_rev":"2-630345fb572706cc9b7aa0b598670d17","name":"@altrx/gundb-expo-sqlite-adapter","dist-tags":{"latest":"0.1.1"},"versions":{"0.1.0":{"name":"@altrx/gundb-expo-sqlite-adapter","version":"0.1.0","description":"GunDB Expo SQLite Adapter","browser":"./dist/gundb-expo-sqlite-adapter.umd.js","umd:main":"./dist/gundb-expo-sqlite-adapter.umd.js","jsnext:main":"./dist/gundb-expo-sqlite-adapter.modern.js","main":"./dist/gundb-expo-sqlite-adapter.js","module":"./dist/gundb-expo-sqlite-adapter.module.js","unpkg":"./dist/gundb-expo-sqlite-adapter.umd.js","source":"./src/index.ts","types":"./dist/index.d.ts","typings":"./dist/index.d.ts","exports":{".":{"browser":"./dist/gundb-expo-sqlite-adapter.modern.js","umd":"./dist/gundb-expo-sqlite-adapter.umd.js","import":"./dist/gundb-expo-sqlite-adapter.module.js","require":"./dist/gundb-expo-sqlite-adapter.js"}},"repository":{"type":"git","url":"git+https://github.com/alterx/gundb-expo-sqlite-adapter.git"},"keywords":["preact","react","gun","gunDB","graph","document","key","value","relational","datastore","database","engine","realtime","decentralized","peer-to-peer","distributed","P2P","OSS","embedded","localstorage","S3"],"scripts":{"build":"rimraf dist && microbundle --define process.env.NODE_ENV=production --name @altrx/gundb-expo-sqlite-adapter --no-compress --output dist/","dev":"microbundle watch","test":"echo \"Error: no test specified\" && exit 1"},"author":{"name":"Carlos Vega"},"license":"MIT","peerDependencies":{},"devDependencies":{"@skypack/package-check":"^0.2.2","husky":"^4.2.5","microbundle":"^0.12.4","prettier":"^2.0.5","pretty-quick":"^2.0.1","react":"^16.13.1","react-dom":"^16.13.1","rimraf":"^3.0.2"},"husky":{"hooks":{"pre-commit":"pretty-quick --staged"}},"bugs":{"url":"https://github.com/alterx/gundb-expo-sqlite-adapter/issues"},"homepage":"https://github.com/alterx/gundb-expo-sqlite-adapter#readme","_id":"@altrx/gundb-expo-sqlite-adapter@0.1.0","_nodeVersion":"14.2.0","_npmVersion":"6.14.9","dist":{"integrity":"sha512-J87gPCujGS8YSlI7SNRWPVh03QylaOEEETPse9NsLAncIBO2IENqQpu687ooazu5xtR6lbE3NIVOFG3NRvxEFg==","shasum":"b5d3e07e516acb65eb6938935ddd2f5b1e631671","tarball":"https://registry.npmjs.org/@altrx/gundb-expo-sqlite-adapter/-/gundb-expo-sqlite-adapter-0.1.0.tgz","fileCount":12,"unpackedSize":42645,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhITyyCRA9TVsSAnZWagAAgDEQAIVutuELr/EMf7bbVgA/\nbXV6ItVlV1T9zaLFFT9j6bXPvKm7DbXGmzkFs1mWJlLa0OlFqTennLAybJCW\nuf93wKOH/9VY34PYfofMfmEpNy67X0We7gTPtoGRXBJpICkUB4PMiZy9/zjA\np/BeeEnUH4KXrpVVYSrrBxhDOYCFbEDCWLipF9bzRkqXUt/KXJs1TKL4F8JK\nccJ0YXFZRq74rjpoCUF0h4EUNhTsmFyxKWO80HXWH4KZld0xdLiFudN2Vxs+\nXemuP9SSf+efxxetjKvVkFQq4QLXwZ+sfRJp4XZIiB8/CBEIVstM7J9BSX72\nm6qhXSEMmhkxRpyfvEjUslj2jCimAFReb2qfpAbQC4tP+k/H2DXpgR8zHwhY\nlerXK3SWkJnvLCFkNJw86LRGLkF4ktPosr0T/xHtXEuPRZEbJc8TS2oR+Ez8\n8B/FC7WWe2+wRV9YLY1/Dx3Cm8f4EhyESscWrkFJR5bYDEx+O38Vri5Dtn4h\n15bT/9hXJlhqJnAr7vPz4ahn1PayzFrBtwe1N6/4Zq9KZ2SZg2FiDcM2xhod\nGpmebfdAhsZn52Lah17/E/wlnjUGZJ47zXwlYbm13GVYKNbS+D1KS0OGqkzA\nSadNYbC1uxQdbBwoBbHAn7FzwJaSghrm7Fgwd8lfxDvqmpP0hvrWUfvk3B+J\nfCM8\r\n=c0Si\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAOpOqwLdMJwco43BYYQVUn9U/Z1m1UVgIOMVOA6pSDQAiEAw9vZlWTPSY4UQpKaF1FEM8BIXQEWx/MlnwtTkxH7DeQ="}]},"_npmUser":{"name":"alterx","email":"clmvega@yahoo.com"},"directories":{},"maintainers":[{"name":"alterx","email":"clmvega@yahoo.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/gundb-expo-sqlite-adapter_0.1.0_1629568178830_0.4315097888735835"},"_hasShrinkwrap":false},"0.1.1":{"name":"@altrx/gundb-expo-sqlite-adapter","version":"0.1.1","description":"GunDB Expo SQLite Adapter","browser":"./dist/gundb-expo-sqlite-adapter.umd.js","umd:main":"./dist/gundb-expo-sqlite-adapter.umd.js","jsnext:main":"./dist/gundb-expo-sqlite-adapter.modern.js","main":"./dist/gundb-expo-sqlite-adapter.js","module":"./dist/gundb-expo-sqlite-adapter.module.js","unpkg":"./dist/gundb-expo-sqlite-adapter.umd.js","source":"./src/index.ts","types":"./dist/index.d.ts","typings":"./dist/index.d.ts","exports":{".":{"browser":"./dist/gundb-expo-sqlite-adapter.modern.js","umd":"./dist/gundb-expo-sqlite-adapter.umd.js","import":"./dist/gundb-expo-sqlite-adapter.module.js","require":"./dist/gundb-expo-sqlite-adapter.js"}},"repository":{"type":"git","url":"git+https://github.com/alterx/gundb-expo-sqlite-adapter.git"},"keywords":["preact","react","gun","gunDB","graph","document","key","value","relational","datastore","database","engine","realtime","decentralized","peer-to-peer","distributed","P2P","OSS","embedded","localstorage","S3"],"scripts":{"build":"rimraf dist && microbundle --define process.env.NODE_ENV=production --name @altrx/gundb-expo-sqlite-adapter --no-compress --output dist/","dev":"microbundle watch","test":"echo \"Error: no test specified\" && exit 1"},"author":{"name":"Carlos Vega"},"license":"MIT","peerDependencies":{},"devDependencies":{"@skypack/package-check":"^0.2.2","husky":"^4.2.5","microbundle":"^0.12.4","prettier":"^2.0.5","pretty-quick":"^2.0.1","react":"^16.13.1","react-dom":"^16.13.1","rimraf":"^3.0.2"},"husky":{"hooks":{"pre-commit":"pretty-quick --staged"}},"gitHead":"c0d3df0a872ba669d34cf0edf5d822d4b0786f71","bugs":{"url":"https://github.com/alterx/gundb-expo-sqlite-adapter/issues"},"homepage":"https://github.com/alterx/gundb-expo-sqlite-adapter#readme","_id":"@altrx/gundb-expo-sqlite-adapter@0.1.1","_nodeVersion":"14.2.0","_npmVersion":"6.14.9","dist":{"integrity":"sha512-g5rebC0ImSv6sc6QlaR3eLuDihRIJkYIqLw/TetdC+hINTbde8Vtjx+7GRFCqRF7RFkX12DtmhGJx03Wr3LWHA==","shasum":"5f2054f0067bd143730dc6b20219ad35291cb170","tarball":"https://registry.npmjs.org/@altrx/gundb-expo-sqlite-adapter/-/gundb-expo-sqlite-adapter-0.1.1.tgz","fileCount":12,"unpackedSize":42742,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhIT20CRA9TVsSAnZWagAAph8QAJCpwSp/qLqdDhYvnp+k\nVMJ6i19qz6/g2qylTy7/bB38mXMD8MtcO8KoVtFcJa1Fn2i+HRnYF6J1sGYy\nK/fAx7imSHrwb/qX0HyfJ0OAoDaz/D0Wvka0XJM+YZxy1/rBb7Zjhbg8FVTd\nXrhErafPCr5WZ9L7t9eh8Rcz7D+EBcapMSTwdIOP5Qytj4wIFXGToMVs9A1E\n0UyItSa+cttN9yM81Io3tb7W24F542KKvcBMDVMXrkAmh+n2dOyaazxow9Hv\neo542ZK+z4CG5Mby/roM/RFSKkjJLvpyGfbu+KV249Y3SHl3m2q+NjUP1TmV\naiw0ww0Tmct6Jq3rZs4h1SNV3iYnISojjvmUItz28MK6lF+lBDodtZXJOqaJ\nhD5ijA/F43TwDfFOZmpFLMmxYanoMIaN8PtlLgwn25dPggrIsYLZQxtPVQWU\nvhWDXJK20hVoDrOJvopMKhEwQuSmklsUf9ZkQTpwaUChrhytc0l6/QPja07n\nhI5t6QvsZpK2qV6F47x6wTRg1im2NHjgH5tlBUQMp9atperyKmq3BDZNg/aM\nAJ1jCeEb3ysi2htVcd7hfmwDQfmmIZGTN/eRWvFIUiNV4qv/Tta1dcDZs/1V\nEDMEqbPeQM+hjPVKMQhfsFT7gPdmjGKf3jFC7rqq2Y4mv2MiFXuLhymim7QB\nt0GR\r\n=nC/o\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCUjNo2m6wXOK/4hqhiMmLEnRDPovQL8Iuizg1QUl/05wIgWYnJPVM6i+zQX0QaFwtE5RhEkn8QHkGZU4kS4mw9NXU="}]},"_npmUser":{"name":"alterx","email":"clmvega@yahoo.com"},"directories":{},"maintainers":[{"name":"alterx","email":"clmvega@yahoo.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/gundb-expo-sqlite-adapter_0.1.1_1629568436027_0.209748572845315"},"_hasShrinkwrap":false}},"time":{"created":"2021-08-21T17:49:38.750Z","0.1.0":"2021-08-21T17:49:38.959Z","modified":"2022-04-04T13:40:41.892Z","0.1.1":"2021-08-21T17:53:56.162Z"},"maintainers":[{"name":"alterx","email":"clmvega@yahoo.com"}],"description":"GunDB Expo SQLite Adapter","homepage":"https://github.com/alterx/gundb-expo-sqlite-adapter#readme","keywords":["preact","react","gun","gunDB","graph","document","key","value","relational","datastore","database","engine","realtime","decentralized","peer-to-peer","distributed","P2P","OSS","embedded","localstorage","S3"],"repository":{"type":"git","url":"git+https://github.com/alterx/gundb-expo-sqlite-adapter.git"},"author":{"name":"Carlos Vega"},"bugs":{"url":"https://github.com/alterx/gundb-expo-sqlite-adapter/issues"},"license":"MIT","readme":"# GunDB Expo SQLite Adapter\n\nThis is an adapter that implements the RAD interface and writes to SQLite (expo-sqlite)\n\n## Installing\n\nUse `pnpm`, `npm` or `yarn` to install the dependencies:\n\n```\n$ npm i @altrx/gundb-expo-sqlite-adapter\n```\n\n### Basic Usage:\n\n```jsx harmony\nimport React, { useEffect, useState } from 'react';\nimport { StyleSheet, Text, TextInput, View, Button } from 'react-native';\nimport Constants from 'expo-constants';\nimport * as SQLite from 'expo-sqlite';\n\nimport Gun from 'gun';\nimport SEA from 'gun/sea';\nimport 'gun/lib/promise';\nimport 'gun/lib/radix';\nimport 'gun/lib/radisk';\nimport 'gun/lib/store';\nimport { makeStoreAdapter } from '@altrx/gundb-expo-sqlite-adapter';\n\nmakeStoreAdapter(Gun);\nconst gun = new Gun({\n  localStorage: false,\n  radisk: true,\n  sqlite: {\n    SQLite,\n    databaseName: 'todo.db',\n    onOpen: () => {},\n    onError: (err) => {\n      console.log('ERROR');\n    },\n    onReady: (err) => {\n      console.log('READY');\n    },\n  },\n});\n\nconst node = gun.get('hello');\n\nexport default function App() {\n  const [name, setName] = useState('');\n\n  useEffect(() => {\n    node.once((data, key) => {\n      let name = data?.name;\n      setName(name);\n    });\n\n    async function doWork() {\n      const workTest = await SEA.work('test', null, null, {\n        name: 'SHA-256',\n        encode: 'hex',\n      });\n      console.log(workTest);\n      const pair = await SEA.pair();\n      const other = await SEA.pair();\n      const msg = await SEA.sign('I wrote this message! You did not.', pair);\n      const test = await SEA.verify(msg, pair.pub); // message gets printed\n      const test2 = await SEA.verify(msg, other.pub); // error\n      console.log('No message', test2);\n      console.log('Message', test);\n\n      gun.on('auth', () => {\n        console.log('authenticated with keypair');\n      });\n\n      const namespace = gun.user();\n      namespace.auth(pair);\n    }\n    doWork();\n  }, []);\n\n  return (\n    <View style={styles.container}>\n      <Text style={styles.welcome}>Hello {name}</Text>\n\n      <View style={styles.flexRow}>\n        <TextInput\n          value={name}\n          onChangeText={(value) => setName(value)}\n          style={styles.input}\n        />\n      </View>\n      <Button\n        title=\"Update\"\n        onPress={() => {\n          node.put({ name });\n          setName(name);\n        }}\n      />\n    </View>\n  );\n}\n\nconst styles = StyleSheet.create({\n  container: {\n    backgroundColor: '#fff',\n    flex: 1,\n    paddingTop: Constants.statusBarHeight,\n  },\n  welcome: {\n    fontSize: 20,\n    fontWeight: 'bold',\n    textAlign: 'center',\n  },\n  flexRow: {\n    flexDirection: 'row',\n  },\n  input: {\n    borderColor: '#4630eb',\n    borderRadius: 4,\n    borderWidth: 1,\n    flex: 1,\n    height: 48,\n    margin: 16,\n    padding: 8,\n  },\n});\n```\n\n## License\n\nLicensed under [MIT](https://github.com/alterx/gundb-expo-sqlite-adapter/blob/master/LICENSE.md).\n","readmeFilename":"README.md"}