@xyo-network/xl1-rpc 1.16.17 → 1.16.19
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/dist/neutral/index.mjs +2 -2
- package/dist/neutral/index.mjs.map +1 -1
- package/dist/node/index-node.mjs +2 -2
- package/dist/node/index-node.mjs.map +1 -1
- package/package.json +8 -8
- package/src/transport/HttpRpcTransport.ts +2 -2
- package/src/types/ErrorCodes.ts +1 -1
- package/src/types/schema/common/TransactionBoundWitness.ts +1 -1
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "http://json.schemastore.org/package.json",
|
|
3
3
|
"name": "@xyo-network/xl1-rpc",
|
|
4
|
-
"version": "1.16.
|
|
4
|
+
"version": "1.16.19",
|
|
5
5
|
"description": "XYO Layer One API",
|
|
6
6
|
"homepage": "https://xylabs.com",
|
|
7
7
|
"bugs": {
|
|
@@ -59,8 +59,8 @@
|
|
|
59
59
|
},
|
|
60
60
|
"dependencies": {
|
|
61
61
|
"@metamask/json-rpc-engine": "~10.1.1",
|
|
62
|
-
"@xylabs/axios": "~5.0.
|
|
63
|
-
"@xylabs/sdk-js": "~5.0.
|
|
62
|
+
"@xylabs/axios": "~5.0.37",
|
|
63
|
+
"@xylabs/sdk-js": "~5.0.37",
|
|
64
64
|
"@xyo-network/archivist-model": "~5.1.23",
|
|
65
65
|
"@xyo-network/boundwitness-model": "~5.1.23",
|
|
66
66
|
"@xyo-network/module-model": "~5.1.23",
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
"@xyo-network/payload-builder": "~5.1.23",
|
|
69
69
|
"@xyo-network/payload-model": "~5.1.23",
|
|
70
70
|
"@xyo-network/xl1-protocol": "~1.13.11",
|
|
71
|
-
"@xyo-network/xl1-protocol-sdk": "~1.16.
|
|
71
|
+
"@xyo-network/xl1-protocol-sdk": "~1.16.19",
|
|
72
72
|
"axios": "~1.13.2",
|
|
73
73
|
"uuid": "~13.0.0",
|
|
74
74
|
"zod": "~4.1.12"
|
|
@@ -76,18 +76,18 @@
|
|
|
76
76
|
"devDependencies": {
|
|
77
77
|
"@metamask/utils": "~11.8.1",
|
|
78
78
|
"@types/node": "~24.10.1",
|
|
79
|
-
"@xylabs/sdk-js": "~5.0.
|
|
79
|
+
"@xylabs/sdk-js": "~5.0.37",
|
|
80
80
|
"@xylabs/ts-scripts-yarn3": "~7.2.8",
|
|
81
81
|
"@xylabs/tsconfig": "~7.2.8",
|
|
82
|
-
"@xylabs/vitest-extended": "~5.0.
|
|
82
|
+
"@xylabs/vitest-extended": "~5.0.37",
|
|
83
83
|
"@xyo-network/account": "~5.1.23",
|
|
84
84
|
"@xyo-network/account-model": "~5.1.23",
|
|
85
|
-
"@xyo-network/chain-protocol": "~1.16.
|
|
85
|
+
"@xyo-network/chain-protocol": "~1.16.19",
|
|
86
86
|
"@xyo-network/wallet": "~5.1.23",
|
|
87
87
|
"dotenv": "~17.2.3",
|
|
88
88
|
"eslint": "^9.39.1",
|
|
89
89
|
"typescript": "~5.9.3",
|
|
90
|
-
"vitest": "~4.0.
|
|
90
|
+
"vitest": "~4.0.10"
|
|
91
91
|
},
|
|
92
92
|
"packageManager": "yarn@4.6.0",
|
|
93
93
|
"engines": {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type {
|
|
2
2
|
JsonRpcFailure, JsonRpcRequest, JsonRpcSuccess,
|
|
3
3
|
} from '@metamask/utils'
|
|
4
|
-
import {
|
|
4
|
+
import { axiosJsonConfig } from '@xylabs/axios'
|
|
5
5
|
import { isError, isUndefinedOrNull } from '@xylabs/sdk-js'
|
|
6
6
|
import { Axios, isAxiosError } from 'axios'
|
|
7
7
|
import { v4 } from 'uuid'
|
|
@@ -50,7 +50,7 @@ export class HttpRpcTransport<T extends RpcSchemaMap = RpcSchemaMap> implements
|
|
|
50
50
|
body.params = schemas[method].params.to.parse(params) as JsonRpcRequest
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
-
const res = await new Axios(
|
|
53
|
+
const res = await new Axios(axiosJsonConfig()).post(url, body)
|
|
54
54
|
|
|
55
55
|
const json = res.data
|
|
56
56
|
if (isUndefinedOrNull(json) || (json as Partial<JsonRpcFailure>).error) {
|
package/src/types/ErrorCodes.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//
|
|
1
|
+
// See https://www.npmjs.com/package/@metamask/rpc-errors for
|
|
2
2
|
// better error codes & protocol specific error codes. Migrate to that
|
|
3
3
|
// if fuller support is needed.
|
|
4
4
|
export const JsonRpcErrorCodes: Record<string, { code: number; message: string }> = {
|
|
@@ -15,7 +15,7 @@ export const WithTransactionFeesZod = z.object({ fees: TransactionFeesHexZod })
|
|
|
15
15
|
|
|
16
16
|
const TransactionBoundWitnessFields = z.object({ chain: ChainZod, from: ChainZod })
|
|
17
17
|
|
|
18
|
-
//
|
|
18
|
+
// It seems like zod marked all of merge as deprecated even though just multiple merges should have been deprecated
|
|
19
19
|
|
|
20
20
|
export const TransactionBoundWitnessZod = UnsignedBoundWitnessZod
|
|
21
21
|
// eslint-disable-next-line sonarjs/deprecation
|