colonyJS is a JavaScript library with a simple and predictable interface for application-layer integrations with the colonyNetwork smart contracts. To learn more about Colony, you can visit colony.io or read the White Paper.
See colonyJS Documentation for detailed examples and explanations.
const { getNetworkClient } = require('@colony/colony-js-client');
const { open } = require('@colony/purser-software');
(async () => {
// Get a wallet instance
const wallet = await open({
privateKey: process.env.PRIVATE_KEY,
});
// Check out the logs to see the wallet address
console.log('Wallet Address:', wallet.address);
// Get a network client instance
const networkClient = await getNetworkClient('goerli', wallet);
// Check out the logs to see the network address
console.log('Network Address:', networkClient.contract.address);
})()
.then(() => process.exit())
.catch(error => console.error(error));
Another helpful tool for learning how to use colonyJS is colonyStarter, which provides boilerplates, examples, and a simple command line tool to make local development easier.
We welcome all contributions to colonyJS! See Contributing for more information.
If you are a developer contributing to colonyJS, see Development.