{"id":16560770,"url":"https://github.com/adshao/fibos-scripts","last_synced_at":"2025-03-21T11:31:38.621Z","repository":{"id":83183500,"uuid":"146525555","full_name":"adshao/fibos-scripts","owner":"adshao","description":"scripts for fibos","archived":false,"fork":false,"pushed_at":"2018-09-26T08:43:11.000Z","size":2587,"stargazers_count":38,"open_issues_count":0,"forks_count":7,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-03-18T00:46:42.596Z","etag":null,"topics":["eos","fibos","javascript"],"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/adshao.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":"2018-08-29T01:02:52.000Z","updated_at":"2023-06-21T07:47:25.000Z","dependencies_parsed_at":null,"dependency_job_id":"64c00baa-84c3-43b5-bf81-b6ba1f5f210e","html_url":"https://github.com/adshao/fibos-scripts","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/adshao%2Ffibos-scripts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adshao%2Ffibos-scripts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adshao%2Ffibos-scripts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adshao%2Ffibos-scripts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/adshao","download_url":"https://codeload.github.com/adshao/fibos-scripts/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244790808,"owners_count":20510811,"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":["eos","fibos","javascript"],"created_at":"2024-10-11T20:29:56.438Z","updated_at":"2025-03-21T11:31:38.588Z","avatar_url":"https://github.com/adshao.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# FIBOS Registration Scripts\n\n## Run with Docker\n\nDocker is required before running following command, please refer to https://docs.docker.com/install/ to install docker.\n\nOne line installation:\n\n```shell\ngit clone https://github.com/adshao/fibos-scripts \u0026\u0026 cd fibos-scripts \u0026\u0026 alias fibos=\"docker run -it --rm -v `pwd`:/usr/src/app -w /usr/src/app adshao/fibos fibos\"\n```\n\nor just set alias if you have already cloned this repo:\n```shell\nalias fibos=\"docker run -it --rm -v `pwd`:/usr/src/app -w /usr/src/app adshao/fibos fibos\"\n```\n\nGoto Usage section to continue the journey.\n\n## Pre-installation\n\n### Install fibos\n\n```shell\ncurl -s https://fibos.io/download/installer.sh | sh\n```\n\n### Init fibos\n\n```shell\nfibos --init\n```\n\n### Install fibos.js\n\n```shell\nfibos --install fibos.js\n```\n\nfor more information, please refer to https://fibos.io/docs/guide/basic/install.md.html\n\n## Usage\n\nPut the following javascript code into a file named main.js, run with fibos once the code is ready:\n\n```shell\nfibos main.js\n```\n\n### Init Client\n\nInit fibos client\n\n```javascript\nvar FibosClient = require(\"./fibos_client.js\");\n\nconfig = {\n    eosPriKey: process.env.EOS_PRIKEY,\n    eosAccount: \"your eos account\",\n    fibosAccount: \"your fibos account\",\n    fibosPubKey: process.env.FIBOS_PUBKEY,\n    fibosPriKey: process.env.FIBOS_PRIKEY\n}\n\nvar client = new FibosClient(config);\n```\n\n### Generate Pub/Pri Keys\n\n```javascript\nvar res = client.generateKeys();\nconsole.log(\"export FIBOS_PRIKEY=\" + res.prikey);\nconsole.log(\"export FIBOS_PUBKEY=\" + res.pubkey);\n```\n\nSave it into a secure key named fibos.key, and append your EOS private key:\n```shell\nexport FIBOS_PRIKEY=xxx\nexport FIBOS_PUBKEY=xxx\nexport EOS_PRIKEY=xxx\n```\n\n```shell\nsource fibos.key\n```\n\n### Create Account\n\n```javascript\nvar res = client.createAccount();\nconsole.log(res);\n```\n\n### Transfer EOS to FIBOS\n\n```javascript\nvar res = client.transferEOS(\"1.0000 EOS\");\nconsole.log(res);\n```\n\n### Check Balance\n\n```javascript\nvar res = client.getBalance(config.fibosAccount);\nconsole.log(res);\n```\n\n### Exchange EOS to FO\n\n```javascript\nvar res = client.exchangeFO(\"1.0000 EOS\");\nconsole.log(res);\n```\n\n### Buy Ram\n\n```javascript\nvar res = client.buyram(config.fibosAccount, config.fibosAccount, \"1.0000 FO\");\nconsole.log(res);\n```\n\n### Sell Ram\n\nSell ram in bytes:\n```javascript\nvar res = client.sellram(config.fibosAccount, 1048576)\nconsole.log(res);\n```\n\n### Show Ram Price\n\n```javascript\nconsole.log(\"ram price: \" + client.getRamPrice());\n```\n\n### Get Account\n\nCheck your ram info from account:\n```javascript\nconsole.log(client.getAccount(config.fibosAccount));\n```\n\n### Exchange FO to EOS\n\nIn case you want to exchange FO to EOS:\n```javascript\nvar res = client.exchangeEOS(\"1.0000 FO\");\nconsole.log(res);\n```\n\n### Withdraw EOS\n\nTransfer EOS@fibos to EOS mainnet:\n```javascript\nvar res = client.withdrawEOS(\"0.0012 EOS\")\nconsole.log(res);\n```\n\nPlease test with a small amount to make sure everything is OK before transferring your EOS.\n\n## Donate\n\nIf this script is helpful to you, you can donate me with a cup of coffee:\n\n- EOS Address: adshaoadshao\n- FO Address: adshaoadshao\n\nThanks, good luck!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadshao%2Ffibos-scripts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fadshao%2Ffibos-scripts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadshao%2Ffibos-scripts/lists"}