Skip to content

Commit 4024d42

Browse files
authored
Merge pull request #2092 from aeternity/release/14.1.0
Release v14.1.0
2 parents 17166dc + 95f9f2d commit 4024d42

File tree

190 files changed

+6233
-10522
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

190 files changed

+6233
-10522
lines changed

.eslintrc.cjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ module.exports = {
2020
'es',
2121
'src/apis',
2222
'docs/api',
23+
'test/assets',
2324
'test/environment/ledger/browser',
2425
'docs/examples',
2526
'site',

.github/workflows/main.yml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,9 @@ jobs:
2525
- run: npm run lint
2626
- run: npm run docs:examples && npm run docs:api && ./docs/build-assets.sh
2727
if: contains(github.event.pull_request.title, 'Release')
28-
- run: docker compose up -d --wait
29-
- run: npx nyc npm test
30-
- run: npx nyc report --reporter=text-lcov > coverage.lcov
31-
- uses: codecov/codecov-action@v4
32-
with:
33-
files: coverage.lcov
28+
- run: docker compose up -d --wait --quiet-pull
29+
- run: npx c8 npm test
30+
- uses: codecov/codecov-action@v5
3431
env:
3532
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
3633
- run: docker compose logs

.gitignore

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,13 @@
11
node_modules
2-
/test-results.xml
3-
.tern-port
4-
.tern-project
5-
.dir-locals.el
62
/dist
73
/es
8-
/docs/api.md
9-
/docs/api/*
4+
/docs/api
105
/docs/examples
116
/docs/public
12-
/docs/docco.css
137
__pycache__
14-
/.envrc
15-
/yarn-error.log
168
.idea
17-
/docker-compose.override.yml
18-
/pnpm-debug.log
19-
.vscode/
20-
debug/
9+
.vscode
2110
/coverage
22-
coverage.*
23-
.nyc_output/
2411
/**/package-lock.json
2512
/**/dist
2613
/examples/**/artifacts

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
ISC License (ISC)
2-
Copyright © 2024 aeternity developers
2+
Copyright © 2025 aeternity developers
33

44
Permission to use, copy, modify, and/or distribute this software for any purpose
55
with or without fee is hereby granted, provided that the above copyright notice

README.md

Lines changed: 10 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,24 @@ Usage guides:
2727
- [Contract Events](docs/guides/contract-events.md)
2828
- [Oracles](docs/guides/oracles.md)
2929
- [PayingForTx](docs/guides/paying-for-tx.md) (Meta-Transactions)
30-
- [Batch Transactions](docs/guides//batch-requests.md)
30+
- [Batch Transactions](docs/guides/batch-requests.md)
3131
- [Error Handling](docs/guides/error-handling.md)
3232
- [Low vs High level API](docs/guides/low-vs-high-usage.md)
33+
- [Typed data hashing and signing](docs/guides/typed-data.md)
34+
- [Usage with TypeScript](docs/guides/typescript.md)
35+
- [JWT usage](docs/guides/jwt.md)
36+
- [Transaction options](docs/transaction-options.md)
37+
- [Range of possible address length](docs/guides/address-length.md)
3338
- Wallet Interaction
3439
- [Connect an æpp to a wallet](docs/guides/connect-aepp-to-wallet.md)
3540
- [How to build a wallet](docs/guides/build-wallet.md)
41+
- [Ledger Hardware Wallet](docs/guides/ledger-wallet.md)
42+
- [Aeternity snap for MetaMask](docs/guides/metamask-snap.md)
3643

3744
There are also [examples](examples/README.md) that you can directly use and play with.
3845

46+
### [API Reference](https://sdk.aeternity.io/v14.1.0/api/)
47+
3948
## CLI - Command Line Interface
4049

4150
To quickly test _all_ of æternity's blockchain features from your terminal, you can install and use the [CLI](https://github.com/aeternity/aepp-cli-js) by running:
@@ -50,20 +59,3 @@ For advanced use, to get a deeper understanding of the SDK or to contribute to i
5059
## Changelog
5160

5261
We keep our [Changelog](docs/CHANGELOG.md) up to date.
53-
54-
## License
55-
56-
ISC License (ISC)
57-
Copyright © 2024 æternity developers
58-
59-
Permission to use, copy, modify, and/or distribute this software for any purpose
60-
with or without fee is hereby granted, provided that the above copyright notice
61-
and this permission notice appear in all copies.
62-
63-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
64-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
65-
FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
66-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
67-
OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
68-
TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
69-
THIS SOFTWARE.

docker-compose.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
services:
22
node:
33
# TODO: switch to master after merging https://github.com/aeternity/aeternity/pull/4303
4-
image: aeternity/aeternity:v7.2.0-bundle
4+
image: aeternity/aeternity:v7.3.0-rc5-bundle
55
# TODO: remove 3313 port after merging https://github.com/aeternity/aeternity/pull/4303
66
ports: [3013:3013, 3113:3113, 3014:3014, 3313:3313]
77
# TODO: remove after releasing https://github.com/aeternity/aeternity/pull/4292
@@ -26,7 +26,7 @@ services:
2626

2727
middleware:
2828
# TODO: use upstream after solving https://github.com/aeternity/ae_mdw/issues/1758
29-
image: davidyuk/temp:mdw-dev-mode-1.81.0
29+
image: davidyuk/temp:mdw-dev-mode-1.97.1-oas-fix
3030
ports: [4000:4000, 4001:4001, 4013:3013, 4014:3014, 4313:3313]
3131
volumes:
3232
- ./docker/middleware.yaml:/home/aeternity/aeternity.yaml

docs/CHANGELOG.md

Lines changed: 38 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,48 @@
22

33
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
44

5+
## [14.1.0](https://github.com/aeternity/aepp-sdk-js/compare/v14.0.0...v14.1.0) (2025-04-29)
6+
7+
### Features
8+
9+
- **account:** add sync versions of AccountMnemonicFactory methods ([1d60eac](https://github.com/aeternity/aepp-sdk-js/commit/1d60eac5206cbd283003f58a8ab1e397a3e03cf1))
10+
- **account:** detect MetaMask over EIP-6963 ([9e74b53](https://github.com/aeternity/aepp-sdk-js/commit/9e74b53918385c0aff93976c73336781288b37ce))
11+
- **account:** experimental support of Ledger app v1.0.0 ([0116d74](https://github.com/aeternity/aepp-sdk-js/commit/0116d74fbcda28b1fcb5012dd44ff883dcf6971c))
12+
- **account:** init AccountMnemonicFactory by seed ([fe74643](https://github.com/aeternity/aepp-sdk-js/commit/fe74643fb925768669fae8db28dfbcd68fbd2722))
13+
- **account:** add `unsafeSign`, deprecate `sign` ([b0288cc](https://github.com/aeternity/aepp-sdk-js/commit/b0288cc4dec47e1b3bdaf68a653fc001b2a823ab))
14+
- add `ensureEncoded`, `isEncoded`; deprecate `isAddressValid` ([5a11dc3](https://github.com/aeternity/aepp-sdk-js/commit/5a11dc34b0e8b577a937ed79b6ede1d4e3b412c8))
15+
- add `hashMessage`, deprecate `messageToHash` ([5306e6b](https://github.com/aeternity/aepp-sdk-js/commit/5306e6bedec3b7fe1a5f9ddb47695e4d99ca9705))
16+
- add `verifyMessageSignature`, deprecate `verifyMessage` ([f862b67](https://github.com/aeternity/aepp-sdk-js/commit/f862b67ccd55457a256ff7da3db5a087725ca89e))
17+
- add `verifySignature`, deprecate `verify` ([a4a0232](https://github.com/aeternity/aepp-sdk-js/commit/a4a02329ea485eae39c7b176a5653e1a1df1b520))
18+
- **aens:** add `getAuctionState` to Name ([4150890](https://github.com/aeternity/aepp-sdk-js/commit/4150890bb177e371a417d903fff9dbcdb4ba3a97))
19+
- **aens:** add `id` getter to Name ([8700534](https://github.com/aeternity/aepp-sdk-js/commit/8700534d629053760fd44d4029fefd28cd9e7d5f))
20+
- **aens:** add `isName`, deprecate `isNameValid` ([88c242a](https://github.com/aeternity/aepp-sdk-js/commit/88c242ab73a01043827abdb4a82ac491a8379052))
21+
- **aens:** allow to pass salt between Name while claiming ([c8dc8cc](https://github.com/aeternity/aepp-sdk-js/commit/c8dc8ccce578b8b887574216696cee35ed665ebe))
22+
- **node:** add Hyperchain endpoints ([05fcdfd](https://github.com/aeternity/aepp-sdk-js/commit/05fcdfd0fec517d96b4b55d2993d6aaeeccead58))
23+
- **node:** ignore consensus protocol version if `ignoreVersion` set ([e2f83d6](https://github.com/aeternity/aepp-sdk-js/commit/e2f83d6630f09f8eb1a9835d666b1d1781285cb0))
24+
- **node:** warn if incompatible version when `ignoreVersion` set ([2d6c59d](https://github.com/aeternity/aepp-sdk-js/commit/2d6c59de151a9c77b83b7c66ca15846fcd0f05c0))
25+
- **oracle:** add `getQueries` to OracleBase ([0af61da](https://github.com/aeternity/aepp-sdk-js/commit/0af61da9c2a229aa6459881f601aa5479b39fe84))
26+
- **contract:** show function name along its hash if missed in bytecode ([2727713](https://github.com/aeternity/aepp-sdk-js/commit/2727713e2d56297ee017b8898b50281a731c6d00))
27+
28+
### Bug Fixes
29+
30+
- **account:** implicitly connect to Aeternity snap, clean up flow ([e347d25](https://github.com/aeternity/aepp-sdk-js/commit/e347d2512678342850057335da32b249d3ff7bf0))
31+
- **aens:** `computeAuctionEndBlock` returns value according to Ceres ([3b2f20c](https://github.com/aeternity/aepp-sdk-js/commit/3b2f20c98416639f33a8c95e63794e05888882c6))
32+
- **aens:** handle `highestBid` as BigInt in auction details ([847bfa6](https://github.com/aeternity/aepp-sdk-js/commit/847bfa63de5a3b8a66525b46ab54ed1e64bd43f5))
33+
- **aens:** make `getState`'s options override instance options ([2e0d672](https://github.com/aeternity/aepp-sdk-js/commit/2e0d672c790cd40b15c2ffcc0e6e504c1cfb023a))
34+
- **aens:** mark `started_at` as required in auction details ([fba1012](https://github.com/aeternity/aepp-sdk-js/commit/fba1012cd493f2855dbbeb453cc183adddf1ce10))
35+
- **chain:** set correct poll interval on hyperchain ([0454c62](https://github.com/aeternity/aepp-sdk-js/commit/0454c62a50677ab7ec044266450e3fb96dd284e8))
36+
- **contract:** type checking of contract call return value ([4c8926b](https://github.com/aeternity/aepp-sdk-js/commit/4c8926b6c4b72cc6fca8608162ebe71dd7bc7ec7))
37+
- **middleware:** generate api based on 1.97.1 ([359c17a](https://github.com/aeternity/aepp-sdk-js/commit/359c17a9afd6741e25b8c838e4d8605e98e2a2b4))
38+
- **node,middleware:** more strict enum handling ([d3c5f0f](https://github.com/aeternity/aepp-sdk-js/commit/d3c5f0f2190a9dd1f1386c7a8910e99663066263))
39+
- **tx-builder:** replace OracleResponseTx with OracleRespondTx ([19ec9b3](https://github.com/aeternity/aepp-sdk-js/commit/19ec9b366b5d2308eceb61cc43651440d136bb1e))
40+
- **wallet:** don't require `debug` flag in BrowserRuntimeConnection ([997db99](https://github.com/aeternity/aepp-sdk-js/commit/997db993dc2b2b2d6e7c381b25a50a0e733a58d9))
41+
542
## [14.0.0](https://github.com/aeternity/aepp-sdk-js/compare/v13.3.3...v14.0.0) (2024-10-20)
643

744
### ⚠ BREAKING CHANGES
845

9-
Please check out the [migration guide](./guides/migration/14.md) and a [tool](https://docs.aeternity.com/aepp-sdk-js/develop/examples/browser/tools/) to convert to convert secret keys.
46+
Please check out the [migration guide](./guides/migration/14.md) and a [tool](https://sdk.aeternity.io/v14.0.0/examples/browser/tools/) to convert to convert secret keys.
1047

1148
- CommonJS bundles have cjs extension instead js
1249
- **aepp:** AeSdkWallet requires `onAskToSelectNetwork` constructor option

docs/README.md

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ In case you're not using any JS bundling/compilation technique, the SDK can also
1616
<script src="https://unpkg.com/@aeternity/aepp-sdk@VERSION/dist/aepp-sdk.browser-script.cjs"></script>
1717
```
1818

19-
...where `VERSION` is the version number of the SDK you want to use (eg. `14.0.0`).
19+
...where `VERSION` is the version number of the SDK you want to use (eg. `14.1.0`).
2020

2121
### Browser `<script>` tag
2222

@@ -116,21 +116,25 @@ module.exports = {
116116
### Vue@3
117117

118118
Reactivity in Vue@3 [based on] Proxy class. Proxy is [not compatible] with private fields of ES
119-
classes. AeSdk and Contract classes uses private fields, so if you make an instance of these
119+
classes. AeSdk, Contract and AccountMemory classes uses private fields, so if you make an instance of these
120120
classes reactive then the app may fail with
121121

122122
> TypeError: attempted to get private field on non-instance
123123
124124
AeSdk and Contract classes doesn’t have a state intended to be tracked using reactivity. Therefore
125-
to solve this issue we suggest to avoid making their instances reactive. One of the ways is to use
125+
to solve this issue we suggest to avoid making their instances reactive using
126126
Vue's integrated utility: [shallowRef]. The idea is to make reactive only the
127-
root variable, to don't make it reactive in deep. You can find it implementation in the
128-
[æpp example].
127+
instance value, to don't make it reactive in deep.
128+
129+
Alternatively, [toRaw] can unwrap the proxy object, returning an unmodified instance and allowing access to its private properties by its methods. It can be useful if you need a reactive array of AccountMemory.
130+
131+
You can find both approaches used in the [æpp example].
129132

130133
[based on]: https://vuejs.org/guide/extras/reactivity-in-depth.html#how-reactivity-works-in-vue
131134
[not compatible]: https://github.com/tc39/proposal-class-fields/issues/106
132135
[shallowRef]: https://vuejs.org/api/reactivity-advanced.html#shallowref
133-
[æpp example]: https://github.com/aeternity/aepp-sdk-js/blob/568c291b92c030011ca9e68169f328be6ff79488/examples/browser/aepp
136+
[toRaw]: https://vuejs.org/api/reactivity-advanced.html#toraw
137+
[æpp example]: https://github.com/aeternity/aepp-sdk-js/blob/1cd128798018d98bdd41eff9104442b44b385d46/examples/browser/aepp
134138

135139
## Command Line Interface (CLI)
136140

docs/contrib/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ aepp-sdk is transpiled to EcmaScript 5 through [WebPack](https://webpack.js.org/
4646

4747
## Documenting
4848

49-
Apart from documenting features and code, there is also documentation automatically generated using [**TypeDoc**](https://typedoc.org/) for documenting TS files and [a script](https://github.com/aeternity/aepp-sdk-js/blob/568c291b92c030011ca9e68169f328be6ff79488/tooling/docs/examples-to-md.js) for documenting examples and code partials.
49+
Apart from documenting features and code, there is also documentation automatically generated using [**TypeDoc**](https://typedoc.org/) for documenting TS files and [a script](https://github.com/aeternity/aepp-sdk-js/blob/1cd128798018d98bdd41eff9104442b44b385d46/tooling/docs/examples-to-md.js) for documenting examples and code partials.
5050

5151
```bash
5252
#generate examples and api documentation

docs/guides/address-length.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,16 @@ base58 it depends on the exact data to encode, e.g. it is shorter if encoded dat
55
leading zeroes.
66

77
Building an aepp you may need to know the range of possible address lengths to validate an
8-
user-provided addresses (though better to use [isAddressValid]) or for designs of address-related
8+
user-provided addresses (though better to use [isEncoded]) or for designs of address-related
99
components. Doing manual tests you may conclude that account address length is between 52 and 53
1010
chars, but it is not correct.
1111

1212
```js
13-
import { MemoryAccount } from '@aeternity/aepp-sdk';
13+
import { AccountMemory } from '@aeternity/aepp-sdk';
1414

1515
const result = new Array(10000)
1616
.fill()
17-
.map(() => MemoryAccount.generate().address.length)
17+
.map(() => AccountMemory.generate().address.length)
1818
.reduce((p, n) => ({ ...p, [n]: (p[n] ?? 0) + 1 }), {});
1919

2020
console.log(result);
@@ -28,9 +28,9 @@ Theoretically there can be even shorter addresses if they lucky to be prefixed w
2828
sequence of `0`.
2929
3030
```js
31-
import { MemoryAccount, Encoding, encode, decode } from '@aeternity/aepp-sdk';
31+
import { AccountMemory, Encoding, encode, decode } from '@aeternity/aepp-sdk';
3232

33-
const publicKey = decode(MemoryAccount.generate().address);
33+
const publicKey = decode(AccountMemory.generate().address);
3434

3535
for (let i = -1; i < publicKey.length; i += 1) {
3636
if (i >= 0) publicKey[i] = 0;
@@ -80,5 +80,5 @@ Running the above code you would get output like
8080
Therefore the minimum address length is 41 chars. All these addresses valid, for example
8181
`ak_11111111111111111111111111111111273Yts` [used] to collect AENS name fees.
8282
83-
[isAddressValid]: https://docs.aeternity.com/aepp-sdk-js/v13.2.2/api/functions/isAddressValid.html
83+
[isEncoded]: https://sdk.aeternity.io/v14.1.0/api/functions/isEncoded.html
8484
[used]: https://mainnet.aeternity.io/v3/accounts/ak_11111111111111111111111111111111273Yts

0 commit comments

Comments
 (0)