The ARN Client is a JavaScript API to include into your website to leverage Arianee web3 services, such as:
ARN Client is a library that requires a JavaScript runtime, so you’ll need to install Node.js then make sure to have a package.json
describing your project (if you have none, create one), notably that it requires the ARN client packages, like below:
{
"name": "myproject",
"version": "0.1.0",
"dependencies": {
**"@arianee/arn-client": "^2.2.18",
"@arianee/arn-types": "^2.2.18",**
"@wagmi/core": "1.0.6",
**** }
}
Then you can run npm install
.
<aside>
💡 ARN libraries are published are also available as beta/pre-release (suffixed with -staging-x
) or alpha/under development (suffixed with -develop-x
). It is recommended to use production versions only, however. Using staging or develop versions can imply bugs or breaking changes.
</aside>
Import the [ArnClient](<https://arianee.github.io/arn/packages/arn-client/docs/classes/ArnClient.html>)
class and instantiate through an [ArnClientFactory](<https://arianee.github.io/arn/packages/arn-client/docs/interfaces/ArnClientFactory.html>)
. Most of the time you’ll use an ArnHttpClientFactory
because you’ll want to connect to an ARN Server:
const clientFactory = new ArnHttpClientFactory();
In any case, you’ll need to provide a configuration to provide to that client factory:
const arnClient = clientFactory.create(config);
Below is described how you can get such config
.