@sentio/runtime 4.0.0-rc.7 → 4.0.0-rc.9
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/lib/{chunk-Q4CE6IMV.js → chunk-7JGO6QCN.js} +12 -5
- package/lib/{chunk-Q4CE6IMV.js.map → chunk-7JGO6QCN.js.map} +1 -1
- package/lib/index.d.ts +18 -16
- package/lib/index.js +32 -21288
- package/lib/index.js.map +1 -1
- package/lib/processor-runner.js +1 -1
- package/package.json +1 -1
- package/src/chain-config.ts +6 -1
- package/src/endpoints.ts +22 -4
- package/src/index.ts +0 -1
- package/src/multicall.ts +0 -1605
- package/src/provider.ts +0 -195
package/lib/index.d.ts
CHANGED
|
@@ -7,9 +7,6 @@ import { MessageInitShape } from '@bufbuild/protobuf';
|
|
|
7
7
|
import { ServiceImpl, HandlerContext } from '@connectrpc/connect';
|
|
8
8
|
import { Subject } from 'rxjs';
|
|
9
9
|
import { Command } from '@commander-js/extra-typings';
|
|
10
|
-
import { JsonRpcProvider, Network } from 'ethers';
|
|
11
|
-
import PQueue from 'p-queue';
|
|
12
|
-
import { EthChainId } from '@sentio/chain';
|
|
13
10
|
import { AsyncLocalStorage } from 'node:async_hooks';
|
|
14
11
|
import { Counter, Attributes, Gauge, Histogram } from '@opentelemetry/api';
|
|
15
12
|
|
|
@@ -55,19 +52,34 @@ declare function parseSemver(version: string): Semver;
|
|
|
55
52
|
declare function compareSemver(a: Semver, b: Semver): number;
|
|
56
53
|
declare function locatePackageJson(pkgId: string): any;
|
|
57
54
|
|
|
55
|
+
/**
|
|
56
|
+
* Resolved RPC endpoint for a chain: the base URL plus optional gRPC metadata
|
|
57
|
+
* (key-value pairs) attached to every request, e.g. the `authority` routing key
|
|
58
|
+
* for the Sui gRPC client talking to the Sentio rpc-node.
|
|
59
|
+
*/
|
|
60
|
+
interface ChainRpc {
|
|
61
|
+
url: string;
|
|
62
|
+
meta?: Record<string, string>;
|
|
63
|
+
}
|
|
58
64
|
declare class Endpoints {
|
|
59
65
|
static INSTANCE: Endpoints;
|
|
60
66
|
concurrency: number;
|
|
61
67
|
priceFeedAPI: string;
|
|
62
|
-
|
|
68
|
+
chainRpc: Map<string, ChainRpc>;
|
|
63
69
|
batchCount: number;
|
|
70
|
+
/** Convenience accessor for callers that only need the endpoint URL. */
|
|
71
|
+
getChainRpcUrl(chainId: string): string | undefined;
|
|
64
72
|
}
|
|
65
73
|
declare function configureEndpoints(options: any): void;
|
|
66
74
|
|
|
75
|
+
interface RpcConfig {
|
|
76
|
+
Url: string;
|
|
77
|
+
Meta?: Record<string, string>;
|
|
78
|
+
}
|
|
67
79
|
interface ChainConfig {
|
|
68
80
|
ChainID: string;
|
|
69
81
|
Https?: string[];
|
|
70
|
-
|
|
82
|
+
Rpc?: RpcConfig;
|
|
71
83
|
}
|
|
72
84
|
|
|
73
85
|
declare const program: Command<[string], {
|
|
@@ -1585,16 +1597,6 @@ interface GlobalConfig {
|
|
|
1585
1597
|
}
|
|
1586
1598
|
declare const GLOBAL_CONFIG: GlobalConfig;
|
|
1587
1599
|
|
|
1588
|
-
declare const DummyProvider: JsonRpcProvider;
|
|
1589
|
-
declare function getProvider(chainId?: EthChainId): JsonRpcProvider;
|
|
1590
|
-
declare class QueuedStaticJsonRpcProvider extends JsonRpcProvider {
|
|
1591
|
-
#private;
|
|
1592
|
-
executor: PQueue;
|
|
1593
|
-
constructor(url: string, network: Network, concurrency: number, batchCount?: number);
|
|
1594
|
-
send(method: string, params: Array<any>): Promise<any>;
|
|
1595
|
-
toString(): string;
|
|
1596
|
-
}
|
|
1597
|
-
|
|
1598
1600
|
declare class C {
|
|
1599
1601
|
private name;
|
|
1600
1602
|
private _counter;
|
|
@@ -1745,4 +1747,4 @@ declare const processMetrics: {
|
|
|
1745
1747
|
};
|
|
1746
1748
|
declare const metricsStorage: AsyncLocalStorage<string>;
|
|
1747
1749
|
|
|
1748
|
-
export { type ChainConfig,
|
|
1750
|
+
export { type ChainConfig, type ChainRpc, Endpoints, GLOBAL_CONFIG, type GlobalConfig, ListStateStorage, MapStateStorage, ProcessorServiceImplV3, type RpcConfig, type Semver, State, StateStorage, USER_PROCESSOR, compareSemver, configureEndpoints, dbMetrics, errorString, locatePackageJson, makeEthCallKey, mergeProcessResults, mergeProcessResultsInPlace, metricsStorage, parseSemver, processMetrics, providerMetrics, recordRuntimeInfo };
|