p3-client
TypeScript icon, indicating that this package has built-in type declarations

1.0.4 • Public • Published

P3 JS/TS Client

This client allows you to interact with services using P3 on the permaweb.

Here's how to get started:

const p3 = new P3(wallet);

const balance = await p3.getBalance();
console.log(await balance.text());

await deposit(quantity: 10000, target: "");

// "ehpRUY79EO_p0PZuNuZI2BAnVnSAC2fNgrsLyGp5JjI" contains 'Hello world'
const data = await p3.getTxData(
  'ehpRUY79EO_p0PZuNuZI2BAnVnSAC2fNgrsLyGp5JjI',
);
console.log(await r.text());

const tx = await p3.getTx('ehpRUY79EO_p0PZuNuZI2BAnVnSAC2fNgrsLyGp5JjI');
console.log(await tx.json());

Readme

Keywords

none

Package Sidebar

Install

npm i p3-client

Weekly Downloads

1

Version

1.0.4

License

none

Unpacked Size

14.3 MB

Total Files

12

Last publish

Collaborators

  • cedriking