Migration to 14.0.0

This guide describes all breaking changes introduced with v14.0.0.

Updated sdk requirements

Minimum supported versions:

Iris is not supported

Stick to a previous sdk version if it is required.

CommonJS bundles have cjs extension instead js

If you are importing files explicitly from dist folder then you need to update the extension

- https://unpkg.com/@aeternity/aepp-sdk/dist/aepp-sdk.browser-script.js
+ https://unpkg.com/@aeternity/aepp-sdk/dist/aepp-sdk.browser-script.cjs

recover, dump removed (AEX-3 keystore implementation)

Copy the removed implementation to your project or add a previous sdk as a separate dependency

$host is readonly in generated APIs

It is made to don't break caching. If you need to change a server URL, create a new server instance instead.

Aepp

RpcBroadcastError not exported anymore

Because it is not thrown by wallet as well.

Contract delegations used in Iris removed from aepp-wallet connection

Use signDelegation api instead.

Wallet

AeSdkWallet requires onAskToSelectNetwork constructor option

Provide a function throwing RpcMethodNotFoundError if you don't want to support network change by aepp.

Transaction builder

ChannelClientReconnectTx removed

You couldn't use it because it is not supported on the node side.

ORACLE_TTL, QUERY_TTL, RESPONSE_TTL not exported anymore

These values provided by default in buildTx, if necessary define them as

buildTx/unpackTx works only with transactions

If you need to work with node's entry use packEntry/unpackEntry.

Tag include only transactions

Node entries tags moved to EntryTag.

buildTx doesn't accept prefix anymore

Use decode/encode to convert payload to desired format.

NAME_*TTL, CLIENT_TTL not exported anymore

These values provided by default in buildTx, if necessary define them as

Node

Node returns time in KeyBlock and MicroBlockHeader as Date

Apply a change

Account

Save HD wallets methods removed

Namely: deriveChild, derivePathFromKey, getMasterKeyFromSeed,derivePathFromSeed, getKeyPair, generateSaveHDWalletFromSeed,getSaveHDWalletAccounts, getHdWalletAccountFromSeed. Use AccountMnemonicFactory instead.

sign, signMessage removed

Use MemoryAccount:sign, MemoryAccount:signMessage instead.

isValidKeypair removed

Create a MemoryAccount by a secret key and compare it's address with an address in the key pair instead.

getAddressFromPriv removed

Use MemoryAccount instead.

Use SDK tools page to convert secret keys.

generateKeyPair removed

Use MemoryAccount::generate instead. Optionally add decode if you need raw keys. Obtain the secret key via MemoryAccount:secretKey.

generateKeyPairFromSecret removed

Use MemoryAccount instead.

MemoryAccount accepts secret key as sk_-prefixed string

Convert secret key as hex to new format as

Use SDK tools page to convert secret keys.

AccountBase inheritors required to implement signTypedData, signDelegation

You can throw an exception if the account operation is not doable.

Aens

aens* methods removed

Use Name class instead.

Accordingly for other methods:

NAME_BID_MAX_LENGTH not exported anymore

Use isAuctionName function instead.

Oracle

oracle methods removed

Use Oracle, OracleClient classes instead.

Accordingly for other methods:

pollQueries don't return responded queries by default

Use includeResponded option to restore the previous behavior.

Compiler

CompilerCli uses aesophia@8 by default

CompilerCli8 removed

Use CompilerCli instead.

Contract

encodeFateValue, decodeFateValue not exported anymore

Use ContractByteArrayEncoder:encodeWithType, decodeWithType from @aeternity/aepp-calldata.

AeSdk:initializeContract removed

Use Contract.initialize instead:

createDelegationSignature removed

Use packDelegation and AccountBase::signDelegation instead.

Methods to sign specific delegations removed

Namely:

  • signDelegationToContract,

  • signNameDelegationToContract,

  • signAllNamesDelegationToContract,

  • signOracleQueryDelegationToContract.

Use signDelegation instead.

Last updated

Was this helpful?