{"versions":{"3.2.15":{"name":"@matrix-org/olm","version":"3.2.15","description":"An implementation of the Double Ratchet cryptographic ratchet","main":"olm.js","scripts":{"build":"make -C .. js","test":"jasmine --config=test/jasmine.json"},"repository":{"type":"git","url":"git+https://gitlab.matrix.org/matrix-org/olm.git"},"keywords":["matrix-org"],"author":{"name":"matrix.org"},"license":"Apache-2.0","bugs":{"url":"https://github.com/matrix-org/olm/issues"},"homepage":"https://gitlab.matrix.org/matrix-org/olm","devDependencies":{"jasmine":"^3.0.0"},"_id":"@matrix-org/olm@3.2.15","dist":{"shasum":"55f3c1b70a21bbee3f9195cecd6846b1083451ec","integrity":"sha512-S7lOrndAK9/8qOtaTq/WhttJC/o4GAzdfK0MUPpo8ApzsJEC0QjtwrkC3KBXdFP1cD1MXi/mlKR7aaoVMKgs6Q==","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/@matrix-org/olm/-/olm-3.2.15.tgz","fileCount":9,"unpackedSize":651084,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDTn3aSVO8pqz0kWG7FXlLqvewnQMiop3VmqsHiMABvhAIhAPLVKj5vDzjar27s/0G4uy+PyALNYokzbto3wYI4X304"}],"size":220464},"_npmUser":{"name":"anonymous","email":"web-releases@element.io"},"directories":{},"maintainers":[{"name":"anonymous","email":"web-releases@element.io"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/olm_3.2.15_1698430923048_0.5990395748847086"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2023-10-27T18:22:03.249Z","publish_time":1698430923249,"_source_registry_name":"default","contributors":[]}},"dist-tags":{"latest":"3.2.15"},"name":"@matrix-org/olm","time":{"created":"2023-10-27T18:32:22.567Z","modified":"2026-08-21T15:51:26.371Z","3.2.15":"2023-10-27T18:22:03.249Z"},"readme":"Olm\n===\n\nNote: before using any of the olm functions, you must call `Olm.init()`, and\nwait for the promise to resolve, otherwise you will get errors like:\n`Uncaught TypeError: Olm.Account is not a constructor`\n\nIf you get errors about failure to compile the wasm file, it is likely that Olm\nis not locating the wasm file properly.  You can tell Olm where the wasm file\nis by passing a `locateFile` parameter to `Olm.init()`, for example:\n`Olm.init({locateFile: () => pathToWasmFile})`.\n\nExample:\n\n    var alice = new Olm.Account();\n    var bob = new Olm.Account();\n    alice.create();\n    bob.create();\n    bob.generate_one_time_keys(1);\n\n    var bobs_id_keys = JSON.parse(bob.identity_keys());\n    var bobs_id_key = bobs_id_keys.curve25519;\n    var bobs_ot_keys = JSON.parse(bob.one_time_keys());\n    for (key in bobs_ot_keys.curve25519) {\n        var bobs_ot_key = bobs_ot_keys.curve25519[key];\n    }\n\n    alice_session = new Olm.Session();\n    alice_session.create_outbound(alice, bobs_id_key, bobs_ot_key);\n    alice_message = a_session.encrypt(\"Hello\");\n\n    bob_session.create_inbound(bob, bob_message);\n    var plaintext = bob_session.decrypt(message_1.type, bob_message);\n    bob.remove_one_time_keys(bob_session);\n\n\nGroup chat:\n\n    var outbound_session = new Olm.OutboundGroupSession();\n    outbound_session.create();\n\n    // exchange these over a secure channel\n    var session_id = group_session.session_id();\n    var session_key = group_session.session_key();\n    var message_index = group_session.message_index();\n\n    var inbound_session = new Olm.InboundGroupSession();\n    inbound_session.create(message_index, session_key);\n\n    var ciphertext = outbound_session.encrypt(\"Hello\");\n    var plaintext = inbound_session.decrypt(ciphertext);","users":{}}