Skip to content

Commit 4a8489b

Browse files
authored
add sign func about order/contract for js/dart sdk (#14)
1 parent aeebce0 commit 4a8489b

File tree

4 files changed

+56
-0
lines changed

4 files changed

+56
-0
lines changed

developer/sdk/dart/transactions/5-order-matching.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,22 @@ Order(
4444
)
4545
```
4646

47+
### func sign
48+
49+
```dart
50+
void sign(ZkLinkSigner zkLinkSigner)
51+
```
52+
53+
Sign order with given [ZkLinkSigner](../signer.md#type-zklinksigner)
54+
55+
### func toJson
56+
57+
```dart
58+
String toJson()
59+
```
60+
61+
Get the json str of [Order](#type-order)
62+
4763
## type OrderMatching
4864
[OrderMatching](../../../api-and-sdk/data-types/transaction/order\_matching.md) transaction type.
4965

developer/sdk/dart/transactions/6-contract-matching.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,22 @@ Contract(
4343
)
4444
```
4545

46+
### func sign
47+
48+
```dart
49+
void sign(ZkLinkSigner zkLinkSigner)
50+
```
51+
52+
Sign contract with given [ZkLinkSigner](../signer.md#type-zklinksigner)
53+
54+
### func toJson
55+
56+
```dart
57+
String toJson()
58+
```
59+
60+
Get the json str of [Contract](#type-contract)
61+
4662
## type ContractMatching
4763
[ContractMatching](../../../api-and-sdk/data-types/transaction/contract\_matching.md) transaction type.
4864

developer/sdk/js/transactions/5-order-matching.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,18 @@ The [Order](../../../api-and-sdk/data-types/transaction/order\_matching.md) stru
5353
Order(account_id, sub_account_id, slot_id, nonce, base_token_id, quote_token_id, amount, price, is_sell, maker_fee_rate, taker_fee_rate, has_subsidy)
5454
```
5555

56+
### func sign
57+
58+
```javascript
59+
/**
60+
* @param {ZkLinkSigner} signer
61+
* @returns {any}
62+
*/
63+
sign(signer)
64+
```
65+
66+
Sign order with given [ZkLinkSigner](../signer.md#type-zklinksigner)
67+
5668
## type OrderMatchingBuilder
5769

5870
### constructor

developer/sdk/js/transactions/6-contract-matching.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,18 @@ The [Contract](../../../api-and-sdk/data-types/transaction/contract\_matching.md
6363
newContract(builder)
6464
```
6565

66+
### func sign
67+
68+
```javascript
69+
/**
70+
* @param {ZkLinkSigner} signer
71+
* @returns {any}
72+
*/
73+
sign(signer)
74+
```
75+
76+
Sign contract with given [ZkLinkSigner](../signer.md#type-zklinksigner)
77+
6678
## type ContractMatchingBuilder
6779

6880
### constructor

0 commit comments

Comments
 (0)