@xyo-network/xl1-rpc 1.12.0 → 1.12.1
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 +464 -235
- package/dist/neutral/index.mjs.map +1 -1
- package/dist/neutral/transport/MemoryRpcTransport.d.ts +2 -3
- package/dist/neutral/transport/MemoryRpcTransport.d.ts.map +1 -1
- package/dist/neutral/types/schema/AllRpcSchemas.d.ts +2965 -2
- package/dist/neutral/types/schema/AllRpcSchemas.d.ts.map +1 -1
- package/dist/neutral/types/schema/common/Address.d.ts.map +1 -1
- package/dist/neutral/types/schema/common/Chain.d.ts.map +1 -1
- package/dist/neutral/types/schema/common/Sequence.d.ts.map +1 -1
- package/dist/node/index-node.mjs +493 -266
- package/dist/node/index-node.mjs.map +1 -1
- package/dist/node/transport/MemoryRpcTransport.d.ts +2 -3
- package/dist/node/transport/MemoryRpcTransport.d.ts.map +1 -1
- package/dist/node/types/schema/AllRpcSchemas.d.ts +2965 -2
- package/dist/node/types/schema/AllRpcSchemas.d.ts.map +1 -1
- package/dist/node/types/schema/common/Address.d.ts.map +1 -1
- package/dist/node/types/schema/common/Chain.d.ts.map +1 -1
- package/dist/node/types/schema/common/Sequence.d.ts.map +1 -1
- package/package.json +28 -31
- package/src/provider/client/spec/MemoryXyoClient.spec.ts +2 -2
- package/src/provider/gateway/spec/MemoryXyoGateway.spec.ts +2 -2
- package/src/provider/viewer/spec/JsonRpcXyoViewer.spec.ts +3 -2
- package/src/transport/MemoryRpcTransport.ts +3 -3
- package/src/types/schema/AllRpcSchemas.ts +2 -2
- package/src/types/schema/common/Address.ts +2 -5
- package/src/types/schema/common/Chain.ts +2 -5
- package/src/types/schema/common/Sequence.ts +1 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AllRpcSchemas.d.ts","sourceRoot":"","sources":["../../../../src/types/schema/AllRpcSchemas.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file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1 @@
|
|
|
1
|
-
{"version":3,"file":"Address.d.ts","sourceRoot":"","sources":["../../../../../src/types/schema/common/Address.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Address.d.ts","sourceRoot":"","sources":["../../../../../src/types/schema/common/Address.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,eAAO,MAAM,UAAU;;;;YAAqF,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Chain.d.ts","sourceRoot":"","sources":["../../../../../src/types/schema/common/Chain.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Chain.d.ts","sourceRoot":"","sources":["../../../../../src/types/schema/common/Chain.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,2BAA2B,CAAA;AACtD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,eAAO,MAAM,QAAQ,uDAA4F,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Sequence.d.ts","sourceRoot":"","sources":["../../../../../src/types/schema/common/Sequence.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,aAAa,EACb,iBAAiB,EAClB,MAAM,4BAA4B,CAAA;
|
|
1
|
+
{"version":3,"file":"Sequence.d.ts","sourceRoot":"","sources":["../../../../../src/types/schema/common/Sequence.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,aAAa,EACb,iBAAiB,EAClB,MAAM,4BAA4B,CAAA;AAEnC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAGvB,eAAO,MAAM,wBAAwB,aAAuC,CAAA;AAC5E,eAAO,MAAM,0BAA0B,+DAAgG,CAAA;AAGvI,eAAO,MAAM,4BAA4B,aAA2C,CAAA;AACpF,eAAO,MAAM,8BAA8B,mEAA4G,CAAA;AAEvJ,eAAO,MAAM,mBAAmB,iDAAoE,CAAA;AACpG,eAAO,MAAM,qBAAqB,yJAAwE,CAAA"}
|
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.12.
|
|
4
|
+
"version": "1.12.1",
|
|
5
5
|
"description": "XYO Layer One API",
|
|
6
6
|
"homepage": "https://xylabs.com",
|
|
7
7
|
"bugs": {
|
|
@@ -40,8 +40,6 @@
|
|
|
40
40
|
},
|
|
41
41
|
"./package.json": "./package.json"
|
|
42
42
|
},
|
|
43
|
-
"module": "./dist/neutral/index.mjs",
|
|
44
|
-
"types": "./dist/neutral/index.d.ts",
|
|
45
43
|
"files": [
|
|
46
44
|
"dist",
|
|
47
45
|
"src"
|
|
@@ -59,27 +57,26 @@
|
|
|
59
57
|
"dependencies": {
|
|
60
58
|
"@metamask/json-rpc-engine": "~10.0.3",
|
|
61
59
|
"@metamask/utils": "~11.4.2",
|
|
62
|
-
"@xylabs/assert": "~5.0.
|
|
63
|
-
"@xylabs/axios": "~5.0.
|
|
64
|
-
"@xylabs/exists": "~5.0.
|
|
65
|
-
"@xylabs/hex": "~5.0.
|
|
66
|
-
"@xylabs/object": "~5.0.
|
|
67
|
-
"@xylabs/promise": "~5.0.
|
|
68
|
-
"@xylabs/typeof": "~5.0.
|
|
69
|
-
"@xyo-network/account-model": "~5.0.
|
|
70
|
-
"@xyo-network/archivist-memory": "~5.0.
|
|
71
|
-
"@xyo-network/archivist-model": "~5.0.
|
|
72
|
-
"@xyo-network/boundwitness-model": "~5.0.
|
|
73
|
-
"@xyo-network/core-payload-plugins": "~5.0.
|
|
74
|
-
"@xyo-network/hash": "~5.0.
|
|
75
|
-
"@xyo-network/module-model": "~5.0.
|
|
76
|
-
"@xyo-network/node-model": "~5.0.
|
|
77
|
-
"@xyo-network/payload-builder": "~5.0.
|
|
78
|
-
"@xyo-network/payload-model": "~5.0.
|
|
79
|
-
"@xyo-network/
|
|
80
|
-
"@xyo-network/xl1-protocol": "~1.
|
|
81
|
-
"@xyo-network/xl1-
|
|
82
|
-
"@xyo-network/xl1-wrappers": "~1.12.0",
|
|
60
|
+
"@xylabs/assert": "~5.0.8",
|
|
61
|
+
"@xylabs/axios": "~5.0.8",
|
|
62
|
+
"@xylabs/exists": "~5.0.8",
|
|
63
|
+
"@xylabs/hex": "~5.0.8",
|
|
64
|
+
"@xylabs/object": "~5.0.8",
|
|
65
|
+
"@xylabs/promise": "~5.0.8",
|
|
66
|
+
"@xylabs/typeof": "~5.0.8",
|
|
67
|
+
"@xyo-network/account-model": "~5.0.5",
|
|
68
|
+
"@xyo-network/archivist-memory": "~5.0.5",
|
|
69
|
+
"@xyo-network/archivist-model": "~5.0.5",
|
|
70
|
+
"@xyo-network/boundwitness-model": "~5.0.5",
|
|
71
|
+
"@xyo-network/core-payload-plugins": "~5.0.5",
|
|
72
|
+
"@xyo-network/hash": "~5.0.5",
|
|
73
|
+
"@xyo-network/module-model": "~5.0.5",
|
|
74
|
+
"@xyo-network/node-model": "~5.0.5",
|
|
75
|
+
"@xyo-network/payload-builder": "~5.0.5",
|
|
76
|
+
"@xyo-network/payload-model": "~5.0.5",
|
|
77
|
+
"@xyo-network/xl1-protocol": "~1.10.13",
|
|
78
|
+
"@xyo-network/xl1-protocol-sdk": "~1.12.1",
|
|
79
|
+
"@xyo-network/xl1-wrappers": "~1.12.1",
|
|
83
80
|
"axios": "~1.11.0",
|
|
84
81
|
"uuid": "~11.1.0",
|
|
85
82
|
"zod": "~4.0.17"
|
|
@@ -87,13 +84,13 @@
|
|
|
87
84
|
"devDependencies": {
|
|
88
85
|
"@metamask/utils": "~11.4.2",
|
|
89
86
|
"@types/node": "~24.2.1",
|
|
90
|
-
"@xylabs/logger": "~5.0.
|
|
91
|
-
"@xylabs/ts-scripts-yarn3": "~7.1.
|
|
92
|
-
"@xylabs/tsconfig": "~7.1.
|
|
93
|
-
"@xylabs/vitest-extended": "~5.0.
|
|
94
|
-
"@xyo-network/account": "~5.0.
|
|
95
|
-
"@xyo-network/chain-protocol": "~1.12.
|
|
96
|
-
"@xyo-network/wallet": "~5.0.
|
|
87
|
+
"@xylabs/logger": "~5.0.8",
|
|
88
|
+
"@xylabs/ts-scripts-yarn3": "~7.1.2",
|
|
89
|
+
"@xylabs/tsconfig": "~7.1.2",
|
|
90
|
+
"@xylabs/vitest-extended": "~5.0.8",
|
|
91
|
+
"@xyo-network/account": "~5.0.5",
|
|
92
|
+
"@xyo-network/chain-protocol": "~1.12.1",
|
|
93
|
+
"@xyo-network/wallet": "~5.0.5",
|
|
97
94
|
"dotenv": "~17.2.1",
|
|
98
95
|
"typescript": "~5.9.2",
|
|
99
96
|
"vitest": "~3.2.4"
|
|
@@ -24,7 +24,7 @@ type TestPayload = Payload<{
|
|
|
24
24
|
schema: 'network.xyo.test'
|
|
25
25
|
}>
|
|
26
26
|
|
|
27
|
-
describe('Client', () => {
|
|
27
|
+
describe.skip('Client', () => {
|
|
28
28
|
const endpoint = 'http://localhost:8080/rpc'
|
|
29
29
|
// const dataLakeEndpoint = 'http://localhost:8080/chain/archivist'
|
|
30
30
|
let account: AccountInstance
|
|
@@ -70,7 +70,7 @@ describe('Client', () => {
|
|
|
70
70
|
})
|
|
71
71
|
it.only('should allow for submitting transactions', async () => {
|
|
72
72
|
const [hash, tx] = await client.gateways['localhost' as GatewayName]?.addPayloadsToChain?.(onChainPayloads, offChainPayloads) ?? []
|
|
73
|
-
expect(isHash(hash)).
|
|
73
|
+
expect(isHash(hash)).toBeTruthy()
|
|
74
74
|
expect(tx).toBeDefined()
|
|
75
75
|
})
|
|
76
76
|
})
|
|
@@ -10,7 +10,7 @@ import { HttpRpcXyoConnection } from '../../connection/index.ts'
|
|
|
10
10
|
import { MemoryXyoSigner } from '../../signer/index.ts'
|
|
11
11
|
import { MemoryXyoGateway } from '../MemoryXyoGateway.ts'
|
|
12
12
|
|
|
13
|
-
describe('MemoryXyoGateway', () => {
|
|
13
|
+
describe.skip('MemoryXyoGateway', () => {
|
|
14
14
|
const endpoint = 'http://localhost:8080/rpc'
|
|
15
15
|
// const dataLakeEndpoint = 'http://localhost:8080/chain/archivist'
|
|
16
16
|
let account: AccountInstance
|
|
@@ -40,7 +40,7 @@ describe('MemoryXyoGateway', () => {
|
|
|
40
40
|
expect(sut.signer()).toBeDefined()
|
|
41
41
|
})
|
|
42
42
|
})
|
|
43
|
-
describe
|
|
43
|
+
describe('submitTransaction', () => {
|
|
44
44
|
it('should submit the transaction', async () => {
|
|
45
45
|
const elevatedPayloads: AllowedBlockPayload[] = []
|
|
46
46
|
const additionalPayloads: Payload[] = []
|
|
@@ -2,9 +2,10 @@ import '@xylabs/vitest-extended'
|
|
|
2
2
|
|
|
3
3
|
import { assertEx } from '@xylabs/assert'
|
|
4
4
|
import type { Address, Hash } from '@xylabs/hex'
|
|
5
|
-
import {
|
|
5
|
+
import {
|
|
6
|
+
AddressRegEx, asAddress, asHash,
|
|
7
|
+
} from '@xylabs/hex'
|
|
6
8
|
import { PayloadBuilder } from '@xyo-network/payload-builder'
|
|
7
|
-
import { AddressRegEx } from '@xyo-network/payload-wrapper'
|
|
8
9
|
import type { HydratedBlock } from '@xyo-network/xl1-protocol'
|
|
9
10
|
import {
|
|
10
11
|
beforeAll,
|
|
@@ -7,17 +7,17 @@ import type { z, ZodRawShape } from 'zod'
|
|
|
7
7
|
|
|
8
8
|
import type { RpcSchemaMap } from '../types/index.ts'
|
|
9
9
|
import {
|
|
10
|
-
|
|
10
|
+
createRequestSchema, createResponseSchema, jsonrpc,
|
|
11
11
|
} from '../types/index.ts'
|
|
12
12
|
import type { RpcTransport } from './RpcTransport.ts'
|
|
13
13
|
|
|
14
|
-
export class MemoryRpcTransport<T extends RpcSchemaMap
|
|
14
|
+
export class MemoryRpcTransport<T extends RpcSchemaMap> implements RpcTransport<T> {
|
|
15
15
|
protected readonly _rpcEngine: JsonRpcEngine
|
|
16
16
|
protected readonly _schemas: T
|
|
17
17
|
protected readonly requestSchemas = {} as Record<keyof T, z.ZodObject<ZodRawShape>>
|
|
18
18
|
protected readonly responseSchemas = {} as Record<keyof T, z.ZodObject<ZodRawShape>>
|
|
19
19
|
|
|
20
|
-
constructor(rpcEngine: JsonRpcEngine, schemas: T
|
|
20
|
+
constructor(rpcEngine: JsonRpcEngine, schemas: T) {
|
|
21
21
|
this._rpcEngine = rpcEngine
|
|
22
22
|
this._schemas = schemas
|
|
23
23
|
}
|
|
@@ -4,9 +4,9 @@ import { XyoRunnerRpcSchemas } from './XyoRunnerRpcSchemas.ts'
|
|
|
4
4
|
import { XyoSignerRpcSchemas } from './XyoSignerRpcSchemas.ts'
|
|
5
5
|
import { XyoViewerRpcSchemas } from './XyoViewerRpcSchemas.ts'
|
|
6
6
|
|
|
7
|
-
export const AllRpcSchemas
|
|
7
|
+
export const AllRpcSchemas = {
|
|
8
8
|
...XyoProviderRpcSchemas,
|
|
9
9
|
...XyoRunnerRpcSchemas,
|
|
10
10
|
...XyoSignerRpcSchemas,
|
|
11
11
|
...XyoViewerRpcSchemas,
|
|
12
|
-
}
|
|
12
|
+
} satisfies RpcSchemaMap
|
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
import type { Address } from '@xylabs/hex'
|
|
2
|
-
import { toAddress } from '@xylabs/hex'
|
|
3
|
-
import { AddressRegEx } from '@xyo-network/payload-wrapper'
|
|
2
|
+
import { AddressRegEx, toAddress } from '@xylabs/hex'
|
|
4
3
|
import { z } from 'zod'
|
|
5
4
|
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
export const AddressZod = z.string().toLowerCase().regex(CompiledAddressRegEx).transform<Address>(v => toAddress(v))
|
|
5
|
+
export const AddressZod = z.string().toLowerCase().regex(AddressRegEx).transform<Address>(v => toAddress(v))
|
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
import { toAddress } from '@xylabs/hex'
|
|
2
|
-
import { AddressRegEx } from '@xyo-network/payload-wrapper'
|
|
1
|
+
import { AddressRegEx, toAddress } from '@xylabs/hex'
|
|
3
2
|
import type { Chain } from '@xyo-network/xl1-protocol'
|
|
4
3
|
import { z } from 'zod'
|
|
5
4
|
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
export const ChainZod = z.string().toLowerCase().regex(CompiledAddressRegEx).transform<Chain>(v => toAddress(v) as Chain)
|
|
5
|
+
export const ChainZod = z.string().toLowerCase().regex(AddressRegEx).transform<Chain>(v => toAddress(v) as Chain)
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { toHex } from '@xylabs/hex'
|
|
1
|
+
import { HexRegExMinMax, toHex } from '@xylabs/hex'
|
|
2
2
|
import type {
|
|
3
3
|
LocalSequence,
|
|
4
4
|
QualifiedSequence,
|
|
5
5
|
} from '@xyo-network/payload-model'
|
|
6
6
|
import { SequenceConstants } from '@xyo-network/payload-model'
|
|
7
|
-
import { HexRegExMinMax } from '@xyo-network/payload-wrapper'
|
|
8
7
|
import { z } from 'zod'
|
|
9
8
|
|
|
10
9
|
const LocalSequenceRegex = new RegExp(HexRegExMinMax(SequenceConstants.localSequenceBytes, SequenceConstants.localSequenceBytes))
|