@ocap/resolver 1.31.8 → 1.32.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/esm/_virtual/rolldown_runtime.mjs +7 -0
- package/esm/api.d.mts +33 -5
- package/esm/api.mjs +939 -53
- package/esm/dashboard.d.mts +199 -0
- package/esm/dashboard.mjs +2481 -0
- package/esm/explorer.d.mts +29 -0
- package/esm/explorer.mjs +227 -0
- package/esm/follower.d.mts +277 -0
- package/esm/follower.mjs +2428 -0
- package/esm/hooks.mjs +1 -1
- package/esm/hotstuff-runtime.d.mts +271 -0
- package/esm/hotstuff-runtime.mjs +2668 -0
- package/esm/index.d.mts +87 -4
- package/esm/index.mjs +937 -177
- package/esm/node-preferences.d.mts +203 -0
- package/esm/node-preferences.mjs +1021 -0
- package/esm/replayer.d.mts +74 -0
- package/esm/replayer.mjs +394 -0
- package/esm/token-distribution.mjs +2 -2
- package/esm/token-flow.mjs +1 -1
- package/esm/types.d.mts +25 -2
- package/lib/api.cjs +941 -52
- package/lib/api.d.cts +33 -5
- package/lib/dashboard.cjs +2491 -0
- package/lib/dashboard.d.cts +199 -0
- package/lib/explorer.cjs +227 -0
- package/lib/explorer.d.cts +29 -0
- package/lib/follower.cjs +2434 -0
- package/lib/follower.d.cts +277 -0
- package/lib/hooks.cjs +1 -1
- package/lib/hotstuff-runtime.cjs +2671 -0
- package/lib/hotstuff-runtime.d.cts +271 -0
- package/lib/index.cjs +972 -177
- package/lib/index.d.cts +87 -4
- package/lib/node-preferences.cjs +1043 -0
- package/lib/node-preferences.d.cts +203 -0
- package/lib/replayer.cjs +395 -0
- package/lib/replayer.d.cts +74 -0
- package/lib/token-distribution.cjs +2 -2
- package/lib/token-flow.cjs +1 -1
- package/lib/types.d.cts +25 -2
- package/package.json +20 -14
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const require_rolldown_runtime = require('./_virtual/rolldown_runtime.cjs');
|
|
2
|
-
let _ocap_util = require("@ocap/util");
|
|
3
|
-
let _arcblock_did = require("@arcblock/did");
|
|
4
2
|
let _ocap_mcrypto = require("@ocap/mcrypto");
|
|
3
|
+
let _arcblock_did = require("@arcblock/did");
|
|
4
|
+
let _ocap_util = require("@ocap/util");
|
|
5
5
|
let _ocap_tx_protocols_lib_util = require("@ocap/tx-protocols/lib/util");
|
|
6
6
|
let lodash_omit = require("lodash/omit");
|
|
7
7
|
lodash_omit = require_rolldown_runtime.__toESM(lodash_omit);
|
package/lib/token-flow.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const require_rolldown_runtime = require('./_virtual/rolldown_runtime.cjs');
|
|
2
2
|
let _ocap_util = require("@ocap/util");
|
|
3
|
-
let _arcblock_validator = require("@arcblock/validator");
|
|
4
3
|
let _ocap_util_lib_error = require("@ocap/util/lib/error");
|
|
4
|
+
let _arcblock_validator = require("@arcblock/validator");
|
|
5
5
|
let lodash_uniq = require("lodash/uniq");
|
|
6
6
|
lodash_uniq = require_rolldown_runtime.__toESM(lodash_uniq);
|
|
7
7
|
let _ocap_state_lib_states_tx = require("@ocap/state/lib/states/tx");
|
package/lib/types.d.cts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as _ocap_types0 from "@ocap/types";
|
|
2
|
+
import { Address, BN, DirectionMap, Hash, IAccountState, IAddressArgs, IAny, IAssetFactoryState, IAssetState, IBalanceTable, IChainConfig, IChainConfig as IChainConfig$1, IChainState, IDelegateState, IEvidenceState, IExecutedContext, IFollowerStatusResponse, IForeignToken, IGetAccountStateArgs, IGetAccountTokensArgs, IIndexDB, IIndexDB as IIndexDB$1, IIndexTable, IIndexTable as IIndexTable$1, ILedger, IListAccountsResult, IListAssetsResult, IListDelegationsResult, IListFactoriesResult, IListRollupBlocksResult, IListRollupValidatorsResult, IListRollupsResult, IListStakesResult, IListTokenFactoriesResult, IListTokensResult, IListTransactionsResult, INodeRuntimeAdapter, IOperationContext, IPipelineLogger, IPipelineLogger as IPipelineLogger$1, IResolver, IResolverAccountState, IResolverChainInfo, IResolverContext, IResolverContext as IResolverContext$1, IResolverFactoryState, IResolverForgeStats, IResolverListAccountsResult, IResolverListAssetsResult, IResolverListDelegationsResult, IResolverListFactoriesResult, IResolverListRollupBlocksResult, IResolverListRollupValidatorsResult, IResolverListRollupsResult, IResolverListStakesResult, IResolverListTokenFactoriesResult, IResolverListTokensResult, IResolverListTransactionsResult, IResolverNetInfo, IResolverNodeInfo, IResolverPaging, IResolverPaging as IResolverPaging$1, IResolverRollupState, IResolverStakeState, IResolverTransaction, IResolverTxItxJson, IResolverValidatorsInfo, IRollupBlock, IRollupState, IRollupValidator, IStakeState, IStateContext, IStateDB, IStateDB as IStateDB$1, IStateTable, IStateTable as IStateTable$1, ITokenConfig, ITokenFactoryState, ITokenFlowsResult, ITokenInfo, ITokenInfo as ITokenInfo$1, ITokenMetadata, ITokenState, ITransactionConfig, ITxGasConfig, ITxStakeConfig, ITxState, IVaultsConfig, IndexTableTypeMap, Promisable, TAccountFilter, TAccountToken, TAddressFilter, TAssetFilter, TDelegationFilter, TFactoryFilter, TFollowerSyncMode, TIndexedAccountState, TIndexedAssetState, TIndexedDelegationState, TIndexedFactoryState, TIndexedRollupBlock, TIndexedRollupState, TIndexedRollupValidator, TIndexedStakeState, TIndexedTokenFactoryState, TIndexedTokenState, TIndexedTokenState as TIndexedTokenState$1, TIndexedTransaction, TNodeRole, TNodeWritePolicy, TPage, TPageInfo, TPageOrder, TRangeFilter, TReceiptChange, TRequestEstimateGas, TRequestGetEvidenceState, TRequestGetRollupBlock, TRequestGetTokenDistribution, TRequestGetTx, TRequestListAssetTransactions, TRequestListAssets, TRequestListDelegations, TRequestListFactories, TRequestListRollupBlocks, TRequestListRollupValidators, TRequestListRollups, TRequestListStakes, TRequestListTokenFactories, TRequestListTokenFlows, TRequestListTokens, TRequestListTopAccounts, TRequestListTransactions, TRequestSearch, TRequestVerifyAccountRisk, TRollupFilter, TSearchResult, TStakeFilter, TTimeFilter, TTokenDistribution, TTokenFactoryFilter, TTokenFilter, TTokenMeta, TTransactionReceipt, TTxFilter, TTypeFilter, TValidatorFilter, TValidityFilter, TVerifyAccountRiskResult, TokenBalanceMap, ValidityMap } from "@ocap/types";
|
|
2
3
|
|
|
3
4
|
//#region src/types.d.ts
|
|
4
5
|
|
|
@@ -84,7 +85,29 @@ interface IResolverParams {
|
|
|
84
85
|
ledger: ILedger;
|
|
85
86
|
config: IChainConfig$1;
|
|
86
87
|
filter?: IFilter;
|
|
88
|
+
/**
|
|
89
|
+
* Optional pre-queue RPC admission blocklist callback (#1756).
|
|
90
|
+
* Enforces node-local `blockedAccounts` BEFORE consensus/queue entry without mutating
|
|
91
|
+
* deterministic `OCAPExecutor` `_state_commit` hashes across HotStuff replicas or Followers.
|
|
92
|
+
*/
|
|
93
|
+
admissionBlockedCheck?: (address: string) => boolean | Promise<boolean>;
|
|
94
|
+
/**
|
|
95
|
+
* Optional pre-queue RPC admission reserved-symbol callback (#1756).
|
|
96
|
+
* Enforces node-local `reservedSymbols` BEFORE consensus/queue entry without mutating
|
|
97
|
+
* deterministic `OCAPExecutor` `_state_commit` hashes across HotStuff replicas or Followers.
|
|
98
|
+
*/
|
|
99
|
+
admissionReservedSymbolCheck?: (symbol: string) => boolean | Promise<boolean>;
|
|
87
100
|
validateTokenConfig?: boolean;
|
|
101
|
+
skipInitializeStateDB?: boolean;
|
|
102
|
+
deferInitialize?: boolean;
|
|
103
|
+
consensusMode?: 'single' | 'hotstuff';
|
|
104
|
+
txQueueConfig?: {
|
|
105
|
+
maxRequest?: number;
|
|
106
|
+
concurrent?: number;
|
|
107
|
+
timeoutMs?: number;
|
|
108
|
+
};
|
|
109
|
+
now?: () => number;
|
|
110
|
+
nodeRuntime?: _ocap_types0.INodeRuntimeAdapter;
|
|
88
111
|
logger?: IPipelineLogger$1;
|
|
89
112
|
}
|
|
90
113
|
/**
|
|
@@ -113,4 +136,4 @@ interface IMigrationChain {
|
|
|
113
136
|
findAddressAtTime: (address: string, time: Date) => string;
|
|
114
137
|
}
|
|
115
138
|
//#endregion
|
|
116
|
-
export { type Address, type BN, type DirectionMap, FlexibleIndexDB, FlexibleStateDB, type Hash, type IAccountState, type IAddressArgs, type IAny, type IAssetFactoryState, type IAssetState, type IBalanceTable, type IChainConfig, type IChainState, IChunkIterator, IDataObject, type IDelegateState, IDelegationOp, type IEvidenceState, type IExecutedContext, IFilter, type IForeignToken, type IGetAccountStateArgs, type IGetAccountTokensArgs, IGetStateParams, type IIndexDB, type IIndexTable, type IListAccountsResult, type IListAssetsResult, IListChunksParams, type IListDelegationsResult, type IListFactoriesResult, type IListRollupBlocksResult, type IListRollupValidatorsResult, type IListRollupsResult, type IListStakesResult, type IListTokenFactoriesResult, type IListTokensResult, type IListTransactionsResult, IMigrationChain, type IOperationContext, IPaginatedResult, type IPipelineLogger, type IResolver, type IResolverAccountState, type IResolverChainInfo, type IResolverContext, type IResolverFactoryState, type IResolverForgeStats, type IResolverListAccountsResult, type IResolverListAssetsResult, type IResolverListDelegationsResult, type IResolverListFactoriesResult, type IResolverListRollupBlocksResult, type IResolverListRollupValidatorsResult, type IResolverListRollupsResult, type IResolverListStakesResult, type IResolverListTokenFactoriesResult, type IResolverListTokensResult, type IResolverListTransactionsResult, type IResolverNetInfo, type IResolverNodeInfo, type IResolverPaging, IResolverParams, type IResolverRollupState, type IResolverStakeState, type IResolverTransaction, type IResolverTxItxJson, type IResolverValidatorsInfo, type IRollupBlock, type IRollupState, type IRollupValidator, type IStakeState, type IStateContext, type IStateDB, type IStateTable, ITokenCache, type ITokenConfig, type ITokenFactoryState, type ITokenFlowsResult, type ITokenInfo, type ITokenMetadata, type ITokenState, type ITransactionConfig, ITrustedAccountConfig, type ITxGasConfig, type ITxStakeConfig, type ITxState, type IVaultsConfig, type IndexTableTypeMap, type Promisable, type TAccountFilter, type TAccountToken, type TAddressFilter, type TAssetFilter, type TDelegationFilter, type TFactoryFilter, type TIndexedAccountState, type TIndexedAssetState, type TIndexedDelegationState, type TIndexedFactoryState, type TIndexedRollupBlock, type TIndexedRollupState, type TIndexedRollupValidator, type TIndexedStakeState, type TIndexedTokenFactoryState, type TIndexedTokenState, type TIndexedTransaction, type TPage, type TPageInfo, type TPageOrder, type TRangeFilter, type TReceiptChange, type TRequestEstimateGas, type TRequestGetEvidenceState, type TRequestGetRollupBlock, type TRequestGetTokenDistribution, type TRequestGetTx, type TRequestListAssetTransactions, type TRequestListAssets, type TRequestListDelegations, type TRequestListFactories, type TRequestListRollupBlocks, type TRequestListRollupValidators, type TRequestListRollups, type TRequestListStakes, type TRequestListTokenFactories, type TRequestListTokenFlows, type TRequestListTokens, type TRequestListTopAccounts, type TRequestListTransactions, type TRequestSearch, type TRequestVerifyAccountRisk, type TRollupFilter, type TSearchResult, type TStakeFilter, type TTimeFilter, type TTokenDistribution, type TTokenFactoryFilter, type TTokenFilter, type TTokenMeta, type TTransactionReceipt, type TTxFilter, type TTypeFilter, type TValidatorFilter, type TValidityFilter, type TVerifyAccountRiskResult, type TokenBalanceMap, type ValidityMap };
|
|
139
|
+
export { type Address, type BN, type DirectionMap, FlexibleIndexDB, FlexibleStateDB, type Hash, type IAccountState, type IAddressArgs, type IAny, type IAssetFactoryState, type IAssetState, type IBalanceTable, type IChainConfig, type IChainState, IChunkIterator, IDataObject, type IDelegateState, IDelegationOp, type IEvidenceState, type IExecutedContext, IFilter, type IFollowerStatusResponse, type IForeignToken, type IGetAccountStateArgs, type IGetAccountTokensArgs, IGetStateParams, type IIndexDB, type IIndexTable, type IListAccountsResult, type IListAssetsResult, IListChunksParams, type IListDelegationsResult, type IListFactoriesResult, type IListRollupBlocksResult, type IListRollupValidatorsResult, type IListRollupsResult, type IListStakesResult, type IListTokenFactoriesResult, type IListTokensResult, type IListTransactionsResult, IMigrationChain, type INodeRuntimeAdapter, type IOperationContext, IPaginatedResult, type IPipelineLogger, type IResolver, type IResolverAccountState, type IResolverChainInfo, type IResolverContext, type IResolverFactoryState, type IResolverForgeStats, type IResolverListAccountsResult, type IResolverListAssetsResult, type IResolverListDelegationsResult, type IResolverListFactoriesResult, type IResolverListRollupBlocksResult, type IResolverListRollupValidatorsResult, type IResolverListRollupsResult, type IResolverListStakesResult, type IResolverListTokenFactoriesResult, type IResolverListTokensResult, type IResolverListTransactionsResult, type IResolverNetInfo, type IResolverNodeInfo, type IResolverPaging, IResolverParams, type IResolverRollupState, type IResolverStakeState, type IResolverTransaction, type IResolverTxItxJson, type IResolverValidatorsInfo, type IRollupBlock, type IRollupState, type IRollupValidator, type IStakeState, type IStateContext, type IStateDB, type IStateTable, ITokenCache, type ITokenConfig, type ITokenFactoryState, type ITokenFlowsResult, type ITokenInfo, type ITokenMetadata, type ITokenState, type ITransactionConfig, ITrustedAccountConfig, type ITxGasConfig, type ITxStakeConfig, type ITxState, type IVaultsConfig, type IndexTableTypeMap, type Promisable, type TAccountFilter, type TAccountToken, type TAddressFilter, type TAssetFilter, type TDelegationFilter, type TFactoryFilter, type TFollowerSyncMode, type TIndexedAccountState, type TIndexedAssetState, type TIndexedDelegationState, type TIndexedFactoryState, type TIndexedRollupBlock, type TIndexedRollupState, type TIndexedRollupValidator, type TIndexedStakeState, type TIndexedTokenFactoryState, type TIndexedTokenState, type TIndexedTransaction, type TNodeRole, type TNodeWritePolicy, type TPage, type TPageInfo, type TPageOrder, type TRangeFilter, type TReceiptChange, type TRequestEstimateGas, type TRequestGetEvidenceState, type TRequestGetRollupBlock, type TRequestGetTokenDistribution, type TRequestGetTx, type TRequestListAssetTransactions, type TRequestListAssets, type TRequestListDelegations, type TRequestListFactories, type TRequestListRollupBlocks, type TRequestListRollupValidators, type TRequestListRollups, type TRequestListStakes, type TRequestListTokenFactories, type TRequestListTokenFlows, type TRequestListTokens, type TRequestListTopAccounts, type TRequestListTransactions, type TRequestSearch, type TRequestVerifyAccountRisk, type TRollupFilter, type TSearchResult, type TStakeFilter, type TTimeFilter, type TTokenDistribution, type TTokenFactoryFilter, type TTokenFilter, type TTokenMeta, type TTransactionReceipt, type TTxFilter, type TTypeFilter, type TValidatorFilter, type TValidityFilter, type TVerifyAccountRiskResult, type TokenBalanceMap, type ValidityMap };
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
|
-
"version": "1.
|
|
6
|
+
"version": "1.32.0",
|
|
7
7
|
"description": "GraphQL resolver built upon ocap statedb and GQL layer",
|
|
8
8
|
"type": "module",
|
|
9
9
|
"main": "./lib/index.cjs",
|
|
@@ -15,6 +15,11 @@
|
|
|
15
15
|
"import": "./esm/index.mjs",
|
|
16
16
|
"default": "./lib/index.cjs"
|
|
17
17
|
},
|
|
18
|
+
"./api": {
|
|
19
|
+
"types": "./esm/api.d.mts",
|
|
20
|
+
"import": "./esm/api.mjs",
|
|
21
|
+
"default": "./lib/api.cjs"
|
|
22
|
+
},
|
|
18
23
|
"./lib/*.js": {
|
|
19
24
|
"types": "./esm/*.d.mts",
|
|
20
25
|
"import": "./esm/*.mjs",
|
|
@@ -49,20 +54,21 @@
|
|
|
49
54
|
"tsdown": "^0.18.4"
|
|
50
55
|
},
|
|
51
56
|
"dependencies": {
|
|
52
|
-
"@arcblock/did": "1.
|
|
53
|
-
"@arcblock/did-ext": "1.
|
|
54
|
-
"@arcblock/did-util": "1.
|
|
57
|
+
"@arcblock/did": "1.32.0",
|
|
58
|
+
"@arcblock/did-ext": "1.32.0",
|
|
59
|
+
"@arcblock/did-util": "1.32.0",
|
|
60
|
+
"@arcblock/ledger-core": "1.32.0",
|
|
55
61
|
"@arcblock/nft-display": "^3.2.3",
|
|
56
|
-
"@arcblock/validator": "1.
|
|
57
|
-
"@ocap/config": "1.
|
|
58
|
-
"@ocap/indexdb": "1.
|
|
59
|
-
"@ocap/mcrypto": "1.
|
|
60
|
-
"@ocap/message": "1.
|
|
61
|
-
"@ocap/state": "1.
|
|
62
|
-
"@ocap/tx-protocols": "1.
|
|
63
|
-
"@ocap/types": "1.
|
|
64
|
-
"@ocap/util": "1.
|
|
65
|
-
"@ocap/wallet": "1.
|
|
62
|
+
"@arcblock/validator": "1.32.0",
|
|
63
|
+
"@ocap/config": "1.32.0",
|
|
64
|
+
"@ocap/indexdb": "1.32.0",
|
|
65
|
+
"@ocap/mcrypto": "1.32.0",
|
|
66
|
+
"@ocap/message": "1.32.0",
|
|
67
|
+
"@ocap/state": "1.32.0",
|
|
68
|
+
"@ocap/tx-protocols": "1.32.0",
|
|
69
|
+
"@ocap/types": "1.32.0",
|
|
70
|
+
"@ocap/util": "1.32.0",
|
|
71
|
+
"@ocap/wallet": "1.32.0",
|
|
66
72
|
"debug": "^4.4.3",
|
|
67
73
|
"express": "^4.22.1",
|
|
68
74
|
"lodash": "^4.17.23",
|