🚨 Shai-Hulud Strikes Again:More than 700 Packages Compromised.Technical Analysis →
Socket
Book a DemoInstallSign in
Socket

@vechain/contract-getters

Package Overview
Dependencies
Maintainers
15
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vechain/contract-getters

Framework-agnostic VeChain getters (read-only).

latest
Source
npmnpm
Version
1.0.3
Version published
Weekly downloads
184
-63.85%
Maintainers
15
Weekly downloads
 
Created
Source

VeChain Getters

A simple, beginner-friendly library for reading data from VeChain smart contracts. No complex setup required - just install and call functions! Works with any JavaScript/TypeScript project and integrates seamlessly with existing VeChain SDK projects.

🚀 Getting Started

Installation

  • Install the main package:
# Using yarn
yarn add @vechain/contract-getters

# Using npm
npm install @vechain/contract-getters
  • Install peer dependencies:
# Using yarn
yarn add @vechain/vechain-contract-types @vechain/sdk-network ethers

# Using npm
npm install @vechain/vechain-contract-types @vechain/sdk-network ethers

Usage

There are 4 ways to use VeChain Getters, from simplest to most customized:

1. No Client Required (simplest - perfect for beginners):

import { getVot3Balance } from '@vechain/contract-getters';

// Just call the function - no setup needed!
const balance = await getVot3Balance(
    '0x66E9709bc01B8c0AfC99a7dC513f501821306E85',
);
console.log(`Balance: ${balance}`);

2. Custom Network (specify which VeChain network to use):

import { getVot3Balance } from '@vechain/contract-getters';

const balance = await getVot3Balance(
    '0x66E9709bc01B8c0AfC99a7dC513f501821306E85',
    {
        networkUrl: 'https://testnet.vechain.org',
    },
);

3. Use Existing ThorClient (for projects already using VeChain SDK):

import { ThorClient } from '@vechain/sdk-network';
import { VeChainClient, getVot3Balance } from '@vechain/contract-getters';

// Use your existing ThorClient
const thorClient = ThorClient.at('https://testnet.vechain.org');
const vechainClient = VeChainClient.from(thorClient);

const balance = await getVot3Balance(
    '0x66E9709bc01B8c0AfC99a7dC513f501821306E85',
    {
        client: vechainClient,
    },
);

4. Custom Contract Addresses (for testing or custom deployments):

import { VeChainClient, getVot3Balance } from '@vechain/contract-getters';

const vechainClient = VeChainClient.create({
    nodeUrl: 'https://testnet.vechain.org',
    overrideAddresses: {
        vot3ContractAddress: '0x6e8b4a88d37897fc11f6ba12c805695f1c41f40e',
        // ... other contract addresses
    },
});

const balance = await getVot3Balance(
    '0x66E9709bc01B8c0AfC99a7dC513f501821306E85',
    {
        client: vechainClient,
    },
);

Keywords

vechain

FAQs

Package last updated on 11 Nov 2025

Did you know?

Socket

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.

Install

Related posts