13.0.0-beta.0
Pre-release
Pre-release
davidyuk
released this
01 Mar 11:38
·
617 commits
to develop
since this release
⚠ BREAKING CHANGES
Please check out migration guide.
Wallet
onSign
,onMessageSign
callbacks were removed on the wallet side
Contract
- ACI format used the same as returned by aesophia_cli
createAensDelegationSignature
,createOracleDelegationSignature
replaced withcreateDelegationSignature
params
argument in$deploy
and$call
is requiredAeSdk.getContractInstance
renamed toAeSdk.initializeContract
getContractInstance
function replaced with Contract class- Contract methods accessible on the instance itself
contract.methods.<name>.get,send
removedcontract.bytecode,sourceCode
moved tocontract.$options
contract.calldata
renamed tocontract._calldata
contract.deployInfo
removedcontract.options
renamed tocontract.$options
contract.decodeEvents
renamed tocontract.$decodeEvents
contract.call
renamed tocontract.$call
contract.compile
renamed tocontract.$compile
contract.deploy
renamed tocontract.$deploy
- use
sourceCode
instead ofsource
getContractInstance
acceptsaddress
instead ofcontractAddress
prepareTxParams
,getVmVersion
are not exported anymoreisGA
method removed
Transaction builder
- StateTrees fields decoded as objects mapping key to decoded entry instead of internals
- The content of Tag.*Mtree entries decoded and moved to
payload
field - TX_SCHEMA, TxParamsCommon, TxSchema, TxTypeSchemas not exported anymore
- AeSdk.buildTx accepts
tag
in options TX_TTL
not exported anymore- sync
buildTx
acceptsdenomination
in the first argument - Enum
FIELD_TYPES
is not exported anymore - Not able to build/unpack CompilerSophia entry (tag 70)
- Enums
PROTOCOL_VM_ABI
, interfaceCtVersion
not exported anymore - Enums
VM_VERSIONS
,ABI_VERSIONS
,PROTOCOL_VERSIONS
renamed stateHash
of Channel entry decoded asst_
-prefixed string instead of hexkey
of MtreeValue entry decoded as a buffer instead of a hex- SpendTx
payload
doesn't accept arbitrary strings anymore unpackTx
return an object of transaction parametersunpackTx
doesn't returnrlpEncoded
anymoreverifyTransaction
doesn't accept parent tx types anymore- TxBuilder accepts and returns
poi
field unpacked as TreesPoi buildTx
accepts transaction type and version in the first argumentbuildTx
return string instead of objectbuildTx
doesn't returntxObject
anymorebuildTx
doesn't returnbinary
anymorebuildTx
doesn't returnrlpEncoded
anymorebuildTx
doesn't acceptexcludeKeys
option anymore- Use
version
instead ofVSN
,vsn
inunpackTx
,buildTx
txType
property ofunpackTx
removedget
method of MPTree accepts and returns typed valueswriteInt
function removedreturnType
of contract call result structure is a value of CallReturnType enumwriteId
,readId
functions removedreadPointers
,buildPointers
functions removedformatSalt
function removedvalidateParams
,unpackRawTx
functions removedAMOUNT
constant removed
Compiler
- Methods of
CompilerHttp
moved toapi
property Compiler
export renamed toCompilerHttp
- removed
compilerUrl
,setCompilerUrl
- Dropped compatibility with aesophia_http below 7.1.1, aesophia_cli below 7.0.1
Account
createGeneralizedAccount
acceptssourceCode
in optionscreateMetaTx
removedAccountRpc
constructor accepts arguments one by oneAccountMemory
requiresnetworkId
insignTransaction
AccountBase
simplifiedaddress
inAccountBase
is a property- MemoryAccount accepts only secretKey
- MemoryAccount is not compatible with GA
Node
url
property ofNode
removed
Oracle
QUERY_FEE
is not exported anymore- Oracles created without queryFee by default
- AeSdk:extendOracleTtl, AeSdk:respondToQuery doesn't accept oracleId
onQuery
callback ofpollForQueries
,oracle.pollQueries
accepts a single query
Chain
send
inlined intosendTransaction
AENS
height
removed from the output ofaensPreclaim
Channel
- Channel:state returns unpacked entries
- All channel events emitted in snakeCase
- Channel:poi returns unpacked TreesPoi
Other
onAccount
doesn't accept keypairbigNumberToByteArray
removedstr2buf
function removedgetAddressFromPriv
doesn't accept private key as base64-encoded or raw stringisValidKeypair
doesn't accept public key as base64-encoded stringbytesToHex
function removedhexToBytes
function removed- rename umd export to
Aeternity
- Subpaths imports of SDK are not allowed
- Removed
getNetworkId
fromAeSdkBase
address
a getter in AeSdkBaseaddAccount
is a sync functionverifyMessage
removed from accounts and AeSdkBaseverify
andverifyMessage
accepts address instead of hex string or Uint8Array- node@12 not supported
removeAccount
throws an error if the account is not foundsignMessage
always returnsUint8Array
encryptKey
,decryptKey
are not exported anymoresha256hash
not exported anymoreheight
method removedsignUsingGA
method removedPOINTER_KEY_BY_PREFIX
removedID_TAG_PREFIX
,PREFIX_ID_TAG
,ID_TAG
removedTX_TYPE
removed.GAS_MAX
removedcalculateMinFee
removedsalt
,createSalt
removedPointer
removed
Features
- account: accept async function in
authData
of AccountGeneralized (c1066c5) - account: override
fee
,gasPrice
of GaMetaTx inauthData
(177a100) - chain:
getBalance
accepts OracleAddress (df2e5e3) - channel: emit
newContract
event (8d71bba) - contract: add ability to compile by path in node.js (74867b7)
- contract: add CompilerCli (de56cbe)
- contract: allow to create GA using
sourceCodePath
,bytecode
(9410af2) - contract: decode emitted events of contract deploy (bf46eb6)
- contract: don't require compiler (d2f9fa8)
- contract: extract $getCallResultByTxHash method (0a8d138)
- contract: support unit type (b5bf7a8)
- node: exponential retry of requests on failure (aadec0d)
- setup downleveled types for [email protected] and above (fd2b97f)
- support CERES protocol version (8960a91)
- tx-builder: deserialisation of
channels.get.offchain_state
(ed31aff) - tx-builder: implement buildAuthTxHashByGaMetaTx (bd656c2)
- tx-builder: implement getExecutionCost and related functions (33085c2)
- tx-builder: implement getTransactionSignerAddress function (2360cd2)
- tx-builder: support incomplete MPTrees (115bcf5)
- tx-builder: support recursive types (4f4dff6)
- tx-builder: typed decoding of MPTrees (da1e35a)
- tx-builder: unpack
poi
field of channel CloseSolo Slash tx (4a49b03) - tx-builder: validate address and enum fields in runtime (5898b3a)
- account: add
generate
method to MemoryAccount (e0fa641) - add Ledger HW support (587e058)
- ensure that used correct account type while signing transaction (46e8db3)
- extract AeSdkMethods class with minimal interface (fd0fe76)
- restore the ability to specify an array of accounts in AeSdk constructor (aba9b9f)
Bug Fixes
- aepp: don't require connection to wallet to make a static call (bab9eee)
- channel: increase pong timeout 3 times (to 15 seconds) (d03ec1c)
- channel: return type of
state
(3c34457) - compatibility with @vue/cli@4 (41521ff)
- contract: avoid
any
in arguments (70453f1) - contract: don't mark
event
field as required in Aci (2c44cd1) - contract: dry-run accept
top
as number (ebe5986) - contract: static call at specific height (99441dd)
- contract: type of FunctionAci (0929304)
- node: don't throw unhandled exception if version check failed (d4e5250)
- oracle: ask height right before querying oracle to avoid not found (42706ca)
- oracle: import
getHeight
instead of using a missing context (565c827) - tx-builder: calculation of
gasLimitMax
(0fb8a37) - tx-builder: don't check consensus protocol if sdk knows a single (6b8888b)
- tx-builder: drop nonce validator to avoid false positive (a669aae)
- tx-builder: ensure that TX RLP have the same length as schema (c042d73)
- tx-builder: field DelegateIds in ChannelCreateTx (405243c)
- tx-builder: provide proper type depending on checks being done (3cff062)
- wallet: don't use Event.hasListeners that is not available in FF (05c0424)
- wallet: explicitly convert error to JSON to don't pass stack trace (3948153)
- wallet: provide origin on webext side instead of empty string (662d8d0)
- channel:
log
field type in result ofgetContractCall
(600d9e7) - channel: add missed types for
minimumDepth
,fee
,gasPrice
(a14ddfc) - channel: emit incoming message handler error instead of printing (d71efad)
- channel: messageQueue type (1197ec4)
- contract: don't throw ambiguous error if event types the same (669c326)
- contract: don't throw error if already compiled (dcedb61)
- contract: more specific error on calling without address (5c5a241)
- don't swallow errors without checking their type and message (7456b0f)
- don't use any in AeSdkBase constructor options (51fd3ae)
- sync options between Contract and AeSdkBase (6acebaf)
- tx-builder: avoid extra requests in tx validator (03c77e5)
- tx-builder: mark
nameTtl
asshortUInt
inNameUpdateTx
(3bfbb52) - tx-builder: type of binary fields (e979224)
- use crypto random to generate salt (88dcf38)