1.21.0 • Published 2 years ago

aptos v1.21.0

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
2 years 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@identity-connect/ic-sdk@snowflake-so/aptos-wallet-adapteraptid-ts@laminar-markets/sdknutrios-sdk-anpty-axelar-local-dev-aptos@everything-registry/sub-chunk-1158dagora-launchpad-apttea-blockchain-vntdtest-cetus-cmm-sdktest-cetus-sdktest-momentum-safe-sdkwallet-unity-sdkwalless-aptos-wallet-adapterwallet-adapter-plugin-coin98wallet-adapter-plugin-templatevvbridgewormhole-connect-clientwormhole-connect-sdktemp-l1temp-opti-stake-sdktemp10110starswap-wallet-adaptertest-safe-sdktest-widget-knv-1test-widget-knv-2vue-aptos-walletsfinancer-sdk-v1kana-widgetkana-aggregator-sdklarry-wallet-adapter-reactlarry-face-sdklarry-face-wallet-aptos-adapter-plugininertialrush-game-testinertialrush-gamehippo-sdk-privatematrix-world-wallet-unity-sdkmatthewyunmesonfi-sdk@walless/network@walterguo/widget1@web3helpers/aptos-wallet@welldone-studio/aptos-wallet-adapter@white-matrix/infamous-contract-sdk@white-matrix/matrix-world-wallet-unity-sdk@wormhole-foundation/connect-sdk-aptos@wormhole-foundation/wormhole-cli@xircus-web3/sdk@tsunami-finance/tsunami-lib-ts@tsunami-mono/dex-sdk@trustwallet/aptos-wallet-adapter@tickmesh/aptos@tiexohq/web3-common@thalalabs/okx-wallet-adapter@tp-lab/aptos-wallet-adapter@vinswap.io/v1-sdk@us3r-network/wormhole-connect@vividnetwork/swap-sdk@vivos/sdk@xiaoch05/sdk@yornswap/aptos-swap-sdk@zeefi/cli@zeefi/oracle-sdkabcdefasdasddasadsdasabw-multichain-sdkaptai-jstaptos-payaptos-pay-sdkaptos-wallet-apiaptos-wallet-api-v2aptos-warkadeaptosjsaptossnapaptostestdexaptoswarcadeaptpp-jsaptoplay-coreaptos-adapteraptos-arena-package-v1aptos-coin-transferaptos-faucetaptos-linesprinter-gameaptos-looperaptos-plixylus-gameaptos-wallet-adapter@halo.social/aptos-wallet-adapter@haechi-labs/face-sdk@eden-network/sokel-sdk@mirage-protocol/mirage-tsrimosafe-wallet-adapterspacecywalletadaptertpstraintransactions-helpertria-sdk-core-chainstria-sdk-core-chains-jatintools-d4rk444@aptex/aptex-sdkxp.networkwarkade
1.21.0

2 years ago

1.14.0

2 years ago

1.18.0

2 years ago

1.16.0

2 years ago

1.15.0

2 years ago

1.13.2

2 years ago

1.13.1

2 years ago

1.13.0

2 years ago

1.19.0

2 years ago

1.17.0

2 years ago

1.13.3

2 years ago

1.20.0

2 years ago

1.12.0

2 years ago

1.11.0

2 years ago

1.10.0

2 years ago

1.9.1

2 years ago

1.9.0

2 years ago

1.8.5

3 years ago

1.8.4

3 years ago

1.8.2

3 years ago

1.8.3

3 years ago

1.7.2

3 years ago

1.7.1

3 years ago

1.7.0

3 years ago

1.6.0

3 years ago

1.5.0

3 years ago

1.4.0

3 years ago

1.3.17

3 years ago

1.3.16

3 years ago

1.2.0

3 years ago

1.1.0

3 years ago

1.3.7

3 years ago

1.3.6

3 years ago

1.3.5

3 years ago

1.3.4

3 years ago

1.3.3

3 years ago

1.3.2

3 years ago

1.3.1

3 years ago

1.2.2

3 years ago

1.3.0

3 years ago

1.2.1

3 years ago

1.3.10

3 years ago

1.3.13

3 years ago

1.3.14

3 years ago

1.3.11

3 years ago

1.3.12

3 years ago

1.3.15

3 years ago

1.3.9

3 years ago

1.3.8

3 years ago

1.0.0

3 years ago

0.0.20

3 years ago

0.0.19

3 years ago

0.0.18

4 years ago

0.0.17

4 years ago

0.0.16

4 years ago

0.0.15

4 years ago

0.0.14

4 years ago

0.0.13

4 years ago

0.0.12

4 years ago

0.0.11

4 years ago

0.0.10

4 years ago

0.0.9

4 years ago

0.0.8

4 years ago

0.0.7

4 years ago

0.0.6

4 years ago

0.0.5

4 years ago

0.0.4

4 years ago

0.0.3

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago