@xyo-network/xl1-protocol-sdk 1.16.2 → 1.16.3
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 +2 -1
- package/dist/neutral/ChainServiceCollectionV2.d.ts.map +1 -1
- package/dist/neutral/interfaces/viewers/AccountBalance.d.ts +2 -2
- package/dist/neutral/interfaces/viewers/Block.d.ts +1 -1
- package/dist/neutral/interfaces/viewers/Block.d.ts.map +1 -1
- package/dist/neutral/interfaces/viewers/Chain.d.ts +1 -1
- package/dist/neutral/interfaces/viewers/ChainContract.d.ts +3 -1
- package/dist/neutral/interfaces/viewers/ChainContract.d.ts.map +1 -1
- package/dist/neutral/interfaces/viewers/Fork.d.ts +1 -1
- package/dist/neutral/interfaces/viewers/Fork.d.ts.map +1 -1
- package/dist/neutral/interfaces/viewers/NetworkStakeStepReward.d.ts +4 -4
- package/dist/neutral/interfaces/viewers/NetworkStakeStepReward.d.ts.map +1 -1
- package/dist/neutral/interfaces/viewers/StakeTotalsViewer.d.ts +3 -1
- package/dist/neutral/interfaces/viewers/StakeTotalsViewer.d.ts.map +1 -1
- package/dist/neutral/interfaces/viewers/StakeViewer.d.ts +2 -2
- package/dist/neutral/interfaces/viewers/StakeViewer.d.ts.map +1 -1
- package/dist/neutral/interfaces/viewers/StepStake.d.ts +3 -1
- package/dist/neutral/interfaces/viewers/StepStake.d.ts.map +1 -1
- package/dist/neutral/interfaces/viewers/TimeSync.d.ts +3 -3
- package/dist/neutral/interfaces/viewers/TimeSync.d.ts.map +1 -1
- package/dist/neutral/interfaces/viewers/Transaction.d.ts +1 -1
- package/dist/neutral/interfaces/viewers/TransferBalance.d.ts +2 -2
- package/dist/neutral/interfaces/viewers/index.d.ts +0 -1
- package/dist/neutral/interfaces/viewers/index.d.ts.map +1 -1
- package/dist/neutral/model/ChainStake/ChainStakeRead.d.ts +1 -1
- package/dist/neutral/model/ChainStake/ChainStakeRead.d.ts.map +1 -1
- package/dist/neutral/{interfaces/viewers/Stake.d.ts → model/Position.d.ts} +1 -1
- package/dist/neutral/model/Position.d.ts.map +1 -0
- package/dist/neutral/model/index.d.ts +1 -0
- package/dist/neutral/model/index.d.ts.map +1 -1
- package/dist/neutral/provider/viewer/StepViewer.d.ts +1 -1
- package/dist/neutral/provider/viewer/StepViewer.d.ts.map +1 -1
- package/dist/neutral/provider/viewer/XyoViewer.d.ts +2 -2
- package/dist/neutral/provider/viewer/XyoViewer.d.ts.map +1 -1
- package/dist/neutral/services/Chain/ChainService.d.ts +2 -1
- package/dist/neutral/services/Chain/ChainService.d.ts.map +1 -1
- package/dist/neutral/services/Chain/interfaces/ChainStakeViewer.d.ts +1 -2
- package/dist/neutral/services/Chain/interfaces/ChainStakeViewer.d.ts.map +1 -1
- package/dist/neutral/services/Chain/interfaces/index.d.ts +0 -1
- package/dist/neutral/services/Chain/interfaces/index.d.ts.map +1 -1
- package/dist/neutral/services/NetworkStakeService.d.ts +2 -2
- package/dist/neutral/services/NetworkStakeService.d.ts.map +1 -1
- package/dist/neutral/services/StepStakeService.d.ts +2 -2
- package/dist/neutral/services/StepStakeService.d.ts.map +1 -1
- package/dist/neutral/services/TimeSyncService.d.ts +2 -4
- package/dist/neutral/services/TimeSyncService.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/ChainServiceCollectionV2.ts +2 -1
- package/src/interfaces/viewers/AccountBalance.ts +2 -2
- package/src/interfaces/viewers/Block.ts +1 -1
- package/src/interfaces/viewers/Chain.ts +1 -1
- package/src/interfaces/viewers/ChainContract.ts +3 -1
- package/src/interfaces/viewers/Fork.ts +1 -1
- package/src/interfaces/viewers/NetworkStakeStepReward.ts +7 -7
- package/src/interfaces/viewers/StakeTotalsViewer.ts +3 -1
- package/src/interfaces/viewers/StakeViewer.ts +2 -2
- package/src/interfaces/viewers/StepStake.ts +3 -1
- package/src/interfaces/viewers/TimeSync.ts +3 -3
- package/src/interfaces/viewers/Transaction.ts +1 -1
- package/src/interfaces/viewers/TransferBalance.ts +2 -2
- package/src/interfaces/viewers/index.ts +0 -1
- package/src/model/ChainStake/ChainStakeRead.ts +1 -1
- package/src/model/index.ts +1 -0
- package/src/provider/viewer/StepViewer.ts +1 -1
- package/src/provider/viewer/XyoViewer.ts +11 -8
- package/src/services/Chain/ChainService.ts +2 -3
- package/src/services/Chain/interfaces/ChainStakeViewer.ts +1 -2
- package/src/services/Chain/interfaces/index.ts +0 -1
- package/src/services/NetworkStakeService.ts +2 -2
- package/src/services/StepStakeService.ts +2 -2
- package/src/services/TimeSyncService.ts +2 -4
- package/dist/neutral/interfaces/viewers/Stake.d.ts.map +0 -1
- package/dist/neutral/services/Chain/interfaces/ChainContractViewer.d.ts +0 -4
- package/dist/neutral/services/Chain/interfaces/ChainContractViewer.d.ts.map +0 -1
- package/src/services/Chain/interfaces/ChainContractViewer.ts +0 -5
- /package/src/{interfaces/viewers/Stake.ts → model/Position.ts} +0 -0
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { ArchivistInstance, WriteArchivist } from '@xyo-network/archivist-model';
|
|
2
2
|
import type { WalletInstance } from '@xyo-network/wallet-model';
|
|
3
|
-
import type {
|
|
3
|
+
import type { ChainContractViewer } from './interfaces/index.ts';
|
|
4
|
+
import type { AccountBalanceServiceV2, BlockProducerService, BlockRewardService, ChainStaker, ChainStakeViewer, ElectionService, EventingChainBlockNumberIteratorService, PendingTransactionsService, StakeIntentService } from './services/index.ts';
|
|
4
5
|
export interface ChainServiceCollectionV2 {
|
|
5
6
|
/**
|
|
6
7
|
* The account which is used to sign transactions
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChainServiceCollectionV2.d.ts","sourceRoot":"","sources":["../../src/ChainServiceCollectionV2.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAA;AACrF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAA;AAE/D,OAAO,KAAK,EACV,uBAAuB,EAAE,oBAAoB,EAAE,kBAAkB,
|
|
1
|
+
{"version":3,"file":"ChainServiceCollectionV2.d.ts","sourceRoot":"","sources":["../../src/ChainServiceCollectionV2.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAA;AACrF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAA;AAE/D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAA;AAChE,OAAO,KAAK,EACV,uBAAuB,EAAE,oBAAoB,EAAE,kBAAkB,EACjE,WAAW,EAAE,gBAAgB,EAAE,eAAe,EAAE,uCAAuC,EACvF,0BAA0B,EAC1B,kBAAkB,EACnB,MAAM,qBAAqB,CAAA;AAE5B,MAAM,WAAW,wBAAwB;IAEvC;;OAEG;IACH,OAAO,EAAE,cAAc,CAAA;IACvB;;OAEG;IACH,OAAO,EAAE,uBAAuB,CAAA;IAChC;;OAEG;IACH,cAAc,EAAE,iBAAiB,CAAA;IACjC;;;OAGG;IACH,mBAAmB,EAAE,mBAAmB,CAAA;IACxC;;OAEG;IACH,aAAa,CAAC,EAAE,uCAAuC,CAAA;IACvD;;OAEG;IACH,gBAAgB,EAAE,gBAAgB,CAAA;IAClC;;OAEG;IACH,WAAW,EAAE,WAAW,CAAA;IACxB;;OAEG;IACH,8BAA8B,EAAE,cAAc,CAAA;IAC9C;;OAEG;IACH,QAAQ,EAAE,eAAe,CAAA;IACzB;;;OAGG;IACH,wCAAwC,EAAE,iBAAiB,CAAA;IAC3D;;OAEG;IACH,mBAAmB,EAAE,0BAA0B,CAAA;IAC/C;;OAEG;IACH,QAAQ,EAAE,oBAAoB,CAAA;IAC9B;;OAEG;IACH,MAAM,EAAE,kBAAkB,CAAA;IAC1B;;OAEG;IACH,WAAW,EAAE,kBAAkB,CAAA;CAChC"}
|
|
@@ -8,11 +8,11 @@ export type AccountBalanceHistoryItem = [
|
|
|
8
8
|
WithStorageMeta<Signed<TransactionBoundWitness>> | null,
|
|
9
9
|
WithStorageMeta<Transfer>
|
|
10
10
|
];
|
|
11
|
-
export interface
|
|
11
|
+
export interface AccountBalancesViewerMethods {
|
|
12
12
|
accountBalances(address: Address[]): Promisable<Partial<Record<Address, AttoXL1>>>;
|
|
13
13
|
accountBalancesHistories(address: Address[]): Promisable<Partial<Record<Address, AccountBalanceHistoryItem[]>>>;
|
|
14
14
|
}
|
|
15
|
-
export interface
|
|
15
|
+
export interface AccountBalanceViewerMethods {
|
|
16
16
|
accountBalance(address: Address): Promisable<AttoXL1>;
|
|
17
17
|
accountBalanceHistory(address: Address, range?: XL1BlockRange): Promisable<AccountBalanceHistoryItem[]>;
|
|
18
18
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Hash } from '@xylabs/hex';
|
|
2
2
|
import type { Promisable } from '@xylabs/promise';
|
|
3
3
|
import type { HydratedBlock } from '@xyo-network/xl1-protocol';
|
|
4
|
-
export interface
|
|
4
|
+
export interface BlockViewierMethods {
|
|
5
5
|
blockByHash(hash: Hash): Promisable<HydratedBlock | null>;
|
|
6
6
|
blockByNumber(blockNumber: number): Promisable<HydratedBlock | null>;
|
|
7
7
|
blocksByHash(hash: Hash, limit?: number): Promisable<HydratedBlock[]>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Block.d.ts","sourceRoot":"","sources":["../../../../src/interfaces/viewers/Block.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AACvC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AACjD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAA;AAE9D,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"Block.d.ts","sourceRoot":"","sources":["../../../../src/interfaces/viewers/Block.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AACvC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AACjD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAA;AAE9D,MAAM,WAAW,mBAAmB;IAClC,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,YAAY,IAAI,UAAU,CAAC,aAAa,CAAC,CAAA;IACzC,gBAAgB,IAAI,UAAU,CAAC,IAAI,CAAC,CAAA;IACpC,kBAAkB,IAAI,UAAU,CAAC,MAAM,CAAC,CAAA;CACzC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Address } from '@xylabs/hex';
|
|
2
|
-
export interface
|
|
2
|
+
export interface ChainContractViewerMethods {
|
|
3
3
|
forkedAtBlockNumber(): Promise<bigint>;
|
|
4
4
|
forkedAtHash(): Promise<bigint>;
|
|
5
5
|
forkedChainId(): Promise<Address>;
|
|
@@ -7,4 +7,6 @@ export interface ChainContractViewInterface {
|
|
|
7
7
|
rewardsContract(): Promise<string>;
|
|
8
8
|
stakingTokenAddress(): Promise<string>;
|
|
9
9
|
}
|
|
10
|
+
export interface ChainContractViewer extends ChainContractViewerMethods {
|
|
11
|
+
}
|
|
10
12
|
//# sourceMappingURL=ChainContract.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChainContract.d.ts","sourceRoot":"","sources":["../../../../src/interfaces/viewers/ChainContract.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AAE1C,MAAM,WAAW,0BAA0B;IACzC,mBAAmB,IAAI,OAAO,CAAC,MAAM,CAAC,CAAA;IACtC,YAAY,IAAI,OAAO,CAAC,MAAM,CAAC,CAAA;IAC/B,aAAa,IAAI,OAAO,CAAC,OAAO,CAAC,CAAA;IACjC,mBAAmB,IAAI,OAAO,CAAC,MAAM,CAAC,CAAA;IACtC,eAAe,IAAI,OAAO,CAAC,MAAM,CAAC,CAAA;IAClC,mBAAmB,IAAI,OAAO,CAAC,MAAM,CAAC,CAAA;CACvC"}
|
|
1
|
+
{"version":3,"file":"ChainContract.d.ts","sourceRoot":"","sources":["../../../../src/interfaces/viewers/ChainContract.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AAE1C,MAAM,WAAW,0BAA0B;IACzC,mBAAmB,IAAI,OAAO,CAAC,MAAM,CAAC,CAAA;IACtC,YAAY,IAAI,OAAO,CAAC,MAAM,CAAC,CAAA;IAC/B,aAAa,IAAI,OAAO,CAAC,OAAO,CAAC,CAAA;IACjC,mBAAmB,IAAI,OAAO,CAAC,MAAM,CAAC,CAAA;IACtC,eAAe,IAAI,OAAO,CAAC,MAAM,CAAC,CAAA;IAClC,mBAAmB,IAAI,OAAO,CAAC,MAAM,CAAC,CAAA;CACvC;AAED,MAAM,WAAW,mBAAoB,SAAQ,0BAA0B;CAAG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Promisable } from '@xylabs/promise';
|
|
2
2
|
import type { ChainId } from '@xyo-network/xl1-protocol';
|
|
3
3
|
export type ForkHistory = Record<number, ChainId>;
|
|
4
|
-
export interface
|
|
4
|
+
export interface ForkViewerMethods {
|
|
5
5
|
chainIdAtBlock(blockNumber: number): Promisable<ChainId | undefined>;
|
|
6
6
|
forkHistory(): Promisable<ForkHistory>;
|
|
7
7
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Fork.d.ts","sourceRoot":"","sources":["../../../../src/interfaces/viewers/Fork.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AACjD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAA;AAExD,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;AAEjD,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"Fork.d.ts","sourceRoot":"","sources":["../../../../src/interfaces/viewers/Fork.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AACjD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAA;AAExD,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;AAEjD,MAAM,WAAW,iBAAiB;IAChC,cAAc,CAAC,WAAW,EAAE,MAAM,GAAG,UAAU,CAAC,OAAO,GAAG,SAAS,CAAC,CAAA;IACpE,WAAW,IAAI,UAAU,CAAC,WAAW,CAAC,CAAA;CACvC"}
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import type { Address } from '@xylabs/hex';
|
|
2
2
|
import type { Promisable } from '@xylabs/promise';
|
|
3
3
|
import type { StepIdentity, StepIdentityString } from '@xyo-network/xl1-protocol';
|
|
4
|
-
export interface
|
|
4
|
+
export interface NetworkStakeStepAddressRewardViewerMethods {
|
|
5
5
|
networkStakeStepRewardAddressHistory(address: Address): Promisable<Record<Address, bigint>>;
|
|
6
6
|
networkStakeStepRewardAddressReward(context: StepIdentity, address: Address): Promisable<Record<Address, bigint>>;
|
|
7
7
|
networkStakeStepRewardAddressShare(context: StepIdentity, address: Address): Promisable<[/* address shares */ bigint, /* total shares */ bigint]>;
|
|
8
8
|
networkStakeStepRewardWeightForAddress(context: StepIdentity, address: Address): Promisable<bigint>;
|
|
9
9
|
}
|
|
10
|
-
export interface
|
|
10
|
+
export interface NetworkStakeStepPoolRewardViewerMethods {
|
|
11
11
|
networkStakeStepRewardPoolRewards(context: StepIdentity): Promisable<Record<Address, bigint>>;
|
|
12
12
|
networkStakeStepRewardPoolShares(context: StepIdentity): Promisable<Record<Address, bigint>>;
|
|
13
13
|
}
|
|
14
|
-
export interface
|
|
14
|
+
export interface NetworkStakeStepRewardPositionViewerMethods {
|
|
15
15
|
networkStakeStepRewardPositionWeight(context: StepIdentity, position: number): Promisable<bigint>;
|
|
16
16
|
networkStakeStepRewardPotentialPositionLoss(context: StepIdentity, position: number): Promisable<bigint>;
|
|
17
17
|
}
|
|
18
|
-
export interface
|
|
18
|
+
export interface NetworkStakeStepRewardViewer extends NetworkStakeStepPoolRewardViewerMethods, NetworkStakeStepAddressRewardViewerMethods, NetworkStakeStepRewardPositionViewerMethods {
|
|
19
19
|
networkStakeStepRewardClaimedByAddress(address: Address): Promisable<bigint>;
|
|
20
20
|
networkStakeStepRewardForPosition(position: number, range: [number, number]): Promisable<[bigint, bigint]>;
|
|
21
21
|
networkStakeStepRewardForStep(context: StepIdentity): Promisable<bigint>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NetworkStakeStepReward.d.ts","sourceRoot":"","sources":["../../../../src/interfaces/viewers/NetworkStakeStepReward.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AAC1C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AACjD,OAAO,KAAK,EAAE,YAAY,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAA;AAEjF,MAAM,WAAW,0CAA0C;IAEzD,oCAAoC,CAAC,OAAO,EAAE,OAAO,GAAG,UAAU,CAAC,MAAM,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC,CAAA;IAG3F,mCAAmC,CAAC,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,OAAO,GAAG,UAAU,CAAC,MAAM,CAAC,OAAO,EAAE,MAAM,C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EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,GAAG,UAAU,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAA;IAG/G,gCAAgC,CAAC,OAAO,EAAE,YAAY,GAAG,UAAU,CAAC,MAAM,CAAC,CAAA;IAG3E,iCAAiC,CAAC,OAAO,EAAE,YAAY,GAAG,UAAU,CAAC,MAAM,CAAC,CAAA;IAE5E,wCAAwC,CAAC,OAAO,EAAE,OAAO,GAAG,UAAU,CAAC,MAAM,CAAC,CAAA;IAG9E,kCAAkC,CAAC,QAAQ,EAAE,MAAM,EACjD,KAAK,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,UAAU,CAAC,MAAM,CAAC,kBAAkB,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,CAAA;IAGpF,+BAA+B,CAAC,KAAK,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,UAAU,CAAC,MAAM,CAAC,CAAA;IAG5E,mCAAmC,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,UAAU,CAAC,MAAM,CAAC,CAAA;CACpG"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Address } from '@xylabs/hex';
|
|
2
2
|
import type { Promisable } from '@xylabs/promise';
|
|
3
|
-
export interface
|
|
3
|
+
export interface StakeTotalsViewerMethods {
|
|
4
4
|
active(): Promisable<bigint>;
|
|
5
5
|
activeByStaked(staked: Address): Promisable<bigint>;
|
|
6
6
|
activeByStaker(address: Address): Promisable<bigint>;
|
|
@@ -9,4 +9,6 @@ export interface StakeTotalsViewer {
|
|
|
9
9
|
withdrawn(): Promisable<bigint>;
|
|
10
10
|
withdrawnByStaker(staker: Address): Promisable<bigint>;
|
|
11
11
|
}
|
|
12
|
+
export interface StakeTotalsViewer extends StakeTotalsViewerMethods {
|
|
13
|
+
}
|
|
12
14
|
//# sourceMappingURL=StakeTotalsViewer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StakeTotalsViewer.d.ts","sourceRoot":"","sources":["../../../../src/interfaces/viewers/StakeTotalsViewer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AAC1C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAEjD,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"StakeTotalsViewer.d.ts","sourceRoot":"","sources":["../../../../src/interfaces/viewers/StakeTotalsViewer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AAC1C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAEjD,MAAM,WAAW,wBAAwB;IACvC,MAAM,IAAI,UAAU,CAAC,MAAM,CAAC,CAAA;IAC5B,cAAc,CAAC,MAAM,EAAE,OAAO,GAAG,UAAU,CAAC,MAAM,CAAC,CAAA;IACnD,cAAc,CAAC,OAAO,EAAE,OAAO,GAAG,UAAU,CAAC,MAAM,CAAC,CAAA;IACpD,OAAO,IAAI,UAAU,CAAC,MAAM,CAAC,CAAA;IAC7B,eAAe,CAAC,MAAM,EAAE,OAAO,GAAG,UAAU,CAAC,MAAM,CAAC,CAAA;IACpD,SAAS,IAAI,UAAU,CAAC,MAAM,CAAC,CAAA;IAC/B,iBAAiB,CAAC,MAAM,EAAE,OAAO,GAAG,UAAU,CAAC,MAAM,CAAC,CAAA;CACvD;AAED,MAAM,WAAW,iBAAkB,SAAQ,wBAAwB;CAAG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Address } from '@xylabs/hex';
|
|
2
2
|
import type { Promisable } from '@xylabs/promise';
|
|
3
|
-
import type { Position } from '
|
|
4
|
-
export interface
|
|
3
|
+
import type { Position } from '../../model/index.ts';
|
|
4
|
+
export interface StakeViewerMethods {
|
|
5
5
|
stakeById(id: number): Promisable<Position>;
|
|
6
6
|
stakeByStaker(staker: Address, slot: number): Promisable<Position>;
|
|
7
7
|
stakedByStaker(staker: Address): Promisable<Address[]>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StakeViewer.d.ts","sourceRoot":"","sources":["../../../../src/interfaces/viewers/StakeViewer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AAC1C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAEjD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"StakeViewer.d.ts","sourceRoot":"","sources":["../../../../src/interfaces/viewers/StakeViewer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AAC1C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAEjD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAA;AAEpD,MAAM,WAAW,kBAAkB;IACjC,SAAS,CAAC,EAAE,EAAE,MAAM,GAAG,UAAU,CAAC,QAAQ,CAAC,CAAA;IAC3C,aAAa,CAAC,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,GAAG,UAAU,CAAC,QAAQ,CAAC,CAAA;IAElE,cAAc,CAAC,MAAM,EAAE,OAAO,GAAG,UAAU,CAAC,OAAO,EAAE,CAAC,CAAA;IACtD,cAAc,CAAC,MAAM,EAAE,OAAO,GAAG,UAAU,CAAC,QAAQ,EAAE,CAAC,CAAA;IACvD,cAAc,CAAC,MAAM,EAAE,OAAO,GAAG,UAAU,CAAC,QAAQ,EAAE,CAAC,CAAA;CACxD"}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import type { Address } from '@xylabs/hex';
|
|
2
2
|
import type { Promisable } from '@xylabs/promise';
|
|
3
3
|
import type { StepIdentity } from '@xyo-network/xl1-protocol';
|
|
4
|
-
export interface
|
|
4
|
+
export interface StepStakeViewerMethods {
|
|
5
5
|
stepStake: (step: StepIdentity) => Promisable<Record<Address, bigint>>;
|
|
6
6
|
stepStakeForAddress: (address: Address, step: StepIdentity) => Promisable<bigint>;
|
|
7
7
|
}
|
|
8
|
+
export interface StepStakeViewer extends StepStakeViewerMethods {
|
|
9
|
+
}
|
|
8
10
|
//# sourceMappingURL=StepStake.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StepStake.d.ts","sourceRoot":"","sources":["../../../../src/interfaces/viewers/StepStake.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AAC1C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AACjD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AAE7D,MAAM,WAAW,sBAAsB;IAErC,SAAS,EAAE,CAAC,IAAI,EAAE,YAAY,KAAK,UAAU,CAAC,MAAM,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC,CAAA;IAGtE,mBAAmB,EAAE,CAAC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,YAAY,KAAK,UAAU,CAAC,MAAM,CAAC,CAAA;CAClF"}
|
|
1
|
+
{"version":3,"file":"StepStake.d.ts","sourceRoot":"","sources":["../../../../src/interfaces/viewers/StepStake.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AAC1C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AACjD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AAE7D,MAAM,WAAW,sBAAsB;IAErC,SAAS,EAAE,CAAC,IAAI,EAAE,YAAY,KAAK,UAAU,CAAC,MAAM,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC,CAAA;IAGtE,mBAAmB,EAAE,CAAC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,YAAY,KAAK,UAAU,CAAC,MAAM,CAAC,CAAA;CAClF;AAUD,MAAM,WAAW,eAAgB,SAAQ,sBAAsB;CAAG"}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import type { Hash } from '@xylabs/hex';
|
|
2
2
|
import type { Promisable } from '@xylabs/promise';
|
|
3
3
|
import type { TimeDomain, TimePayload } from '@xyo-network/xl1-protocol';
|
|
4
|
-
export interface
|
|
4
|
+
export interface TimeSyncViewerMethods {
|
|
5
5
|
/** Convert time between different domains */
|
|
6
6
|
convertTime(fromDomain: TimeDomain, toDomain: TimeDomain, from: number): Promisable<number>;
|
|
7
7
|
/** Get the current time for a given domain */
|
|
8
8
|
currentTime(domain: TimeDomain): Promisable<[string, number]>;
|
|
9
|
-
}
|
|
10
|
-
export interface TimeSyncViewInterfaceV2 extends TimeSyncViewInterface {
|
|
11
9
|
/** Get the current time for a given domain */
|
|
12
10
|
currentTimeAndHash(domain: TimeDomain): Promisable<[number, Hash | null]>;
|
|
13
11
|
/** Create a TimePayload with the current time from all configured domains */
|
|
14
12
|
currentTimePayload(): Promisable<TimePayload>;
|
|
15
13
|
}
|
|
14
|
+
export interface TimeSyncViewer extends TimeSyncViewerMethods {
|
|
15
|
+
}
|
|
16
16
|
//# sourceMappingURL=TimeSync.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TimeSync.d.ts","sourceRoot":"","sources":["../../../../src/interfaces/viewers/TimeSync.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AACvC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AACjD,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAA;AAExE,MAAM,WAAW,qBAAqB;IACpC,6CAA6C;IAC7C,WAAW,CAAC,UAAU,EAAE,UAAU,EAAE,QAAQ,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC,CAAA;IAE3F,8CAA8C;IAC9C,WAAW,CAAC,MAAM,EAAE,UAAU,GAAG,UAAU,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAA;
|
|
1
|
+
{"version":3,"file":"TimeSync.d.ts","sourceRoot":"","sources":["../../../../src/interfaces/viewers/TimeSync.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AACvC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AACjD,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAA;AAExE,MAAM,WAAW,qBAAqB;IACpC,6CAA6C;IAC7C,WAAW,CAAC,UAAU,EAAE,UAAU,EAAE,QAAQ,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC,CAAA;IAE3F,8CAA8C;IAC9C,WAAW,CAAC,MAAM,EAAE,UAAU,GAAG,UAAU,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAA;IAE7D,8CAA8C;IAC9C,kBAAkB,CAAC,MAAM,EAAE,UAAU,GAAG,UAAU,CAAC,CAAC,MAAM,EAAE,IAAI,GAAG,IAAI,CAAC,CAAC,CAAA;IAEzE,6EAA6E;IAC7E,kBAAkB,IAAI,UAAU,CAAC,WAAW,CAAC,CAAA;CAC9C;AAED,MAAM,WAAW,cAAe,SAAQ,qBAAqB;CAAG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Hash } from '@xylabs/hex';
|
|
2
2
|
import type { Promisable } from '@xylabs/promise';
|
|
3
3
|
import type { SignedHydratedTransaction } from '@xyo-network/xl1-protocol';
|
|
4
|
-
export interface
|
|
4
|
+
export interface TransactionViewerMethods {
|
|
5
5
|
transactionByBlockHashAndIndex(blockHash: Hash, transactionIndex: number): Promisable<SignedHydratedTransaction | null>;
|
|
6
6
|
transactionByBlockNumberAndIndex(blockNumber: number, transactionIndex: number): Promisable<SignedHydratedTransaction | null>;
|
|
7
7
|
transactionByHash(transactionHash: Hash): Promisable<SignedHydratedTransaction | null>;
|
|
@@ -8,13 +8,13 @@ export type TransferBalanceHistoryItem = [
|
|
|
8
8
|
Transfer
|
|
9
9
|
];
|
|
10
10
|
export type TransferPair = [/* from */ Address, /* to */ Address];
|
|
11
|
-
export interface
|
|
11
|
+
export interface TransferBalancesViewerMethods {
|
|
12
12
|
transferBalances(address: Address[]): Promisable<Partial<Record<Address, Record<Address, AttoXL1>>>>;
|
|
13
13
|
transferBalancesHistories(address: Address[]): Promisable<Partial<Record<Address, Record<Address, TransferBalanceHistoryItem[]>>>>;
|
|
14
14
|
transferPairBalances(address: TransferPair[]): Promisable<Partial<Record<Address, Record<Address, AttoXL1>>>>;
|
|
15
15
|
transferPairBalancesHistories(address: TransferPair[]): Promisable<Partial<Record<Address, Record<Address, TransferBalanceHistoryItem[]>>>>;
|
|
16
16
|
}
|
|
17
|
-
export interface
|
|
17
|
+
export interface TransferBalanceViewerMethods {
|
|
18
18
|
transferBalance(address: Address): Promisable<AttoXL1>;
|
|
19
19
|
transferBalanceHistory(address: Address, range?: XL1BlockRange): Promisable<TransferBalanceHistoryItem[]>;
|
|
20
20
|
transferPairBalance(address: TransferPair): Promisable<AttoXL1>;
|
|
@@ -4,7 +4,6 @@ export * from './Chain.ts';
|
|
|
4
4
|
export * from './ChainContract.ts';
|
|
5
5
|
export * from './Fork.ts';
|
|
6
6
|
export * from './NetworkStakeStepReward.ts';
|
|
7
|
-
export * from './Stake.ts';
|
|
8
7
|
export * from './StakeTotalsViewer.ts';
|
|
9
8
|
export * from './StakeViewer.ts';
|
|
10
9
|
export * from './StepStake.ts';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/interfaces/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,6BAA6B,CAAA;AAC3C,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/interfaces/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,6BAA6B,CAAA;AAC3C,cAAc,wBAAwB,CAAA;AACtC,cAAc,kBAAkB,CAAA;AAChC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,eAAe,CAAA;AAC7B,cAAc,kBAAkB,CAAA;AAChC,cAAc,sBAAsB,CAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Address } from '@xylabs/hex';
|
|
2
2
|
import type { Promisable } from '@xylabs/promise';
|
|
3
|
-
import type { Position } from '
|
|
3
|
+
import type { Position } from '../Position.ts';
|
|
4
4
|
export interface ChainStakeRead {
|
|
5
5
|
active(time?: number): Promisable<bigint>;
|
|
6
6
|
activeByAddressStaked(address: string, time?: number): Promisable<bigint>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChainStakeRead.d.ts","sourceRoot":"","sources":["../../../../src/model/ChainStake/ChainStakeRead.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AAC1C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAEjD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"ChainStakeRead.d.ts","sourceRoot":"","sources":["../../../../src/model/ChainStake/ChainStakeRead.ts"],"names":[],"mappings":"AAAA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,UAAU,CAAC,MAAM,CAAC,CAAA;IAC5C,iBAAiB,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC,CAAA;CACrE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Position.d.ts","sourceRoot":"","sources":["../../../src/model/Position.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AAC1C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAA;AAE3D,MAAM,MAAM,QAAQ,GAAG;IAErB,QAAQ,EAAE,MAAM,CAAA;IAEhB,MAAM,EAAE,MAAM,CAAA;IAEd,EAAE,EAAE,UAAU,CAAA;IAEd,WAAW,EAAE,MAAM,CAAA;IAEnB,MAAM,EAAE,OAAO,CAAA;IAEf,MAAM,EAAE,OAAO,CAAA;IAEf,aAAa,EAAE,MAAM,CAAA;CACtB,CAAA;AAED,yCAAyC;AACzC,MAAM,MAAM,KAAK,GAAG,QAAQ,CAAA"}
|
|
@@ -4,6 +4,7 @@ export * from './ChainIdentity.ts';
|
|
|
4
4
|
export * from './ChainStake/index.ts';
|
|
5
5
|
export * from './ChainStore.ts';
|
|
6
6
|
export * from './PayloadMap.ts';
|
|
7
|
+
export * from './Position.ts';
|
|
7
8
|
export * from './RecordKeyType.ts';
|
|
8
9
|
export * from './StakeEvents.ts';
|
|
9
10
|
export * from './summary.ts';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/model/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAA;AACvC,cAAc,sBAAsB,CAAA;AACpC,cAAc,oBAAoB,CAAA;AAClC,cAAc,uBAAuB,CAAA;AACrC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,oBAAoB,CAAA;AAClC,cAAc,kBAAkB,CAAA;AAChC,cAAc,cAAc,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/model/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAA;AACvC,cAAc,sBAAsB,CAAA;AACpC,cAAc,oBAAoB,CAAA;AAClC,cAAc,uBAAuB,CAAA;AACrC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,eAAe,CAAA;AAC7B,cAAc,oBAAoB,CAAA;AAClC,cAAc,kBAAkB,CAAA;AAChC,cAAc,cAAc,CAAA"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Address } from '@xylabs/hex';
|
|
2
2
|
import type { Promisable } from '@xylabs/promise';
|
|
3
3
|
import type { PositionId, StepIdentity } from '@xyo-network/xl1-protocol';
|
|
4
|
-
import type { Position } from '../../
|
|
4
|
+
import type { Position } from '../../model/index.ts';
|
|
5
5
|
import type { NetworkStakeStepRewardsViewer } from './NetworkStake/index.ts';
|
|
6
6
|
export interface PagedPositionsOptions {
|
|
7
7
|
cursor?: PositionId;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StepViewer.d.ts","sourceRoot":"","sources":["../../../../src/provider/viewer/StepViewer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AAC1C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AACjD,OAAO,KAAK,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AAEzE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"StepViewer.d.ts","sourceRoot":"","sources":["../../../../src/provider/viewer/StepViewer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AAC1C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAi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
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { AccountBalanceViewerMethods, BlockViewierMethods, ChainViewerMethods, ForkViewerMethods, NetworkStakeStepRewardViewer, StakeViewerMethods, TransactionViewerMethods, TransferBalanceViewerMethods } from '../../interfaces/index.ts';
|
|
2
2
|
import type { NetworkStakeViewer } from './NetworkStake/index.ts';
|
|
3
3
|
import type { StepViewer } from './StepViewer.ts';
|
|
4
|
-
export interface XyoViewerMethods extends
|
|
4
|
+
export interface XyoViewerMethods extends AccountBalanceViewerMethods, TransferBalanceViewerMethods, NetworkStakeStepRewardViewer, ChainViewerMethods, BlockViewierMethods, TransactionViewerMethods, StakeViewerMethods, ForkViewerMethods {
|
|
5
5
|
}
|
|
6
6
|
export interface XyoViewer extends XyoViewerMethods {
|
|
7
7
|
networkStake?: NetworkStakeViewer;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"XyoViewer.d.ts","sourceRoot":"","sources":["../../../../src/provider/viewer/XyoViewer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,2BAA2B,
|
|
1
|
+
{"version":3,"file":"XyoViewer.d.ts","sourceRoot":"","sources":["../../../../src/provider/viewer/XyoViewer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,2BAA2B,EAC3B,mBAAmB,EACnB,kBAAkB,EAClB,iBAAiB,EACjB,4BAA4B,EAC5B,kBAAkB,EAClB,wBAAwB,EACxB,4BAA4B,EAC7B,MAAM,2BAA2B,CAAA;AAClC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAA;AACjE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAEjD,MAAM,WAAW,gBAAiB,SAAQ,2BAA2B,EAAE,4BAA4B,EACjG,4BAA4B,EAC5B,kBAAkB,EAAE,mBAAmB,EAAE,wBAAwB,EAAE,kBAAkB,EAAE,iBAAiB;CACzG;AAED,MAAM,WAAW,SAAU,SAAQ,gBAAgB;IACjD,YAAY,CAAC,EAAE,kBAAkB,CAAA;IACjC,IAAI,CAAC,EAAE,UAAU,CAAA;CAClB"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import type { ChainContractViewer } from '../../interfaces/index.ts';
|
|
1
2
|
import type { BaseChainService } from './BaseChainService.ts';
|
|
2
|
-
import type {
|
|
3
|
+
import type { ChainStaker, ChainStakeViewer } from './interfaces/index.ts';
|
|
3
4
|
export interface ChainService extends ChainContractViewer, ChainStakeViewer, ChainStaker, BaseChainService {
|
|
4
5
|
}
|
|
5
6
|
//# sourceMappingURL=ChainService.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChainService.d.ts","sourceRoot":"","sources":["../../../../src/services/Chain/ChainService.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AAC7D,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"ChainService.d.ts","sourceRoot":"","sources":["../../../../src/services/Chain/ChainService.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAA;AACpE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AAC7D,OAAO,KAAK,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AAE1E,MAAM,WAAW,YAAa,SAAQ,mBAAmB,EAAE,gBAAgB,EAAE,WAAW,EAAE,gBAAgB;CAAG"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import type { StakeTotalsViewer } from '../../../interfaces/index.ts';
|
|
2
|
-
import type { ChainContractViewer } from './ChainContractViewer.ts';
|
|
1
|
+
import type { ChainContractViewer, StakeTotalsViewer } from '../../../interfaces/index.ts';
|
|
3
2
|
export interface ChainStakeViewer extends ChainContractViewer, StakeTotalsViewer {
|
|
4
3
|
}
|
|
5
4
|
//# sourceMappingURL=ChainStakeViewer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChainStakeViewer.d.ts","sourceRoot":"","sources":["../../../../../src/services/Chain/interfaces/ChainStakeViewer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"ChainStakeViewer.d.ts","sourceRoot":"","sources":["../../../../../src/services/Chain/interfaces/ChainStakeViewer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAA;AAE1F,MAAM,WAAW,gBAAiB,SAAQ,mBAAmB,EAAE,iBAAiB;CAE/E"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/services/Chain/interfaces/index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/services/Chain/interfaces/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAA;AAChC,cAAc,uBAAuB,CAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { NetworkStakeStepRewardViewer } from '../interfaces/index.ts';
|
|
2
2
|
import type { ServiceInterface } from './Service.ts';
|
|
3
|
-
export interface NetworkStakeStepRewardService extends
|
|
3
|
+
export interface NetworkStakeStepRewardService extends NetworkStakeStepRewardViewer, ServiceInterface {
|
|
4
4
|
}
|
|
5
5
|
//# sourceMappingURL=NetworkStakeService.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NetworkStakeService.d.ts","sourceRoot":"","sources":["../../../src/services/NetworkStakeService.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"NetworkStakeService.d.ts","sourceRoot":"","sources":["../../../src/services/NetworkStakeService.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,wBAAwB,CAAA;AAC1E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAA;AAEpD,MAAM,WAAW,6BAA8B,SAAQ,4BAA4B,EAAE,gBAAgB;CAAG"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { StepStakeViewer } from '../interfaces/index.ts';
|
|
2
2
|
import type { ServiceInterface } from './Service.ts';
|
|
3
|
-
export interface StepStakeService extends ServiceInterface,
|
|
3
|
+
export interface StepStakeService extends ServiceInterface, StepStakeViewer {
|
|
4
4
|
}
|
|
5
5
|
//# sourceMappingURL=StepStakeService.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StepStakeService.d.ts","sourceRoot":"","sources":["../../../src/services/StepStakeService.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"StepStakeService.d.ts","sourceRoot":"","sources":["../../../src/services/StepStakeService.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAA;AAC7D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAA;AAEpD,MAAM,WAAW,gBAAiB,SAAQ,gBAAgB,EAAE,eAAe;CAAG"}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { TimeSyncViewerMethods } from '../interfaces/index.ts';
|
|
2
2
|
import type { ServiceInterface } from './Service.ts';
|
|
3
|
-
export interface TimeSyncService extends ServiceInterface,
|
|
4
|
-
}
|
|
5
|
-
export interface TimeSyncServiceV2 extends ServiceInterface, TimeSyncViewInterfaceV2 {
|
|
3
|
+
export interface TimeSyncService extends ServiceInterface, TimeSyncViewerMethods {
|
|
6
4
|
}
|
|
7
5
|
//# sourceMappingURL=TimeSyncService.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TimeSyncService.d.ts","sourceRoot":"","sources":["../../../src/services/TimeSyncService.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,
|
|
1
|
+
{"version":3,"file":"TimeSyncService.d.ts","sourceRoot":"","sources":["../../../src/services/TimeSyncService.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAA;AACnE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAA;AAEpD,MAAM,WAAW,eAAgB,SAAQ,gBAAgB,EAAE,qBAAqB;CAAG"}
|
package/package.json
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import type { ArchivistInstance, WriteArchivist } from '@xyo-network/archivist-model'
|
|
2
2
|
import type { WalletInstance } from '@xyo-network/wallet-model'
|
|
3
3
|
|
|
4
|
+
import type { ChainContractViewer } from './interfaces/index.ts'
|
|
4
5
|
import type {
|
|
5
|
-
AccountBalanceServiceV2, BlockProducerService, BlockRewardService,
|
|
6
|
+
AccountBalanceServiceV2, BlockProducerService, BlockRewardService,
|
|
6
7
|
ChainStaker, ChainStakeViewer, ElectionService, EventingChainBlockNumberIteratorService,
|
|
7
8
|
PendingTransactionsService,
|
|
8
9
|
StakeIntentService,
|
|
@@ -14,12 +14,12 @@ export type AccountBalanceHistoryItem = [
|
|
|
14
14
|
WithStorageMeta<Transfer>, /* the actual transfer payload */
|
|
15
15
|
]
|
|
16
16
|
|
|
17
|
-
export interface
|
|
17
|
+
export interface AccountBalancesViewerMethods {
|
|
18
18
|
accountBalances(address: Address[]): Promisable<Partial<Record<Address, AttoXL1>>>
|
|
19
19
|
accountBalancesHistories(address: Address[]): Promisable<Partial<Record<Address, AccountBalanceHistoryItem[]>>>
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
export interface
|
|
22
|
+
export interface AccountBalanceViewerMethods {
|
|
23
23
|
accountBalance(address: Address): Promisable<AttoXL1>
|
|
24
24
|
accountBalanceHistory(address: Address, range?: XL1BlockRange): Promisable<AccountBalanceHistoryItem[]>
|
|
25
25
|
}
|
|
@@ -2,7 +2,7 @@ import type { Hash } from '@xylabs/hex'
|
|
|
2
2
|
import type { Promisable } from '@xylabs/promise'
|
|
3
3
|
import type { HydratedBlock } from '@xyo-network/xl1-protocol'
|
|
4
4
|
|
|
5
|
-
export interface
|
|
5
|
+
export interface BlockViewierMethods {
|
|
6
6
|
blockByHash(hash: Hash): Promisable<HydratedBlock | null>
|
|
7
7
|
blockByNumber(blockNumber: number): Promisable<HydratedBlock | null>
|
|
8
8
|
blocksByHash(hash: Hash, limit?: number): Promisable<HydratedBlock[]>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Address } from '@xylabs/hex'
|
|
2
2
|
|
|
3
|
-
export interface
|
|
3
|
+
export interface ChainContractViewerMethods {
|
|
4
4
|
forkedAtBlockNumber(): Promise<bigint>
|
|
5
5
|
forkedAtHash(): Promise<bigint>
|
|
6
6
|
forkedChainId(): Promise<Address>
|
|
@@ -8,3 +8,5 @@ export interface ChainContractViewInterface {
|
|
|
8
8
|
rewardsContract(): Promise<string>
|
|
9
9
|
stakingTokenAddress(): Promise<string>
|
|
10
10
|
}
|
|
11
|
+
|
|
12
|
+
export interface ChainContractViewer extends ChainContractViewerMethods {}
|
|
@@ -3,7 +3,7 @@ import type { ChainId } from '@xyo-network/xl1-protocol'
|
|
|
3
3
|
|
|
4
4
|
export type ForkHistory = Record<number, ChainId>
|
|
5
5
|
|
|
6
|
-
export interface
|
|
6
|
+
export interface ForkViewerMethods {
|
|
7
7
|
chainIdAtBlock(blockNumber: number): Promisable<ChainId | undefined>
|
|
8
8
|
forkHistory(): Promisable<ForkHistory>
|
|
9
9
|
}
|
|
@@ -2,7 +2,7 @@ import type { Address } from '@xylabs/hex'
|
|
|
2
2
|
import type { Promisable } from '@xylabs/promise'
|
|
3
3
|
import type { StepIdentity, StepIdentityString } from '@xyo-network/xl1-protocol'
|
|
4
4
|
|
|
5
|
-
export interface
|
|
5
|
+
export interface NetworkStakeStepAddressRewardViewerMethods {
|
|
6
6
|
// the step rewards for a specific network stakers for all of history
|
|
7
7
|
networkStakeStepRewardAddressHistory(address: Address): Promisable<Record<Address, bigint>>
|
|
8
8
|
|
|
@@ -16,7 +16,7 @@ export interface NetworkStakeStepAddressRewardViewInterface {
|
|
|
16
16
|
networkStakeStepRewardWeightForAddress(context: StepIdentity, address: Address): Promisable<bigint>
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
-
export interface
|
|
19
|
+
export interface NetworkStakeStepPoolRewardViewerMethods {
|
|
20
20
|
|
|
21
21
|
// all the step rewards for all the network stakers for a given step and block
|
|
22
22
|
networkStakeStepRewardPoolRewards(context: StepIdentity): Promisable<Record<Address, bigint>>
|
|
@@ -25,7 +25,7 @@ export interface NetworkStakeStepPoolRewardViewInterface {
|
|
|
25
25
|
networkStakeStepRewardPoolShares(context: StepIdentity): Promisable<Record<Address, bigint>>
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
-
export interface
|
|
28
|
+
export interface NetworkStakeStepRewardPositionViewerMethods {
|
|
29
29
|
// estimate the current weight for a given position at a given step
|
|
30
30
|
networkStakeStepRewardPositionWeight(context: StepIdentity, position: number): Promisable<bigint>
|
|
31
31
|
|
|
@@ -33,10 +33,10 @@ export interface NetworkStakeStepRewardPositionViewInterface {
|
|
|
33
33
|
networkStakeStepRewardPotentialPositionLoss(context: StepIdentity, position: number): Promisable<bigint>
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
-
export interface
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
36
|
+
export interface NetworkStakeStepRewardViewer extends
|
|
37
|
+
NetworkStakeStepPoolRewardViewerMethods,
|
|
38
|
+
NetworkStakeStepAddressRewardViewerMethods,
|
|
39
|
+
NetworkStakeStepRewardPositionViewerMethods
|
|
40
40
|
{
|
|
41
41
|
networkStakeStepRewardClaimedByAddress(address: Address): Promisable<bigint>
|
|
42
42
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Address } from '@xylabs/hex'
|
|
2
2
|
import type { Promisable } from '@xylabs/promise'
|
|
3
3
|
|
|
4
|
-
export interface
|
|
4
|
+
export interface StakeTotalsViewerMethods {
|
|
5
5
|
active(): Promisable<bigint>
|
|
6
6
|
activeByStaked(staked: Address): Promisable<bigint>
|
|
7
7
|
activeByStaker(address: Address): Promisable<bigint>
|
|
@@ -10,3 +10,5 @@ export interface StakeTotalsViewer {
|
|
|
10
10
|
withdrawn(): Promisable<bigint>
|
|
11
11
|
withdrawnByStaker(staker: Address): Promisable<bigint>
|
|
12
12
|
}
|
|
13
|
+
|
|
14
|
+
export interface StakeTotalsViewer extends StakeTotalsViewerMethods {}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { Address } from '@xylabs/hex'
|
|
2
2
|
import type { Promisable } from '@xylabs/promise'
|
|
3
3
|
|
|
4
|
-
import type { Position } from '
|
|
4
|
+
import type { Position } from '../../model/index.ts'
|
|
5
5
|
|
|
6
|
-
export interface
|
|
6
|
+
export interface StakeViewerMethods {
|
|
7
7
|
stakeById(id: number): Promisable<Position>
|
|
8
8
|
stakeByStaker(staker: Address, slot: number): Promisable<Position>
|
|
9
9
|
/* @deprecated use stakesByStaker */
|
|
@@ -2,7 +2,7 @@ import type { Address } from '@xylabs/hex'
|
|
|
2
2
|
import type { Promisable } from '@xylabs/promise'
|
|
3
3
|
import type { StepIdentity } from '@xyo-network/xl1-protocol'
|
|
4
4
|
|
|
5
|
-
export interface
|
|
5
|
+
export interface StepStakeViewerMethods {
|
|
6
6
|
// this is the prorated stake for all addresses in the step
|
|
7
7
|
stepStake: (step: StepIdentity) => Promisable<Record<Address, bigint>>
|
|
8
8
|
|
|
@@ -17,3 +17,5 @@ export interface StepStakeViewInterface {
|
|
|
17
17
|
The simplest way to calculate it is to enumerate every XL1 block in the step add the current stake at that point to a counter.
|
|
18
18
|
For example, if an Address had a stake of 100 for the entire time, then the prorated stake would be 100 * number of blocks in the step.
|
|
19
19
|
*/
|
|
20
|
+
|
|
21
|
+
export interface StepStakeViewer extends StepStakeViewerMethods {}
|
|
@@ -2,18 +2,18 @@ import type { Hash } from '@xylabs/hex'
|
|
|
2
2
|
import type { Promisable } from '@xylabs/promise'
|
|
3
3
|
import type { TimeDomain, TimePayload } from '@xyo-network/xl1-protocol'
|
|
4
4
|
|
|
5
|
-
export interface
|
|
5
|
+
export interface TimeSyncViewerMethods {
|
|
6
6
|
/** Convert time between different domains */
|
|
7
7
|
convertTime(fromDomain: TimeDomain, toDomain: TimeDomain, from: number): Promisable<number>
|
|
8
8
|
|
|
9
9
|
/** Get the current time for a given domain */
|
|
10
10
|
currentTime(domain: TimeDomain): Promisable<[string, number]>
|
|
11
|
-
}
|
|
12
11
|
|
|
13
|
-
export interface TimeSyncViewInterfaceV2 extends TimeSyncViewInterface {
|
|
14
12
|
/** Get the current time for a given domain */
|
|
15
13
|
currentTimeAndHash(domain: TimeDomain): Promisable<[number, Hash | null]>
|
|
16
14
|
|
|
17
15
|
/** Create a TimePayload with the current time from all configured domains */
|
|
18
16
|
currentTimePayload(): Promisable<TimePayload>
|
|
19
17
|
}
|
|
18
|
+
|
|
19
|
+
export interface TimeSyncViewer extends TimeSyncViewerMethods {}
|
|
@@ -2,7 +2,7 @@ import type { Hash } from '@xylabs/hex'
|
|
|
2
2
|
import type { Promisable } from '@xylabs/promise'
|
|
3
3
|
import type { SignedHydratedTransaction } from '@xyo-network/xl1-protocol'
|
|
4
4
|
|
|
5
|
-
export interface
|
|
5
|
+
export interface TransactionViewerMethods {
|
|
6
6
|
transactionByBlockHashAndIndex(blockHash: Hash, transactionIndex: number): Promisable<SignedHydratedTransaction | null>
|
|
7
7
|
transactionByBlockNumberAndIndex(blockNumber: number, transactionIndex: number): Promisable<SignedHydratedTransaction | null>
|
|
8
8
|
transactionByHash(transactionHash: Hash): Promisable<SignedHydratedTransaction | null>
|
|
@@ -14,14 +14,14 @@ export type TransferBalanceHistoryItem = [
|
|
|
14
14
|
]
|
|
15
15
|
export type TransferPair = [/* from */ Address, /* to */Address]
|
|
16
16
|
|
|
17
|
-
export interface
|
|
17
|
+
export interface TransferBalancesViewerMethods {
|
|
18
18
|
transferBalances(address: Address[]): Promisable<Partial<Record<Address, Record<Address, AttoXL1>>>>
|
|
19
19
|
transferBalancesHistories(address: Address[]): Promisable<Partial<Record<Address, Record<Address, TransferBalanceHistoryItem[]>>>>
|
|
20
20
|
transferPairBalances(address: TransferPair[]): Promisable<Partial<Record<Address, Record<Address, AttoXL1>>>>
|
|
21
21
|
transferPairBalancesHistories(address: TransferPair[]): Promisable<Partial<Record<Address, Record<Address, TransferBalanceHistoryItem[]>>>>
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
-
export interface
|
|
24
|
+
export interface TransferBalanceViewerMethods {
|
|
25
25
|
transferBalance(address: Address): Promisable<AttoXL1>
|
|
26
26
|
transferBalanceHistory(address: Address, range?: XL1BlockRange): Promisable<TransferBalanceHistoryItem[]>
|
|
27
27
|
transferPairBalance(address: TransferPair): Promisable<AttoXL1>
|
|
@@ -4,7 +4,6 @@ export * from './Chain.ts'
|
|
|
4
4
|
export * from './ChainContract.ts'
|
|
5
5
|
export * from './Fork.ts'
|
|
6
6
|
export * from './NetworkStakeStepReward.ts'
|
|
7
|
-
export * from './Stake.ts'
|
|
8
7
|
export * from './StakeTotalsViewer.ts'
|
|
9
8
|
export * from './StakeViewer.ts'
|
|
10
9
|
export * from './StepStake.ts'
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Address } from '@xylabs/hex'
|
|
2
2
|
import type { Promisable } from '@xylabs/promise'
|
|
3
3
|
|
|
4
|
-
import type { Position } from '
|
|
4
|
+
import type { Position } from '../Position.ts'
|
|
5
5
|
|
|
6
6
|
export interface ChainStakeRead {
|
|
7
7
|
active(time?: number): Promisable<bigint>
|
package/src/model/index.ts
CHANGED
|
@@ -4,6 +4,7 @@ export * from './ChainIdentity.ts'
|
|
|
4
4
|
export * from './ChainStake/index.ts'
|
|
5
5
|
export * from './ChainStore.ts'
|
|
6
6
|
export * from './PayloadMap.ts'
|
|
7
|
+
export * from './Position.ts'
|
|
7
8
|
export * from './RecordKeyType.ts'
|
|
8
9
|
export * from './StakeEvents.ts'
|
|
9
10
|
export * from './summary.ts'
|
|
@@ -2,7 +2,7 @@ import type { Address } from '@xylabs/hex'
|
|
|
2
2
|
import type { Promisable } from '@xylabs/promise'
|
|
3
3
|
import type { PositionId, StepIdentity } from '@xyo-network/xl1-protocol'
|
|
4
4
|
|
|
5
|
-
import type { Position } from '../../
|
|
5
|
+
import type { Position } from '../../model/index.ts'
|
|
6
6
|
import type { NetworkStakeStepRewardsViewer } from './NetworkStake/index.ts'
|
|
7
7
|
|
|
8
8
|
export interface PagedPositionsOptions {
|
|
@@ -1,16 +1,19 @@
|
|
|
1
1
|
import type {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
AccountBalanceViewerMethods,
|
|
3
|
+
BlockViewierMethods,
|
|
4
|
+
ChainViewerMethods,
|
|
5
|
+
ForkViewerMethods,
|
|
6
|
+
NetworkStakeStepRewardViewer,
|
|
7
|
+
StakeViewerMethods,
|
|
8
|
+
TransactionViewerMethods,
|
|
9
|
+
TransferBalanceViewerMethods,
|
|
7
10
|
} from '../../interfaces/index.ts'
|
|
8
11
|
import type { NetworkStakeViewer } from './NetworkStake/index.ts'
|
|
9
12
|
import type { StepViewer } from './StepViewer.ts'
|
|
10
13
|
|
|
11
|
-
export interface XyoViewerMethods extends
|
|
12
|
-
|
|
13
|
-
|
|
14
|
+
export interface XyoViewerMethods extends AccountBalanceViewerMethods, TransferBalanceViewerMethods,
|
|
15
|
+
NetworkStakeStepRewardViewer,
|
|
16
|
+
ChainViewerMethods, BlockViewierMethods, TransactionViewerMethods, StakeViewerMethods, ForkViewerMethods {
|
|
14
17
|
}
|
|
15
18
|
|
|
16
19
|
export interface XyoViewer extends XyoViewerMethods {
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
+
import type { ChainContractViewer } from '../../interfaces/index.ts'
|
|
1
2
|
import type { BaseChainService } from './BaseChainService.ts'
|
|
2
|
-
import type {
|
|
3
|
-
ChainContractViewer, ChainStaker, ChainStakeViewer,
|
|
4
|
-
} from './interfaces/index.ts'
|
|
3
|
+
import type { ChainStaker, ChainStakeViewer } from './interfaces/index.ts'
|
|
5
4
|
|
|
6
5
|
export interface ChainService extends ChainContractViewer, ChainStakeViewer, ChainStaker, BaseChainService {}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import type { StakeTotalsViewer } from '../../../interfaces/index.ts'
|
|
2
|
-
import type { ChainContractViewer } from './ChainContractViewer.ts'
|
|
1
|
+
import type { ChainContractViewer, StakeTotalsViewer } from '../../../interfaces/index.ts'
|
|
3
2
|
|
|
4
3
|
export interface ChainStakeViewer extends ChainContractViewer, StakeTotalsViewer {
|
|
5
4
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { NetworkStakeStepRewardViewer } from '../interfaces/index.ts'
|
|
2
2
|
import type { ServiceInterface } from './Service.ts'
|
|
3
3
|
|
|
4
|
-
export interface NetworkStakeStepRewardService extends
|
|
4
|
+
export interface NetworkStakeStepRewardService extends NetworkStakeStepRewardViewer, ServiceInterface {}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { StepStakeViewer } from '../interfaces/index.ts'
|
|
2
2
|
import type { ServiceInterface } from './Service.ts'
|
|
3
3
|
|
|
4
|
-
export interface StepStakeService extends ServiceInterface,
|
|
4
|
+
export interface StepStakeService extends ServiceInterface, StepStakeViewer {}
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { TimeSyncViewerMethods } from '../interfaces/index.ts'
|
|
2
2
|
import type { ServiceInterface } from './Service.ts'
|
|
3
3
|
|
|
4
|
-
export interface TimeSyncService extends ServiceInterface,
|
|
5
|
-
|
|
6
|
-
export interface TimeSyncServiceV2 extends ServiceInterface, TimeSyncViewInterfaceV2 {}
|
|
4
|
+
export interface TimeSyncService extends ServiceInterface, TimeSyncViewerMethods {}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Stake.d.ts","sourceRoot":"","sources":["../../../../src/interfaces/viewers/Stake.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AAC1C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAA;AAE3D,MAAM,MAAM,QAAQ,GAAG;IAErB,QAAQ,EAAE,MAAM,CAAA;IAEhB,MAAM,EAAE,MAAM,CAAA;IAEd,EAAE,EAAE,UAAU,CAAA;IAEd,WAAW,EAAE,MAAM,CAAA;IAEnB,MAAM,EAAE,OAAO,CAAA;IAEf,MAAM,EAAE,OAAO,CAAA;IAEf,aAAa,EAAE,MAAM,CAAA;CACtB,CAAA;AAED,yCAAyC;AACzC,MAAM,MAAM,KAAK,GAAG,QAAQ,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ChainContractViewer.d.ts","sourceRoot":"","sources":["../../../../../src/services/Chain/interfaces/ChainContractViewer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAA;AAE9E,MAAM,WAAW,mBAAoB,SAAQ,0BAA0B;CAEtE"}
|
|
File without changes
|