Skip to content

13.0.0-beta.0

Pre-release
Pre-release
Compare
Choose a tag to compare
@davidyuk 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 with createDelegationSignature
  • params argument in $deploy and $call is required
  • AeSdk.getContractInstance renamed to AeSdk.initializeContract
  • getContractInstance function replaced with Contract class
  • Contract methods accessible on the instance itself
  • contract.methods.<name>.get,send removed
  • contract.bytecode,sourceCode moved to contract.$options
  • contract.calldata renamed to contract._calldata
  • contract.deployInfo removed
  • contract.options renamed to contract.$options
  • contract.decodeEvents renamed to contract.$decodeEvents
  • contract.call renamed to contract.$call
  • contract.compile renamed to contract.$compile
  • contract.deploy renamed to contract.$deploy
  • use sourceCode instead of source
  • getContractInstance accepts address instead of contractAddress
  • prepareTxParams, getVmVersion are not exported anymore
  • isGA 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 accepts denomination in the first argument
  • Enum FIELD_TYPES is not exported anymore
  • Not able to build/unpack CompilerSophia entry (tag 70)
  • Enums PROTOCOL_VM_ABI, interface CtVersion not exported anymore
  • Enums VM_VERSIONS, ABI_VERSIONS, PROTOCOL_VERSIONS renamed
  • stateHash of Channel entry decoded as st_-prefixed string instead of hex
  • key 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 parameters
  • unpackTx doesn't return rlpEncoded anymore
  • verifyTransaction 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 argument
  • buildTx return string instead of object
  • buildTx doesn't return txObject anymore
  • buildTx doesn't return binary anymore
  • buildTx doesn't return rlpEncoded anymore
  • buildTx doesn't accept excludeKeys option anymore
  • Use version instead of VSN, vsn in unpackTx, buildTx
  • txType property of unpackTx removed
  • get method of MPTree accepts and returns typed values
  • writeInt function removed
  • returnType of contract call result structure is a value of CallReturnType enum
  • writeId, readId functions removed
  • readPointers, buildPointers functions removed
  • formatSalt function removed
  • validateParams, unpackRawTx functions removed
  • AMOUNT constant removed

Compiler

  • Methods of CompilerHttp moved to api property
  • Compiler export renamed to CompilerHttp
  • removed compilerUrl, setCompilerUrl
  • Dropped compatibility with aesophia_http below 7.1.1, aesophia_cli below 7.0.1

Account

  • createGeneralizedAccount accepts sourceCode in options
  • createMetaTx removed
  • AccountRpc constructor accepts arguments one by one
  • AccountMemory requires networkId in signTransaction
  • AccountBase simplified
  • address in AccountBase is a property
  • MemoryAccount accepts only secretKey
  • MemoryAccount is not compatible with GA

Node

  • url property of Node removed

Oracle

  • QUERY_FEE is not exported anymore
  • Oracles created without queryFee by default
  • AeSdk:extendOracleTtl, AeSdk:respondToQuery doesn't accept oracleId
  • onQuery callback of pollForQueries, oracle.pollQueries accepts a single query

Chain

  • send inlined into sendTransaction

AENS

  • height removed from the output of aensPreclaim

Channel

  • Channel:state returns unpacked entries
  • All channel events emitted in snakeCase
  • Channel:poi returns unpacked TreesPoi

Other

  • onAccount doesn't accept keypair
  • bigNumberToByteArray removed
  • str2buf function removed
  • getAddressFromPriv doesn't accept private key as base64-encoded or raw string
  • isValidKeypair doesn't accept public key as base64-encoded string
  • bytesToHex function removed
  • hexToBytes function removed
  • rename umd export to Aeternity
  • Subpaths imports of SDK are not allowed
  • Removed getNetworkId from AeSdkBase
  • address a getter in AeSdkBase
  • addAccount is a sync function
  • verifyMessage removed from accounts and AeSdkBase
  • verify and verifyMessage accepts address instead of hex string or Uint8Array
  • node@12 not supported
  • removeAccount throws an error if the account is not found
  • signMessage always returns Uint8Array
  • encryptKey, decryptKey are not exported anymore
  • sha256hash not exported anymore
  • height method removed
  • signUsingGA method removed
  • POINTER_KEY_BY_PREFIX removed
  • ID_TAG_PREFIX, PREFIX_ID_TAG, ID_TAG removed
  • TX_TYPE removed.
  • GAS_MAX removed
  • calculateMinFee removed
  • salt, createSalt removed
  • Pointer removed

Features

  • account: accept async function in authData of AccountGeneralized (c1066c5)
  • account: override fee, gasPrice of GaMetaTx in authData (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 of getContractCall (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 as shortUInt in NameUpdateTx (3bfbb52)
  • tx-builder: type of binary fields (e979224)
  • use crypto random to generate salt (88dcf38)