@xyo-network/xl1-protocol-sdk 1.16.26 → 1.17.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/ChainServiceCollectionV2.d.ts +8 -35
- package/dist/neutral/ChainServiceCollectionV2.d.ts.map +1 -1
- package/dist/neutral/block/hydrate/flattenHydratedBlocks.d.ts +2 -3
- package/dist/neutral/block/hydrate/flattenHydratedBlocks.d.ts.map +1 -1
- package/dist/neutral/index.d.ts +2 -0
- package/dist/neutral/index.d.ts.map +1 -1
- package/dist/neutral/index.mjs +1765 -1251
- package/dist/neutral/index.mjs.map +1 -1
- package/dist/neutral/model/PayloadBundle/bundledPayloadToHydratedBlock.d.ts +4 -0
- package/dist/neutral/model/PayloadBundle/bundledPayloadToHydratedBlock.d.ts.map +1 -0
- package/dist/neutral/model/PayloadBundle/hydratedBlockToPayloadBundle.d.ts +4 -0
- package/dist/neutral/model/PayloadBundle/hydratedBlockToPayloadBundle.d.ts.map +1 -0
- package/dist/neutral/model/PayloadBundle/index.d.ts +2 -0
- package/dist/neutral/model/PayloadBundle/index.d.ts.map +1 -1
- package/dist/neutral/model/Qualified.d.ts +6 -0
- package/dist/neutral/model/Qualified.d.ts.map +1 -0
- package/dist/neutral/model/index.d.ts +1 -1
- package/dist/neutral/model/index.d.ts.map +1 -1
- package/dist/neutral/payloads/index.d.ts +0 -1
- package/dist/neutral/payloads/index.d.ts.map +1 -1
- package/dist/neutral/primitives/index.d.ts +2 -1
- package/dist/neutral/primitives/index.d.ts.map +1 -1
- package/dist/neutral/primitives/rewardFromBlockNumber.d.ts +3 -0
- package/dist/neutral/primitives/rewardFromBlockNumber.d.ts.map +1 -0
- package/dist/neutral/primitives/state/findMostRecentBlock.d.ts +11 -0
- package/dist/neutral/primitives/state/findMostRecentBlock.d.ts.map +1 -0
- package/dist/neutral/primitives/state/hydratedBlockByNumber.d.ts +4 -0
- package/dist/neutral/primitives/state/hydratedBlockByNumber.d.ts.map +1 -0
- package/dist/neutral/primitives/state/index.d.ts +3 -0
- package/dist/neutral/primitives/state/index.d.ts.map +1 -0
- package/dist/neutral/provider/XyoRunner.d.ts +5 -1
- package/dist/neutral/provider/XyoRunner.d.ts.map +1 -1
- package/dist/neutral/provider/viewer/XyoViewer.d.ts +9 -4
- package/dist/neutral/provider/viewer/XyoViewer.d.ts.map +1 -1
- package/dist/neutral/provider/viewer/index.d.ts +0 -1
- package/dist/neutral/provider/viewer/index.d.ts.map +1 -1
- package/dist/neutral/runners/Block.d.ts +8 -0
- package/dist/neutral/runners/Block.d.ts.map +1 -0
- package/dist/neutral/runners/Mempool.d.ts +9 -0
- package/dist/neutral/runners/Mempool.d.ts.map +1 -0
- package/dist/neutral/runners/index.d.ts +3 -0
- package/dist/neutral/runners/index.d.ts.map +1 -0
- package/dist/neutral/services/BlockProducerService.d.ts +2 -2
- package/dist/neutral/services/BlockProducerService.d.ts.map +1 -1
- package/dist/neutral/services/Chain/BaseChainService.d.ts +0 -2
- package/dist/neutral/services/Chain/BaseChainService.d.ts.map +1 -1
- package/dist/neutral/services/Chain/ChainService.d.ts +2 -3
- package/dist/neutral/services/Chain/ChainService.d.ts.map +1 -1
- package/dist/neutral/services/Chain/index.d.ts +0 -1
- package/dist/neutral/services/Chain/index.d.ts.map +1 -1
- package/dist/neutral/services/index.d.ts +0 -2
- package/dist/neutral/services/index.d.ts.map +1 -1
- package/dist/neutral/simple/accountBalance/SimpleAccountBalanceViewer.d.ts +9 -5
- package/dist/neutral/simple/accountBalance/SimpleAccountBalanceViewer.d.ts.map +1 -1
- package/dist/neutral/simple/block/SimpleBlockViewer.d.ts +55 -0
- package/dist/neutral/simple/block/SimpleBlockViewer.d.ts.map +1 -0
- package/dist/neutral/simple/block/index.d.ts +2 -0
- package/dist/neutral/simple/block/index.d.ts.map +1 -0
- package/dist/neutral/simple/blockReward/SimpleBlockRewardViewer.d.ts +16 -0
- package/dist/neutral/simple/blockReward/SimpleBlockRewardViewer.d.ts.map +1 -0
- package/dist/neutral/simple/blockReward/index.d.ts +2 -0
- package/dist/neutral/simple/blockReward/index.d.ts.map +1 -0
- package/dist/neutral/simple/chain/SimpleChainViewer.d.ts +12 -0
- package/dist/neutral/simple/chain/SimpleChainViewer.d.ts.map +1 -0
- package/dist/neutral/simple/chain/index.d.ts +2 -0
- package/dist/neutral/simple/chain/index.d.ts.map +1 -0
- package/dist/neutral/simple/index.d.ts +3 -0
- package/dist/neutral/simple/index.d.ts.map +1 -1
- package/dist/neutral/simple/mempool/SimpleMempoolRunner.d.ts +15 -0
- package/dist/neutral/simple/mempool/SimpleMempoolRunner.d.ts.map +1 -0
- package/dist/neutral/simple/mempool/SimpleMempoolViewer.d.ts +10 -4
- package/dist/neutral/simple/mempool/SimpleMempoolViewer.d.ts.map +1 -1
- package/dist/neutral/simple/mempool/index.d.ts +1 -0
- package/dist/neutral/simple/mempool/index.d.ts.map +1 -1
- package/dist/neutral/summary/index.d.ts +3 -0
- package/dist/neutral/summary/index.d.ts.map +1 -0
- package/dist/neutral/summary/model/BalancesStepSummary.d.ts.map +1 -0
- package/dist/neutral/summary/model/SchemasStepSummary.d.ts.map +1 -0
- package/dist/neutral/summary/model/StepSummary.d.ts.map +1 -0
- package/dist/neutral/summary/model/TransfersSummary.d.ts.map +1 -0
- package/dist/neutral/{payloads/summary → summary/model}/index.d.ts +1 -0
- package/dist/neutral/summary/model/index.d.ts.map +1 -0
- package/dist/neutral/{model → summary/model}/summary.d.ts +3 -4
- package/dist/neutral/summary/model/summary.d.ts.map +1 -0
- package/dist/neutral/{primitives/summary → summary/primitives}/balances/balancesStepSummaryFromRange.d.ts +1 -2
- package/dist/neutral/summary/primitives/balances/balancesStepSummaryFromRange.d.ts.map +1 -0
- package/dist/neutral/summary/primitives/balances/balancesSummary.d.ts +5 -0
- package/dist/neutral/summary/primitives/balances/balancesSummary.d.ts.map +1 -0
- package/dist/neutral/summary/primitives/balances/index.d.ts.map +1 -0
- package/dist/neutral/{primitives/summary → summary/primitives}/index.d.ts.map +1 -1
- package/dist/neutral/summary/primitives/schemas/index.d.ts.map +1 -0
- package/dist/neutral/{primitives/summary → summary/primitives}/schemas/schemasStepSummaryFromRange.d.ts +1 -2
- package/dist/neutral/summary/primitives/schemas/schemasStepSummaryFromRange.d.ts.map +1 -0
- package/dist/neutral/summary/primitives/schemas/schemasSummary.d.ts +5 -0
- package/dist/neutral/summary/primitives/schemas/schemasSummary.d.ts.map +1 -0
- package/dist/neutral/summary/primitives/transfers/index.d.ts.map +1 -0
- package/dist/neutral/{primitives/summary → summary/primitives}/transfers/transfersStepSummaryFromRange.d.ts +1 -2
- package/dist/neutral/summary/primitives/transfers/transfersStepSummaryFromRange.d.ts.map +1 -0
- package/dist/neutral/summary/primitives/transfers/transfersSummary.d.ts +6 -0
- package/dist/neutral/summary/primitives/transfers/transfersSummary.d.ts.map +1 -0
- package/dist/neutral/utils/HydratedCache.d.ts +16 -0
- package/dist/neutral/utils/HydratedCache.d.ts.map +1 -0
- package/dist/neutral/utils/index.d.ts +1 -0
- package/dist/neutral/utils/index.d.ts.map +1 -1
- package/dist/neutral/viewers/AccountBalance.d.ts +5 -2
- package/dist/neutral/viewers/AccountBalance.d.ts.map +1 -1
- package/dist/neutral/viewers/Block.d.ts +9 -5
- package/dist/neutral/viewers/Block.d.ts.map +1 -1
- package/dist/neutral/viewers/BlockReward.d.ts +8 -0
- package/dist/neutral/viewers/BlockReward.d.ts.map +1 -0
- package/dist/neutral/viewers/Chain.d.ts +2 -0
- package/dist/neutral/viewers/Chain.d.ts.map +1 -1
- package/dist/neutral/viewers/ChainStakeViewer.d.ts +6 -0
- package/dist/neutral/viewers/ChainStakeViewer.d.ts.map +1 -0
- package/dist/neutral/viewers/Mempool.d.ts +8 -1
- package/dist/neutral/viewers/Mempool.d.ts.map +1 -1
- package/dist/neutral/viewers/StakeIntent.d.ts +10 -0
- package/dist/neutral/viewers/StakeIntent.d.ts.map +1 -0
- package/dist/neutral/{provider/viewer → viewers}/StepViewer.d.ts +2 -2
- package/dist/neutral/viewers/StepViewer.d.ts.map +1 -0
- package/dist/neutral/viewers/index.d.ts +3 -0
- package/dist/neutral/viewers/index.d.ts.map +1 -1
- package/package.json +18 -18
- package/src/ChainServiceCollectionV2.ts +12 -39
- package/src/block/hydrate/flattenHydratedBlocks.ts +2 -3
- package/src/index.ts +2 -1
- package/src/model/PayloadBundle/bundledPayloadToHydratedBlock.ts +14 -0
- package/src/model/PayloadBundle/hydratedBlockToPayloadBundle.ts +18 -0
- package/src/model/PayloadBundle/index.ts +2 -0
- package/src/model/Qualified.ts +9 -0
- package/src/model/index.ts +1 -1
- package/src/payloads/index.ts +0 -1
- package/src/primitives/index.ts +2 -1
- package/src/primitives/rewardFromBlockNumber.ts +25 -0
- package/src/primitives/state/findMostRecentBlock.ts +44 -0
- package/src/primitives/state/hydratedBlockByNumber.ts +19 -0
- package/src/primitives/state/index.ts +2 -0
- package/src/provider/XyoRunner.ts +7 -1
- package/src/provider/viewer/XyoViewer.ts +18 -7
- package/src/provider/viewer/index.ts +0 -1
- package/src/runners/Block.ts +10 -0
- package/src/runners/Mempool.ts +9 -0
- package/src/runners/index.ts +2 -0
- package/src/services/BlockProducerService.ts +3 -2
- package/src/services/Chain/BaseChainService.ts +1 -3
- package/src/services/Chain/ChainService.ts +4 -3
- package/src/services/Chain/index.ts +0 -1
- package/src/services/index.ts +0 -2
- package/src/simple/accountBalance/SimpleAccountBalanceViewer.ts +104 -18
- package/src/simple/block/SimpleBlockViewer.ts +172 -0
- package/src/simple/block/index.ts +1 -0
- package/src/simple/blockReward/SimpleBlockRewardViewer.ts +34 -0
- package/src/simple/blockReward/index.ts +1 -0
- package/src/simple/chain/SimpleChainViewer.ts +25 -0
- package/src/simple/chain/index.ts +1 -0
- package/src/simple/gateway/SimpleXyoGatewayRunner.ts +1 -1
- package/src/simple/index.ts +3 -0
- package/src/simple/mempool/SimpleMempoolRunner.ts +47 -0
- package/src/simple/mempool/SimpleMempoolViewer.ts +34 -8
- package/src/simple/mempool/index.ts +1 -0
- package/src/simple/timesync/SimpleTimeSyncViewer.ts +1 -1
- package/src/summary/index.ts +2 -0
- package/src/{payloads/summary → summary/model}/index.ts +1 -0
- package/src/{model → summary/model}/summary.ts +5 -4
- package/src/{primitives/summary → summary/primitives}/balances/balancesStepSummaryFromRange.ts +4 -3
- package/src/{primitives/summary → summary/primitives}/balances/balancesSummary.ts +6 -5
- package/src/{primitives/summary → summary/primitives}/schemas/schemasStepSummaryFromRange.ts +3 -3
- package/src/{primitives/summary → summary/primitives}/schemas/schemasSummary.ts +7 -6
- package/src/{primitives/summary → summary/primitives}/transfers/transfersStepSummaryFromRange.ts +4 -3
- package/src/{primitives/summary → summary/primitives}/transfers/transfersSummary.ts +6 -5
- package/src/utils/HydratedCache.ts +38 -0
- package/src/utils/index.ts +1 -0
- package/src/viewers/AccountBalance.ts +9 -2
- package/src/viewers/Block.ts +10 -6
- package/src/viewers/BlockReward.ts +9 -0
- package/src/viewers/Chain.ts +2 -0
- package/src/viewers/ChainStakeViewer.ts +7 -0
- package/src/viewers/Mempool.ts +10 -1
- package/src/viewers/StakeIntent.ts +14 -0
- package/src/{provider/viewer → viewers}/StepViewer.ts +2 -2
- package/src/viewers/index.ts +3 -0
- package/dist/neutral/model/summary.d.ts.map +0 -1
- package/dist/neutral/payloads/summary/BalancesStepSummary.d.ts.map +0 -1
- package/dist/neutral/payloads/summary/SchemasStepSummary.d.ts.map +0 -1
- package/dist/neutral/payloads/summary/StepSummary.d.ts.map +0 -1
- package/dist/neutral/payloads/summary/TransfersSummary.d.ts.map +0 -1
- package/dist/neutral/payloads/summary/index.d.ts.map +0 -1
- package/dist/neutral/primitives/summary/balances/balancesStepSummaryFromRange.d.ts.map +0 -1
- package/dist/neutral/primitives/summary/balances/balancesSummary.d.ts +0 -4
- package/dist/neutral/primitives/summary/balances/balancesSummary.d.ts.map +0 -1
- package/dist/neutral/primitives/summary/balances/index.d.ts.map +0 -1
- package/dist/neutral/primitives/summary/schemas/index.d.ts.map +0 -1
- package/dist/neutral/primitives/summary/schemas/schemasStepSummaryFromRange.d.ts.map +0 -1
- package/dist/neutral/primitives/summary/schemas/schemasSummary.d.ts +0 -4
- package/dist/neutral/primitives/summary/schemas/schemasSummary.d.ts.map +0 -1
- package/dist/neutral/primitives/summary/transfers/index.d.ts.map +0 -1
- package/dist/neutral/primitives/summary/transfers/transfersStepSummaryFromRange.d.ts.map +0 -1
- package/dist/neutral/primitives/summary/transfers/transfersSummary.d.ts +0 -5
- package/dist/neutral/primitives/summary/transfers/transfersSummary.d.ts.map +0 -1
- package/dist/neutral/provider/viewer/StepViewer.d.ts.map +0 -1
- package/dist/neutral/services/BlockRewardService.d.ts +0 -5
- package/dist/neutral/services/BlockRewardService.d.ts.map +0 -1
- package/dist/neutral/services/BlockRewardServiceV2.d.ts +0 -6
- package/dist/neutral/services/BlockRewardServiceV2.d.ts.map +0 -1
- package/dist/neutral/services/Chain/interfaces/ChainStakeViewer.d.ts +0 -4
- package/dist/neutral/services/Chain/interfaces/ChainStakeViewer.d.ts.map +0 -1
- package/dist/neutral/services/Chain/interfaces/ChainStaker.d.ts +0 -6
- package/dist/neutral/services/Chain/interfaces/ChainStaker.d.ts.map +0 -1
- package/dist/neutral/services/Chain/interfaces/index.d.ts +0 -3
- package/dist/neutral/services/Chain/interfaces/index.d.ts.map +0 -1
- package/src/services/BlockRewardService.ts +0 -6
- package/src/services/BlockRewardServiceV2.ts +0 -8
- package/src/services/Chain/interfaces/ChainStakeViewer.ts +0 -5
- package/src/services/Chain/interfaces/ChainStaker.ts +0 -5
- package/src/services/Chain/interfaces/index.ts +0 -2
- /package/dist/neutral/{payloads/summary → summary/model}/BalancesStepSummary.d.ts +0 -0
- /package/dist/neutral/{payloads/summary → summary/model}/SchemasStepSummary.d.ts +0 -0
- /package/dist/neutral/{payloads/summary → summary/model}/StepSummary.d.ts +0 -0
- /package/dist/neutral/{payloads/summary → summary/model}/TransfersSummary.d.ts +0 -0
- /package/dist/neutral/{primitives/summary → summary/primitives}/balances/index.d.ts +0 -0
- /package/dist/neutral/{primitives/summary → summary/primitives}/index.d.ts +0 -0
- /package/dist/neutral/{primitives/summary → summary/primitives}/schemas/index.d.ts +0 -0
- /package/dist/neutral/{primitives/summary → summary/primitives}/transfers/index.d.ts +0 -0
- /package/src/{payloads/summary → summary/model}/BalancesStepSummary.ts +0 -0
- /package/src/{payloads/summary → summary/model}/SchemasStepSummary.ts +0 -0
- /package/src/{payloads/summary → summary/model}/StepSummary.ts +0 -0
- /package/src/{payloads/summary → summary/model}/TransfersSummary.ts +0 -0
- /package/src/{primitives/summary → summary/primitives}/balances/index.ts +0 -0
- /package/src/{primitives/summary → summary/primitives}/index.ts +0 -0
- /package/src/{primitives/summary → summary/primitives}/schemas/index.ts +0 -0
- /package/src/{primitives/summary → summary/primitives}/transfers/index.ts +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SchemasStepSummary.d.ts","sourceRoot":"","sources":["../../../../src/summary/model/SchemasStepSummary.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAA;AAGzE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAEnD,eAAO,MAAM,wBAAwB,EAAE,MAA2C,CAAA;AAClF,MAAM,MAAM,wBAAwB,GAAG,OAAO,wBAAwB,CAAA;AAEtE,MAAM,MAAM,kBAAkB,GAAG,WAAW,CAAC;IAC3C,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CAChC,EAAE,wBAAwB,CAAC,CAAA;AAE5B;;GAEG;AACH,eAAO,MAAM,oBAAoB,iDAAsE,CAAA;AACvG,eAAO,MAAM,oBAAoB,6DAAmE,CAAA;AAEpG;;GAEG;AACH,eAAO,MAAM,mCAAmC,GAAI,OAAO,OAAO,KAAG,KAAK,IAAI,eAAe,CAAC,kBAAkB,CAE/G,CAAA;AACD,eAAO,MAAM,mCAAmC,8EAAmG,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StepSummary.d.ts","sourceRoot":"","sources":["../../../../src/summary/model/StepSummary.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAA;AACvD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAA;AAEjE,eAAO,MAAM,iBAAiB,EAAE,MAAmC,CAAA;AACnE,MAAM,MAAM,iBAAiB,GAAG,OAAO,iBAAiB,CAAA;AAExD,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,IAAI,CAAA;IACV,QAAQ,EAAE,MAAM,CAAA;CACjB;AAED,MAAM,MAAM,WAAW,CAAC,iBAAiB,SAAS,WAAW,GAAG,IAAI,GAAG,IAAI,EACzE,OAAO,SAAS,MAAM,GAAG,IAAI,GAAG,IAAI,IAAI,OAAO,CAAC,iBAAiB,SAAS,IAAI,GAAG,iBAAiB,GAAG,iBAAiB,GAAG,iBAAiB,EAC1I,OAAO,SAAS,IAAI,GAAG,iBAAiB,GAAG,OAAO,CAAC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TransfersSummary.d.ts","sourceRoot":"","sources":["../../../../src/summary/model/TransfersSummary.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAA;AAE7C,OAAO,KAAK,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAA;AAGzE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AACzD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAEnD,eAAO,MAAM,0BAA0B,EAAE,MAA4C,CAAA;AACrF,MAAM,MAAM,0BAA0B,GAAG,OAAO,0BAA0B,CAAA;AAE1E,MAAM,MAAM,oBAAoB,GAAG,WAAW,CAAC;IAC7C,SAAS,EAAE,MAAM,CAAC,OAAO,EAAE,MAAM,CAAC,OAAO,EAAE,YAAY,CAAC,CAAC,CAAA;CAC1D,EAAE,0BAA0B,CAAC,CAAA;AAE9B;;GAEG;AACH,eAAO,MAAM,sBAAsB,mDAA0E,CAAA;AAC7G,eAAO,MAAM,sBAAsB,+DAAuE,CAAA;AAE1G;;GAEG;AACH,eAAO,MAAM,qCAAqC,GAAI,OAAO,OAAO,KAAG,KAAK,IAAI,eAAe,CAAC,oBAAoB,CAEnH,CAAA;AACD,eAAO,MAAM,qCAAqC,gFACsD,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/summary/model/index.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAA;AACxC,cAAc,yBAAyB,CAAA;AACvC,cAAc,kBAAkB,CAAA;AAChC,cAAc,cAAc,CAAA;AAC5B,cAAc,uBAAuB,CAAA"}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import type { Payload } from '@xyo-network/payload-model';
|
|
2
2
|
import type { Semaphore } from 'async-mutex';
|
|
3
|
-
import type { MapTypeRead, MapTypeWrite } from '
|
|
4
|
-
import type {
|
|
5
|
-
import type { BalancesStepSummary, TransfersStepSummary } from '
|
|
6
|
-
import type { BaseContext, ChainContextRead } from './index.ts';
|
|
3
|
+
import type { MapTypeRead, MapTypeWrite } from '../../map/index.ts';
|
|
4
|
+
import type { BaseContext, ChainContextRead } from '../../model/index.ts';
|
|
5
|
+
import type { BalancesStepSummary, SchemasStepSummary, TransfersStepSummary } from './index.ts';
|
|
7
6
|
export interface ChainSummaryContextBase<TPayload extends Payload, T extends (MapTypeRead<string, TPayload> | MapTypeWrite<string, TPayload>)> extends BaseContext {
|
|
8
7
|
stepSemaphores: Semaphore[];
|
|
9
8
|
summaryMap: T;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"summary.d.ts","sourceRoot":"","sources":["../../../../src/summary/model/summary.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;AACzD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAE5C,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AACnE,OAAO,KAAK,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAA;AACzE,OAAO,KAAK,EACV,mBAAmB,EAAE,kBAAkB,EAAE,oBAAoB,EAC9D,MAAM,YAAY,CAAA;AAEnB,MAAM,WAAW,uBAAuB,CAAC,QAAQ,SAAS,OAAO,EAC/D,CAAC,SAAS,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC,GAAG,YAAY,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAE,SAAQ,WAAW;IAC/F,cAAc,EAAE,SAAS,EAAE,CAAA;IAC3B,UAAU,EAAE,CAAC,CAAA;IACb,UAAU,CAAC,EAAE,MAAM,CAAA;CACpB;AAED,MAAM,WAAW,uBAAuB,CAAC,CAAC,SAAS,OAAO,CAAE,SAAQ,uBAAuB,CAAC,CAAC,EAAE,WAAW,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,gBAAgB;CAAG;AAE3I,MAAM,WAAW,wBAAwB,CAAC,CAAC,SAAS,OAAO,CAAE,SAAQ,uBAAuB,CAAC,CAAC,EAAE,YAAY,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,gBAAgB;CAAG;AAE7I,MAAM,MAAM,mBAAmB,CAAC,CAAC,SAAS,OAAO,IAAI,uBAAuB,CAAC,CAAC,CAAC,GAAG,wBAAwB,CAAC,CAAC,CAAC,CAAA;AAE7G,MAAM,WAAW,6BAA8B,SAAQ,uBAAuB,CAAC,mBAAmB,CAAC;CAAG;AAEtG,MAAM,WAAW,yBAA0B,SAAQ,mBAAmB,CAAC,mBAAmB,CAAC;CAAG;AAE9F,MAAM,WAAW,+BAAgC,SAAQ,uBAAuB,CAAC,oBAAoB,CAAC;CAAG;AAEzG,MAAM,WAAW,2BAA4B,SAAQ,mBAAmB,CAAC,oBAAoB,CAAC;CAAG;AAEjG,MAAM,WAAW,6BAA8B,SAAQ,uBAAuB,CAAC,kBAAkB,CAAC;CAAG;AAErG,MAAM,WAAW,yBAA0B,SAAQ,mBAAmB,CAAC,kBAAkB,CAAC;CAAG"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type { WithStorageMeta } from '@xyo-network/payload-model';
|
|
2
2
|
import type { XL1BlockRange } from '@xyo-network/xl1-protocol';
|
|
3
|
-
import type
|
|
4
|
-
import type { BalancesStepSummary } from '../../../payloads/index.ts';
|
|
3
|
+
import { type BalancesStepSummary, type BalanceStepSummaryContext } from '../../model/index.ts';
|
|
5
4
|
export declare function balancesStepSummaryFromRange(context: BalanceStepSummaryContext, range: XL1BlockRange): Promise<WithStorageMeta<BalancesStepSummary>>;
|
|
6
5
|
//# sourceMappingURL=balancesStepSummaryFromRange.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"balancesStepSummaryFromRange.d.ts","sourceRoot":"","sources":["../../../../../src/summary/primitives/balances/balancesStepSummaryFromRange.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAA;AAEjE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAA;AAW9D,OAAO,EACL,KAAK,mBAAmB,EAA6B,KAAK,yBAAyB,EACpF,MAAM,sBAAsB,CAAA;AAE7B,wBAAsB,4BAA4B,CAChD,OAAO,EAAE,yBAAyB,EAClC,KAAK,EAAE,aAAa,GACnB,OAAO,CAAC,eAAe,CAAC,mBAAmB,CAAC,CAAC,CA+D/C"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { Address } from '@xylabs/sdk-js';
|
|
2
|
+
import type { Qualified } from '../../../model/index.ts';
|
|
3
|
+
import type { BalanceStepSummaryContext } from '../../model/index.ts';
|
|
4
|
+
export declare function balancesSummary(context: BalanceStepSummaryContext): Promise<Qualified<Record<Address, bigint>>>;
|
|
5
|
+
//# sourceMappingURL=balancesSummary.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"balancesSummary.d.ts","sourceRoot":"","sources":["../../../../../src/summary/primitives/balances/balancesSummary.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAA;AAQ7C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAA;AAExD,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,sBAAsB,CAAA;AAGrE,wBAAsB,eAAe,CACnC,OAAO,EAAE,yBAAyB,GACjC,OAAO,CAAC,SAAS,CAAC,MAAM,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC,CAoB7C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/summary/primitives/balances/index.ts"],"names":[],"mappings":"AAAA,cAAc,mCAAmC,CAAA;AACjD,cAAc,sBAAsB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/primitives/
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/summary/primitives/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAA;AACnC,cAAc,oBAAoB,CAAA;AAClC,cAAc,sBAAsB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/summary/primitives/schemas/index.ts"],"names":[],"mappings":"AAAA,cAAc,kCAAkC,CAAA;AAChD,cAAc,qBAAqB,CAAA"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type { WithHashMeta } from '@xyo-network/payload-model';
|
|
2
2
|
import type { XL1BlockRange } from '@xyo-network/xl1-protocol';
|
|
3
|
-
import type
|
|
4
|
-
import type { SchemasStepSummary } from '../../../payloads/index.ts';
|
|
3
|
+
import { type SchemasStepSummary, type SchemasStepSummaryContext } from '../../model/index.ts';
|
|
5
4
|
export declare function schemasStepSummaryFromRange(context: SchemasStepSummaryContext, range: XL1BlockRange): Promise<WithHashMeta<SchemasStepSummary>>;
|
|
6
5
|
//# sourceMappingURL=schemasStepSummaryFromRange.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schemasStepSummaryFromRange.d.ts","sourceRoot":"","sources":["../../../../../src/summary/primitives/schemas/schemasStepSummaryFromRange.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACF,YAAY,EACrB,MAAM,4BAA4B,CAAA;AAEnC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAA;AAO9D,OAAO,EACL,KAAK,kBAAkB,EAAE,KAAK,yBAAyB,EACxD,MAAM,sBAAsB,CAAA;AAE7B,wBAAsB,2BAA2B,CAC/C,OAAO,EAAE,yBAAyB,EAClC,KAAK,EAAE,aAAa,GACnB,OAAO,CAAC,YAAY,CAAC,kBAAkB,CAAC,CAAC,CA6D3C"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { Schema } from '@xyo-network/payload-model';
|
|
2
|
+
import type { Qualified } from '../../../model/index.ts';
|
|
3
|
+
import type { SchemasStepSummaryContext } from '../../model/index.ts';
|
|
4
|
+
export declare function schemasSummary(context: SchemasStepSummaryContext): Promise<Qualified<Record<Schema, number>>>;
|
|
5
|
+
//# sourceMappingURL=schemasSummary.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schemasSummary.d.ts","sourceRoot":"","sources":["../../../../../src/summary/primitives/schemas/schemasSummary.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAA;AAMxD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAA;AACxD,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,sBAAsB,CAAA;AAGrE,wBAAsB,cAAc,CAClC,OAAO,EAAE,yBAAyB,GACjC,OAAO,CAAC,SAAS,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,CAmB5C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/summary/primitives/transfers/index.ts"],"names":[],"mappings":"AAAA,cAAc,oCAAoC,CAAA;AAClD,cAAc,uBAAuB,CAAA"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type { WithStorageMeta } from '@xyo-network/payload-model';
|
|
2
2
|
import type { XL1BlockRange } from '@xyo-network/xl1-protocol';
|
|
3
|
-
import type
|
|
4
|
-
import type { TransfersStepSummary } from '../../../payloads/index.ts';
|
|
3
|
+
import { type TransfersStepSummary, type TransfersStepSummaryContext } from '../../model/index.ts';
|
|
5
4
|
export declare function transfersStepSummaryFromRange(context: TransfersStepSummaryContext, range: XL1BlockRange): Promise<WithStorageMeta<TransfersStepSummary>>;
|
|
6
5
|
//# sourceMappingURL=transfersStepSummaryFromRange.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transfersStepSummaryFromRange.d.ts","sourceRoot":"","sources":["../../../../../src/summary/primitives/transfers/transfersStepSummaryFromRange.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAA;AAEjE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAA;AAU9D,OAAO,EACL,KAAK,oBAAoB,EAAE,KAAK,2BAA2B,EAC5D,MAAM,sBAAsB,CAAA;AAG7B,wBAAsB,6BAA6B,CACjD,OAAO,EAAE,2BAA2B,EACpC,KAAK,EAAE,aAAa,GACnB,OAAO,CAAC,eAAe,CAAC,oBAAoB,CAAC,CAAC,CA0EhD"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { Address, Hash } from '@xylabs/sdk-js';
|
|
2
|
+
import type { Qualified } from '../../../model/index.ts';
|
|
3
|
+
import type { TransfersStepSummaryContext } from '../../index.ts';
|
|
4
|
+
export declare function transfersSummary(transferContext: TransfersStepSummaryContext): Promise<Qualified<Record<Address, Record<Address, bigint>>>>;
|
|
5
|
+
export declare function transfersSummaryKey(frameHeadHash: Hash, frameSize: number): string;
|
|
6
|
+
//# sourceMappingURL=transfersSummary.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transfersSummary.d.ts","sourceRoot":"","sources":["../../../../../src/summary/primitives/transfers/transfersSummary.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAA;AAQnD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAA;AAExD,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,gBAAgB,CAAA;AAIjE,wBAAsB,gBAAgB,CACpC,eAAe,EAAE,2BAA2B,GAC3C,OAAO,CAAC,SAAS,CAAC,MAAM,CAAC,OAAO,EAAE,MAAM,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,CAwB9D;AAED,wBAAgB,mBAAmB,CAAC,aAAa,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,UAEzE"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { Hash } from '@xylabs/sdk-js';
|
|
2
|
+
import type { Payload, WithStorageMeta } from '@xyo-network/payload-model';
|
|
3
|
+
import { LRUCache } from 'lru-cache';
|
|
4
|
+
import type { PayloadMapRead } from '../model/index.ts';
|
|
5
|
+
export type HydrateFunction<T> = (context: {
|
|
6
|
+
chainMap: PayloadMapRead<WithStorageMeta<Payload>>;
|
|
7
|
+
}, hash: Hash) => Promise<T | undefined>;
|
|
8
|
+
export declare class HydratedCache<T extends {}> {
|
|
9
|
+
protected readonly cache: LRUCache<Hash, T>;
|
|
10
|
+
protected readonly chainMap: PayloadMapRead<WithStorageMeta<Payload>>;
|
|
11
|
+
protected readonly hydrateFunction: HydrateFunction<T>;
|
|
12
|
+
constructor(chainMap: PayloadMapRead<WithStorageMeta<Payload>>, hydrateFunction: HydrateFunction<T>, maxSize?: number);
|
|
13
|
+
get(hash: Hash): Promise<T | null>;
|
|
14
|
+
has(hash: Hash): boolean;
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=HydratedCache.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HydratedCache.d.ts","sourceRoot":"","sources":["../../../src/utils/HydratedCache.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAA;AAC1C,OAAO,KAAK,EAAE,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAA;AAC1E,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAA;AAEpC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AAEvD,MAAM,MAAM,eAAe,CAAC,CAAC,IAAI,CAC/B,OAAO,EAAE;IAAE,QAAQ,EAAE,cAAc,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC,CAAA;CAAE,EAC/D,IAAI,EAAE,IAAI,KACP,OAAO,CAAC,CAAC,GAAG,SAAS,CAAC,CAAA;AAE3B,qBAAa,aAAa,CAAC,CAAC,SAAS,EAAE;IACrC,SAAS,CAAC,QAAQ,CAAC,KAAK,EAAE,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAC,CAAA;IAC3C,SAAS,CAAC,QAAQ,CAAC,QAAQ,EAAE,cAAc,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC,CAAA;IACrE,SAAS,CAAC,QAAQ,CAAC,eAAe,EAAE,eAAe,CAAC,CAAC,CAAC,CAAA;gBAGpD,QAAQ,EAAE,cAAc,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC,EAClD,eAAe,EAAE,eAAe,CAAC,CAAC,CAAC,EACnC,OAAO,GAAE,MAAY;IAOjB,GAAG,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO,CAAC,CAAC,GAAG,IAAI,CAAC;IAQxC,GAAG,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO;CAGzB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAA;AAClC,cAAc,iBAAiB,CAAA"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { Address, Hash, Promisable } from '@xylabs/sdk-js';
|
|
2
2
|
import { type AttoXL1, type XL1BlockRange } from '@xyo-network/xl1-protocol';
|
|
3
3
|
import z from 'zod';
|
|
4
|
+
import type { Qualified } from '../model/index.ts';
|
|
4
5
|
export declare const AccountBalanceHistoryItemZod: z.ZodTuple<[z.ZodObject<{
|
|
5
6
|
schema: z.ZodLiteral<"network.xyo.boundwitness">;
|
|
6
7
|
addresses: z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<import("@xylabs/sdk-js").Address, string>>>;
|
|
@@ -52,11 +53,13 @@ export declare const AccountBalanceHistoryItemZod: z.ZodTuple<[z.ZodObject<{
|
|
|
52
53
|
}, z.z.core.$strip>], null>;
|
|
53
54
|
export type AccountBalanceHistoryItem = z.infer<typeof AccountBalanceHistoryItemZod>;
|
|
54
55
|
export interface AccountBalanceViewerMethods {
|
|
55
|
-
|
|
56
|
-
|
|
56
|
+
qualifiedAccountBalanceHistories(address: Address[], headOrRange?: Hash | XL1BlockRange): Promisable<Qualified<Record<Address, AccountBalanceHistoryItem[]>>>;
|
|
57
|
+
qualifiedAccountBalances(address: Address[], headOrRange?: Hash | XL1BlockRange): Promisable<Qualified<Record<Address, AttoXL1>>>;
|
|
57
58
|
}
|
|
58
59
|
export interface AccountBalanceViewer extends AccountBalanceViewerMethods {
|
|
59
60
|
accountBalance(address: Address, headOrRange?: Hash | XL1BlockRange): Promisable<AttoXL1>;
|
|
61
|
+
accountBalanceHistories(address: Address[], headOrRange?: Hash | XL1BlockRange): Promisable<Record<Address, AccountBalanceHistoryItem[]>>;
|
|
60
62
|
accountBalanceHistory(address: Address, headOrRange?: Hash | XL1BlockRange): Promisable<AccountBalanceHistoryItem[]>;
|
|
63
|
+
accountBalances(address: Address[], headOrRange?: Hash | XL1BlockRange): Promisable<Record<Address, AttoXL1>>;
|
|
61
64
|
}
|
|
62
65
|
//# sourceMappingURL=AccountBalance.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AccountBalance.d.ts","sourceRoot":"","sources":["../../../src/viewers/AccountBalance.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,OAAO,EAAE,IAAI,EAAE,UAAU,EAC1B,MAAM,gBAAgB,CAAA;AAEvB,OAAO,EACL,KAAK,OAAO,EAEZ,KAAK,aAAa,EACnB,MAAM,2BAA2B,CAAA;AAElC,OAAO,CAAC,MAAM,KAAK,CAAA;AAEnB,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2BAIvC,CAAA;AAEF,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAA;AAEpF,MAAM,WAAW,2BAA2B;IAC1C,
|
|
1
|
+
{"version":3,"file":"AccountBalance.d.ts","sourceRoot":"","sources":["../../../src/viewers/AccountBalance.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,OAAO,EAAE,IAAI,EAAE,UAAU,EAC1B,MAAM,gBAAgB,CAAA;AAEvB,OAAO,EACL,KAAK,OAAO,EAEZ,KAAK,aAAa,EACnB,MAAM,2BAA2B,CAAA;AAElC,OAAO,CAAC,MAAM,KAAK,CAAA;AAEnB,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAA;AAElD,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2BAIvC,CAAA;AAEF,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAA;AAEpF,MAAM,WAAW,2BAA2B;IAC1C,gCAAgC,CAC9B,OAAO,EAAE,OAAO,EAAE,EAClB,WAAW,CAAC,EAAE,IAAI,GAAG,aAAa,GACjC,UAAU,CAAC,SAAS,CAAC,MAAM,CAAC,OAAO,EAAE,yBAAyB,EAAE,CAAC,CAAC,CAAC,CAAA;IACtE,wBAAwB,CAAC,OAAO,EAAE,OAAO,EAAE,EAAE,WAAW,CAAC,EAAE,IAAI,GAAG,aAAa,GAAG,UAAU,CAAC,SAAS,CAAC,MAAM,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,CAAA;CAClI;AAED,MAAM,WAAW,oBAAqB,SAAQ,2BAA2B;IACvE,cAAc,CAAC,OAAO,EAAE,OAAO,EAAE,WAAW,CAAC,EAAE,IAAI,GAAG,aAAa,GAAG,UAAU,CAAC,OAAO,CAAC,CAAA;IACzF,uBAAuB,CAAC,OAAO,EAAE,OAAO,EAAE,EAAE,WAAW,CAAC,EAAE,IAAI,GAAG,aAAa,GAAG,UAAU,CAAC,MAAM,CAAC,OAAO,EAAE,yBAAyB,EAAE,CAAC,CAAC,CAAA;IACzI,qBAAqB,CAAC,OAAO,EAAE,OAAO,EAAE,WAAW,CAAC,EAAE,IAAI,GAAG,aAAa,GAAG,UAAU,CAAC,yBAAyB,EAAE,CAAC,CAAA;IACpH,eAAe,CAAC,OAAO,EAAE,OAAO,EAAE,EAAE,WAAW,CAAC,EAAE,IAAI,GAAG,aAAa,GAAG,UAAU,CAAC,MAAM,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,CAAA;CAC9G"}
|
|
@@ -1,13 +1,17 @@
|
|
|
1
1
|
import type { Hash, Promisable } from '@xylabs/sdk-js';
|
|
2
|
+
import type { Payload, WithHashMeta } from '@xyo-network/payload-model';
|
|
2
3
|
import type { SignedHydratedBlockWithHashMeta, XL1BlockNumber } from '@xyo-network/xl1-protocol';
|
|
3
|
-
export interface
|
|
4
|
-
blockByHash(hash: Hash): Promisable<SignedHydratedBlockWithHashMeta | null>;
|
|
5
|
-
blockByNumber(block: XL1BlockNumber): Promisable<SignedHydratedBlockWithHashMeta | null>;
|
|
4
|
+
export interface BlockViewerMethods {
|
|
6
5
|
blocksByHash(hash: Hash, limit?: number): Promisable<SignedHydratedBlockWithHashMeta[]>;
|
|
6
|
+
blocksByNumber(block: XL1BlockNumber, limit?: number): Promisable<SignedHydratedBlockWithHashMeta[]>;
|
|
7
7
|
currentBlock(): Promisable<SignedHydratedBlockWithHashMeta>;
|
|
8
|
+
payloadsByHash(hashes: Hash[]): Promisable<WithHashMeta<Payload>[]>;
|
|
9
|
+
}
|
|
10
|
+
export interface BlockViewer extends BlockViewerMethods {
|
|
11
|
+
blockByHash(hash: Hash): Promisable<SignedHydratedBlockWithHashMeta | null>;
|
|
12
|
+
blockByNumber(block: XL1BlockNumber): Promisable<SignedHydratedBlockWithHashMeta | null>;
|
|
8
13
|
currentBlockHash(): Promisable<Hash>;
|
|
9
14
|
currentBlockNumber(): Promisable<XL1BlockNumber>;
|
|
10
|
-
|
|
11
|
-
export interface BlockViewer extends BlockViewierMethods {
|
|
15
|
+
payloadByHash(hash: Hash): Promisable<WithHashMeta<Payload> | null>;
|
|
12
16
|
}
|
|
13
17
|
//# sourceMappingURL=Block.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Block.d.ts","sourceRoot":"","sources":["../../../src/viewers/Block.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAA;AACtD,OAAO,KAAK,EAAE,+BAA+B,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAA;AAEhG,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"Block.d.ts","sourceRoot":"","sources":["../../../src/viewers/Block.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAA;AACtD,OAAO,KAAK,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAA;AACvE,OAAO,KAAK,EAAE,+BAA+B,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAA;AAEhG,MAAM,WAAW,kBAAkB;IACjC,YAAY,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,UAAU,CAAC,+BAA+B,EAAE,CAAC,CAAA;IACvF,cAAc,CAAC,KAAK,EAAE,cAAc,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,UAAU,CAAC,+BAA+B,EAAE,CAAC,CAAA;IACpG,YAAY,IAAI,UAAU,CAAC,+BAA+B,CAAC,CAAA;IAC3D,cAAc,CAAC,MAAM,EAAE,IAAI,EAAE,GAAG,UAAU,CAAC,YAAY,CAAC,OAAO,CAAC,EAAE,CAAC,CAAA;CACpE;AAED,MAAM,WAAW,WAAY,SAAQ,kBAAkB;IACrD,WAAW,CAAC,IAAI,EAAE,IAAI,GAAG,UAAU,CAAC,+BAA+B,GAAG,IAAI,CAAC,CAAA;IAC3E,aAAa,CAAC,KAAK,EAAE,cAAc,GAAG,UAAU,CAAC,+BAA+B,GAAG,IAAI,CAAC,CAAA;IACxF,gBAAgB,IAAI,UAAU,CAAC,IAAI,CAAC,CAAA;IACpC,kBAAkB,IAAI,UAAU,CAAC,cAAc,CAAC,CAAA;IAChD,aAAa,CAAC,IAAI,EAAE,IAAI,GAAG,UAAU,CAAC,YAAY,CAAC,OAAO,CAAC,GAAG,IAAI,CAAC,CAAA;CACpE"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { Promisable } from '@xylabs/sdk-js';
|
|
2
|
+
import type { AttoXL1, XL1BlockNumber } from '@xyo-network/xl1-protocol';
|
|
3
|
+
export interface BlockRewardViewerMethods {
|
|
4
|
+
allowedRewardForBlock(block: XL1BlockNumber): Promisable<AttoXL1>;
|
|
5
|
+
}
|
|
6
|
+
export interface BlockRewardViewer extends BlockRewardViewerMethods {
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=BlockReward.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BlockReward.d.ts","sourceRoot":"","sources":["../../../src/viewers/BlockReward.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAA;AAChD,OAAO,KAAK,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAA;AAExE,MAAM,WAAW,wBAAwB;IAEvC,qBAAqB,CAAC,KAAK,EAAE,cAAc,GAAG,UAAU,CAAC,OAAO,CAAC,CAAA;CAClE;AAED,MAAM,WAAW,iBAAkB,SAAQ,wBAAwB;CAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Chain.d.ts","sourceRoot":"","sources":["../../../src/viewers/Chain.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAA;AAChD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAA;AAExD,MAAM,WAAW,kBAAkB;IACjC,OAAO,IAAI,UAAU,CAAC,OAAO,CAAC,CAAA;CAC/B"}
|
|
1
|
+
{"version":3,"file":"Chain.d.ts","sourceRoot":"","sources":["../../../src/viewers/Chain.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAA;AAChD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAA;AAExD,MAAM,WAAW,kBAAkB;IACjC,OAAO,IAAI,UAAU,CAAC,OAAO,CAAC,CAAA;CAC/B;AAED,MAAM,WAAW,WAAY,SAAQ,kBAAkB;CAAG"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { ChainViewer } from './Chain.ts';
|
|
2
|
+
import type { ChainContractViewer } from './ChainContract.ts';
|
|
3
|
+
import type { StakeTotalsViewer } from './StakeTotals.ts';
|
|
4
|
+
export interface ChainStakeViewer extends ChainContractViewer, StakeTotalsViewer, ChainViewer {
|
|
5
|
+
}
|
|
6
|
+
//# sourceMappingURL=ChainStakeViewer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ChainStakeViewer.d.ts","sourceRoot":"","sources":["../../../src/viewers/ChainStakeViewer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AAC7C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAA;AAC7D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAA;AAEzD,MAAM,WAAW,gBAAiB,SAAQ,mBAAmB,EAAE,iBAAiB,EAAE,WAAW;CAE5F"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { SignedHydratedTransactionWithHashMeta } from '@xyo-network/xl1-protocol';
|
|
1
|
+
import type { SignedHydratedBlockWithHashMeta, SignedHydratedTransactionWithHashMeta } from '@xyo-network/xl1-protocol';
|
|
2
2
|
import z from 'zod';
|
|
3
3
|
export declare const PendingTransactionsOptionsZod: z.ZodObject<{
|
|
4
4
|
cursor: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<import("@xylabs/sdk-js").Hash, string>>>;
|
|
@@ -6,7 +6,14 @@ export declare const PendingTransactionsOptionsZod: z.ZodObject<{
|
|
|
6
6
|
window: z.ZodOptional<z.ZodTuple<[z.ZodPipe<z.ZodNumber, z.ZodTransform<import("@xyo-network/xl1-protocol").XL1BlockNumber, number>>, z.ZodPipe<z.ZodNumber, z.ZodTransform<import("@xyo-network/xl1-protocol").XL1BlockNumber, number>>], null>>;
|
|
7
7
|
}, z.z.core.$strip>;
|
|
8
8
|
export type PendingTransactionsOptions = z.infer<typeof PendingTransactionsOptionsZod>;
|
|
9
|
+
export declare const PendingBlocksOptionsZod: z.ZodObject<{
|
|
10
|
+
cursor: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<import("@xylabs/sdk-js").Hash, string>>>;
|
|
11
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
12
|
+
window: z.ZodOptional<z.ZodTuple<[z.ZodPipe<z.ZodNumber, z.ZodTransform<import("@xyo-network/xl1-protocol").XL1BlockNumber, number>>, z.ZodPipe<z.ZodNumber, z.ZodTransform<import("@xyo-network/xl1-protocol").XL1BlockNumber, number>>], null>>;
|
|
13
|
+
}, z.z.core.$strip>;
|
|
14
|
+
export type PendingBlocksOptions = z.infer<typeof PendingBlocksOptionsZod>;
|
|
9
15
|
export interface MempoolViewerMethods {
|
|
16
|
+
pendingBlocks(options?: PendingBlocksOptions): Promise<SignedHydratedBlockWithHashMeta[]>;
|
|
10
17
|
pendingTransactions(options?: PendingTransactionsOptions): Promise<SignedHydratedTransactionWithHashMeta[]>;
|
|
11
18
|
}
|
|
12
19
|
export interface MempoolViewer extends MempoolViewerMethods {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Mempool.d.ts","sourceRoot":"","sources":["../../../src/viewers/Mempool.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,qCAAqC,EAAE,MAAM,2BAA2B,CAAA;
|
|
1
|
+
{"version":3,"file":"Mempool.d.ts","sourceRoot":"","sources":["../../../src/viewers/Mempool.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,+BAA+B,EAAE,qCAAqC,EAAE,MAAM,2BAA2B,CAAA;AAEvH,OAAO,CAAC,MAAM,KAAK,CAAA;AAEnB,eAAO,MAAM,6BAA6B;;;;mBAIxC,CAAA;AAEF,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,6BAA6B,CAAC,CAAA;AAEtF,eAAO,MAAM,uBAAuB;;;;mBAIlC,CAAA;AAEF,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAA;AAE1E,MAAM,WAAW,oBAAoB;IACnC,aAAa,CAAC,OAAO,CAAC,EAAE,oBAAoB,GAAG,OAAO,CAAC,+BAA+B,EAAE,CAAC,CAAA;IACzF,mBAAmB,CAAC,OAAO,CAAC,EAAE,0BAA0B,GAAG,OAAO,CAAC,qCAAqC,EAAE,CAAC,CAAA;CAC5G;AAED,MAAM,WAAW,aAAc,SAAQ,oBAAoB;CAAG"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { Address, Hash, Promisable } from '@xylabs/sdk-js';
|
|
2
|
+
import type { ChainStakeIntent, XL1BlockRange } from '@xyo-network/xl1-protocol';
|
|
3
|
+
import type { Qualified } from '../model/index.ts';
|
|
4
|
+
export interface StakeIntentViewerMethods {
|
|
5
|
+
qualifiedIntentByAddress(address: Address, headOrRange?: Hash | XL1BlockRange): Promisable<Qualified<ChainStakeIntent | null>>;
|
|
6
|
+
}
|
|
7
|
+
export interface StakeIntentViewer extends StakeIntentViewerMethods {
|
|
8
|
+
intentByAddress(address: Address, headOrRange?: Hash | XL1BlockRange): Promisable<ChainStakeIntent | null>;
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=StakeIntent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StakeIntent.d.ts","sourceRoot":"","sources":["../../../src/viewers/StakeIntent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,OAAO,EAAE,IAAI,EAAE,UAAU,EAC1B,MAAM,gBAAgB,CAAA;AACvB,OAAO,KAAK,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAA;AAEhF,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAA;AAElD,MAAM,WAAW,wBAAwB;IACvC,wBAAwB,CAAC,OAAO,EAAE,OAAO,EAAE,WAAW,CAAC,EAAE,IAAI,GAAG,aAAa,GAAG,UAAU,CAAC,SAAS,CAAC,gBAAgB,GAAG,IAAI,CAAC,CAAC,CAAA;CAC/H;AAED,MAAM,WAAW,iBAAkB,SAAQ,wBAAwB;IACjE,eAAe,CAAC,OAAO,EAAE,OAAO,EAAE,WAAW,CAAC,EAAE,IAAI,GAAG,aAAa,GAAG,UAAU,CAAC,gBAAgB,GAAG,IAAI,CAAC,CAAA;CAC3G"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Address, Promisable } from '@xylabs/sdk-js';
|
|
2
2
|
import type { PositionId, StepIdentity } from '@xyo-network/xl1-protocol';
|
|
3
|
-
import type { Position } from '
|
|
4
|
-
import type { NetworkStakeStepRewardsViewer } from '
|
|
3
|
+
import type { Position } from '../model/index.ts';
|
|
4
|
+
import type { NetworkStakeStepRewardsViewer } from '../provider/index.ts';
|
|
5
5
|
export interface PagedPositionsOptions {
|
|
6
6
|
cursor?: PositionId;
|
|
7
7
|
limit?: number;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StepViewer.d.ts","sourceRoot":"","sources":["../../../src/viewers/StepViewer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAA;AACzD,OAAO,KAAK,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AAEzE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AACjD,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,sBAAsB,CAAA;AAEzE,MAAM,WAAW,qBAAqB;IACpC,MAAM,CAAC,EAAE,UAAU,CAAA;IACnB,KAAK,CAAC,EAAE,MAAM,CAAA;CACf;AAED,MAAM,WAAW,mBAAmB;IAClC,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,KAAK,CAAC,EAAE,MAAM,CAAA;CACf;AAED,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,MAAM,CAAA;IACf,SAAS,EAAE,MAAM,CAAA;CAClB;AAED,MAAM,WAAW,iBAAiB;IAGhC,aAAa,CAAC,IAAI,EAAE,YAAY,GAAG,UAAU,CAAC,MAAM,CAAC,CAAA;IAErD,SAAS,CAAC,IAAI,EAAE,YAAY,EAAE,OAAO,CAAC,EAAE,qBAAqB,GAAG,UAAU,CAAC,QAAQ,EAAE,CAAC,CAAA;IAGtF,UAAU,CAAC,IAAI,EAAE,YAAY,GAAG,UAAU,CAAC,MAAM,CAAC,CAAA;IAGlD,KAAK,CAAC,IAAI,EAAE,YAAY,GAAG,UAAU,CAAC,MAAM,CAAC,CAAA;IAG7C,WAAW,CAAC,IAAI,EAAE,YAAY,GAAG,UAAU,CAAC,MAAM,CAAC,CAAA;IAEnD,OAAO,CAAC,IAAI,EAAE,YAAY,EAAE,OAAO,CAAC,EAAE,mBAAmB,GAAG,UAAU,CAAC,OAAO,EAAE,CAAC,CAAA;IAGjF,MAAM,CAAC,IAAI,EAAE,YAAY,EAAE,UAAU,CAAC,EAAE,UAAU,GAAG,UAAU,CAAC,MAAM,CAAC,CAAA;CACxE;AAED,MAAM,WAAW,UAAW,SAAQ,iBAAiB;IACnD,OAAO,CAAC,EAAE,6BAA6B,CAAA;CACxC"}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
export * from './AccountBalance.ts';
|
|
2
2
|
export * from './Block.ts';
|
|
3
|
+
export * from './BlockReward.ts';
|
|
3
4
|
export * from './Chain.ts';
|
|
4
5
|
export * from './ChainContract.ts';
|
|
6
|
+
export * from './ChainStakeViewer.ts';
|
|
5
7
|
export * from './Fork.ts';
|
|
6
8
|
export * from './Mempool.ts';
|
|
7
9
|
export * from './NetworkStakeStepReward.ts';
|
|
@@ -9,6 +11,7 @@ export * from './Stake.ts';
|
|
|
9
11
|
export * from './StakeEvents.ts';
|
|
10
12
|
export * from './StakeTotals.ts';
|
|
11
13
|
export * from './StepStake.ts';
|
|
14
|
+
export * from './StepViewer.ts';
|
|
12
15
|
export * from './TimeSync.ts';
|
|
13
16
|
export * from './Transaction.ts';
|
|
14
17
|
export * from './TransferBalance.ts';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/viewers/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAA;AACnC,cAAc,YAAY,CAAA;AAC1B,cAAc,YAAY,CAAA;AAC1B,cAAc,oBAAoB,CAAA;AAClC,cAAc,WAAW,CAAA;AACzB,cAAc,cAAc,CAAA;AAC5B,cAAc,6BAA6B,CAAA;AAC3C,cAAc,YAAY,CAAA;AAC1B,cAAc,kBAAkB,CAAA;AAChC,cAAc,kBAAkB,CAAA;AAChC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,eAAe,CAAA;AAC7B,cAAc,kBAAkB,CAAA;AAChC,cAAc,sBAAsB,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/viewers/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAA;AACnC,cAAc,YAAY,CAAA;AAC1B,cAAc,kBAAkB,CAAA;AAChC,cAAc,YAAY,CAAA;AAC1B,cAAc,oBAAoB,CAAA;AAClC,cAAc,uBAAuB,CAAA;AACrC,cAAc,WAAW,CAAA;AACzB,cAAc,cAAc,CAAA;AAC5B,cAAc,6BAA6B,CAAA;AAC3C,cAAc,YAAY,CAAA;AAC1B,cAAc,kBAAkB,CAAA;AAChC,cAAc,kBAAkB,CAAA;AAChC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,eAAe,CAAA;AAC7B,cAAc,kBAAkB,CAAA;AAChC,cAAc,sBAAsB,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-sdk",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.17.1",
|
|
5
5
|
"description": "XYO Layer One SDK Protocol",
|
|
6
6
|
"homepage": "https://xylabs.com",
|
|
7
7
|
"bugs": {
|
|
@@ -39,34 +39,34 @@
|
|
|
39
39
|
"!**/*.test.*"
|
|
40
40
|
],
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@xylabs/sdk-js": "~5.0.
|
|
43
|
-
"@xylabs/telemetry": "~5.0.
|
|
44
|
-
"@xyo-network/account": "~5.2.
|
|
45
|
-
"@xyo-network/account-model": "~5.2.
|
|
46
|
-
"@xyo-network/archivist-memory": "~5.2.
|
|
47
|
-
"@xyo-network/archivist-model": "~5.2.
|
|
48
|
-
"@xyo-network/boundwitness-builder": "~5.2.
|
|
49
|
-
"@xyo-network/boundwitness-model": "~5.2.
|
|
50
|
-
"@xyo-network/payload-builder": "~5.2.
|
|
51
|
-
"@xyo-network/payload-model": "~5.2.
|
|
52
|
-
"@xyo-network/wallet": "~5.2.
|
|
53
|
-
"@xyo-network/wallet-model": "~5.2.
|
|
54
|
-
"@xyo-network/xl1-protocol": "~1.14.
|
|
42
|
+
"@xylabs/sdk-js": "~5.0.48",
|
|
43
|
+
"@xylabs/telemetry": "~5.0.48",
|
|
44
|
+
"@xyo-network/account": "~5.2.13",
|
|
45
|
+
"@xyo-network/account-model": "~5.2.13",
|
|
46
|
+
"@xyo-network/archivist-memory": "~5.2.13",
|
|
47
|
+
"@xyo-network/archivist-model": "~5.2.13",
|
|
48
|
+
"@xyo-network/boundwitness-builder": "~5.2.13",
|
|
49
|
+
"@xyo-network/boundwitness-model": "~5.2.13",
|
|
50
|
+
"@xyo-network/payload-builder": "~5.2.13",
|
|
51
|
+
"@xyo-network/payload-model": "~5.2.13",
|
|
52
|
+
"@xyo-network/wallet": "~5.2.13",
|
|
53
|
+
"@xyo-network/wallet-model": "~5.2.13",
|
|
54
|
+
"@xyo-network/xl1-protocol": "~1.14.16",
|
|
55
55
|
"async-mutex": "~0.5.0",
|
|
56
56
|
"ethers": "~6.15.0",
|
|
57
|
-
"lru-cache": "^11.2.
|
|
57
|
+
"lru-cache": "^11.2.4",
|
|
58
58
|
"zod": "~4.1.13"
|
|
59
59
|
},
|
|
60
60
|
"devDependencies": {
|
|
61
61
|
"@types/node": "~24.10.1",
|
|
62
62
|
"@xylabs/ts-scripts-yarn3": "~7.2.8",
|
|
63
63
|
"@xylabs/tsconfig": "~7.2.8",
|
|
64
|
-
"@xyo-network/account": "~5.2.
|
|
65
|
-
"@xyo-network/boundwitness-validator": "~5.2.
|
|
64
|
+
"@xyo-network/account": "~5.2.13",
|
|
65
|
+
"@xyo-network/boundwitness-validator": "~5.2.13",
|
|
66
66
|
"axios": "^1.13.2",
|
|
67
67
|
"eslint": "^9.39.1",
|
|
68
68
|
"typescript": "~5.9.3",
|
|
69
|
-
"vitest": "~4.0.
|
|
69
|
+
"vitest": "~4.0.15"
|
|
70
70
|
},
|
|
71
71
|
"peerDependencies": {
|
|
72
72
|
"axios": "^1.13.2"
|
|
@@ -1,13 +1,10 @@
|
|
|
1
|
-
import type { ArchivistInstance, WriteArchivist } from '@xyo-network/archivist-model'
|
|
2
1
|
import type { WalletInstance } from '@xyo-network/wallet-model'
|
|
3
2
|
|
|
3
|
+
import type { MempoolRunner } from './runners/index.ts'
|
|
4
|
+
import type { BlockProducerService } from './services/index.ts'
|
|
4
5
|
import type {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
PendingTransactionsService,
|
|
8
|
-
StakeIntentService,
|
|
9
|
-
} from './services/index.ts'
|
|
10
|
-
import type { AccountBalanceViewer, ChainContractViewer } from './viewers/index.ts'
|
|
6
|
+
AccountBalanceViewer, BlockRewardViewer, BlockViewer, ChainContractViewer, ChainStakeViewer, MempoolViewer,
|
|
7
|
+
} from './viewers/index.ts'
|
|
11
8
|
|
|
12
9
|
export interface ChainServiceCollectionV2 {
|
|
13
10
|
|
|
@@ -20,43 +17,23 @@ export interface ChainServiceCollectionV2 {
|
|
|
20
17
|
*/
|
|
21
18
|
balance: AccountBalanceViewer
|
|
22
19
|
/**
|
|
23
|
-
* The
|
|
20
|
+
* The chain iterator
|
|
24
21
|
*/
|
|
25
|
-
|
|
22
|
+
blockViewer?: BlockViewer
|
|
26
23
|
/**
|
|
27
24
|
* Service for viewing codified chain information
|
|
28
25
|
* from a contract
|
|
29
26
|
*/
|
|
30
27
|
chainContractViewer: ChainContractViewer
|
|
31
|
-
|
|
32
|
-
* The chain iterator
|
|
33
|
-
*/
|
|
34
|
-
chainIterator?: EventingChainBlockNumberIteratorService
|
|
28
|
+
|
|
35
29
|
/**
|
|
36
30
|
* Service for viewing stake information
|
|
37
31
|
*/
|
|
38
32
|
chainStakeViewer: ChainStakeViewer
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
/**
|
|
44
|
-
* The archivist which the chain submissions are stored in
|
|
45
|
-
*/
|
|
46
|
-
chainSubmissionsArchivistWrite: WriteArchivist
|
|
47
|
-
/**
|
|
48
|
-
* Service for determining leader election
|
|
49
|
-
*/
|
|
50
|
-
election: ElectionService
|
|
51
|
-
/**
|
|
52
|
-
* The archivist which the pending transactions are stored
|
|
53
|
-
* as bundled transactions
|
|
54
|
-
*/
|
|
55
|
-
pendingBundledTransactionsArchivistWrite: ArchivistInstance
|
|
56
|
-
/**
|
|
57
|
-
* Service for managing pending transactions
|
|
58
|
-
*/
|
|
59
|
-
pendingTransactions: PendingTransactionsService
|
|
33
|
+
|
|
34
|
+
mempoolRunner: MempoolRunner
|
|
35
|
+
mempoolViewer: MempoolViewer
|
|
36
|
+
|
|
60
37
|
/**
|
|
61
38
|
* The block producer service
|
|
62
39
|
*/
|
|
@@ -64,9 +41,5 @@ export interface ChainServiceCollectionV2 {
|
|
|
64
41
|
/**
|
|
65
42
|
* Service response for calculating block rewards
|
|
66
43
|
*/
|
|
67
|
-
reward:
|
|
68
|
-
/**
|
|
69
|
-
* Services for working with staked intents
|
|
70
|
-
*/
|
|
71
|
-
stakeIntent: StakeIntentService
|
|
44
|
+
reward: BlockRewardViewer
|
|
72
45
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type { HydratedBlockWithHashMeta } from '@xyo-network/xl1-protocol'
|
|
1
|
+
import type { HydratedBlock } from '@xyo-network/xl1-protocol'
|
|
3
2
|
|
|
4
3
|
import { flattenHydratedBlock } from './flattenHydratedBlock.ts'
|
|
5
4
|
|
|
6
|
-
export const flattenHydratedBlocks = (hydratedBlocks:
|
|
5
|
+
export const flattenHydratedBlocks = <T extends HydratedBlock>(hydratedBlocks: T[]): (T[0] | T[1][number])[] =>
|
|
7
6
|
hydratedBlocks.flatMap(blk => flattenHydratedBlock(blk))
|
package/src/index.ts
CHANGED
|
@@ -11,13 +11,14 @@ export * from './multipliers.ts'
|
|
|
11
11
|
export * from './payloads/index.ts'
|
|
12
12
|
export * from './primitives/index.ts'
|
|
13
13
|
export * from './provider/index.ts'
|
|
14
|
+
export * from './runners/index.ts'
|
|
14
15
|
export * from './services/index.ts'
|
|
15
16
|
export * from './SignedBigInt.ts'
|
|
16
17
|
export * from './simple/index.ts'
|
|
18
|
+
export * from './summary/index.ts'
|
|
17
19
|
export * from './time/index.ts'
|
|
18
20
|
export * from './transaction/index.ts'
|
|
19
21
|
export * from './utils/index.ts'
|
|
20
22
|
export * from './validation/index.ts'
|
|
21
23
|
export * from './viewers/index.ts'
|
|
22
24
|
export * from './wallet/index.ts'
|
|
23
|
-
// export * from './zod/index.ts'
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { PayloadBuilder } from '@xyo-network/payload-builder'
|
|
2
|
+
import type { PayloadBundle, WithHashMeta } from '@xyo-network/payload-model'
|
|
3
|
+
import type { SignedHydratedBlockWithHashMeta } from '@xyo-network/xl1-protocol'
|
|
4
|
+
import { asSignedBlockBoundWitnessWithHashMeta } from '@xyo-network/xl1-protocol'
|
|
5
|
+
|
|
6
|
+
export const bundledPayloadToHydratedBlock = async (
|
|
7
|
+
payload: WithHashMeta<PayloadBundle>,
|
|
8
|
+
): Promise<SignedHydratedBlockWithHashMeta | undefined> => {
|
|
9
|
+
const withHashMeta = await PayloadBuilder.addHashMeta(payload.payloads)
|
|
10
|
+
const tx = asSignedBlockBoundWitnessWithHashMeta(withHashMeta.find(p => p._hash === payload.root))
|
|
11
|
+
if (tx) {
|
|
12
|
+
return [tx, withHashMeta.filter(p => p._hash !== payload.root)]
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { Hash } from '@xylabs/sdk-js'
|
|
2
|
+
import { PayloadBuilder } from '@xyo-network/payload-builder'
|
|
3
|
+
import { type PayloadBundle, PayloadBundleSchema } from '@xyo-network/payload-model'
|
|
4
|
+
import type { SignedHydratedBlockWithHashMeta } from '@xyo-network/xl1-protocol'
|
|
5
|
+
|
|
6
|
+
import { flattenHydratedBlock } from '../../block/index.ts'
|
|
7
|
+
|
|
8
|
+
export const hydratedBlockToPayloadBundle = (transaction: SignedHydratedBlockWithHashMeta): PayloadBundle => {
|
|
9
|
+
const root = transaction[0]._hash
|
|
10
|
+
return bundle(root, transaction)
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
const bundle = (root: Hash, transaction: SignedHydratedBlockWithHashMeta) => {
|
|
14
|
+
const payloads = flattenHydratedBlock(transaction).flatMap(p => PayloadBuilder.omitStorageMeta(p))
|
|
15
|
+
return new PayloadBuilder<PayloadBundle>({ schema: PayloadBundleSchema })
|
|
16
|
+
.fields({ payloads, root })
|
|
17
|
+
.build()
|
|
18
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type Hash, HashZod } from '@xylabs/sdk-js'
|
|
2
|
+
import { type XL1BlockRange, XL1BlockRangeZod } from '@xyo-network/xl1-protocol'
|
|
3
|
+
import z from 'zod'
|
|
4
|
+
|
|
5
|
+
export type Qualified<T> = [T, XL1BlockRange, Hash]
|
|
6
|
+
|
|
7
|
+
export const QualifiedZod = <T>(zodType: z.ZodType<T>) => {
|
|
8
|
+
return z.tuple([zodType, XL1BlockRangeZod, HashZod])
|
|
9
|
+
}
|
package/src/model/index.ts
CHANGED