Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 14.0.0 #2026

Merged
merged 192 commits into from
Oct 20, 2024
Merged

Release 14.0.0 #2026

merged 192 commits into from
Oct 20, 2024

Conversation

davidyuk
Copy link
Member

@davidyuk davidyuk commented Oct 20, 2024

14.0.0 (2024-10-20)

⚠ BREAKING CHANGES

Please check out the migration guide and a tool to convert to convert secret keys.

  • CommonJS bundles have cjs extension instead js
  • aepp: AeSdkWallet requires onAskToSelectNetwork constructor option
  • tx-builder: ChannelClientReconnectTx removed
  • node: Node returns time in KeyBlock and MicroBlockHeader as Date
  • middleware: require 1.81.0
  • sdk requires [email protected] or newer
  • sdk types requires [email protected] or newer
  • account: Save HD wallets methods removed
  • account: sign, signMessage removed
  • account: isValidKeypair removed
  • account: getAddressFromPriv removed
  • account: generateKeyPair removed
  • account: generateKeyPairFromSecret removed
  • recover, dump removed (AEX-3 keystore implementation)
  • node,compiler,middleware: $host is readonly in generated APIs
  • account: MemoryAccount accepts secret key as sk_-prefixed string
  • account: generateKeyPair returns secretKey encoded as sk_-prefixed string
  • aepp: RpcBroadcastError not exported anymore
  • NAME_BID_MAX_LENGTH not exported anymore
  • contract: encodeFateValue, decodeFateValue not exported anymore
  • Iris is not supported
  • middleware: sdk requires [email protected] and above
  • node: sdk requires aeternity node 7.1.0 and above
  • account: AccountBase inheritors required to implement signTypedData, signDelegation
  • signDelegationToContract removed
  • signNameDelegationToContract removed
  • signAllNamesDelegationToContract removed
  • signOracleQueryDelegationToContract removed
  • wallet,aepp: delegations used in Iris removed from aepp-wallet connection
  • createDelegationSignature removed
  • compiler: CompilerCli uses aesophia@8 by default
  • compiler: CompilerCli8 removed
  • compiler: CompilerCli and CompilerHttp requires aesophia@8
  • aens: aens* methods removed
  • tx-builder: NAME_*TTL, CLIENT_TTL not exported anymore
  • oracle: pollQueries don't return responded queries by default
  • oracle: pollForQueries method removed
  • oracle: extendOracleTtl method removed
  • oracle: respondToQuery method removed
  • oracle: getOracleObject method removed
  • oracle: registerOracle method removed
  • oracle: getQueryObject removed
  • oracle: postQueryToOracle, pollForQueryResponse methods removed
  • tx-builder: ORACLE_TTL, QUERY_TTL, RESPONSE_TTL not exported anymore
  • tx-builder: buildTx/unpackTx works only with transactions
  • tx-builder: Tag include only transactions
  • tx-builder: buildTx doesn't accept prefix anymore
  • contract: AeSdk:initializeContract removed

Features

  • account: add ensureReady method to AccountLedgerFactory (5047e43)
  • account: add AccountMetamaskFactory (e9f9694)
  • account: add AccountMnemonicFactory (c785521)
  • account: encode secret key as sk_-prefixed string (b94e198)
  • account: expose secretKey in MemoryAccount (d4320e6)
  • aepp: add api to ask wallet to select network (9871c91)
  • aepp: extract class to connect to wallet from AeSdkAepp (c3570ac)
  • middleware: add requestByPath method (ee5ac0c)
  • middleware: allow navigate to next/prev pages (b89cf5b)
  • middleware: mark as stable api (e25b06d)
  • middleware: prefixed types provided by OpenApi instead of strings (0b16a32)
  • middleware: return time as Date instance (e48ffd1)
  • middleware: switch to v3 api (b0015c0)
  • node: return time as Date instance (e0e33ea)
  • oracle: add includeResponded option to Oracle:pollQueries (78a07ab)
  • oracle: add Oracle:handleQueries method (03c77c0)

Bug Fixes

  • account: improve Account:publicKey type (1652a4b)
  • aens: validate minus chars in name as node does (329de9e)
  • aepp: don't require subscription to request addresses (2b247ff)
  • channel: channelId type, more accurate types (e572fae)
  • channel: accept host only if initiator (a7d4dde)
  • channel: reestablish flow (1f4a0c1)
  • channel: remove statePassword unsupported on node side (5cec07b)
  • channel: remove unsupported ways to reopen channel by a transaction (f3746a1)
  • middleware: accurate coin amounts (00a4f3e)
  • middleware: word casing in activity types (f1fbb29)
  • node,compiler,middleware: mark $host as readonly (9e47d5c)
  • node: avoid complex types by code replacements instead generics (4f531b1)
  • oracle: emit unhandled rejection instead printing error (3a57665)
  • tx-builder: count amount in execution cost when spend to yourself (5153649)
  • tx-builder: remove unused ChannelClientReconnectTx (e6e954a)
  • wallet: generate random string instead using external uuid dep (f8640d4)
  • wallet: origin if opened over file:// (cordova) (d529f30)

