@radix-effects/gateway 0.4.0 → 0.4.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.
- package/dist/index.d.ts +52 -52
- package/dist/index.js +56 -66
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Effect, Schema } from "effect";
|
|
2
|
-
import * as
|
|
2
|
+
import * as _radixdlt_babylon_gateway_api_sdk9 from "@radixdlt/babylon-gateway-api-sdk";
|
|
3
3
|
import { AccountLockerNotFoundError as AccountLockerNotFoundError$1, EntityFungiblesPageRequest, EntityNotFoundError as EntityNotFoundError$1, ErrorResponse as ErrorResponse$1, GatewayApiClient as GatewayApiClient$1, InternalServerError as InternalServerError$1, InvalidEntityError as InvalidEntityError$1, InvalidRequestError as InvalidRequestError$1, InvalidTransactionError as InvalidTransactionError$1, NotSyncedUpError as NotSyncedUpError$1, ResourceHoldersCollectionItem, ResponseError as ResponseError$1, StateEntityDetailsOperationRequest, StateEntityDetailsVaultResponseItem, StateKeyValueStoreDataRequest, StateKeyValueStoreKeysRequest, TransactionNotFoundError as TransactionNotFoundError$1, TransactionPreviewOperationRequest } from "@radixdlt/babylon-gateway-api-sdk";
|
|
4
4
|
import { z } from "zod";
|
|
5
5
|
import { RolaError } from "@radixdlt/rola";
|
|
@@ -92,24 +92,24 @@ declare const GatewayApiClient_base: Effect.Service.Class<GatewayApiClient, "Gat
|
|
|
92
92
|
readonly effect: Effect.Effect<{
|
|
93
93
|
networkId: number;
|
|
94
94
|
state: {
|
|
95
|
-
getEntityDetailsVaultAggregated: (addresses: string[], options?:
|
|
96
|
-
getValidators: (cursor?: string | undefined) => Effect.Effect<
|
|
95
|
+
getEntityDetailsVaultAggregated: (addresses: string[], options?: _radixdlt_babylon_gateway_api_sdk9.StateEntityDetailsOptions | undefined, ledgerState?: _radixdlt_babylon_gateway_api_sdk9.LedgerStateSelector | undefined) => Effect.Effect<_radixdlt_babylon_gateway_api_sdk9.StateEntityDetailsVaultResponseItem[], AccountLockerNotFoundError | InvalidRequestError | EntityNotFoundError | InternalServerError | InvalidEntityError | InvalidTransactionError | NotSyncedUpError | TransactionNotFoundError | ErrorResponse | RateLimitExceededError | ResponseError | UnknownGatewayError, never>;
|
|
96
|
+
getValidators: (cursor?: string | undefined) => Effect.Effect<_radixdlt_babylon_gateway_api_sdk9.ValidatorCollection, AccountLockerNotFoundError | InvalidRequestError | EntityNotFoundError | InternalServerError | InvalidEntityError | InvalidTransactionError | NotSyncedUpError | TransactionNotFoundError | ErrorResponse | RateLimitExceededError | ResponseError | UnknownGatewayError, never>;
|
|
97
97
|
innerClient: {
|
|
98
|
-
stateEntityDetails: (requestParameters:
|
|
99
|
-
entityFungiblesPage: (requestParameters:
|
|
100
|
-
entityNonFungiblesPage: (requestParameters:
|
|
101
|
-
entityNonFungibleIdsPage: (requestParameters:
|
|
102
|
-
entityNonFungibleResourceVaultPage: (requestParameters:
|
|
103
|
-
keyValueStoreKeys: (requestParameters:
|
|
104
|
-
keyValueStoreData: (requestParameters:
|
|
105
|
-
nonFungibleData: (requestParameters:
|
|
106
|
-
nonFungibleLocation: (requestParameters:
|
|
107
|
-
nonFungibleIds: (requestParameters:
|
|
98
|
+
stateEntityDetails: (requestParameters: _radixdlt_babylon_gateway_api_sdk9.StateEntityDetailsOperationRequest, initOverrides?: RequestInit | _radixdlt_babylon_gateway_api_sdk9.InitOverrideFunction | undefined) => Effect.Effect<_radixdlt_babylon_gateway_api_sdk9.StateEntityDetailsResponse, AccountLockerNotFoundError | InvalidRequestError | EntityNotFoundError | InternalServerError | InvalidEntityError | InvalidTransactionError | NotSyncedUpError | TransactionNotFoundError | ErrorResponse | RateLimitExceededError | ResponseError | UnknownGatewayError, never>;
|
|
99
|
+
entityFungiblesPage: (requestParameters: _radixdlt_babylon_gateway_api_sdk9.EntityFungiblesPageRequest, initOverrides?: RequestInit | _radixdlt_babylon_gateway_api_sdk9.InitOverrideFunction | undefined) => Effect.Effect<_radixdlt_babylon_gateway_api_sdk9.StateEntityFungiblesPageResponse, AccountLockerNotFoundError | InvalidRequestError | EntityNotFoundError | InternalServerError | InvalidEntityError | InvalidTransactionError | NotSyncedUpError | TransactionNotFoundError | ErrorResponse | RateLimitExceededError | ResponseError | UnknownGatewayError, never>;
|
|
100
|
+
entityNonFungiblesPage: (requestParameters: _radixdlt_babylon_gateway_api_sdk9.EntityNonFungiblesPageRequest, initOverrides?: RequestInit | _radixdlt_babylon_gateway_api_sdk9.InitOverrideFunction | undefined) => Effect.Effect<_radixdlt_babylon_gateway_api_sdk9.StateEntityNonFungiblesPageResponse, AccountLockerNotFoundError | InvalidRequestError | EntityNotFoundError | InternalServerError | InvalidEntityError | InvalidTransactionError | NotSyncedUpError | TransactionNotFoundError | ErrorResponse | RateLimitExceededError | ResponseError | UnknownGatewayError, never>;
|
|
101
|
+
entityNonFungibleIdsPage: (requestParameters: _radixdlt_babylon_gateway_api_sdk9.EntityNonFungibleIdsPageRequest, initOverrides?: RequestInit | _radixdlt_babylon_gateway_api_sdk9.InitOverrideFunction | undefined) => Effect.Effect<_radixdlt_babylon_gateway_api_sdk9.StateEntityNonFungibleIdsPageResponse, AccountLockerNotFoundError | InvalidRequestError | EntityNotFoundError | InternalServerError | InvalidEntityError | InvalidTransactionError | NotSyncedUpError | TransactionNotFoundError | ErrorResponse | RateLimitExceededError | ResponseError | UnknownGatewayError, never>;
|
|
102
|
+
entityNonFungibleResourceVaultPage: (requestParameters: _radixdlt_babylon_gateway_api_sdk9.EntityNonFungibleResourceVaultPageRequest, initOverrides?: RequestInit | _radixdlt_babylon_gateway_api_sdk9.InitOverrideFunction | undefined) => Effect.Effect<_radixdlt_babylon_gateway_api_sdk9.StateEntityNonFungibleResourceVaultsPageResponse, AccountLockerNotFoundError | InvalidRequestError | EntityNotFoundError | InternalServerError | InvalidEntityError | InvalidTransactionError | NotSyncedUpError | TransactionNotFoundError | ErrorResponse | RateLimitExceededError | ResponseError | UnknownGatewayError, never>;
|
|
103
|
+
keyValueStoreKeys: (requestParameters: _radixdlt_babylon_gateway_api_sdk9.KeyValueStoreKeysRequest, initOverrides?: RequestInit | _radixdlt_babylon_gateway_api_sdk9.InitOverrideFunction | undefined) => Effect.Effect<_radixdlt_babylon_gateway_api_sdk9.StateKeyValueStoreKeysResponse, AccountLockerNotFoundError | InvalidRequestError | EntityNotFoundError | InternalServerError | InvalidEntityError | InvalidTransactionError | NotSyncedUpError | TransactionNotFoundError | ErrorResponse | RateLimitExceededError | ResponseError | UnknownGatewayError, never>;
|
|
104
|
+
keyValueStoreData: (requestParameters: _radixdlt_babylon_gateway_api_sdk9.KeyValueStoreDataRequest, initOverrides?: RequestInit | _radixdlt_babylon_gateway_api_sdk9.InitOverrideFunction | undefined) => Effect.Effect<_radixdlt_babylon_gateway_api_sdk9.StateKeyValueStoreDataResponse, AccountLockerNotFoundError | InvalidRequestError | EntityNotFoundError | InternalServerError | InvalidEntityError | InvalidTransactionError | NotSyncedUpError | TransactionNotFoundError | ErrorResponse | RateLimitExceededError | ResponseError | UnknownGatewayError, never>;
|
|
105
|
+
nonFungibleData: (requestParameters: _radixdlt_babylon_gateway_api_sdk9.NonFungibleDataRequest, initOverrides?: RequestInit | _radixdlt_babylon_gateway_api_sdk9.InitOverrideFunction | undefined) => Effect.Effect<_radixdlt_babylon_gateway_api_sdk9.StateNonFungibleDataResponse, AccountLockerNotFoundError | InvalidRequestError | EntityNotFoundError | InternalServerError | InvalidEntityError | InvalidTransactionError | NotSyncedUpError | TransactionNotFoundError | ErrorResponse | RateLimitExceededError | ResponseError | UnknownGatewayError, never>;
|
|
106
|
+
nonFungibleLocation: (requestParameters: _radixdlt_babylon_gateway_api_sdk9.NonFungibleLocationRequest, initOverrides?: RequestInit | _radixdlt_babylon_gateway_api_sdk9.InitOverrideFunction | undefined) => Effect.Effect<_radixdlt_babylon_gateway_api_sdk9.StateNonFungibleLocationResponse, AccountLockerNotFoundError | InvalidRequestError | EntityNotFoundError | InternalServerError | InvalidEntityError | InvalidTransactionError | NotSyncedUpError | TransactionNotFoundError | ErrorResponse | RateLimitExceededError | ResponseError | UnknownGatewayError, never>;
|
|
107
|
+
nonFungibleIds: (requestParameters: _radixdlt_babylon_gateway_api_sdk9.NonFungibleIdsRequest, initOverrides?: RequestInit | _radixdlt_babylon_gateway_api_sdk9.InitOverrideFunction | undefined) => Effect.Effect<_radixdlt_babylon_gateway_api_sdk9.StateNonFungibleIdsResponse, AccountLockerNotFoundError | InvalidRequestError | EntityNotFoundError | InternalServerError | InvalidEntityError | InvalidTransactionError | NotSyncedUpError | TransactionNotFoundError | ErrorResponse | RateLimitExceededError | ResponseError | UnknownGatewayError, never>;
|
|
108
108
|
};
|
|
109
109
|
};
|
|
110
110
|
stream: {
|
|
111
111
|
innerClient: {
|
|
112
|
-
streamTransactions: (requestParameters:
|
|
112
|
+
streamTransactions: (requestParameters: _radixdlt_babylon_gateway_api_sdk9.StreamTransactionsOperationRequest, initOverrides?: RequestInit | _radixdlt_babylon_gateway_api_sdk9.InitOverrideFunction | undefined) => Effect.Effect<_radixdlt_babylon_gateway_api_sdk9.StreamTransactionsResponse, AccountLockerNotFoundError | InvalidRequestError | EntityNotFoundError | InternalServerError | InvalidEntityError | InvalidTransactionError | NotSyncedUpError | TransactionNotFoundError | ErrorResponse | RateLimitExceededError | ResponseError | UnknownGatewayError, never>;
|
|
113
113
|
};
|
|
114
114
|
};
|
|
115
115
|
transaction: {
|
|
@@ -125,21 +125,21 @@ declare const GatewayApiClient_base: Effect.Service.Class<GatewayApiClient, "Gat
|
|
|
125
125
|
balanceChanges: boolean;
|
|
126
126
|
receiptOutput: boolean;
|
|
127
127
|
manifestInstructions: boolean;
|
|
128
|
-
} | undefined) => Effect.Effect<
|
|
128
|
+
} | undefined) => Effect.Effect<_radixdlt_babylon_gateway_api_sdk9.TransactionCommittedDetailsResponse, AccountLockerNotFoundError | InvalidRequestError | EntityNotFoundError | InternalServerError | InvalidEntityError | InvalidTransactionError | NotSyncedUpError | TransactionNotFoundError | ErrorResponse | RateLimitExceededError | ResponseError | UnknownGatewayError, never>;
|
|
129
129
|
innerClient: {
|
|
130
|
-
transactionSubmit: (requestParameters:
|
|
131
|
-
transactionStatus: (requestParameters:
|
|
132
|
-
transactionPreview: (requestParameters:
|
|
130
|
+
transactionSubmit: (requestParameters: _radixdlt_babylon_gateway_api_sdk9.TransactionSubmitOperationRequest, initOverrides?: RequestInit | _radixdlt_babylon_gateway_api_sdk9.InitOverrideFunction | undefined) => Effect.Effect<_radixdlt_babylon_gateway_api_sdk9.TransactionSubmitResponse, AccountLockerNotFoundError | InvalidRequestError | EntityNotFoundError | InternalServerError | InvalidEntityError | InvalidTransactionError | NotSyncedUpError | TransactionNotFoundError | ErrorResponse | RateLimitExceededError | ResponseError | UnknownGatewayError, never>;
|
|
131
|
+
transactionStatus: (requestParameters: _radixdlt_babylon_gateway_api_sdk9.TransactionStatusOperationRequest, initOverrides?: RequestInit | _radixdlt_babylon_gateway_api_sdk9.InitOverrideFunction | undefined) => Effect.Effect<_radixdlt_babylon_gateway_api_sdk9.TransactionStatusResponse, AccountLockerNotFoundError | InvalidRequestError | EntityNotFoundError | InternalServerError | InvalidEntityError | InvalidTransactionError | NotSyncedUpError | TransactionNotFoundError | ErrorResponse | RateLimitExceededError | ResponseError | UnknownGatewayError, never>;
|
|
132
|
+
transactionPreview: (requestParameters: _radixdlt_babylon_gateway_api_sdk9.TransactionPreviewOperationRequest, initOverrides?: RequestInit | _radixdlt_babylon_gateway_api_sdk9.InitOverrideFunction | undefined) => Effect.Effect<_radixdlt_babylon_gateway_api_sdk9.TransactionPreviewResponse, AccountLockerNotFoundError | InvalidRequestError | EntityNotFoundError | InternalServerError | InvalidEntityError | InvalidTransactionError | NotSyncedUpError | TransactionNotFoundError | ErrorResponse | RateLimitExceededError | ResponseError | UnknownGatewayError, never>;
|
|
133
133
|
};
|
|
134
134
|
};
|
|
135
135
|
status: {
|
|
136
|
-
getCurrent: () => Effect.Effect<
|
|
136
|
+
getCurrent: () => Effect.Effect<_radixdlt_babylon_gateway_api_sdk9.GatewayStatusResponse, AccountLockerNotFoundError | InvalidRequestError | EntityNotFoundError | InternalServerError | InvalidEntityError | InvalidTransactionError | NotSyncedUpError | TransactionNotFoundError | ErrorResponse | RateLimitExceededError | ResponseError | UnknownGatewayError, never>;
|
|
137
137
|
innerClient: {
|
|
138
|
-
gatewayStatus: (initOverrides?: RequestInit |
|
|
138
|
+
gatewayStatus: (initOverrides?: RequestInit | _radixdlt_babylon_gateway_api_sdk9.InitOverrideFunction | undefined) => Effect.Effect<_radixdlt_babylon_gateway_api_sdk9.GatewayStatusResponse, AccountLockerNotFoundError | InvalidRequestError | EntityNotFoundError | InternalServerError | InvalidEntityError | InvalidTransactionError | NotSyncedUpError | TransactionNotFoundError | ErrorResponse | RateLimitExceededError | ResponseError | UnknownGatewayError, never>;
|
|
139
139
|
};
|
|
140
140
|
};
|
|
141
141
|
extensions: {
|
|
142
|
-
getResourceHolders: (resourceAddress: string, cursor?: string | undefined) => Effect.Effect<
|
|
142
|
+
getResourceHolders: (resourceAddress: string, cursor?: string | undefined) => Effect.Effect<_radixdlt_babylon_gateway_api_sdk9.ResourceHoldersResponse, AccountLockerNotFoundError | InvalidRequestError | EntityNotFoundError | InternalServerError | InvalidEntityError | InvalidTransactionError | NotSyncedUpError | TransactionNotFoundError | ErrorResponse | RateLimitExceededError | ResponseError | UnknownGatewayError, never>;
|
|
143
143
|
};
|
|
144
144
|
rawClient: GatewayApiClient$1;
|
|
145
145
|
}, never, never>;
|
|
@@ -188,23 +188,23 @@ type EntityFungiblesPageInput = Omit<EntityFungiblesPageRequest['stateEntityFung
|
|
|
188
188
|
at_ledger_state: AtLedgerState;
|
|
189
189
|
};
|
|
190
190
|
declare const EntityFungiblesPage_base: Effect.Service.Class<EntityFungiblesPage, "EntityFungiblesPage", {
|
|
191
|
-
readonly effect: Effect.Effect<(this: unknown, input: EntityFungiblesPageInput) => Effect.Effect<
|
|
191
|
+
readonly effect: Effect.Effect<(this: unknown, input: EntityFungiblesPageInput) => Effect.Effect<_radixdlt_babylon_gateway_api_sdk9.FungibleResourcesCollectionItem[], AccountLockerNotFoundError | InvalidRequestError | EntityNotFoundError | InternalServerError | InvalidEntityError | InvalidTransactionError | NotSyncedUpError | TransactionNotFoundError | ErrorResponse | RateLimitExceededError | ResponseError | UnknownGatewayError, never>, effect_ConfigError1.ConfigError, GatewayApiClient>;
|
|
192
192
|
}>;
|
|
193
193
|
declare class EntityFungiblesPage extends EntityFungiblesPage_base {}
|
|
194
194
|
//#endregion
|
|
195
195
|
//#region src/state/nonFungibleData.d.ts
|
|
196
196
|
declare const NonFungibleData_base: Effect.Service.Class<NonFungibleData, "NonFungibleData", {
|
|
197
|
-
readonly effect: Effect.Effect<(this: unknown, input: Omit<
|
|
197
|
+
readonly effect: Effect.Effect<(this: unknown, input: Omit<_radixdlt_babylon_gateway_api_sdk9.StateNonFungibleDataRequest, "at_ledger_state"> & {
|
|
198
198
|
at_ledger_state: AtLedgerState;
|
|
199
|
-
}) => Effect.Effect<
|
|
199
|
+
}) => Effect.Effect<_radixdlt_babylon_gateway_api_sdk9.StateNonFungibleDetailsResponseItem[], AccountLockerNotFoundError | InvalidRequestError | EntityNotFoundError | InternalServerError | InvalidEntityError | InvalidTransactionError | NotSyncedUpError | TransactionNotFoundError | ErrorResponse | RateLimitExceededError | ResponseError | UnknownGatewayError, never>, effect_ConfigError1.ConfigError, GatewayApiClient>;
|
|
200
200
|
}>;
|
|
201
201
|
declare class NonFungibleData extends NonFungibleData_base {}
|
|
202
202
|
//#endregion
|
|
203
203
|
//#region src/state/entityNonFungiblesPage.d.ts
|
|
204
204
|
declare const EntityNonFungiblesPage_base: Effect.Service.Class<EntityNonFungiblesPage, "EntityNonFungiblesPage", {
|
|
205
|
-
readonly effect: Effect.Effect<(this: unknown, input: Omit<
|
|
205
|
+
readonly effect: Effect.Effect<(this: unknown, input: Omit<_radixdlt_babylon_gateway_api_sdk9.StateEntityNonFungiblesPageRequest, "at_ledger_state"> & {
|
|
206
206
|
at_ledger_state: AtLedgerState;
|
|
207
|
-
}) => Effect.Effect<
|
|
207
|
+
}) => Effect.Effect<_radixdlt_babylon_gateway_api_sdk9.StateEntityNonFungiblesPageResponse, AccountLockerNotFoundError | InvalidRequestError | EntityNotFoundError | InternalServerError | InvalidEntityError | InvalidTransactionError | NotSyncedUpError | TransactionNotFoundError | ErrorResponse | RateLimitExceededError | ResponseError | UnknownGatewayError, never>, effect_ConfigError1.ConfigError, GatewayApiClient>;
|
|
208
208
|
}>;
|
|
209
209
|
declare class EntityNonFungiblesPage extends EntityNonFungiblesPage_base {}
|
|
210
210
|
//#endregion
|
|
@@ -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:
|
|
245
|
+
readonly effect: Effect.Effect<(this: unknown, input: string[], options: _radixdlt_babylon_gateway_api_sdk9.StateEntityDetailsOptions | undefined, at_ledger_state: {
|
|
246
246
|
state_version: number;
|
|
247
247
|
} | {
|
|
248
248
|
timestamp: Date;
|
|
249
|
-
}) => Effect.Effect<
|
|
249
|
+
}) => Effect.Effect<_radixdlt_babylon_gateway_api_sdk9.StateEntityDetailsVaultResponseItem[], AccountLockerNotFoundError | InvalidRequestError | EntityNotFoundError | InternalServerError | InvalidEntityError | InvalidTransactionError | NotSyncedUpError | TransactionNotFoundError | ErrorResponse | RateLimitExceededError | ResponseError | UnknownGatewayError, never>, effect_ConfigError1.ConfigError, GatewayApiClient>;
|
|
250
250
|
}>;
|
|
251
251
|
declare class GetEntityDetailsVaultAggregated extends GetEntityDetailsVaultAggregated_base {}
|
|
252
252
|
//#endregion
|
|
@@ -266,13 +266,24 @@ 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_sdk9.StateEntityDetailsRequest) => Effect.Effect<{
|
|
274
|
+
ledger_state: _radixdlt_babylon_gateway_api_sdk9.LedgerState;
|
|
275
|
+
items: _radixdlt_babylon_gateway_api_sdk9.StateEntityDetailsResponseItem[];
|
|
276
|
+
}, AccountLockerNotFoundError | InvalidRequestError | EntityNotFoundError | InternalServerError | InvalidEntityError | InvalidTransactionError | NotSyncedUpError | TransactionNotFoundError | ErrorResponse | RateLimitExceededError | ResponseError | UnknownGatewayError, never>, effect_ConfigError1.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
285
|
at_ledger_state: AtLedgerState;
|
|
275
|
-
}) => Effect.Effect<
|
|
286
|
+
}) => Effect.Effect<_radixdlt_babylon_gateway_api_sdk9.StateNonFungibleLocationResponse[], AccountLockerNotFoundError | InvalidRequestError | EntityNotFoundError | InternalServerError | InvalidEntityError | InvalidTransactionError | NotSyncedUpError | TransactionNotFoundError | ErrorResponse | RateLimitExceededError | ResponseError | UnknownGatewayError, never>, effect_ConfigError1.ConfigError, GatewayApiClient>;
|
|
276
287
|
}>;
|
|
277
288
|
declare class GetNonFungibleLocationService extends GetNonFungibleLocationService_base {}
|
|
278
289
|
//#endregion
|
|
@@ -321,15 +332,6 @@ 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_sdk4.StateEntityDetailsRequest) => Effect.Effect<{
|
|
327
|
-
ledger_state: _radixdlt_babylon_gateway_api_sdk4.LedgerState;
|
|
328
|
-
items: _radixdlt_babylon_gateway_api_sdk4.StateEntityDetailsResponseItem[];
|
|
329
|
-
}, AccountLockerNotFoundError | InvalidRequestError | EntityNotFoundError | InternalServerError | InvalidEntityError | InvalidTransactionError | NotSyncedUpError | TransactionNotFoundError | ErrorResponse | RateLimitExceededError | ResponseError | UnknownGatewayError, never>, effect_ConfigError1.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'> & {
|
|
@@ -343,7 +345,7 @@ declare const GetFungibleBalance_base: Effect.Service.Class<GetFungibleBalance,
|
|
|
343
345
|
items: {
|
|
344
346
|
amount: BigNumber;
|
|
345
347
|
resource_address: string;
|
|
346
|
-
explicit_metadata?:
|
|
348
|
+
explicit_metadata?: _radixdlt_babylon_gateway_api_sdk9.EntityMetadataCollection;
|
|
347
349
|
last_updated_at_state_version: number;
|
|
348
350
|
}[];
|
|
349
351
|
}[], AccountLockerNotFoundError | InvalidRequestError | EntityNotFoundError | InternalServerError | InvalidEntityError | InvalidTransactionError | NotSyncedUpError | TransactionNotFoundError | ErrorResponse | RateLimitExceededError | ResponseError | UnknownGatewayError, never>, effect_ConfigError1.ConfigError, EntityFungiblesPage | StateEntityDetails>;
|
|
@@ -352,10 +354,10 @@ declare class GetFungibleBalance extends GetFungibleBalance_base {}
|
|
|
352
354
|
//#endregion
|
|
353
355
|
//#region src/keyValueStoreData.d.ts
|
|
354
356
|
declare const KeyValueStoreDataService_base: Effect.Service.Class<KeyValueStoreDataService, "KeyValueStoreDataService", {
|
|
355
|
-
readonly dependencies: readonly [
|
|
357
|
+
readonly dependencies: readonly [];
|
|
356
358
|
readonly effect: Effect.Effect<(this: unknown, input: Omit<StateKeyValueStoreDataRequest, "at_ledger_state"> & {
|
|
357
359
|
at_ledger_state: AtLedgerState;
|
|
358
|
-
}) => Effect.Effect<
|
|
360
|
+
}) => Effect.Effect<_radixdlt_babylon_gateway_api_sdk9.StateKeyValueStoreDataResponse[], AccountLockerNotFoundError | InvalidRequestError | EntityNotFoundError | InternalServerError | InvalidEntityError | InvalidTransactionError | NotSyncedUpError | TransactionNotFoundError | ErrorResponse | RateLimitExceededError | ResponseError | UnknownGatewayError, never>, effect_ConfigError1.ConfigError, GatewayApiClient>;
|
|
359
361
|
}>;
|
|
360
362
|
declare class KeyValueStoreDataService extends KeyValueStoreDataService_base {}
|
|
361
363
|
//#endregion
|
|
@@ -363,20 +365,20 @@ declare class KeyValueStoreDataService extends KeyValueStoreDataService_base {}
|
|
|
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
367
|
at_ledger_state: AtLedgerState;
|
|
366
|
-
}) => Effect.Effect<
|
|
368
|
+
}) => Effect.Effect<_radixdlt_babylon_gateway_api_sdk9.StateKeyValueStoreKeysResponse, AccountLockerNotFoundError | InvalidRequestError | EntityNotFoundError | InternalServerError | InvalidEntityError | InvalidTransactionError | NotSyncedUpError | TransactionNotFoundError | ErrorResponse | RateLimitExceededError | ResponseError | UnknownGatewayError, never>, effect_ConfigError1.ConfigError, GatewayApiClient>;
|
|
367
369
|
}>;
|
|
368
370
|
declare class KeyValueStoreKeysService extends KeyValueStoreKeysService_base {}
|
|
369
371
|
//#endregion
|
|
370
372
|
//#region src/getKeyValueStore.d.ts
|
|
371
373
|
declare const GetKeyValueStoreService_base: Effect.Service.Class<GetKeyValueStoreService, "GetKeyValueStoreService", {
|
|
372
|
-
readonly dependencies: readonly [effect_Layer0.Layer<KeyValueStoreKeysService, effect_ConfigError1.ConfigError, GatewayApiClient>, effect_Layer0.Layer<KeyValueStoreDataService, effect_ConfigError1.ConfigError,
|
|
374
|
+
readonly dependencies: readonly [effect_Layer0.Layer<KeyValueStoreKeysService, effect_ConfigError1.ConfigError, GatewayApiClient>, effect_Layer0.Layer<KeyValueStoreDataService, effect_ConfigError1.ConfigError, GatewayApiClient>];
|
|
373
375
|
readonly effect: Effect.Effect<(this: unknown, input: {
|
|
374
376
|
address: string;
|
|
375
377
|
at_ledger_state: AtLedgerState;
|
|
376
378
|
}) => Effect.Effect<{
|
|
377
379
|
key_value_store_address: string;
|
|
378
|
-
ledger_state:
|
|
379
|
-
entries:
|
|
380
|
+
ledger_state: _radixdlt_babylon_gateway_api_sdk9.LedgerState;
|
|
381
|
+
entries: _radixdlt_babylon_gateway_api_sdk9.StateKeyValueStoreDataResponseItem[];
|
|
380
382
|
}, AccountLockerNotFoundError | InvalidRequestError | EntityNotFoundError | InternalServerError | InvalidEntityError | InvalidTransactionError | NotSyncedUpError | TransactionNotFoundError | ErrorResponse | RateLimitExceededError | ResponseError | UnknownGatewayError, never>, never, KeyValueStoreKeysService | KeyValueStoreDataService>;
|
|
381
383
|
}>;
|
|
382
384
|
declare class GetKeyValueStoreService extends GetKeyValueStoreService_base {}
|
|
@@ -386,7 +388,7 @@ type GetLedgerStateInput = {
|
|
|
386
388
|
at_ledger_state: AtLedgerState;
|
|
387
389
|
};
|
|
388
390
|
declare const GetLedgerStateService_base: Effect.Service.Class<GetLedgerStateService, "GetLedgerStateService", {
|
|
389
|
-
readonly effect: Effect.Effect<(this: unknown, input: GetLedgerStateInput) => Effect.Effect<
|
|
391
|
+
readonly effect: Effect.Effect<(this: unknown, input: GetLedgerStateInput) => Effect.Effect<_radixdlt_babylon_gateway_api_sdk9.LedgerState, AccountLockerNotFoundError | InvalidRequestError | EntityNotFoundError | InternalServerError | InvalidEntityError | InvalidTransactionError | NotSyncedUpError | TransactionNotFoundError | ErrorResponse | RateLimitExceededError | ResponseError | UnknownGatewayError, never>, never, GatewayApiClient>;
|
|
390
392
|
}>;
|
|
391
393
|
declare class GetLedgerStateService extends GetLedgerStateService_base {}
|
|
392
394
|
//#endregion
|
|
@@ -398,7 +400,7 @@ type GetNftResourceManagersInput = {
|
|
|
398
400
|
options?: StateEntityDetailsOperationRequest['stateEntityDetailsRequest']['opt_ins'];
|
|
399
401
|
};
|
|
400
402
|
declare const GetNftResourceManagersService_base: Effect.Service.Class<GetNftResourceManagersService, "GetNftResourceManagersService", {
|
|
401
|
-
readonly dependencies: readonly [effect_Layer0.Layer<
|
|
403
|
+
readonly dependencies: readonly [effect_Layer0.Layer<EntityNonFungiblesPage, effect_ConfigError1.ConfigError, GatewayApiClient>, effect_Layer0.Layer<EntityNonFungibleIdsPage, effect_ConfigError1.ConfigError, GatewayApiClient>];
|
|
402
404
|
readonly effect: Effect.Effect<(this: unknown, input: GetNftResourceManagersInput) => Effect.Effect<{
|
|
403
405
|
address: string;
|
|
404
406
|
items: {
|
|
@@ -432,7 +434,7 @@ declare const GetNonFungibleBalanceService_base: Effect.Service.Class<GetNonFung
|
|
|
432
434
|
items: {
|
|
433
435
|
id: string;
|
|
434
436
|
lastUpdatedStateVersion: number;
|
|
435
|
-
sbor:
|
|
437
|
+
sbor: _radixdlt_babylon_gateway_api_sdk9.ProgrammaticScryptoSborValue | undefined;
|
|
436
438
|
isBurned: boolean;
|
|
437
439
|
}[];
|
|
438
440
|
}[];
|
|
@@ -443,7 +445,6 @@ declare class GetNonFungibleBalanceService extends GetNonFungibleBalanceService_
|
|
|
443
445
|
//#endregion
|
|
444
446
|
//#region src/getResourceHolders.d.ts
|
|
445
447
|
declare const GetResourceHoldersService_base: Effect.Service.Class<GetResourceHoldersService, "GetResourceHoldersService", {
|
|
446
|
-
readonly dependencies: readonly [effect_Layer0.Layer<GatewayApiClient, never, never>];
|
|
447
448
|
readonly effect: Effect.Effect<(this: unknown, input: {
|
|
448
449
|
resourceAddress: string;
|
|
449
450
|
cursor?: string;
|
|
@@ -690,11 +691,10 @@ declare class TransactionPreviewError extends TransactionPreviewError_base<{
|
|
|
690
691
|
message?: string;
|
|
691
692
|
}> {}
|
|
692
693
|
declare const PreviewTransaction_base: Effect.Service.Class<PreviewTransaction, "PreviewTransaction", {
|
|
693
|
-
readonly dependencies: readonly [effect_Layer0.Layer<GatewayApiClient, never, never>];
|
|
694
694
|
readonly effect: Effect.Effect<(this: unknown, input: {
|
|
695
695
|
payload: TransactionPreviewOperationRequest["transactionPreviewRequest"];
|
|
696
|
-
}) => Effect.Effect<
|
|
696
|
+
}) => Effect.Effect<_radixdlt_babylon_gateway_api_sdk9.TransactionPreviewResponse, AccountLockerNotFoundError | InvalidRequestError | EntityNotFoundError | InternalServerError | InvalidEntityError | InvalidTransactionError | NotSyncedUpError | TransactionNotFoundError | ErrorResponse | RateLimitExceededError | ResponseError | UnknownGatewayError | TransactionPreviewError, never>, never, GatewayApiClient>;
|
|
697
697
|
}>;
|
|
698
698
|
declare class PreviewTransaction extends PreviewTransaction_base {}
|
|
699
699
|
//#endregion
|
|
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, 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
|
@@ -277,6 +277,28 @@ var EntityNonFungibleIdsPage = class extends Effect.Service()("EntityNonFungible
|
|
|
277
277
|
});
|
|
278
278
|
}) }) {};
|
|
279
279
|
|
|
280
|
+
//#endregion
|
|
281
|
+
//#region src/state/stateEntityDetails.ts
|
|
282
|
+
var StateEntityDetails = class extends Effect.Service()("StateEntityDetails", { effect: Effect.gen(function* () {
|
|
283
|
+
const gatewayClient = yield* GatewayApiClient;
|
|
284
|
+
const pageSize = yield* Config.number("GatewayApi__Endpoint__StateEntityDetailsPageSize").pipe(Config.withDefault(20));
|
|
285
|
+
const concurrency = yield* Config.number("GATEWAY_STATE_ENTITY_DETAILS_CONCURRENCY").pipe(Config.withDefault(5));
|
|
286
|
+
return Effect.fnUntraced(function* (input) {
|
|
287
|
+
const chunks = chunker(input.addresses, pageSize);
|
|
288
|
+
return yield* Effect.forEach(chunks, Effect.fnUntraced(function* (addresses) {
|
|
289
|
+
return yield* gatewayClient.state.innerClient.stateEntityDetails({ stateEntityDetailsRequest: {
|
|
290
|
+
...input,
|
|
291
|
+
addresses
|
|
292
|
+
} });
|
|
293
|
+
}), { concurrency }).pipe(Effect.map((res) => {
|
|
294
|
+
return {
|
|
295
|
+
ledger_state: res[0].ledger_state,
|
|
296
|
+
items: res.flatMap((item) => item.items)
|
|
297
|
+
};
|
|
298
|
+
}));
|
|
299
|
+
});
|
|
300
|
+
}) }) {};
|
|
301
|
+
|
|
280
302
|
//#endregion
|
|
281
303
|
//#region src/getNonFungibleLocation.ts
|
|
282
304
|
var GetNonFungibleLocationService = class extends Effect.Service()("GetNonFungibleLocationService", { effect: Effect.gen(function* () {
|
|
@@ -357,28 +379,6 @@ var GetComponentStateService = class extends Effect.Service()("GetComponentState
|
|
|
357
379
|
})
|
|
358
380
|
}) {};
|
|
359
381
|
|
|
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
382
|
//#endregion
|
|
383
383
|
//#region src/getFungibleBalance.ts
|
|
384
384
|
var GetFungibleBalance = class extends Effect.Service()("GetFungibleBalance", {
|
|
@@ -430,7 +430,7 @@ var GetFungibleBalance = class extends Effect.Service()("GetFungibleBalance", {
|
|
|
430
430
|
//#endregion
|
|
431
431
|
//#region src/keyValueStoreData.ts
|
|
432
432
|
var KeyValueStoreDataService = class extends Effect.Service()("KeyValueStoreDataService", {
|
|
433
|
-
dependencies: [
|
|
433
|
+
dependencies: [],
|
|
434
434
|
effect: Effect.gen(function* () {
|
|
435
435
|
const gatewayClient = yield* GatewayApiClient;
|
|
436
436
|
const pageSize = yield* Config.number("GatewayApi__Endpoint__MaxPageSize").pipe(Config.withDefault(100));
|
|
@@ -514,11 +514,7 @@ var GetLedgerStateService = class extends Effect.Service()("GetLedgerStateServic
|
|
|
514
514
|
//#endregion
|
|
515
515
|
//#region src/getNftResourceManagers.ts
|
|
516
516
|
var GetNftResourceManagersService = class extends Effect.Service()("GetNftResourceManagersService", {
|
|
517
|
-
dependencies: [
|
|
518
|
-
GatewayApiClient.Default,
|
|
519
|
-
EntityNonFungiblesPage.Default,
|
|
520
|
-
EntityNonFungibleIdsPage.Default
|
|
521
|
-
],
|
|
517
|
+
dependencies: [EntityNonFungiblesPage.Default, EntityNonFungibleIdsPage.Default],
|
|
522
518
|
effect: Effect.gen(function* () {
|
|
523
519
|
const gatewayClient = yield* GatewayApiClient;
|
|
524
520
|
const entityNonFungiblesPageService = yield* EntityNonFungiblesPage;
|
|
@@ -702,31 +698,28 @@ var GetNonFungibleBalanceService = class extends Effect.Service()("GetNonFungibl
|
|
|
702
698
|
|
|
703
699
|
//#endregion
|
|
704
700
|
//#region src/getResourceHolders.ts
|
|
705
|
-
var GetResourceHoldersService = class extends Effect.Service()("GetResourceHoldersService", {
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
});
|
|
728
|
-
})
|
|
729
|
-
}) {};
|
|
701
|
+
var GetResourceHoldersService = class extends Effect.Service()("GetResourceHoldersService", { effect: Effect.gen(function* () {
|
|
702
|
+
const gatewayClient = yield* GatewayApiClient;
|
|
703
|
+
const getResourceHolders = Effect.fn(function* (input) {
|
|
704
|
+
return yield* gatewayClient.extensions.getResourceHolders(input.resourceAddress, input.cursor);
|
|
705
|
+
});
|
|
706
|
+
return Effect.fn(function* (input) {
|
|
707
|
+
const result = yield* getResourceHolders(input);
|
|
708
|
+
const allItems = [...result.items];
|
|
709
|
+
let nextCursor = result.next_cursor;
|
|
710
|
+
while (nextCursor) {
|
|
711
|
+
const nextResult = yield* getResourceHolders({
|
|
712
|
+
resourceAddress: input.resourceAddress,
|
|
713
|
+
cursor: nextCursor
|
|
714
|
+
});
|
|
715
|
+
allItems.push(...nextResult.items);
|
|
716
|
+
nextCursor = nextResult.next_cursor;
|
|
717
|
+
}
|
|
718
|
+
const holders = /* @__PURE__ */ new Map();
|
|
719
|
+
for (const item of allItems) holders.set(item.holder_address, item);
|
|
720
|
+
return Array.from(holders.values());
|
|
721
|
+
});
|
|
722
|
+
}) }) {};
|
|
730
723
|
|
|
731
724
|
//#endregion
|
|
732
725
|
//#region src/schemas.ts
|
|
@@ -920,18 +913,15 @@ const ScryptoSborValueSchema = Schema.Union(ScryptoSborValueBool, ScryptoSborVal
|
|
|
920
913
|
//#endregion
|
|
921
914
|
//#region src/previewTransaction.ts
|
|
922
915
|
var TransactionPreviewError = class extends Data.TaggedError("TransactionPreviewError") {};
|
|
923
|
-
var PreviewTransaction = class extends Effect.Service()("PreviewTransaction", {
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
const
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
});
|
|
933
|
-
})
|
|
934
|
-
}) {};
|
|
916
|
+
var PreviewTransaction = class extends Effect.Service()("PreviewTransaction", { effect: Effect.gen(function* () {
|
|
917
|
+
const gatewayApiClient = yield* GatewayApiClient;
|
|
918
|
+
return Effect.fnUntraced(function* (input) {
|
|
919
|
+
const result = yield* gatewayApiClient.transaction.innerClient.transactionPreview({ transactionPreviewRequest: input.payload });
|
|
920
|
+
const receipt = result.receipt;
|
|
921
|
+
if (receipt.status !== "Succeeded") return yield* new TransactionPreviewError({ message: receipt.error_message });
|
|
922
|
+
return result;
|
|
923
|
+
});
|
|
924
|
+
}) }) {};
|
|
935
925
|
|
|
936
926
|
//#endregion
|
|
937
|
-
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 };
|
|
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, StateEntityDetails, StateVersionSchema, TimestampSchema, TransactionNotFoundError, TransactionPreviewError, UnknownGatewayError, ValidatorSchema, VerifyRolaProofError, validateAtLedgerStateInput };
|