Skip to content

Commit

Permalink
Merge branch 'main' into fix-multikey
Browse files Browse the repository at this point in the history
  • Loading branch information
gregnazario authored Feb 18, 2025
2 parents d6ac28d + 6621bec commit 126a905
Show file tree
Hide file tree
Showing 21,205 changed files with 47,873 additions and 644,104 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
4 changes: 0 additions & 4 deletions .eslintignore

This file was deleted.

44 changes: 0 additions & 44 deletions .eslintrc.js

This file was deleted.

21 changes: 20 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,31 @@ All notable changes to the Aptos TypeScript SDK will be captured in this file. T
# Unreleased

- [`fix`] Allow variable length bitmaps in Multikey accounts, allowing for compatibility between SDKs properly
- Add `truncateAddress` helper function to truncate an address at the middle with an ellipsis.

# 1.35.0 (2025-02-11)

- Add `MultiEd25519Account` to support the legacy MultiEd25519 authentication scheme.
- Add `experimental` section to SDK
- Add experimental BCS support for view function outputs
- Upgrade to aptos-client 1.0.0 / remove override for cross-spawn

# 1.34.0 (2025-02-06)

- Add new `scriptComposer` api in `transactionSubmission` api to allow SDK callers to invoke multiple Move functions inside a same transaction and compose the calls dynamically.
- Add support for vectors as string as a valid argument
- Add `AbstractedAccount` class to support account abstraction with custom signers.
- Add `aptos.abstraction` namespace to support account abstraction APIs. Notable functions are: `isAccountAbstractionEnabled`, `enableAccountAbstractionTransaction`, and `disableAccountAbstractionTransaction`.

# 1.33.2 (2025-01-22)

- [`Fix`] Fixes pagination for GetAccountModules and GetAccountResources. Also, adds more appropriate documentation on offset.
- node now no longer supports older than v20
- overriding cross spawn for patch
- Add `AccountUtils` class to help with account serialization and deserialization
- Add `SingleKeySigner` interface which adds the ability to get the `AnyPublicKey` from a `SingleKeyAccount`
- We now throw an error earlier when you try to use the faucet with testnet or mainnet, rather than letting the call happen and then fail later.
- Fix the keyless end-to-end test to properly wait for the account to be funded

# 1.33.1 (2024-11-28)

Expand All @@ -26,7 +46,6 @@ All notable changes to the Aptos TypeScript SDK will be captured in this file. T
# 1.32.1 (2024-11-11)

- Add support for Firebase issuers in the `updateFederatedKeylessJwkSetTransaction` function
- [`Breaking`] Revert new `scriptComposer` api in transactionSubmission api to allow SDK callers to invoke multiple Move functions inside a same transaction and compose the calls dynamically.

# 1.32.0 (2024-11-08)

Expand Down
25 changes: 15 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Typescript SDK for Aptos
# TypeScript SDK for Aptos

![License][github-license]
[![Discord][discord-image]][discord-url]
Expand All @@ -7,15 +7,14 @@
![NPM bundle size](https://img.shields.io/bundlephobia/min/%40aptos-labs/ts-sdk)
[![NPM Package Downloads][npm-image-downloads]][npm-url]

The [TypeScript SDK](https://www.npmjs.com/package/@aptos-labs/ts-sdk) allows you to connect, explore, and interact on the Aptos blockchain. You can use it to request data, send transactions, set up test environments, and more!
The [TypeScript SDK](https://www.npmjs.com/package/@aptos-labs/ts-sdk) allows you to connect, explore, and interact with the Aptos blockchain. You can use it to request data, send transactions, set up test environments, and more!

## Learn How To Use The TypeScript SDK
### [Quickstart](https://aptos.dev/en/build/sdks/ts-sdk/quickstart)
### [Tutorials](https://aptos.dev/en/build/sdks/ts-sdk)
### [Examples](./examples/README.md)
### [Reference Docs (For looking up specific functions)](https://aptos-labs.github.io/aptos-ts-sdk/)


## Installation

### For use in Node.js or a web application
Expand All @@ -26,12 +25,12 @@ Install with your favorite package manager such as npm, yarn, or pnpm:
pnpm install @aptos-labs/ts-sdk
```

### For use in a browser (<= 1.9.1 version only)
### For use in a browser (<= version 1.9.1 only)

You can add the SDK to your web application using a script tag:

```html
<script src="https://unpkg.com/@aptos-labs/ts-sdk/dist/browser/index.global.js" />
<script src="https://unpkg.com/@aptos-labs/ts-sdk/dist/browser/index.global.js"></script>
```

Then, the SDK can be accessed through `window.aptosSDK`.
Expand Down Expand Up @@ -89,7 +88,6 @@ const account = await Account.fromPrivateKey({ privateKey });

// Also, can use this function that resolves the provided private key type and derives the public key from it
// to support key rotation and differentiation between Legacy Ed25519 and Unified authentications
// Read more https://github.com/aptos-labs/aptos-ts-sdk/blob/main/src/api/account.ts#L364
const aptos = new Aptos();
const account = await aptos.deriveAccountFromPrivateKey({ privateKey });
```
Expand Down Expand Up @@ -208,24 +206,31 @@ example();

## Troubleshooting

If you see import error when you do this
If you see an import error when you do this:

```typescript
import { Aptos, AptosConfig, Network } from "@aptos-labs/ts-sdk";
```

It could be your `tsconfig.json` is not using `node`. Make sure your `moduleResolution` in the `tsconfig.json` is set to `node` instead of `bundler`.
It could be that your `tsconfig.json` is not using `node`. Make sure your `moduleResolution` in the `tsconfig.json` is set to `node` instead of `bundler`.

## Contributing

If you found a bug or would like to request a feature, please file an [issue](https://github.com/aptos-labs/aptos-ts-sdk/issues/new/choose).
If, based on the discussion on an issue you would like to offer a code change, please make a [pull request](https://github.com/aptos-labs/aptos-ts-sdk/pulls).
If, based on the discussion on an issue, you would like to offer a code change, please make a [pull request](https://github.com/aptos-labs/aptos-ts-sdk/pulls).
If neither of these describes what you would like to contribute, check out the [contributing guide](https://github.com/aptos-labs/aptos-ts-sdk/blob/main/CONTRIBUTING.md).

## Running unit tests

To run a unit test in this repo, for example, the keyless end-to-end unit test in `tests/e2e/api/keyless.test.ts`:
```
pnpm jest keyless.test.ts
```

[npm-image-version]: https://img.shields.io/npm/v/%40aptos-labs%2Fts-sdk.svg
[npm-image-downloads]: https://img.shields.io/npm/dm/%40aptos-labs%2Fts-sdk.svg
[npm-url]: https://npmjs.org/package/@aptos-labs/ts-sdk
[experimental-url]: https://www.npmjs.com/package/@aptos-labs/ts-sdk/v/experimental
[discord-image]: https://img.shields.io/discord/945856774056083548?label=Discord&logo=discord&style=flat
[discord-url]: https://discord.gg/aptosnetwork
[github-license]: https://img.shields.io/github/license/aptos-labs/aptos-ts-sdk
[github-license]: https://img.shields.io/github/license/aptos-labs/aptos-ts-sdk
141 changes: 0 additions & 141 deletions docs/@aptos-labs/ts-sdk-0.0.0/assets/highlight.css

This file was deleted.

58 changes: 0 additions & 58 deletions docs/@aptos-labs/ts-sdk-0.0.0/assets/main.js

This file was deleted.

1 change: 0 additions & 1 deletion docs/@aptos-labs/ts-sdk-0.0.0/assets/search.js

This file was deleted.

Loading

0 comments on commit 126a905

Please sign in to comment.