@radix-effects/gateway 0.3.2 → 0.4.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 +71 -67
- package/dist/index.js +194 -207
- package/package.json +2 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { Effect, Schema } from "effect";
|
|
2
|
-
import * as
|
|
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 } from "@radixdlt/babylon-gateway-api-sdk";
|
|
2
|
+
import * as _radixdlt_babylon_gateway_api_sdk4 from "@radixdlt/babylon-gateway-api-sdk";
|
|
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";
|
|
6
|
-
import * as
|
|
7
|
-
import * as effect_ConfigError0 from "effect/ConfigError";
|
|
6
|
+
import * as effect_ConfigError1 from "effect/ConfigError";
|
|
8
7
|
import * as effect_Types0 from "effect/Types";
|
|
9
8
|
import * as effect_Cause0 from "effect/Cause";
|
|
9
|
+
import * as effect_Layer0 from "effect/Layer";
|
|
10
10
|
import { ParsedType, StructDefinition, StructSchema } from "sbor-ez-mode";
|
|
11
11
|
|
|
12
12
|
//#region src/gatewayApiClient.d.ts
|
|
@@ -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_sdk4.StateEntityDetailsOptions | undefined, ledgerState?: _radixdlt_babylon_gateway_api_sdk4.LedgerStateSelector | undefined) => Effect.Effect<_radixdlt_babylon_gateway_api_sdk4.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_sdk4.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_sdk4.StateEntityDetailsOperationRequest, initOverrides?: RequestInit | _radixdlt_babylon_gateway_api_sdk4.InitOverrideFunction | undefined) => Effect.Effect<_radixdlt_babylon_gateway_api_sdk4.StateEntityDetailsResponse, AccountLockerNotFoundError | InvalidRequestError | EntityNotFoundError | InternalServerError | InvalidEntityError | InvalidTransactionError | NotSyncedUpError | TransactionNotFoundError | ErrorResponse | RateLimitExceededError | ResponseError | UnknownGatewayError, never>;
|
|
99
|
+
entityFungiblesPage: (requestParameters: _radixdlt_babylon_gateway_api_sdk4.EntityFungiblesPageRequest, initOverrides?: RequestInit | _radixdlt_babylon_gateway_api_sdk4.InitOverrideFunction | undefined) => Effect.Effect<_radixdlt_babylon_gateway_api_sdk4.StateEntityFungiblesPageResponse, AccountLockerNotFoundError | InvalidRequestError | EntityNotFoundError | InternalServerError | InvalidEntityError | InvalidTransactionError | NotSyncedUpError | TransactionNotFoundError | ErrorResponse | RateLimitExceededError | ResponseError | UnknownGatewayError, never>;
|
|
100
|
+
entityNonFungiblesPage: (requestParameters: _radixdlt_babylon_gateway_api_sdk4.EntityNonFungiblesPageRequest, initOverrides?: RequestInit | _radixdlt_babylon_gateway_api_sdk4.InitOverrideFunction | undefined) => Effect.Effect<_radixdlt_babylon_gateway_api_sdk4.StateEntityNonFungiblesPageResponse, AccountLockerNotFoundError | InvalidRequestError | EntityNotFoundError | InternalServerError | InvalidEntityError | InvalidTransactionError | NotSyncedUpError | TransactionNotFoundError | ErrorResponse | RateLimitExceededError | ResponseError | UnknownGatewayError, never>;
|
|
101
|
+
entityNonFungibleIdsPage: (requestParameters: _radixdlt_babylon_gateway_api_sdk4.EntityNonFungibleIdsPageRequest, initOverrides?: RequestInit | _radixdlt_babylon_gateway_api_sdk4.InitOverrideFunction | undefined) => Effect.Effect<_radixdlt_babylon_gateway_api_sdk4.StateEntityNonFungibleIdsPageResponse, AccountLockerNotFoundError | InvalidRequestError | EntityNotFoundError | InternalServerError | InvalidEntityError | InvalidTransactionError | NotSyncedUpError | TransactionNotFoundError | ErrorResponse | RateLimitExceededError | ResponseError | UnknownGatewayError, never>;
|
|
102
|
+
entityNonFungibleResourceVaultPage: (requestParameters: _radixdlt_babylon_gateway_api_sdk4.EntityNonFungibleResourceVaultPageRequest, initOverrides?: RequestInit | _radixdlt_babylon_gateway_api_sdk4.InitOverrideFunction | undefined) => Effect.Effect<_radixdlt_babylon_gateway_api_sdk4.StateEntityNonFungibleResourceVaultsPageResponse, AccountLockerNotFoundError | InvalidRequestError | EntityNotFoundError | InternalServerError | InvalidEntityError | InvalidTransactionError | NotSyncedUpError | TransactionNotFoundError | ErrorResponse | RateLimitExceededError | ResponseError | UnknownGatewayError, never>;
|
|
103
|
+
keyValueStoreKeys: (requestParameters: _radixdlt_babylon_gateway_api_sdk4.KeyValueStoreKeysRequest, initOverrides?: RequestInit | _radixdlt_babylon_gateway_api_sdk4.InitOverrideFunction | undefined) => Effect.Effect<_radixdlt_babylon_gateway_api_sdk4.StateKeyValueStoreKeysResponse, AccountLockerNotFoundError | InvalidRequestError | EntityNotFoundError | InternalServerError | InvalidEntityError | InvalidTransactionError | NotSyncedUpError | TransactionNotFoundError | ErrorResponse | RateLimitExceededError | ResponseError | UnknownGatewayError, never>;
|
|
104
|
+
keyValueStoreData: (requestParameters: _radixdlt_babylon_gateway_api_sdk4.KeyValueStoreDataRequest, initOverrides?: RequestInit | _radixdlt_babylon_gateway_api_sdk4.InitOverrideFunction | undefined) => Effect.Effect<_radixdlt_babylon_gateway_api_sdk4.StateKeyValueStoreDataResponse, AccountLockerNotFoundError | InvalidRequestError | EntityNotFoundError | InternalServerError | InvalidEntityError | InvalidTransactionError | NotSyncedUpError | TransactionNotFoundError | ErrorResponse | RateLimitExceededError | ResponseError | UnknownGatewayError, never>;
|
|
105
|
+
nonFungibleData: (requestParameters: _radixdlt_babylon_gateway_api_sdk4.NonFungibleDataRequest, initOverrides?: RequestInit | _radixdlt_babylon_gateway_api_sdk4.InitOverrideFunction | undefined) => Effect.Effect<_radixdlt_babylon_gateway_api_sdk4.StateNonFungibleDataResponse, AccountLockerNotFoundError | InvalidRequestError | EntityNotFoundError | InternalServerError | InvalidEntityError | InvalidTransactionError | NotSyncedUpError | TransactionNotFoundError | ErrorResponse | RateLimitExceededError | ResponseError | UnknownGatewayError, never>;
|
|
106
|
+
nonFungibleLocation: (requestParameters: _radixdlt_babylon_gateway_api_sdk4.NonFungibleLocationRequest, initOverrides?: RequestInit | _radixdlt_babylon_gateway_api_sdk4.InitOverrideFunction | undefined) => Effect.Effect<_radixdlt_babylon_gateway_api_sdk4.StateNonFungibleLocationResponse, AccountLockerNotFoundError | InvalidRequestError | EntityNotFoundError | InternalServerError | InvalidEntityError | InvalidTransactionError | NotSyncedUpError | TransactionNotFoundError | ErrorResponse | RateLimitExceededError | ResponseError | UnknownGatewayError, never>;
|
|
107
|
+
nonFungibleIds: (requestParameters: _radixdlt_babylon_gateway_api_sdk4.NonFungibleIdsRequest, initOverrides?: RequestInit | _radixdlt_babylon_gateway_api_sdk4.InitOverrideFunction | undefined) => Effect.Effect<_radixdlt_babylon_gateway_api_sdk4.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_sdk4.StreamTransactionsOperationRequest, initOverrides?: RequestInit | _radixdlt_babylon_gateway_api_sdk4.InitOverrideFunction | undefined) => Effect.Effect<_radixdlt_babylon_gateway_api_sdk4.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_sdk4.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_sdk4.TransactionSubmitOperationRequest, initOverrides?: RequestInit | _radixdlt_babylon_gateway_api_sdk4.InitOverrideFunction | undefined) => Effect.Effect<_radixdlt_babylon_gateway_api_sdk4.TransactionSubmitResponse, AccountLockerNotFoundError | InvalidRequestError | EntityNotFoundError | InternalServerError | InvalidEntityError | InvalidTransactionError | NotSyncedUpError | TransactionNotFoundError | ErrorResponse | RateLimitExceededError | ResponseError | UnknownGatewayError, never>;
|
|
131
|
+
transactionStatus: (requestParameters: _radixdlt_babylon_gateway_api_sdk4.TransactionStatusOperationRequest, initOverrides?: RequestInit | _radixdlt_babylon_gateway_api_sdk4.InitOverrideFunction | undefined) => Effect.Effect<_radixdlt_babylon_gateway_api_sdk4.TransactionStatusResponse, AccountLockerNotFoundError | InvalidRequestError | EntityNotFoundError | InternalServerError | InvalidEntityError | InvalidTransactionError | NotSyncedUpError | TransactionNotFoundError | ErrorResponse | RateLimitExceededError | ResponseError | UnknownGatewayError, never>;
|
|
132
|
+
transactionPreview: (requestParameters: _radixdlt_babylon_gateway_api_sdk4.TransactionPreviewOperationRequest, initOverrides?: RequestInit | _radixdlt_babylon_gateway_api_sdk4.InitOverrideFunction | undefined) => Effect.Effect<_radixdlt_babylon_gateway_api_sdk4.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_sdk4.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_sdk4.InitOverrideFunction | undefined) => Effect.Effect<_radixdlt_babylon_gateway_api_sdk4.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_sdk4.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,26 +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
|
|
192
|
-
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>;
|
|
191
|
+
readonly effect: Effect.Effect<(this: unknown, input: EntityFungiblesPageInput) => Effect.Effect<_radixdlt_babylon_gateway_api_sdk4.FungibleResourcesCollectionItem[], AccountLockerNotFoundError | InvalidRequestError | EntityNotFoundError | InternalServerError | InvalidEntityError | InvalidTransactionError | NotSyncedUpError | TransactionNotFoundError | ErrorResponse | RateLimitExceededError | ResponseError | UnknownGatewayError, never>, effect_ConfigError1.ConfigError, GatewayApiClient>;
|
|
193
192
|
}>;
|
|
194
193
|
declare class EntityFungiblesPage extends EntityFungiblesPage_base {}
|
|
195
194
|
//#endregion
|
|
196
195
|
//#region src/state/nonFungibleData.d.ts
|
|
197
196
|
declare const NonFungibleData_base: Effect.Service.Class<NonFungibleData, "NonFungibleData", {
|
|
198
|
-
readonly
|
|
199
|
-
readonly effect: Effect.Effect<(this: unknown, input: Omit<_radixdlt_babylon_gateway_api_sdk6.StateNonFungibleDataRequest, "at_ledger_state"> & {
|
|
197
|
+
readonly effect: Effect.Effect<(this: unknown, input: Omit<_radixdlt_babylon_gateway_api_sdk4.StateNonFungibleDataRequest, "at_ledger_state"> & {
|
|
200
198
|
at_ledger_state: AtLedgerState;
|
|
201
|
-
}) => Effect.Effect<
|
|
199
|
+
}) => Effect.Effect<_radixdlt_babylon_gateway_api_sdk4.StateNonFungibleDetailsResponseItem[], AccountLockerNotFoundError | InvalidRequestError | EntityNotFoundError | InternalServerError | InvalidEntityError | InvalidTransactionError | NotSyncedUpError | TransactionNotFoundError | ErrorResponse | RateLimitExceededError | ResponseError | UnknownGatewayError, never>, effect_ConfigError1.ConfigError, GatewayApiClient>;
|
|
202
200
|
}>;
|
|
203
201
|
declare class NonFungibleData extends NonFungibleData_base {}
|
|
204
202
|
//#endregion
|
|
205
203
|
//#region src/state/entityNonFungiblesPage.d.ts
|
|
206
204
|
declare const EntityNonFungiblesPage_base: Effect.Service.Class<EntityNonFungiblesPage, "EntityNonFungiblesPage", {
|
|
207
|
-
readonly
|
|
208
|
-
readonly effect: Effect.Effect<(this: unknown, input: Omit<_radixdlt_babylon_gateway_api_sdk6.StateEntityNonFungiblesPageRequest, "at_ledger_state"> & {
|
|
205
|
+
readonly effect: Effect.Effect<(this: unknown, input: Omit<_radixdlt_babylon_gateway_api_sdk4.StateEntityNonFungiblesPageRequest, "at_ledger_state"> & {
|
|
209
206
|
at_ledger_state: AtLedgerState;
|
|
210
|
-
}) => Effect.Effect<
|
|
207
|
+
}) => Effect.Effect<_radixdlt_babylon_gateway_api_sdk4.StateEntityNonFungiblesPageResponse, AccountLockerNotFoundError | InvalidRequestError | EntityNotFoundError | InternalServerError | InvalidEntityError | InvalidTransactionError | NotSyncedUpError | TransactionNotFoundError | ErrorResponse | RateLimitExceededError | ResponseError | UnknownGatewayError, never>, effect_ConfigError1.ConfigError, GatewayApiClient>;
|
|
211
208
|
}>;
|
|
212
209
|
declare class EntityNonFungiblesPage extends EntityNonFungiblesPage_base {}
|
|
213
210
|
//#endregion
|
|
@@ -218,19 +215,18 @@ declare const ValidatorSchema: z.ZodObject<{
|
|
|
218
215
|
lsuResourceAddress: z.ZodString;
|
|
219
216
|
claimNftResourceAddress: z.ZodString;
|
|
220
217
|
}, "strip", z.ZodTypeAny, {
|
|
221
|
-
address: string;
|
|
222
218
|
name: string;
|
|
219
|
+
address: string;
|
|
223
220
|
lsuResourceAddress: string;
|
|
224
221
|
claimNftResourceAddress: string;
|
|
225
222
|
}, {
|
|
226
|
-
address: string;
|
|
227
223
|
name: string;
|
|
224
|
+
address: string;
|
|
228
225
|
lsuResourceAddress: string;
|
|
229
226
|
claimNftResourceAddress: string;
|
|
230
227
|
}>;
|
|
231
228
|
type Validator = z.infer<typeof ValidatorSchema>;
|
|
232
229
|
declare const GetValidators_base: Effect.Service.Class<GetValidators, "GetValidators", {
|
|
233
|
-
readonly dependencies: readonly [effect_Layer0.Layer<GatewayApiClient, never, never>];
|
|
234
230
|
readonly effect: Effect.Effect<(this: unknown) => Effect.Effect<{
|
|
235
231
|
address: string;
|
|
236
232
|
name: string;
|
|
@@ -246,12 +242,11 @@ type GetEntityDetailsInput = GetEntityDetailsVaultAggregatedParameters[0];
|
|
|
246
242
|
type GetEntityDetailsOptions = GetEntityDetailsVaultAggregatedParameters[1];
|
|
247
243
|
type GetEntityDetailsState = GetEntityDetailsVaultAggregatedParameters[2];
|
|
248
244
|
declare const GetEntityDetailsVaultAggregated_base: Effect.Service.Class<GetEntityDetailsVaultAggregated, "GetEntityDetailsVaultAggregated", {
|
|
249
|
-
readonly
|
|
250
|
-
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_sdk4.StateEntityDetailsOptions | undefined, at_ledger_state: {
|
|
251
246
|
state_version: number;
|
|
252
247
|
} | {
|
|
253
248
|
timestamp: Date;
|
|
254
|
-
}) => Effect.Effect<
|
|
249
|
+
}) => Effect.Effect<_radixdlt_babylon_gateway_api_sdk4.StateEntityDetailsVaultResponseItem[], AccountLockerNotFoundError | InvalidRequestError | EntityNotFoundError | InternalServerError | InvalidEntityError | InvalidTransactionError | NotSyncedUpError | TransactionNotFoundError | ErrorResponse | RateLimitExceededError | ResponseError | UnknownGatewayError, never>, effect_ConfigError1.ConfigError, GatewayApiClient>;
|
|
255
250
|
}>;
|
|
256
251
|
declare class GetEntityDetailsVaultAggregated extends GetEntityDetailsVaultAggregated_base {}
|
|
257
252
|
//#endregion
|
|
@@ -264,22 +259,20 @@ type GetNonFungibleIdsInput = {
|
|
|
264
259
|
cursor?: string;
|
|
265
260
|
};
|
|
266
261
|
declare const EntityNonFungibleIdsPage_base: Effect.Service.Class<EntityNonFungibleIdsPage, "EntityNonFungibleIdsPage", {
|
|
267
|
-
readonly dependencies: readonly [effect_Layer0.Layer<GatewayApiClient, never, never>];
|
|
268
262
|
readonly effect: Effect.Effect<(this: unknown, input: GetNonFungibleIdsInput) => Effect.Effect<{
|
|
269
263
|
ids: string[];
|
|
270
264
|
address: string;
|
|
271
|
-
}, AccountLockerNotFoundError | InvalidRequestError | EntityNotFoundError | InternalServerError | InvalidEntityError | InvalidTransactionError | NotSyncedUpError | TransactionNotFoundError | ErrorResponse | RateLimitExceededError | ResponseError | UnknownGatewayError, never>,
|
|
265
|
+
}, AccountLockerNotFoundError | InvalidRequestError | EntityNotFoundError | InternalServerError | InvalidEntityError | InvalidTransactionError | NotSyncedUpError | TransactionNotFoundError | ErrorResponse | RateLimitExceededError | ResponseError | UnknownGatewayError, never>, effect_ConfigError1.ConfigError, GatewayApiClient>;
|
|
272
266
|
}>;
|
|
273
267
|
declare class EntityNonFungibleIdsPage extends EntityNonFungibleIdsPage_base {}
|
|
274
268
|
//#endregion
|
|
275
269
|
//#region src/getNonFungibleLocation.d.ts
|
|
276
270
|
declare const GetNonFungibleLocationService_base: Effect.Service.Class<GetNonFungibleLocationService, "GetNonFungibleLocationService", {
|
|
277
|
-
readonly dependencies: readonly [effect_Layer0.Layer<GatewayApiClient, never, never>];
|
|
278
271
|
readonly effect: Effect.Effect<(this: unknown, input: {
|
|
279
272
|
resourceAddress: string;
|
|
280
273
|
nonFungibleIds: string[];
|
|
281
274
|
at_ledger_state: AtLedgerState;
|
|
282
|
-
}) => Effect.Effect<
|
|
275
|
+
}) => Effect.Effect<_radixdlt_babylon_gateway_api_sdk4.StateNonFungibleLocationResponse[], AccountLockerNotFoundError | InvalidRequestError | EntityNotFoundError | InternalServerError | InvalidEntityError | InvalidTransactionError | NotSyncedUpError | TransactionNotFoundError | ErrorResponse | RateLimitExceededError | ResponseError | UnknownGatewayError, never>, effect_ConfigError1.ConfigError, GatewayApiClient>;
|
|
283
276
|
}>;
|
|
284
277
|
declare class GetNonFungibleLocationService extends GetNonFungibleLocationService_base {}
|
|
285
278
|
//#endregion
|
|
@@ -296,7 +289,7 @@ type GetAddressByNonFungibleServiceInput = {
|
|
|
296
289
|
at_ledger_state: AtLedgerState;
|
|
297
290
|
};
|
|
298
291
|
declare const GetAddressByNonFungibleService_base: Effect.Service.Class<GetAddressByNonFungibleService, "GetAddressByNonFungibleService", {
|
|
299
|
-
readonly dependencies: readonly [effect_Layer0.Layer<GetNonFungibleLocationService,
|
|
292
|
+
readonly dependencies: readonly [effect_Layer0.Layer<GetNonFungibleLocationService, effect_ConfigError1.ConfigError, GatewayApiClient>];
|
|
300
293
|
readonly effect: Effect.Effect<(this: unknown, input: GetAddressByNonFungibleServiceInput) => Effect.Effect<{
|
|
301
294
|
address: string;
|
|
302
295
|
resourceAddress: string;
|
|
@@ -312,7 +305,7 @@ declare class InvalidComponentStateError {
|
|
|
312
305
|
constructor(error: unknown);
|
|
313
306
|
}
|
|
314
307
|
declare const GetComponentStateService_base: Effect.Service.Class<GetComponentStateService, "GetComponentStateService", {
|
|
315
|
-
readonly dependencies: readonly [effect_Layer0.Layer<GetEntityDetailsVaultAggregated,
|
|
308
|
+
readonly dependencies: readonly [effect_Layer0.Layer<GetEntityDetailsVaultAggregated, effect_ConfigError1.ConfigError, GatewayApiClient>];
|
|
316
309
|
readonly effect: Effect.Effect<{
|
|
317
310
|
run: <T extends StructDefinition, R extends boolean>(this: unknown, input: {
|
|
318
311
|
addresses: string[];
|
|
@@ -330,11 +323,10 @@ declare class GetComponentStateService extends GetComponentStateService_base {}
|
|
|
330
323
|
//#endregion
|
|
331
324
|
//#region src/state/stateEntityDetails.d.ts
|
|
332
325
|
declare const StateEntityDetails_base: Effect.Service.Class<StateEntityDetails, "StateEntityDetails", {
|
|
333
|
-
readonly
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
}, AccountLockerNotFoundError | InvalidRequestError | EntityNotFoundError | InternalServerError | InvalidEntityError | InvalidTransactionError | NotSyncedUpError | TransactionNotFoundError | ErrorResponse | RateLimitExceededError | ResponseError | UnknownGatewayError, never>, effect_ConfigError0.ConfigError, GatewayApiClient>;
|
|
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>;
|
|
338
330
|
}>;
|
|
339
331
|
declare class StateEntityDetails extends StateEntityDetails_base {}
|
|
340
332
|
//#endregion
|
|
@@ -345,16 +337,16 @@ type GetFungibleBalanceInput = Omit<StateEntityDetailsOperationRequest['stateEnt
|
|
|
345
337
|
options?: StateEntityDetailsOperationRequest['stateEntityDetailsRequest']['opt_ins'];
|
|
346
338
|
};
|
|
347
339
|
declare const GetFungibleBalance_base: Effect.Service.Class<GetFungibleBalance, "GetFungibleBalance", {
|
|
348
|
-
readonly dependencies: readonly [effect_Layer0.Layer<EntityFungiblesPage,
|
|
340
|
+
readonly dependencies: readonly [effect_Layer0.Layer<EntityFungiblesPage, effect_ConfigError1.ConfigError, GatewayApiClient>, effect_Layer0.Layer<StateEntityDetails, effect_ConfigError1.ConfigError, GatewayApiClient>];
|
|
349
341
|
readonly effect: Effect.Effect<(this: unknown, input: GetFungibleBalanceInput) => Effect.Effect<{
|
|
350
342
|
address: string;
|
|
351
343
|
items: {
|
|
352
344
|
amount: BigNumber;
|
|
353
345
|
resource_address: string;
|
|
354
|
-
explicit_metadata?:
|
|
346
|
+
explicit_metadata?: _radixdlt_babylon_gateway_api_sdk4.EntityMetadataCollection;
|
|
355
347
|
last_updated_at_state_version: number;
|
|
356
348
|
}[];
|
|
357
|
-
}[], AccountLockerNotFoundError | InvalidRequestError | EntityNotFoundError | InternalServerError | InvalidEntityError | InvalidTransactionError | NotSyncedUpError | TransactionNotFoundError | ErrorResponse | RateLimitExceededError | ResponseError | UnknownGatewayError, never>,
|
|
349
|
+
}[], AccountLockerNotFoundError | InvalidRequestError | EntityNotFoundError | InternalServerError | InvalidEntityError | InvalidTransactionError | NotSyncedUpError | TransactionNotFoundError | ErrorResponse | RateLimitExceededError | ResponseError | UnknownGatewayError, never>, effect_ConfigError1.ConfigError, EntityFungiblesPage | StateEntityDetails>;
|
|
358
350
|
}>;
|
|
359
351
|
declare class GetFungibleBalance extends GetFungibleBalance_base {}
|
|
360
352
|
//#endregion
|
|
@@ -363,29 +355,28 @@ declare const KeyValueStoreDataService_base: Effect.Service.Class<KeyValueStoreD
|
|
|
363
355
|
readonly dependencies: readonly [effect_Layer0.Layer<GatewayApiClient, never, never>];
|
|
364
356
|
readonly effect: Effect.Effect<(this: unknown, input: Omit<StateKeyValueStoreDataRequest, "at_ledger_state"> & {
|
|
365
357
|
at_ledger_state: AtLedgerState;
|
|
366
|
-
}) => Effect.Effect<
|
|
358
|
+
}) => Effect.Effect<_radixdlt_babylon_gateway_api_sdk4.StateKeyValueStoreDataResponse[], AccountLockerNotFoundError | InvalidRequestError | EntityNotFoundError | InternalServerError | InvalidEntityError | InvalidTransactionError | NotSyncedUpError | TransactionNotFoundError | ErrorResponse | RateLimitExceededError | ResponseError | UnknownGatewayError, never>, effect_ConfigError1.ConfigError, GatewayApiClient>;
|
|
367
359
|
}>;
|
|
368
360
|
declare class KeyValueStoreDataService extends KeyValueStoreDataService_base {}
|
|
369
361
|
//#endregion
|
|
370
362
|
//#region src/keyValueStoreKeys.d.ts
|
|
371
363
|
declare const KeyValueStoreKeysService_base: Effect.Service.Class<KeyValueStoreKeysService, "KeyValueStoreKeysService", {
|
|
372
|
-
readonly dependencies: readonly [effect_Layer0.Layer<GatewayApiClient, never, never>];
|
|
373
364
|
readonly effect: Effect.Effect<(this: unknown, input: Omit<StateKeyValueStoreKeysRequest, "at_ledger_state"> & {
|
|
374
365
|
at_ledger_state: AtLedgerState;
|
|
375
|
-
}) => Effect.Effect<
|
|
366
|
+
}) => Effect.Effect<_radixdlt_babylon_gateway_api_sdk4.StateKeyValueStoreKeysResponse, AccountLockerNotFoundError | InvalidRequestError | EntityNotFoundError | InternalServerError | InvalidEntityError | InvalidTransactionError | NotSyncedUpError | TransactionNotFoundError | ErrorResponse | RateLimitExceededError | ResponseError | UnknownGatewayError, never>, effect_ConfigError1.ConfigError, GatewayApiClient>;
|
|
376
367
|
}>;
|
|
377
368
|
declare class KeyValueStoreKeysService extends KeyValueStoreKeysService_base {}
|
|
378
369
|
//#endregion
|
|
379
370
|
//#region src/getKeyValueStore.d.ts
|
|
380
371
|
declare const GetKeyValueStoreService_base: Effect.Service.Class<GetKeyValueStoreService, "GetKeyValueStoreService", {
|
|
381
|
-
readonly dependencies: readonly [effect_Layer0.Layer<KeyValueStoreKeysService,
|
|
372
|
+
readonly dependencies: readonly [effect_Layer0.Layer<KeyValueStoreKeysService, effect_ConfigError1.ConfigError, GatewayApiClient>, effect_Layer0.Layer<KeyValueStoreDataService, effect_ConfigError1.ConfigError, never>];
|
|
382
373
|
readonly effect: Effect.Effect<(this: unknown, input: {
|
|
383
374
|
address: string;
|
|
384
375
|
at_ledger_state: AtLedgerState;
|
|
385
376
|
}) => Effect.Effect<{
|
|
386
377
|
key_value_store_address: string;
|
|
387
|
-
ledger_state:
|
|
388
|
-
entries:
|
|
378
|
+
ledger_state: _radixdlt_babylon_gateway_api_sdk4.LedgerState;
|
|
379
|
+
entries: _radixdlt_babylon_gateway_api_sdk4.StateKeyValueStoreDataResponseItem[];
|
|
389
380
|
}, AccountLockerNotFoundError | InvalidRequestError | EntityNotFoundError | InternalServerError | InvalidEntityError | InvalidTransactionError | NotSyncedUpError | TransactionNotFoundError | ErrorResponse | RateLimitExceededError | ResponseError | UnknownGatewayError, never>, never, KeyValueStoreKeysService | KeyValueStoreDataService>;
|
|
390
381
|
}>;
|
|
391
382
|
declare class GetKeyValueStoreService extends GetKeyValueStoreService_base {}
|
|
@@ -395,8 +386,7 @@ type GetLedgerStateInput = {
|
|
|
395
386
|
at_ledger_state: AtLedgerState;
|
|
396
387
|
};
|
|
397
388
|
declare const GetLedgerStateService_base: Effect.Service.Class<GetLedgerStateService, "GetLedgerStateService", {
|
|
398
|
-
readonly
|
|
399
|
-
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>;
|
|
389
|
+
readonly effect: Effect.Effect<(this: unknown, input: GetLedgerStateInput) => Effect.Effect<_radixdlt_babylon_gateway_api_sdk4.LedgerState, AccountLockerNotFoundError | InvalidRequestError | EntityNotFoundError | InternalServerError | InvalidEntityError | InvalidTransactionError | NotSyncedUpError | TransactionNotFoundError | ErrorResponse | RateLimitExceededError | ResponseError | UnknownGatewayError, never>, never, GatewayApiClient>;
|
|
400
390
|
}>;
|
|
401
391
|
declare class GetLedgerStateService extends GetLedgerStateService_base {}
|
|
402
392
|
//#endregion
|
|
@@ -408,14 +398,14 @@ type GetNftResourceManagersInput = {
|
|
|
408
398
|
options?: StateEntityDetailsOperationRequest['stateEntityDetailsRequest']['opt_ins'];
|
|
409
399
|
};
|
|
410
400
|
declare const GetNftResourceManagersService_base: Effect.Service.Class<GetNftResourceManagersService, "GetNftResourceManagersService", {
|
|
411
|
-
readonly dependencies: readonly [effect_Layer0.Layer<GatewayApiClient, never, never>, effect_Layer0.Layer<EntityNonFungiblesPage,
|
|
401
|
+
readonly dependencies: readonly [effect_Layer0.Layer<GatewayApiClient, never, never>, effect_Layer0.Layer<EntityNonFungiblesPage, effect_ConfigError1.ConfigError, GatewayApiClient>, effect_Layer0.Layer<EntityNonFungibleIdsPage, effect_ConfigError1.ConfigError, GatewayApiClient>];
|
|
412
402
|
readonly effect: Effect.Effect<(this: unknown, input: GetNftResourceManagersInput) => Effect.Effect<{
|
|
413
403
|
address: string;
|
|
414
404
|
items: {
|
|
415
405
|
resourceAddress: string;
|
|
416
406
|
nftIds: string[];
|
|
417
407
|
}[];
|
|
418
|
-
}[], AccountLockerNotFoundError | InvalidRequestError | EntityNotFoundError | InternalServerError | InvalidEntityError | InvalidTransactionError | NotSyncedUpError | TransactionNotFoundError | ErrorResponse | RateLimitExceededError | ResponseError | UnknownGatewayError, never>,
|
|
408
|
+
}[], AccountLockerNotFoundError | InvalidRequestError | EntityNotFoundError | InternalServerError | InvalidEntityError | InvalidTransactionError | NotSyncedUpError | TransactionNotFoundError | ErrorResponse | RateLimitExceededError | ResponseError | UnknownGatewayError, never>, effect_ConfigError1.ConfigError, EntityNonFungiblesPage | GatewayApiClient | EntityNonFungibleIdsPage>;
|
|
419
409
|
}>;
|
|
420
410
|
declare class GetNftResourceManagersService extends GetNftResourceManagersService_base {}
|
|
421
411
|
//#endregion
|
|
@@ -433,7 +423,7 @@ type GetNonFungibleBalanceInput = {
|
|
|
433
423
|
};
|
|
434
424
|
type GetNonFungibleBalanceOutput = Effect.Effect.Success<Awaited<ReturnType<(typeof GetNonFungibleBalanceService)['Service']>>>;
|
|
435
425
|
declare const GetNonFungibleBalanceService_base: Effect.Service.Class<GetNonFungibleBalanceService, "GetNonFungibleBalanceService", {
|
|
436
|
-
readonly dependencies: readonly [effect_Layer0.Layer<NonFungibleData,
|
|
426
|
+
readonly dependencies: readonly [effect_Layer0.Layer<NonFungibleData, effect_ConfigError1.ConfigError, GatewayApiClient>, effect_Layer0.Layer<GetNftResourceManagersService, effect_ConfigError1.ConfigError, GatewayApiClient>];
|
|
437
427
|
readonly effect: Effect.Effect<(this: unknown, input: GetNonFungibleBalanceInput) => Effect.Effect<{
|
|
438
428
|
items: {
|
|
439
429
|
address: string;
|
|
@@ -442,12 +432,12 @@ declare const GetNonFungibleBalanceService_base: Effect.Service.Class<GetNonFung
|
|
|
442
432
|
items: {
|
|
443
433
|
id: string;
|
|
444
434
|
lastUpdatedStateVersion: number;
|
|
445
|
-
sbor:
|
|
435
|
+
sbor: _radixdlt_babylon_gateway_api_sdk4.ProgrammaticScryptoSborValue | undefined;
|
|
446
436
|
isBurned: boolean;
|
|
447
437
|
}[];
|
|
448
438
|
}[];
|
|
449
439
|
}[];
|
|
450
|
-
}, AccountLockerNotFoundError | InvalidRequestError | EntityNotFoundError | InternalServerError | InvalidEntityError | InvalidTransactionError | NotSyncedUpError | TransactionNotFoundError | ErrorResponse | RateLimitExceededError | ResponseError | UnknownGatewayError, never>,
|
|
440
|
+
}, AccountLockerNotFoundError | InvalidRequestError | EntityNotFoundError | InternalServerError | InvalidEntityError | InvalidTransactionError | NotSyncedUpError | TransactionNotFoundError | ErrorResponse | RateLimitExceededError | ResponseError | UnknownGatewayError, never>, effect_ConfigError1.ConfigError, NonFungibleData | GetNftResourceManagersService>;
|
|
451
441
|
}>;
|
|
452
442
|
declare class GetNonFungibleBalanceService extends GetNonFungibleBalanceService_base {}
|
|
453
443
|
//#endregion
|
|
@@ -516,7 +506,6 @@ type PersonaProof = typeof PersonaProofSchema.Type;
|
|
|
516
506
|
type AccountProof = typeof AccountProofSchema.Type;
|
|
517
507
|
type RolaProof = typeof RolaProofSchema.Type;
|
|
518
508
|
declare const Rola_base: Effect.Service.Class<Rola, "Rola", {
|
|
519
|
-
readonly dependencies: readonly [effect_Layer0.Layer<GatewayApiClient, never, never>];
|
|
520
509
|
readonly effect: Effect.Effect<{
|
|
521
510
|
verifySignedChallenge: (input: RolaProof) => Effect.Effect<undefined, VerifyRolaProofError, never>;
|
|
522
511
|
}, never, GatewayApiClient>;
|
|
@@ -693,4 +682,19 @@ interface ScryptoSborValueEnum {
|
|
|
693
682
|
type ScryptoSborValueSchema = ScryptoSborValueBool | ScryptoSborValueString | ScryptoSborValueBytes | ScryptoSborValueDecimal | ScryptoSborValuePreciseDecimal | ScryptoSborValueReference | ScryptoSborValueOwn | ScryptoSborValueNonFungibleLocalId | ScryptoSborValueI8 | ScryptoSborValueI16 | ScryptoSborValueI32 | ScryptoSborValueI64 | ScryptoSborValueI128 | ScryptoSborValueU8 | ScryptoSborValueU16 | ScryptoSborValueU32 | ScryptoSborValueU64 | ScryptoSborValueU128 | ScryptoSborValueArray | ScryptoSborValueMap | ScryptoSborValueTuple | ScryptoSborValueEnum;
|
|
694
683
|
declare const ScryptoSborValueSchema: Schema.Schema<ScryptoSborValueSchema>;
|
|
695
684
|
//#endregion
|
|
696
|
-
|
|
685
|
+
//#region src/previewTransaction.d.ts
|
|
686
|
+
declare const TransactionPreviewError_base: new <A extends Record<string, any> = {}>(args: effect_Types0.Equals<A, {}> extends true ? void : { readonly [P in keyof A as P extends "_tag" ? never : P]: A[P] }) => effect_Cause0.YieldableError & {
|
|
687
|
+
readonly _tag: "TransactionPreviewError";
|
|
688
|
+
} & Readonly<A>;
|
|
689
|
+
declare class TransactionPreviewError extends TransactionPreviewError_base<{
|
|
690
|
+
message?: string;
|
|
691
|
+
}> {}
|
|
692
|
+
declare const PreviewTransaction_base: Effect.Service.Class<PreviewTransaction, "PreviewTransaction", {
|
|
693
|
+
readonly dependencies: readonly [effect_Layer0.Layer<GatewayApiClient, never, never>];
|
|
694
|
+
readonly effect: Effect.Effect<(this: unknown, input: {
|
|
695
|
+
payload: TransactionPreviewOperationRequest["transactionPreviewRequest"];
|
|
696
|
+
}) => Effect.Effect<_radixdlt_babylon_gateway_api_sdk4.TransactionPreviewResponse, AccountLockerNotFoundError | InvalidRequestError | EntityNotFoundError | InternalServerError | InvalidEntityError | InvalidTransactionError | NotSyncedUpError | TransactionNotFoundError | ErrorResponse | RateLimitExceededError | ResponseError | UnknownGatewayError | TransactionPreviewError, never>, never, GatewayApiClient>;
|
|
697
|
+
}>;
|
|
698
|
+
declare class PreviewTransaction extends PreviewTransaction_base {}
|
|
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 };
|
package/dist/index.js
CHANGED
|
@@ -91,7 +91,7 @@ var GatewayApiClient = class extends Effect.Service()("GatewayApiClient", { effe
|
|
|
91
91
|
}
|
|
92
92
|
}).pipe(Effect.tapError((error) => Effect.gen(function* () {
|
|
93
93
|
if (error._tag === "RateLimitExceededError") {
|
|
94
|
-
yield* Effect.
|
|
94
|
+
yield* Effect.logWarning(`Rate limit exceeded, retrying in ${error.retryAfter} seconds`);
|
|
95
95
|
yield* Effect.sleep(Duration.seconds(error.retryAfter));
|
|
96
96
|
}
|
|
97
97
|
})), Effect.retry({ while: (error) => error._tag === "RateLimitExceededError" }));
|
|
@@ -134,33 +134,30 @@ var GatewayApiClient = class extends Effect.Service()("GatewayApiClient", { effe
|
|
|
134
134
|
|
|
135
135
|
//#endregion
|
|
136
136
|
//#region src/state/entityFungiblesPage.ts
|
|
137
|
-
var EntityFungiblesPage = class extends Effect.Service()("EntityFungiblesPage", {
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
137
|
+
var EntityFungiblesPage = class extends Effect.Service()("EntityFungiblesPage", { effect: Effect.gen(function* () {
|
|
138
|
+
const gatewayClient = yield* GatewayApiClient;
|
|
139
|
+
const pageSize = yield* Config.number("GatewayApi__Endpoint__MaxPageSize").pipe(Config.withDefault(100));
|
|
140
|
+
const entityFungiblesPage = Effect.fnUntraced(function* (input) {
|
|
141
|
+
return yield* gatewayClient.state.innerClient.entityFungiblesPage({ stateEntityFungiblesPageRequest: {
|
|
142
|
+
...input,
|
|
143
|
+
limit_per_page: pageSize
|
|
144
|
+
} });
|
|
145
|
+
});
|
|
146
|
+
return Effect.fnUntraced(function* (input) {
|
|
147
|
+
const result = yield* entityFungiblesPage(input);
|
|
148
|
+
let nextCursor = result?.next_cursor;
|
|
149
|
+
const items = result?.items ?? [];
|
|
150
|
+
while (nextCursor) {
|
|
151
|
+
const result$1 = yield* entityFungiblesPage({
|
|
144
152
|
...input,
|
|
145
|
-
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
const result$1 = yield* entityFungiblesPage({
|
|
154
|
-
...input,
|
|
155
|
-
cursor: nextCursor
|
|
156
|
-
});
|
|
157
|
-
nextCursor = result$1.next_cursor;
|
|
158
|
-
items.push(...result$1.items);
|
|
159
|
-
}
|
|
160
|
-
return items;
|
|
161
|
-
});
|
|
162
|
-
})
|
|
163
|
-
}) {};
|
|
153
|
+
cursor: nextCursor
|
|
154
|
+
});
|
|
155
|
+
nextCursor = result$1.next_cursor;
|
|
156
|
+
items.push(...result$1.items);
|
|
157
|
+
}
|
|
158
|
+
return items;
|
|
159
|
+
});
|
|
160
|
+
}) }) {};
|
|
164
161
|
|
|
165
162
|
//#endregion
|
|
166
163
|
//#region src/helpers/chunker.ts
|
|
@@ -175,40 +172,34 @@ const chunker = (array, size) => {
|
|
|
175
172
|
|
|
176
173
|
//#endregion
|
|
177
174
|
//#region src/state/nonFungibleData.ts
|
|
178
|
-
var NonFungibleData = class extends Effect.Service()("NonFungibleData", {
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
const
|
|
183
|
-
return Effect.fnUntraced(function* (
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
});
|
|
194
|
-
})
|
|
195
|
-
}) {};
|
|
175
|
+
var NonFungibleData = class extends Effect.Service()("NonFungibleData", { effect: Effect.gen(function* () {
|
|
176
|
+
const gatewayClient = yield* GatewayApiClient;
|
|
177
|
+
const pageSize = yield* Config.number("GatewayApi__Endpoint__MaxPageSize").pipe(Config.withDefault(100));
|
|
178
|
+
return Effect.fnUntraced(function* (input) {
|
|
179
|
+
const chunks = chunker(input.non_fungible_ids, pageSize);
|
|
180
|
+
return yield* Effect.forEach(chunks, Effect.fnUntraced(function* (chunk) {
|
|
181
|
+
return yield* gatewayClient.state.innerClient.nonFungibleData({ stateNonFungibleDataRequest: {
|
|
182
|
+
...input,
|
|
183
|
+
non_fungible_ids: chunk
|
|
184
|
+
} });
|
|
185
|
+
})).pipe(Effect.map((res) => {
|
|
186
|
+
return res.flatMap((item) => item.non_fungible_ids);
|
|
187
|
+
}));
|
|
188
|
+
});
|
|
189
|
+
}) }) {};
|
|
196
190
|
|
|
197
191
|
//#endregion
|
|
198
192
|
//#region src/state/entityNonFungiblesPage.ts
|
|
199
|
-
var EntityNonFungiblesPage = class extends Effect.Service()("EntityNonFungiblesPage", {
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
});
|
|
210
|
-
})
|
|
211
|
-
}) {};
|
|
193
|
+
var EntityNonFungiblesPage = class extends Effect.Service()("EntityNonFungiblesPage", { effect: Effect.gen(function* () {
|
|
194
|
+
const gatewayClient = yield* GatewayApiClient;
|
|
195
|
+
const pageSize = yield* Config.number("GatewayApi__Endpoint__MaxPageSize").pipe(Config.withDefault(100));
|
|
196
|
+
return Effect.fnUntraced(function* (input) {
|
|
197
|
+
return yield* gatewayClient.state.innerClient.entityNonFungiblesPage({ stateEntityNonFungiblesPageRequest: {
|
|
198
|
+
...input,
|
|
199
|
+
limit_per_page: pageSize
|
|
200
|
+
} });
|
|
201
|
+
});
|
|
202
|
+
}) }) {};
|
|
212
203
|
|
|
213
204
|
//#endregion
|
|
214
205
|
//#region src/state/getValidators.ts
|
|
@@ -218,102 +209,90 @@ const ValidatorSchema = z.object({
|
|
|
218
209
|
lsuResourceAddress: z.string(),
|
|
219
210
|
claimNftResourceAddress: z.string()
|
|
220
211
|
});
|
|
221
|
-
var GetValidators = class extends Effect.Service()("GetValidators", {
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
lsuResourceAddress: "",
|
|
236
|
-
claimNftResourceAddress: ""
|
|
237
|
-
});
|
|
238
|
-
return {
|
|
239
|
-
address,
|
|
240
|
-
name,
|
|
241
|
-
lsuResourceAddress,
|
|
242
|
-
claimNftResourceAddress
|
|
243
|
-
};
|
|
212
|
+
var GetValidators = class extends Effect.Service()("GetValidators", { effect: Effect.gen(function* () {
|
|
213
|
+
const gatewayClient = yield* GatewayApiClient;
|
|
214
|
+
return Effect.fn(function* () {
|
|
215
|
+
return (yield* gatewayClient.state.getValidators()).items.map((item) => {
|
|
216
|
+
const address = item.address;
|
|
217
|
+
const { name, lsuResourceAddress, claimNftResourceAddress } = item.metadata.items.reduce((acc, curr) => {
|
|
218
|
+
if (curr.key === "name" && curr.value.typed.type === "String") acc.name = curr.value.typed.value;
|
|
219
|
+
if (curr.key === "pool_unit" && curr.value.typed.type === "GlobalAddress") acc.lsuResourceAddress = curr.value.typed.value;
|
|
220
|
+
if (curr.key === "claim_nft" && curr.value.typed.type === "GlobalAddress") acc.claimNftResourceAddress = curr.value.typed.value;
|
|
221
|
+
return acc;
|
|
222
|
+
}, {
|
|
223
|
+
name: "",
|
|
224
|
+
lsuResourceAddress: "",
|
|
225
|
+
claimNftResourceAddress: ""
|
|
244
226
|
});
|
|
227
|
+
return {
|
|
228
|
+
address,
|
|
229
|
+
name,
|
|
230
|
+
lsuResourceAddress,
|
|
231
|
+
claimNftResourceAddress
|
|
232
|
+
};
|
|
245
233
|
});
|
|
246
|
-
})
|
|
247
|
-
}) {};
|
|
234
|
+
});
|
|
235
|
+
}) }) {};
|
|
248
236
|
|
|
249
237
|
//#endregion
|
|
250
238
|
//#region src/state/getEntityDetailsVaultAggregated.ts
|
|
251
|
-
var GetEntityDetailsVaultAggregated = class extends Effect.Service()("GetEntityDetailsVaultAggregated", {
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
const
|
|
256
|
-
return Effect.
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
});
|
|
262
|
-
})
|
|
263
|
-
}) {};
|
|
239
|
+
var GetEntityDetailsVaultAggregated = class extends Effect.Service()("GetEntityDetailsVaultAggregated", { effect: Effect.gen(function* () {
|
|
240
|
+
const gatewayClient = yield* GatewayApiClient;
|
|
241
|
+
const pageSize = yield* Config.number("GatewayApi__Endpoint__StateEntityDetailsPageSize").pipe(Config.withDefault(20));
|
|
242
|
+
return Effect.fnUntraced(function* (input, options, at_ledger_state) {
|
|
243
|
+
const chunks = chunker(input, pageSize);
|
|
244
|
+
return yield* Effect.forEach(chunks, Effect.fn(function* (addresses) {
|
|
245
|
+
return yield* gatewayClient.state.getEntityDetailsVaultAggregated(addresses, options, at_ledger_state);
|
|
246
|
+
})).pipe(Effect.map((res) => res.flat()));
|
|
247
|
+
});
|
|
248
|
+
}) }) {};
|
|
264
249
|
|
|
265
250
|
//#endregion
|
|
266
251
|
//#region src/state/entityNonFungibleIdsPage.ts
|
|
267
|
-
var EntityNonFungibleIdsPage = class extends Effect.Service()("EntityNonFungibleIdsPage", {
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
const
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
const
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
});
|
|
295
|
-
})
|
|
296
|
-
}) {};
|
|
252
|
+
var EntityNonFungibleIdsPage = class extends Effect.Service()("EntityNonFungibleIdsPage", { effect: Effect.gen(function* () {
|
|
253
|
+
const gatewayClient = yield* GatewayApiClient;
|
|
254
|
+
const pageSize = yield* Config.number("GatewayApi__Endpoint__StateEntityDetailsPageSize").pipe(Config.withDefault(100));
|
|
255
|
+
return Effect.fn(function* (input) {
|
|
256
|
+
const makeRequest = (cursor) => gatewayClient.state.innerClient.entityNonFungibleIdsPage({ stateEntityNonFungibleIdsPageRequest: {
|
|
257
|
+
resource_address: input.resourceAddress,
|
|
258
|
+
vault_address: input.vaultAddress,
|
|
259
|
+
address: input.address,
|
|
260
|
+
at_ledger_state: input.at_ledger_state,
|
|
261
|
+
cursor,
|
|
262
|
+
limit_per_page: pageSize
|
|
263
|
+
} });
|
|
264
|
+
const result = yield* makeRequest(input.cursor);
|
|
265
|
+
let next_cursor = result.next_cursor;
|
|
266
|
+
const totalCount = result.total_count ?? 0;
|
|
267
|
+
const ids = [...result.items];
|
|
268
|
+
while (next_cursor && totalCount > 0) {
|
|
269
|
+
const result$1 = yield* makeRequest(next_cursor);
|
|
270
|
+
ids.push(...result$1.items);
|
|
271
|
+
next_cursor = result$1.next_cursor;
|
|
272
|
+
}
|
|
273
|
+
return {
|
|
274
|
+
ids,
|
|
275
|
+
address: input.address
|
|
276
|
+
};
|
|
277
|
+
});
|
|
278
|
+
}) }) {};
|
|
297
279
|
|
|
298
280
|
//#endregion
|
|
299
281
|
//#region src/getNonFungibleLocation.ts
|
|
300
|
-
var GetNonFungibleLocationService = class extends Effect.Service()("GetNonFungibleLocationService", {
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
const
|
|
305
|
-
return Effect.fn(function* (
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
});
|
|
315
|
-
})
|
|
316
|
-
}) {};
|
|
282
|
+
var GetNonFungibleLocationService = class extends Effect.Service()("GetNonFungibleLocationService", { effect: Effect.gen(function* () {
|
|
283
|
+
const gatewayClient = yield* GatewayApiClient;
|
|
284
|
+
const pageSize = yield* Config.number("GatewayApi__Endpoint__MaxPageSize").pipe(Config.withDefault(100));
|
|
285
|
+
return Effect.fn(function* (input) {
|
|
286
|
+
const chunks = chunker(input.nonFungibleIds, pageSize);
|
|
287
|
+
return yield* Effect.forEach(chunks, Effect.fn(function* (nonFungibleIds) {
|
|
288
|
+
return yield* gatewayClient.state.innerClient.nonFungibleLocation({ stateNonFungibleLocationRequest: {
|
|
289
|
+
non_fungible_ids: nonFungibleIds,
|
|
290
|
+
resource_address: input.resourceAddress,
|
|
291
|
+
at_ledger_state: input.at_ledger_state
|
|
292
|
+
} });
|
|
293
|
+
})).pipe(Effect.map((res) => res.flat()));
|
|
294
|
+
});
|
|
295
|
+
}) }) {};
|
|
317
296
|
|
|
318
297
|
//#endregion
|
|
319
298
|
//#region src/getAddressByNonFungible.ts
|
|
@@ -380,28 +359,25 @@ var GetComponentStateService = class extends Effect.Service()("GetComponentState
|
|
|
380
359
|
|
|
381
360
|
//#endregion
|
|
382
361
|
//#region src/state/stateEntityDetails.ts
|
|
383
|
-
var StateEntityDetails = class extends Effect.Service()("StateEntityDetails", {
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
const
|
|
389
|
-
return Effect.fnUntraced(function* (
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
});
|
|
403
|
-
})
|
|
404
|
-
}) {};
|
|
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
|
+
}) }) {};
|
|
405
381
|
|
|
406
382
|
//#endregion
|
|
407
383
|
//#region src/getFungibleBalance.ts
|
|
@@ -473,19 +449,16 @@ var KeyValueStoreDataService = class extends Effect.Service()("KeyValueStoreData
|
|
|
473
449
|
|
|
474
450
|
//#endregion
|
|
475
451
|
//#region src/keyValueStoreKeys.ts
|
|
476
|
-
var KeyValueStoreKeysService = class extends Effect.Service()("KeyValueStoreKeysService", {
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
});
|
|
487
|
-
})
|
|
488
|
-
}) {};
|
|
452
|
+
var KeyValueStoreKeysService = class extends Effect.Service()("KeyValueStoreKeysService", { effect: Effect.gen(function* () {
|
|
453
|
+
const gatewayClient = yield* GatewayApiClient;
|
|
454
|
+
const pageSize = yield* Config.number("GatewayApi__Endpoint__MaxPageSize").pipe(Config.withDefault(100));
|
|
455
|
+
return Effect.fn(function* (input) {
|
|
456
|
+
return yield* gatewayClient.state.innerClient.keyValueStoreKeys({ stateKeyValueStoreKeysRequest: {
|
|
457
|
+
...input,
|
|
458
|
+
limit_per_page: pageSize
|
|
459
|
+
} });
|
|
460
|
+
});
|
|
461
|
+
}) }) {};
|
|
489
462
|
|
|
490
463
|
//#endregion
|
|
491
464
|
//#region src/getKeyValueStore.ts
|
|
@@ -528,18 +501,15 @@ var GetKeyValueStoreService = class extends Effect.Service()("GetKeyValueStoreSe
|
|
|
528
501
|
|
|
529
502
|
//#endregion
|
|
530
503
|
//#region src/getLedgerState.ts
|
|
531
|
-
var GetLedgerStateService = class extends Effect.Service()("GetLedgerStateService", {
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
});
|
|
541
|
-
})
|
|
542
|
-
}) {};
|
|
504
|
+
var GetLedgerStateService = class extends Effect.Service()("GetLedgerStateService", { effect: Effect.gen(function* () {
|
|
505
|
+
const gatewayClient = yield* GatewayApiClient;
|
|
506
|
+
return Effect.fn("getLedgerStateService")(function* (input) {
|
|
507
|
+
return (yield* gatewayClient.stream.innerClient.streamTransactions({ streamTransactionsRequest: {
|
|
508
|
+
limit_per_page: 1,
|
|
509
|
+
at_ledger_state: input.at_ledger_state
|
|
510
|
+
} })).ledger_state;
|
|
511
|
+
});
|
|
512
|
+
}) }) {};
|
|
543
513
|
|
|
544
514
|
//#endregion
|
|
545
515
|
//#region src/getNftResourceManagers.ts
|
|
@@ -796,22 +766,23 @@ const AccountProofSchema = Schema.Struct({
|
|
|
796
766
|
proof: ProofSchema
|
|
797
767
|
});
|
|
798
768
|
const RolaProofSchema = Schema.Union(PersonaProofSchema, AccountProofSchema);
|
|
799
|
-
var Rola = class extends Effect.Service()("Rola", {
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
})
|
|
769
|
+
var Rola = class extends Effect.Service()("Rola", { effect: Effect.gen(function* () {
|
|
770
|
+
const applicationName = yield* Config.string("APPLICATION_NAME").pipe(Config.withDefault("@radix-effects/gateway")).pipe(Effect.orDie);
|
|
771
|
+
const dAppDefinitionAddress = yield* Config.string("DAPP_DEFINITION_ADDRESS").pipe(Effect.orDie);
|
|
772
|
+
const expectedOrigin = yield* Config.string("ROLA_EXPECTED_ORIGIN").pipe(Effect.orDie);
|
|
773
|
+
const gatewayApiClient = yield* GatewayApiClient;
|
|
774
|
+
const { verifySignedChallenge } = Rola$1({
|
|
775
|
+
networkId: gatewayApiClient.networkId,
|
|
776
|
+
applicationName,
|
|
777
|
+
dAppDefinitionAddress,
|
|
778
|
+
expectedOrigin,
|
|
779
|
+
gatewayApiClient: gatewayApiClient.rawClient
|
|
780
|
+
});
|
|
781
|
+
return { verifySignedChallenge: (input) => Effect.gen(function* () {
|
|
782
|
+
const result = yield* Effect.tryPromise(() => verifySignedChallenge(input)).pipe(Effect.catchTag("UnknownException", Effect.orDie));
|
|
783
|
+
if (result.isErr()) return yield* new VerifyRolaProofError({ error: result.error });
|
|
784
|
+
}) };
|
|
785
|
+
}) }) {};
|
|
815
786
|
|
|
816
787
|
//#endregion
|
|
817
788
|
//#region src/sbor.ts
|
|
@@ -947,4 +918,20 @@ const ScryptoSborValueEnumSchema = Schema.suspend(() => Schema.Struct({
|
|
|
947
918
|
const ScryptoSborValueSchema = Schema.Union(ScryptoSborValueBool, ScryptoSborValueString, ScryptoSborValueBytes, ScryptoSborValueDecimal, ScryptoSborValuePreciseDecimal, ScryptoSborValueReference, ScryptoSborValueOwn, ScryptoSborValueNonFungibleLocalId, ScryptoSborValueI8, ScryptoSborValueI16, ScryptoSborValueI32, ScryptoSborValueI64, ScryptoSborValueI128, ScryptoSborValueU8, ScryptoSborValueU16, ScryptoSborValueU32, ScryptoSborValueU64, ScryptoSborValueU128, ScryptoSborValueArraySchema, ScryptoSborValueMapSchema, ScryptoSborValueTupleSchema, ScryptoSborValueEnumSchema);
|
|
948
919
|
|
|
949
920
|
//#endregion
|
|
950
|
-
|
|
921
|
+
//#region src/previewTransaction.ts
|
|
922
|
+
var TransactionPreviewError = class extends Data.TaggedError("TransactionPreviewError") {};
|
|
923
|
+
var PreviewTransaction = class extends Effect.Service()("PreviewTransaction", {
|
|
924
|
+
dependencies: [GatewayApiClient.Default],
|
|
925
|
+
effect: Effect.gen(function* () {
|
|
926
|
+
const gatewayApiClient = yield* GatewayApiClient;
|
|
927
|
+
return Effect.fnUntraced(function* (input) {
|
|
928
|
+
const result = yield* gatewayApiClient.transaction.innerClient.transactionPreview({ transactionPreviewRequest: input.payload });
|
|
929
|
+
const receipt = result.receipt;
|
|
930
|
+
if (receipt.status !== "Succeeded") return yield* new TransactionPreviewError({ message: receipt.error_message });
|
|
931
|
+
return result;
|
|
932
|
+
});
|
|
933
|
+
})
|
|
934
|
+
}) {};
|
|
935
|
+
|
|
936
|
+
//#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 };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@radix-effects/gateway",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -28,6 +28,7 @@
|
|
|
28
28
|
"bignumber.js": "^9.2.1",
|
|
29
29
|
"effect": "^3.14.1",
|
|
30
30
|
"zod": "^3.24.1",
|
|
31
|
+
"@radixdlt/babylon-core-api-sdk": "^1.2.3",
|
|
31
32
|
"sbor-ez-mode": "0.2.0"
|
|
32
33
|
},
|
|
33
34
|
"files": [
|