{"id":22483981,"url":"https://github.com/deltachat/deltachat-node","last_synced_at":"2025-08-02T17:31:33.974Z","repository":{"id":32805667,"uuid":"141765734","full_name":"deltachat/deltachat-node","owner":"deltachat","description":"Email-based instant messaging for Node.js.","archived":true,"fork":false,"pushed_at":"2022-05-16T11:16:42.000Z","size":2594,"stargazers_count":46,"open_issues_count":6,"forks_count":10,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-07-17T12:08:56.806Z","etag":null,"topics":["bindings","deltachat","javascript"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/deltachat.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-07-20T23:17:32.000Z","updated_at":"2025-07-14T09:10:45.000Z","dependencies_parsed_at":"2022-08-08T05:15:17.070Z","dependency_job_id":null,"html_url":"https://github.com/deltachat/deltachat-node","commit_stats":null,"previous_names":[],"tags_count":144,"template":false,"template_full_name":null,"purl":"pkg:github/deltachat/deltachat-node","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deltachat%2Fdeltachat-node","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deltachat%2Fdeltachat-node/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deltachat%2Fdeltachat-node/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deltachat%2Fdeltachat-node/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/deltachat","download_url":"https://codeload.github.com/deltachat/deltachat-node/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deltachat%2Fdeltachat-node/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266210075,"owners_count":23893306,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bindings","deltachat","javascript"],"created_at":"2024-12-06T17:10:02.280Z","updated_at":"2025-08-02T17:31:33.943Z","avatar_url":"https://github.com/deltachat.png","language":"C","funding_links":[],"categories":["C"],"sub_categories":[],"readme":"# IMPORTANT: This repo is deprecated! - deltachat-node has moved to core repo.\n\ndeltachat-node **was moved** to the core repo in [deltachat-core-rust#3283](https://github.com/deltachat/deltachat-core-rust/pull/3283).\n\n**New location**: \u003chttps://github.com/deltachat/deltachat-core-rust/tree/master/node\u003e\n\n# deltachat-node\n\n\u003e node.js bindings for [`deltachat-core-rust`][deltachat-core-rust]\n\n[![npm](https://img.shields.io/npm/v/deltachat-node.svg)](https://www.npmjs.com/package/deltachat-node)\n![Node version](https://img.shields.io/node/v/deltachat-node.svg)\n[![Coverage Status](https://coveralls.io/repos/github/deltachat/deltachat-node/badge.svg)](https://coveralls.io/github/deltachat/deltachat-node)\n[![dependencies](https://david-dm.org/deltachat/deltachat-node.svg)](https://david-dm.org/deltachat/deltachat-node)\n[![JavaScript Style Guide](https://img.shields.io/badge/code_style-prettier-brightgreen.svg)](https://prettier.io)\n\n**If you are upgrading:** please see [`UPGRADING.md`](UPGRADING.md).\n\n`deltachat-node` primarily aims to offer two things:\n\n- A high level JavaScript api with syntactic sugar\n- A low level c binding api around  [`deltachat-core-rust`][deltachat-core-rust]\n\n## Table of Contents\n\n\u003cdetails\u003e\u003csummary\u003eClick to expand\u003c/summary\u003e\n\n- [Install](#install)\n- [Dependencies](#dependencies)\n- [Build from source](#build-from-source)\n- [Usage](#usage)\n- [Developing](#developing)\n- [License](#license)\n\n\u003c/details\u003e\n\n## Install\n\nBy default the installation will build try to use the bundled prebuilds in the\nnpm package. If this fails it falls back to compile the bundled \n`deltachat-core-rust` from the submodule using `scripts/rebuild-core.js`. \nTo install from npm use:\n\n```\nnpm install deltchat-node\n```\n\n## Dependencies\n\n- Nodejs \u003e= `v16.0.0`\n- rustup (optional if you can't use the prebuilds)\n\n\u003e On Windows, you may need to also install **Perl** to be able to compile deltachat-core.\n\n## Build from source\n\nIf you want to build from source, make sure that you have `rustup` installed.\nYou can either use `npm install deltachat-node --build-from-source` to force\nbuilding from source or clone this repository and follow this steps:\n\n1. `git clone https://github.com/deltachat/deltachat-node.git`\n2. `cd deltachat-node`\n3. `npm i`\n\n### Workaround to build for x86_64 on Apple's M1\n\ndeltachat doesn't support universal (fat) binaries (that contain builds for both cpu architectures) yet, until it does you can use the following workaround to get x86_64 builds:\n\n```\n$ fnm install 17 --arch x64\n$ fnm use 17\n$ node -p process.arch\n# result should be x64\n$ cd deltachat-core-rust \u0026\u0026 rustup target add x86_64-apple-darwin \u0026\u0026 cd -\n$ git apply patches/m1_build_use_x86_64.patch\n$ CARGO_BUILD_TARGET=x86_64-apple-darwin npm run build\n$ npm run test\n```\n\n(when using [fnm](https://github.com/Schniz/fnm) instead of nvm, you can select the architecture)\nIf your node and electron are already build for arm64 you can also try bulding for arm:\n\n```\n$ fnm install 16 --arch arm64\n$ fnm use 16\n$ node -p process.arch\n# result should be arm64\n$ npm_config_arch=arm64 npm run build\n$ npm run test\n```\n\n## Usage\n\n```js\nconst { Context } = require('deltachat-node')\n\nconst opts = {\n  addr: '[email]',\n  mail_pw: '[password]',\n}\n\nconst contact = '[email]'\n\nasync function main() {\n  const dc = Context.open('./')\n  dc.on('ALL', console.log.bind(null, 'core |'))\n\n  try {\n    await dc.configure(opts)\n  } catch (err) {\n    console.error('Failed to configure because of: ', err)\n    dc.unref()\n    return\n  }\n\n  dc.startIO()\n  console.log('fully configured')\n\n  const contactId = dc.createContact('Test', contact)\n  const chatId = dc.createChatByContactId(contactId)\n  dc.sendMessage(chatId, 'Hi!')\n\n  console.log('sent message')\n\n  dc.once('DC_EVENT_SMTP_MESSAGE_SENT', async () =\u003e {\n    console.log('Message sent, shutting down...')\n    dc.stopIO()\n    console.log('stopped io')\n    dc.unref()\n  })\n}\n\nmain()\n```\nthis example can also be found in the examples folder [examples/send_message.js](./examples/send_message.js)\n\n### Generating Docs\n\nWe are curently migrating to automaticaly generated documentation.\nYou can find the old documentation at [old_docs](./old_docs).\n\nto generate the documentation, run:\n\n```\nnpx typedoc\n```\n\nThe resulting documentation can be found in the `docs/` folder.\nAn online version can be found under [js.delta.chat](https://js.delta.chat).\n\n## Developing\n\n### Tests and Coverage\n\nRunning `npm test` ends with showing a code coverage report, which is produced by [`nyc`](https://github.com/istanbuljs/nyc#readme).\n\n![test output](images/tests.png)\n\nThe coverage report from `nyc` in the console is rather limited. To get a more detailed coverage report you can run `npm run coverage-html-report`. This will produce a html report from the `nyc` data and display it in a browser on your local machine.\n\nTo run the integration tests you need to set the `DCC_NEW_TMP_EMAIL` environment variables. E.g.:\n\n```\n$ export DCC_NEW_TMP_EMAIL=https://testrun.org/new_email?t=[token]\n$ npm run test\n```\n\n### Scripts\n\nWe have the following scripts for building, testing and coverage:\n\n- `npm run coverage` Creates a coverage report and passes it to `coveralls`. Only done by `Travis`.\n- `npm run coverage-html-report` Generates a html report from the coverage data and opens it in a browser on the local machine.\n- `npm run generate-constants` Generates `constants.js` and `events.js` based on the `deltachat-core-rust/deltachat-ffi/deltachat.h` header file.\n- `npm install` After dependencies are installed, runs `node-gyp-build` to see if the native code needs to be rebuilt.\n- `npm run build` Rebuilds all code.\n- `npm run build:core` Rebuilds code in `deltachat-core-rust`.\n- `npm run build:bindings` Rebuilds the bindings and links with `deltachat-core-rust`.\n- `ǹpm run clean` Removes all built code\n- `npm run prebuildify` Builds prebuilt binary to `prebuilds/$PLATFORM-$ARCH`. Copies `deltachat.dll` from `deltachat-core-rust` for windows.\n- `npm run download-prebuilds` Downloads all prebuilt binaries from github before `npm publish`.\n- `npm run submodule` Updates the `deltachat-core-rust` submodule.\n- `npm test` Runs `standard` and then the tests in `test/index.js`.\n- `npm run test-integration` Runs the integration tests.\n- `npm run hallmark` Runs `hallmark` on all markdown files.\n\n### Releases\n\nThe following steps are needed to make a release:\n\n1. Update `CHANGELOG.md` (and run `npm run hallmark` to adjust markdown)\n\n- Add release changelog in top section\n- Also adjust links to github prepare links at the end of the file\n\n2. Bump version number in package.json\n3. Commit the changed files, commit message should be similiar to `Prepare for v1.0.0-foo.number`\n4. Tag the release with `git tag -a v1.0.0-foo.number`\n5. Push to github with `git push origin master --tags`\n6. Wait until `Make Package` github action is completed\n7. Download `deltachat-node.tgz` from the github release and run `npm publish deltachat-node.tgz` to publish it to npm. You probably need write rights to npm.\n\n## License\n\nLicensed under `GPL-3.0-or-later`, see [LICENSE](./LICENSE) file for details.\n\n\u003e    Copyright © 2018 `DeltaChat` contributors.\n\u003e\n\u003e    This program is free software: you can redistribute it and/or modify\n\u003e    it under the terms of the GNU General Public License as published by\n\u003e    the Free Software Foundation, either version 3 of the License, or\n\u003e    (at your option) any later version.\n\u003e\n\u003e    This program is distributed in the hope that it will be useful,\n\u003e    but WITHOUT ANY WARRANTY; without even the implied warranty of\n\u003e    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n\u003e    GNU General Public License for more details.\n\u003e\n\u003e    You should have received a copy of the GNU General Public License\n\u003e    along with this program.  If not, see \u003chttp://www.gnu.org/licenses/\u003e.\n\n[deltachat-core-rust]: https://github.com/deltachat/deltachat-core-rust\n\n[appveyor-shield]: https://ci.appveyor.com/api/projects/status/t0narp672wpbl6pd?svg=true\n\n[appveyor]: https://ci.appveyor.com/project/ralphtheninja/deltachat-node-d4bf8\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeltachat%2Fdeltachat-node","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdeltachat%2Fdeltachat-node","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeltachat%2Fdeltachat-node/lists"}