{"id":15016375,"url":"https://github.com/arcblock/forge-js","last_synced_at":"2025-10-23T22:32:27.712Z","repository":{"id":34933053,"uuid":"164549738","full_name":"ArcBlock/forge-js","owner":"ArcBlock","description":":fire: JavaScript libraries to work with forge framework","archived":false,"fork":false,"pushed_at":"2023-03-08T06:21:48.000Z","size":15503,"stargazers_count":26,"open_issues_count":32,"forks_count":2,"subscribers_count":26,"default_branch":"master","last_synced_at":"2025-01-30T21:35:16.061Z","etag":null,"topics":["arcblock","blockchain","nodejs","sdk"],"latest_commit_sha":null,"homepage":"https://forge-js.netlify.com/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ArcBlock.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-01-08T03:20:29.000Z","updated_at":"2023-11-27T16:24:10.000Z","dependencies_parsed_at":"2024-06-18T21:15:02.663Z","dependency_job_id":"08cbb3ba-2cec-40a5-a96c-3742f4e6e8cf","html_url":"https://github.com/ArcBlock/forge-js","commit_stats":{"total_commits":1304,"total_committers":10,"mean_commits":130.4,"dds":"0.026840490797546024","last_synced_commit":"63180926abace58c187547cb43f6213b11ea65dd"},"previous_names":[],"tags_count":287,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ArcBlock%2Fforge-js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ArcBlock%2Fforge-js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ArcBlock%2Fforge-js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ArcBlock%2Fforge-js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ArcBlock","download_url":"https://codeload.github.com/ArcBlock/forge-js/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":237893613,"owners_count":19383087,"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":["arcblock","blockchain","nodejs","sdk"],"created_at":"2024-09-24T19:48:45.818Z","updated_at":"2025-10-23T22:32:17.702Z","avatar_url":"https://github.com/ArcBlock.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"![forge-javascript-sdk](https://www.arcblock.io/.netlify/functions/badge/?text=Forge%20Javascript%20SDK)\n\n## Table of Contents\n\n- [Table of Contents](#Table-of-Contents)\n- [Introduction](#Introduction)\n- [Packages](#Packages)\n- [Install](#Install)\n- [Usage](#Usage)\n  - [ES5(commonjs)](#ES5commonjs)\n  - [ES6](#ES6)\n  - [Util](#Util)\n  - [Wallet](#Wallet)\n  - [Message](#Message)\n- [Documentation](#Documentation)\n- [Contribution](#Contribution)\n- [Compatibility](#Compatibility)\n- [Report a Bug?](#Report-a-Bug)\n- [License](#License)\n\n## Introduction\n\n[![lerna](https://img.shields.io/badge/maintained%20with-lerna-cc00ff.svg)](https://lernajs.io/)\n[![docs](https://img.shields.io/badge/powered%20by-arcblock-green.svg)](https://docs.arcblock.io)\n[![Gitter](https://badges.gitter.im/ArcBlock/community.svg)](https://gitter.im/ArcBlock/community?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge)\n\n\u003e Last updated at 9/7/2022, 2:26:20 PM\n\nJavascript SDK for [forge](https://docs.arcblock.io/forge/latest/), which is an awesome framework to write distributed blockchain applications.\n\n## Packages\n\n- [client-extension \u003cimg src=\"https://img.shields.io/npm/v/@arcblock/client-extension.svg\" alt=\"Version\"\u003e](https://www.npmjs.com/package/@arcblock/client-extension)\n- [forge-config \u003cimg src=\"https://img.shields.io/npm/v/@arcblock/forge-config.svg\" alt=\"Version\"\u003e](https://www.npmjs.com/package/@arcblock/forge-config)\n- [forge-message \u003cimg src=\"https://img.shields.io/npm/v/@arcblock/forge-message.svg\" alt=\"Version\"\u003e](https://www.npmjs.com/package/@arcblock/forge-message)\n- [forge-proto \u003cimg src=\"https://img.shields.io/npm/v/@arcblock/forge-proto.svg\" alt=\"Version\"\u003e](https://www.npmjs.com/package/@arcblock/forge-proto)\n- [forge-sdk \u003cimg src=\"https://img.shields.io/npm/v/@arcblock/forge-sdk.svg\" alt=\"Version\"\u003e](https://www.npmjs.com/package/@arcblock/forge-sdk)\n- [forge-util \u003cimg src=\"https://img.shields.io/npm/v/@arcblock/forge-util.svg\" alt=\"Version\"\u003e](https://www.npmjs.com/package/@arcblock/forge-util)\n- [forge-wallet \u003cimg src=\"https://img.shields.io/npm/v/@arcblock/forge-wallet.svg\" alt=\"Version\"\u003e](https://www.npmjs.com/package/@arcblock/forge-wallet)\n- [graphql-client \u003cimg src=\"https://img.shields.io/npm/v/@arcblock/graphql-client.svg\" alt=\"Version\"\u003e](https://www.npmjs.com/package/@arcblock/graphql-client)\n- [grpc-client \u003cimg src=\"https://img.shields.io/npm/v/@arcblock/grpc-client.svg\" alt=\"Version\"\u003e](https://www.npmjs.com/package/@arcblock/grpc-client)\n- [mcrypto \u003cimg src=\"https://img.shields.io/npm/v/@arcblock/mcrypto.svg\" alt=\"Version\"\u003e](https://www.npmjs.com/package/@arcblock/mcrypto)\n- [tx-util \u003cimg src=\"https://img.shields.io/npm/v/@arcblock/tx-util.svg\" alt=\"Version\"\u003e](https://www.npmjs.com/package/@arcblock/tx-util)\n- [did-agent-storage \u003cimg src=\"https://img.shields.io/npm/v/@arcblock/did-agent-storage.svg\" alt=\"Version\"\u003e](https://www.npmjs.com/package/@arcblock/did-agent-storage)\n- [did-agent-storage-memory \u003cimg src=\"https://img.shields.io/npm/v/@arcblock/did-agent-storage-memory.svg\" alt=\"Version\"\u003e](https://www.npmjs.com/package/@arcblock/did-agent-storage-memory)\n- [did-agent-storage-mongo \u003cimg src=\"https://img.shields.io/npm/v/@arcblock/did-agent-storage-mongo.svg\" alt=\"Version\"\u003e](https://www.npmjs.com/package/@arcblock/did-agent-storage-mongo)\n- [did-agent-storage-nedb \u003cimg src=\"https://img.shields.io/npm/v/@arcblock/did-agent-storage-nedb.svg\" alt=\"Version\"\u003e](https://www.npmjs.com/package/@arcblock/did-agent-storage-nedb)\n- [did-auth-storage \u003cimg src=\"https://img.shields.io/npm/v/@arcblock/did-auth-storage.svg\" alt=\"Version\"\u003e](https://www.npmjs.com/package/@arcblock/did-auth-storage)\n- [did-auth-storage-firebase \u003cimg src=\"https://img.shields.io/npm/v/@arcblock/did-auth-storage-firebase.svg\" alt=\"Version\"\u003e](https://www.npmjs.com/package/@arcblock/did-auth-storage-firebase)\n- [did-auth-storage-keystone \u003cimg src=\"https://img.shields.io/npm/v/@arcblock/did-auth-storage-keystone.svg\" alt=\"Version\"\u003e](https://www.npmjs.com/package/@arcblock/did-auth-storage-keystone)\n- [did-auth-storage-memory \u003cimg src=\"https://img.shields.io/npm/v/@arcblock/did-auth-storage-memory.svg\" alt=\"Version\"\u003e](https://www.npmjs.com/package/@arcblock/did-auth-storage-memory)\n- [did-auth-storage-mongo \u003cimg src=\"https://img.shields.io/npm/v/@arcblock/did-auth-storage-mongo.svg\" alt=\"Version\"\u003e](https://www.npmjs.com/package/@arcblock/did-auth-storage-mongo)\n- [did-auth-storage-nedb \u003cimg src=\"https://img.shields.io/npm/v/@arcblock/did-auth-storage-nedb.svg\" alt=\"Version\"\u003e](https://www.npmjs.com/package/@arcblock/did-auth-storage-nedb)\n- [event-client \u003cimg src=\"https://img.shields.io/npm/v/@arcblock/event-client.svg\" alt=\"Version\"\u003e](https://www.npmjs.com/package/@arcblock/event-client)\n- [event-server \u003cimg src=\"https://img.shields.io/npm/v/@arcblock/event-server.svg\" alt=\"Version\"\u003e](https://www.npmjs.com/package/@arcblock/event-server)\n- [swap-retriever \u003cimg src=\"https://img.shields.io/npm/v/@arcblock/swap-retriever.svg\" alt=\"Version\"\u003e](https://www.npmjs.com/package/@arcblock/swap-retriever)\n- [swap-storage \u003cimg src=\"https://img.shields.io/npm/v/@arcblock/swap-storage.svg\" alt=\"Version\"\u003e](https://www.npmjs.com/package/@arcblock/swap-storage)\n- [swap-storage-memory \u003cimg src=\"https://img.shields.io/npm/v/@arcblock/swap-storage-memory.svg\" alt=\"Version\"\u003e](https://www.npmjs.com/package/@arcblock/swap-storage-memory)\n- [swap-storage-mongo \u003cimg src=\"https://img.shields.io/npm/v/@arcblock/swap-storage-mongo.svg\" alt=\"Version\"\u003e](https://www.npmjs.com/package/@arcblock/swap-storage-mongo)\n- [swap-storage-nedb \u003cimg src=\"https://img.shields.io/npm/v/@arcblock/swap-storage-nedb.svg\" alt=\"Version\"\u003e](https://www.npmjs.com/package/@arcblock/swap-storage-nedb)\n\n## Install\n\n```sh\nnpm i @arcblock/forge-sdk\n// OR\nyarn add @arcblock/forge-sdk\n```\n\n## Usage\n\n### ES5(commonjs)\n\n\u003e Support Node.js\n\n```js\nconst ForgeSDK = require('@arcblock/forge-sdk');\n\n// Connect to multi endpoints\nForgeSDK.connect('https://test.abtnetwork.io/api', { name: 'test' });\nForgeSDK.connect('https://zinc.abtnetwork.io/api', { name: 'zinc' });\nForgeSDK.connect('tcp://127.0.0.1:28210', { name: 'local' });\n\n// Declare on test chain\nForgeSDK.sendDeclareTx({\n  tx: { itx: { moniker: 'abcd' } },\n  wallet: ForgeSDK.Wallet.fromRandom(),\n}).then(console.log);\n\n// Get zinc chain info\nForgeSDK.getChainInfo({ conn: 'zinc' }).then(console.log);\n\n// Get local chain info\nForgeSDK.getChainInfo({ conn: 'local' }).then(console.log);\n```\n\n### ES6\n\n\u003e If you want to support both node.js and browser, please use lite version\n\u003e And the lite version only supports http connections\n\n```js\nimport ForgeSDK from '@arcblock/forge-sdk/lite';\n\nForgeSDK.connect('https://test.abtnetwork.io/api', { name: 'test' });\n\nForgeSDK.getChainInfo().then(console.log);\n```\n\n### Util\n\n```javascript\nconst ForgeSDK = require('@arcblock/forge-sdk');\n\nconst bn = ForgeSDK.Util.fromTokenToUnit(10, 16);\nconsole.log(bn);\n```\n\n### Wallet\n\n```javascript\nconst ForgeSDK = require('@arcblock/forge-sdk');\n\nconst wallet = ForgeSDK.Wallet.fromRandom();\nconsole.log(wallet.toJSON());\n```\n\n### Message\n\n```javascript\nconst ForgeSDK = require('@arcblock/forge-sdk');\n\nconst message = ForgeSDK.Message.createMessage('Transaction', { from: 'abcd' });\nconsole.log(message);\n```\n\n## Documentation\n\n[https://docs.arcblock.io/forge/sdks/javascript/latest/](https://docs.arcblock.io/forge/sdks/javascript/latest/)\n\n## Contribution\n\nCheckout [CONTRIBUTION.md](https://github.com/ArcBlock/forge-js/blob/master/CONTRIBUTION.md)\n\n## Compatibility\n\nForge javascript sdk works with node.js v8.x or above, checkout [Travis](https://travis-ci.com/ArcBlock/forge-js/builds) for status.\n\n## Report a Bug?\n\nBugs and feature requests please create new issues [here](https://github.com/ArcBlock/forge-js/issues)\n\n## License\n\nCopyright 2018-2019 ArcBlock\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farcblock%2Fforge-js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farcblock%2Fforge-js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farcblock%2Fforge-js/lists"}