Security News
GitHub Removes Malicious Pull Requests Targeting Open Source Repositories
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
@golem-sdk/golem-js
Advanced tools
NodeJS and WebBrowser SDK for building apps running on Golem Network
golem-js
?The Golem Network fosters a global group of creators building ambitious software solutions that will shape the technological landscape of future generations by accessing computing resources across the platform. Golem Network is an accessible, reliable, open access and censorship-resistant protocol, democratizing access to digital resources and connecting users through a flexible, open-source platform.
@golem-sdk/golem-js is the JavaScript API that allows developers to connect to their Golem nodes and manage their distributed, computational loads through Golem Network.
For a detailed introduction to using Golem and @golem-sdk/golem-js
to run your tasks on Golem please consult our quickstart section.
@golem-sdk/golem-js
is available as a NPM package.
You can install it through npm
:
npm install @golem-sdk/golem-js
or by yarn
:
yarn add @golem-sdk/golem-js
To build a library available to the NodeJS environment:
npm run build
# or
yarn build
This will generate production code in the dist/
directory ready to be used in your nodejs or browser applications.
Hello World
import { TaskExecutor } from "@golem-sdk/golem-js";
(async function main() {
const executor = await TaskExecutor.create("9a3b5d67b0b27746283cb5f287c13eab1beaa12d92a9f536b747c7ae");
await executor.run(async (ctx) => console.log(await ctx.run("echo 'Hello World'")).stdout);
await executor.end();
})();
For more detailed usage examples and tutorials, see the Java Script API section of the Golem Network Docs
To run unit tests, you can simply execute the command:
npm run test:unit
# or
yarn test:unit
Both test cases for the NodeJS environment and the browser (cypress) require preparation of a test environment of the Golem Network with providers and all the necessary infrastructure. Goth framework is used for this purpose.
To enable E2E testing, you need to ensure that python -m goth
is executable. Therefore, you must first install Goth according to the instructions described in the readme of the project.
npm run test:e2e
# or
yarn test:e2e
npm run test:cypress
# or
yarn test:cypress
It is recommended to run unit tests and static code analysis before committing changes.
yarn lint
# and
yarn format
FAQs
NodeJS and WebBrowser SDK for building apps running on Golem Network
The npm package @golem-sdk/golem-js receives a total of 0 weekly downloads. As such, @golem-sdk/golem-js popularity was classified as not popular.
We found that @golem-sdk/golem-js demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.