@xyo-network/xl1-protocol-sdk 1.28.0 → 1.28.2
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 +90 -6
- package/package.json +54 -54
package/README.md
CHANGED
|
@@ -1,24 +1,108 @@
|
|
|
1
|
+
[![logo][]][logo-link]
|
|
2
|
+
|
|
1
3
|
# @xyo-network/xl1-protocol-sdk
|
|
2
4
|
|
|
3
|
-
[![npm
|
|
4
|
-
[![license
|
|
5
|
+
[![npm-badge][]][npm-link]
|
|
6
|
+
[![license-badge][]][license-link]
|
|
7
|
+
|
|
8
|
+
> The XL1 SDK implementation layer — concrete viewers, runners, services, wallets, and config.
|
|
9
|
+
|
|
10
|
+
## About
|
|
11
|
+
|
|
12
|
+
This is the SDK implementation tier of XL1. Where [`@xyo-network/xl1-protocol-lib`](https://www.npmjs.com/package/@xyo-network/xl1-protocol-lib) defines abstract interfaces, this package supplies the concrete implementations: ~26 `Simple*` viewers/runners, services, transaction builders, signers, HD wallet derivation, EIP-712 signing, configuration loaders, LRU caching, and more.
|
|
5
13
|
|
|
6
|
-
|
|
14
|
+
Most consumers reach this package via the [`@xyo-network/xl1-sdk`](https://www.npmjs.com/package/@xyo-network/xl1-sdk) aggregate, which re-exports it. Install directly when you only need the SDK pieces and want to leave gateway/RPC/wrapper concerns out of your dependency graph.
|
|
7
15
|
|
|
8
16
|
## Install
|
|
9
17
|
|
|
18
|
+
Using npm:
|
|
19
|
+
|
|
20
|
+
```sh
|
|
21
|
+
npm i --save @xyo-network/xl1-protocol-sdk
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
Using yarn:
|
|
25
|
+
|
|
26
|
+
```sh
|
|
27
|
+
yarn add @xyo-network/xl1-protocol-sdk
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Using pnpm:
|
|
31
|
+
|
|
32
|
+
```sh
|
|
33
|
+
pnpm add @xyo-network/xl1-protocol-sdk
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
Using bun:
|
|
37
|
+
|
|
38
|
+
```sh
|
|
39
|
+
bun add @xyo-network/xl1-protocol-sdk
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## Subpath Exports
|
|
43
|
+
|
|
44
|
+
- `@xyo-network/xl1-protocol-sdk` — main SDK barrel
|
|
45
|
+
- `@xyo-network/xl1-protocol-sdk/get` — cosmiconfig integration (`getFileConfig`) with heavier dependencies, kept separate so light consumers don't pull it in
|
|
46
|
+
- `@xyo-network/xl1-protocol-sdk/test` — shared test utilities
|
|
47
|
+
|
|
48
|
+
## What's Inside
|
|
49
|
+
|
|
50
|
+
- **Simple\*** — ~26 high-level implementations (`SimpleAccountBalanceViewer`, `SimpleBlockRunner`, `SimpleMempoolViewer`, `SimpleTransactionViewer`, etc.) composing lower-level pieces
|
|
51
|
+
- **Services** — `ChainService`, `ChainHeadService`, `StakeIntentService`, `Election`, `BlockProducerService`, and 6 more
|
|
52
|
+
- **Wallets** — HD wallet derivation from mnemonic; `generateXyoBaseWalletFromPhrase`, derivation paths
|
|
53
|
+
- **Signing** — EIP-712 typed data signing with `EIP712Data` / `EIP712Signature` payload types
|
|
54
|
+
- **Configuration** — Zod-based `ConfigZod`, `resolveConfig`, datalake/storage sub-configs; cosmiconfig discovery via the `/get` subpath
|
|
55
|
+
- **Drivers** — LRU cache (`LruCacheMap`, default max 5000) and in-memory map for instance caching
|
|
56
|
+
- **Primitives** — low-level operations across blocks, chain time, datalakes, payloads, rewards, stakes, steps, transactions, and uncle scoring
|
|
57
|
+
|
|
58
|
+
## Building Locally
|
|
59
|
+
|
|
10
60
|
```sh
|
|
11
|
-
|
|
61
|
+
xy build @xyo-network/xl1-protocol-sdk
|
|
62
|
+
xy test @xyo-network/xl1-protocol-sdk
|
|
63
|
+
xy lint @xyo-network/xl1-protocol-sdk
|
|
12
64
|
```
|
|
13
65
|
|
|
66
|
+
## Maintainers
|
|
67
|
+
|
|
68
|
+
<table>
|
|
69
|
+
<tr>
|
|
70
|
+
<td align="center" valign="top" width="120">
|
|
71
|
+
<a href="https://github.com/arietrouw">
|
|
72
|
+
<img src="https://github.com/arietrouw.png" width="80" height="80" alt="Arie Trouw" /><br />
|
|
73
|
+
<sub><b>Arie Trouw</b></sub>
|
|
74
|
+
</a>
|
|
75
|
+
<br />
|
|
76
|
+
<a href="https://arietrouw.com">arietrouw.com</a>
|
|
77
|
+
</td>
|
|
78
|
+
<td align="center" valign="top" width="120">
|
|
79
|
+
<a href="https://github.com/jonesmac">
|
|
80
|
+
<img src="https://github.com/jonesmac.png" width="80" height="80" alt="Matt Jones" /><br />
|
|
81
|
+
<sub><b>Matt Jones</b></sub>
|
|
82
|
+
</a>
|
|
83
|
+
</td>
|
|
84
|
+
<td align="center" valign="top" width="120">
|
|
85
|
+
<a href="https://github.com/JoelBCarter">
|
|
86
|
+
<img src="https://github.com/JoelBCarter.png" width="80" height="80" alt="Joel Carter" /><br />
|
|
87
|
+
<sub><b>Joel Carter</b></sub>
|
|
88
|
+
</a>
|
|
89
|
+
</td>
|
|
90
|
+
</tr>
|
|
91
|
+
</table>
|
|
14
92
|
|
|
15
93
|
## License
|
|
16
94
|
|
|
17
|
-
See the [LICENSE](LICENSE) file
|
|
95
|
+
See the [LICENSE](./LICENSE) file (LGPL-3.0-only).
|
|
96
|
+
|
|
97
|
+
## Credits
|
|
18
98
|
|
|
99
|
+
[Made with 🔥 and ❄️ by XYO](https://xyo.network)
|
|
19
100
|
|
|
101
|
+
[logo]: https://cdn.xy.company/img/brand/XYO_full_colored.png
|
|
102
|
+
[logo-link]: https://xyo.network
|
|
20
103
|
|
|
21
104
|
[npm-badge]: https://img.shields.io/npm/v/@xyo-network/xl1-protocol-sdk.svg
|
|
22
105
|
[npm-link]: https://www.npmjs.com/package/@xyo-network/xl1-protocol-sdk
|
|
106
|
+
|
|
23
107
|
[license-badge]: https://img.shields.io/npm/l/@xyo-network/xl1-protocol-sdk.svg
|
|
24
|
-
[license-link]:
|
|
108
|
+
[license-link]: ./LICENSE
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xyo-network/xl1-protocol-sdk",
|
|
3
|
-
"version": "1.28.
|
|
3
|
+
"version": "1.28.2",
|
|
4
4
|
"description": "XYO Layer One SDK Protocol",
|
|
5
5
|
"homepage": "https://xylabs.com",
|
|
6
6
|
"bugs": {
|
|
@@ -42,9 +42,9 @@
|
|
|
42
42
|
"README.md"
|
|
43
43
|
],
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"@xyo-network/xl1-protocol-lib": "~1.28.
|
|
46
|
-
"@xyo-network/xl1-
|
|
47
|
-
"@xyo-network/xl1-
|
|
45
|
+
"@xyo-network/xl1-protocol-lib": "~1.28.2",
|
|
46
|
+
"@xyo-network/xl1-schema": "~1.28.2",
|
|
47
|
+
"@xyo-network/xl1-protocol-model": "~1.28.2"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
50
|
"@bitauth/libauth": "~3.0.0",
|
|
@@ -57,8 +57,8 @@
|
|
|
57
57
|
"@xylabs/geo": "^5.1.1",
|
|
58
58
|
"@xylabs/sdk-js": "^5.1.1",
|
|
59
59
|
"@xylabs/threads": "~5.1.1",
|
|
60
|
-
"@xylabs/toolchain": "~7.13.
|
|
61
|
-
"@xylabs/tsconfig": "~7.13.
|
|
60
|
+
"@xylabs/toolchain": "~7.13.13",
|
|
61
|
+
"@xylabs/tsconfig": "~7.13.13",
|
|
62
62
|
"@xylabs/vitest-extended": "^5.1.1",
|
|
63
63
|
"@xyo-network/account": "~5.6.1",
|
|
64
64
|
"@xyo-network/account-model": "~5.6.2",
|
|
@@ -102,56 +102,56 @@
|
|
|
102
102
|
"wasm-feature-detect": "~1.8.0",
|
|
103
103
|
"webextension-polyfill": "^0.12.0",
|
|
104
104
|
"zod": "~4.4.3",
|
|
105
|
-
"@xyo-network/xl1-network-model": "~1.28.
|
|
105
|
+
"@xyo-network/xl1-network-model": "~1.28.2"
|
|
106
106
|
},
|
|
107
107
|
"peerDependencies": {
|
|
108
|
-
"@bitauth/libauth": "
|
|
109
|
-
"@metamask/providers": "
|
|
110
|
-
"@opentelemetry/api": "
|
|
111
|
-
"@opentelemetry/sdk-trace-base": "
|
|
112
|
-
"@scure/base": "
|
|
113
|
-
"@scure/bip39": "
|
|
114
|
-
"@xylabs/fetch": "
|
|
115
|
-
"@xylabs/geo": "
|
|
116
|
-
"@xylabs/sdk-js": "
|
|
117
|
-
"@xylabs/threads": "
|
|
118
|
-
"@xyo-network/account": "
|
|
119
|
-
"@xyo-network/account-model": "
|
|
120
|
-
"@xyo-network/api": "
|
|
121
|
-
"@xyo-network/api-models": "
|
|
122
|
-
"@xyo-network/boundwitness-builder": "
|
|
123
|
-
"@xyo-network/boundwitness-model": "
|
|
124
|
-
"@xyo-network/boundwitness-wrapper": "
|
|
125
|
-
"@xyo-network/config-payload-plugin": "
|
|
126
|
-
"@xyo-network/huri": "
|
|
127
|
-
"@xyo-network/manifest-model": "
|
|
128
|
-
"@xyo-network/payload-builder": "
|
|
129
|
-
"@xyo-network/payload-model": "
|
|
130
|
-
"@xyo-network/payload-plugin": "
|
|
131
|
-
"@xyo-network/payload-wrapper": "
|
|
132
|
-
"@xyo-network/query-payload-plugin": "
|
|
133
|
-
"@xyo-network/sdk-js": "
|
|
134
|
-
"@xyo-network/sdk-protocol-js": "
|
|
135
|
-
"@xyo-network/wallet": "
|
|
136
|
-
"@xyo-network/wallet-model": "
|
|
137
|
-
"ajv": "
|
|
138
|
-
"async-mutex": "
|
|
139
|
-
"bn.js": "
|
|
140
|
-
"buffer": "
|
|
141
|
-
"chalk": "
|
|
142
|
-
"cosmiconfig": "
|
|
143
|
-
"debug": "
|
|
144
|
-
"ethers": "
|
|
145
|
-
"hash-wasm": "
|
|
146
|
-
"idb": "
|
|
147
|
-
"lru-cache": "
|
|
148
|
-
"mapbox-gl": "
|
|
149
|
-
"observable-fns": "
|
|
150
|
-
"pako": "
|
|
151
|
-
"store2": "
|
|
152
|
-
"wasm-feature-detect": "
|
|
153
|
-
"webextension-polyfill": "
|
|
154
|
-
"zod": "
|
|
108
|
+
"@bitauth/libauth": "~3.0",
|
|
109
|
+
"@metamask/providers": "^22.1",
|
|
110
|
+
"@opentelemetry/api": "^1.9",
|
|
111
|
+
"@opentelemetry/sdk-trace-base": "^2.7",
|
|
112
|
+
"@scure/base": "~2.2",
|
|
113
|
+
"@scure/bip39": "~2.2",
|
|
114
|
+
"@xylabs/fetch": "^5.1",
|
|
115
|
+
"@xylabs/geo": "^5.1",
|
|
116
|
+
"@xylabs/sdk-js": "^5.1",
|
|
117
|
+
"@xylabs/threads": "~5.1",
|
|
118
|
+
"@xyo-network/account": "~5.6",
|
|
119
|
+
"@xyo-network/account-model": "~5.6",
|
|
120
|
+
"@xyo-network/api": "~5.6",
|
|
121
|
+
"@xyo-network/api-models": "~5.6",
|
|
122
|
+
"@xyo-network/boundwitness-builder": "~5.6",
|
|
123
|
+
"@xyo-network/boundwitness-model": "~5.6",
|
|
124
|
+
"@xyo-network/boundwitness-wrapper": "~5.6",
|
|
125
|
+
"@xyo-network/config-payload-plugin": "~5.6",
|
|
126
|
+
"@xyo-network/huri": "~5.6",
|
|
127
|
+
"@xyo-network/manifest-model": "~5.6",
|
|
128
|
+
"@xyo-network/payload-builder": "~5.6",
|
|
129
|
+
"@xyo-network/payload-model": "~5.6",
|
|
130
|
+
"@xyo-network/payload-plugin": "~5.6",
|
|
131
|
+
"@xyo-network/payload-wrapper": "~5.6",
|
|
132
|
+
"@xyo-network/query-payload-plugin": "~5.6",
|
|
133
|
+
"@xyo-network/sdk-js": "^5.6",
|
|
134
|
+
"@xyo-network/sdk-protocol-js": "~5.6",
|
|
135
|
+
"@xyo-network/wallet": "~5.6",
|
|
136
|
+
"@xyo-network/wallet-model": "^5.6",
|
|
137
|
+
"ajv": "^8.20",
|
|
138
|
+
"async-mutex": "^0.5",
|
|
139
|
+
"bn.js": "^5.2",
|
|
140
|
+
"buffer": "^6.0",
|
|
141
|
+
"chalk": "^5.6",
|
|
142
|
+
"cosmiconfig": "^9.0",
|
|
143
|
+
"debug": "~4.4",
|
|
144
|
+
"ethers": "^6.16",
|
|
145
|
+
"hash-wasm": "~4.12",
|
|
146
|
+
"idb": "^8.0",
|
|
147
|
+
"lru-cache": "^11.3",
|
|
148
|
+
"mapbox-gl": "^3.23",
|
|
149
|
+
"observable-fns": "~0.6",
|
|
150
|
+
"pako": "^2.1",
|
|
151
|
+
"store2": "~2.14",
|
|
152
|
+
"wasm-feature-detect": "~1.8",
|
|
153
|
+
"webextension-polyfill": "^0.12",
|
|
154
|
+
"zod": "~4.4"
|
|
155
155
|
},
|
|
156
156
|
"engines": {
|
|
157
157
|
"node": ">=22.3"
|