New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

aptos

Package Overview
Dependencies
Maintainers
1
Versions
70
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

aptos

Aptos SDK

  • 1.2.2
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
153K
decreased by-22.45%
Maintainers
1
Weekly downloads
 
Created
Source

Aptos TS/JS SDK

Discord NPM Package Version NPM Package Downloads

You need to connect to an Aptos node to use this library, or run one yourself locally.

API Docs

Docs can be found here

Usage

For Javascript or Typescript usage, check out the ./examples folder with ready-made package.json files to get you going quickly!

If you are using the types in a commonjs module, like in a Node app, you just have to enable esModuleInterop and allowSyntheticDefaultImports in your tsconfig for types compatibility:

{
  ...
  "compilerOptions": {
    "allowSyntheticDefaultImports": true,
    "esModuleInterop": true
    ...
  }
}

Requirements

sudo apt-get update
sudo apt-get install nodejs yarn

Generating Types

Originally created with this:

$  npx swagger-typescript-api@latest -p ../../../api/doc/openapi.yaml -o ./src/api --modular --axios --single-http-client
Changes to make after generation:
  • OpenAPI/SpecHTML routes/types deleted as they're unneeded.
  • There are a few type errors in the http-client.ts as the axios types are incomplete, that were fixed via // @ts-ignore

Testing (jest)

yarn test

Semantic versioning

This project follows semver as closely as possible

Release process

  1. Regenerate generated types npx swagger-typescript-api@latest -p ../../../api/doc/openapi.yaml -o ./src/api --modular --axios --single-http-client
  2. Update your commit message to follow the Angular Conventional Commits
  3. Test lint and format yarn test yarn lint yarn fmt
  4. Update the version in the package.json file and run yarn changelog to generate the changelog
  5. Once it's all committed you can run npm release

Generate the change log. yarn changelog and bump the version in package.json. Only bump the minor version. Commit the changes. yarn build to build the package. Ideally, you should test the new package in browser to make sure it works in browser as well. Follow https://aptos-org.slack.com/archives/C034HFWPJ05/p1651687417201819, to publish the package

Keywords

FAQs

Package last updated on 28 Jul 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc