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.
N/A
- Fix the bug in
waitForTransactionWithResult
. When API returns404
, 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.
- [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
matchesu8
,number | bigint
matchesu64
andu128
, etc. - [Breaking Change]
getTokenBalance
andgetTokenBalanceForAccount
have been renamed togetToken
andgetTokenForAccount
, since they were never getting just the balance, but the full token. - Added
CoinClient
to help working with coins. This contains common operations such astransfer
,checkBalance
, etc. - Added
generateSignSubmitWaitForTransaction
, a function that provides a simple way to execute the full end to end transaction submission flow. You may also leveragegenerateSignSubmit
, a helper that does the same but without waiting, instead returning teh transaction hash. - Added
fromDerivePath
toAptosAccount
. You can use this to create anAptosAccount
(which is a local representation of an account) using a bip44 path and mnemonics.
- 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 acceptBigInt | number
instead.
- 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 ofed_25519_signature
. - Add generated types for healthcheck endpoint.
- If the given URL is missing
/v1
, theAptosClient
constructor will add it for you. You can opt out of this behavior by settingdoNotFixNodeUrl
to true when calling the constructor.
- Re-expose BCS and items from
transaction_builder/builder
from the root of the module.
- Downscaled default value for
max_gas
.
- 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.
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 atTokenTypes
. - 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 likelodash.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.
See release notes for 1.3.2.
See release notes for 1.3.2.
Note: This entry and earlier do not conform to the format set out by Keep a Changelog.
- 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)