@xyo-network/xl1-gateway 1.27.1 → 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 +94 -6
- package/package.json +60 -59
package/README.md
CHANGED
|
@@ -1,24 +1,112 @@
|
|
|
1
|
+
[![logo][]][logo-link]
|
|
2
|
+
|
|
1
3
|
# @xyo-network/xl1-gateway
|
|
2
4
|
|
|
3
|
-
[![npm
|
|
4
|
-
[![license
|
|
5
|
+
[![npm-badge][]][npm-link]
|
|
6
|
+
[![license-badge][]][license-link]
|
|
7
|
+
|
|
8
|
+
> Fluent gateway builder for the XL1 blockchain — read-only viewers, transacting runners, and signer wrapping.
|
|
9
|
+
|
|
10
|
+
## About
|
|
11
|
+
|
|
12
|
+
This package gives you `GatewayBuilder`, the fluent factory most XL1 applications use to construct a gateway. Calling `.build()` produces an `XyoGateway` (read-only) or — when a signer is attached — an `XyoGatewayRunner` that can submit transactions.
|
|
5
13
|
|
|
6
|
-
|
|
14
|
+
It's bundled into the [`@xyo-network/xl1-sdk`](https://www.npmjs.com/package/@xyo-network/xl1-sdk) aggregate. Install it directly when you only need gateway construction and want to avoid pulling in the full SDK.
|
|
7
15
|
|
|
8
16
|
## Install
|
|
9
17
|
|
|
18
|
+
Using npm:
|
|
19
|
+
|
|
20
|
+
```sh
|
|
21
|
+
npm i --save @xyo-network/xl1-gateway
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
Using yarn:
|
|
25
|
+
|
|
26
|
+
```sh
|
|
27
|
+
yarn add @xyo-network/xl1-gateway
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Using pnpm:
|
|
31
|
+
|
|
32
|
+
```sh
|
|
33
|
+
pnpm add @xyo-network/xl1-gateway
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
Using bun:
|
|
37
|
+
|
|
38
|
+
```sh
|
|
39
|
+
bun add @xyo-network/xl1-gateway
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## Quick Start
|
|
43
|
+
|
|
44
|
+
```ts
|
|
45
|
+
import { GatewayBuilder } from '@xyo-network/xl1-gateway'
|
|
46
|
+
|
|
47
|
+
const gateway = await new GatewayBuilder()
|
|
48
|
+
.rpcUrl('https://beta.api.chain.xyo.network/rpc')
|
|
49
|
+
.build()
|
|
50
|
+
|
|
51
|
+
const blockNumber = await gateway.connection.viewer.block.currentBlockNumber()
|
|
52
|
+
console.log(`Current block: ${blockNumber}`)
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
Attach a signer to promote the result to an `XyoGatewayRunner` capable of submitting transactions.
|
|
56
|
+
|
|
57
|
+
## What's Inside
|
|
58
|
+
|
|
59
|
+
- **`GatewayBuilder`** — fluent builder; configures RPC URL, datalake endpoint, signer, and provider overrides
|
|
60
|
+
- **`XyoSignerWrapper`** — wraps an external signer (e.g. a wallet extension) to satisfy the `XyoSigner` contract
|
|
61
|
+
|
|
62
|
+
## Building Locally
|
|
63
|
+
|
|
10
64
|
```sh
|
|
11
|
-
|
|
65
|
+
xy build @xyo-network/xl1-gateway
|
|
66
|
+
xy test @xyo-network/xl1-gateway
|
|
67
|
+
xy lint @xyo-network/xl1-gateway
|
|
12
68
|
```
|
|
13
69
|
|
|
70
|
+
## Maintainers
|
|
71
|
+
|
|
72
|
+
<table>
|
|
73
|
+
<tr>
|
|
74
|
+
<td align="center" valign="top" width="120">
|
|
75
|
+
<a href="https://github.com/arietrouw">
|
|
76
|
+
<img src="https://github.com/arietrouw.png" width="80" height="80" alt="Arie Trouw" /><br />
|
|
77
|
+
<sub><b>Arie Trouw</b></sub>
|
|
78
|
+
</a>
|
|
79
|
+
<br />
|
|
80
|
+
<a href="https://arietrouw.com">arietrouw.com</a>
|
|
81
|
+
</td>
|
|
82
|
+
<td align="center" valign="top" width="120">
|
|
83
|
+
<a href="https://github.com/jonesmac">
|
|
84
|
+
<img src="https://github.com/jonesmac.png" width="80" height="80" alt="Matt Jones" /><br />
|
|
85
|
+
<sub><b>Matt Jones</b></sub>
|
|
86
|
+
</a>
|
|
87
|
+
</td>
|
|
88
|
+
<td align="center" valign="top" width="120">
|
|
89
|
+
<a href="https://github.com/JoelBCarter">
|
|
90
|
+
<img src="https://github.com/JoelBCarter.png" width="80" height="80" alt="Joel Carter" /><br />
|
|
91
|
+
<sub><b>Joel Carter</b></sub>
|
|
92
|
+
</a>
|
|
93
|
+
</td>
|
|
94
|
+
</tr>
|
|
95
|
+
</table>
|
|
14
96
|
|
|
15
97
|
## License
|
|
16
98
|
|
|
17
|
-
See the [LICENSE](LICENSE) file
|
|
99
|
+
See the [LICENSE](./LICENSE) file (LGPL-3.0-only).
|
|
18
100
|
|
|
101
|
+
## Credits
|
|
19
102
|
|
|
103
|
+
[Made with 🔥 and ❄️ by XYO](https://xyo.network)
|
|
104
|
+
|
|
105
|
+
[logo]: https://cdn.xy.company/img/brand/XYO_full_colored.png
|
|
106
|
+
[logo-link]: https://xyo.network
|
|
20
107
|
|
|
21
108
|
[npm-badge]: https://img.shields.io/npm/v/@xyo-network/xl1-gateway.svg
|
|
22
109
|
[npm-link]: https://www.npmjs.com/package/@xyo-network/xl1-gateway
|
|
110
|
+
|
|
23
111
|
[license-badge]: https://img.shields.io/npm/l/@xyo-network/xl1-gateway.svg
|
|
24
|
-
[license-link]:
|
|
112
|
+
[license-link]: ./LICENSE
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xyo-network/xl1-gateway",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.28.2",
|
|
4
4
|
"description": "XYO Layer One Gateway SDK",
|
|
5
5
|
"homepage": "https://xylabs.com",
|
|
6
6
|
"bugs": {
|
|
@@ -44,9 +44,9 @@
|
|
|
44
44
|
"README.md"
|
|
45
45
|
],
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@xyo-network/xl1-protocol-
|
|
48
|
-
"@xyo-network/xl1-providers": "~1.
|
|
49
|
-
"@xyo-network/xl1-protocol-
|
|
47
|
+
"@xyo-network/xl1-protocol-lib": "~1.28.2",
|
|
48
|
+
"@xyo-network/xl1-providers": "~1.28.2",
|
|
49
|
+
"@xyo-network/xl1-protocol-sdk": "~1.28.2"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
52
|
"@bitauth/libauth": "~3.0.0",
|
|
@@ -61,8 +61,8 @@
|
|
|
61
61
|
"@xylabs/geo": "^5.1.1",
|
|
62
62
|
"@xylabs/sdk-js": "^5.1.1",
|
|
63
63
|
"@xylabs/threads": "~5.1.1",
|
|
64
|
-
"@xylabs/toolchain": "~7.13.
|
|
65
|
-
"@xylabs/tsconfig": "~7.13.
|
|
64
|
+
"@xylabs/toolchain": "~7.13.13",
|
|
65
|
+
"@xylabs/tsconfig": "~7.13.13",
|
|
66
66
|
"@xylabs/vitest-extended": "^5.1.1",
|
|
67
67
|
"@xyo-network/account": "~5.6.1",
|
|
68
68
|
"@xyo-network/account-model": "~5.6.2",
|
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
"@xyo-network/sdk-js": "^5.6.3",
|
|
83
83
|
"@xyo-network/sdk-protocol-js": "~5.6.2",
|
|
84
84
|
"@xyo-network/wallet": "~5.6.1",
|
|
85
|
-
"@xyo-network/wallet-model": "
|
|
85
|
+
"@xyo-network/wallet-model": "^5.6.2",
|
|
86
86
|
"ajv": "^8.20.0",
|
|
87
87
|
"async-mutex": "^0.5.0",
|
|
88
88
|
"bn.js": "^5.2.3",
|
|
@@ -98,7 +98,7 @@
|
|
|
98
98
|
"lru-cache": "^11.3.6",
|
|
99
99
|
"mapbox-gl": "^3.23.1",
|
|
100
100
|
"observable-fns": "~0.6.1",
|
|
101
|
-
"pako": "
|
|
101
|
+
"pako": "^2.1.0",
|
|
102
102
|
"store2": "~2.14.4",
|
|
103
103
|
"typescript": "~5.9.3",
|
|
104
104
|
"uuid": "~14.0.0",
|
|
@@ -106,59 +106,60 @@
|
|
|
106
106
|
"vitest": "~4.1.5",
|
|
107
107
|
"wasm-feature-detect": "~1.8.0",
|
|
108
108
|
"webextension-polyfill": "^0.12.0",
|
|
109
|
-
"zod": "~4.4.3"
|
|
109
|
+
"zod": "~4.4.3",
|
|
110
|
+
"@xyo-network/xl1-network-model": "~1.28.2"
|
|
110
111
|
},
|
|
111
112
|
"peerDependencies": {
|
|
112
|
-
"@bitauth/libauth": "
|
|
113
|
-
"@metamask/json-rpc-engine": "
|
|
114
|
-
"@metamask/providers": "
|
|
115
|
-
"@metamask/utils": "
|
|
116
|
-
"@opentelemetry/api": "
|
|
117
|
-
"@opentelemetry/sdk-trace-base": "
|
|
118
|
-
"@scure/base": "
|
|
119
|
-
"@scure/bip39": "
|
|
120
|
-
"@xylabs/fetch": "
|
|
121
|
-
"@xylabs/geo": "
|
|
122
|
-
"@xylabs/sdk-js": "
|
|
123
|
-
"@xylabs/threads": "
|
|
124
|
-
"@xyo-network/account": "
|
|
125
|
-
"@xyo-network/account-model": "
|
|
126
|
-
"@xyo-network/api": "
|
|
127
|
-
"@xyo-network/api-models": "
|
|
128
|
-
"@xyo-network/boundwitness-builder": "
|
|
129
|
-
"@xyo-network/boundwitness-model": "
|
|
130
|
-
"@xyo-network/boundwitness-wrapper": "
|
|
131
|
-
"@xyo-network/config-payload-plugin": "
|
|
132
|
-
"@xyo-network/huri": "
|
|
133
|
-
"@xyo-network/manifest-model": "
|
|
134
|
-
"@xyo-network/payload-builder": "
|
|
135
|
-
"@xyo-network/payload-model": "
|
|
136
|
-
"@xyo-network/payload-plugin": "
|
|
137
|
-
"@xyo-network/payload-wrapper": "
|
|
138
|
-
"@xyo-network/query-payload-plugin": "
|
|
139
|
-
"@xyo-network/sdk-js": "
|
|
140
|
-
"@xyo-network/sdk-protocol-js": "
|
|
141
|
-
"@xyo-network/wallet": "
|
|
142
|
-
"@xyo-network/wallet-model": "
|
|
143
|
-
"ajv": "
|
|
144
|
-
"async-mutex": "
|
|
145
|
-
"bn.js": "
|
|
146
|
-
"buffer": "
|
|
147
|
-
"chalk": "
|
|
148
|
-
"cosmiconfig": "
|
|
149
|
-
"debug": "
|
|
150
|
-
"ethers": "
|
|
151
|
-
"hash-wasm": "
|
|
152
|
-
"idb": "
|
|
153
|
-
"lru-cache": "
|
|
154
|
-
"mapbox-gl": "
|
|
155
|
-
"observable-fns": "
|
|
156
|
-
"pako": "
|
|
157
|
-
"store2": "
|
|
158
|
-
"uuid": "
|
|
159
|
-
"wasm-feature-detect": "
|
|
160
|
-
"webextension-polyfill": "
|
|
161
|
-
"zod": "
|
|
113
|
+
"@bitauth/libauth": "~3.0",
|
|
114
|
+
"@metamask/json-rpc-engine": "^10.3",
|
|
115
|
+
"@metamask/providers": "^22.1",
|
|
116
|
+
"@metamask/utils": "^11.11",
|
|
117
|
+
"@opentelemetry/api": "^1.9",
|
|
118
|
+
"@opentelemetry/sdk-trace-base": "^2.7",
|
|
119
|
+
"@scure/base": "~2.2",
|
|
120
|
+
"@scure/bip39": "~2.2",
|
|
121
|
+
"@xylabs/fetch": "^5.1",
|
|
122
|
+
"@xylabs/geo": "^5.1",
|
|
123
|
+
"@xylabs/sdk-js": "^5.1",
|
|
124
|
+
"@xylabs/threads": "~5.1",
|
|
125
|
+
"@xyo-network/account": "~5.6",
|
|
126
|
+
"@xyo-network/account-model": "~5.6",
|
|
127
|
+
"@xyo-network/api": "~5.6",
|
|
128
|
+
"@xyo-network/api-models": "~5.6",
|
|
129
|
+
"@xyo-network/boundwitness-builder": "~5.6",
|
|
130
|
+
"@xyo-network/boundwitness-model": "~5.6",
|
|
131
|
+
"@xyo-network/boundwitness-wrapper": "~5.6",
|
|
132
|
+
"@xyo-network/config-payload-plugin": "~5.6",
|
|
133
|
+
"@xyo-network/huri": "~5.6",
|
|
134
|
+
"@xyo-network/manifest-model": "~5.6",
|
|
135
|
+
"@xyo-network/payload-builder": "~5.6",
|
|
136
|
+
"@xyo-network/payload-model": "~5.6",
|
|
137
|
+
"@xyo-network/payload-plugin": "~5.6",
|
|
138
|
+
"@xyo-network/payload-wrapper": "~5.6",
|
|
139
|
+
"@xyo-network/query-payload-plugin": "~5.6",
|
|
140
|
+
"@xyo-network/sdk-js": "^5.6",
|
|
141
|
+
"@xyo-network/sdk-protocol-js": "~5.6",
|
|
142
|
+
"@xyo-network/wallet": "~5.6",
|
|
143
|
+
"@xyo-network/wallet-model": "^5.6",
|
|
144
|
+
"ajv": "^8.20",
|
|
145
|
+
"async-mutex": "^0.5",
|
|
146
|
+
"bn.js": "^5.2",
|
|
147
|
+
"buffer": "^6.0",
|
|
148
|
+
"chalk": "^5.6",
|
|
149
|
+
"cosmiconfig": "^9.0",
|
|
150
|
+
"debug": "~4.4",
|
|
151
|
+
"ethers": "^6.16",
|
|
152
|
+
"hash-wasm": "~4.12",
|
|
153
|
+
"idb": "^8.0",
|
|
154
|
+
"lru-cache": "^11.3",
|
|
155
|
+
"mapbox-gl": "^3.23",
|
|
156
|
+
"observable-fns": "~0.6",
|
|
157
|
+
"pako": "^2.1",
|
|
158
|
+
"store2": "~2.14",
|
|
159
|
+
"uuid": "~14.0",
|
|
160
|
+
"wasm-feature-detect": "~1.8",
|
|
161
|
+
"webextension-polyfill": "^0.12",
|
|
162
|
+
"zod": "~4.4"
|
|
162
163
|
},
|
|
163
164
|
"engines": {
|
|
164
165
|
"node": ">=22"
|