{"id":27801582,"url":"https://github.com/nirvanush/txbuilder-service","last_synced_at":"2025-05-01T05:01:54.266Z","repository":{"id":53844611,"uuid":"521669510","full_name":"nirvanush/txbuilder-service","owner":"nirvanush","description":null,"archived":false,"fork":false,"pushed_at":"2022-08-15T06:12:05.000Z","size":158,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2023-03-05T16:22:01.759Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/nirvanush.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":"2022-08-05T14:30:45.000Z","updated_at":"2022-08-05T14:31:22.000Z","dependencies_parsed_at":"2022-08-23T07:40:27.240Z","dependency_job_id":null,"html_url":"https://github.com/nirvanush/txbuilder-service","commit_stats":null,"previous_names":[],"tags_count":null,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nirvanush%2Ftxbuilder-service","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nirvanush%2Ftxbuilder-service/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nirvanush%2Ftxbuilder-service/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nirvanush%2Ftxbuilder-service/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nirvanush","download_url":"https://codeload.github.com/nirvanush/txbuilder-service/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251825376,"owners_count":21649941,"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":[],"created_at":"2025-05-01T05:01:21.058Z","updated_at":"2025-05-01T05:01:54.216Z","avatar_url":"https://github.com/nirvanush.png","language":"JavaScript","readme":"# Lite weight nodejs service to build transaction\n\nCan run on aws serverless lambda or on a server with `npm run dev`;\nI suggest trying lambda because it's free.\n\n### Based on: \n- [ergoscript.js](https://github.com/nirvanush/ergoscript) - transaction builder library\n- [isomorphic-wallet](https://github.com/nirvanush/isomorphic-wallet) - in code wallet with same api as dapp connector.\n\n\n## How to start\n```\ngit clone https://github.com/nirvanush/txbuilder-service\ncd txbuilder-service\nnpm i \nnpm run start\n\nWill run on port 5008\n```\n\n## How to use:\nUse the tx configuration syntax as described it [ergoscript.js](https://github.com/nirvanush/ergoscript) README.md;\n\nHere is the example of generating a simple transaction of sending 5 Comet:\n```\n  const response = await fetch('yourhost.com/build_tx', {\n    method: 'POST',\n    headers: {\n        'Content-Type': 'application/json'\n    },\n    body: JSON.stringify({\n        \"config\": [{\n            \"funds\": {\n                \"ERG\": 10000000,\n                \"tokens\": [{\n                    \"tokenId\": \"0cd8c9f416e5b1ca9f986a7f10a84191dfb85941619e49e53c0dc30ebf83324b\",\n                    \"amount\": 5\n                }]\n            },\n            \"toAddress\": \"\u003crecipient address\u003e\",\n            \"additionalRegisters\": {\n                value: '40', type: 'Int'\n            }\n        }],\n        \"userAddress\": await ergo.get_change_address() // this is the public address of user that will have to sign this tx later.\n    })\n  }).then(resp =\u003e resp.json());\n\n  const { unsignedTx } = response;\n\n  // later you can sign this tx using dapp connector\n  // and submit\n  const signedTx = ergo.sign_tx(unsignedTx)\n  const hash = ergo.submit_tx(signedTx);\n```\n\n### TODO:\n- Custom explorer endpoint, currently using public.\n","funding_links":[],"categories":["🛠️ Development Tooling \u003ca id=\"development-tooling\"\u003e\u003c/a\u003e"],"sub_categories":["🔌 Node Interaction \u0026 APIs \u003ca id=\"node-interaction--apis\"\u003e\u003c/a\u003e"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnirvanush%2Ftxbuilder-service","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnirvanush%2Ftxbuilder-service","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnirvanush%2Ftxbuilder-service/lists"}