Skip to content

hirosystems/stacks-rpc-client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

@stacks/rpc-client

Client library for working with Stacks blockchain RPC interface.

Installation

npm install @stacks/rpc-client

Usage

import { createClient } from '@stacks/rpc-client';
import { StacksTestnet } from '@stacks/network';

const client = createClient(new StacksTestnet());
const result = await client.GET('/v2/accounts/{principal}', {
  params: {
    path: { principal: 'ST2QKZ4FKHAH1NQKYKYAYZPY440FEPK7GZ1R5HBP2' },
    query: { tip: 'latest', proof: 0 },
  },
});

console.log(result.data); // { "balance": "0x000000000000000000228fb60297b639", ... }

About

No description, website, or topics provided.

Resources

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published