diff --git a/SUMMARY.md b/SUMMARY.md
index 8088bf9..21fe174 100644
--- a/SUMMARY.md
+++ b/SUMMARY.md
@@ -48,6 +48,7 @@
* [Liquidation](developer/api-and-sdk/data-types/transaction/liquidation.md)
* [UpdateGlobalVar](developer/api-and-sdk/data-types/transaction/update\_global\_var.md)
* [Private Key & Signature](developer/api-and-sdk/private-key-and-signature/private\_key.md)
+ * [Algorithm](developer/api-and-sdk/private-key-and-signature/encode/algorithm.md)
* [ChangePubKey](developer/api-and-sdk/private-key-and-signature/encode/chaneg\_pubkey.md)
* [Withdraw](developer/api-and-sdk/private-key-and-signature/encode/withdraw.md)
* [Transfer](developer/api-and-sdk/private-key-and-signature/encode/transfer.md)
@@ -62,7 +63,7 @@
* [Go](developer/sdk/go/changelog.md)
* [Types](developer/sdk/go/basic\_types.md)
* [Signature](developer/sdk/go/signer.md)
- * [Transactions](developer/sdk/changelog/transactions/README.md)
+ * [Transactions](developer/sdk/go/transactions/README.md)
* [ChangePubKey](developer/sdk/go/transactions/1-change-pubkey.md)
* [Withdraw](developer/sdk/go/transactions/2-withdraw.md)
* [Transfer](developer/sdk/go/transactions/3-transfer.md)
@@ -74,6 +75,19 @@
* [Liquidation](developer/sdk/go/transactions/9-liquidation.md)
* [UpdateGlobalVar](developer/sdk/go/transactions/10-update-global-var.md)
* [Js](developer/sdk/js/changelog.md)
+ * [Dart](developer/sdk/dart/changelog.md)
+ * [Signature](developer/sdk/dart/signer.md)
+ * [Transactions](developer/sdk/dart/transactions/README.md)
+ * [ChangePubKey](developer/sdk/dart/transactions/1-change-pubkey.md)
+ * [Withdraw](developer/sdk/dart/transactions/2-withdraw.md)
+ * [Transfer](developer/sdk/dart/transactions/3-transfer.md)
+ * [ForcedExit](developer/sdk/dart/transactions/4-forced-exit.md)
+ * [OrderMatching](developer/sdk/dart/transactions/5-order-matching.md)
+ * [ContractMatching](developer/sdk/dart/transactions/6-contract-matching.md)
+ * [AutoDeleveraging](developer/sdk/dart/transactions/7-auto-deleveraging.md)
+ * [Funding](developer/sdk/dart/transactions/8-funding.md)
+ * [Liquidation](developer/sdk/dart/transactions/9-liquidation.md)
+ * [UpdateGlobalVar](developer/sdk/dart/transactions/10-update-global-var.md)
## ⚙️ Network Information
diff --git a/developer/api-and-sdk/data-types/basic-types.md b/developer/api-and-sdk/data-types/basic-types.md
index 9be682a..352653c 100644
--- a/developer/api-and-sdk/data-types/basic-types.md
+++ b/developer/api-and-sdk/data-types/basic-types.md
@@ -1,6 +1,6 @@
# Basic types
-* [ChainId](#ChainId)
+* [ChainId](#chainid)
* [AccountId](#accountid)
* [SubAccountId](#subaccountid)
* [TokenId](#tokenid)
@@ -16,7 +16,7 @@
# Basic structures
* [TxLayer1Signature](#txlayer1signature)
-* [ZkLinkSignature](#ZkLinkSignature)
+* [ZkLinkSignature](#zklinksignature)
### ChainId
@@ -46,7 +46,7 @@ Conversely, when withdrawing USD, users can choose to withdraw an equivalent amo
### SlotId
-The id of slot in [Order](#Order), the type is `u32`.
+The id of slot in [Order](#order), the type is `u32`.
### PairId
The trading pair ID of the pertetual contract, the type is `u16`. The PairId is defined by decentralized exchange, not defined by ZkLink.
diff --git a/developer/api-and-sdk/data-types/state-update.md b/developer/api-and-sdk/data-types/state-update.md
index 2d5a046..ff28bda 100644
--- a/developer/api-and-sdk/data-types/state-update.md
+++ b/developer/api-and-sdk/data-types/state-update.md
@@ -18,7 +18,7 @@ There are 4 types of AccountUpdate:
|-----------|--------------------------------------|---------------------|
| type | String | Update Name |
| updateId | i32 | Update id |
-| accountId | [AccountId](basic-types.md#AccountId) | The new accout id |
+| accountId | [AccountId](basic-types.md#accountid) | The new accout id |
| address | String | The account address |
Transaction that generate `AccountCreate`:
@@ -45,11 +45,11 @@ For Example:
|-----------|----------------------------------------|--------------------|
| type | String | Update name |
| updateId | i32 | Update Id |
-| accountId | [AccountId](basic-types.md#AccountId) | Account id |
-| oldPubkeyHash | [PubkeyHash](basic-types.md#PubkeyHash) | The old pubkeyHash |
-| newPubkeyHash | [PubkeyHash](basic-types.md#PubkeyHash) | The new pubkeyHash |
-| oldNonce | [Nonce](basic-types.md#Nonce) | The old nonce |
-| newNonce | [Nonce](basic-types.md#Nonce) | The new nonce |
+| accountId | [AccountId](basic-types.md#accountid) | Account id |
+| oldPubkeyHash | [PubkeyHash](basic-types.md#pubkeyhash) | The old pubkeyHash |
+| newPubkeyHash | [PubkeyHash](basic-types.md#pubkeyhash) | The new pubkeyHash |
+| oldNonce | [Nonce](basic-types.md#nonce) | The old nonce |
+| newNonce | [Nonce](basic-types.md#nonce) | The new nonce |
Transaction that generate `AccountChangePubkeyUpdate`:
@@ -77,13 +77,13 @@ For example:
|--------------|--------------------------------------------|-------------------------------|
| type | String | The update name |
| updateId | i32 | The update id |
-| accountId | [AccountId](data_tpes.md#AccountId) | The account id |
-| subAccountId | [SubAccountId](basic-types.md#SubAccountId) | The subaccount id |
-| coinId | [TokenId](basic-types.md#TokenId) | The token id |
+| accountId | [AccountId](data_tpes.md#accountid) | The account id |
+| subAccountId | [SubAccountId](basic-types.md#subaccountid) | The subaccount id |
+| coinId | [TokenId](basic-types.md#tokenid) | The token id |
| oldBalance | String | The old balance of subaccount |
| newBalance | String | The new balance of subaccount |
-| oldNonce | [Nonce](basic-types.md#Nonce) | The old nonce of subaccount |
-| newNonce | [Nonce](basic-types.md#Nonce) | The new nonce of subaccount |
+| oldNonce | [Nonce](basic-types.md#nonce) | The old nonce of subaccount |
+| newNonce | [Nonce](basic-types.md#nonce) | The new nonce of subaccount |
Transaction that generate `BalanceUpdate`:
@@ -124,17 +124,17 @@ For example
|--------------|--------------------------------------------|-----------------|
| type | String | Update name |
| updateId | i32 | Update id |
-| accountId | [AccountId](basic_type.md#AccountId) | Account id |
-| subAccountId | [SubAccountId](basic-types.md#SubAccountId) | Subaccount id |
-| slotId | [SlotId](basic-types.md#SlotId) | Slot id |
-| oldTidyOrder | [ResponseTidyOrder](#ResponseTidyOrder) | Old`TidyOrder` |
-| newTidyOrder | [ResponseTidyOrder](#ResponseTidyOrder) | New `TidyOrder` |
+| accountId | [AccountId](basic_type.md#accountid) | Account id |
+| subAccountId | [SubAccountId](basic-types.md#subaccountid) | Subaccount id |
+| slotId | [SlotId](basic-types.md#slotid) | Slot id |
+| oldTidyOrder | [ResponseTidyOrder](#responsetidyorder) | Old`TidyOrder` |
+| newTidyOrder | [ResponseTidyOrder](#responsetidyorder) | New `TidyOrder` |
where ResponseTidyOrder is
| Name | Type | Description |
|--------------|--------------------------------------------|--------------------------------------------------------------|
-| nonce | [Nonce](#Nonce) | The slot nonce of order |
+| nonce | [Nonce](#nonce) | The slot nonce of order |
| residue | String | The string format of BigDecimal, the residue balance of slot |
Transaction that generate `OrderUpdate`:
@@ -181,9 +181,9 @@ For Example:
|--------------------|---------------------------------------------|--------------------|
| type | String | The update name |
| update_id | i32 | update index |
-| sub_account_id | [SubAccountId](basic-types.md#SubAccountId) | sub-account ID |
-| old_fee_account_id | [AccountId](basic_type.md#AccountId) | Old fee account ID |
-| new_fee_account_id | [AccountId](basic_type.md#AccountId) | New fee account ID |
+| sub_account_id | [SubAccountId](basic-types.md#subaccountid) | sub-account ID |
+| old_fee_account_id | [AccountId](basic_type.md#accountid) | Old fee account ID |
+| new_fee_account_id | [AccountId](basic_type.md#accountid) | New fee account ID |
Transaction that generate `FeeAccountUpdate`:
@@ -210,9 +210,9 @@ For Example:
|-------------------------------|---------------------------------------------|-------------------------------|
| type | String | The update name |
| update_id | i32 | update index |
-| sub_account_id | [SubAccountId](basic-types.md#SubAccountId) | sub-account id |
-| old_insurance_fund_account_id | [AccountId](basic_type.md#AccountId) | old insurance fund account id |
-| new_insurance_fund_account_id | [AccountId](basic_type.md#AccountId) | new insurance fund account id |
+| sub_account_id | [SubAccountId](basic-types.md#subaccountid) | sub-account id |
+| old_insurance_fund_account_id | [AccountId](basic_type.md#accountid) | old insurance fund account id |
+| new_insurance_fund_account_id | [AccountId](basic_type.md#accountid) | new insurance fund account id |
Transaction that generate `InsuranceFundAccountUpdate`:
@@ -239,14 +239,14 @@ For example:
|-----------------|---------------------------------------------|--------------------------------------|
| type | String | The update name |
| update_id | i32 | update index |
-| sub_account_id | [SubAccountId](basic-types.md#SubAccountId) | sub-account id |
-| margin_id | [MarginId](basic-types.md#MarginId) | margin index |
+| sub_account_id | [SubAccountId](basic-types.md#subaccountid) | sub-account id |
+| margin_id | [MarginId](basic-types.md#marginid) | margin index |
| old_symbol | String | Old symbol of the margin token |
| new_symbol | String | New symbol of the margin token |
| old_index_price | String | Old index price of the margin token |
| new_index_price | String | New index price of the margin token |
-| old_token_id | [TokenId](basic-types.md#TokenId) | Old margin token id of the margin_id |
-| new_token_id | [TokenId](basic-types.md#TokenId) | New margin token id of the margin_id |
+| old_token_id | [TokenId](basic-types.md#tokenid) | Old margin token id of the margin_id |
+| new_token_id | [TokenId](basic-types.md#tokenid) | New margin token id of the margin_id |
| old_ratio | u8 | Old margin ratio of the margin token |
| new_ratio | u8 | New margin ratio of the margin token |
@@ -281,8 +281,8 @@ For example
| Field | Type | Description |
|-----------------------------|---------------------------------------------|--------------------------------------------------|
| update_id | i32 | update id |
-| sub_account_id | [SubAccountId](basic-types.md#SubAccountId) | sub-account id |
-| pair_id | [PairId](basic-types.md#PairId) | contract pair id |
+| sub_account_id | [SubAccountId](basic-types.md#subaccountid) | sub-account id |
+| pair_id | [PairId](basic-types.md#pairid) | contract pair id |
| old_symbol | String | old symbol of the contract pair |
| new_symbol | String | new symbol of the contract pair |
| old_maintenance_margin_rate | u16 | old maintenance margin rate of the contract pair |
diff --git a/developer/api-and-sdk/data-types/transaction/liquidation.md b/developer/api-and-sdk/data-types/transaction/liquidation.md
index cdfb0c0..887f318 100644
--- a/developer/api-and-sdk/data-types/transaction/liquidation.md
+++ b/developer/api-and-sdk/data-types/transaction/liquidation.md
@@ -24,7 +24,7 @@
| Name | Type | Description |
|-------------|-------------------|---------------------------------|
-| pairId | [PairId](#PairId) | The pair id |
+| pairId | [PairId](#pairid) | The pair id |
| marketPrice | BigUint | The market price of the pair id |
{% endtab %}
@@ -33,7 +33,7 @@
| Name | Type | Description |
|------------|---------------------|-------------------------------|
-| tokenId | [TokenId](#tokenId) | The token id |
+| tokenId | [TokenId](#tokenid) | The token id |
| marketPrice | BigUint | The market price of the token |
{% endtab %}
diff --git a/developer/api-and-sdk/data-types/transaction/transfer.md b/developer/api-and-sdk/data-types/transaction/transfer.md
index b0361a9..d5b58f6 100644
--- a/developer/api-and-sdk/data-types/transaction/transfer.md
+++ b/developer/api-and-sdk/data-types/transaction/transfer.md
@@ -12,7 +12,7 @@ L3 transfer
| amount | BigUint | yes | Token amount, the value must be packable |
| fee | BugUint | yes | Fee returned by estimateTransactionFee API, the value should be packable |
| nonce | Nonce | yes | Current nonce of the account |
- |
| signature | ZkLinkSignature | yes | the public key hash corresponding to the signature must be aligned with the from_account |
+| signature | ZkLinkSignature | yes | the public key hash corresponding to the signature must be aligned with the from_account |
| ts | u32 | yes | Timestamp of the API call, used as front-end request id to generate transaction hash |
@@ -80,7 +80,7 @@ func SignTransfer() {
For more details please refer to [Golang example](https://github.com/zkLinkProtocol/zklink_sdk/tree/main/examples/Golang) in SDK
{% endtab %}
-{% tab title="Javascript" }
+{% tab title="Javascript" %}
```javascript
import init, * as wasm from "./web-dist/zklink-sdk-web.js";
diff --git a/developer/api-and-sdk/data-types/transaction/update_global_var.md b/developer/api-and-sdk/data-types/transaction/update_global_var.md
index a3a72e2..44a5e7e 100644
--- a/developer/api-and-sdk/data-types/transaction/update_global_var.md
+++ b/developer/api-and-sdk/data-types/transaction/update_global_var.md
@@ -20,7 +20,7 @@ Modify the collect-fee account.
| Name | Type | Required | Description |
|------------|-------------------------|-----------|--------------------|
-| feeAccount | [AccountId](#AccountId)| yes | The fee account id |
+| feeAccount | [AccountId](#accountid)| yes | The fee account id |
For example:
@@ -46,7 +46,7 @@ Modify the insurance fund account
| Name | Type | Required | Description |
|-----------|--------------------------|-----------|--------------------|
-| accountId | [AccountId](#AccountId) | yes | The account id of insuranceFundAccount|
+| accountId | [AccountId](#accountid) | yes | The account id of insuranceFundAccount|
For Example:
@@ -72,8 +72,8 @@ Modify the margin info in the specified index.
| Name | Type | Required | Description |
|----------|----------------------------|-----|---------------------------|
-| marginId | [MarginId](#MarginId) | yes | The margin id |
-| tokenId | [TokenId](#TokenId) | yes | The Token id |
+| marginId | [MarginId](#marginid) | yes | The margin id |
+| tokenId | [TokenId](#tokenid) | yes | The Token id |
| ratio | u8 | yes |the ratio, 100 means 1.0% |
For example
@@ -103,7 +103,7 @@ Modify the info of every perpetual contract pair.
| Name | Type | Required | Description |
|-----------------------|-------------------|------------|---------------------------------------------------------|
-| pairId | [PairId](#PairId) | yes | The pair id |
+| pairId | [PairId](#pairid) | yes | The pair id |
| symbol | String | yes | The symbol of the contract |
| initialMarginRate | u16 | yes | The initial margin rate of the contract, 100 means 0.1% |
| maintenanceMarginRate | u16 | yes | The maintenance margin rate, 100 means 0.1% |
@@ -134,7 +134,7 @@ Update the funding rates to accumulated funding rates of the Global Vars for all
| Name | Type | Required | Description |
|---------------|-------|-----------|-------------------|
| infos | array | yes | funding info list |
-| > pairId | [PairId](#PairId) | yes | The pair id |
+| > pairId | [PairId](#pairid) | yes | The pair id |
| > price | BigUint | yes | the mark price of the trade pair |
| > fundingRate | i16 | yes | the fee funding rate, the actual result needs to be divided by `10^6` |
diff --git a/developer/api-and-sdk/json-rpc/json-rpc-api.md b/developer/api-and-sdk/json-rpc/json-rpc-api.md
index 1e82b77..1b41784 100644
--- a/developer/api-and-sdk/json-rpc/json-rpc-api.md
+++ b/developer/api-and-sdk/json-rpc/json-rpc-api.md
@@ -16,7 +16,7 @@ The zkLink API follows the JSON-RPC standard and is accessed via POST.
{% tab title="Block" %}
* [getBlockByNumber](json-rpc-api.md#getblockbynumber): get the block info by block height.
-* [getBlockOnChainByNumber](json-rpc-api.md#getBlockOnChainByNumber): get the transaction information in a block that is executed on L1 blockchains.
+* [getBlockOnChainByNumber](json-rpc-api.md#getblockonchainbynumber): get the transaction information in a block that is executed on L1 blockchains.
{% endtab %}
{% tab title="Account" %}
diff --git a/developer/api-and-sdk/kafka/README.md b/developer/api-and-sdk/kafka/README.md
index 234c599..a7fd7eb 100644
--- a/developer/api-and-sdk/kafka/README.md
+++ b/developer/api-and-sdk/kafka/README.md
@@ -36,13 +36,13 @@ The `Submit` event carries a `BatchSubmitMessages` structure, which represents a
| eventType | Type | Description |
|-----------|---------------------------------------------|-----------------------------------------|
-| Submit | [BatchSubmitMessages](#BatchSubmitMessages) | Submitted transaction batch information |
+| Submit | [BatchSubmitMessages](#batchsubmitmessages) | Submitted transaction batch information |
#### BatchSubmitMessages
| Field | Type | Description |
|-----------|----------------------------|----------------------------|
-| messages | Vec<[TxParams](#TxParams)> | Transaction parameter list |
+| messages | Vec<[TxParams](#txparams)> | Transaction parameter list |
| messageId | `i64` | message id |
| id | `i64` | batch id |
| createdAt | `i64` | Creation timestamp |
@@ -52,7 +52,7 @@ The `Submit` event carries a `BatchSubmitMessages` structure, which represents a
| Field | Type | Description |
|--------------------|---------------------------------------------------------------------|---------------------|
| tx | [ZkLinkTx](../data-types/transaction) | Transaction details |
-| ethSignature | [TxLayer1Signature](../data-types/basic-types.md#TxLayer1Signature) | layer1 signature |
+| ethSignature | [TxLayer1Signature](../data-types/basic-types.md#txlayer1signature) | layer1 signature |
| submitterSignature | [ZkLinkSignature](../data-types/basic-types.md#zklinksignature) | Submitter signature |
### JSON example
@@ -105,16 +105,16 @@ To ensure that consumers can effectively process messages received from the `TX_
| stage | Type | Description |
|----------|-----------------------------------|------------------------------------------------------------------------------------------------------------------|
-| ready | [TxReadyResp](#TxReadyResp) | This is for FullExit, Deposit, means layer2 is ready, not yet executed(be executed after [submit](#Event-type)). |
-| submit | [TxExecutedResp](#TxExecutedResp) | This is the result for a failed tx(all tx type). |
-| executed | [TxExecutedResp](#TxExecutedResp) | This is the result for a successfully executed tx(all tx type). |
+| ready | [TxReadyResp](#txreadyresp) | This is for FullExit, Deposit, means layer2 is ready, not yet executed(be executed after [submit](#event-type)). |
+| submit | [TxExecutedResp](#txexecutedresp) | This is the result for a failed tx(all tx type). |
+| executed | [TxExecutedResp](#txexecutedresp) | This is the result for a successfully executed tx(all tx type). |
#### TxReadyResp
| Field | Type | Description |
|---------|-----------------------------------------------|-------------------|
| txInput | Vec<[ZkLinkTx](../data-types/transaction)> | Transaction input |
-| txHash | [TxHash](../data-types/basic-types.md#TxHash) | Transaction Hash |
+| txHash | [TxHash](../data-types/basic-types.md#txhash) | Transaction Hash |
#### TxExecutedResp
@@ -123,7 +123,7 @@ To ensure that consumers can effectively process messages received from the `TX_
| txInput | Vec<[ZkLinkTx](../data-types/transaction)> | Transaction input |
| messageId | `Option` | message ID |
| id | `Option` | Transaction ID |
-| txResults | Vec<[TxResult](#TxResult)> | Transaction results |
+| txResults | Vec<[TxResult](#txresult)> | Transaction results |
#### TxResult
@@ -133,7 +133,7 @@ To ensure that consumers can effectively process messages received from the `TX_
| Field | Type | Description |
|---------|------------------------------------------------------------|------------------|
-| txHash | [TxHash](../data-types/basic-types.md#TxHash) | Transaction Hash |
+| txHash | [TxHash](../data-types/basic-types.md#txhash) | Transaction Hash |
| updates | Vec<[StateUpdateResp](../json-rpc/json-rpc-api.md#txresp)> | Status updates |
##### Failed
diff --git a/developer/api-and-sdk/private-key-and-signature/encode/auto_deleveraging.md b/developer/api-and-sdk/private-key-and-signature/encode/auto_deleveraging.md
index 719daf3..1b8a588 100644
--- a/developer/api-and-sdk/private-key-and-signature/encode/auto_deleveraging.md
+++ b/developer/api-and-sdk/private-key-and-signature/encode/auto_deleveraging.md
@@ -9,9 +9,9 @@
| oraclePrices | 31 bytes, encode the `ContractPrice` and `MarginPrice` in order, pass the bytes to Rust SDK `rescue_hash` method |
| adlAccountId | 4 bytes |
| pairId | 1 byte |
-| adlSize | 5 bytes, refer to `amount` pack method in [BigUint pack algorithm](../algorithm.md#BigUint-pack-algorithm) |
+| adlSize | 5 bytes, refer to `amount` pack method in [BigUint pack algorithm](../algorithm.md#biguint-pack-algorithm) |
| adlPrice | 15 bytes, encode to big endian bytes, then pass to the`pad_front` function in Rust SDK |
-| fee | 2 bytes, refer to `fee` pack method in [BigUint pack algorithm](../algorithm.md#BigUint-pack-algorithm) |
+| fee | 2 bytes, refer to `fee` pack method in [BigUint pack algorithm](../algorithm.md#biguint-pack-algorithm) |
| feeToken | 2 bytes |
diff --git a/developer/api-and-sdk/private-key-and-signature/encode/chaneg_pubkey.md b/developer/api-and-sdk/private-key-and-signature/encode/chaneg_pubkey.md
index c3d54ad..41461c6 100644
--- a/developer/api-and-sdk/private-key-and-signature/encode/chaneg_pubkey.md
+++ b/developer/api-and-sdk/private-key-and-signature/encode/chaneg_pubkey.md
@@ -9,7 +9,7 @@
| subAccountId | 1 byte |
| newPkHash | 20 bytes |
| feeToken | 2 bytes |
-| fee | 2 bytes, refer to the `fee` pack method in [BigUint pack algorithm](#BigUint-pack-algorithm) |
+| fee | 2 bytes, refer to the `fee` pack method in [BigUint pack algorithm](#biguint-pack-algorithm) |
| nonce | 4 bytes |
| ts | 4 bytes |
diff --git a/developer/api-and-sdk/private-key-and-signature/encode/contract_matching.md b/developer/api-and-sdk/private-key-and-signature/encode/contract_matching.md
index abbe289..f088f7a 100644
--- a/developer/api-and-sdk/private-key-and-signature/encode/contract_matching.md
+++ b/developer/api-and-sdk/private-key-and-signature/encode/contract_matching.md
@@ -23,7 +23,7 @@
| accountId | 4 bytes |
| subAccountId | 1 byte |
| maker,taker | 31 bytes |
-| fee | 2 bytes, refer to `fee` pack method in [BigUint pack algorithm](#BigUint-pack-algorithm) |
+| fee | 2 bytes, refer to `fee` pack method in [BigUint pack algorithm](#biguint-pack-algorithm) |
| feeToken | 2 bytes |
41 bytes in total, where the `maker` and `taker` encode as bellow:
diff --git a/developer/api-and-sdk/private-key-and-signature/encode/funding.md b/developer/api-and-sdk/private-key-and-signature/encode/funding.md
index 89ffb6b..cc284c6 100644
--- a/developer/api-and-sdk/private-key-and-signature/encode/funding.md
+++ b/developer/api-and-sdk/private-key-and-signature/encode/funding.md
@@ -8,7 +8,7 @@
| subAccountId | 1 byte |
| accountIdNonce | 4 bytes |
| fundingAccountIds | 4 bytes(when length is 1) or 31 bytes(when length > 1) |
-| fee | 2 bytes, refer to `fee` pack method in [BigUint pack algorithm](#BigUint-pack-algorithm) |
+| fee | 2 bytes, refer to `fee` pack method in [BigUint pack algorithm](#biguint-pack-algorithm) |
| feeToken | 2 bytes |
The encoding process of `fundingAccountIds` is as blew:
diff --git a/developer/api-and-sdk/private-key-and-signature/encode/liquidation.md b/developer/api-and-sdk/private-key-and-signature/encode/liquidation.md
index e3d2af5..fc2f9b8 100644
--- a/developer/api-and-sdk/private-key-and-signature/encode/liquidation.md
+++ b/developer/api-and-sdk/private-key-and-signature/encode/liquidation.md
@@ -23,7 +23,7 @@
| accountIdNonce | 4 bytes |
| oraclePrices | 31 bytes |
| liquidationAccountId | 4 bytes |
-| fee | 2 bytes, refer to `fee` pack method in [BigUint pack algorithm](#BigUint-pack-algorithm) |
+| fee | 2 bytes, refer to `fee` pack method in [BigUint pack algorithm](#biguint-pack-algorithm) |
| feeToken | 2 bytes |
49 bytes in total, where the `oraclePrices` encode process is as blew:
diff --git a/developer/api-and-sdk/private-key-and-signature/encode/order_matching.md b/developer/api-and-sdk/private-key-and-signature/encode/order_matching.md
index 149078f..38d3528 100644
--- a/developer/api-and-sdk/private-key-and-signature/encode/order_matching.md
+++ b/developer/api-and-sdk/private-key-and-signature/encode/order_matching.md
@@ -13,7 +13,7 @@
| isSell | 1 byte |
| feeRates | 2 bytes |
| hasSubsidy | 1 byte |
-| amount | 5 bytes, refer to the `amount` pack method in [BigUint pack algorithm](#BigUint-pack-algorithm) |
+| amount | 5 bytes, refer to the `amount` pack method in [BigUint pack algorithm](#biguint-pack-algorithm) |
39 bytes in total.
@@ -26,7 +26,7 @@
| subAccountId | 1 byte |
| orderBytesHash | 32 bytes, refer to Rust SDK `rescue_hash_orders` |
| feeToken | 2 bytes |
-| fee | 2 bytes, refer to the `fee` pack method in [BigUint pack algorithm](#BigUint-pack-algorithm) |
+| fee | 2 bytes, refer to the `fee` pack method in [BigUint pack algorithm](#biguint-pack-algorithm) |
| expectBaseAmount | 16 bytes |
| expectQuoteAmount | 16 bytes |
diff --git a/developer/api-and-sdk/private-key-and-signature/encode/transfer.md b/developer/api-and-sdk/private-key-and-signature/encode/transfer.md
index c1c96ca..11888e6 100644
--- a/developer/api-and-sdk/private-key-and-signature/encode/transfer.md
+++ b/developer/api-and-sdk/private-key-and-signature/encode/transfer.md
@@ -7,8 +7,8 @@
| to | 32 bytes, extended to 32 bytes with prefix `0x00` prefix |
| toSubAccountId | 1 byte |
| token | 2 bytes |
-| amount | 5 bytes, refer to the `amount` pack method in [BigUint pack algorithm](#BigUint-pack-algorithm) |
-| feeAmount | 2 bytes, refer to the `fee` pack method in [BigUint pack algorithm](#BigUint-pack-algorithm) |
+| amount | 5 bytes, refer to the `amount` pack method in [BigUint pack algorithm](#biguint-pack-algorithm) |
+| feeAmount | 2 bytes, refer to the `fee` pack method in [BigUint pack algorithm](#biguint-pack-algorithm) |
| nonce | 4 bytes |
| ts | 4 bytes |
diff --git a/developer/api-and-sdk/private-key-and-signature/encode/withdraw.md b/developer/api-and-sdk/private-key-and-signature/encode/withdraw.md
index f6ab51d..5c4b696 100644
--- a/developer/api-and-sdk/private-key-and-signature/encode/withdraw.md
+++ b/developer/api-and-sdk/private-key-and-signature/encode/withdraw.md
@@ -9,8 +9,8 @@
| to | 32 bytes, extend to 32 bytes with `0x00` prefix |
| l2SourceToken | 2 bytes |
| l1TargetToken | 2 bytes |
-| amount | 16 bytes, refer to the `amount` pack method in [BigUint pack algorithm](#BigUint-pack-algorithm) |
-| fee | 2 bytes, refer to the `fee` pack method in [BigUint pack algorithm](#BigUint-pack-algorithm) |
+| amount | 16 bytes, refer to the `amount` pack method in [BigUint pack algorithm](#biguint-pack-algorithm) |
+| fee | 2 bytes, refer to the `fee` pack method in [BigUint pack algorithm](#biguint-pack-algorithm) |
| nonce | 4 bytes |
| withdrawToL1 | 1 byte |
| withdrawFeeRatio | 2 bytes |
diff --git a/developer/api-and-sdk/websocket/README.md b/developer/api-and-sdk/websocket/README.md
index f1d472d..67a6407 100644
--- a/developer/api-and-sdk/websocket/README.md
+++ b/developer/api-and-sdk/websocket/README.md
@@ -68,7 +68,7 @@ topic: `txExecuteResult@{sub_account_id}`
| Name | Type | Describe |
| ------------------- | --------------------------------------------- | ------------------------------------------------------------------------------------------------------ |
| type | String | Event type |
-| tx\_hash | [TxHash](../data-types/basic-types.md#TxHash) | The tx hash on L1 |
+| tx\_hash | [TxHash](../data-types/basic-types.md#txhash) | The tx hash on L1 |
| tx | [ZklinkTx](../data-types/transaction/) | [Transaction](../data-types/transaction/) detail |
| receipt | struct | The transaction status after received |
| > executed | bool | The transaction finished executing or not |
@@ -152,7 +152,7 @@ topic: fullExitEvent@{sub\_account\_id}
| Name | Type | Description |
| -------- | --------------------------------------------- | -------------------- |
| type | String | Event type |
-| tx\_hash | [TxHash](../data-types/basic-types.md#TxHash) | The tx hash on L1 |
+| tx\_hash | [TxHash](../data-types/basic-types.md#txhash) | The tx hash on L1 |
| tx | [Transaction](../data-types/transaction/) | FullExit transaction |
For example:
diff --git a/developer/quick-start/README.md b/developer/quick-start/README.md
index 3a3420b..0431b3b 100644
--- a/developer/quick-start/README.md
+++ b/developer/quick-start/README.md
@@ -177,7 +177,7 @@ And Alice, as the taker, will create the taker order:
console.log(taker);
```
-You can obtain the user's Nonce and SlotId by using the RPC [getUser](../api-and-sdk/json-rpc/json-rpc-api.md#getAccount) and [getAccountOrderSlots](../api-and-sdk/json-rpc/json-rpc-api.md#getaccountorderslots) respectively.
+You can obtain the user's Nonce and SlotId by using the RPC [getUser](../api-and-sdk/json-rpc/json-rpc-api.md#getaccount) and [getAccountOrderSlots](../api-and-sdk/json-rpc/json-rpc-api.md#getaccountorderslots) respectively.
# Prepare submitter private key
diff --git a/developer/sdk/dart/changelog.md b/developer/sdk/dart/changelog.md
new file mode 100644
index 0000000..046c900
--- /dev/null
+++ b/developer/sdk/dart/changelog.md
@@ -0,0 +1,5 @@
+## Change Log
+
+**2024-04-30 v0.0.1**
+* Initialize SDK
+
diff --git a/developer/sdk/dart/signer.md b/developer/sdk/dart/signer.md
new file mode 100644
index 0000000..05a54b8
--- /dev/null
+++ b/developer/sdk/dart/signer.md
@@ -0,0 +1,239 @@
+## Type ZkLinkSigner
+`ZkLinkSigner` includes the L1 private key(Eth or Starknet) and L3 private key.
+
+### func ethSig
+
+```dart
+ZkLinkSigner ethSig(String sig)
+```
+Creat a `ZkLinkSigner` from eth personal sign.
+
+**input:**
+* sig: hex string of eth personal sign(with or without `0x` prefix)
+
+### func starknetSig
+
+```dart
+ZkLinkSigner starknetSig(String sig)
+```
+Creat a `ZkLinkSigner` from starknet signature.
+
+**input:**
+* sig: hex string of starknet signature(with or without `0x` prefix)
+
+### func getPubkey
+
+```dart
+String getPubkey()
+```
+Return hex string of public key.
+
+### func getPubkeyHash
+
+```dart
+String getPubkeyHash()
+```
+Return hex string of public key hash.
+
+### func signMusig
+
+```dart
+ZkLinkSignature signMusig(List msg)
+```
+Sign and create [ZkLinkSignature](../../api-and-sdk/data-types/basic-types.md#zklinksignature) from raw message.
+
+## Type Signer
+L1 private key.
+
+### func ethSigner
+
+```dart
+Signer ethSigner(String ethPrivateKey)
+```
+Create a Ethereum private key signer.
+
+**input:**
+* ethPrivateKey: hex string of private key(with or without `0x` prefix)
+
+### func starknetSigner
+
+```dart
+Signer starknetSigner(String ethPrivateKey, String starknetChainId, String starknetAddr)
+```
+
+Create a Starknet signer.
+
+**input:**
+* ethPrivateKey: hex string of starknet private key
+* starknetChainId: chain id of starknet
+* starknetAddr: starknet address
+
+### func signChangePubkeyWithOnchain
+
+```dart
+String signChangePubkeyWithOnchain(ChangePubKey tx)
+```
+
+### func signChangePubkeyWithEthEcdsaAuth
+
+```dart
+String signChangePubkeyWithEthEcdsaAuth(ChangePubKey tx)
+```
+
+### func signChangePubkeyWithCreate2DataAuth
+
+```dart
+String signChangePubkeyWithCreate2DataAuth(
+ ChangePubKey tx,
+ String creatorAddress,
+ String saltArg,
+ String codeHash,
+```
+
+### Example
+
+```dart
+var signer = Signer.ethSigner(ethPrivateKey: "0xbe725250b123a39dab5b7579334d5888987c72a58f4508062545fe6e08ca94f4");
+var tx = ChangePubKey(
+ chainId: 1,
+ accountId: 2,
+ subAccountId: 4,
+ newPubkeyHash: "0xd8d5fb6a6caef06aa3dc2abdcdc240987e5330fe",
+ feeToken: 1,
+ fee: "100",
+ nonce: 100,
+);
+print(signer.signChangePubkeyWithCreate2DataAuth(
+ tx: tx,
+ creatorAddress: '0x6E253C951A40fAf4032faFbEc19262Cd1531A5F5',
+ saltArg: '0x0000000000000000000000000000000000000000000000000000000000000000',
+ codeHash: '0x4f063cd4b2e3a885f61fefb0988cc12487182c4f09ff5de374103f5812f33fe7',
+));
+```
+
+### func signWithdraw
+
+```dart
+String signWithdraw(
+ Withdraw tx,
+ String tokenSymbol,
+ String? chainId,
+ String? addr,
+)
+```
+
+### func signTransfer
+
+```dart
+String signTransfer(
+ Transfer tx,
+ String tokenSymbol,
+ String? chainId,
+ String? addr,
+)
+```
+
+### func signForcedExit
+
+```dart
+String signForcedExit(ForcedExit tx)
+```
+
+### func createSignedOrder
+
+```dart
+Order createSignedOrder(Order order)
+```
+
+### func signOrderMatching
+
+```dart
+String signOrderMatching(OrderMatching tx)
+```
+
+### Example
+```dart
+var signer = Signer.ethSigner(ethPrivateKey: "0xbe725250b123a39dab5b7579334d5888987c72a58f4508062545fe6e08ca94f4");
+var maker = signer.createSignedOrder(order: Order(
+ accountId: 5,
+ subAccountId: 1,
+ slotId: 1,
+ nonce: 1,
+ baseTokenId: 18,
+ quoteTokenId: 17,
+ amount: "10000000000000",
+ price: "10000000000",
+ isSell: true,
+ makerFeeRate: 5,
+ takerFeeRate: 3,
+ hasSubsidy: false,
+));
+var taker = signer.createSignedOrder(order: Order(
+ accountId: 6,
+ subAccountId: 1,
+ slotId: 1,
+ nonce: 1,
+ baseTokenId: 18,
+ quoteTokenId: 17,
+ amount: "10000000000000",
+ price: "10000000000",
+ isSell: false,
+ makerFeeRate: 5,
+ takerFeeRate: 3,
+ hasSubsidy: false,
+));
+var contractPrices = [
+ ContractPrice(pairId: 1, marketPrice: "100"),
+ ContractPrice(pairId: 2, marketPrice: "200"),
+ ContractPrice(pairId: 3, marketPrice: "300"),
+ ContractPrice(pairId: 4, marketPrice: "400"),
+];
+var marginPrices = [
+ SpotPriceInfo(tokenId: 11, price: "100"),
+ SpotPriceInfo(tokenId: 12, price: "200"),
+ SpotPriceInfo(tokenId: 13, price: "300"),
+];
+var tx = OrderMatching(
+ accountId: 10,
+ subAccountId: 1,
+ taker: taker,
+ maker: maker,
+ fee: "1000000000",
+ feeToken: 18,
+ contractPrices: contractPrices,
+ marginPrices: marginPrices,
+ expectBaseAmount: "10000000000000000",
+ expectQuoteAmount: "10000000000000000",
+);
+print(signer.signOrderMatching(tx: tx));
+```
+
+### func createSignedContract
+
+```dart
+Contract createSignedContract(Contract contract)
+```
+
+### func signContractMatching
+
+```dart
+String signContractMatching(ContractMatching tx)
+```
+
+### func signAutoDeleveraging
+
+```dart
+String signAutoDeleveraging(AutoDeleveraging tx)
+```
+
+### func signFunding
+
+```dart
+String signFunding(Funding tx)
+```
+
+### func signLiquidation
+
+```dart
+String signLiquidation(Liquidation tx)
+```
diff --git a/developer/sdk/dart/transactions/1-change-pubkey.md b/developer/sdk/dart/transactions/1-change-pubkey.md
new file mode 100644
index 0000000..816d4b5
--- /dev/null
+++ b/developer/sdk/dart/transactions/1-change-pubkey.md
@@ -0,0 +1,78 @@
+## type ChangePubKey
+[ChangePubkey](../../../api-and-sdk/data-types/transaction/change\_pubkey.md) transaction type.
+
+```dart
+ChangePubkey(
+ int chainId,
+ int accountId,
+ int subAccountId,
+ String newPubkeyHash,
+ int feeToken,
+ String fee,
+ int nonce,
+ String? ethSignature,
+ int? ts,
+)
+```
+
+### func getEthSignMsg
+
+```dart
+String getEthSignMsg(int nonce, int accountId)
+```
+
+Get the Ethereum sign message
+
+### func sign
+
+```dart
+void sign(ZkLinkSigner zkLinkSigner)
+```
+
+Sign transaction with given `ZkLinkSigner`
+
+### func toJson
+
+```dart
+String toJson()
+```
+
+Get the json str of [ChangePubKey](#type-changepubkey)
+
+### func toEip712RequestPayload
+
+```dart
+String toEip712RequestPayload(int chainId, String address)
+```
+
+Get the EIP-712 structured data of [ChangePubKey](#type-changepubkey)
+
+### func setEthAuthData
+
+```dart
+void setEthAuthData(String sig)
+```
+
+Set Ethereum authentication data with given EthECDSA signature
+
+### Example
+
+```dart
+var zklinkSigner = ZkLinkSigner.ethSig(sig: "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001");
+String pubkeyHash = zklinkSigner.getPubkeyHash();
+print(pubkeyHash);
+var tx = ChangePubKey(
+ chainId: 1,
+ accountId: 2,
+ subAccountId: 4,
+ newPubkeyHash: pubkeyHash,
+ feeToken: 1,
+ fee: "100",
+ nonce: 100
+);
+tx.sign(zkLinkSigner: zklinkSigner);
+print(tx.toEip712RequestPayload(chainId: 1, address: "0xa97153dd89c6f8F3BeA66190a6e62020aC7213de"));
+String ethSignMsg = tx.getEthSignMsg(nonce: 100, accountId: 1);
+tx.setEthAuthData(sig: "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b");
+print(tx.toJson());
+```
diff --git a/developer/sdk/dart/transactions/10-update-global-var.md b/developer/sdk/dart/transactions/10-update-global-var.md
new file mode 100644
index 0000000..7c077ec
--- /dev/null
+++ b/developer/sdk/dart/transactions/10-update-global-var.md
@@ -0,0 +1,115 @@
+## type ContractPrice
+
+```dart
+ContractPrice(
+ int pairId,
+ String marketPrice,
+)
+```
+
+**input:**
+* pairId: The contract pair id defined by zkLink.
+* marketPrice: The market price of the contract pair
+
+## type SpotPriceInfo
+
+```dart
+SpotPriceInfo(
+ int tokenId,
+ String price,
+)
+```
+
+**input:**
+* tokenId: The token id defined by zkLink.
+* price: The spot price of the token.
+
+## type FundingInfo
+
+```dart
+FundingInfo(
+ int pairId,
+ String price,
+ int fundingRate,
+)
+```
+
+## type Parameter
+The [Parameter](../../../api-and-sdk/data-types/transaction/update\_global\_var.md) struct of [UpdateGlobalVar](#type-updateglobalvar).
+
+### func insuranceFundAccount
+
+```dart
+insuranceFundAccount(int accountId)
+```
+
+### func feeAccount
+
+```dart
+feeAccount(int accountId)
+```
+
+### func marginInfo
+
+```dart
+marginInfo(
+ int marginId,
+ String? symbol,
+ int tokenId,
+ int ratio,
+)
+```
+
+### func contractInfo
+
+```dart
+contractInfo(
+ int pairId,
+ String symbol,
+ int initialMarginRate,
+ int maintenanceMarginRate,
+)
+```
+
+### func feeAccount
+
+```dart
+feeAccount(int accountId)
+```
+
+### func fundingInfos
+
+```dart
+fundingInfos(List infos)
+```
+
+## type UpdateGlobalVar
+[UpdateGlobalVar](../../../api-and-sdk/data-types/transaction/update\_global\_var.md) transaction type.
+
+```dart
+UpdateGlobalVar(
+ int fromChainId,
+ int subAccountId,
+ Parameter parameter,
+ double serialId,
+)
+```
+
+### func toJson
+
+```dart
+String toJson()
+```
+
+Get the json str of [UpdateGlobalVar](#type-updateglobalvar)
+
+### Example
+```dart
+var tx = UpdateGlobalVar(
+ fromChainId: 1,
+ subAccountId: 2,
+ parameter: Parameter.feeAccount(accountId: 8),
+ serialId: 101
+);
+print(tx.toJson());
+```
\ No newline at end of file
diff --git a/developer/sdk/dart/transactions/2-withdraw.md b/developer/sdk/dart/transactions/2-withdraw.md
new file mode 100644
index 0000000..180ec9f
--- /dev/null
+++ b/developer/sdk/dart/transactions/2-withdraw.md
@@ -0,0 +1,44 @@
+## type Withdraw
+[Withdraw](../../../api-and-sdk/data-types/transaction/withdraw.md) transaction type.
+
+```dart
+Withdraw(
+ int accountId,
+ int subAccountId,
+ int toChainId,
+ String toAddress,
+ int l2SourceToken,
+ int l1TargetToken,
+ String amount,
+ String? callData,
+ String fee,
+ int nonce,
+ bool withdrawToL1,
+ int withdrawFeeRatio,
+ int? ts,
+)
+```
+
+### func getEthSignMsg
+
+```dart
+String getEthSignMsg(String tokenSymbol)
+```
+
+Get the Ethereum sign message
+
+### func sign
+
+```dart
+void sign(ZkLinkSigner zkLinkSigner)
+```
+
+Sign transaction with given `ZkLinkSigner`
+
+### func toJson
+
+```dart
+String toJson()
+```
+
+Get the json str of [Withdraw](#type-withdraw)
diff --git a/developer/sdk/dart/transactions/3-transfer.md b/developer/sdk/dart/transactions/3-transfer.md
new file mode 100644
index 0000000..d59fa15
--- /dev/null
+++ b/developer/sdk/dart/transactions/3-transfer.md
@@ -0,0 +1,40 @@
+## type Transfer
+[Transfer](../../../api-and-sdk/data-types/transaction/transfer.md) transaction type.
+
+```dart
+Transfer(
+ accountId,
+ String toAddress,
+ int fromSubAccountId,
+ int toSubAccountId,
+ int token,
+ String fee,
+ String amount,
+ int nonce,
+ int? ts,
+)
+```
+
+### func getEthSignMsg
+
+```dart
+String getEthSignMsg(String tokenSymbol)
+```
+
+Get the Ethereum sign message
+
+### func sign
+
+```dart
+void sign(ZkLinkSigner zkLinkSigner)
+```
+
+Sign transaction with given `ZkLinkSigner`
+
+### func toJson
+
+```dart
+String toJson()
+```
+
+Get the json str of [Transfer](#type-transfer)
diff --git a/developer/sdk/dart/transactions/4-forced-exit.md b/developer/sdk/dart/transactions/4-forced-exit.md
new file mode 100644
index 0000000..9855e02
--- /dev/null
+++ b/developer/sdk/dart/transactions/4-forced-exit.md
@@ -0,0 +1,34 @@
+## type ForcedExit
+[ForcedExit](../../../api-and-sdk/data-types/transaction/forced\_exit.md) transaction type.
+
+```dart
+ForcedExit(
+ int toChainId,
+ int initiatorAccountId,
+ int initiatorSubAccountId,
+ int targetSubAccountId,
+ String target,
+ int l2SourceToken,
+ int l1TargetToken,
+ String exitAmount,
+ int initiatorNonce,
+ bool withdrawToL1,
+ int? ts,
+)
+```
+
+### func sign
+
+```dart
+void sign(ZkLinkSigner zkLinkSigner)
+```
+
+Sign transaction with given `ZkLinkSigner`
+
+### func toJson
+
+```dart
+String toJson()
+```
+
+Get the json str of [ForcedExit](#type-forcedexit)
diff --git a/developer/sdk/dart/transactions/5-order-matching.md b/developer/sdk/dart/transactions/5-order-matching.md
new file mode 100644
index 0000000..0752f2b
--- /dev/null
+++ b/developer/sdk/dart/transactions/5-order-matching.md
@@ -0,0 +1,79 @@
+## type ContractPrice
+
+```dart
+ContractPrice(
+ int pairId,
+ String marketPrice,
+)
+```
+
+**input:**
+* pairId: The contract pair id defined by zkLink.
+* marketPrice: The market price of the contract pair
+
+## type SpotPriceInfo
+
+```dart
+SpotPriceInfo(
+ int tokenId,
+ String price,
+)
+```
+
+**input:**
+* tokenId: The token id defined by zkLink.
+* price: The spot price of the token.
+
+## type Order
+The [Order](../../../api-and-sdk/data-types/transaction/order\_matching.md) struct of taker and maker.
+
+```dart
+Order(
+ int accountId,
+ int subAccountId,
+ int slotId,
+ int nonce,
+ int baseTokenId,
+ int quoteTokenId,
+ String amount,
+ String price,
+ bool isSell,
+ int makerFeeRate,
+ int takerFeeRate,
+ bool hasSubsidy,
+)
+```
+
+## type OrderMatching
+[OrderMatching](../../../api-and-sdk/data-types/transaction/order\_matching.md) transaction type.
+
+```dart
+OrderMatching(
+ int accountId,
+ int subAccountId,
+ Order taker,
+ Order maker,
+ String fee,
+ int feeToken,
+ List contractPrices,
+ List marginPrices,
+ String expectBaseAmount,
+ String expectQuoteAmount,
+)
+```
+
+### func sign
+
+```dart
+void sign(ZkLinkSigner zkLinkSigner)
+```
+
+Sign transaction with given `ZkLinkSigner`
+
+### func toJson
+
+```dart
+String toJson()
+```
+
+Get the json str of [OrderMatching](#type-ordermatching)
diff --git a/developer/sdk/dart/transactions/6-contract-matching.md b/developer/sdk/dart/transactions/6-contract-matching.md
new file mode 100644
index 0000000..e51d09c
--- /dev/null
+++ b/developer/sdk/dart/transactions/6-contract-matching.md
@@ -0,0 +1,76 @@
+## type ContractPrice
+
+```dart
+ContractPrice(
+ int pairId,
+ String marketPrice,
+)
+```
+
+**input:**
+* pairId: The contract pair id defined by zkLink.
+* marketPrice: The market price of the contract pair
+
+## type SpotPriceInfo
+
+```dart
+SpotPriceInfo(
+ int tokenId,
+ String price,
+)
+```
+
+**input:**
+* tokenId: The token id defined by zkLink.
+* price: The spot price of the token.
+
+## type Contract
+The [Contract](../../../api-and-sdk/data-types/transaction/contract\_matching.md) struct of taker and maker in perpetual contract.
+
+```dart
+Contract(
+ int accountId,
+ int subAccountId,
+ int slotId,
+ int nonce,
+ int pairId,
+ String size,
+ String price,
+ bool direction,
+ int makerFeeRate,
+ int takerFeeRate,
+ bool hasSubsidy,
+)
+```
+
+## type ContractMatching
+[ContractMatching](../../../api-and-sdk/data-types/transaction/contract\_matching.md) transaction type.
+
+```dart
+ContractMatching(
+ int accountId,
+ int subAccountId,
+ Contract taker,
+ List maker,
+ String fee,
+ int feeToken,
+ List contractPrices,
+ List marginPrices,
+)
+```
+
+### func sign
+
+```dart
+void sign(ZkLinkSigner zkLinkSigner)
+```
+
+Sign transaction with given `ZkLinkSigner`
+
+### func toJson
+
+```dart
+String toJson()
+```
+
+Get the json str of [ContractMatching](#type-contractmatching)
diff --git a/developer/sdk/dart/transactions/7-auto-deleveraging.md b/developer/sdk/dart/transactions/7-auto-deleveraging.md
new file mode 100644
index 0000000..182076c
--- /dev/null
+++ b/developer/sdk/dart/transactions/7-auto-deleveraging.md
@@ -0,0 +1,60 @@
+## type ContractPrice
+
+```dart
+ContractPrice(
+ int pairId,
+ String marketPrice,
+)
+```
+
+**input:**
+* pairId: The contract pair id defined by zkLink.
+* marketPrice: The market price of the contract pair
+
+## type SpotPriceInfo
+
+```dart
+SpotPriceInfo(
+ int tokenId,
+ String price,
+)
+```
+
+**input:**
+* tokenId: The token id defined by zkLink.
+* price: The spot price of the token.
+
+## type AutoDeleveraging
+[AutoDeleveraging](../../../api-and-sdk/data-types/transaction/auto\_deleveraging.md) transaction type.
+
+```dart
+AutoDeleveraging(
+ int accountId,
+ int subAccountId,
+ int subAccountNonce,
+ List contractPrices,
+ List marginPrices,
+ int adlAccountId,
+ int pairId,
+ String adlSize,
+ String adlPrice,
+ String fee,
+ int feeToken,
+)
+```
+
+### func sign
+
+```dart
+void sign(ZkLinkSigner zkLinkSigner)
+```
+
+Sign transaction with given `ZkLinkSigner`
+
+### func toJson
+
+```dart
+String toJson()
+```
+
+Get the json str of [AutoDeleveraging](#type-autodeleveraging)
diff --git a/developer/sdk/dart/transactions/8-funding.md b/developer/sdk/dart/transactions/8-funding.md
new file mode 100644
index 0000000..3f93ad3
--- /dev/null
+++ b/developer/sdk/dart/transactions/8-funding.md
@@ -0,0 +1,29 @@
+## type Funding
+[Funding](../../../api-and-sdk/data-types/transaction/funding.md) transaction type.
+
+```dart
+Funding(
+ int accountId,
+ int subAccountId,
+ int subAccountNonce,
+ List fundingAccountIds,
+ String fee,
+ int feeToken,
+)
+```
+
+### func sign
+
+```dart
+void sign(ZkLinkSigner zkLinkSigner)
+```
+
+Sign transaction with given `ZkLinkSigner`
+
+### func toJson
+
+```dart
+String toJson()
+```
+
+Get the json str of [Funding](#type-funding)
diff --git a/developer/sdk/dart/transactions/9-liquidation.md b/developer/sdk/dart/transactions/9-liquidation.md
new file mode 100644
index 0000000..916b794
--- /dev/null
+++ b/developer/sdk/dart/transactions/9-liquidation.md
@@ -0,0 +1,60 @@
+## type ContractPrice
+
+```dart
+ContractPrice(
+ int pairId,
+ String marketPrice,
+)
+```
+
+**input:**
+* pairId: The contract pair id defined by zkLink.
+* marketPrice: The market price of the contract pair
+
+## type SpotPriceInfo
+
+```dart
+SpotPriceInfo(
+ int tokenId,
+ String price,
+)
+```
+
+**input:**
+* tokenId: The token id defined by zkLink.
+* price: The spot price of the token.
+
+## type Liquidation
+[Liquidation](../../../api-and-sdk/data-types/transaction/liquidation.md) transaction type.
+
+```dart
+Liquidation(
+ int accountId,
+ int subAccountId,
+ int subAccountNonce,
+ List contractPrices,
+ List marginPrices,
+ int adlAccountId,
+ int pairId,
+ String adlSize,
+ String adlPrice,
+ String fee,
+ int feeToken,
+)
+```
+
+### func sign
+
+```dart
+void sign(ZkLinkSigner zkLinkSigner)
+```
+
+Sign transaction with given `ZkLinkSigner`
+
+### func toJson
+
+```dart
+String toJson()
+```
+
+Get the json str of [Liquidation](#type-liquidation)
diff --git a/developer/sdk/changelog/transactions/README.md b/developer/sdk/dart/transactions/README.md
similarity index 93%
rename from developer/sdk/changelog/transactions/README.md
rename to developer/sdk/dart/transactions/README.md
index 30549c3..a5fd09c 100644
--- a/developer/sdk/changelog/transactions/README.md
+++ b/developer/sdk/dart/transactions/README.md
@@ -1,2 +1 @@
# Transactions
-
diff --git a/developer/sdk/go/signer.md b/developer/sdk/go/signer.md
index 669e208..96bdae2 100644
--- a/developer/sdk/go/signer.md
+++ b/developer/sdk/go/signer.md
@@ -204,7 +204,7 @@ func (*Signer) SignChangePubkeyWithEthEcdsaAuth(tx *ChangePubKey) (TxSignature,
```
**input:**
-tx: [ChangePubKey](./transactions/change_pubkey.md#ChangePubkey)
+tx: [ChangePubKey](./transactions/1-change-pubkey.md#changepubkey)
Sign the `ChangePubkey` and get the `TxSignature` result, for example:
@@ -282,7 +282,7 @@ pubkey_hash := sdk.GetPublicKeyHash(pub_key)
```go
func EthSignatureOfChangePubkey (tx *ChangePubKey, ethSigner *EthSigner) (PackedEthSignature, error)
```
-Create the Ethereum signature of [ChangePubKey](../../api-and-sdk/data-types/transaction/change_pubkey.md)
+Create the Ethereum signature of [ChangePubKey](../../api-and-sdk/data-types/transaction/change\_pubkey.md)
### func ZklinkMainNetUrl
diff --git a/developer/sdk/go/transactions/1-change-pubkey.md b/developer/sdk/go/transactions/1-change-pubkey.md
index abc7107..2c3c7fc 100644
--- a/developer/sdk/go/transactions/1-change-pubkey.md
+++ b/developer/sdk/go/transactions/1-change-pubkey.md
@@ -35,15 +35,15 @@ type ChangePubKeyAuthDataOnchain struct {}
```go
func CreateSignedChangePubkey(zklinkSigner *ZkLinkSigner, tx *ChangePubKey, ethAuthData ChangePubKeyAuthData) (*ChangePubKey, error)
```
-Create a signed [ChangePubkey](../../api-and-sdk/data-types/transaction/change_pubkey.md)
+Create a signed [ChangePubkey](../../../api-and-sdk/data-types/transaction/change\_pubkey.md)
**input:**
* zklinkSigner: zklink [signer](#type-zklinksigner)
-* tx: unsigned transaction [ChangePubkey](../../api-and-sdk/data-types/transaction/change_pubkey.md)
-* ethAuthData: `ChangePubKeyAuthData` is a interface which can be [ChangePubKeyAuthDataOnchain](#ChangePubKeyAuthDataOnchain), [ChangePubKeyAuthDataEthCreate2](#ChangePubKeyAuthDataEthCreate2) or [ChangePubKeyAuthDataEthEcdsa](#ChangePubKeyAuthDataEthEcdsa)
+* tx: unsigned transaction [ChangePubkey](../../../api-and-sdk/data-types/transaction/change\_pubkey.md)
+* ethAuthData: `ChangePubKeyAuthData` is a interface which can be [ChangePubKeyAuthDataOnchain](#changepubkeyauthdataonchain), [ChangePubKeyAuthDataEthCreate2](#changepubkeyauthdataethcreate2) or [ChangePubKeyAuthDataEthEcdsa](#changepubkeyauthdataethecdsa)
## type ChangePubKeyBuilder
-The ChangePubKeyBuilder is used to build the type [ChangePubKey](#ChangePubKey)
+The ChangePubKeyBuilder is used to build the type [ChangePubKey](#changepubkey)
```go
type ChangePubKeyBuilder struct {
ChainId ChainId
@@ -59,7 +59,7 @@ type ChangePubKeyBuilder struct {
```
## type ChangePubKey
-[ChangePubkey](../../../api-and-sdk/data-types/transaction/change_pubkey.md) transaction type, it's a opaque data type.
+[ChangePubkey](../../../api-and-sdk/data-types/transaction/change\_pubkey.md) transaction type, it's a opaque data type.
### func NewChangePubKey
Create a [ChangePubkey](#type-changepubkey)
diff --git a/developer/sdk/go/transactions/README.md b/developer/sdk/go/transactions/README.md
new file mode 100644
index 0000000..a5fd09c
--- /dev/null
+++ b/developer/sdk/go/transactions/README.md
@@ -0,0 +1 @@
+# Transactions
diff --git a/developer/sdk/sdk.md b/developer/sdk/sdk.md
index a787a42..d342f1a 100644
--- a/developer/sdk/sdk.md
+++ b/developer/sdk/sdk.md
@@ -2,3 +2,4 @@
[Go](./go/changelog.md)
[Javascript](./js/changelog.md)
+[Dart](./dart/changelog.md)