{"id":26380299,"url":"https://github.com/nextu1337/xnogate","last_synced_at":"2025-03-17T05:19:40.595Z","repository":{"id":154404536,"uuid":"630110580","full_name":"nextu1337/xnogate","owner":"nextu1337","description":"xnogate is an open-source NANO cryptocurrency payment gateway library","archived":false,"fork":false,"pushed_at":"2024-05-29T06:18:41.000Z","size":3149,"stargazers_count":5,"open_issues_count":8,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-05-29T19:02:46.731Z","etag":null,"topics":["cryptocoins","cryptocurrency","nano-cryptocurrency","nanocurrency","payment-gateway","payments","wallet"],"latest_commit_sha":null,"homepage":"","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/nextu1337.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-04-19T17:31:13.000Z","updated_at":"2023-10-21T21:56:14.000Z","dependencies_parsed_at":"2024-05-29T07:43:54.872Z","dependency_job_id":"7b01c183-3ec4-46f5-ae20-e7f889789e29","html_url":"https://github.com/nextu1337/xnogate","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nextu1337%2Fxnogate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nextu1337%2Fxnogate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nextu1337%2Fxnogate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nextu1337%2Fxnogate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nextu1337","download_url":"https://codeload.github.com/nextu1337/xnogate/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243976383,"owners_count":20377691,"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":["cryptocoins","cryptocurrency","nano-cryptocurrency","nanocurrency","payment-gateway","payments","wallet"],"created_at":"2025-03-17T05:19:40.111Z","updated_at":"2025-03-17T05:19:40.579Z","avatar_url":"https://github.com/nextu1337.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# xnogate\n\nxnogate is a safe, reliable payment gateway library for the NANO (XNO) cryptocurrency.\n\n## Installation\n\nTo install xnogate, run the following command:\n\n```\nnpm i xnogate\n```\n\n## Usage\n\u003ckbd\u003eWARNING: do not use any of the keys or addresses listed below to send real assets!\u003c/kbd\u003e\n\nTo use the payment gateway module, import it as follows:\n```js\nconst { payments } = require(\"xnogate\")\n```\n\n### Create a Payment\n\nTo create a new payment, call the `payments.create(config, amount)` method, passing in a configuration object and the desired amount in NANO. The configuration object should contain the following properties:\n\n- `seed`: a 64-character string representing the seed to be used to generate the private key for the wallet. If not provided, a random seed will be generated.\n- `index`: index of the wallet to use. If not provided, 0 will be used.\n- `destination`: the address of the account to which the payment will be made.\n- `timeout`: the timeout for the payment, in seconds.\n\nExample:\n\n```js\nconst config = {\n  seed: \"6e78325f7061796d656e745f676174657761795f746573745f786e6f67617465\",\n  index: 0,\n  destination: \"nano_3ujqppynxfakp59i99o75qkwi1dm6btox9gndegbnuyxpc53sw7ikmb1zp8z\",\n  timeout: 30 // 30 seconds\n};\n\nconst amount = 0.5; // 0.5 NANO\n\nconst interval = payments.create(config, amount);\n```\n\n### Start a Payment\n\nTo start a payment, call the `payments.start(interval, onSuccess, onTimeout)` method, passing in the `interval` object returned from `payments.create`, as well as the `onSuccess` and `onTimeout` callbacks. `o` variable in the callback is the interval itself, you can retrieve or store some data there\n\nExample:\n\n```js\npayments.start(interval, \n  (o) =\u003e { console.log(\"Payment successful\"); }, \n  (o) =\u003e { console.log(\"Payment timed out\"); }\n);\n```\nAlternatively:\n```js\ninterval.start(\n  (o) =\u003e { console.log(\"Payment successful\"); }, \n  (o) =\u003e { console.log(\"Payment timed out\"); }\n);\n```\n\n## Donate\n\nIf you find this module useful and would like to support its development, please consider making a donation to the following Nano address:\n\n`nano_3ujqppynxfakp59i99o75qkwi1dm6btox9gndegbnuyxpc53sw7ikmb1zp8z`\n\nYour contribution is greatly appreciated and will help ensure the continued maintenance and improvement of this project, and some extra motivation. Thank you for your support!","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnextu1337%2Fxnogate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnextu1337%2Fxnogate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnextu1337%2Fxnogate/lists"}