@loafmarkets/shared-types 1.0.8 → 1.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +14 -14
- package/package.json +1 -1
- package/proto/trading.proto +7 -3
package/README.md
CHANGED
|
@@ -22,9 +22,6 @@ pnpm install
|
|
|
22
22
|
|
|
23
23
|
# Build once to emit dist/
|
|
24
24
|
pnpm run build
|
|
25
|
-
|
|
26
|
-
# Run type-check only
|
|
27
|
-
pnpm exec tsc --noEmit
|
|
28
25
|
```
|
|
29
26
|
|
|
30
27
|
## Consuming the package
|
|
@@ -54,38 +51,41 @@ node_modules/@loafmarkets/shared-types/proto/trading.proto
|
|
|
54
51
|
```bash
|
|
55
52
|
pnpm run build
|
|
56
53
|
```
|
|
57
|
-
3. **Update version** in `package.json` following semver (e.g., bump patch for backward-compatible additions).
|
|
58
|
-
4. **Document changes** in the commit message or a CHANGELOG entry if you maintain one.
|
|
59
54
|
|
|
60
55
|
## Release process
|
|
56
|
+
Assuming you have not added, committed, pushed, tagged, published anything yet:
|
|
61
57
|
|
|
62
58
|
```bash
|
|
59
|
+
# Login to npm
|
|
60
|
+
pnpm login
|
|
61
|
+
|
|
63
62
|
# Ensure working tree is clean
|
|
64
63
|
git status
|
|
65
64
|
|
|
66
65
|
# Build artifacts
|
|
67
66
|
pnpm run build
|
|
68
67
|
|
|
69
|
-
#
|
|
68
|
+
# Add and commit
|
|
70
69
|
git commit -am "feat: add XYZ contract"
|
|
71
|
-
git push origin main
|
|
72
70
|
|
|
73
|
-
#
|
|
74
|
-
|
|
75
|
-
|
|
71
|
+
# Bump version (automatically creates new tag in package.json and commits)
|
|
72
|
+
pnpm version patch
|
|
73
|
+
|
|
74
|
+
# Push tag
|
|
75
|
+
git push origin main --follow-tags
|
|
76
76
|
|
|
77
77
|
# Publish to registry
|
|
78
|
-
pnpm publish --
|
|
78
|
+
pnpm publish --access public
|
|
79
79
|
```
|
|
80
80
|
|
|
81
81
|
Once published, update each consumer repository:
|
|
82
82
|
|
|
83
83
|
```bash
|
|
84
84
|
pnpm add @loafmarkets/shared-types@<version>
|
|
85
|
+
rm -rf node_modules
|
|
86
|
+
pnpm install
|
|
85
87
|
```
|
|
86
88
|
|
|
87
89
|
## Notes
|
|
88
90
|
|
|
89
|
-
-
|
|
90
|
-
- The `prepare` script ensures `pnpm install` (even from Git) builds `dist/`, so consumers always have compiled output.
|
|
91
|
-
- Use Renovate/Dependabot to automate dependency bump PRs in downstream repos.
|
|
91
|
+
- Use Renovate/Dependabot later to automate dependency bump PRs in downstream repos.
|
package/package.json
CHANGED
package/proto/trading.proto
CHANGED
|
@@ -15,6 +15,7 @@ message Order {
|
|
|
15
15
|
int64 deadline = 9;
|
|
16
16
|
string signature = 10;
|
|
17
17
|
string wallet_address = 11;
|
|
18
|
+
string nonce = 12;
|
|
18
19
|
}
|
|
19
20
|
|
|
20
21
|
enum OrderSide {
|
|
@@ -58,9 +59,11 @@ message TradeExecution {
|
|
|
58
59
|
OrderSide side = 11;
|
|
59
60
|
int64 timestamp = 12;
|
|
60
61
|
int64 deadline = 13;
|
|
61
|
-
string
|
|
62
|
-
string
|
|
63
|
-
string
|
|
62
|
+
string buyer_nonce = 14;
|
|
63
|
+
string seller_nonce = 15;
|
|
64
|
+
string buyer_signature = 16;
|
|
65
|
+
string seller_signature = 17;
|
|
66
|
+
string cpp_signature = 18;
|
|
64
67
|
}
|
|
65
68
|
|
|
66
69
|
// Order book
|
|
@@ -113,6 +116,7 @@ message SubmitOrderRequest {
|
|
|
113
116
|
uint64 order_id = 9;
|
|
114
117
|
string signature = 10;
|
|
115
118
|
string wallet_address = 11;
|
|
119
|
+
string nonce = 12;
|
|
116
120
|
}
|
|
117
121
|
|
|
118
122
|
message SubmitOrderResponse {
|