{"_id":"@aries-framework/transport-ble","_rev":"3-fe3e10755e3349bb4a9d14b8b926a048","name":"@aries-framework/transport-ble","dist-tags":{"latest":"0.2.1"},"versions":{"0.1.0":{"name":"@aries-framework/transport-ble","main":"build/index","types":"build/index","version":"0.1.0","publishConfig":{"access":"public"},"license":"Apache-2.0","description":"Bluetooth Low Energy transport for Aries Framework JavaScript","homepage":"https://github.com/hyperledger/aries-framework-javascript-ext/tree/main/packages/transport-ble","repository":{"type":"git","url":"git+https://github.com/hyperledger/aries-framework-javascript-ext.git","directory":"packages/transport-ble"},"scripts":{"build":"yarn run clean && yarn run compile","clean":"rimraf -rf ./build","compile":"tsc -p tsconfig.build.json","prepublishOnly":"yarn run build"},"devDependencies":{"@animo-id/react-native-ble-didcomm":"^0.4.2","@aries-framework/core":"^0.3.2","@types/react-native":"0.60.6","react-native":"0.62.3","rimraf":"^3.0.2","typescript":"^4.4.2"},"peerDependencies":{"@animo-id/react-native-ble-didcomm":"^0.4.2","@aries-framework/core":"^0.3.2","react-native":">=0.60.6"},"gitHead":"3712cb2d88ba9a2ea6ada9cb0e57351c3987f872","bugs":{"url":"https://github.com/hyperledger/aries-framework-javascript-ext/issues"},"_id":"@aries-framework/transport-ble@0.1.0","_nodeVersion":"16.19.1","_npmVersion":"8.19.3","dist":{"integrity":"sha512-xRGfu8lv4Z6Q8gXJqnNK9e9tTXRB9R0jbd5+vkY60LAQwMEKh7Gr1jbCfhAdktOWbSBrKUBAfPImYI/pwmgoyA==","shasum":"df0f354e222af74537c406055e15da913c4d1ca2","tarball":"https://registry.npmjs.org/@aries-framework/transport-ble/-/transport-ble-0.1.0.tgz","fileCount":17,"unpackedSize":19145,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD+TPUYxl10icFWkE8Gzxnuh4ysfgulJVn9LfLidD9a9AIhAKrAt18HC6WDn1siRs2Aln0q4OmSz8CUBQinnTp1yb0h"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkIYGuACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmousA/8DSnI2imKVE54mET8HAI2J+DHel6Lk8G7gIycb3d/kemillRa\r\nmdW+EiE+TsNUudVcefkKa2loK+qdE5792pRayWVUA3/OTG8CYwF4avMGVhEx\r\nOmnhyU/EdK0R4qesjsydy+l6yF51LNeSpi1T2ZZLto/K88owMmF4+PhowbGg\r\ngm/I8WwS6AFsNY1NzidJwTUw5mtDoVoVibKk9JFjB3Lo8XWV6BMHtuZFgWPF\r\nZn2dkx97XYa6KYbl4yt2PnFMsDk3urU7I/xPo/z/ivZHVtsxnSf+gLsBq279\r\nw4zugLsArP5S93miv/3SLPT1bCQv/5kT5bNHXpKnka/KbKaiwFlGYdnBtAKk\r\nM1tBGCKyjxr6uRF5ctLP7iH/m0YTgPjYj+94P/2vbgLHfp1Niv8aNG8FPVC3\r\n+cStjjL0H7yv+NuBdYxTrX2PnUcIazbM3d8M5juXTvmb1bZxSNhRNLdBBD9V\r\n5xv0xDbtWxeN15vJCXaYf36tbG6Z4RD27jYmAhnU9fSQkowXbR8GD2Lk2mHH\r\ngwzn0ABIzUcmZpV2TUPYSIYa54D2zvyhcKbdRtCWUKuQCTR9OcpaSYygLMbB\r\nExEkaZC8rer0AptlfiqTsbjstLtm+eRFNONoXbXIf2RwtI0siTNHIgc+OUZ9\r\nYs0lUpKr0tdhh4sLKO9mWWvWXcqamSb3Zkc=\r\n=+5Lb\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"hyperledger-ghci","email":"npm-ci@hyperledger.org"},"directories":{},"maintainers":[{"name":"hyperledger-ghci","email":"npm-ci@hyperledger.org"},{"name":"timoglastra","email":"timo@glastra.me"},{"name":"hyperledger-lf","email":"npm@hyperledger.org"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/transport-ble_0.1.0_1679917486135_0.8334763982549442"},"_hasShrinkwrap":false},"0.2.0":{"name":"@aries-framework/transport-ble","main":"build/index","types":"build/index","version":"0.2.0","publishConfig":{"access":"public"},"license":"Apache-2.0","description":"Bluetooth Low Energy transport for Aries Framework JavaScript","homepage":"https://github.com/hyperledger/aries-framework-javascript-ext/tree/main/packages/transport-ble","repository":{"type":"git","url":"git+https://github.com/hyperledger/aries-framework-javascript-ext.git","directory":"packages/transport-ble"},"scripts":{"build":"yarn run clean && yarn run compile","clean":"rimraf -rf ./build","compile":"tsc -p tsconfig.build.json","prepublishOnly":"yarn run build"},"devDependencies":{"@animo-id/react-native-ble-didcomm":"^0.5.1","@aries-framework/core":"0.4.0","react-native":"0.72.0"},"peerDependencies":{"@animo-id/react-native-ble-didcomm":"^0.5.1","@aries-framework/core":"^0.4.0","react-native":">=0.60.6"},"gitHead":"6827127fafb7cdf2b0d94c1959b233471e69f2eb","bugs":{"url":"https://github.com/hyperledger/aries-framework-javascript-ext/issues"},"_id":"@aries-framework/transport-ble@0.2.0","_nodeVersion":"16.20.1","_npmVersion":"8.19.4","dist":{"integrity":"sha512-E0IhUh3ROI+BlZF13A69tlftOmLq745Zt7POE6mLzMW/2s6poZukLak1KwxOXDIMX9uL3aOR0X3nXfzWvivZeA==","shasum":"856d75d52cb28ff62e55e1c5171bc119af176995","tarball":"https://registry.npmjs.org/@aries-framework/transport-ble/-/transport-ble-0.2.0.tgz","fileCount":17,"unpackedSize":18951,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHLdgl3FOT1Fjie76iSFfSfi0s4/7Pn7sVyxeq4VKPUmAiEApDmDoRA3fshVcP4pTa9a11WaCrGaR8POmaueu/BFffs="}]},"_npmUser":{"name":"hyperledger-ghci","email":"npm-ci@hyperledger.org"},"directories":{},"maintainers":[{"name":"hyperledger-ghci","email":"npm-ci@hyperledger.org"},{"name":"timoglastra","email":"timo@glastra.me"},{"name":"hyperledger-lf","email":"npm@hyperledger.org"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/transport-ble_0.2.0_1688041690703_0.9738605728855034"},"_hasShrinkwrap":false},"0.2.1":{"name":"@aries-framework/transport-ble","main":"build/index","types":"build/index","version":"0.2.1","publishConfig":{"access":"public"},"license":"Apache-2.0","description":"Bluetooth Low Energy transport for Aries Framework JavaScript","homepage":"https://github.com/hyperledger/aries-framework-javascript-ext/tree/main/packages/transport-ble","repository":{"type":"git","url":"git+https://github.com/hyperledger/aries-framework-javascript-ext.git","directory":"packages/transport-ble"},"scripts":{"build":"yarn run clean && yarn run compile","clean":"rimraf -rf ./build","compile":"tsc -p tsconfig.build.json","prepublishOnly":"yarn run build"},"devDependencies":{"@animo-id/react-native-ble-didcomm":"^0.5.1","@aries-framework/core":"0.4.0","react-native":"0.72.0"},"peerDependencies":{"@animo-id/react-native-ble-didcomm":"^0.5.1","@aries-framework/core":"^0.4.0","react-native":">=0.60.6"},"gitHead":"7bd3e43b7e138d4ae4af1687c8acd9d3642d5722","bugs":{"url":"https://github.com/hyperledger/aries-framework-javascript-ext/issues"},"_id":"@aries-framework/transport-ble@0.2.1","_nodeVersion":"16.20.2","_npmVersion":"8.19.4","dist":{"integrity":"sha512-thmeudiHvuGz8gnfG266QEZQgS8xZMLSE5spVQ9jfLucJgXQ6v7NHOCCkwJWdyjCjiqJP+55GkyCIjTENO03Sg==","shasum":"779dbdaac9b2164a6ddfa36cec9d39d38a03984d","tarball":"https://registry.npmjs.org/@aries-framework/transport-ble/-/transport-ble-0.2.1.tgz","fileCount":17,"unpackedSize":19032,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCrFpj4IcNH9uosk85UtcITfSZfLUCH3xa1ePAEKZSXTAIhANNLzSgiaklpXyrFRwGusORZQ4aa0C6yibfx001ax+jo"}]},"_npmUser":{"name":"hyperledger-ghci","email":"npm-ci@hyperledger.org"},"directories":{},"maintainers":[{"name":"hyperledger-ghci","email":"npm-ci@hyperledger.org"},{"name":"timoglastra","email":"timo@glastra.me"},{"name":"hyperledger-lf","email":"npm@hyperledger.org"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/transport-ble_0.2.1_1695028479977_0.8579229087328122"},"_hasShrinkwrap":false}},"time":{"created":"2023-03-27T11:44:46.041Z","0.1.0":"2023-03-27T11:44:46.276Z","modified":"2023-12-21T14:38:44.292Z","0.2.0":"2023-06-29T12:28:10.901Z","0.2.1":"2023-09-18T09:14:40.128Z"},"maintainers":[{"email":"ry@openwallet.foundation","name":"openwalletfoundation"},{"email":"npm-ci@hyperledger.org","name":"hyperledger-ghci"},{"email":"timo@glastra.me","name":"timoglastra"},{"email":"npm@hyperledger.org","name":"hyperledger-lf"}],"description":"Bluetooth Low Energy transport for Aries Framework JavaScript","homepage":"https://github.com/hyperledger/aries-framework-javascript-ext/tree/main/packages/transport-ble","repository":{"type":"git","url":"git+https://github.com/hyperledger/aries-framework-javascript-ext.git","directory":"packages/transport-ble"},"bugs":{"url":"https://github.com/hyperledger/aries-framework-javascript-ext/issues"},"license":"Apache-2.0","readme":"<p align=\"center\">\n  <br />\n  <img\n    alt=\"Hyperledger Aries logo\"\n    src=\"https://raw.githubusercontent.com/hyperledger/aries-framework-javascript/aa31131825e3331dc93694bc58414d955dcb1129/images/aries-logo.png\"\n    height=\"250px\"\n  />\n</p>\n<h1 align=\"center\"><b>Bluetooth Low Energy transport for Aries Framework JavaScript</b></h1>\n<p align=\"center\">\n  <a\n    href=\"https://raw.githubusercontent.com/hyperledger/aries-framework-javascript-ext/main/LICENSE\"\n    ><img\n      alt=\"License\"\n      src=\"https://img.shields.io/badge/License-Apache%202.0-blue.svg\"\n  /></a>\n  <a href=\"https://www.typescriptlang.org/\"\n    ><img\n      alt=\"typescript\"\n      src=\"https://img.shields.io/badge/%3C%2F%3E-TypeScript-%230074c1.svg\"\n  /></a>\n    <a href=\"https://www.npmjs.com/package/@aries-framework/transport-ble\"\n    ><img\n      alt=\"@aries-framework/transport-ble version\"\n      src=\"https://img.shield.io/npm/v/@aries-framework/transport-ble\"\n  /></a>\n  <br />\n</p>\n\nThe Aries Framework JavaScript (AFJ) BLE Transport package provides a simple way to add Bluetooth Low Energy (BLE) data transport into AFJ React Native mobile agents.\n\nIt implements the same transport interface as the outbound transports in [@aries-framework/core](https://www.npmjs.com/package/@aries-framework/core), and the inbound transports in [@aries-framework/node](https://www.npmjs.com/package/@aries-framework/node).\n\nWith this transport enabled, AFJ React Native mobile agents gain the ability to do offline DIDComm exchanges using Bluetooth Low Energy (BLE).\n\nTo keep this transport implementation focused on the 'DIDComm' wrapper needed to make it useful to AFJ agents, this transport package is built on this [BLE DIDComm SDK](https://www.npmjs.com/package/@animo-id/react-native-ble-didcomm).\n\nThe **BLE DIDComm SDK** implements the core Bluetooth hardware interface for Android (in Kotlin) and iOS (Swift), and exposes the simple APIs that this BLE transport implementation uses.\n\nAnd to keep the implementation simple, this transport only implements the core message listening and receiving functionality, and leaves the powerful startup and service controls provided by the BLE DIDComm SDK, to user control and discretion.\n\nWe're this discussing if this is the best approach to use in future versions. If after using this first version and you have strong opinions on this, kindly join the conversation [here](https://github.com/hyperledger/aries-framework-javascript-ext/issues/197).\n\n## Installing the required dependencies\n\n```sh\nyarn add @aries-framework/transport-ble @aries-framework/core @aries-framework/react-native @animo-id/react-native-ble-didcomm\n```\n\n## Configuration\n\nConfiguring your agent to use the transport is simple; all you need is to import the transports, `BleOutboundTransport` and `BleInboundTransport`, from the package, and register them on the agent, either before or after agent initialization.\n\nThe only difference is that unlike HTTP and WebSockets, an agent can only register one of either outbound, `BleOutboundTransport`, or inbound, `BleInboundTransport`, transport, depending on which role the agent wants to take in the BLE DIDComm exchange.\n\nThe BLE DIDComm SDK provides two controllers: `Central`, to be used by the agent who will be initiating the exchange (creating and sending the out-of-band invitation), and `Peripheral`, for the agent who will be receiving and accepting the invitation.\n\nThis means that the agent acting as the connection initiator should use the `Central` controller with `BleInboundTransport`, while the agent acting as the connection receptor uses the Peripheral controller with `BleOutboundTransport`.\n\n```ts\n// If you want to register the transports only after initializing the agent, you can do this anywhere else in your app, and just leave out the agent config and initialization\n\nimport { BleOutboundTransport, BleInboundTransport } from '@aries-framework/transport-ble'\nimport { Agent } from '@aries-framework/core'\nimport { agentDependencies } from '@aries-framework/react-native'\nimport {\n  Central,\n  Peripheral,\n  DEFAULT_DIDCOMM_SERVICE_CHARACTERISTIC_UUID,\n  DEFAULT_DIDCOMM_MESSAGE_CHARACTERISTIC_UUID,\n  DEFAULT_DIDCOMM_INDICATE_CHARACTERISTIC_UUID,\n} from '@animo-id/react-native-ble-didcomm'\n\nconst createAgent = async () => {\n  const agent = new Agent({\n    config: {\n      // ... AFJ Config ... //\n    },\n    modules: {\n      // ... AFJ Module config\n    },\n    dependencies: agentDependencies,\n  })\n\n  // Instantiate the BLE controller you want\n  const central = new Central() // const peripheral = new Peripheral() for the peripheral agent\n\n  // It is important that you start the BLE controllers before you use/register them on your agent\n  await central.start() // await peripheral.start()\n\n  /* IMPORTANT: Setting up the service, messaging and indication UUIDs. \n  The values passed must be the same in the central and peripheral, \n  as this is how both devices will be able to recognize each other. \n  There are default values for these that can be imported, \n  but if you want to maintain control over the sessions and/or prevent collisions \n  (due to multiple other devices broadcasting using these same values), \n  you might want to generate your own serviceUUID and share it across both mobile agents \n  (using a scannable QR code or something similar that allows easy sharing with little overhead)\n  \n  This can be done anywhere after starting the controller (step above), \n  even after registering the controller as a transport on the agent (step below) */\n\n  const uuid = '56847593-40ea-4a92-bd8c-e1514dca1c61'\n  await central.setService({\n    serviceUUID: uuid || DEFAULT_DIDCOMM_SERVICE_CHARACTERISTIC_UUID,\n    messagingUUID: DEFAULT_DIDCOMM_MESSAGE_CHARACTERISTIC_UUID,\n    indicationUUID: DEFAULT_DIDCOMM_INDICATE_CHARACTERISTIC_UUID,\n  })\n\n  /* On the peripheral agent\n    await peripheral.setService({\n      serviceUUID: uuid || DEFAULT_DIDCOMM_SERVICE_CHARACTERISTIC_UUID,\n      messagingUUID: DEFAULT_DIDCOMM_MESSAGE_CHARACTERISTIC_UUID,\n      indicationUUID: DEFAULT_DIDCOMM_INDICATE_CHARACTERISTIC_UUID\n    })\n  */\n\n  // Registering the controller as a transport on the agent\n  const bleInboundTransport = new BleInboundTransport(central) // const bleOutboundTransport = new BleOutboundTransport(peripheral)\n  agent.registerInboundTransport(bleInboundTransport) // agent.registerOutboundTransport(bleOutboundTransport)\n\n  await agent.initialize()\n\n  return agent\n}\n\n// Inside your React Native app/component\nconst agent = await createAgent()\n```\n","readmeFilename":"README.md"}