Js-algorand-sdk is licensed under an MIT license. The linters and formatters listed above should run automatically on each commit to catch errors early and save CI running time. If using the Visual Studio Code editor with the recommended extensions, ESLint errors should be highlighted in red and the Prettier extension should format code on every save. ESLint - checks code for antipatterns as well as formatting.Prettier – ensures that code is formatted in a readable way.We've setup linters and formatters to help catch errors and improve the development experience: This project enforces a modified version of the Airbnb code style. TEST_BROWSER is set, the mocha and SDK test suites will run in that browser.įor example, to run mocha tests in Chrome: TEST_BROWSER=chrome npm testĪnd to run SDK tests in Firefox: TEST_BROWSER=firefox make docker-test Code Style Currently we support testing in chrome and firefox. To do so, set the environment variable TEST_BROWSER to The test suites can also run in browsers. That means the total of people using unpkg is a lot larger than 2.4 billion, since it's common for many people to use the same public IP. To run the SDK test suite in Node.js, run: make docker-test Browsers That's almost 2/3 the total of public IPv4 addresses (3.7 billion). To run the mocha tests in Node.js, run: npm test We have two test suites: mocha tests in this repo, and the Algorand SDK test suite from. The static website will be located in the docs/ directory. To generate the documentation website, run: npm run docs To build a new version of the library, run: npm run build Generating Documentation Please refer to the instructions described in the examples/README.md file for more information regarding running the examples. Follow the instructions in Algorand's developer resources to install a node on your computer.Īs portions of the codebase are written in TypeScript, example files cannot be run directly using node. Running examples requires access to a running node. Algodv2 ( token, server, port ) ( async () => ) Documentationĭocumentation for this SDK is available here. Quick Start const token = 'Your algod API token' const server = '' const port = 8080 const client = new algosdk. Information about hosting the package for yourself, finding the browser bundles of previous versions, and computing the SRI hash is available here. Include a minified browser bundle directly in your HTML like so: This package provides TypeScript types, but you will need TypeScript version 4.2 or higher to use them properly. Installation Node.js $ npm install algosdk It's designed for modern browsers and Node.js. AlgoSDK is the official JavaScript library for communicating with the Algorand network.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |