@xyo-network/xl1-protocol 1.10.15 → 1.11.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.
@@ -0,0 +1,8 @@
1
+ import type { Address } from '@xylabs/hex';
2
+ import type { Promisable } from '@xylabs/promise';
3
+ export type ForkHistory = Record<number, Address>;
4
+ export interface ForkViewer {
5
+ chainIdAtBlock(blockNumber: number): Promisable<Address>;
6
+ forkHistory(): Promisable<ForkHistory>;
7
+ }
8
+ //# sourceMappingURL=ForkViewer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ForkViewer.d.ts","sourceRoot":"","sources":["../../../src/provider/ForkViewer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AAC1C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAEjD,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;AAEjD,MAAM,WAAW,UAAU;IACzB,cAAc,CAAC,WAAW,EAAE,MAAM,GAAG,UAAU,CAAC,OAAO,CAAC,CAAA;IACxD,WAAW,IAAI,UAAU,CAAC,WAAW,CAAC,CAAA;CACvC"}
@@ -0,0 +1,16 @@
1
+ import type { Address } from '@xylabs/hex';
2
+ import type { Promisable } from '@xylabs/promise';
3
+ export interface StakeScope {
4
+ staked?: Address;
5
+ staker?: Address;
6
+ status?: 'active' | 'pending' | 'withdrawn' | 'all';
7
+ type?: 'all' | 'network' | 'address';
8
+ }
9
+ export interface StakeViewer {
10
+ stakeAmount(scope?: StakeScope): Promisable<[bigint, number]>;
11
+ stakeCount(scope?: StakeScope): Promisable<[number, number]>;
12
+ stakedCount(scope?: StakeScope): Promisable<[number, number]>;
13
+ stakerCount(scope?: StakeScope): Promisable<[number, number]>;
14
+ stakes(scope?: StakeScope): Promisable<[bigint, number]>;
15
+ }
16
+ //# sourceMappingURL=StakeViewer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StakeViewer.d.ts","sourceRoot":"","sources":["../../../src/provider/StakeViewer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AAC1C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAEjD,MAAM,WAAW,UAAU;IACzB,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,MAAM,CAAC,EAAE,QAAQ,GAAG,SAAS,GAAG,WAAW,GAAG,KAAK,CAAA;IACnD,IAAI,CAAC,EAAE,KAAK,GAAG,SAAS,GAAG,SAAS,CAAA;CACrC;AAED,MAAM,WAAW,WAAW;IAC1B,WAAW,CAAC,KAAK,CAAC,EAAE,UAAU,GAAG,UAAU,CAAC,CAAC,MAAM,EAAe,MAAM,CAA6B,CAAC,CAAA;IACtG,UAAU,CAAC,KAAK,CAAC,EAAE,UAAU,GAAG,UAAU,CAAC,CAAC,MAAM,EAAe,MAAM,CAA6B,CAAC,CAAA;IACrG,WAAW,CAAC,KAAK,CAAC,EAAE,UAAU,GAAG,UAAU,CAAC,CAAC,MAAM,EAAe,MAAM,CAA6B,CAAC,CAAA;IACtG,WAAW,CAAC,KAAK,CAAC,EAAE,UAAU,GAAG,UAAU,CAAC,CAAC,MAAM,EAAe,MAAM,CAA6B,CAAC,CAAA;IACtG,MAAM,CAAC,KAAK,CAAC,EAAE,UAAU,GAAG,UAAU,CAAC,CAAC,MAAM,EAAe,MAAM,CAA6B,CAAC,CAAA;CAClG"}
@@ -5,8 +5,8 @@ import type { Chain } from '../model.ts';
5
5
  import type { Transfer } from '../payload/index.ts';
6
6
  import type { SignedHydratedTransaction } from '../transaction/index.ts';
7
7
  export interface XyoViewer {
8
- accountBalance: (address: Address) => Promisable<bigint>;
9
- accountHistory: (address: Address) => Promisable<[Hash, Hash, Transfer][]>;
8
+ accountBalance(address: Address): Promisable<bigint>;
9
+ accountHistory(address: Address): Promisable<[Hash, Hash, Transfer][]>;
10
10
  blockByHash(hash: Hash): Promisable<HydratedBlock | null>;
11
11
  blockByNumber(blockNumber: number): Promisable<HydratedBlock | null>;
12
12
  blocksByHash(hash: Hash, limit?: number): Promisable<HydratedBlock[]>;
@@ -1 +1 @@
1
- {"version":3,"file":"XyoViewer.d.ts","sourceRoot":"","sources":["../../../src/provider/XyoViewer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AAChD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAEjD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AACtD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,aAAa,CAAA;AACxC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAA;AACnD,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,yBAAyB,CAAA;AAExE,MAAM,WAAW,SAAS;IACxB,cAAc,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,UAAU,CAAC,MAAM,CAAC,CAAA;IACxD,cAAc,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,UAAU,CAAC,CAAC,IAAI,EAAc,IAAI,EAAoB,QAAQ,CAAC,EAAE,CAAC,CAAA;IAExG,WAAW,CAAC,IAAI,EAAE,IAAI,GAAG,UAAU,CAAC,aAAa,GAAG,IAAI,CAAC,CAAA;IACzD,aAAa,CAAC,WAAW,EAAE,MAAM,GAAG,UAAU,CAAC,aAAa,GAAG,IAAI,CAAC,CAAA;IACpE,YAAY,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,UAAU,CAAC,aAAa,EAAE,CAAC,CAAA;IAErE,OAAO,IAAI,UAAU,CAAC,KAAK,CAAC,CAAA;IAE5B,YAAY,IAAI,UAAU,CAAC,aAAa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AAa,GAAG,IAAI,CAAC,CAAA;IACpE,YAAY,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,UAAU,CAAC,aAAa,EAAE,CAAC,CAAA;IAErE,OAAO,IAAI,UAAU,CAAC,KAAK,CAAC,CAAA;IAE5B,YAAY,IAAI,UAAU,CAAC,aAAa,CAAC,CAAA;IACzC,gBAAgB,IAAI,UAAU,CAAC,IAAI,CAAC,CAAA;IACpC,kBAAkB,IAAI,UAAU,CAAC,MAAM,CAAC,CAAA;IAExC,8BAA8B,CAAC,SAAS,EAAE,IAAI,EAAE,gBAAgB,EAAE,MAAM,GAAG,UAAU,CAAC,yBAAyB,GAAG,IAAI,CAAC,CAAA;IACvH,gCAAgC,CAAC,WAAW,EAAE,MAAM,EAAE,gBAAgB,EAAE,MAAM,GAAG,UAAU,CAAC,yBAAyB,GAAG,IAAI,CAAC,CAAA;IAC7H,iBAAiB,CAAC,eAAe,EAAE,IAAI,GAAG,UAAU,CAAC,yBAAyB,GAAG,IAAI,CAAC,CAAA;CACvF"}
@@ -1,4 +1,6 @@
1
+ export * from './ForkViewer.ts';
1
2
  export * from './PermissionsProvider.ts';
3
+ export * from './StakeViewer.ts';
2
4
  export * from './TransactionSubmitter.ts';
3
5
  export * from './XyoClient.ts';
4
6
  export * from './XyoConnection.ts';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/provider/index.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAA;AACxC,cAAc,2BAA2B,CAAA;AACzC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,oBAAoB,CAAA;AAClC,cAAc,kBAAkB,CAAA;AAChC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,wBAAwB,CAAA;AACtC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,gBAAgB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/provider/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAA;AAC/B,cAAc,0BAA0B,CAAA;AACxC,cAAc,kBAAkB,CAAA;AAChC,cAAc,2BAA2B,CAAA;AACzC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,oBAAoB,CAAA;AAClC,cAAc,kBAAkB,CAAA;AAChC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,wBAAwB,CAAA;AACtC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,gBAAgB,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-protocol",
4
- "version": "1.10.15",
4
+ "version": "1.11.1",
5
5
  "description": "XYO Layer One Protocol",
6
6
  "homepage": "https://xylabs.com",
7
7
  "bugs": {
@@ -37,35 +37,35 @@
37
37
  ],
38
38
  "dependencies": {
39
39
  "@opentelemetry/api": "~1.9.0",
40
- "@xylabs/base": "~5.0.9",
41
- "@xylabs/events": "~5.0.9",
42
- "@xylabs/hex": "~5.0.9",
43
- "@xylabs/logger": "~5.0.9",
44
- "@xylabs/object": "~5.0.9",
45
- "@xylabs/promise": "~5.0.9",
46
- "@xylabs/typeof": "~5.0.9",
47
- "@xyo-network/archivist-model": "~5.0.6",
48
- "@xyo-network/boundwitness-model": "~5.0.6",
49
- "@xyo-network/payload-model": "~5.0.6",
50
- "@xyo-network/schema-payload-plugin": "~5.0.6",
51
- "@xyo-network/wallet-model": "~5.0.6",
52
- "zod": "~4.0.17"
40
+ "@xylabs/base": "~5.0.11",
41
+ "@xylabs/events": "~5.0.11",
42
+ "@xylabs/hex": "~5.0.11",
43
+ "@xylabs/logger": "~5.0.11",
44
+ "@xylabs/object": "~5.0.11",
45
+ "@xylabs/promise": "~5.0.11",
46
+ "@xylabs/typeof": "~5.0.11",
47
+ "@xyo-network/archivist-model": "~5.1.0",
48
+ "@xyo-network/boundwitness-model": "~5.1.0",
49
+ "@xyo-network/payload-model": "~5.1.0",
50
+ "@xyo-network/schema-payload-plugin": "~5.1.0",
51
+ "@xyo-network/wallet-model": "~5.1.0",
52
+ "zod": "~4.1.3"
53
53
  },
54
54
  "devDependencies": {
55
55
  "@types/node": "~24.3.0",
56
- "@typescript-eslint/types": "~8.39.1",
57
- "@xylabs/creatable": "~5.0.9",
58
- "@xylabs/eslint-config-flat": "~7.1.3",
59
- "@xylabs/ts-scripts-yarn3": "~7.1.3",
60
- "@xylabs/tsconfig": "~7.1.3",
61
- "@xyo-network/account-model": "~5.0.6",
56
+ "@typescript-eslint/types": "~8.41.0",
57
+ "@xylabs/creatable": "~5.0.11",
58
+ "@xylabs/eslint-config-flat": "~7.1.7",
59
+ "@xylabs/ts-scripts-yarn3": "~7.1.7",
60
+ "@xylabs/tsconfig": "~7.1.7",
61
+ "@xyo-network/account-model": "~5.1.0",
62
62
  "dependency-cruiser": "~17.0.1",
63
63
  "dotenv": "~17.2.1",
64
- "eslint": "~9.33.0",
64
+ "eslint": "~9.34.0",
65
65
  "eslint-import-resolver-typescript": "~4.4.4",
66
- "knip": "~5.62.0",
66
+ "knip": "~5.63.0",
67
67
  "typescript": "~5.9.2",
68
- "vite": "~7.1.2",
68
+ "vite": "~7.1.3",
69
69
  "vite-tsconfig-paths": "~5.1.4",
70
70
  "vitest": "~3.2.4"
71
71
  },
@@ -0,0 +1,9 @@
1
+ import type { Address } from '@xylabs/hex'
2
+ import type { Promisable } from '@xylabs/promise'
3
+
4
+ export type ForkHistory = Record<number, Address>
5
+
6
+ export interface ForkViewer {
7
+ chainIdAtBlock(blockNumber: number): Promisable<Address>
8
+ forkHistory(): Promisable<ForkHistory>
9
+ }
@@ -0,0 +1,17 @@
1
+ import type { Address } from '@xylabs/hex'
2
+ import type { Promisable } from '@xylabs/promise'
3
+
4
+ export interface StakeScope {
5
+ staked?: Address
6
+ staker?: Address
7
+ status?: 'active' | 'pending' | 'withdrawn' | 'all'
8
+ type?: 'all' | 'network' | 'address'
9
+ }
10
+
11
+ export interface StakeViewer {
12
+ stakeAmount(scope?: StakeScope): Promisable<[bigint /* amount */, number /* external block number */]>
13
+ stakeCount(scope?: StakeScope): Promisable<[number /* amount */, number /* external block number */]>
14
+ stakedCount(scope?: StakeScope): Promisable<[number /* amount */, number /* external block number */]>
15
+ stakerCount(scope?: StakeScope): Promisable<[number /* amount */, number /* external block number */]>
16
+ stakes(scope?: StakeScope): Promisable<[bigint /* amount */, number /* external block number */]>
17
+ }
@@ -7,8 +7,8 @@ import type { Transfer } from '../payload/index.ts'
7
7
  import type { SignedHydratedTransaction } from '../transaction/index.ts'
8
8
 
9
9
  export interface XyoViewer {
10
- accountBalance: (address: Address) => Promisable<bigint>
11
- accountHistory: (address: Address) => Promisable<[Hash /* block */, Hash /* transaction */, Transfer][]>
10
+ accountBalance(address: Address): Promisable<bigint>
11
+ accountHistory(address: Address): Promisable<[Hash /* block */, Hash /* transaction */, Transfer][]>
12
12
 
13
13
  blockByHash(hash: Hash): Promisable<HydratedBlock | null>
14
14
  blockByNumber(blockNumber: number): Promisable<HydratedBlock | null>
@@ -1,4 +1,6 @@
1
+ export * from './ForkViewer.ts'
1
2
  export * from './PermissionsProvider.ts'
3
+ export * from './StakeViewer.ts'
2
4
  export * from './TransactionSubmitter.ts'
3
5
  export * from './XyoClient.ts'
4
6
  export * from './XyoConnection.ts'