@xyo-network/xl1-protocol-sdk 1.15.26 → 1.15.28
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/block/primitives/blockFromBlockNumber.d.ts +1 -1
- package/dist/neutral/block/primitives/blockFromBlockNumber.d.ts.map +1 -1
- package/dist/neutral/block/primitives/index.d.ts +1 -0
- package/dist/neutral/block/primitives/index.d.ts.map +1 -1
- package/dist/neutral/block/primitives/toStepIdentityString.d.ts +3 -0
- package/dist/neutral/block/primitives/toStepIdentityString.d.ts.map +1 -0
- package/dist/neutral/config/Config.d.ts +2 -2
- package/dist/neutral/config/Log.d.ts +1 -1
- package/dist/neutral/driver/cache/LruCacheMap.d.ts +13 -0
- package/dist/neutral/driver/cache/LruCacheMap.d.ts.map +1 -0
- package/dist/neutral/driver/cache/index.d.ts +2 -0
- package/dist/neutral/driver/cache/index.d.ts.map +1 -0
- package/dist/neutral/driver/index.d.ts +3 -0
- package/dist/neutral/driver/index.d.ts.map +1 -0
- package/dist/neutral/driver/memory/MemoryMap.d.ts +12 -0
- package/dist/neutral/driver/memory/MemoryMap.d.ts.map +1 -0
- package/dist/neutral/driver/memory/index.d.ts +2 -0
- package/dist/neutral/driver/memory/index.d.ts.map +1 -0
- package/dist/neutral/eip-712/Payloads/EIP712Data.d.ts +0 -16
- package/dist/neutral/eip-712/Payloads/EIP712Data.d.ts.map +1 -1
- package/dist/neutral/index.d.ts +1 -2
- package/dist/neutral/index.d.ts.map +1 -1
- package/dist/neutral/index.mjs +193 -62
- package/dist/neutral/index.mjs.map +1 -1
- package/dist/neutral/instances/index.d.ts +0 -2
- package/dist/neutral/instances/index.d.ts.map +1 -1
- package/dist/neutral/model/ChainContext/ChainContext.d.ts +14 -4
- package/dist/neutral/model/ChainContext/ChainContext.d.ts.map +1 -1
- package/dist/neutral/model/ChainContext/ChainStateContext.d.ts +1 -1
- package/dist/neutral/model/ChainContext/ChainStateContext.d.ts.map +1 -1
- package/dist/neutral/model/ChainStake/ChainStakeRead.d.ts +12 -12
- package/dist/neutral/model/ChainStake/ChainStakeRead.d.ts.map +1 -1
- package/dist/neutral/model/StakeEvents.d.ts +1 -0
- package/dist/neutral/model/StakeEvents.d.ts.map +1 -1
- package/dist/neutral/primitives/index.d.ts +1 -0
- package/dist/neutral/primitives/index.d.ts.map +1 -1
- package/dist/neutral/primitives/timeBudget.d.ts +3 -0
- package/dist/neutral/primitives/timeBudget.d.ts.map +1 -0
- package/dist/neutral/transaction/buildUnsignedTransaction.d.ts +2 -2
- package/dist/neutral/transaction/buildUnsignedTransaction.d.ts.map +1 -1
- package/dist/neutral/transaction/primitives/transactionElevatedPayloads.d.ts +2 -2
- package/dist/neutral/transaction/primitives/transactionElevatedPayloads.d.ts.map +1 -1
- package/package.json +28 -27
- package/src/block/primitives/blockFromBlockNumber.ts +30 -27
- package/src/block/primitives/index.ts +1 -0
- package/src/block/primitives/toStepIdentityString.ts +5 -0
- package/src/block/primitives/transfers/transfersStepSummaryFromRange.ts +2 -2
- package/src/block/primitives/transfers/transfersSummary.ts +2 -2
- package/src/driver/cache/LruCacheMap.ts +42 -0
- package/src/driver/cache/index.ts +1 -0
- package/src/driver/index.ts +2 -0
- package/src/driver/memory/MemoryMap.ts +42 -0
- package/src/driver/memory/index.ts +1 -0
- package/src/eip-712/Payloads/EIP712Data.ts +0 -19
- package/src/index.ts +1 -2
- package/src/instances/index.ts +0 -2
- package/src/model/ChainContext/ChainContext.ts +49 -4
- package/src/model/ChainContext/ChainStateContext.ts +1 -1
- package/src/model/ChainStake/ChainStakeRead.ts +12 -12
- package/src/model/StakeEvents.ts +1 -0
- package/src/primitives/index.ts +1 -0
- package/src/primitives/summary/balances/balancesStepSummaryFromRange.ts +2 -2
- package/src/primitives/summary/balances/balancesSummary.ts +3 -3
- package/src/primitives/summary/transfers/transfersStepSummaryFromRange.ts +2 -2
- package/src/primitives/summary/transfers/transfersSummary.ts +3 -3
- package/src/primitives/timeBudget.ts +11 -0
- package/src/transaction/buildUnsignedTransaction.ts +4 -8
- package/src/transaction/primitives/transactionElevatedPayloads.ts +2 -2
- package/src/transaction/script.ts +3 -3
- package/dist/neutral/ChainServiceCollection.d.ts +0 -61
- package/dist/neutral/ChainServiceCollection.d.ts.map +0 -1
- package/dist/neutral/instances/ShiftedBigIntConfig.d.ts +0 -9
- package/dist/neutral/instances/ShiftedBigIntConfig.d.ts.map +0 -1
- package/dist/neutral/instances/XL1Amount.d.ts +0 -15
- package/dist/neutral/instances/XL1Amount.d.ts.map +0 -1
- package/src/ChainServiceCollection.ts +0 -66
- package/src/instances/ShiftedBigIntConfig.ts +0 -8
- package/src/instances/XL1Amount.ts +0 -29
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import type { Address } from '@xylabs/hex'
|
|
2
2
|
import type { Promisable } from '@xylabs/promise'
|
|
3
|
-
import type {
|
|
3
|
+
import type { Position } from '@xyo-network/xl1-protocol'
|
|
4
4
|
|
|
5
5
|
export interface ChainStakeRead {
|
|
6
|
-
active(): Promisable<bigint>
|
|
7
|
-
activeByAddressStaked(address: string): Promisable<bigint>
|
|
8
|
-
activeByStaker(address: string): Promisable<bigint>
|
|
9
|
-
pending(): Promisable<bigint>
|
|
10
|
-
pendingByStaker(staker: string): Promisable<bigint>
|
|
11
|
-
stakeById(id: number): Promisable<
|
|
12
|
-
stakeByStaker(staker: Address, slot: number): Promisable<
|
|
13
|
-
stakesByStaked(staked: Address, range?: [number, number |
|
|
14
|
-
stakesByStaker(staker: Address, range?: [number, number |
|
|
15
|
-
withdrawn(): Promisable<bigint>
|
|
16
|
-
withdrawnByStaker(staker: string): Promisable<bigint>
|
|
6
|
+
active(time?: number): Promisable<bigint>
|
|
7
|
+
activeByAddressStaked(address: string, time?: number): Promisable<bigint>
|
|
8
|
+
activeByStaker(address: string, time?: number): Promisable<bigint>
|
|
9
|
+
pending(time?: number): Promisable<bigint>
|
|
10
|
+
pendingByStaker(staker: string, time?: number): Promisable<bigint>
|
|
11
|
+
stakeById(id: number, time?: number): Promisable<Position>
|
|
12
|
+
stakeByStaker(staker: Address, slot: number, time?: number): Promisable<Position>
|
|
13
|
+
stakesByStaked(staked: Address, range?: [number, number | undefined]): Promisable<Position[]>
|
|
14
|
+
stakesByStaker(staker: Address, range?: [number, number | undefined]): Promisable<Position[]>
|
|
15
|
+
withdrawn(time?: number): Promisable<bigint>
|
|
16
|
+
withdrawnByStaker(staker: string, time?: number): Promisable<bigint>
|
|
17
17
|
}
|
package/src/model/StakeEvents.ts
CHANGED
|
@@ -34,5 +34,6 @@ export interface StakeEvent<TName extends StakeEventName = StakeEventName> exten
|
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
export interface StakeEventsRead {
|
|
37
|
+
positionCount(range: [number, number | 'latest']): Promisable<number>
|
|
37
38
|
stakeEvents<TName extends StakeEventName>(range: [number, number | 'latest'], filter?: StakeEventFilter<TName>): Promisable<StakeEvent<TName>[]>
|
|
38
39
|
}
|
package/src/primitives/index.ts
CHANGED
|
@@ -25,7 +25,7 @@ export async function balancesStepSummaryFromRange(
|
|
|
25
25
|
// console.log(`balanceStepSummaryFromRange: head=${head}, range=${range[0]}-${range[1]}`)
|
|
26
26
|
const frameHeadHash = await hashFromBlockNumber(context, range[1])
|
|
27
27
|
const frameSize = range[1] - range[0] + 1
|
|
28
|
-
const
|
|
28
|
+
const [headHash] = await context.head()
|
|
29
29
|
|
|
30
30
|
let result: BalancesStepSummary | undefined = undefined
|
|
31
31
|
|
|
@@ -37,7 +37,7 @@ export async function balancesStepSummaryFromRange(
|
|
|
37
37
|
balances[address as Address] = toSignedBigInt(balance)
|
|
38
38
|
}
|
|
39
39
|
result = {
|
|
40
|
-
schema: BalancesStepSummarySchema, hash:
|
|
40
|
+
schema: BalancesStepSummarySchema, hash: headHash, stepSize: -1, balances,
|
|
41
41
|
}
|
|
42
42
|
} else {
|
|
43
43
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -13,9 +13,9 @@ export async function balancesSummary(
|
|
|
13
13
|
context: BalanceStepSummaryContext,
|
|
14
14
|
): Promise<Partial<Record<Address, bigint>>> {
|
|
15
15
|
return await spanRootAsync('balanceSummary', async () => {
|
|
16
|
-
const
|
|
17
|
-
const headResult = await context.store.chainMap.get(
|
|
18
|
-
const headBoundWitness = asBlockBoundWitnessWithStorageMeta(headResult, () => `Head block not found for hash: ${
|
|
16
|
+
const [headHash] = await context.head()
|
|
17
|
+
const headResult = await context.store.chainMap.get(headHash)
|
|
18
|
+
const headBoundWitness = asBlockBoundWitnessWithStorageMeta(headResult, () => `Head block not found for hash: ${headHash}`, { required: true })
|
|
19
19
|
const rangeStart = asXL1BlockNumber(isDefined(context.windowSize) ? Math.max(headBoundWitness.block - context.windowSize + 1, 0) : 0)
|
|
20
20
|
const ranges = deepCalculateFramesFromRange([rangeStart, asXL1BlockNumber(headBoundWitness.block)])
|
|
21
21
|
const summaries = await Promise.all(ranges.map(range => balancesStepSummaryFromRange(context, range)))
|
|
@@ -25,7 +25,7 @@ export async function transfersStepSummaryFromRange(
|
|
|
25
25
|
// console.log(`transfersStepSummaryFromRange: head=${head}, range=${range[0]}-${range[1]}`)
|
|
26
26
|
const frameHeadHash = await hashFromBlockNumber(context, range[1])
|
|
27
27
|
const frameSize = range[1] - range[0] + 1
|
|
28
|
-
const
|
|
28
|
+
const [headHash] = await context.head()
|
|
29
29
|
|
|
30
30
|
let result: TransfersStepSummary | undefined = undefined
|
|
31
31
|
|
|
@@ -40,7 +40,7 @@ export async function transfersStepSummaryFromRange(
|
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
42
|
result = {
|
|
43
|
-
schema: TransfersStepSummarySchema, hash:
|
|
43
|
+
schema: TransfersStepSummarySchema, hash: headHash, stepSize: -1, transfers,
|
|
44
44
|
}
|
|
45
45
|
} else {
|
|
46
46
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -14,9 +14,9 @@ export async function transfersSummary(
|
|
|
14
14
|
context: TransfersStepSummaryContext,
|
|
15
15
|
): Promise<Partial<Record<Address, Partial<Record<Address, bigint>>>>> {
|
|
16
16
|
return await spanRootAsync('transferSummary', async () => {
|
|
17
|
-
const
|
|
18
|
-
const headResult = await context.store.chainMap.get(
|
|
19
|
-
const headBoundWitness = asBlockBoundWitnessWithStorageMeta(headResult, () => `Head block not found for hash: ${
|
|
17
|
+
const [headHash] = await context.head()
|
|
18
|
+
const headResult = await context.store.chainMap.get(headHash)
|
|
19
|
+
const headBoundWitness = asBlockBoundWitnessWithStorageMeta(headResult, () => `Head block not found for hash: ${headHash}`, { required: true })
|
|
20
20
|
const rangeStart = asXL1BlockNumber(isDefined(context.windowSize) ? Math.max(headBoundWitness.block - context.windowSize + 1, 0) : 0)
|
|
21
21
|
const ranges = deepCalculateFramesFromRange([rangeStart, asXL1BlockNumber(headBoundWitness.block)])
|
|
22
22
|
const summaries = await Promise.all(ranges.map(range => transfersStepSummaryFromRange(context, range)))
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type Logger } from '@xylabs/logger'
|
|
2
|
+
|
|
3
|
+
export async function timeBudget<TResult>(name: string, logger: Logger | undefined, func: () => Promise<TResult>, budget: number): Promise<TResult> {
|
|
4
|
+
const start = Date.now()
|
|
5
|
+
const result = await func()
|
|
6
|
+
const duration = Date.now() - start
|
|
7
|
+
if (duration > budget) {
|
|
8
|
+
logger?.warn(`Function [${name}] execution exceeded budget: ${duration}ms > ${budget}ms`)
|
|
9
|
+
}
|
|
10
|
+
return result
|
|
11
|
+
}
|
|
@@ -4,12 +4,8 @@ import { BoundWitnessBuilder } from '@xyo-network/boundwitness-builder'
|
|
|
4
4
|
import { PayloadBuilder } from '@xyo-network/payload-builder'
|
|
5
5
|
import type { Payload } from '@xyo-network/payload-model'
|
|
6
6
|
import type {
|
|
7
|
-
AllowedBlockPayload,
|
|
8
|
-
|
|
9
|
-
ExecutableFields,
|
|
10
|
-
FromFields,
|
|
11
|
-
TransactionBoundWitness, TransactionBoundWitnessFields, TransactionFeesBigInt,
|
|
12
|
-
UnsignedHydratedTransactionWithHashStorageMeta,
|
|
7
|
+
AllowedBlockPayload, ChainId, ExecutableFields, FromFields, TransactionBoundWitness, TransactionBoundWitnessFields, TransactionFeesBigInt,
|
|
8
|
+
UnsignedHydratedTransaction,
|
|
13
9
|
} from '@xyo-network/xl1-protocol'
|
|
14
10
|
import { defaultTransactionFees } from '@xyo-network/xl1-protocol'
|
|
15
11
|
|
|
@@ -21,7 +17,7 @@ export async function buildUnsignedTransaction(
|
|
|
21
17
|
exp: number,
|
|
22
18
|
from: Address,
|
|
23
19
|
fees: TransactionFeesBigInt = defaultTransactionFees,
|
|
24
|
-
): Promise<
|
|
20
|
+
): Promise<UnsignedHydratedTransaction> {
|
|
25
21
|
const txBoundWitnessFields: TransactionBoundWitnessFields = {
|
|
26
22
|
chain,
|
|
27
23
|
fees: {
|
|
@@ -55,5 +51,5 @@ export async function buildUnsignedTransaction(
|
|
|
55
51
|
.payloads([...onChainPayloads, ...offChainPayloads])
|
|
56
52
|
.build()
|
|
57
53
|
|
|
58
|
-
return [
|
|
54
|
+
return [tx, txPayloads]
|
|
59
55
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { asHash, type Hash } from '@xylabs/hex'
|
|
2
|
-
import type { Payload,
|
|
2
|
+
import type { Payload, WithHashMeta } from '@xyo-network/payload-model'
|
|
3
3
|
import type { SignedHydratedTransactionWithStorageMeta, TransactionBoundWitness } from '@xyo-network/xl1-protocol'
|
|
4
4
|
|
|
5
5
|
import { crackOperations } from './transactionOperations.ts'
|
|
@@ -9,7 +9,7 @@ export function transactionElevatedPayloadHashes(transaction: TransactionBoundWi
|
|
|
9
9
|
return elevateOperations.map(op => asHash(op[1][0], true))
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
-
export function transactionElevatedPayloads([transaction, payloads]: SignedHydratedTransactionWithStorageMeta):
|
|
12
|
+
export function transactionElevatedPayloads([transaction, payloads]: SignedHydratedTransactionWithStorageMeta): WithHashMeta<Payload>[] {
|
|
13
13
|
const hashes = transactionElevatedPayloadHashes(transaction)
|
|
14
14
|
const elevatedPayloads = payloads.filter(payload => hashes.includes(payload._hash))
|
|
15
15
|
return elevatedPayloads
|
|
@@ -3,7 +3,7 @@ import { assertEx } from '@xylabs/assert'
|
|
|
3
3
|
import { asHash, type Hash } from '@xylabs/hex'
|
|
4
4
|
import type { WithStorageMeta } from '@xyo-network/payload-model'
|
|
5
5
|
import type { AllowedBlockPayload, HydratedTransactionWithStorageMeta } from '@xyo-network/xl1-protocol'
|
|
6
|
-
import {
|
|
6
|
+
import { isAllowedBlockPayloadWithHashMeta } from '@xyo-network/xl1-protocol'
|
|
7
7
|
|
|
8
8
|
export const tryExtractElevatedHashesFromScript = (strings: string[]): Hash[] => {
|
|
9
9
|
const hashes = strings
|
|
@@ -27,7 +27,7 @@ export const tryExtractElevatedHashes = (tx: HydratedTransactionWithStorageMeta)
|
|
|
27
27
|
const hashes = script ? tryExtractElevatedHashesFromScript(script) : []
|
|
28
28
|
return payloads
|
|
29
29
|
.filter(p => hashes.includes(p._hash))
|
|
30
|
-
.filter(
|
|
30
|
+
.filter(isAllowedBlockPayloadWithHashMeta)
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
export const extractElevatedHashes = (tx: HydratedTransactionWithStorageMeta): WithStorageMeta<AllowedBlockPayload>[] => {
|
|
@@ -36,7 +36,7 @@ export const extractElevatedHashes = (tx: HydratedTransactionWithStorageMeta): W
|
|
|
36
36
|
const hashes = script ? tryExtractElevatedHashesFromScript(script) : []
|
|
37
37
|
const filtered = payloads
|
|
38
38
|
.filter(p => hashes.includes(p._hash))
|
|
39
|
-
.filter(
|
|
39
|
+
.filter(isAllowedBlockPayloadWithHashMeta)
|
|
40
40
|
assertEx(filtered.length === hashes.length, () => 'Invalid elevated hashes')
|
|
41
41
|
return filtered
|
|
42
42
|
}
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import type { ArchivistInstance, WriteArchivist } from '@xyo-network/archivist-model';
|
|
2
|
-
import type { WalletInstance } from '@xyo-network/wallet-model';
|
|
3
|
-
import type { AccountBalanceService, BlockProducerService, BlockRewardService, ChainContractViewer, ChainStaker, ChainStakeViewer, ElectionService, EventingChainBlockNumberIteratorService, StakeIntentService } from '@xyo-network/xl1-protocol';
|
|
4
|
-
/** @deprecated use ChainServiceCollectionV2 */
|
|
5
|
-
export interface ChainServiceCollection {
|
|
6
|
-
/**
|
|
7
|
-
* The account which is used to sign transactions
|
|
8
|
-
*/
|
|
9
|
-
account: WalletInstance;
|
|
10
|
-
/**
|
|
11
|
-
* Services for working with account balances
|
|
12
|
-
*/
|
|
13
|
-
balanceService: AccountBalanceService;
|
|
14
|
-
/**
|
|
15
|
-
* The archivist which the chain data is stored in
|
|
16
|
-
*/
|
|
17
|
-
chainArchivist: ArchivistInstance;
|
|
18
|
-
/**
|
|
19
|
-
* Service for viewing codified chain information
|
|
20
|
-
* from a contract
|
|
21
|
-
*/
|
|
22
|
-
chainContractViewer: ChainContractViewer;
|
|
23
|
-
/**
|
|
24
|
-
* The chain iterator
|
|
25
|
-
*/
|
|
26
|
-
chainIterator?: EventingChainBlockNumberIteratorService;
|
|
27
|
-
/**
|
|
28
|
-
* Service for viewing stake information
|
|
29
|
-
*/
|
|
30
|
-
chainStakeViewer: ChainStakeViewer;
|
|
31
|
-
/**
|
|
32
|
-
* Service for staking
|
|
33
|
-
*/
|
|
34
|
-
chainStaker: ChainStaker;
|
|
35
|
-
/**
|
|
36
|
-
* The archivist which the chain submissions are stored in
|
|
37
|
-
*/
|
|
38
|
-
chainSubmissionsArchivistWrite: WriteArchivist;
|
|
39
|
-
/**
|
|
40
|
-
* Service for determining leader election
|
|
41
|
-
*/
|
|
42
|
-
electionService: ElectionService;
|
|
43
|
-
/**
|
|
44
|
-
* The archivist which the pending transactions are stored
|
|
45
|
-
* as bundled transactions
|
|
46
|
-
*/
|
|
47
|
-
pendingBundledTransactionsArchivistWrite: ArchivistInstance;
|
|
48
|
-
/**
|
|
49
|
-
* The block producer service
|
|
50
|
-
*/
|
|
51
|
-
producer: BlockProducerService;
|
|
52
|
-
/**
|
|
53
|
-
* Service response for calculating block rewards
|
|
54
|
-
*/
|
|
55
|
-
rewardService: BlockRewardService;
|
|
56
|
-
/**
|
|
57
|
-
* Services for working with staked intents
|
|
58
|
-
*/
|
|
59
|
-
stakeIntentService: StakeIntentService;
|
|
60
|
-
}
|
|
61
|
-
//# sourceMappingURL=ChainServiceCollection.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ChainServiceCollection.d.ts","sourceRoot":"","sources":["../../src/ChainServiceCollection.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAA;AACrF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAA;AAC/D,OAAO,KAAK,EACV,qBAAqB,EAAE,oBAAoB,EAC3C,kBAAkB,EAAE,mBAAmB,EAAE,WAAW,EAAE,gBAAgB,EAAE,eAAe,EAAE,uCAAuC,EAChI,kBAAkB,EACnB,MAAM,2BAA2B,CAAA;AAElC,+CAA+C;AAC/C,MAAM,WAAW,sBAAsB;IAErC;;OAEG;IACH,OAAO,EAAE,cAAc,CAAA;IACvB;;OAEG;IACH,cAAc,EAAE,qBAAqB,CAAA;IACrC;;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,eAAe,EAAE,eAAe,CAAA;IAChC;;;OAGG;IACH,wCAAwC,EAAE,iBAAiB,CAAA;IAC3D;;OAEG;IACH,QAAQ,EAAE,oBAAoB,CAAA;IAC9B;;OAEG;IACH,aAAa,EAAE,kBAAkB,CAAA;IACjC;;OAEG;IACH,kBAAkB,EAAE,kBAAkB,CAAA;CACvC"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/** @deprecated use from \@xyo-network/xl1-protocol instead */
|
|
2
|
-
export interface ShiftedBigIntConfig {
|
|
3
|
-
locale: Intl.LocalesArgument;
|
|
4
|
-
maxCharacters: number;
|
|
5
|
-
maxDecimal: number;
|
|
6
|
-
minDecimals: number;
|
|
7
|
-
places: number;
|
|
8
|
-
}
|
|
9
|
-
//# sourceMappingURL=ShiftedBigIntConfig.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ShiftedBigIntConfig.d.ts","sourceRoot":"","sources":["../../../src/instances/ShiftedBigIntConfig.ts"],"names":[],"mappings":"AAAA,8DAA8D;AAC9D,MAAM,WAAW,mBAAmB;IAClC,MAAM,EAAE,IAAI,CAAC,eAAe,CAAA;IAC5B,aAAa,EAAE,MAAM,CAAA;IACrB,UAAU,EAAE,MAAM,CAAA;IAClB,WAAW,EAAE,MAAM,CAAA;IACnB,MAAM,EAAE,MAAM,CAAA;CACf"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import type { AttoXL1, FemtoXL1, MicroXL1, MilliXL1, NanoXL1, PicoXL1 } from '@xyo-network/xl1-protocol';
|
|
2
|
-
import type { ShiftedBigIntConfig } from './ShiftedBigIntConfig.ts';
|
|
3
|
-
/** @deprecated use from \@xyo-network/xl1-protocol instead */
|
|
4
|
-
export interface XL1AmountInstance {
|
|
5
|
-
value: AttoXL1;
|
|
6
|
-
to(places: bigint | number): bigint;
|
|
7
|
-
milli: MilliXL1;
|
|
8
|
-
micro: MicroXL1;
|
|
9
|
-
nano: NanoXL1;
|
|
10
|
-
pico: PicoXL1;
|
|
11
|
-
femto: FemtoXL1;
|
|
12
|
-
atto: AttoXL1;
|
|
13
|
-
toString(places: number, config: Partial<ShiftedBigIntConfig>): string;
|
|
14
|
-
}
|
|
15
|
-
//# sourceMappingURL=XL1Amount.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"XL1Amount.d.ts","sourceRoot":"","sources":["../../../src/instances/XL1Amount.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,EACxD,MAAM,2BAA2B,CAAA;AAElC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAA;AAEnE,8DAA8D;AAC9D,MAAM,WAAW,iBAAiB;IAChC,KAAK,EAAE,OAAO,CAAA;IAEd,EAAE,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAAA;IAEnC,KAAK,EAAE,QAAQ,CAAA;IAEf,KAAK,EAAE,QAAQ,CAAA;IAEf,IAAI,EAAE,OAAO,CAAA;IAEb,IAAI,EAAE,OAAO,CAAA;IAEb,KAAK,EAAE,QAAQ,CAAA;IAEf,IAAI,EAAE,OAAO,CAAA;IAEb,QAAQ,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,mBAAmB,CAAC,GAAG,MAAM,CAAA;CACvE"}
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
import type { ArchivistInstance, WriteArchivist } from '@xyo-network/archivist-model'
|
|
2
|
-
import type { WalletInstance } from '@xyo-network/wallet-model'
|
|
3
|
-
import type {
|
|
4
|
-
AccountBalanceService, BlockProducerService,
|
|
5
|
-
BlockRewardService, ChainContractViewer, ChainStaker, ChainStakeViewer, ElectionService, EventingChainBlockNumberIteratorService,
|
|
6
|
-
StakeIntentService,
|
|
7
|
-
} from '@xyo-network/xl1-protocol'
|
|
8
|
-
|
|
9
|
-
/** @deprecated use ChainServiceCollectionV2 */
|
|
10
|
-
export interface ChainServiceCollection {
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* The account which is used to sign transactions
|
|
14
|
-
*/
|
|
15
|
-
account: WalletInstance
|
|
16
|
-
/**
|
|
17
|
-
* Services for working with account balances
|
|
18
|
-
*/
|
|
19
|
-
balanceService: AccountBalanceService
|
|
20
|
-
/**
|
|
21
|
-
* The archivist which the chain data is stored in
|
|
22
|
-
*/
|
|
23
|
-
chainArchivist: ArchivistInstance
|
|
24
|
-
/**
|
|
25
|
-
* Service for viewing codified chain information
|
|
26
|
-
* from a contract
|
|
27
|
-
*/
|
|
28
|
-
chainContractViewer: ChainContractViewer
|
|
29
|
-
/**
|
|
30
|
-
* The chain iterator
|
|
31
|
-
*/
|
|
32
|
-
chainIterator?: EventingChainBlockNumberIteratorService
|
|
33
|
-
/**
|
|
34
|
-
* Service for viewing stake information
|
|
35
|
-
*/
|
|
36
|
-
chainStakeViewer: ChainStakeViewer
|
|
37
|
-
/**
|
|
38
|
-
* Service for staking
|
|
39
|
-
*/
|
|
40
|
-
chainStaker: ChainStaker
|
|
41
|
-
/**
|
|
42
|
-
* The archivist which the chain submissions are stored in
|
|
43
|
-
*/
|
|
44
|
-
chainSubmissionsArchivistWrite: WriteArchivist
|
|
45
|
-
/**
|
|
46
|
-
* Service for determining leader election
|
|
47
|
-
*/
|
|
48
|
-
electionService: ElectionService
|
|
49
|
-
/**
|
|
50
|
-
* The archivist which the pending transactions are stored
|
|
51
|
-
* as bundled transactions
|
|
52
|
-
*/
|
|
53
|
-
pendingBundledTransactionsArchivistWrite: ArchivistInstance
|
|
54
|
-
/**
|
|
55
|
-
* The block producer service
|
|
56
|
-
*/
|
|
57
|
-
producer: BlockProducerService
|
|
58
|
-
/**
|
|
59
|
-
* Service response for calculating block rewards
|
|
60
|
-
*/
|
|
61
|
-
rewardService: BlockRewardService
|
|
62
|
-
/**
|
|
63
|
-
* Services for working with staked intents
|
|
64
|
-
*/
|
|
65
|
-
stakeIntentService: StakeIntentService
|
|
66
|
-
}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
/* eslint-disable sonarjs/deprecation */
|
|
2
|
-
/* eslint-disable @typescript-eslint/member-ordering */
|
|
3
|
-
|
|
4
|
-
import type {
|
|
5
|
-
AttoXL1, FemtoXL1, MicroXL1, MilliXL1, NanoXL1, PicoXL1,
|
|
6
|
-
} from '@xyo-network/xl1-protocol'
|
|
7
|
-
|
|
8
|
-
import type { ShiftedBigIntConfig } from './ShiftedBigIntConfig.ts'
|
|
9
|
-
|
|
10
|
-
/** @deprecated use from \@xyo-network/xl1-protocol instead */
|
|
11
|
-
export interface XL1AmountInstance {
|
|
12
|
-
value: AttoXL1
|
|
13
|
-
|
|
14
|
-
to(places: bigint | number): bigint
|
|
15
|
-
|
|
16
|
-
milli: MilliXL1
|
|
17
|
-
|
|
18
|
-
micro: MicroXL1
|
|
19
|
-
|
|
20
|
-
nano: NanoXL1
|
|
21
|
-
|
|
22
|
-
pico: PicoXL1
|
|
23
|
-
|
|
24
|
-
femto: FemtoXL1
|
|
25
|
-
|
|
26
|
-
atto: AttoXL1
|
|
27
|
-
|
|
28
|
-
toString(places: number, config: Partial<ShiftedBigIntConfig>): string
|
|
29
|
-
}
|