@xyo-network/xl1-rpc 2.2.1 → 3.0.0
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 +94 -121
- package/dist/neutral/index.mjs.map +2 -2
- package/dist/neutral/networkTier3Descriptors.d.ts +2 -16
- package/dist/neutral/networkTier3Descriptors.d.ts.map +1 -1
- package/dist/node/index-node.mjs +94 -121
- package/dist/node/index-node.mjs.map +2 -2
- package/dist/node/networkTier3Descriptors.d.ts +2 -16
- package/dist/node/networkTier3Descriptors.d.ts.map +1 -1
- package/package.json +5 -5
|
@@ -2,22 +2,8 @@ import type { ProviderDescriptor, ResolutionContext } from '@xyo-network/xl1-pro
|
|
|
2
2
|
/**
|
|
3
3
|
* Tier-3 descriptors for `JsonRpc*` providers shipped by `@xyo-network/xl1-rpc`.
|
|
4
4
|
*
|
|
5
|
-
* Each descriptor declares `
|
|
6
|
-
*
|
|
7
|
-
* backing-store access. They are eligible to be resolved in any locator whose
|
|
8
|
-
* `availableBackings` includes `{ network, read }`.
|
|
9
|
-
*
|
|
10
|
-
* Surface assignments follow the litmus test
|
|
11
|
-
* "point queries → node, cross-key/aggregate → indexed":
|
|
12
|
-
* - Node-surface viewers (point queries on canonical state).
|
|
13
|
-
* - Indexed-surface viewers (cross-key reverse indexes / aggregations).
|
|
14
|
-
*
|
|
15
|
-
* Importable in two ways:
|
|
16
|
-
* - The full pool: `networkTier3Descriptors`.
|
|
17
|
-
* - Filtered by surface: `nodeNetworkDescriptors` / `indexedNetworkDescriptors`.
|
|
18
|
-
*
|
|
19
|
-
* Consumers (xyo-chain orchestration, browser/dApp gateways) merge this pool
|
|
20
|
-
* with their tier-1/local descriptors and hand the union to `resolveProviders`.
|
|
5
|
+
* Each descriptor declares `connectionTypes: ['rpc']` and is eligible in locators
|
|
6
|
+
* whose `availableConnectionTypes` includes `rpc`.
|
|
21
7
|
*/
|
|
22
8
|
export declare const nodeNetworkDescriptors: readonly ProviderDescriptor<ResolutionContext>[];
|
|
23
9
|
export declare const indexedNetworkDescriptors: readonly ProviderDescriptor<ResolutionContext>[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"networkTier3Descriptors.d.ts","sourceRoot":"","sources":["../../src/networkTier3Descriptors.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"networkTier3Descriptors.d.ts","sourceRoot":"","sources":["../../src/networkTier3Descriptors.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAEV,kBAAkB,EAClB,iBAAiB,EAElB,MAAM,+BAA+B,CAAA;AAqCtC;;;;;GAKG;AACH,eAAO,MAAM,sBAAsB,EAAE,SAAS,kBAAkB,CAAC,iBAAiB,CAAC,EA+DlF,CAAA;AAED,eAAO,MAAM,yBAAyB,EAAE,SAAS,kBAAkB,CAAC,iBAAiB,CAAC,EAsBrF,CAAA;AAED,sEAAsE;AACtE,eAAO,MAAM,uBAAuB,EAAE,SAAS,kBAAkB,CAAC,iBAAiB,CAAC,EAGnF,CAAA"}
|
package/dist/node/index-node.mjs
CHANGED
|
@@ -2994,130 +2994,103 @@ JsonRpcXyoViewer = __decorateClass([
|
|
|
2994
2994
|
|
|
2995
2995
|
// src/networkTier3Descriptors.ts
|
|
2996
2996
|
var passes = () => true;
|
|
2997
|
-
|
|
2998
|
-
{
|
|
2999
|
-
id
|
|
3000
|
-
satisfies: [
|
|
3001
|
-
|
|
3002
|
-
|
|
3003
|
-
surface
|
|
3004
|
-
preconditions: passes,
|
|
3005
|
-
build: () => JsonRpcBlockViewer.factory(JsonRpcBlockViewer.dependencies, {})
|
|
3006
|
-
},
|
|
3007
|
-
{
|
|
3008
|
-
id: "JsonRpcMempoolViewer",
|
|
3009
|
-
satisfies: [JsonRpcMempoolViewer.defaultMoniker],
|
|
3010
|
-
tier: 3,
|
|
3011
|
-
backings: [{ backing: "network", mode: "read" }],
|
|
3012
|
-
surface: "node",
|
|
3013
|
-
preconditions: passes,
|
|
3014
|
-
build: () => JsonRpcMempoolViewer.factory(JsonRpcMempoolViewer.dependencies, {})
|
|
3015
|
-
},
|
|
3016
|
-
{
|
|
3017
|
-
id: "JsonRpcMempoolRunner",
|
|
3018
|
-
satisfies: [JsonRpcMempoolRunner.defaultMoniker],
|
|
3019
|
-
tier: 3,
|
|
3020
|
-
backings: [{ backing: "network", mode: "read" }],
|
|
3021
|
-
surface: "node",
|
|
3022
|
-
preconditions: passes,
|
|
3023
|
-
build: () => JsonRpcMempoolRunner.factory(JsonRpcMempoolRunner.dependencies, {})
|
|
3024
|
-
},
|
|
3025
|
-
{
|
|
3026
|
-
id: "JsonRpcFinalizationViewer",
|
|
3027
|
-
satisfies: [JsonRpcFinalizationViewer.defaultMoniker],
|
|
3028
|
-
tier: 3,
|
|
3029
|
-
backings: [{ backing: "network", mode: "read" }],
|
|
3030
|
-
surface: "node",
|
|
3031
|
-
preconditions: passes,
|
|
3032
|
-
build: () => JsonRpcFinalizationViewer.factory(JsonRpcFinalizationViewer.dependencies, {})
|
|
3033
|
-
},
|
|
3034
|
-
{
|
|
3035
|
-
id: "JsonRpcAccountBalanceViewer",
|
|
3036
|
-
satisfies: [JsonRpcAccountBalanceViewer.defaultMoniker],
|
|
3037
|
-
tier: 3,
|
|
3038
|
-
backings: [{ backing: "network", mode: "read" }],
|
|
3039
|
-
// AccountBalanceViewer is a point query (`f(address) → balance`) — node-surface,
|
|
3040
|
-
// even though indexer-backed today on the producer side.
|
|
3041
|
-
surface: "node",
|
|
3042
|
-
preconditions: passes,
|
|
3043
|
-
build: () => JsonRpcAccountBalanceViewer.factory(JsonRpcAccountBalanceViewer.dependencies, {})
|
|
3044
|
-
},
|
|
3045
|
-
{
|
|
3046
|
-
id: "JsonRpcTransactionViewer",
|
|
3047
|
-
satisfies: [JsonRpcTransactionViewer.defaultMoniker],
|
|
3048
|
-
tier: 3,
|
|
3049
|
-
backings: [{ backing: "network", mode: "read" }],
|
|
3050
|
-
surface: "node",
|
|
3051
|
-
preconditions: passes,
|
|
3052
|
-
build: () => JsonRpcTransactionViewer.factory(JsonRpcTransactionViewer.dependencies, {})
|
|
3053
|
-
},
|
|
3054
|
-
{
|
|
3055
|
-
id: "JsonRpcTimeSyncViewer",
|
|
3056
|
-
satisfies: [JsonRpcTimeSyncViewer.defaultMoniker],
|
|
3057
|
-
tier: 3,
|
|
3058
|
-
backings: [{ backing: "network", mode: "read" }],
|
|
3059
|
-
surface: "node",
|
|
3060
|
-
preconditions: passes,
|
|
3061
|
-
build: () => JsonRpcTimeSyncViewer.factory(JsonRpcTimeSyncViewer.dependencies, {})
|
|
3062
|
-
},
|
|
3063
|
-
{
|
|
3064
|
-
id: "JsonRpcXyoViewer",
|
|
3065
|
-
satisfies: [JsonRpcXyoViewer.defaultMoniker],
|
|
3066
|
-
tier: 3,
|
|
3067
|
-
backings: [{ backing: "network", mode: "read" }],
|
|
3068
|
-
surface: "node",
|
|
3069
|
-
preconditions: passes,
|
|
3070
|
-
build: () => JsonRpcXyoViewer.factory(JsonRpcXyoViewer.dependencies, {})
|
|
3071
|
-
},
|
|
3072
|
-
{
|
|
3073
|
-
id: "JsonRpcXyoRunner",
|
|
3074
|
-
satisfies: [JsonRpcXyoRunner.defaultMoniker],
|
|
3075
|
-
tier: 3,
|
|
3076
|
-
backings: [{ backing: "network", mode: "read" }],
|
|
3077
|
-
surface: "node",
|
|
3078
|
-
preconditions: passes,
|
|
3079
|
-
build: () => JsonRpcXyoRunner.factory(JsonRpcXyoRunner.dependencies, {})
|
|
3080
|
-
},
|
|
3081
|
-
{
|
|
3082
|
-
// StakeTotalsViewer.activeByStaked(addr) is a point query keyed by address — node-surface.
|
|
3083
|
-
id: "JsonRpcStakeTotalsViewer",
|
|
3084
|
-
satisfies: [JsonRpcStakeTotalsViewer.defaultMoniker],
|
|
3085
|
-
tier: 3,
|
|
3086
|
-
backings: [{ backing: "network", mode: "read" }],
|
|
3087
|
-
surface: "node",
|
|
2997
|
+
function rpcDescriptor(id, moniker, surface, build, planDependencies = []) {
|
|
2998
|
+
return {
|
|
2999
|
+
id,
|
|
3000
|
+
satisfies: [moniker],
|
|
3001
|
+
connectionTypes: ["rpc"],
|
|
3002
|
+
dependencies: planDependencies,
|
|
3003
|
+
surface,
|
|
3088
3004
|
preconditions: passes,
|
|
3089
|
-
build
|
|
3090
|
-
}
|
|
3005
|
+
build
|
|
3006
|
+
};
|
|
3007
|
+
}
|
|
3008
|
+
var nodeNetworkDescriptors = [
|
|
3009
|
+
rpcDescriptor(
|
|
3010
|
+
"JsonRpcBlockViewer",
|
|
3011
|
+
JsonRpcBlockViewer.defaultMoniker,
|
|
3012
|
+
"node",
|
|
3013
|
+
() => JsonRpcBlockViewer.factory(JsonRpcBlockViewer.dependencies, {})
|
|
3014
|
+
),
|
|
3015
|
+
rpcDescriptor(
|
|
3016
|
+
"JsonRpcMempoolViewer",
|
|
3017
|
+
JsonRpcMempoolViewer.defaultMoniker,
|
|
3018
|
+
"node",
|
|
3019
|
+
() => JsonRpcMempoolViewer.factory(JsonRpcMempoolViewer.dependencies, {})
|
|
3020
|
+
),
|
|
3021
|
+
rpcDescriptor(
|
|
3022
|
+
"JsonRpcMempoolRunner",
|
|
3023
|
+
JsonRpcMempoolRunner.defaultMoniker,
|
|
3024
|
+
"node",
|
|
3025
|
+
() => JsonRpcMempoolRunner.factory(JsonRpcMempoolRunner.dependencies, {})
|
|
3026
|
+
),
|
|
3027
|
+
rpcDescriptor(
|
|
3028
|
+
"JsonRpcFinalizationViewer",
|
|
3029
|
+
JsonRpcFinalizationViewer.defaultMoniker,
|
|
3030
|
+
"node",
|
|
3031
|
+
() => JsonRpcFinalizationViewer.factory(JsonRpcFinalizationViewer.dependencies, {})
|
|
3032
|
+
),
|
|
3033
|
+
rpcDescriptor(
|
|
3034
|
+
"JsonRpcAccountBalanceViewer",
|
|
3035
|
+
JsonRpcAccountBalanceViewer.defaultMoniker,
|
|
3036
|
+
"node",
|
|
3037
|
+
() => JsonRpcAccountBalanceViewer.factory(JsonRpcAccountBalanceViewer.dependencies, {})
|
|
3038
|
+
),
|
|
3039
|
+
rpcDescriptor(
|
|
3040
|
+
"JsonRpcTransactionViewer",
|
|
3041
|
+
JsonRpcTransactionViewer.defaultMoniker,
|
|
3042
|
+
"node",
|
|
3043
|
+
() => JsonRpcTransactionViewer.factory(JsonRpcTransactionViewer.dependencies, {}),
|
|
3044
|
+
[...JsonRpcTransactionViewer.dependencies]
|
|
3045
|
+
),
|
|
3046
|
+
rpcDescriptor(
|
|
3047
|
+
"JsonRpcTimeSyncViewer",
|
|
3048
|
+
JsonRpcTimeSyncViewer.defaultMoniker,
|
|
3049
|
+
"node",
|
|
3050
|
+
() => JsonRpcTimeSyncViewer.factory(JsonRpcTimeSyncViewer.dependencies, {})
|
|
3051
|
+
),
|
|
3052
|
+
rpcDescriptor(
|
|
3053
|
+
"JsonRpcXyoViewer",
|
|
3054
|
+
JsonRpcXyoViewer.defaultMoniker,
|
|
3055
|
+
"node",
|
|
3056
|
+
() => JsonRpcXyoViewer.factory(JsonRpcXyoViewer.dependencies, {})
|
|
3057
|
+
),
|
|
3058
|
+
rpcDescriptor(
|
|
3059
|
+
"JsonRpcXyoRunner",
|
|
3060
|
+
JsonRpcXyoRunner.defaultMoniker,
|
|
3061
|
+
"node",
|
|
3062
|
+
() => JsonRpcXyoRunner.factory(JsonRpcXyoRunner.dependencies, {}),
|
|
3063
|
+
[...JsonRpcXyoRunner.dependencies]
|
|
3064
|
+
),
|
|
3065
|
+
rpcDescriptor(
|
|
3066
|
+
"JsonRpcStakeTotalsViewer",
|
|
3067
|
+
JsonRpcStakeTotalsViewer.defaultMoniker,
|
|
3068
|
+
"node",
|
|
3069
|
+
() => JsonRpcStakeTotalsViewer.factory(JsonRpcStakeTotalsViewer.dependencies, {})
|
|
3070
|
+
)
|
|
3091
3071
|
];
|
|
3092
3072
|
var indexedNetworkDescriptors = [
|
|
3093
|
-
|
|
3094
|
-
|
|
3095
|
-
|
|
3096
|
-
|
|
3097
|
-
|
|
3098
|
-
|
|
3099
|
-
|
|
3100
|
-
|
|
3101
|
-
|
|
3102
|
-
|
|
3103
|
-
|
|
3104
|
-
|
|
3105
|
-
|
|
3106
|
-
|
|
3107
|
-
|
|
3108
|
-
|
|
3109
|
-
|
|
3110
|
-
|
|
3111
|
-
|
|
3112
|
-
|
|
3113
|
-
|
|
3114
|
-
satisfies: [JsonRpcNetworkStakeStepRewardsViewer.defaultMoniker],
|
|
3115
|
-
tier: 3,
|
|
3116
|
-
backings: [{ backing: "network", mode: "read" }],
|
|
3117
|
-
surface: "indexed",
|
|
3118
|
-
preconditions: passes,
|
|
3119
|
-
build: () => JsonRpcNetworkStakeStepRewardsViewer.factory(JsonRpcNetworkStakeStepRewardsViewer.dependencies, {})
|
|
3120
|
-
}
|
|
3073
|
+
rpcDescriptor(
|
|
3074
|
+
"JsonRpcStakeViewer",
|
|
3075
|
+
JsonRpcStakeViewer.defaultMoniker,
|
|
3076
|
+
"indexed",
|
|
3077
|
+
() => JsonRpcStakeViewer.factory(JsonRpcStakeViewer.dependencies, {})
|
|
3078
|
+
),
|
|
3079
|
+
rpcDescriptor(
|
|
3080
|
+
"JsonRpcNetworkStakeViewer",
|
|
3081
|
+
JsonRpcNetworkStakeViewer.defaultMoniker,
|
|
3082
|
+
"indexed",
|
|
3083
|
+
() => JsonRpcNetworkStakeViewer.factory(JsonRpcNetworkStakeViewer.dependencies, {})
|
|
3084
|
+
),
|
|
3085
|
+
rpcDescriptor(
|
|
3086
|
+
"JsonRpcNetworkStakeStepRewardsViewer",
|
|
3087
|
+
JsonRpcNetworkStakeStepRewardsViewer.defaultMoniker,
|
|
3088
|
+
"indexed",
|
|
3089
|
+
() => JsonRpcNetworkStakeStepRewardsViewer.factory(
|
|
3090
|
+
JsonRpcNetworkStakeStepRewardsViewer.dependencies,
|
|
3091
|
+
{}
|
|
3092
|
+
)
|
|
3093
|
+
)
|
|
3121
3094
|
];
|
|
3122
3095
|
var networkTier3Descriptors = [
|
|
3123
3096
|
...nodeNetworkDescriptors,
|