Skip to content

Commit

Permalink
docs: fix typos in changelog and v13 migration guide
Browse files Browse the repository at this point in the history
  • Loading branch information
davidyuk committed Mar 1, 2023
1 parent 3f1cc1f commit 0692ced
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 40 deletions.
34 changes: 17 additions & 17 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ All notable changes to this project will be documented in this file. See [standa
Please check out [migration guide](./guides/migration/13.0.0.md).

#### Wallet
* `onSign`, `onMessageSign` callbacks removed on wallet side
* `onSign`, `onMessageSign` callbacks were removed on the wallet side

#### Contract
* ACI format used the same as returned by aesophia_cli
Expand All @@ -30,28 +30,28 @@ Please check out [migration guide](./guides/migration/13.0.0.md).
* `contract.deploy` renamed to `contract.$deploy`
* use `sourceCode` instead of `source`
* `getContractInstance` accepts `address` instead of `contractAddress`
* `prepareTxParams`, `getVmVersion` not exported anymore
* `prepareTxParams`, `getVmVersion` are not exported anymore
* `isGA` method removed

#### Transaction builder
* 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
* AeSdk.buildTx accepts `tag` in options
* `TX_TTL` not exported anymore
* sync `buildTx` accepts `denomination` in the first argument
* 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
* `stateHash` of Channel entry decoded as `st_`-prefixed string instead of hex
* `key` of MtreeValue entry temporary decoded as buffer instead of hex
* SpendTx `payload` doesn't accept arbitrary string anymore
* `unpackTx` return object of transaction parameters
* `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 first argument
* `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
Expand All @@ -62,7 +62,7 @@ Please check out [migration guide](./guides/migration/13.0.0.md).
* `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` function removed
* `writeId`, `readId` functions removed
* `readPointers`, `buildPointers` functions removed
* `formatSalt` function removed
* `validateParams`, `unpackRawTx` functions removed
Expand All @@ -82,7 +82,7 @@ Please check out [migration guide](./guides/migration/13.0.0.md).
* `AccountBase` simplified
* `address` in `AccountBase` is a property
* MemoryAccount accepts only secretKey
* MemoryAccount not compatible with GA
* MemoryAccount is not compatible with GA

#### Node
* `url` property of `Node` removed
Expand All @@ -97,15 +97,15 @@ Please check out [migration guide](./guides/migration/13.0.0.md).
* `send` inlined into `sendTransaction`

#### AENS
* `height` removed from output of `aensPreclaim`
* `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 accepts keypair
* `onAccount` doesn't accept keypair
* `bigNumberToByteArray` removed
* `str2buf` function removed
* `getAddressFromPriv` doesn't accept private key as base64-encoded or raw string
Expand All @@ -120,9 +120,9 @@ Please check out [migration guide](./guides/migration/13.0.0.md).
* `verifyMessage` removed from accounts and AeSdkBase
* `verify` and `verifyMessage` accepts address instead of hex string or Uint8Array
* node@12 not supported
* `removeAccount` throws error if account not found
* `signMessage` always return `Uint8Array`
* `encryptKey`, `decryptKey` not exported anymore
* `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
Expand Down Expand Up @@ -163,7 +163,7 @@ Please check out [migration guide](./guides/migration/13.0.0.md).
* add Ledger HW support ([587e058](https://github.com/aeternity/aepp-sdk-js/commit/587e0583debc43f5667a6e1aa0dafd986bd6e3e4))
* ensure that used correct account type while signing transaction ([46e8db3](https://github.com/aeternity/aepp-sdk-js/commit/46e8db337f65674c7d50b760a46ee9a4aad0c17d))
* extract AeSdkMethods class with minimal interface ([fd0fe76](https://github.com/aeternity/aepp-sdk-js/commit/fd0fe76b08f7a670ca87e177dde6bd5233bcae05))
* restore ability to specify array of accounts in AeSdk constructor ([aba9b9f](https://github.com/aeternity/aepp-sdk-js/commit/aba9b9f7a2452154b90d10faa65b76edcf7313a0))
* restore the ability to specify an array of accounts in AeSdk constructor ([aba9b9f](https://github.com/aeternity/aepp-sdk-js/commit/aba9b9f7a2452154b90d10faa65b76edcf7313a0))


### Bug Fixes
Expand Down Expand Up @@ -196,7 +196,7 @@ Please check out [migration guide](./guides/migration/13.0.0.md).
* **contract:** don't throw ambiguous error if event types the same ([669c326](https://github.com/aeternity/aepp-sdk-js/commit/669c32677fbf11d2fc61c7817a7e24a2775aa423))
* **contract:** don't throw error if already compiled ([dcedb61](https://github.com/aeternity/aepp-sdk-js/commit/dcedb611bf9dc305925fa44e95424d0a37e4d060))
* **contract:** more specific error on calling without address ([5c5a241](https://github.com/aeternity/aepp-sdk-js/commit/5c5a241f4e86b2df322fcfc0dfc31c95d3b9f575))
* don't swallow errors without checking its type and message ([7456b0f](https://github.com/aeternity/aepp-sdk-js/commit/7456b0f29d67c3a83fff929c8582990f91c6e103))
* don't swallow errors without checking their type and message ([7456b0f](https://github.com/aeternity/aepp-sdk-js/commit/7456b0f29d67c3a83fff929c8582990f91c6e103))
* don't use any in AeSdkBase constructor options ([51fd3ae](https://github.com/aeternity/aepp-sdk-js/commit/51fd3ae4061576c8f741c05b617d05eb135090fb))
* sync options between Contract and AeSdkBase ([6acebaf](https://github.com/aeternity/aepp-sdk-js/commit/6acebaf8e25f28b74f4a896d07f91b93bbde8a83))
* **tx-builder:** avoid extra requests in tx validator ([03c77e5](https://github.com/aeternity/aepp-sdk-js/commit/03c77e5d320ca5a2cfd1ce6581d190d915d74ed1))
Expand Down
46 changes: 23 additions & 23 deletions docs/guides/migration/13.0.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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.
Expand All @@ -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.
Expand All @@ -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),
Expand All @@ -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 })
Expand All @@ -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.
Expand All @@ -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:
Expand All @@ -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';
Expand Down Expand Up @@ -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> })
Expand Down Expand Up @@ -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');
Expand All @@ -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> })
Expand Down Expand Up @@ -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.
Expand All @@ -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
Expand Down

0 comments on commit 0692ced

Please sign in to comment.