All notable changes to the Aptos TypeScript 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.
- 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.
- Add
gasProfile
function toMove
class to allow for gas profiling of Aptos Move functions PrivateKey.formatPrivateKey
now supports formatting AIP-80 strings- Removed strictness warnings for bytes AIP-80 private key parsing formatting.
- Add accidentally deleted
deserializeOptionStr
and mark deprecated to unbreak Wallet Adapter
- Allow optional provision of public keys in transaction simulation
- Update the multisig v2 example to demonstrate a new way to pre-check a multisig payload before it is created on-chain
- Add support for Firebase issuers in the
updateFederatedKeylessJwkSetTransaction
function - [
Breaking
] Revert newscriptComposer
api in transactionSubmission api to allower SDK callers to invoke multiple Move functions inside a same transaction and compose the calls dynamically.
- [
Breaking
] UpdatedAccountAddress.fromString
andAccountAddress.from
to only accept SHORT strings that are 60-64 characters long by default (with the exception of special addresses). This can be adjusted usingmaxMissingChars
which is set to4
by default. If you would like to keep the previous behavior, setmaxMissingChars
to63
for relaxed parsing. - Add support for AIP-80 compliant private key imports and exports through
toAIP80String
- Add
PrivateKey
helpers for AIP-80:PrivateKey.parseHexInput
,PrivateKey.formatPrivateKey
, andPrivateKey.AIP80_PREFIXES
. - Adds explicit error handling Keyless accounts using
KeylessError
. Handles JWK rotations and Verifying Key rotations. - Includes the address in the
AbstractKeylessAccount
serialization to prevent information loss for key rotated accounts. - [
Breaking
] DeprecateserializeOptionStr
anddeserializeOptionStr
in favor ofserializeOption
anddeserializeOption
. - [
Breaking
] RenamesKeylessConfiguration.verficationKey
toverificationKey
- Add a new
scriptComposer
api in transactionSubmission api to allower SDK callers to invoke multiple Move functions inside a same transaction and compose the calls dynamically.
- Bump
@aptos-labs/aptos-cli
to1.0.2
- Fix the
Move
CLI command to correctly handle the success/error outputs
- Add the
isPrimitive
function toTypeTag
. - Add
showStdout
optional property toMove
andLocalNode
classes to control the output of the CLI commands - Add support for MultiKey's in transaction simulations
- Adds default implementation for
toString
andtoStringWithoutPrefix
forSerializable
- Bump
@aptos-labs/aptos-cli
to1.0.1
- Fix the
FederatedKeylessAccount
constructor to derive the correct address.
- Remove usage of Buffer.from and replace with TextEncoder for greater compatibility
- Switch
getAccountCoinAmount
to use aview
function for more up to date data - Add support for federated keyless accounts as defined in AIP-96
- Add a
signAndSubmitAsFeePayer
function to the API to allow for submission by the fee payer. - Add an optional
feePayerAuthenticator
andfeePayer
parameter tosignAndSubmitTransaction
to support signing and submitting in one line.
- Support
Serialized Type
to Script txn. Now can use vector for example. - Add optional address parameter to MultiKeyAccount constructor.
- Populate
coinType
forgetAccountCoinAmount
if onlyfaMetadataAddress
is provided. - [
Fix
]getModuleEventsByEventType
will also account for EventHandle events. - [
Hot Fix
] change regex to find object address when usingcreateObjectAndPublishPackage
move function
- [Security Fix] Bump
@aptos-labs/aptos-client
to version 0.1.1
- Upgrade
@aptos-labs/aptos-cli
version to0.2.0
- Update Indexer GraphQL schema
- Add
convertAmountFromHumanReadableToOnChain
andconvertAmountFromOnChainToHumanReadable
helper methods - Export
helpers.ts
file - Add
remaining()
function to deserializer, to tell remaining byte size - Add BCS spec for testing purposes with Cucumber
- Support
extraArguments
optional property on the cli Move commands - Update
fundWallet
check to be more explicit thatundefined
inwaitForIndexer
defaults to waiting. - [
Fix
] Fixes transactions simulations using anAnyPublicKey
with aKeylessPublicKey
- Change the
stop()
function onLocalNode
to return aPromise
so we can wait for the processes to be killed - Introduce
buildPublishPayload
CLI function to build a publication transaction payload and store it in a JSON output file
- Make
fundAccount
to wait for thefungible_asset_processor
indexer processor - Removed
instanceof
where input might come from other bundle
- Adds a base implementation of verify signature for Keyless Accounts
- [
Fix
] Support migrated coins in coin balance lookup indexer queries - Add support for BlockEpilogueTransaction
- [
Fix
] Fixes a bug with ANS not returning subdomains with an expiration policy of 1 when the subdomain is expired but the parent domain is not. - Marked AptosApiError.constructor function as @internal and changed its signature
- AptosApiError.message contains a more descriptive and more detailed error message to ease troubleshooting
- Release an updated build to npm due to issues with latest release
- Fix unit test of ts sdk.
- Bump Aptos CLI version that will auto upgrade Aptos CLI to 0.1.9.
- Export
core/account
folder and the functions:createObjectAddress
createResourceAddress
createTokenAddress
- [
Fix
] Respect pagination arguments onEvents
queries - Add
createObjectAndPublishPackage
,upgradeObjectPackage
andrunScript
to cli in ts.
- Introduce
AptosObject
API for all Object queries - Add
getObjectDataByObjectAddress
API function to fetch an object data by the object address - [
Breaking
]GetAccountOwnedObjectsResponse
type renamed toGetObjectDataQueryResponse
- Add
getCollectionDataByCreatorAddressAndCollectionName
andgetCollectionDataByCreatorAddress
API queries - Add
PaginationArgs
argument togetCollectionDataByCollectionId
API query - Mark
getCollectionData
API query as@deprecated
- [
Fix
]getAccountCollectionsWithOwnedTokens
no longer uses amount query
- Add
getFungibleAssetMetadataByCreatorAddress
API function to fetch fungible asset metadata by the creator address - [
Fix
] Allow for empty array in MoveVector.U8 - [
Fix
] Correctly type MoveOption when empty for some cases - [
Fix
] Add better error handling for empty string "" when used for a u8-u32 argument input type - [
Fix
] Always fetch latest git dependency when running move cli.
- [
Fix
] Keyless transaction simulation now reports gas correctly - [
Fix
] Fix cli move commands when multiplenamedAddresses
are given
- Adds Keyless Account support
- Add
supply_v2
andmaximum_v2
scheme fields togetFungibleAssetMetadata
query
- TypeTag parsing now support references, uppercase types, and more complete error handling
- Allow simple string inputs as type arguments in move scripts
- [
Fix
] Block APIs will now pull all associated transactions in the block, not just the first100
- Upgrade
@aptos-labs/aptos-cli
package to version0.1.8
- [
Fix
] CLI scripts to be OS compatible with Mac, Linux and Windows - [
Fix
] Support generating transactions with loose types for SDK V1 backward compatibility
- [
Breaking
] Removes private key from the Account class to support MultiKey accounts. - [
Breaking
] Removes thesign
function from transactionBuilder.ts. UseAccount.signTransactionWithAuthenticator
instead. - Refactors the core/accounts folder to the top level
- Separates the signing message functionality out of the transactionSubmission.ts file
- Adds an Account implementation for MultiKey accounts
- Upgrade
@aptos-labs/aptos-cli
package to version0.1.7
- Introduce
table
function APIs - Add
getTableItemsData
andgetTableItemsMetadata
API queries - Add
decimal
prop back tocurrent_token_ownerships_v2.current_token_data
response
- [
Fix
] fixedtrasnferFungibleAsset
function - Run all examples in CI
- Introcude cli
Move
class that holdsmove
related commands - Add common cli commands -
move.init()
,move.compile()
,move.test()
,move.publish()
- [
Fix
] FixgenerateSigningMessage
to check type explicitly instead of usingintanceOf
- Remove
randomnet
from the known Network enum
- Export
MultiAgentTransaction
class
- [
Fix
] FixgenerateSignedTransaction
so that it works with object instances from different bundles - [
Fix
] Preventing undefined options from overriding fallbacks ingenerateRawTransaction
- Use
@aptos-labs/aptos-cli
as a regular dependency
- [
Fix
] Fixes Local ABI to use it locally rather than make an external network call - Performance improvements to transaction build times
- [
Breaking
] Change ed25519 library to be@noble/curves/ed25519
- Fix ed25519 signature verification to ensure for canonical signatures to prevent malleability
- Include
x-aptos-typescript-sdk-origin-method
header on server request - Export
LocalNode
module using the module relative path - Change the
waitForTransaction
SDK API to try long poll
- Revert export
LocalNode
module
- Export
LocalNode
module
- [
Breaking
] ChangegetOwnerAddress
andgetTargetAddress
return type toAccountAddress
- Add
message
input type verification onsign
andverifySignature
functions and convert it into a correct type if needed - [
Breaking
] ChangefromString
tofromHexString
onHex
class - Introduce Serializable
SimpleTransaction
andMultiAgentTransaction
modules - [
Breaking
] Change any generate transaction function to returnSimpleTransaction
orMultiAgentTransaction
instance - Adds
getUserTransactionHash
which can generate a transaction hash after signing, but before submission - Add function to create resource address locally
- Use indexer API via API Gateway
- Add support to allow setting per-backend (fullnode, indexer, faucet) configuration
- [
Breaking
]AUTH_TOKEN
client config moved to be underfaucetConfig
property - Handle
Unauthorized
server error - Add function to create object address locally
- Add function to create token object address locally
- Add signers to entry function ABI for future signature count checking
- [
Breaking
] Add type-safe view functions with ABI support - [
Fix
] ANSgetName
andgetDomainSubdomains
now appropriately ignores invalid and expired names
- [
Deprecate
] IIFE build support - Use node API via API Gateway
- [
Fix
] FiltergetCurrentDigitalAssetOwnership
where amount > 0
- [
Fix
] Remove decimals field fromCurrentTokenOwnershipFields
gql fragement
- Add
getCollectionByCollectionId
API - Changed
Account
into an abstract class, and defined strongly-typed specializations.
- Add
decimals
field to token data queries - Add support for
validator_transaction
type introduced in 1.10 - Add
getModuleEventsByEventType
API
- Add ability to provide ABI to skip ABI fetch, and get roughly 50% performance improvement
- Add optional
options
param togetAccountEventsByCreationNumber
query for paginations and order by - Add more meaningful API error messages
- Support automated account creation for sponsored transactions
- Add randomnet to known networks
- Move eventemitter3 to runtime dependency
- Remove request URLs forward slash append
- Add events to
TransactionWorker
module that dapps can listen to - Introduce
aptos.transaction.batch
namespace to handle batch transactions - Support
aptos.transaction.batch.forSingleAccount()
to send batch transactions for a single account - Label
aptos.batchTransactionsForSingleAccount()
asdeprecated
to prefer usingaptos.transaction.batch.forSingleAccount()
- Omit
"build" | "simulate" | "submit"
fromaptos
namespace - [
Breaking
] Changesender
property type toAccountAddressInput
intransferCoinTransaction()
- [
Breaking
] CapitalizeTransactionPayloadMultiSig
type - Add support to Array value in digital asset property map
- [
Breaking
] ChangemaxGasAmount, gasUnitPrice and expireTimestamp
properties inInputGenerateTransactionOptions
type tonumber
type - Add
@aptos-labs/aptos-cli
npm package as a dev dependency - Implement a
LocalNode
module to run a local testnet with in the SDK environment - Use
LocalNode
module to spin up a local testnet pre running SDK tests - Update BigInt constants to be hardcoded rather than use Math.pow
- Fixed examples to use wait on indexer rather than sleep
- Fixed
waitOnIndexer
to wait on correct tables / remove duplicate or unnecessary waits on indexer - [
Breaking
] Changed output ofgetIndexerLastSuccessVersion
tobigint
fromnumber
- Update dependencies in the Typescript SDK to keep up with latest changes
- Updated @aptos-labs/aptos-client dependency
- [
Breaking
] Hex string inputs tovector<u8>
entry function arguments will now be interpreted as a string instead of hex - String inputs to
vector<u8>
entry function arguments will now be interpeted as UTF-8 bytes - ArrayBuffer is now a possible input for
vector<u8>
entry function arguments
- Add release automation, so version updates can be made with simply
pnpm update-version
- Rename custom request header to
aptos-typescript-sdk
- [
Breaking
] Renametoken
todigitalAsset
and add digital asset built in transaction generation functions - [
Breaking
] change transaction submission builder flow namespace to be under atransaction
namespace - [
Breaking
] RenameSingleSignerTransaction
type toSimpleTransaction
Release Stable version 1.0.0
- Respect
API_KEY
option inclientConfig
when making indexer and/or fullnode queries - [
Added
] AddedwaitForIndexer
function to wait for indexer to sync up with full node. All indexer query functions now accepts a new optional paramminimumLedgerVersion
to wait for indexer to sync up with the target processor. - Add
getSigningMessage
to allow users to sign transactions with external signers and other use cases - [
Breaking
] Changes ANS date usage to consistently use epoch timestamps represented in milliseconds.getExpiration
: Previously returned seconds, now returns millisecondsregisterName
: Argumentexpiration.expirationDate
was previously aDate
object, now it is an epoch timestamp represented in milliseconds- All query functions return epoch milliseconds instead of ISO date strings.
- [
Breaking
] Flatten options for all functions to be a single level - Cleanup internal usage of casting
- Export
AnyPublicKey
andAnySignature
types - Add
transferFungibleAsset
function to easily generate a transaction to transfer a fungible asset from sender's primary store to recipient's primary store - [
Breaking
]AccountAddress.fromRelaxed
is nowAccountAddress.from
, and a newAccountAddress.fromStrict
has the old functionality. - Implement transaction management worker layer to manage transaction submission for a single account with a high throughput
- [
Fixed
] Allow for Uint8Array to be passed as avector<u8>
argument on entry functions - [
Fixed
] Allow for raw vectors to be passed as arguments with encoded types within them for Remote ABI on entry functions e.g. [AccountAddress]
-
Adds additional ANS APIs
- Transactions
- setPrimaryName
- setTargetAddress
- registerName
- renew_domain
- Queries
- getPrimaryName
- getOwnerAddress
- getExpiration
- getTargetAddress
- getName
- getAccountNames
- getAccountDomains
- getAccountSubdomains
- getDomainSubdomains
- Transactions
-
[
Breaking
] Refactor transaction builder flow- Each builder step is under a dedicated namespace -
aptos.build.transaction
,aptos.sign.transaction
,aptos.submit.transaction
- Supports and implements 2 types of transactions - single signer as
aptos.*.transaction
and multi agent asaptos.*.multiAgentTransaction
- A boolean
withFeePayer
argument can be passed to any transactionbuild
function to make it a Sponsor transaction - Different functions
aptos.sign.transaction
to sign a transaction as a single signer andaptos.sign.transactionAsFeePayer
to sign a transaction as a sponsor - Return
InputSingleSignerTransaction
type changed toSingleSignerTransaction
type - Return
InputMultiAgentTransaction
type changed toMultiAgentTransaction
type
- Each builder step is under a dedicated namespace -
- [
Breaking
] ChangedViewRequestData
toInputViewRequestData
- Respect max gas amount value when generating a transaction
- Added a clearer error message for when the typeTagParser encounters a possible generic TypeTag but generics are disallowed
- Update all dependencies to the latest version
- Added ability for providing own output types for view functions
- [
Breaking
] Update and changed the flow of Fee payer transaction to be "Optional Fee Payer". A fee payer is now required to sign the transactionasFeePayer
getAccountEventsByEventType
query uses newindexed_type
indexed field to avoid rate limit- [
Breaking
] RenameTOKEN
toAUTH_TOKEN
for better visibility - Set the
AUTH_TOKEN
only for faucet queries
- [
Breaking
] Changed all instances ofAccountAddress.fromHexInput
toAccountAddress.from
to accept AccountAddress as well - [
Fixed
] Fixed a bug where an entry function with only signers would fail due to type tag parsing - [
Fixed
] REST API errors now properly give error messages in JSON rather than justBadRequest
- All address inputs now also accept AccountAddress
- Support derive account from private key
Account.fromPrivateKey()
- Derive account from derivation path secp256k1 support
- Default Account generation to Legacy Ed25519
- Remove unnecessary pre-emptive serialization of the field
rawTransaction: Uint8Array
by replacing it with the unserializedrawTransaction: RawTransaction
class - ANS (Aptos Names Service) SDK initial support for creation and lookup of names
- Initial Auth key rotation support
- Remove MoveObject in favor of AccountAddress, use AccountAddress for Object inputs
- Use revamped parseTypeTag function instead of StructTag.fromString()
- Allow use of generics in parseTypeTag
- Rename publishModuleTransaction to publishPackageTransaction and fix functionality accordingly
- Added toString() for type tags, and reference placeholder type
- Add ability to generate transactions with known ABI and remote ABI
- Fix verify signature logic
- Implement
MultiKey
support for multi authentication key
- Build package before publishing\
- Add
AccountAddress.ZERO
to support the frequent future use of an optional fee payer address
- [
Breaking
] Changed all instances ofarguments
tofunctionArguments
to avoid the reserved keyword instrict
mode. - Support publish move module API function
- Fix client config not being added to the request
- Support to config a custom client instance
- Changed all Regex based inputs requiring a
0x
to be optional. This is to allow for easier copy/pasting of addresses and keys. - Change GetAccountResource to take in a generic output type that matches the struct
- Add support for Single Sender
- Fetch data from chain
- Fund account with APT coins
- Proper formatting and parsing of account addresses as defined by AIP-40
- Submit transactions
- Single signer
- Fee payer
- Multi agent
- With payloads
- Entry function
- Script
- Multisig
- Simulate a transaction
- Single signer
- Fee payer
- Multi agent
- Built in transaction generation
- Transfer coins
- Mint collection
- Mint nft
- Keys management
- ED25519
- Secp256k1 - to go in next devnet release
- Generate new keys
- Derive from existing private key
- Derive from mnemonics path
- Derive from private key and address (for account that has it's key rotated)
- Sign
- Verify signature
- BCS support
- Move sub-classes to easily serialize and deserialize Move types
- Unified Argument class for entry function and script payload argument types
- Full nested serialization/deserialization support
- Examples (both typescript and javascript)
- Simple transfer transaction example
- Transfer transaction example using built in transferCoinTransaction
- Fee payer (aka sponsored) transaction example
- Multi agent transaction example
- Mint collection and nft
- Local custom types (instead of generating types)
- In depths type checking on compile time
- Typescript can infer the return type based on the argument being passed into
generateTransaction
function (singlesigner,multiagent,feepayer) - Support for orderBy keys type checking for indexer queries
- Typescript can infer the return type based on the argument being passed into