4.4.0 • Published 6 months ago

@verida/vda-node-client v4.4.0

Weekly downloads
-
License
Apache-2.0
Repository
-
Last release
6 months ago

VDA Node Client

A client library that read nodat & datacentre information. This library calls only read functions of vda-node-manager package.

Installation

yarn add @verida/vda-node-client

Usage

This library provides the VeridaNodeClient class. Users can create VeridaNodeClient with or without RPC_URLS

Create without RPC_URL

import { VeridaNodeClient } from '@verida/vda-node-client'
const nodeClient = VeridaNodeClient("testnet");

Create with RPC_URL

import { VeridaNodeClient } from '@verida/vda-node-client'
const nodeClient = VeridaNodeClient("testnet", "<Input your RPC_URL>");

Function List

The VeridaNodeClient class provide following function list:

Contract Decimal for Latitude and Longitude

public async getContractDecimal(network: string): Promise<number>

Get Verida Token address

public async getVDATokenAddress(network: string): Promise<string>

Data Centres

public async isRegisteredDataCentreName(network: string, name: string)
public async getDataCentresById(network: string, ids: BigNumberish[])
public async getDataCentresByName(network: string, names: string[])
public async getDataCentresByCountryCode(network: string, countryCode: string, status?: EnumStatus)
public async getDataCentresByRegionCode(network: string, regionCode: string, status?: EnumStatus)

Storage Node

public async isRegisteredNodeName(network: string, name: string)
public async isRegisteredNodeAddress(network: string, didAddress: string)
public async isRegisteredNodeEndpoint(network: string, endpointUri: string)
public async getNodeByName(network: string, name: string)
public async getNodeByAddress(network: string, didAddress: string)
public async getNodeByEndpoint(network: string, endpointUri: string)
public async getNodesByCountryCode(network: string, countryCode: string, status?: EnumStatus)
public async getNodesByRegionCode(network: string, regionCode: string, status?: EnumStatus)
public async getNodesByStatus(status: EnumStatus)

public async getBalance(network: string, didAddress: string)
public async excessTokenAmount(network: string, didAddress: string)

public async isStakingRequired(network: string)
public async isWithdrawalEnabled()
public async getStakePerSlot(network: string)
public async getSlotCountRange(network: string)

public async getNodeIssueFee(network: string)
public async getSameNodeLogDuration(network: string)
public async getLogLimitPerDay(network: string)
public async getReasonCodeList(network: string)
public async getReasonCodeDescription(network: string, reasonCode: BigNumberish)
4.4.0

6 months ago

4.3.0

8 months ago

4.2.0

9 months ago

4.1.2-rc1

11 months ago

4.1.0

11 months ago

4.0.0

11 months ago

4.0.0-alpha-4

11 months ago

4.0.0-alpha-3

11 months ago

4.0.0-alpha-2

12 months ago

4.0.0-alpha-1

12 months ago

3.0.3

1 year ago

4.0.0-alpha.0

1 year ago

3.0.1

1 year ago