@radix-effects/gateway 0.4.1 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +29 -27
- package/dist/index.js +37 -31
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -185,7 +185,7 @@ declare const validateAtLedgerStateInput: (input: unknown) => Effect.Effect<AtLe
|
|
|
185
185
|
//#endregion
|
|
186
186
|
//#region src/state/entityFungiblesPage.d.ts
|
|
187
187
|
type EntityFungiblesPageInput = Omit<EntityFungiblesPageRequest['stateEntityFungiblesPageRequest'], 'at_ledger_state'> & {
|
|
188
|
-
at_ledger_state
|
|
188
|
+
at_ledger_state?: AtLedgerState;
|
|
189
189
|
};
|
|
190
190
|
declare const EntityFungiblesPage_base: Effect.Service.Class<EntityFungiblesPage, "EntityFungiblesPage", {
|
|
191
191
|
readonly effect: Effect.Effect<(this: unknown, input: EntityFungiblesPageInput) => Effect.Effect<_radixdlt_babylon_gateway_api_sdk6.FungibleResourcesCollectionItem[], AccountLockerNotFoundError | InvalidRequestError | EntityNotFoundError | InternalServerError | InvalidEntityError | InvalidTransactionError | NotSyncedUpError | TransactionNotFoundError | ErrorResponse | RateLimitExceededError | ResponseError | UnknownGatewayError, never>, effect_ConfigError0.ConfigError, GatewayApiClient>;
|
|
@@ -195,7 +195,7 @@ declare class EntityFungiblesPage extends EntityFungiblesPage_base {}
|
|
|
195
195
|
//#region src/state/nonFungibleData.d.ts
|
|
196
196
|
declare const NonFungibleData_base: Effect.Service.Class<NonFungibleData, "NonFungibleData", {
|
|
197
197
|
readonly effect: Effect.Effect<(this: unknown, input: Omit<_radixdlt_babylon_gateway_api_sdk6.StateNonFungibleDataRequest, "at_ledger_state"> & {
|
|
198
|
-
at_ledger_state
|
|
198
|
+
at_ledger_state?: AtLedgerState;
|
|
199
199
|
}) => Effect.Effect<_radixdlt_babylon_gateway_api_sdk6.StateNonFungibleDetailsResponseItem[], AccountLockerNotFoundError | InvalidRequestError | EntityNotFoundError | InternalServerError | InvalidEntityError | InvalidTransactionError | NotSyncedUpError | TransactionNotFoundError | ErrorResponse | RateLimitExceededError | ResponseError | UnknownGatewayError, never>, effect_ConfigError0.ConfigError, GatewayApiClient>;
|
|
200
200
|
}>;
|
|
201
201
|
declare class NonFungibleData extends NonFungibleData_base {}
|
|
@@ -203,7 +203,7 @@ declare class NonFungibleData extends NonFungibleData_base {}
|
|
|
203
203
|
//#region src/state/entityNonFungiblesPage.d.ts
|
|
204
204
|
declare const EntityNonFungiblesPage_base: Effect.Service.Class<EntityNonFungiblesPage, "EntityNonFungiblesPage", {
|
|
205
205
|
readonly effect: Effect.Effect<(this: unknown, input: Omit<_radixdlt_babylon_gateway_api_sdk6.StateEntityNonFungiblesPageRequest, "at_ledger_state"> & {
|
|
206
|
-
at_ledger_state
|
|
206
|
+
at_ledger_state?: AtLedgerState;
|
|
207
207
|
}) => Effect.Effect<_radixdlt_babylon_gateway_api_sdk6.StateEntityNonFungiblesPageResponse, AccountLockerNotFoundError | InvalidRequestError | EntityNotFoundError | InternalServerError | InvalidEntityError | InvalidTransactionError | NotSyncedUpError | TransactionNotFoundError | ErrorResponse | RateLimitExceededError | ResponseError | UnknownGatewayError, never>, effect_ConfigError0.ConfigError, GatewayApiClient>;
|
|
208
208
|
}>;
|
|
209
209
|
declare class EntityNonFungiblesPage extends EntityNonFungiblesPage_base {}
|
|
@@ -242,11 +242,11 @@ type GetEntityDetailsInput = GetEntityDetailsVaultAggregatedParameters[0];
|
|
|
242
242
|
type GetEntityDetailsOptions = GetEntityDetailsVaultAggregatedParameters[1];
|
|
243
243
|
type GetEntityDetailsState = GetEntityDetailsVaultAggregatedParameters[2];
|
|
244
244
|
declare const GetEntityDetailsVaultAggregated_base: Effect.Service.Class<GetEntityDetailsVaultAggregated, "GetEntityDetailsVaultAggregated", {
|
|
245
|
-
readonly effect: Effect.Effect<(this: unknown, input: string[], options: _radixdlt_babylon_gateway_api_sdk6.StateEntityDetailsOptions | undefined, at_ledger_state
|
|
245
|
+
readonly effect: Effect.Effect<(this: unknown, input: string[], options: _radixdlt_babylon_gateway_api_sdk6.StateEntityDetailsOptions | undefined, at_ledger_state?: {
|
|
246
246
|
state_version: number;
|
|
247
247
|
} | {
|
|
248
248
|
timestamp: Date;
|
|
249
|
-
}) => Effect.Effect<_radixdlt_babylon_gateway_api_sdk6.StateEntityDetailsVaultResponseItem[], AccountLockerNotFoundError | InvalidRequestError | EntityNotFoundError | InternalServerError | InvalidEntityError | InvalidTransactionError | NotSyncedUpError | TransactionNotFoundError | ErrorResponse | RateLimitExceededError | ResponseError | UnknownGatewayError, never>, effect_ConfigError0.ConfigError, GatewayApiClient>;
|
|
249
|
+
} | undefined) => Effect.Effect<_radixdlt_babylon_gateway_api_sdk6.StateEntityDetailsVaultResponseItem[], AccountLockerNotFoundError | InvalidRequestError | EntityNotFoundError | InternalServerError | InvalidEntityError | InvalidTransactionError | NotSyncedUpError | TransactionNotFoundError | ErrorResponse | RateLimitExceededError | ResponseError | UnknownGatewayError, never>, effect_ConfigError0.ConfigError, GatewayApiClient>;
|
|
250
250
|
}>;
|
|
251
251
|
declare class GetEntityDetailsVaultAggregated extends GetEntityDetailsVaultAggregated_base {}
|
|
252
252
|
//#endregion
|
|
@@ -254,7 +254,7 @@ declare class GetEntityDetailsVaultAggregated extends GetEntityDetailsVaultAggre
|
|
|
254
254
|
type GetNonFungibleIdsInput = {
|
|
255
255
|
vaultAddress: string;
|
|
256
256
|
resourceAddress: string;
|
|
257
|
-
at_ledger_state
|
|
257
|
+
at_ledger_state?: AtLedgerState;
|
|
258
258
|
address: string;
|
|
259
259
|
cursor?: string;
|
|
260
260
|
};
|
|
@@ -266,12 +266,23 @@ declare const EntityNonFungibleIdsPage_base: Effect.Service.Class<EntityNonFungi
|
|
|
266
266
|
}>;
|
|
267
267
|
declare class EntityNonFungibleIdsPage extends EntityNonFungibleIdsPage_base {}
|
|
268
268
|
//#endregion
|
|
269
|
+
//#region src/state/stateEntityDetails.d.ts
|
|
270
|
+
type StateEntityDetailsParameters = Parameters<(typeof GatewayApiClient)['Service']['state']['innerClient']['stateEntityDetails']>;
|
|
271
|
+
type StateEntityDetailsInput = StateEntityDetailsParameters[0]['stateEntityDetailsRequest'];
|
|
272
|
+
declare const StateEntityDetails_base: Effect.Service.Class<StateEntityDetails, "StateEntityDetails", {
|
|
273
|
+
readonly effect: Effect.Effect<(this: unknown, input: _radixdlt_babylon_gateway_api_sdk6.StateEntityDetailsRequest) => Effect.Effect<{
|
|
274
|
+
ledger_state: _radixdlt_babylon_gateway_api_sdk6.LedgerState;
|
|
275
|
+
items: _radixdlt_babylon_gateway_api_sdk6.StateEntityDetailsResponseItem[];
|
|
276
|
+
}, AccountLockerNotFoundError | InvalidRequestError | EntityNotFoundError | InternalServerError | InvalidEntityError | InvalidTransactionError | NotSyncedUpError | TransactionNotFoundError | ErrorResponse | RateLimitExceededError | ResponseError | UnknownGatewayError, never>, effect_ConfigError0.ConfigError, GatewayApiClient>;
|
|
277
|
+
}>;
|
|
278
|
+
declare class StateEntityDetails extends StateEntityDetails_base {}
|
|
279
|
+
//#endregion
|
|
269
280
|
//#region src/getNonFungibleLocation.d.ts
|
|
270
281
|
declare const GetNonFungibleLocationService_base: Effect.Service.Class<GetNonFungibleLocationService, "GetNonFungibleLocationService", {
|
|
271
282
|
readonly effect: Effect.Effect<(this: unknown, input: {
|
|
272
283
|
resourceAddress: string;
|
|
273
284
|
nonFungibleIds: string[];
|
|
274
|
-
at_ledger_state
|
|
285
|
+
at_ledger_state?: AtLedgerState;
|
|
275
286
|
}) => Effect.Effect<_radixdlt_babylon_gateway_api_sdk6.StateNonFungibleLocationResponse[], AccountLockerNotFoundError | InvalidRequestError | EntityNotFoundError | InternalServerError | InvalidEntityError | InvalidTransactionError | NotSyncedUpError | TransactionNotFoundError | ErrorResponse | RateLimitExceededError | ResponseError | UnknownGatewayError, never>, effect_ConfigError0.ConfigError, GatewayApiClient>;
|
|
276
287
|
}>;
|
|
277
288
|
declare class GetNonFungibleLocationService extends GetNonFungibleLocationService_base {}
|
|
@@ -286,7 +297,7 @@ declare class EntityNotFoundError$2 extends EntityNotFoundError_base<{
|
|
|
286
297
|
type GetAddressByNonFungibleServiceInput = {
|
|
287
298
|
resourceAddress: string;
|
|
288
299
|
nonFungibleId: string;
|
|
289
|
-
at_ledger_state
|
|
300
|
+
at_ledger_state?: AtLedgerState;
|
|
290
301
|
};
|
|
291
302
|
declare const GetAddressByNonFungibleService_base: Effect.Service.Class<GetAddressByNonFungibleService, "GetAddressByNonFungibleService", {
|
|
292
303
|
readonly dependencies: readonly [effect_Layer0.Layer<GetNonFungibleLocationService, effect_ConfigError0.ConfigError, GatewayApiClient>];
|
|
@@ -309,7 +320,7 @@ declare const GetComponentStateService_base: Effect.Service.Class<GetComponentSt
|
|
|
309
320
|
readonly effect: Effect.Effect<{
|
|
310
321
|
run: <T extends StructDefinition, R extends boolean>(this: unknown, input: {
|
|
311
322
|
addresses: string[];
|
|
312
|
-
at_ledger_state
|
|
323
|
+
at_ledger_state?: AtLedgerState;
|
|
313
324
|
schema: StructSchema<T, R>;
|
|
314
325
|
options?: GetEntityDetailsOptions;
|
|
315
326
|
}) => Effect.Effect<{
|
|
@@ -321,19 +332,10 @@ declare const GetComponentStateService_base: Effect.Service.Class<GetComponentSt
|
|
|
321
332
|
}>;
|
|
322
333
|
declare class GetComponentStateService extends GetComponentStateService_base {}
|
|
323
334
|
//#endregion
|
|
324
|
-
//#region src/state/stateEntityDetails.d.ts
|
|
325
|
-
declare const StateEntityDetails_base: Effect.Service.Class<StateEntityDetails, "StateEntityDetails", {
|
|
326
|
-
readonly effect: Effect.Effect<(this: unknown, input: _radixdlt_babylon_gateway_api_sdk6.StateEntityDetailsRequest) => Effect.Effect<{
|
|
327
|
-
ledger_state: _radixdlt_babylon_gateway_api_sdk6.LedgerState;
|
|
328
|
-
items: _radixdlt_babylon_gateway_api_sdk6.StateEntityDetailsResponseItem[];
|
|
329
|
-
}, AccountLockerNotFoundError | InvalidRequestError | EntityNotFoundError | InternalServerError | InvalidEntityError | InvalidTransactionError | NotSyncedUpError | TransactionNotFoundError | ErrorResponse | RateLimitExceededError | ResponseError | UnknownGatewayError, never>, effect_ConfigError0.ConfigError, GatewayApiClient>;
|
|
330
|
-
}>;
|
|
331
|
-
declare class StateEntityDetails extends StateEntityDetails_base {}
|
|
332
|
-
//#endregion
|
|
333
335
|
//#region src/getFungibleBalance.d.ts
|
|
334
336
|
type GetFungibleBalanceOutput = Effect.Effect.Success<Awaited<ReturnType<(typeof GetFungibleBalance)['Service']>>>;
|
|
335
337
|
type GetFungibleBalanceInput = Omit<StateEntityDetailsOperationRequest['stateEntityDetailsRequest'], 'at_ledger_state'> & {
|
|
336
|
-
at_ledger_state
|
|
338
|
+
at_ledger_state?: AtLedgerState;
|
|
337
339
|
options?: StateEntityDetailsOperationRequest['stateEntityDetailsRequest']['opt_ins'];
|
|
338
340
|
};
|
|
339
341
|
declare const GetFungibleBalance_base: Effect.Service.Class<GetFungibleBalance, "GetFungibleBalance", {
|
|
@@ -354,7 +356,7 @@ declare class GetFungibleBalance extends GetFungibleBalance_base {}
|
|
|
354
356
|
declare const KeyValueStoreDataService_base: Effect.Service.Class<KeyValueStoreDataService, "KeyValueStoreDataService", {
|
|
355
357
|
readonly dependencies: readonly [];
|
|
356
358
|
readonly effect: Effect.Effect<(this: unknown, input: Omit<StateKeyValueStoreDataRequest, "at_ledger_state"> & {
|
|
357
|
-
at_ledger_state
|
|
359
|
+
at_ledger_state?: AtLedgerState;
|
|
358
360
|
}) => Effect.Effect<_radixdlt_babylon_gateway_api_sdk6.StateKeyValueStoreDataResponse[], AccountLockerNotFoundError | InvalidRequestError | EntityNotFoundError | InternalServerError | InvalidEntityError | InvalidTransactionError | NotSyncedUpError | TransactionNotFoundError | ErrorResponse | RateLimitExceededError | ResponseError | UnknownGatewayError, never>, effect_ConfigError0.ConfigError, GatewayApiClient>;
|
|
359
361
|
}>;
|
|
360
362
|
declare class KeyValueStoreDataService extends KeyValueStoreDataService_base {}
|
|
@@ -362,7 +364,7 @@ declare class KeyValueStoreDataService extends KeyValueStoreDataService_base {}
|
|
|
362
364
|
//#region src/keyValueStoreKeys.d.ts
|
|
363
365
|
declare const KeyValueStoreKeysService_base: Effect.Service.Class<KeyValueStoreKeysService, "KeyValueStoreKeysService", {
|
|
364
366
|
readonly effect: Effect.Effect<(this: unknown, input: Omit<StateKeyValueStoreKeysRequest, "at_ledger_state"> & {
|
|
365
|
-
at_ledger_state
|
|
367
|
+
at_ledger_state?: AtLedgerState;
|
|
366
368
|
}) => Effect.Effect<_radixdlt_babylon_gateway_api_sdk6.StateKeyValueStoreKeysResponse, AccountLockerNotFoundError | InvalidRequestError | EntityNotFoundError | InternalServerError | InvalidEntityError | InvalidTransactionError | NotSyncedUpError | TransactionNotFoundError | ErrorResponse | RateLimitExceededError | ResponseError | UnknownGatewayError, never>, effect_ConfigError0.ConfigError, GatewayApiClient>;
|
|
367
369
|
}>;
|
|
368
370
|
declare class KeyValueStoreKeysService extends KeyValueStoreKeysService_base {}
|
|
@@ -372,7 +374,7 @@ declare const GetKeyValueStoreService_base: Effect.Service.Class<GetKeyValueStor
|
|
|
372
374
|
readonly dependencies: readonly [effect_Layer0.Layer<KeyValueStoreKeysService, effect_ConfigError0.ConfigError, GatewayApiClient>, effect_Layer0.Layer<KeyValueStoreDataService, effect_ConfigError0.ConfigError, GatewayApiClient>];
|
|
373
375
|
readonly effect: Effect.Effect<(this: unknown, input: {
|
|
374
376
|
address: string;
|
|
375
|
-
at_ledger_state
|
|
377
|
+
at_ledger_state?: AtLedgerState;
|
|
376
378
|
}) => Effect.Effect<{
|
|
377
379
|
key_value_store_address: string;
|
|
378
380
|
ledger_state: _radixdlt_babylon_gateway_api_sdk6.LedgerState;
|
|
@@ -383,7 +385,7 @@ declare class GetKeyValueStoreService extends GetKeyValueStoreService_base {}
|
|
|
383
385
|
//#endregion
|
|
384
386
|
//#region src/getLedgerState.d.ts
|
|
385
387
|
type GetLedgerStateInput = {
|
|
386
|
-
at_ledger_state
|
|
388
|
+
at_ledger_state?: AtLedgerState;
|
|
387
389
|
};
|
|
388
390
|
declare const GetLedgerStateService_base: Effect.Service.Class<GetLedgerStateService, "GetLedgerStateService", {
|
|
389
391
|
readonly effect: Effect.Effect<(this: unknown, input: GetLedgerStateInput) => Effect.Effect<_radixdlt_babylon_gateway_api_sdk6.LedgerState, AccountLockerNotFoundError | InvalidRequestError | EntityNotFoundError | InternalServerError | InvalidEntityError | InvalidTransactionError | NotSyncedUpError | TransactionNotFoundError | ErrorResponse | RateLimitExceededError | ResponseError | UnknownGatewayError, never>, never, GatewayApiClient>;
|
|
@@ -393,7 +395,7 @@ declare class GetLedgerStateService extends GetLedgerStateService_base {}
|
|
|
393
395
|
//#region src/getNftResourceManagers.d.ts
|
|
394
396
|
type GetNftResourceManagersInput = {
|
|
395
397
|
addresses: string[];
|
|
396
|
-
at_ledger_state
|
|
398
|
+
at_ledger_state?: AtLedgerState;
|
|
397
399
|
resourceAddresses?: string[];
|
|
398
400
|
options?: StateEntityDetailsOperationRequest['stateEntityDetailsRequest']['opt_ins'];
|
|
399
401
|
};
|
|
@@ -405,7 +407,7 @@ declare const GetNftResourceManagersService_base: Effect.Service.Class<GetNftRes
|
|
|
405
407
|
resourceAddress: string;
|
|
406
408
|
nftIds: string[];
|
|
407
409
|
}[];
|
|
408
|
-
}[], AccountLockerNotFoundError | InvalidRequestError | EntityNotFoundError | InternalServerError | InvalidEntityError | InvalidTransactionError | NotSyncedUpError | TransactionNotFoundError | ErrorResponse | RateLimitExceededError | ResponseError | UnknownGatewayError, never>, effect_ConfigError0.ConfigError,
|
|
410
|
+
}[], AccountLockerNotFoundError | InvalidRequestError | EntityNotFoundError | InternalServerError | InvalidEntityError | InvalidTransactionError | NotSyncedUpError | TransactionNotFoundError | ErrorResponse | RateLimitExceededError | ResponseError | UnknownGatewayError, never>, effect_ConfigError0.ConfigError, GatewayApiClient | EntityNonFungiblesPage | EntityNonFungibleIdsPage>;
|
|
409
411
|
}>;
|
|
410
412
|
declare class GetNftResourceManagersService extends GetNftResourceManagersService_base {}
|
|
411
413
|
//#endregion
|
|
@@ -417,7 +419,7 @@ declare class InvalidInputError {
|
|
|
417
419
|
}
|
|
418
420
|
type GetNonFungibleBalanceInput = {
|
|
419
421
|
addresses: string[];
|
|
420
|
-
at_ledger_state
|
|
422
|
+
at_ledger_state?: AtLedgerState;
|
|
421
423
|
resourceAddresses?: string[];
|
|
422
424
|
options?: StateEntityDetailsOperationRequest['stateEntityDetailsRequest']['opt_ins'];
|
|
423
425
|
};
|
|
@@ -695,4 +697,4 @@ declare const PreviewTransaction_base: Effect.Service.Class<PreviewTransaction,
|
|
|
695
697
|
}>;
|
|
696
698
|
declare class PreviewTransaction extends PreviewTransaction_base {}
|
|
697
699
|
//#endregion
|
|
698
|
-
export { AccountLockerNotFoundError, AccountProof, AccountProofSchema, AtLedgerState, AtLedgerStateSchema, EntityFungiblesPage, EntityNonFungibleIdsPage, EntityNonFungiblesPage, EntityNotFoundError, ErrorResponse, GatewayApiClient, GetAddressByNonFungibleService, GetAddressByNonFungibleServiceInput, GetComponentStateService, GetEntityDetailsInput, GetEntityDetailsOptions, GetEntityDetailsState, GetEntityDetailsVaultAggregated, GetEntityDetailsVaultAggregatedParameters, GetFungibleBalance, GetFungibleBalanceOutput, GetKeyValueStoreService, GetLedgerStateInput, GetLedgerStateService, GetNftResourceManagersService, GetNonFungibleBalanceOutput, GetNonFungibleBalanceService, GetNonFungibleIdsInput, GetNonFungibleLocationService, GetResourceHoldersService, GetValidators, InternalServerError, InvalidComponentStateError, InvalidEntityError, InvalidInputError, InvalidRequestError, InvalidStateInputError, InvalidTransactionError, KeyValueStoreDataService, KeyValueStoreKeysService, NonFungibleData, NotSyncedUpError, PersonaProof, PersonaProofSchema, PreviewTransaction, ProofSchema, RateLimitExceededError, ResponseError, Rola, RolaProof, RolaProofSchema, ScryptoSborValueKind, type ScryptoSborValueMapEntry, ScryptoSborValueSchema, StateVersion, StateVersionSchema, TimestampSchema, TransactionNotFoundError, TransactionPreviewError, UnknownGatewayError, Validator, ValidatorSchema, VerifyRolaProofError, validateAtLedgerStateInput };
|
|
700
|
+
export { AccountLockerNotFoundError, AccountProof, AccountProofSchema, AtLedgerState, AtLedgerStateSchema, EntityFungiblesPage, EntityNonFungibleIdsPage, EntityNonFungiblesPage, EntityNotFoundError, ErrorResponse, GatewayApiClient, GetAddressByNonFungibleService, GetAddressByNonFungibleServiceInput, GetComponentStateService, GetEntityDetailsInput, GetEntityDetailsOptions, GetEntityDetailsState, GetEntityDetailsVaultAggregated, GetEntityDetailsVaultAggregatedParameters, GetFungibleBalance, GetFungibleBalanceOutput, GetKeyValueStoreService, GetLedgerStateInput, GetLedgerStateService, GetNftResourceManagersService, GetNonFungibleBalanceOutput, GetNonFungibleBalanceService, GetNonFungibleIdsInput, GetNonFungibleLocationService, GetResourceHoldersService, GetValidators, InternalServerError, InvalidComponentStateError, InvalidEntityError, InvalidInputError, InvalidRequestError, InvalidStateInputError, InvalidTransactionError, KeyValueStoreDataService, KeyValueStoreKeysService, NonFungibleData, NotSyncedUpError, PersonaProof, PersonaProofSchema, PreviewTransaction, ProofSchema, RateLimitExceededError, ResponseError, Rola, RolaProof, RolaProofSchema, ScryptoSborValueKind, type ScryptoSborValueMapEntry, ScryptoSborValueSchema, StateEntityDetails, StateEntityDetailsInput, StateEntityDetailsParameters, StateVersion, StateVersionSchema, TimestampSchema, TransactionNotFoundError, TransactionPreviewError, UnknownGatewayError, Validator, ValidatorSchema, VerifyRolaProofError, validateAtLedgerStateInput };
|
package/dist/index.js
CHANGED
|
@@ -145,11 +145,13 @@ var EntityFungiblesPage = class extends Effect.Service()("EntityFungiblesPage",
|
|
|
145
145
|
});
|
|
146
146
|
return Effect.fnUntraced(function* (input) {
|
|
147
147
|
const result = yield* entityFungiblesPage(input);
|
|
148
|
+
const paginationState = { state_version: result.ledger_state.state_version };
|
|
148
149
|
let nextCursor = result?.next_cursor;
|
|
149
150
|
const items = result?.items ?? [];
|
|
150
151
|
while (nextCursor) {
|
|
151
152
|
const result$1 = yield* entityFungiblesPage({
|
|
152
153
|
...input,
|
|
154
|
+
at_ledger_state: paginationState,
|
|
153
155
|
cursor: nextCursor
|
|
154
156
|
});
|
|
155
157
|
nextCursor = result$1.next_cursor;
|
|
@@ -253,20 +255,21 @@ var EntityNonFungibleIdsPage = class extends Effect.Service()("EntityNonFungible
|
|
|
253
255
|
const gatewayClient = yield* GatewayApiClient;
|
|
254
256
|
const pageSize = yield* Config.number("GatewayApi__Endpoint__StateEntityDetailsPageSize").pipe(Config.withDefault(100));
|
|
255
257
|
return Effect.fn(function* (input) {
|
|
256
|
-
const makeRequest = (cursor) => gatewayClient.state.innerClient.entityNonFungibleIdsPage({ stateEntityNonFungibleIdsPageRequest: {
|
|
258
|
+
const makeRequest = (cursor, at_ledger_state) => gatewayClient.state.innerClient.entityNonFungibleIdsPage({ stateEntityNonFungibleIdsPageRequest: {
|
|
257
259
|
resource_address: input.resourceAddress,
|
|
258
260
|
vault_address: input.vaultAddress,
|
|
259
261
|
address: input.address,
|
|
260
|
-
at_ledger_state: input.at_ledger_state,
|
|
262
|
+
at_ledger_state: at_ledger_state ?? input.at_ledger_state,
|
|
261
263
|
cursor,
|
|
262
264
|
limit_per_page: pageSize
|
|
263
265
|
} });
|
|
264
266
|
const result = yield* makeRequest(input.cursor);
|
|
267
|
+
const paginationState = { state_version: result.ledger_state.state_version };
|
|
265
268
|
let next_cursor = result.next_cursor;
|
|
266
269
|
const totalCount = result.total_count ?? 0;
|
|
267
270
|
const ids = [...result.items];
|
|
268
271
|
while (next_cursor && totalCount > 0) {
|
|
269
|
-
const result$1 = yield* makeRequest(next_cursor);
|
|
272
|
+
const result$1 = yield* makeRequest(next_cursor, paginationState);
|
|
270
273
|
ids.push(...result$1.items);
|
|
271
274
|
next_cursor = result$1.next_cursor;
|
|
272
275
|
}
|
|
@@ -277,6 +280,28 @@ var EntityNonFungibleIdsPage = class extends Effect.Service()("EntityNonFungible
|
|
|
277
280
|
});
|
|
278
281
|
}) }) {};
|
|
279
282
|
|
|
283
|
+
//#endregion
|
|
284
|
+
//#region src/state/stateEntityDetails.ts
|
|
285
|
+
var StateEntityDetails = class extends Effect.Service()("StateEntityDetails", { effect: Effect.gen(function* () {
|
|
286
|
+
const gatewayClient = yield* GatewayApiClient;
|
|
287
|
+
const pageSize = yield* Config.number("GatewayApi__Endpoint__StateEntityDetailsPageSize").pipe(Config.withDefault(20));
|
|
288
|
+
const concurrency = yield* Config.number("GATEWAY_STATE_ENTITY_DETAILS_CONCURRENCY").pipe(Config.withDefault(5));
|
|
289
|
+
return Effect.fnUntraced(function* (input) {
|
|
290
|
+
const chunks = chunker(input.addresses, pageSize);
|
|
291
|
+
return yield* Effect.forEach(chunks, Effect.fnUntraced(function* (addresses) {
|
|
292
|
+
return yield* gatewayClient.state.innerClient.stateEntityDetails({ stateEntityDetailsRequest: {
|
|
293
|
+
...input,
|
|
294
|
+
addresses
|
|
295
|
+
} });
|
|
296
|
+
}), { concurrency }).pipe(Effect.map((res) => {
|
|
297
|
+
return {
|
|
298
|
+
ledger_state: res[0].ledger_state,
|
|
299
|
+
items: res.flatMap((item) => item.items)
|
|
300
|
+
};
|
|
301
|
+
}));
|
|
302
|
+
});
|
|
303
|
+
}) }) {};
|
|
304
|
+
|
|
280
305
|
//#endregion
|
|
281
306
|
//#region src/getNonFungibleLocation.ts
|
|
282
307
|
var GetNonFungibleLocationService = class extends Effect.Service()("GetNonFungibleLocationService", { effect: Effect.gen(function* () {
|
|
@@ -357,28 +382,6 @@ var GetComponentStateService = class extends Effect.Service()("GetComponentState
|
|
|
357
382
|
})
|
|
358
383
|
}) {};
|
|
359
384
|
|
|
360
|
-
//#endregion
|
|
361
|
-
//#region src/state/stateEntityDetails.ts
|
|
362
|
-
var StateEntityDetails = class extends Effect.Service()("StateEntityDetails", { effect: Effect.gen(function* () {
|
|
363
|
-
const gatewayClient = yield* GatewayApiClient;
|
|
364
|
-
const pageSize = yield* Config.number("GatewayApi__Endpoint__StateEntityDetailsPageSize").pipe(Config.withDefault(20));
|
|
365
|
-
const concurrency = yield* Config.number("GATEWAY_STATE_ENTITY_DETAILS_CONCURRENCY").pipe(Config.withDefault(5));
|
|
366
|
-
return Effect.fnUntraced(function* (input) {
|
|
367
|
-
const chunks = chunker(input.addresses, pageSize);
|
|
368
|
-
return yield* Effect.forEach(chunks, Effect.fnUntraced(function* (addresses) {
|
|
369
|
-
return yield* gatewayClient.state.innerClient.stateEntityDetails({ stateEntityDetailsRequest: {
|
|
370
|
-
...input,
|
|
371
|
-
addresses
|
|
372
|
-
} });
|
|
373
|
-
}), { concurrency }).pipe(Effect.map((res) => {
|
|
374
|
-
return {
|
|
375
|
-
ledger_state: res[0].ledger_state,
|
|
376
|
-
items: res.flatMap((item) => item.items)
|
|
377
|
-
};
|
|
378
|
-
}));
|
|
379
|
-
});
|
|
380
|
-
}) }) {};
|
|
381
|
-
|
|
382
385
|
//#endregion
|
|
383
386
|
//#region src/getFungibleBalance.ts
|
|
384
387
|
var GetFungibleBalance = class extends Effect.Service()("GetFungibleBalance", {
|
|
@@ -422,7 +425,8 @@ var GetFungibleBalance = class extends Effect.Service()("GetFungibleBalance", {
|
|
|
422
425
|
at_ledger_state: input.at_ledger_state,
|
|
423
426
|
aggregation_level: "Global"
|
|
424
427
|
});
|
|
425
|
-
|
|
428
|
+
const paginationState = { state_version: stateEntityDetailsResults.ledger_state.state_version };
|
|
429
|
+
return yield* Effect.forEach(stateEntityDetailsResults.items, (item) => getAggregatedFungibleBalance(item, paginationState), { concurrency }).pipe(Effect.map((results) => results.flat()));
|
|
426
430
|
});
|
|
427
431
|
})
|
|
428
432
|
}) {};
|
|
@@ -472,12 +476,13 @@ var GetKeyValueStoreService = class extends Effect.Service()("GetKeyValueStoreSe
|
|
|
472
476
|
key_value_store_address: input.address,
|
|
473
477
|
at_ledger_state: input.at_ledger_state
|
|
474
478
|
});
|
|
479
|
+
const paginationState = { state_version: keyResults.ledger_state.state_version };
|
|
475
480
|
const allKeys = [...keyResults.items];
|
|
476
481
|
let nextCursor = keyResults.next_cursor;
|
|
477
482
|
while (nextCursor) {
|
|
478
483
|
const nextKeyResults = yield* keyValueStoreKeysService({
|
|
479
484
|
key_value_store_address: input.address,
|
|
480
|
-
at_ledger_state:
|
|
485
|
+
at_ledger_state: paginationState,
|
|
481
486
|
cursor: nextCursor
|
|
482
487
|
});
|
|
483
488
|
allKeys.push(...nextKeyResults.items);
|
|
@@ -486,7 +491,7 @@ var GetKeyValueStoreService = class extends Effect.Service()("GetKeyValueStoreSe
|
|
|
486
491
|
return yield* keyValueStoreDataService({
|
|
487
492
|
key_value_store_address: input.address,
|
|
488
493
|
keys: allKeys.map(({ key }) => ({ key_json: key.programmatic_json })),
|
|
489
|
-
at_ledger_state:
|
|
494
|
+
at_ledger_state: paginationState
|
|
490
495
|
}).pipe(Effect.map((res) => {
|
|
491
496
|
const { key_value_store_address, ledger_state } = res[0];
|
|
492
497
|
return {
|
|
@@ -611,10 +616,11 @@ var GetNftResourceManagersService = class extends Effect.Service()("GetNftResour
|
|
|
611
616
|
optIns,
|
|
612
617
|
at_ledger_state: input.at_ledger_state
|
|
613
618
|
});
|
|
619
|
+
const paginationState = stateEntityDetailsResults[0] ? { state_version: stateEntityDetailsResults[0].ledger_state.state_version } : input.at_ledger_state;
|
|
614
620
|
const resourceManagerResults = yield* Effect.forEach(stateEntityDetailsResults, Effect.fnUntraced(function* (stateEntityDetails) {
|
|
615
621
|
return yield* getResourceManagers({
|
|
616
622
|
items: stateEntityDetails.items,
|
|
617
|
-
at_ledger_state:
|
|
623
|
+
at_ledger_state: paginationState,
|
|
618
624
|
aggregationLevel: AGGREGATION_LEVEL,
|
|
619
625
|
optIns,
|
|
620
626
|
filterResourceAddresses
|
|
@@ -624,7 +630,7 @@ var GetNftResourceManagersService = class extends Effect.Service()("GetNftResour
|
|
|
624
630
|
const nftIds = yield* Effect.forEach(resourceManagerResult.resourceManagers, (resourceManager) => getNftIds({
|
|
625
631
|
resourceManager,
|
|
626
632
|
optIns,
|
|
627
|
-
at_ledger_state:
|
|
633
|
+
at_ledger_state: paginationState,
|
|
628
634
|
address: resourceManagerResult.address
|
|
629
635
|
}));
|
|
630
636
|
return {
|
|
@@ -924,4 +930,4 @@ var PreviewTransaction = class extends Effect.Service()("PreviewTransaction", {
|
|
|
924
930
|
}) }) {};
|
|
925
931
|
|
|
926
932
|
//#endregion
|
|
927
|
-
export { AccountLockerNotFoundError, AccountProofSchema, AtLedgerStateSchema, EntityFungiblesPage, EntityNonFungibleIdsPage, EntityNonFungiblesPage, EntityNotFoundError, ErrorResponse, GatewayApiClient, GetAddressByNonFungibleService, GetComponentStateService, GetEntityDetailsVaultAggregated, GetFungibleBalance, GetKeyValueStoreService, GetLedgerStateService, GetNftResourceManagersService, GetNonFungibleBalanceService, GetNonFungibleLocationService, GetResourceHoldersService, GetValidators, InternalServerError, InvalidComponentStateError, InvalidEntityError, InvalidInputError, InvalidRequestError, InvalidStateInputError, InvalidTransactionError, KeyValueStoreDataService, KeyValueStoreKeysService, NonFungibleData, NotSyncedUpError, PersonaProofSchema, PreviewTransaction, ProofSchema, RateLimitExceededError, ResponseError, Rola, RolaProofSchema, ScryptoSborValueKind, ScryptoSborValueSchema, StateVersionSchema, TimestampSchema, TransactionNotFoundError, TransactionPreviewError, UnknownGatewayError, ValidatorSchema, VerifyRolaProofError, validateAtLedgerStateInput };
|
|
933
|
+
export { AccountLockerNotFoundError, AccountProofSchema, AtLedgerStateSchema, EntityFungiblesPage, EntityNonFungibleIdsPage, EntityNonFungiblesPage, EntityNotFoundError, ErrorResponse, GatewayApiClient, GetAddressByNonFungibleService, GetComponentStateService, GetEntityDetailsVaultAggregated, GetFungibleBalance, GetKeyValueStoreService, GetLedgerStateService, GetNftResourceManagersService, GetNonFungibleBalanceService, GetNonFungibleLocationService, GetResourceHoldersService, GetValidators, InternalServerError, InvalidComponentStateError, InvalidEntityError, InvalidInputError, InvalidRequestError, InvalidStateInputError, InvalidTransactionError, KeyValueStoreDataService, KeyValueStoreKeysService, NonFungibleData, NotSyncedUpError, PersonaProofSchema, PreviewTransaction, ProofSchema, RateLimitExceededError, ResponseError, Rola, RolaProofSchema, ScryptoSborValueKind, ScryptoSborValueSchema, StateEntityDetails, StateVersionSchema, TimestampSchema, TransactionNotFoundError, TransactionPreviewError, UnknownGatewayError, ValidatorSchema, VerifyRolaProofError, validateAtLedgerStateInput };
|