{"id":13746315,"url":"https://github.com/machinomy/machinomy","last_synced_at":"2025-05-09T07:30:34.266Z","repository":{"id":57127271,"uuid":"72648145","full_name":"machinomy/machinomy","owner":"machinomy","description":"Node.js library for micropayments in Ether and ERC20 tokens over HTTP","archived":true,"fork":false,"pushed_at":"2019-05-06T22:56:21.000Z","size":2693,"stargazers_count":166,"open_issues_count":15,"forks_count":40,"subscribers_count":14,"default_branch":"master","last_synced_at":"2025-04-23T05:46:46.488Z","etag":null,"topics":["ethereum","javascript","micropayments","state-channels"],"latest_commit_sha":null,"homepage":"http://machinomy.com","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/machinomy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-11-02T14:32:02.000Z","updated_at":"2024-11-30T15:27:56.000Z","dependencies_parsed_at":"2022-08-31T17:20:20.669Z","dependency_job_id":null,"html_url":"https://github.com/machinomy/machinomy","commit_stats":null,"previous_names":[],"tags_count":223,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/machinomy%2Fmachinomy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/machinomy%2Fmachinomy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/machinomy%2Fmachinomy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/machinomy%2Fmachinomy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/machinomy","download_url":"https://codeload.github.com/machinomy/machinomy/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253209234,"owners_count":21871613,"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":["ethereum","javascript","micropayments","state-channels"],"created_at":"2024-08-03T06:00:51.596Z","updated_at":"2025-05-09T07:30:33.773Z","avatar_url":"https://github.com/machinomy.png","language":"TypeScript","funding_links":[],"categories":["Machionmy"],"sub_categories":["Basic Information"],"readme":"# Machinomy Monorepo [![Build Status][travis-img]][travis] [![Coverage Status][codecov-img]][codecov] [![Greenkeeper badge](https://badges.greenkeeper.io/machinomy/machinomy.svg)](https://greenkeeper.io/) [![Chat][gitter-img]][gitter]\n\n[travis]: https://travis-ci.org/machinomy/machinomy\n[travis-img]: https://travis-ci.org/machinomy/machinomy.svg?branch=master\n[codecov]: https://codecov.io/gh/machinomy/machinomy\n[codecov-img]: https://codecov.io/gh/machinomy/machinomy/branch/master/graph/badge.svg \n[gitter]: https://gitter.im/machinomy/machinomy\n[gitter-img]: https://img.shields.io/gitter/room/machinomy/machinomy.js.svg\n\nMachinomy Lerna Monorepo repository.\n\nAvailable sub-projects:\n- [Machinomy](packages/machinomy) is a Node.js library for micropayments in Ether over HTTP. It allows you to send and receive a minuscule amount of money instantly.\n- [Contracts](packages/contracts) is a TypeScript interface for Ethereum contracts managed by [Truffle](https://github.com/trufflesuite/truffle) used by [Machinomy](packages/machinomy).\n- [Examples](packages/examples) is [Machinomy](packages/machinomy) examples.\n- [Playground](packages/playground) contains code of playground.machinomy.com\n- [cli](packages/cli) is Machinomy Command Line Interface.\n- [logger](packages/logger) is Machinomy Logger. Works in browser and Node.\n- [wraptso](packages/wraptso) is Machinomy Wrapper for Truffle Contract.\n\n\nWeb site: [machinomy.com](http://machinomy.com).\nTwitter: [@machinomy](http://twitter.com/machinomy).\nSupport/Discussion: [Gitter](https://gitter.im/machinomy/machinomy).\nFAQ: [GitHub Wiki Page](https://github.com/machinomy/machinomy/wiki/Frequently-Asked-Questions).\n\n## Installation\n\nUsing [yarn](https://yarnpkg.com/lang/en/) and Node.js **v9** is mandatory (**don't use npm!**)\n\n    $ yarn add machinomy\n\nThe library supports mainnet, Ropsten, and [Rinkeby](https://www.rinkeby.io/) networks.\n\n## Tinkering\n\nIt takes two to tango: a seller and a buyer. Seller is `packages/examples/src/server.ts` script. Build it or run through node-ts.\n```\n$ git clone https://github.com/machinomy/machinomy\n$ cd machinomy \u0026\u0026 yarn install \u0026\u0026 yarn bootstrap \u0026\u0026 yarn build\n$ node packages/examples/src/server.js\n```\n\nAnd then run client script:\n\n```\n$ node packages/examples/src/client.js\n```\n\n## Usage\n\n### Buy\n\nUsing TypeScript\n\n```typescript\nimport Machinomy from 'machinomy'\nconst uri = 'http://localhost:3000/content'\n\nconst machinomy = new Machinomy(SENDER_ACCOUNT, web3)\nconst contents = await machinomy.buy({ receiver: RECEIVER_ACCOUNT, price: 100, gateway: 'http://localhost:3001/accept' })\nconsole.log(contents)\n```\n\n### Sell\n\nThe process is more convoluted than buying. Better consult [packages/examples/src/server.ts](packages/examples/src/server.ts) file.\n\n### Sending payments through channels\n\n```\n$ git clone https://github.com/machinomy/machinomy\n$ cd machinomy \u0026\u0026 yarn install \u0026\u0026 yarn bootstrap \u0026\u0026 yarn build \u0026\u0026 cd packages/examples\n$ yarn run sender \u0026\u0026 yarn run receiver\n```\n\nLook at [sender.ts](packages/examples/src/sender.ts) and [receiver.ts](packages/examples/src/receiver.ts) for more information.\n\n## Documentation\n\nFor more advanced documentation go to [doc/](doc/) folder.\n\n## Contributing\n\n**Developers:** Machinomy is for you. Feel free to use it, break it, fork it, and make the world better. The code is standard TypeScript, no special skills required:\n\n    $ yarn install \u0026\u0026 yarn bootstrap\n\nUsing [yarn](https://yarnpkg.com/lang/en/) is mandatory (**don't use npm!**)\n\nApply migrations (eg. for PostgreSQL, refer [packages/machinomy/database.json](packages/machinomy/database.json)):\n\n    $ PGUSER=user PGPASSWORD=pass PGHOSTADDR=localhost PGDATABASE=dbname yarn migrate\n\n**Non-Developers:** You are lovely. As a starter, help us spread the word! Tell a friend right now.\nIf not enough, developers need flesh-world guidance. It starts with proper documentation and a pinch of fantasy.\nReally anything, whether it is a short post on a use case of IoT micropayments, addition to the documentation (code comments, yay!),\nor an elaborate analysis of machine economy implications. Do not hesitate to share any idea with us on [Gitter](https://gitter.im/machinomy/machinomy).\n\n## License\n\nLicensed under [Apache License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmachinomy%2Fmachinomy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmachinomy%2Fmachinomy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmachinomy%2Fmachinomy/lists"}