Commits with breaking changes

  • account: make signTypedData, signDelegation abstract (f2c6d1d)
  • account: remove generateKeyPair (18c6789)
  • account: remove generateKeyPairFromSecret (2cbaa7c)
  • account: remove getAddressFromPriv (9446639)
  • account: remove isValidKeypair (512385a)
  • account: remove sign, signMessage (30077bc)
  • account: remove save HD wallet functions (10e7c89)
  • aens: replace aens methods with Name class (956daac)
  • aepp: remove RpcBroadcastError (1f0b3bb)
  • compiler: drop aesophia@7 support (df0e050)
  • contract: don't depend on Contract in AeSdk (00b4f86)
  • contract: remove encodeFateValue, decodeFateValue (c521597)
  • drop Iris support (61554b3)
  • drop [email protected] support (4008d12)
  • middleware: require 1.77.5 (08783fd)
  • middleware: require 1.81.0 (3243768)
  • node: require 7.1.0 (0dd3b49)
  • oracle: add Oracle class (54ee614)
  • oracle: add OracleClient class (0293fe4)
  • oracle: replace getQueryObject with OracleBase (bcab498)
  • remove createDelegationSignature (651b6ec)
  • remove NAME_BID_MAX_LENGTH (83797a4)
  • remove signAllNamesDelegationToContract (60a729d)
  • remove signDelegationToContract (cd495a6)
  • remove signNameDelegationToContract (9ab8f41)
  • remove signOracleQueryDelegationToContract (f948492)
  • remove keystore implementation (5e64ec9)
  • rename legacy bundles to cjs (46cd27b)
  • require [email protected] or newer (84d868c)
  • tx-builder: extract entries into separate builder (d5fde18)
  • tx-builder: remove deprecated constant exports (2ecf0f4)
  • tx-builder: remove deprecated constant exports (2342aa6)
  • update @types/node, drop TS below 4.8 (9d36e6c)
  • wallet,aepp: remove delegationToContract.sign method (c4d62b0)

This PR is supported by the Æternity Foundation

related PRs: aeternity/aescan#959 aeternity/contract-builder#33 aeternity/aepp-faucet-nodejs#44 aeternity/aepp-contracts#144

davidyuk added 30 commits July 23, 2023 16:34
test: fix mdw and reduce global timeout
BREAKING CHANGE: `AeSdk:initializeContract` removed
Use `Contract.initialize` instead:
```diff
- aeSdk.initializeContract(options)
+ Contract.initialize({ ...aeSdk.getContext(), ...options })
```
fix(aepp): don't require subscription to request addresses
fix(wallet): origin if opened over file:// (cordova)
BREAKING CHANGE: `buildTx`/`unpackTx` works only with transactions
If you need to work with node's entry use `packEntry`/`unpackEntry`.

BREAKING CHANGE: `Tag` include only transactions
Node entries tags moved to `EntryTag`.

BREAKING CHANGE: `buildTx` doesn't accept `prefix` anymore
Use `decode`/`encode` to convert payload to desired format.
Extract non-transactions into separate entry builder
BREAKING CHANGE: `ORACLE_TTL`, `QUERY_TTL`, `RESPONSE_TTL` not exported anymore
These values provided by default in buildTx, if necessary define them as
```js
const ORACLE_TTL = { type: ORACLE_TTL_TYPES.delta, value: 500 };
const QUERY_TTL = { type: ORACLE_TTL_TYPES.delta, value: 10 };
const RESPONSE_TTL = { type: ORACLE_TTL_TYPES.delta, value: 10 };
```
BREAKING CHANGE: `postQueryToOracle`, `pollForQueryResponse`  methods removed
Use `OracleClient:postQuery`, `OracleClient:pollForResponse` instead.
BREAKING CHANGE: [email protected] is not supported anymore
BREAKING CHANGE: `getQueryObject` removed
Use `Oracle:getQuery`, `OracleClient:getQuery` instead.
BREAKING CHANGE: `pollForQueries` method removed
Use `Oracle:pollQueries` instead.

BREAKING CHANGE: `extendOracleTtl` method removed
Use `Oracle:extendTtl` instead.

BREAKING CHANGE: `respondToQuery` method removed
Use `Oracle:respondToQuery` instead.

BREAKING CHANGE: `getOracleObject` method removed
Use `Oracle:getState` instead.

BREAKING CHANGE: `registerOracle` method removed
Use `Oracle:register` instead.
BREAKING CHANGE: `pollQueries` don't return responded queries by default
Use `includeResponded` option to restore the previous behavior.
Also, avoid eslint-disable, separate preparation and calling callback.
BREAKING CHANGE: `NAME_*TTL`, `CLIENT_TTL` not exported anymore
These values provided by default in buildTx, if necessary define them as
```js
const NAME_TTL = 180000;
const NAME_MAX_TTL = 36000;
const NAME_MAX_CLIENT_TTL = 86400;
const CLIENT_TTL = 86400;
```
BREAKING CHANGE: aens* methods removed
Use Name class instead.
```diff
-await aeSdk.aensPreclaim('example.chain')
+const name = new Name('example.chain', aeSdk.getContext())
+await name.preclaim()
```
Accordingly for other methods:
```
aensRevoke => Name:revoke
aensUpdate => Name:update
aensTransfer => Name:transfer
aensQuery => Name:getState
aensClaim => Name:claim
aensBid => Name:bid
```
Replace AENS methods with Name class
BREAKING CHANGE: CommonJS bundles have cjs extension instead js
If you are importing files explicitly from `dist` folder then you need to update the extension
```diff
- https://unpkg.com/@aeternity/aepp-sdk/dist/aepp-sdk.browser-script.js
+ https://unpkg.com/@aeternity/aepp-sdk/dist/aepp-sdk.browser-script.cjs
```
Switch package type to module and update deps
@davidyuk davidyuk merged commit 3d74f53 into master Oct 20, 2024
2 checks passed
@davidyuk davidyuk deleted the release/14.0.0 branch October 20, 2024 13:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant