From efbcc68816d62c15ae2251bd6941ff47461f89c7 Mon Sep 17 00:00:00 2001 From: semi Date: Wed, 24 Apr 2024 16:41:41 +0800 Subject: [PATCH 1/6] add pages of dart sdk --- SUMMARY.md | 13 +++ developer/sdk/dart/changelog.md | 5 + developer/sdk/dart/signer.md | 56 ++++++++++ .../sdk/dart/transactions/1-change-pubkey.md | 78 +++++++++++++ .../dart/transactions/10-update-global-var.md | 104 ++++++++++++++++++ developer/sdk/dart/transactions/2-withdraw.md | 44 ++++++++ developer/sdk/dart/transactions/3-transfer.md | 40 +++++++ .../sdk/dart/transactions/4-forced-exit.md | 34 ++++++ .../sdk/dart/transactions/5-order-matching.md | 79 +++++++++++++ .../dart/transactions/6-contract-matching.md | 76 +++++++++++++ .../dart/transactions/7-auto-deleveraging.md | 60 ++++++++++ developer/sdk/dart/transactions/8-funding.md | 29 +++++ .../sdk/dart/transactions/9-liquidation.md | 60 ++++++++++ developer/sdk/sdk.md | 1 + 14 files changed, 679 insertions(+) create mode 100644 developer/sdk/dart/changelog.md create mode 100644 developer/sdk/dart/signer.md create mode 100644 developer/sdk/dart/transactions/1-change-pubkey.md create mode 100644 developer/sdk/dart/transactions/10-update-global-var.md create mode 100644 developer/sdk/dart/transactions/2-withdraw.md create mode 100644 developer/sdk/dart/transactions/3-transfer.md create mode 100644 developer/sdk/dart/transactions/4-forced-exit.md create mode 100644 developer/sdk/dart/transactions/5-order-matching.md create mode 100644 developer/sdk/dart/transactions/6-contract-matching.md create mode 100644 developer/sdk/dart/transactions/7-auto-deleveraging.md create mode 100644 developer/sdk/dart/transactions/8-funding.md create mode 100644 developer/sdk/dart/transactions/9-liquidation.md diff --git a/SUMMARY.md b/SUMMARY.md index 8088bf9..48c363f 100644 --- a/SUMMARY.md +++ b/SUMMARY.md @@ -74,6 +74,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/changelog/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/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..a0dd509 --- /dev/null +++ b/developer/sdk/dart/signer.md @@ -0,0 +1,56 @@ +## 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. + +## 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 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..45a496d --- /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..1ef9ddf --- /dev/null +++ b/developer/sdk/dart/transactions/10-update-global-var.md @@ -0,0 +1,104 @@ +## 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) diff --git a/developer/sdk/dart/transactions/2-withdraw.md b/developer/sdk/dart/transactions/2-withdraw.md new file mode 100644 index 0000000..81837c1 --- /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? dataHash, + 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..af7da70 --- /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..e0b90f5 --- /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..526b9eb --- /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..86d58b8 --- /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..896d790 --- /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..70044fb --- /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..ca3fdbb --- /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/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) From f6b80033a2d05d29fbe5506e37054f302ac99a4e Mon Sep 17 00:00:00 2001 From: semi Date: Wed, 24 Apr 2024 17:24:59 +0800 Subject: [PATCH 2/6] add signer example --- developer/sdk/dart/signer.md | 176 ++++++++++++++++++ .../dart/transactions/10-update-global-var.md | 11 ++ 2 files changed, 187 insertions(+) diff --git a/developer/sdk/dart/signer.md b/developer/sdk/dart/signer.md index a0dd509..13dd8bf 100644 --- a/developer/sdk/dart/signer.md +++ b/developer/sdk/dart/signer.md @@ -2,6 +2,7 @@ `ZkLinkSigner` includes the L1 private key(Eth or Starknet) and L3 private key. ### func ethSig + ```dart ZkLinkSigner ethSig(String sig) ``` @@ -11,6 +12,7 @@ Creat a `ZkLinkSigner` from eth personal sign. * sig: hex string of eth personal sign(with or without `0x` prefix) ### func starknetSig + ```dart ZkLinkSigner starknetSig(String sig) ``` @@ -20,12 +22,14 @@ Creat a `ZkLinkSigner` from starknet signature. * 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() ``` @@ -35,6 +39,7 @@ Return hex string of public key hash. L1 private key. ### func ethSigner + ```dart Signer ethSigner(String ethPrivateKey) ``` @@ -44,6 +49,7 @@ Create a Ethereum private key signer. * ethPrivateKey: hex string of private key(with or without `0x` prefix) ### func starknetSigner + ```dart Signer starknetSigner(String ethPrivateKey, String starknetChainId, String starknetAddr) ``` @@ -54,3 +60,173 @@ Create a Starknet signer. * 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/10-update-global-var.md b/developer/sdk/dart/transactions/10-update-global-var.md index 1ef9ddf..71e2cca 100644 --- a/developer/sdk/dart/transactions/10-update-global-var.md +++ b/developer/sdk/dart/transactions/10-update-global-var.md @@ -102,3 +102,14 @@ 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 From a34faefd244b9accbd92a563ac26011a41b38e88 Mon Sep 17 00:00:00 2001 From: semi Date: Mon, 29 Apr 2024 19:20:36 +0800 Subject: [PATCH 3/6] all branches share same dart api --- developer/sdk/dart/transactions/10-update-global-var.md | 2 +- developer/sdk/dart/transactions/2-withdraw.md | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/developer/sdk/dart/transactions/10-update-global-var.md b/developer/sdk/dart/transactions/10-update-global-var.md index 71e2cca..a1881b5 100644 --- a/developer/sdk/dart/transactions/10-update-global-var.md +++ b/developer/sdk/dart/transactions/10-update-global-var.md @@ -54,7 +54,7 @@ feeAccount(int accountId) ```dart marginInfo( int marginId, - String symbol, + String? symbol, int tokenId, int ratio, ) diff --git a/developer/sdk/dart/transactions/2-withdraw.md b/developer/sdk/dart/transactions/2-withdraw.md index 81837c1..4c26aef 100644 --- a/developer/sdk/dart/transactions/2-withdraw.md +++ b/developer/sdk/dart/transactions/2-withdraw.md @@ -3,14 +3,14 @@ ```dart Withdraw( - int accountId, + int accountId, int subAccountId, int toChainId, String toAddress, int l2SourceToken, int l1TargetToken, String amount, - String? dataHash, + String? callData, String fee, int nonce, bool withdrawToL1, From a2bb27db4996bb7f3cb1f04308b0ec0660de3447 Mon Sep 17 00:00:00 2001 From: semi Date: Tue, 30 Apr 2024 17:04:11 +0800 Subject: [PATCH 4/6] fix markdown links --- SUMMARY.md | 1 + .../api-and-sdk/data-types/basic-types.md | 6 +- .../api-and-sdk/data-types/state-update.md | 58 +++++++++---------- .../data-types/transaction/liquidation.md | 4 +- .../data-types/transaction/transfer.md | 4 +- .../transaction/update_global_var.md | 12 ++-- .../api-and-sdk/json-rpc/json-rpc-api.md | 2 +- developer/api-and-sdk/kafka/README.md | 18 +++--- .../encode/auto_deleveraging.md | 4 +- .../encode/chaneg_pubkey.md | 2 +- .../encode/contract_matching.md | 2 +- .../encode/funding.md | 2 +- .../encode/liquidation.md | 2 +- .../encode/order_matching.md | 4 +- .../encode/transfer.md | 4 +- .../encode/withdraw.md | 4 +- developer/api-and-sdk/websocket/README.md | 4 +- developer/quick-start/README.md | 2 +- developer/sdk/dart/signer.md | 7 +++ .../sdk/dart/transactions/1-change-pubkey.md | 6 +- .../dart/transactions/10-update-global-var.md | 6 +- developer/sdk/dart/transactions/2-withdraw.md | 2 +- developer/sdk/dart/transactions/3-transfer.md | 2 +- .../sdk/dart/transactions/4-forced-exit.md | 4 +- .../sdk/dart/transactions/5-order-matching.md | 6 +- .../dart/transactions/6-contract-matching.md | 6 +- .../dart/transactions/7-auto-deleveraging.md | 4 +- developer/sdk/dart/transactions/8-funding.md | 2 +- .../sdk/dart/transactions/9-liquidation.md | 2 +- developer/sdk/go/signer.md | 4 +- .../sdk/go/transactions/1-change-pubkey.md | 10 ++-- 31 files changed, 102 insertions(+), 94 deletions(-) diff --git a/SUMMARY.md b/SUMMARY.md index 48c363f..80dd0f8 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/private\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) 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/signer.md b/developer/sdk/dart/signer.md index 13dd8bf..05a54b8 100644 --- a/developer/sdk/dart/signer.md +++ b/developer/sdk/dart/signer.md @@ -35,6 +35,13 @@ 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. diff --git a/developer/sdk/dart/transactions/1-change-pubkey.md b/developer/sdk/dart/transactions/1-change-pubkey.md index 45a496d..816d4b5 100644 --- a/developer/sdk/dart/transactions/1-change-pubkey.md +++ b/developer/sdk/dart/transactions/1-change-pubkey.md @@ -1,5 +1,5 @@ ## type ChangePubKey -[ChangePubkey](../../../api-and-sdk/data-types/transaction/change_pubkey.md) transaction type. +[ChangePubkey](../../../api-and-sdk/data-types/transaction/change\_pubkey.md) transaction type. ```dart ChangePubkey( @@ -37,7 +37,7 @@ Sign transaction with given `ZkLinkSigner` String toJson() ``` -Get the json str of [ChangePubKey](#type-ChangePubkey) +Get the json str of [ChangePubKey](#type-changepubkey) ### func toEip712RequestPayload @@ -45,7 +45,7 @@ Get the json str of [ChangePubKey](#type-ChangePubkey) String toEip712RequestPayload(int chainId, String address) ``` -Get the EIP-712 structured data of [ChangePubKey](#type-ChangePubkey) +Get the EIP-712 structured data of [ChangePubKey](#type-changepubkey) ### func setEthAuthData diff --git a/developer/sdk/dart/transactions/10-update-global-var.md b/developer/sdk/dart/transactions/10-update-global-var.md index a1881b5..7c077ec 100644 --- a/developer/sdk/dart/transactions/10-update-global-var.md +++ b/developer/sdk/dart/transactions/10-update-global-var.md @@ -35,7 +35,7 @@ FundingInfo( ``` ## type Parameter -The [Parameter](../../../api-and-sdk/data-types/transaction/update_global_var.md) struct of [UpdateGlobalVar](#type-UpdateGlobalVar). +The [Parameter](../../../api-and-sdk/data-types/transaction/update\_global\_var.md) struct of [UpdateGlobalVar](#type-updateglobalvar). ### func insuranceFundAccount @@ -84,7 +84,7 @@ fundingInfos(List infos) ``` ## type UpdateGlobalVar -[UpdateGlobalVar](../../../api-and-sdk/data-types/transaction/update_global_var.md) transaction type. +[UpdateGlobalVar](../../../api-and-sdk/data-types/transaction/update\_global\_var.md) transaction type. ```dart UpdateGlobalVar( @@ -101,7 +101,7 @@ UpdateGlobalVar( String toJson() ``` -Get the json str of [UpdateGlobalVar](#type-UpdateGlobalVar) +Get the json str of [UpdateGlobalVar](#type-updateglobalvar) ### Example ```dart diff --git a/developer/sdk/dart/transactions/2-withdraw.md b/developer/sdk/dart/transactions/2-withdraw.md index 4c26aef..180ec9f 100644 --- a/developer/sdk/dart/transactions/2-withdraw.md +++ b/developer/sdk/dart/transactions/2-withdraw.md @@ -41,4 +41,4 @@ Sign transaction with given `ZkLinkSigner` String toJson() ``` -Get the json str of [Withdraw](#type-Withdraw) +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 index af7da70..d59fa15 100644 --- a/developer/sdk/dart/transactions/3-transfer.md +++ b/developer/sdk/dart/transactions/3-transfer.md @@ -37,4 +37,4 @@ Sign transaction with given `ZkLinkSigner` String toJson() ``` -Get the json str of [Transfer](#type-Transfer) +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 index e0b90f5..9855e02 100644 --- a/developer/sdk/dart/transactions/4-forced-exit.md +++ b/developer/sdk/dart/transactions/4-forced-exit.md @@ -1,5 +1,5 @@ ## type ForcedExit -[ForcedExit](../../../api-and-sdk/data-types/transaction/forced_exit.md) transaction type. +[ForcedExit](../../../api-and-sdk/data-types/transaction/forced\_exit.md) transaction type. ```dart ForcedExit( @@ -31,4 +31,4 @@ Sign transaction with given `ZkLinkSigner` String toJson() ``` -Get the json str of [ForcedExit](#type-ForcedExit) +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 index 526b9eb..0752f2b 100644 --- a/developer/sdk/dart/transactions/5-order-matching.md +++ b/developer/sdk/dart/transactions/5-order-matching.md @@ -25,7 +25,7 @@ SpotPriceInfo( * 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. +The [Order](../../../api-and-sdk/data-types/transaction/order\_matching.md) struct of taker and maker. ```dart Order( @@ -45,7 +45,7 @@ Order( ``` ## type OrderMatching -[OrderMatching](../../../api-and-sdk/data-types/transaction/order_matching.md) transaction type. +[OrderMatching](../../../api-and-sdk/data-types/transaction/order\_matching.md) transaction type. ```dart OrderMatching( @@ -76,4 +76,4 @@ Sign transaction with given `ZkLinkSigner` String toJson() ``` -Get the json str of [OrderMatching](#type-OrderMatching) +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 index 86d58b8..e51d09c 100644 --- a/developer/sdk/dart/transactions/6-contract-matching.md +++ b/developer/sdk/dart/transactions/6-contract-matching.md @@ -25,7 +25,7 @@ SpotPriceInfo( * 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. +The [Contract](../../../api-and-sdk/data-types/transaction/contract\_matching.md) struct of taker and maker in perpetual contract. ```dart Contract( @@ -44,7 +44,7 @@ Contract( ``` ## type ContractMatching -[ContractMatching](../../../api-and-sdk/data-types/transaction/contract_matching.md) transaction type. +[ContractMatching](../../../api-and-sdk/data-types/transaction/contract\_matching.md) transaction type. ```dart ContractMatching( @@ -73,4 +73,4 @@ Sign transaction with given `ZkLinkSigner` String toJson() ``` -Get the json str of [ContractMatching](#type-ContractMatching) +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 index 896d790..182076c 100644 --- a/developer/sdk/dart/transactions/7-auto-deleveraging.md +++ b/developer/sdk/dart/transactions/7-auto-deleveraging.md @@ -25,7 +25,7 @@ SpotPriceInfo( * price: The spot price of the token. ## type AutoDeleveraging -[AutoDeleveraging](../../../api-and-sdk/data-types/transaction/auto_deleveraging.md) transaction type. +[AutoDeleveraging](../../../api-and-sdk/data-types/transaction/auto\_deleveraging.md) transaction type. ```dart AutoDeleveraging( @@ -57,4 +57,4 @@ Sign transaction with given `ZkLinkSigner` String toJson() ``` -Get the json str of [AutoDeleveraging](#type-AutoDeleveraging) +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 index 70044fb..3f93ad3 100644 --- a/developer/sdk/dart/transactions/8-funding.md +++ b/developer/sdk/dart/transactions/8-funding.md @@ -26,4 +26,4 @@ Sign transaction with given `ZkLinkSigner` String toJson() ``` -Get the json str of [Funding](#type-Funding) +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 index ca3fdbb..916b794 100644 --- a/developer/sdk/dart/transactions/9-liquidation.md +++ b/developer/sdk/dart/transactions/9-liquidation.md @@ -57,4 +57,4 @@ Sign transaction with given `ZkLinkSigner` String toJson() ``` -Get the json str of [Liquidation](#type-Liquidation) +Get the json str of [Liquidation](#type-liquidation) 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) From ab710b8cddd26ee2857e56aee290708ed2d34d1b Mon Sep 17 00:00:00 2001 From: semi Date: Tue, 30 Apr 2024 17:13:17 +0800 Subject: [PATCH 5/6] fix markdown links --- SUMMARY.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SUMMARY.md b/SUMMARY.md index 80dd0f8..1a6b674 100644 --- a/SUMMARY.md +++ b/SUMMARY.md @@ -48,7 +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/private\algorithm.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) From 9b5c9ba93f404f22b25bed4630a43c2c431d57d0 Mon Sep 17 00:00:00 2001 From: semi Date: Tue, 30 Apr 2024 18:45:05 +0800 Subject: [PATCH 6/6] change sdk path of gitbook SUMMARY --- SUMMARY.md | 4 ++-- developer/sdk/{changelog => dart}/transactions/README.md | 1 - developer/sdk/go/transactions/README.md | 1 + 3 files changed, 3 insertions(+), 3 deletions(-) rename developer/sdk/{changelog => dart}/transactions/README.md (93%) create mode 100644 developer/sdk/go/transactions/README.md diff --git a/SUMMARY.md b/SUMMARY.md index 1a6b674..21fe174 100644 --- a/SUMMARY.md +++ b/SUMMARY.md @@ -63,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) @@ -77,7 +77,7 @@ * [Js](developer/sdk/js/changelog.md) * [Dart](developer/sdk/dart/changelog.md) * [Signature](developer/sdk/dart/signer.md) - * [Transactions](developer/sdk/changelog/transactions/README.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) 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/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