1.21.0 • Published 5 months ago

aptos v1.21.0

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
5 months ago

SDK for Aptos Node API

NOTE: This is the legacy TypeScript SDK, aka the npm package aptos. For a more robust SDK and better support, we recommend upgrading to the new TypeScript SDK @aptos-labs/ts-sdk. Take a look at the documentation and the migration guide.

Discord NPM Package Version NPM Package Downloads

The Aptos TypeScript SDK provides a convenient way to interact with the Aptos blockchain using TypeScript. It offers a set of utility functions, classes, and types to simplify the integration process and enhance developer productivity.

Installation

For use in Node.js or a web application
pnpm install aptos

You can also use your preferred npm client, such as yarn or npm.

For use in a browser
<script src="https://unpkg.com/aptos@latest/dist/index.global.js" />

Then, the SDK can be accessed through window.aptosSDK.

Documentation and examples

  • The Aptos documentation site provides step-by-step instructions, code snippets, and best practices to use this library.
  • You can view the generated Type Doc for the latest release of the SDK.
  • For in-depth examples, check out the examples folder with ready-made package.json files to get you going quickly!

Development environment setup

Setup an .env file to configure the URLs. From the root of this package, run:

rm .env
echo 'APTOS_NODE_URL="http://localhost:8080/v1"' >> .env
echo 'APTOS_FAUCET_URL="http://localhost:8081"' >> .env

Testing

To run the full SDK tests, From the root of this package, run:

pnpm test

If you see strange behavior regarding HTTP clients, try running the tests with --detectOpenHandles.

To test a single file in the SDK, From the root of this package, run:

npx jest -- <path/to/file.test.ts>

To use the local build in a local project:

// run from the root of this package
pnpm build
// run on your local project
pnpm add PATH_TO_LOCAL_SDK_PACKAGE

Working with local node

To develop in a local environment, you need to use the SDK from the main branch.

Run a local node (run from the root of the repo):

cargo run -p aptos -- node run-local-testnet --force-restart --assume-yes

Contributing

If you found a bug or would like to request a feature, please file an issue. If, based on the discussion on an issue you would like to offer a code change, please make a pull request. If neither of these describes what you would like to contribute, checkout out the contributing guide.

yours-wallet@layerzerolabs/lz-aptos-sdk-v1@identity-connect/ic-sdk@snowflake-so/aptos-wallet-adapteraptid-ts@laminar-markets/sdknutrios-sdk-anpty-axelar-local-dev-aptos@everything-registry/sub-chunk-1158warkadewalless-aptos-wallet-adapterwallet-adapter-plugin-coin98wallet-adapter-plugin-templatewallet-unity-sdkmokshyamomentum-safe-sdkcumminimaconsecteturutmsafemsafe-plugin-wallet-adaptermove-to-ts-private@horizonx/aptos-codegen@horizonx/aptos-module-client@identity-connect/crypto@identity-connect/wallet-api@identity-connect/wallet-standard@imperi/imperi-core@forbitswapamm/fbs@forbitswapamm/matthewbyun@forbitswapamm/sdk@injectivelabs/wormhole-sdk@houstonswap/sdkpumpkin-farms-test@keep7777/onekey-aptos-provider@levihhh/momentum-safe-sdk@levihhh/msafe-plugin-wallet-adapterendec-js@layerzerolabs/lz-utilities@layerzerolabs/lz-aptos@layerzerolabs/lz-corekitexpand-networkfake-user-wallet@kycdao/kycdao-sdkfinancer-sdk-v1@mirage-protocol/sdk@mirage-money/sdk@mirage-protocol/mirage-ts@miskollc/oollet-adapter-plugin@haechi-labs/face-sdk@foxdao/move-to-tspngfi-aptos-sdk@hoangman1108/aptos-adapter@manahippo/move-to-js@manahippo/move-to-ts@manahippo/aptos-tsgen@manahippo/hippo-sdk@martianwallet/aptos-wallet-adapterfewcha-plugin-wallet-adapter@mak201010/wormhole-connect@mak201010/wormhole-connect-sdk@mavensafe/momentum-safe-sdkgalxe-aptos-oat-ts@nightlylabs/aptos-wallet-adapter-plugin@nightlylabs/aptos-wallet-standard@nightlylabs/connect-aptos@nightlylabs/dream-maker@nightlylabs/marketplace@msafe/msafe-uisaef-sdksafe-sdkgenerate-random-stringsgenerate-user-wallet@nixjs23n6/hd-wallet-adapter@nixjs23n6/move-asset@nixjs23n6/move-transaction@nixjs23n6/transaction-adapter@nixjs23n6/block-tracker@nixjs23n6/utilities-adapter@nixjs23n6/aptos-block-tracker@nixjs23n6/asset-adapter@keystonehq/aptos-keyring@keystonehq/aptossnap@keystonehq/aptossnap-adapter@kanalabs/aptos-smart-wallet@kanalabs/aptos-wallet-adapter@kanalabs/kana-widget@kanalabs/perps-sdk@kanalabs/trade@kanalabs/transfer-widget@flipperplatform/wallet-adapter-plugin@fetcch/aptos-pay@fewcha/web3pantinho@identity-connect/api@panoraexchange/widget-sdksimple-greet-me@openblockhq/aptos-wallet-adaptersh-coinssh-coins-testshayha
1.21.0

5 months ago

1.14.0

10 months ago

1.18.0

9 months ago

1.16.0

9 months ago

1.15.0

10 months ago

1.13.2

10 months ago

1.13.1

10 months ago

1.13.0

10 months ago

1.19.0

9 months ago

1.17.0

9 months ago

1.13.3

10 months ago

1.20.0

8 months ago

1.12.0

10 months ago

1.11.0

11 months ago

1.10.0

11 months ago

1.9.1

12 months ago

1.9.0

12 months ago

1.8.5

1 year ago

1.8.4

1 year ago

1.8.2

1 year ago

1.8.3

1 year ago

1.7.2

1 year ago

1.7.1

1 year ago

1.7.0

1 year ago

1.6.0

1 year ago

1.5.0

1 year ago

1.4.0

1 year ago

1.3.17

1 year ago

1.3.16

2 years ago

1.2.0

2 years ago

1.1.0

2 years ago

1.3.7

2 years ago

1.3.6

2 years ago

1.3.5

2 years ago

1.3.4

2 years ago

1.3.3

2 years ago

1.3.2

2 years ago

1.3.1

2 years ago

1.2.2

2 years ago

1.3.0

2 years ago

1.2.1

2 years ago

1.3.10

2 years ago

1.3.13

2 years ago

1.3.14

2 years ago

1.3.11

2 years ago

1.3.12

2 years ago

1.3.15

2 years ago

1.3.9

2 years ago

1.3.8

2 years ago

1.0.0

2 years ago

0.0.20

2 years ago

0.0.19

2 years ago

0.0.18

2 years ago

0.0.17

2 years ago

0.0.16

2 years ago

0.0.15

2 years ago

0.0.14

2 years ago

0.0.13

2 years ago

0.0.12

2 years ago

0.0.11

2 years ago

0.0.10

2 years ago

0.0.9

2 years ago

0.0.8

2 years ago

0.0.7

2 years ago

0.0.6

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago