1.21.0 • Published 11 months ago

aptos v1.21.0

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
11 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@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-sdksaef-sdksafe-sdkshayhash-coinssh-coins-testrimosafe-plugin-wallet-adaptertemp-l1temp-opti-stake-sdktemp10110starswap-wallet-adaptersdn-testtest-safe-sdktest-widget-knv-1test-widget-knv-2vue-aptos-wallets@mirage-protocol/mirage-tsrimosafe-wallet-adaptermeta-aptosmetaspacecy-aptos-predictionmesonfi-sdklarry-face-sdklarry-face-wallet-aptos-adapter-pluginlarry-wallet-adapter-reactmokshyamsafe-plugin-wallet-adaptermsafemove-to-ts-privatehippo-sdk-privateinertialrush-gameinertialrush-game-testkana-widgetkana-aggregator-sdkmomentum-safe-sdkmygit-infomycel-widgetmatrix-world-wallet-unity-sdkmatthewyunnodejs-oraclepantinhonpty-axelar-cgp-aptospngfi-aptos-sdkpumpkin-farms-testobricsintquisimple-greet-mespacecywalletadaptertpstraintransactions-helpertria-sdk-core-chainstria-sdk-core-chains-jatintools-d4rk444@argodao/argo-sdk@apyrase/client@aptoswarkade/warkade@aptos-labs/aptos-names-connector@aptos-labs/aptos-wallet-plugin@aptstats/aptos-wallet-framework@aptstats/aptossnap-wallet-extension@aptstats/bitkeep-wallet-extension@aptstats/blocto-wallet-extension@aptstats/coin98-wallet-extension@aptstats/fewcha-wallet-extension@aptstats/fletch-wallet-extension@aptstats/fox-wallet-extension@aptstats/hippo-wallet-extension@aptstats/hippo-web-wallet-extension@aptstats/hyperpay-wallet-extension@aptstats/martian-wallet-extension@aptstats/nightly-wallet-extension@aptstats/okx-wallet-extension@aptstats/onto-wallet-extension@aptstats/petra-wallet-extension@aptstats/pontem-wallet-extension@aptstats/rise-wallet-extension@aptstats/safepal-wallet-extension@aptstats/spacecy-wallet-extension@aptstats/spika-wallet-extension@aptstats/tokenpocket-wallet-extension@aptex/aptex-sdk@animeswap.org/v1-sdk
1.21.0

11 months ago

1.14.0

1 year ago

1.18.0

1 year ago

1.16.0

1 year ago

1.15.0

1 year ago

1.13.2

1 year ago

1.13.1

1 year ago

1.13.0

1 year ago

1.19.0

1 year ago

1.17.0

1 year ago

1.13.3

1 year ago

1.20.0

1 year ago

1.12.0

1 year ago

1.11.0

1 year ago

1.10.0

1 year ago

1.9.1

2 years ago

1.9.0

2 years ago

1.8.5

2 years ago

1.8.4

2 years ago

1.8.2

2 years ago

1.8.3

2 years ago

1.7.2

2 years ago

1.7.1

2 years ago

1.7.0

2 years ago

1.6.0

2 years ago

1.5.0

2 years ago

1.4.0

2 years ago

1.3.17

2 years 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

3 years ago

0.0.19

3 years ago

0.0.18

3 years ago

0.0.17

3 years ago

0.0.16

3 years ago

0.0.15

3 years ago

0.0.14

3 years ago

0.0.13

3 years ago

0.0.12

3 years ago

0.0.11

3 years ago

0.0.10

3 years ago

0.0.9

3 years ago

0.0.8

3 years ago

0.0.7

3 years ago

0.0.6

3 years ago

0.0.5

3 years ago

0.0.4

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago