Skip to content

Latest commit

 

History

History
115 lines (74 loc) · 9.02 KB

CHANGELOG.md

File metadata and controls

115 lines (74 loc) · 9.02 KB

Aptos TS SDK Changelog

All notable changes to the Aptos Node SDK will be captured in this file. This changelog is written by hand for now. It adheres to the format set out by Keep a Changelog.

Note: The Aptos TS SDK does not follow semantic version while we are in active development. Instead, breaking changes will be announced with each devnet cut. Once we launch our mainnet, the SDK will follow semantic versioning closely.

Unreleased

N/A

1.3.10 (2022-08-26)

  • Fix the bug in waitForTransactionWithResult. When API returns 404, the function should continue waiting rather than returning early. The reason is that the txn might not be committed promptly. waitForTransactionWithResult should either timeout or get an error in such case.

1.3.9 (2022-08-25)

  • [Breaking Change] Reimplemented the JSON transaction submission interfaces with BCS. This is a breaking change. createSigningMessage is removed. Before the changes, the transaction payloads take string aruguments. But now, Typescript payload arguments have to match the smart contract arugment types. e.g. number matches u8, number | bigint matches u64 and u128, etc.
  • [Breaking Change] getTokenBalance and getTokenBalanceForAccount have been renamed to getToken and getTokenForAccount, since they were never getting just the balance, but the full token.
  • Added CoinClient to help working with coins. This contains common operations such as transfer, checkBalance, etc.
  • Added generateSignSubmitWaitForTransaction, a function that provides a simple way to execute the full end to end transaction submission flow. You may also leverage generateSignSubmit, a helper that does the same but without waiting, instead returning teh transaction hash.
  • Added fromDerivePath to AptosAccount. You can use this to create an AptosAccount (which is a local representation of an account) using a bip44 path and mnemonics.

1.3.7 (2022-08-17)

  • Add a transaction builder that is able to serialize transaction arguments with remote ABIs. Remote ABIs are fetchable through REST APIs. With the remote ABI transaction builder, developers can build BCS transactions by only providing the native JS values.
  • Make all functions that accept BigInt parameters accept BigInt | number instead.

1.3.6 (2022-08-10)

  • Switch back to representing certain move types (MoveModuleId, MoveStructTag, ScriptFunctionId) as strings, for both requests and responses. This reverts the change made in 1.3.2. See #2663 for more.
  • Represent certain fields with slightly different snake casing, e.g. ed25519_signature now instead of ed_25519_signature.
  • Add generated types for healthcheck endpoint.
  • If the given URL is missing /v1, the AptosClient constructor will add it for you. You can opt out of this behavior by setting doNotFixNodeUrl to true when calling the constructor.

1.3.5 (2022-08-08)

  • Re-expose BCS and items from transaction_builder/builder from the root of the module.

1.3.4 (2022-08-07)

  • Downscaled default value for max_gas.

1.3.3 (2022-08-05)

  • Update the token clients to submit transactions through BCS interface. The new token client doesn't hex-code "name", "decription" and "uri" any more. String properties are passed and saved just as strings.
  • Expose buildTransactionPayload from ABI transaction builder. In some scenarios, developers just want to get a TransactionPayload rather than a RawTransaction.

1.3.2 (2022-08-04)

This special entry does not conform to the format set out by Keep a Changelog as there are noteworthy breaking changes with necessary rationale. Future entries will follow this format.

This release updates the SDK to work with V1 of the Aptos Node API. There are some key changes between V0 and V1 that you can read about in the API changelog, refer to the notes for version 1.0.0. Accordingly, this SDK version represents breaking changes compared to 1.2.1.

  • The SDK now communicates by default with the /v1 path of the API. It will not work correctly with the v0 API. If you provide a path yourself when instantiating a client, make sure you include /v1, e.g. http://fullnode.devnet.aptoslabs.com/v1.
  • As of this release, the API, API spec, client generated from that spec, SDK wrapper, and examples are all tested together in CI. Previously it was possible for these to be out of sync, or in some cases, they would test against a different deployment entirely, such as devnet. Now we make the guarantee that all these pieces from the same commit work together. Notably this means exactly that; there is no guarantee that the latest version of the SDK will work with a particular Aptos network, such as devnet, except for a network built from the same commit as the SDK.
  • The generated client within the SDK is generated using a different tool, openapi-typescript-codegen. Most of these changes are transparent to the user, as we continue to wrap the generated client, but some of the generated types are different, which we mention here.
  • Token types are no longer exposed from the generated client (under Types) as they are no longer part of the API (indeed, they never truly were). Instead you can find these definitions exposed at TokenTypes.
  • Some functions, such as for getting account resources and events, no longer accept resource types as concatenated strings. For example:
# Before:
const aptosCoin = "0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>";
# After
const aptosCoin = const aptosCoin = {
    address: "0x1",
    module: "coin",
    name: "CoinStore",
    generic_type_params: ["0x1::aptos_coin::AptosCoin"],
};
  • Similarly, some endpoints no longer return this data as a string, but in a structured format, e.g. MoveStructTag. Remember to use something like lodash.isEqual to do equality checks with these structs.
  • To help work with these different formats, functions for converting between them have been added to utils.
  • A new function, waitForTransactionWithResult, has been added to help wait for a transaction and then get access to the response from the server once the function exits.

For help with migration, we recommend you see the updated examples under examples/, they demonstrate how to deal with some of these changes, such as the more structured responses. We are also available to assist in the Aptos Discord.

Deprecation Notice: On September 1st we will remove the v0 API from the running nodes. As a user of the TS SDK, the best way you can migrate prior to this is by upgrading to version 1.3.2 or higher of the SDK. We will repeatedly remind developers of this upcoming deprecation as we approach that date.

1.3.1 (2022-08-04)

See release notes for 1.3.2.

1.3.0 (2022-08-03)

See release notes for 1.3.2.

1.2.1 (2022-07-23)

Note: This entry and earlier do not conform to the format set out by Keep a Changelog.

Features

  • Deprecate getTokenBalance api in SDK (2ec554e)
  • Memoize chain id in aptos client (#1589) (4a6453b)
  • Multiagent: Support multiagent transaction submission (#1543) (0f0c70e)
  • Support retrieving token balance for any account (7f93c21)

Bug Fixes

1.2.0 (2022-06-28)

Features

  • Vector tests for transaction signing (6210c10)
  • Add royalty support for NFT tokens (93a2cd0)
  • Add transaction builder examples (a710a50)
  • Support transaction simulation (93073bf)

Bug Fixes