@xyo-network/xl1-protocol-sdk 1.7.1 → 1.7.2
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.
|
@@ -22,10 +22,10 @@ export type BalancesStepSummary = StepSummary<{
|
|
|
22
22
|
* Identity function for determining if an object is an BalancesStepSummary
|
|
23
23
|
*/
|
|
24
24
|
export declare const isBalancesStepSummary: (x?: unknown | null) => x is BalancesStepSummary;
|
|
25
|
-
export declare const asBalancesStepSummary: import("@xylabs/object
|
|
25
|
+
export declare const asBalancesStepSummary: import("@xylabs/object").AsTypeFunction<BalancesStepSummary>;
|
|
26
26
|
/**
|
|
27
27
|
* Identity function for determining if an object is an BalancesStepSummary with Storage Meta
|
|
28
28
|
*/
|
|
29
29
|
export declare const isBalancesStepSummaryWithStorageMeta: (value: unknown) => value is WithStorageMeta<BalancesStepSummary>;
|
|
30
|
-
export declare const asBalancesStepSummaryWithStorageMeta: import("@xylabs/object
|
|
30
|
+
export declare const asBalancesStepSummaryWithStorageMeta: import("@xylabs/object").AsTypeFunction<WithStorageMeta<BalancesStepSummary>>;
|
|
31
31
|
//# sourceMappingURL=payloads.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"payloads.d.ts","sourceRoot":"","sources":["../../../../src/block/primitives/payloads.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AAChD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;AAEjD,OAAO,KAAK,EACV,OAAO,EAAE,MAAM,EAAE,eAAe,EACjC,MAAM,4BAA4B,CAAA;AAGnC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AAEzD,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,WAAW,WAAW;IAC1B,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,IAAI,CAAA;CACX;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,EACxI,OAAO,SAAS,IAAI,GAAG,iBAAiB,GAAG,OAAO,CAAC,CAAA;AAEvD,eAAO,MAAM,yBAAyB,EAAE,MAA4C,CAAA;AACpF,MAAM,MAAM,yBAAyB,GAAG,OAAO,yBAAyB,CAAA;AAExE,MAAM,MAAM,mBAAmB,GAAG,WAAW,CAAC;IAC5C,QAAQ,EAAE,MAAM,CAAC,OAAO,EAAE,YAAY,CAAC,CAAA;CACxC,EAAE,yBAAyB,CAAC,CAAA;AAE7B;;GAEG;AACH,eAAO,MAAM,qBAAqB,kDAAwE,CAAA;AAC1G,eAAO,MAAM,qBAAqB,
|
|
1
|
+
{"version":3,"file":"payloads.d.ts","sourceRoot":"","sources":["../../../../src/block/primitives/payloads.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AAChD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;AAEjD,OAAO,KAAK,EACV,OAAO,EAAE,MAAM,EAAE,eAAe,EACjC,MAAM,4BAA4B,CAAA;AAGnC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AAEzD,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,WAAW,WAAW;IAC1B,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,IAAI,CAAA;CACX;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,EACxI,OAAO,SAAS,IAAI,GAAG,iBAAiB,GAAG,OAAO,CAAC,CAAA;AAEvD,eAAO,MAAM,yBAAyB,EAAE,MAA4C,CAAA;AACpF,MAAM,MAAM,yBAAyB,GAAG,OAAO,yBAAyB,CAAA;AAExE,MAAM,MAAM,mBAAmB,GAAG,WAAW,CAAC;IAC5C,QAAQ,EAAE,MAAM,CAAC,OAAO,EAAE,YAAY,CAAC,CAAA;CACxC,EAAE,yBAAyB,CAAC,CAAA;AAE7B;;GAEG;AACH,eAAO,MAAM,qBAAqB,kDAAwE,CAAA;AAC1G,eAAO,MAAM,qBAAqB,8DAAqE,CAAA;AAEvG;;GAEG;AACH,eAAO,MAAM,oCAAoC,GAAI,OAAO,OAAO,KAAG,KAAK,IAAI,eAAe,CAAC,mBAAmB,CAEjH,CAAA;AACD,eAAO,MAAM,oCAAoC,+EAAqG,CAAA"}
|
package/dist/neutral/index.d.ts
CHANGED
|
@@ -1,339 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
import { BoundWitness } from '@xyo-network/boundwitness-model';
|
|
10
|
-
import { AccountInstance } from '@xyo-network/account-model';
|
|
11
|
-
|
|
12
|
-
declare function allHashesPresent(hashes: Hash[], payloads: WithStorageMeta<Payload>[]): boolean;
|
|
13
|
-
declare const tryHydrateBlock: (archivist: ReadArchivist, hash: Hash, maxDepth?: number) => Promise<HydratedBlock | undefined>;
|
|
14
|
-
declare const hydrateBlock: (archivist: ReadArchivist, hash: Hash, maxDepth?: number, minDepth?: number) => Promise<HydratedBlock>;
|
|
15
|
-
declare const flattenHydratedBlock: (hydratedBlock: HydratedBlock) => WithStorageMeta<Payload>[];
|
|
16
|
-
declare const flattenHydratedBlocks: (hydratedBlocks: HydratedBlock[]) => WithStorageMeta<Payload>[];
|
|
17
|
-
declare const transactionsFromHydratedBlock: (block: HydratedBlock) => WithStorageMeta<TransactionBoundWitness>[];
|
|
18
|
-
declare const blockPayloadsFromHydratedBlock: (block: HydratedBlock) => WithStorageMeta<Payload>[];
|
|
19
|
-
|
|
20
|
-
type BlockNumberRange = [number, number];
|
|
21
|
-
|
|
22
|
-
declare function calculateFramesFromRange(range: BlockNumberRange, step: number): [
|
|
23
|
-
BlockNumberRange[],
|
|
24
|
-
BlockNumberRange[]
|
|
25
|
-
];
|
|
26
|
-
|
|
27
|
-
declare function deepCalculateFramesFromRange(range: BlockNumberRange, startingStep?: number): BlockNumberRange[];
|
|
28
|
-
|
|
29
|
-
interface NegativeBigInt {
|
|
30
|
-
negative: Hex;
|
|
31
|
-
}
|
|
32
|
-
interface PositiveBigInt {
|
|
33
|
-
positive: Hex;
|
|
34
|
-
}
|
|
35
|
-
type SignedBigInt = NegativeBigInt | PositiveBigInt;
|
|
36
|
-
declare const isNegativeBigInt: (value: unknown) => value is NegativeBigInt;
|
|
37
|
-
declare const isPositiveBigInt: (value: unknown) => value is PositiveBigInt;
|
|
38
|
-
declare const parseSignedBigInt: (value: SignedBigInt) => bigint;
|
|
39
|
-
declare const toSignedBigInt: (value: bigint) => SignedBigInt;
|
|
40
|
-
declare const toPositiveBigInt: (value: unknown) => PositiveBigInt;
|
|
41
|
-
|
|
42
|
-
declare const StepSummarySchema: Schema;
|
|
43
|
-
type StepSummarySchema = typeof StepSummarySchema;
|
|
44
|
-
interface StepSummaryFields {
|
|
45
|
-
hash: Hash;
|
|
46
|
-
stepSize: number;
|
|
47
|
-
}
|
|
48
|
-
interface ChainWindow {
|
|
49
|
-
depth: number;
|
|
50
|
-
head: Hash;
|
|
51
|
-
}
|
|
52
|
-
type StepSummary<TAdditionalFields extends EmptyObject | void = void, TSchema extends Schema | void = void> = Payload<TAdditionalFields extends void ? StepSummaryFields : TAdditionalFields & StepSummaryFields, TSchema extends void ? StepSummarySchema : TSchema>;
|
|
53
|
-
declare const BalancesStepSummarySchema: Schema;
|
|
54
|
-
type BalancesStepSummarySchema = typeof BalancesStepSummarySchema;
|
|
55
|
-
type BalancesStepSummary = StepSummary<{
|
|
56
|
-
balances: Record<Address, SignedBigInt>;
|
|
57
|
-
}, BalancesStepSummarySchema>;
|
|
58
|
-
/**
|
|
59
|
-
* Identity function for determining if an object is an BalancesStepSummary
|
|
60
|
-
*/
|
|
61
|
-
declare const isBalancesStepSummary: (x?: unknown | null) => x is BalancesStepSummary;
|
|
62
|
-
declare const asBalancesStepSummary: _xylabs_object_model.AsTypeFunction<BalancesStepSummary>;
|
|
63
|
-
/**
|
|
64
|
-
* Identity function for determining if an object is an BalancesStepSummary with Storage Meta
|
|
65
|
-
*/
|
|
66
|
-
declare const isBalancesStepSummaryWithStorageMeta: (value: unknown) => value is WithStorageMeta<BalancesStepSummary>;
|
|
67
|
-
declare const asBalancesStepSummaryWithStorageMeta: _xylabs_object_model.AsTypeFunction<WithStorageMeta<BalancesStepSummary>>;
|
|
68
|
-
|
|
69
|
-
interface ChainContext {
|
|
70
|
-
chainArchivist: ReadArchivist;
|
|
71
|
-
head: Hash;
|
|
72
|
-
windowSize?: number;
|
|
73
|
-
}
|
|
74
|
-
interface ChainSummaryContext<T extends Payload> extends ChainContext {
|
|
75
|
-
summaryRepository: PayloadRepository<Hash, T>;
|
|
76
|
-
}
|
|
77
|
-
interface BalanceStepSummaryContext extends ChainSummaryContext<BalancesStepSummary> {
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
declare function balanceStepSummaryFromRange(context: BalanceStepSummaryContext, range: BlockNumberRange): Promise<WithStorageMeta<BalancesStepSummary>>;
|
|
81
|
-
|
|
82
|
-
declare function balanceSummary(context: BalanceStepSummaryContext): Promise<Partial<Record<Address, bigint>>>;
|
|
83
|
-
|
|
84
|
-
declare function hashFromBlockNumber(context: ChainContext, blockNumber: number): Promise<Hash>;
|
|
85
|
-
|
|
86
|
-
interface ChainServiceCollection {
|
|
87
|
-
/**
|
|
88
|
-
* The account which is used to sign transactions
|
|
89
|
-
*/
|
|
90
|
-
account: WalletInstance;
|
|
91
|
-
/**
|
|
92
|
-
* Services for working with account balances
|
|
93
|
-
*/
|
|
94
|
-
balanceService: AccountBalanceService;
|
|
95
|
-
/**
|
|
96
|
-
* The archivist which the chain data is stored in
|
|
97
|
-
*/
|
|
98
|
-
chainArchivist: ArchivistInstance;
|
|
99
|
-
/**
|
|
100
|
-
* Service for viewing codified chain information
|
|
101
|
-
* from a contract
|
|
102
|
-
*/
|
|
103
|
-
chainContractViewer: ChainContractViewer;
|
|
104
|
-
/**
|
|
105
|
-
* The chain iterator
|
|
106
|
-
*/
|
|
107
|
-
chainIterator?: EventingChainBlockNumberIterator;
|
|
108
|
-
/**
|
|
109
|
-
* Service for viewing stake information
|
|
110
|
-
*/
|
|
111
|
-
chainStakeViewer: ChainStakeViewer;
|
|
112
|
-
/**
|
|
113
|
-
* Service for staking
|
|
114
|
-
*/
|
|
115
|
-
chainStaker: ChainStaker;
|
|
116
|
-
/**
|
|
117
|
-
* The archivist which the chain submissions are stored in
|
|
118
|
-
*/
|
|
119
|
-
chainSubmissionsArchivistWrite: WriteArchivist;
|
|
120
|
-
/**
|
|
121
|
-
* Service for determining leader election
|
|
122
|
-
*/
|
|
123
|
-
electionService: ElectionService;
|
|
124
|
-
/**
|
|
125
|
-
* The archivist which the pending transactions are stored
|
|
126
|
-
* as bundled transactions
|
|
127
|
-
*/
|
|
128
|
-
pendingBundledTransactionsArchivistWrite: ArchivistInstance;
|
|
129
|
-
/**
|
|
130
|
-
* The block producer service
|
|
131
|
-
*/
|
|
132
|
-
producer: BlockProducerService;
|
|
133
|
-
/**
|
|
134
|
-
* Service response for calculating block rewards
|
|
135
|
-
*/
|
|
136
|
-
rewardService: BlockRewardService;
|
|
137
|
-
/**
|
|
138
|
-
* Services for working with staked intents
|
|
139
|
-
*/
|
|
140
|
-
stakeIntentService: StakeIntentService;
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
interface ChainServiceCollectionV2 {
|
|
144
|
-
/**
|
|
145
|
-
* The account which is used to sign transactions
|
|
146
|
-
*/
|
|
147
|
-
account: WalletInstance;
|
|
148
|
-
/**
|
|
149
|
-
* Services for working with account balances
|
|
150
|
-
*/
|
|
151
|
-
balanceService: AccountBalanceServiceV2;
|
|
152
|
-
/**
|
|
153
|
-
* The archivist which the chain data is stored in
|
|
154
|
-
*/
|
|
155
|
-
chainArchivist: ArchivistInstance;
|
|
156
|
-
/**
|
|
157
|
-
* Service for viewing codified chain information
|
|
158
|
-
* from a contract
|
|
159
|
-
*/
|
|
160
|
-
chainContractViewer: ChainContractViewer;
|
|
161
|
-
/**
|
|
162
|
-
* The chain iterator
|
|
163
|
-
*/
|
|
164
|
-
chainIterator?: EventingChainBlockNumberIterator;
|
|
165
|
-
/**
|
|
166
|
-
* Service for viewing stake information
|
|
167
|
-
*/
|
|
168
|
-
chainStakeViewer: ChainStakeViewer;
|
|
169
|
-
/**
|
|
170
|
-
* Service for staking
|
|
171
|
-
*/
|
|
172
|
-
chainStaker: ChainStaker;
|
|
173
|
-
/**
|
|
174
|
-
* The archivist which the chain submissions are stored in
|
|
175
|
-
*/
|
|
176
|
-
chainSubmissionsArchivistWrite: WriteArchivist;
|
|
177
|
-
/**
|
|
178
|
-
* Service for determining leader election
|
|
179
|
-
*/
|
|
180
|
-
electionService: ElectionService;
|
|
181
|
-
/**
|
|
182
|
-
* The archivist which the pending transactions are stored
|
|
183
|
-
* as bundled transactions
|
|
184
|
-
*/
|
|
185
|
-
pendingBundledTransactionsArchivistWrite: ArchivistInstance;
|
|
186
|
-
/**
|
|
187
|
-
* Service for managing pending transactions
|
|
188
|
-
*/
|
|
189
|
-
pendingTransactionsService: PendingTransactionsService;
|
|
190
|
-
/**
|
|
191
|
-
* The block producer service
|
|
192
|
-
*/
|
|
193
|
-
producer: BlockProducerService;
|
|
194
|
-
/**
|
|
195
|
-
* Service response for calculating block rewards
|
|
196
|
-
*/
|
|
197
|
-
rewardService: BlockRewardService;
|
|
198
|
-
/**
|
|
199
|
-
* Services for working with staked intents
|
|
200
|
-
*/
|
|
201
|
-
stakeIntentService: StakeIntentService;
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
interface BlockWindowInstance {
|
|
205
|
-
count: number;
|
|
206
|
-
numberRange: [number, number];
|
|
207
|
-
range: [Hash, Hash];
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
interface BlockWindowStateInstance {
|
|
211
|
-
blockWindow: BlockWindowInstance;
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
interface SignatureInstance extends ValidatableInstance {
|
|
215
|
-
address: Address;
|
|
216
|
-
hash: Hash;
|
|
217
|
-
signature: Hex;
|
|
218
|
-
}
|
|
219
|
-
|
|
220
|
-
interface SignedInstance {
|
|
221
|
-
signatureCount: number;
|
|
222
|
-
signatures: SignatureInstance[];
|
|
223
|
-
signature(index: number): SignatureInstance | undefined;
|
|
224
|
-
}
|
|
225
|
-
|
|
226
|
-
interface ValidatableInstance {
|
|
227
|
-
validate(): Promisable<Error[]>;
|
|
228
|
-
}
|
|
229
|
-
|
|
230
|
-
interface ShiftedBigIntConfig {
|
|
231
|
-
locale: Intl.LocalesArgument;
|
|
232
|
-
maxCharacters: number;
|
|
233
|
-
maxDecimal: number;
|
|
234
|
-
minDecimals: number;
|
|
235
|
-
places: number;
|
|
236
|
-
}
|
|
237
|
-
|
|
238
|
-
interface XL1AmountInstance {
|
|
239
|
-
value: AttoXL1;
|
|
240
|
-
to(places: bigint | number): bigint;
|
|
241
|
-
milli: MilliXL1;
|
|
242
|
-
micro: MicroXL1;
|
|
243
|
-
nano: NanoXL1;
|
|
244
|
-
pico: PicoXL1;
|
|
245
|
-
femto: FemtoXL1;
|
|
246
|
-
atto: AttoXL1;
|
|
247
|
-
toString(places: number, config: Partial<ShiftedBigIntConfig>): string;
|
|
248
|
-
}
|
|
249
|
-
|
|
250
|
-
interface AddressInstance extends ValidatableInstance {
|
|
251
|
-
address: Address;
|
|
252
|
-
}
|
|
253
|
-
interface AddressStateInstance extends AddressInstance, BlockWindowStateInstance {
|
|
254
|
-
balance(): Promisable<[XL1AmountInstance, BlockWindowInstance]>;
|
|
255
|
-
}
|
|
256
|
-
|
|
257
|
-
interface DataInstance<T> {
|
|
258
|
-
data: T;
|
|
259
|
-
}
|
|
260
|
-
|
|
261
|
-
interface HydratedBoundWitnessInstance<T extends HydratedBoundWitness = HydratedBoundWitness> extends ValidatableInstance, DataInstance<T> {
|
|
262
|
-
boundWitness: T[0];
|
|
263
|
-
payloadCount: number;
|
|
264
|
-
payloads: T[1][number][];
|
|
265
|
-
payload(index: number): T[1][number] | undefined;
|
|
266
|
-
}
|
|
267
|
-
|
|
268
|
-
interface TransactionFeesInstance extends ValidatableInstance {
|
|
269
|
-
base: bigint;
|
|
270
|
-
gasLimit: bigint;
|
|
271
|
-
gasPrice: bigint;
|
|
272
|
-
priority: bigint;
|
|
273
|
-
}
|
|
274
|
-
|
|
275
|
-
interface TransactionFieldsInstance<TBlockPayload extends AllowedBlockPayload = AllowedBlockPayload> {
|
|
276
|
-
elevatedPayloadCount: number;
|
|
277
|
-
elevatedPayloads: WithStorageMeta<TBlockPayload>[];
|
|
278
|
-
externalPayloads: Record<Hash, Schema | Payload>;
|
|
279
|
-
fees: TransactionFeesInstance;
|
|
280
|
-
privateExternalPayloads: Record<Hash, Schema>;
|
|
281
|
-
publicExternalPayloads: Payload[];
|
|
282
|
-
elevatedPayload(index: number): TBlockPayload | undefined;
|
|
283
|
-
reward(): bigint;
|
|
284
|
-
}
|
|
285
|
-
|
|
286
|
-
interface HydratedTransactionInstance<T extends HydratedTransaction = HydratedTransaction, TElevatedPayload extends AllowedBlockPayload = AllowedBlockPayload> extends TransactionFieldsInstance<T[1][number] & TElevatedPayload>, HydratedBoundWitnessInstance<T>, SignedInstance {
|
|
287
|
-
}
|
|
288
|
-
|
|
289
|
-
interface BlockFieldsInstance<TTransactionResult> {
|
|
290
|
-
reward: bigint;
|
|
291
|
-
signatureCount: number;
|
|
292
|
-
signatures: SignatureInstance[];
|
|
293
|
-
transactionCount: number;
|
|
294
|
-
transactions: TTransactionResult[];
|
|
295
|
-
signature(index: number): SignatureInstance | undefined;
|
|
296
|
-
transaction(index: number): TTransactionResult | undefined;
|
|
297
|
-
}
|
|
298
|
-
|
|
299
|
-
interface HydratedBlockInstance<T extends HydratedBlock = HydratedBlock> extends BlockFieldsInstance<HydratedTransactionInstance>, HydratedBoundWitnessInstance<T>, SignedInstance {
|
|
300
|
-
}
|
|
301
|
-
|
|
302
|
-
interface ObjectInstance<T extends EmptyObject = EmptyObject> extends DataInstance<T> {
|
|
303
|
-
}
|
|
304
|
-
|
|
305
|
-
interface PayloadInstance<TPayload extends Payload = Payload> extends ObjectInstance<TPayload>, ValidatableInstance {
|
|
306
|
-
}
|
|
307
|
-
|
|
308
|
-
interface BoundWitnessInstance<TBoundWitness extends BoundWitness = BoundWitness, TPayload extends Payload = Payload> extends PayloadInstance<TBoundWitness> {
|
|
309
|
-
payloadCount: number;
|
|
310
|
-
payloads: PayloadInstance<TPayload>[];
|
|
311
|
-
payload(index: number): PayloadInstance<TPayload> | undefined;
|
|
312
|
-
}
|
|
313
|
-
|
|
314
|
-
declare const netBalancesForPayloads: (payloads: Payload[]) => Record<Lowercase<string>, bigint>;
|
|
315
|
-
|
|
316
|
-
declare function buildTransaction(chain: Address, elevatedPayloads: AllowedBlockPayload[], additionalPayloads: Payload[], signer: AccountInstance | AccountInstance[], nbf: number, exp: number, from?: Address, fees?: TransactionFeesBigInt): Promise<HydratedTransaction>;
|
|
317
|
-
|
|
318
|
-
declare const tryHydrateTransaction: (archivist: ReadArchivist, hash: Hash) => Promise<HydratedTransaction | undefined>;
|
|
319
|
-
declare const hydrateTransaction: (archivist: ReadArchivist, hash: Hash) => Promise<HydratedTransaction>;
|
|
320
|
-
declare const flattenHydratedTransaction: (hydratedTransaction: HydratedTransaction) => Payload[];
|
|
321
|
-
declare const flattenHydratedTransactions: (hydratedTransactions: HydratedTransaction[]) => Payload[];
|
|
322
|
-
declare const tryHydrateElevatedTransaction: (archivist: ReadArchivist, hash: Hash) => Promise<HydratedTransaction | undefined>;
|
|
323
|
-
declare const hydrateElevatedTransaction: (archivist: ReadArchivist, hash: Hash) => Promise<HydratedTransaction>;
|
|
324
|
-
|
|
325
|
-
/** The number of bytes that a transaction and its payloads will take up in a block */
|
|
326
|
-
declare function transactionBlockByteCount([transaction, payloads]: HydratedTransaction): number;
|
|
327
|
-
|
|
328
|
-
declare function transactionElevatedPayloadHashes(transaction: TransactionBoundWitness): Hash[];
|
|
329
|
-
declare function transactionElevatedPayloads([transaction, payloads]: HydratedTransaction): WithHashStorageMeta<Payload>[];
|
|
330
|
-
|
|
331
|
-
declare function crackOperation(operation: string): [string, string[]];
|
|
332
|
-
declare function crackOperations(operations: string[]): [string, string[]][];
|
|
333
|
-
|
|
334
|
-
/** The required gas for the byte storage on the block chain for a transaction */
|
|
335
|
-
declare function transactionBytesRequiredGas([transaction, payloads]: HydratedTransaction): AttoXL1;
|
|
336
|
-
declare function transactionRequiredGas(hydratedTransaction: HydratedTransaction): AttoXL1;
|
|
337
|
-
|
|
338
|
-
export { BalancesStepSummarySchema, StepSummarySchema, allHashesPresent, asBalancesStepSummary, asBalancesStepSummaryWithStorageMeta, balanceStepSummaryFromRange, balanceSummary, blockPayloadsFromHydratedBlock, buildTransaction, calculateFramesFromRange, crackOperation, crackOperations, deepCalculateFramesFromRange, flattenHydratedBlock, flattenHydratedBlocks, flattenHydratedTransaction, flattenHydratedTransactions, hashFromBlockNumber, hydrateBlock, hydrateElevatedTransaction, hydrateTransaction, isBalancesStepSummary, isBalancesStepSummaryWithStorageMeta, isNegativeBigInt, isPositiveBigInt, netBalancesForPayloads, parseSignedBigInt, toPositiveBigInt, toSignedBigInt, transactionBlockByteCount, transactionBytesRequiredGas, transactionElevatedPayloadHashes, transactionElevatedPayloads, transactionRequiredGas, transactionsFromHydratedBlock, tryHydrateBlock, tryHydrateElevatedTransaction, tryHydrateTransaction };
|
|
339
|
-
export type { AddressInstance, AddressStateInstance, BalanceStepSummaryContext, BalancesStepSummary, BlockNumberRange, BlockWindowInstance, BlockWindowStateInstance, BoundWitnessInstance, ChainContext, ChainServiceCollection, ChainServiceCollectionV2, ChainSummaryContext, ChainWindow, DataInstance, HydratedBlockInstance, HydratedTransactionInstance, NegativeBigInt, ObjectInstance, PayloadInstance, PositiveBigInt, ShiftedBigIntConfig, SignatureInstance, SignedBigInt, SignedInstance, StepSummary, StepSummaryFields, TransactionFeesInstance, ValidatableInstance, XL1AmountInstance };
|
|
1
|
+
export * from './block/index.ts';
|
|
2
|
+
export * from './ChainServiceCollection.ts';
|
|
3
|
+
export * from './ChainServiceCollectionV2.ts';
|
|
4
|
+
export * from './instances/index.ts';
|
|
5
|
+
export * from './payload/index.ts';
|
|
6
|
+
export * from './SignedBigInt.ts';
|
|
7
|
+
export * from './transaction/index.ts';
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
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.7.
|
|
4
|
+
"version": "1.7.2",
|
|
5
5
|
"description": "XYO Layer One SDK Protocol",
|
|
6
6
|
"homepage": "https://xylabs.com",
|
|
7
7
|
"bugs": {
|
|
@@ -34,25 +34,25 @@
|
|
|
34
34
|
"deploy3": "echo Deploy3 not allowed!"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@xylabs/array": "^4.13.
|
|
38
|
-
"@xylabs/assert": "^4.13.
|
|
39
|
-
"@xylabs/hex": "^4.13.
|
|
40
|
-
"@xylabs/object": "^4.13.
|
|
41
|
-
"@xylabs/promise": "^4.13.
|
|
42
|
-
"@xylabs/typeof": "^4.13.
|
|
43
|
-
"@xyo-network/account-model": "^4.1.
|
|
44
|
-
"@xyo-network/archivist-model": "^4.1.
|
|
45
|
-
"@xyo-network/boundwitness-builder": "^4.1.
|
|
46
|
-
"@xyo-network/boundwitness-model": "^4.1.
|
|
47
|
-
"@xyo-network/payload-builder": "^4.1.
|
|
48
|
-
"@xyo-network/payload-model": "^4.1.
|
|
49
|
-
"@xyo-network/wallet-model": "^4.1.
|
|
50
|
-
"@xyo-network/xl1-protocol": "^1.
|
|
37
|
+
"@xylabs/array": "^4.13.17",
|
|
38
|
+
"@xylabs/assert": "^4.13.17",
|
|
39
|
+
"@xylabs/hex": "^4.13.17",
|
|
40
|
+
"@xylabs/object": "^4.13.17",
|
|
41
|
+
"@xylabs/promise": "^4.13.17",
|
|
42
|
+
"@xylabs/typeof": "^4.13.17",
|
|
43
|
+
"@xyo-network/account-model": "^4.1.3",
|
|
44
|
+
"@xyo-network/archivist-model": "^4.1.3",
|
|
45
|
+
"@xyo-network/boundwitness-builder": "^4.1.3",
|
|
46
|
+
"@xyo-network/boundwitness-model": "^4.1.3",
|
|
47
|
+
"@xyo-network/payload-builder": "^4.1.3",
|
|
48
|
+
"@xyo-network/payload-model": "^4.1.3",
|
|
49
|
+
"@xyo-network/wallet-model": "^4.1.3",
|
|
50
|
+
"@xyo-network/xl1-protocol": "^1.7.1"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
53
|
"@types/node": "^24.0.14",
|
|
54
|
-
"@xylabs/ts-scripts-yarn3": "^7.0.0-rc.
|
|
55
|
-
"@xylabs/tsconfig": "^7.0.0-rc.
|
|
54
|
+
"@xylabs/ts-scripts-yarn3": "^7.0.0-rc.27",
|
|
55
|
+
"@xylabs/tsconfig": "^7.0.0-rc.27",
|
|
56
56
|
"knip": "^5.61.3",
|
|
57
57
|
"typescript": "^5.8.3",
|
|
58
58
|
"vitest": "^3.2.4"
|