@aptos-labs/js-pro
TypeScript icon, indicating that this package has built-in type declarations

0.0.1 • Public • Published

Aptos JS Pro

Aptos JS Pro is a framework agnostic library of queries and mutations related to the Aptos ecosystem.

Getting Started

  1. Install the package
pnpm add @aptos-labs/js-pro 
  1. Initialize the AptosJSPro client
const core = new AptosJSProClient({ account, network, signer });
  1. You now have access to all of the queries and mutations in the library!
const address = await core.fetchAddressFromName({ name: 'kent.apt' })

const signedTxn = await core.signTransaction({ rawTxn })

Maintainers

In order to see changes reflected in apps locally, the package needs to be built and bundled. To do this, run the following command from the project:

pnpm build

This will build the package and place it in the dist folder. The package builds to CommonJS and ESM.

Utilities

Aptos core provides the client alongside the signer, network, and account. If you need access to clients such as the indexer client, FaucetClient, TokenClient, or AptosClient, you can use the getClients() utility.

// Access AptosClient via `provider.aptosClient`
const { provider, indexerClient, faucetClient, tokenClient } = core.getClients();

// Access to: core.account, core.network, core.signer
core.account

The AptosClient can be found in the provider client as provider.aptosClient in getClients()

Readme

Keywords

none

Package Sidebar

Install

npm i @aptos-labs/js-pro

Weekly Downloads

58

Version

0.0.1

License

none

Unpacked Size

2.93 MB

Total Files

8

Last publish

Collaborators

  • aptos-labs