Migration to 14.0.0
This guide describes all breaking changes introduced with v14.0.0
.
Updated sdk requirements
Minimum supported versions:
aeternity node 7.1.0
aesophia@8
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
recover
, dump
removed (AEX-3 keystore implementation)
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
onAskToSelectNetwork
constructor optionProvide a function throwing RpcMethodNotFoundError
if you don't want to support network change by aepp.
Transaction builder
ChannelClientReconnectTx
removed
ChannelClientReconnectTx
removedYou couldn't use it because it is not supported on the node side.
ORACLE_TTL
, QUERY_TTL
, RESPONSE_TTL
not exported anymore
ORACLE_TTL
, QUERY_TTL
, RESPONSE_TTL
not exported anymoreThese values provided by default in buildTx, if necessary define them as
buildTx
/unpackTx
works only with transactions
buildTx
/unpackTx
works only with transactionsIf you need to work with node's entry use packEntry
/unpackEntry
.
Tag
include only transactions
Tag
include only transactionsNode entries tags moved to EntryTag
.
buildTx
doesn't accept prefix
anymore
buildTx
doesn't accept prefix
anymoreUse decode
/encode
to convert payload to desired format.
NAME_*TTL
, CLIENT_TTL
not exported anymore
NAME_*TTL
, CLIENT_TTL
not exported anymoreThese 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
sign
, signMessage
removedUse MemoryAccount:sign, MemoryAccount:signMessage instead.
isValidKeypair
removed
isValidKeypair
removedCreate a MemoryAccount by a secret key and compare it's address with an address in the key pair instead.
getAddressFromPriv
removed
getAddressFromPriv
removedUse MemoryAccount instead.
Use SDK tools page to convert secret keys.
generateKeyPair
removed
generateKeyPair
removedUse MemoryAccount::generate instead. Optionally add decode
if you need raw keys. Obtain the secret key via MemoryAccount:secretKey.
generateKeyPairFromSecret
removed
generateKeyPairFromSecret
removedUse 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
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
NAME_BID_MAX_LENGTH
not exported anymoreUse isAuctionName
function instead.
Oracle
oracle methods removed
Use Oracle, OracleClient classes instead.
Accordingly for other methods:
pollQueries
don't return responded queries by default
pollQueries
don't return responded queries by defaultUse 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
encodeFateValue
, decodeFateValue
not exported anymoreUse ContractByteArrayEncoder:encodeWithType, decodeWithType from @aeternity/aepp-calldata
.
AeSdk:initializeContract
removed
AeSdk:initializeContract
removedUse Contract.initialize
instead:
createDelegationSignature
removed
createDelegationSignature
removedUse packDelegation
and AccountBase::signDelegation instead.
Methods to sign specific delegations removed
Namely:
signDelegationToContract
,signNameDelegationToContract
,signAllNamesDelegationToContract
,signOracleQueryDelegationToContract
.
Use signDelegation
instead.
Last updated