-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: fix typos in changelog and v13 migration guide
- Loading branch information
Showing
2 changed files
with
40 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
This guide describes all breaking changes introduced with `v13.0.0`. | ||
|
||
## Wallet | ||
#### `onSign`, `onMessageSign` callbacks removed on wallet side | ||
#### `onSign`, `onMessageSign` callbacks were removed on the wallet side | ||
Check allowance to sign on the account side instead, using `aeppOrigin`, `aeppRpcClientId` options. | ||
|
||
## Contract | ||
|
@@ -63,7 +63,7 @@ Apply a patch: | |
+contract = await Contract.initialize(<options>); | ||
``` | ||
#### `AeSdk.getContractInstance` renamed to `AeSdk.initializeContract` | ||
#### `prepareTxParams`, `getVmVersion` not exported anymore | ||
#### `prepareTxParams`, `getVmVersion` are not exported anymore | ||
Use `buildTx` instead. | ||
#### `isGA` method removed | ||
Use `(await aeSdk.getAccount(<address>)).kind === 'generalized'` instead. | ||
|
@@ -77,7 +77,7 @@ Apply a patch: | |
-contractCall.returnType === "error" | ||
+contractCall.returnType === CallReturnType.Error | ||
``` | ||
#### `writeId`, `readId` function removed | ||
#### `writeId`, `readId` functions removed | ||
Use transaction builder instead. | ||
#### `readPointers`, `buildPointers` functions removed | ||
Use transaction builder instead. | ||
|
@@ -87,19 +87,19 @@ Use `Buffer.from(<salt>.toString(16).padStart(64, '0'), 'hex')` instead. | |
Use transaction builder instead. | ||
#### `AMOUNT` constant removed | ||
If necessary, use `0` instead. | ||
#### StateTrees fields decoded as objects mapping key to decoded entry instead internals | ||
#### 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 | ||
#### `TX_TTL` not exported anymore | ||
#### TX_SCHEMA, TxParamsCommon, TxSchema, TxTypeSchemas are not exported anymore | ||
#### `TX_TTL` is not exported anymore | ||
Use `0` instead. | ||
#### Enum `FIELD_TYPES` not exported anymore | ||
#### 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 | ||
They are exported as `VmVersion`, `AbiVersion`, `ConsensusProtocolVersion`. | ||
#### `stateHash` of Channel entry decoded as `st_`-prefixed string instead of hex | ||
#### SpendTx `payload` doesn't accept arbitrary string anymore | ||
Provide `ba_`-encoded string instead. | ||
#### SpendTx `payload` doesn't accept arbitrary strings anymore | ||
Provide a `ba_`-encoded string instead. | ||
```diff | ||
-payload: 'test', | ||
+payload: encode(Buffer.from('test'), Encoding.Bytearray), | ||
|
@@ -108,7 +108,7 @@ Provide `ba_`-encoded string instead. | |
#### `buildTx` doesn't accept `excludeKeys` option anymore | ||
Consider opening an issue, if you need this functionality. | ||
#### Use `version` instead of `VSN`, `vsn` in `unpackTx`, `buildTx` | ||
#### `buildTx` accepts transaction type and version in first argument | ||
#### `buildTx` accepts transaction type and version in the first argument | ||
Apply a change: | ||
```diff | ||
-buildTx({ ... }, Tag.SpendTx, { version: 2 }) | ||
|
@@ -122,7 +122,7 @@ Replace `aeSdk.buildTx(Tag.SpendTx, { ... })` with `aeSdk.buildTx({ ..., tag: Ta | |
+buildTx({ ..., denomination: AE_AMOUNT_FORMATS.AETTOS }) | ||
``` | ||
|
||
#### `unpackTx` return object of transaction parameters | ||
#### `unpackTx` return an object of transaction parameters | ||
Use `unpackTx(...)` instead of `unpackTx(...).tx`. | ||
#### `unpackTx` doesn't return `rlpEncoded` anymore | ||
Use `decode(buildTx(unpackTx(...)))` instead. | ||
|
@@ -138,7 +138,7 @@ Use `require('rlp').decode(decode(buildTx(...)))` instead. | |
#### `buildTx` doesn't return `rlpEncoded` anymore | ||
Use `decode(buildTx(...))` instead. | ||
|
||
#### `key` of MtreeValue entry decoded as buffer instead of hex | ||
#### `key` of MtreeValue entry decoded as a buffer instead of a hex | ||
#### TxBuilder accepts and returns `poi` field unpacked as TreesPoi | ||
#### `get` method of MPTree accepts and returns typed values | ||
Apply a change: | ||
|
@@ -150,7 +150,7 @@ Apply a change: | |
## Compiler | ||
#### `Compiler` export renamed to `CompilerHttp` | ||
#### removed AeSdk:compilerUrl, AeSdk:setCompilerUrl | ||
Compiler instance need to be passed explicitly in `onCompiler` option: | ||
A compiler instance needs to be passed explicitly in `onCompiler` option: | ||
```diff | ||
-import { AeSdk } from '@aeternity/aepp-sdk'; | ||
+import { AeSdk, CompilerHttp } from '@aeternity/aepp-sdk'; | ||
|
@@ -200,7 +200,7 @@ Apply a change: | |
-new MemoryAccount({ keypair: { publicKey: 'ak_..', secretKey: <secret key> } }) | ||
+new MemoryAccount(<secret key>) | ||
``` | ||
#### MemoryAccount not compatible with GA | ||
#### MemoryAccount is not compatible with GA | ||
Apply a change: | ||
```diff | ||
-new MemoryAccount({ gaId: <address> }) | ||
|
@@ -231,7 +231,7 @@ Pass not signed transaction to `sendTransaction`. | |
If you need to post signed transaction use Node:postTransaction. | ||
|
||
## AENS | ||
#### `height` removed from output of `aensPreclaim` | ||
#### `height` removed from the output of `aensPreclaim` | ||
Use `blockHeight` instead: | ||
``` | ||
const res = aeSdk.aensPreclaim('name.chain'); | ||
|
@@ -249,7 +249,7 @@ Affected events: 'own_withdraw_locked', 'withdraw_locked', 'own_deposit_locked', | |
Use just `await channel.poi(...)` instead of `unpackTx(await channel.poi(...))`. | ||
|
||
## Other | ||
#### `onAccount` doesn't accepts keypair | ||
#### `onAccount` doesn't accept keypair | ||
Apply a change: | ||
```diff | ||
-aeSdk.<metnod name>(..., { onAccount: <keypair> }) | ||
|
@@ -283,18 +283,18 @@ Apply a change: | |
``` | ||
#### `addAccount` is a sync function | ||
#### `verifyMessage` removed from accounts and AeSdkBase | ||
Use `verifyMessage` exported in root instead. | ||
Use `verifyMessage` exported in the root instead. | ||
#### `verify` and `verifyMessage` accepts address instead of hex string or Uint8Array | ||
Convert public key in Uint8Array to address using `encode(pk, 'ak')`. | ||
Convert public key in hex to address using `encode(Buffer.from(pk, 'hex'), 'ak')`. | ||
#### node@12 not supported | ||
Use [email protected] or newer. | ||
#### `removeAccount` throws error if account not found | ||
#### `signMessage` always return `Uint8Array` | ||
#### `removeAccount` throws an error if the account is not found | ||
#### `signMessage` always returns `Uint8Array` | ||
Use `Buffer.from(signature).toString('hex')` to convert it to hex. | ||
#### `encryptKey`, `decryptKey` not exported anymore | ||
#### `encryptKey`, `decryptKey` are not exported anymore | ||
Use 'sha.js' and 'aes-js' packages directly instead. | ||
#### `sha256hash` not exported anymore | ||
#### `sha256hash` is not exported anymore | ||
Use `SubtleCrypto.digest` or `sha.js` package instead. | ||
#### `height` method removed | ||
Use `getHeight` instead. | ||
|
@@ -307,10 +307,10 @@ Use transaction builder instead. | |
#### `TX_TYPE` removed. | ||
Use `Tag` instead. | ||
#### `GAS_MAX` removed | ||
Maximum gas limit depends on transaction size, this value is outdated, | ||
The maximum gas limit depends on transaction size, this value is outdated, | ||
sdk check/provides gasLimit by itself while building a transaction. | ||
#### `calculateMinFee` removed | ||
Use `buildTx` to generate transaction, unpack it and refer to `fee` field. | ||
Use `buildTx` to generate a transaction, unpack it and refer to `fee` field. | ||
#### `salt`, `createSalt` removed | ||
Use `genSalt` instead. | ||
#### `Pointer` removed | ||
|