@radix-effects/gateway 0.3.1 → 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 +72 -67
- package/dist/index.js +195 -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_ConfigError17 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
|
|
@@ -90,25 +90,26 @@ declare class UnknownGatewayError extends UnknownGatewayError_base<{
|
|
|
90
90
|
}> {}
|
|
91
91
|
declare const GatewayApiClient_base: Effect.Service.Class<GatewayApiClient, "GatewayApiClient", {
|
|
92
92
|
readonly effect: Effect.Effect<{
|
|
93
|
+
networkId: number;
|
|
93
94
|
state: {
|
|
94
|
-
getEntityDetailsVaultAggregated: (addresses: string[], options?:
|
|
95
|
-
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>;
|
|
96
97
|
innerClient: {
|
|
97
|
-
stateEntityDetails: (requestParameters:
|
|
98
|
-
entityFungiblesPage: (requestParameters:
|
|
99
|
-
entityNonFungiblesPage: (requestParameters:
|
|
100
|
-
entityNonFungibleIdsPage: (requestParameters:
|
|
101
|
-
entityNonFungibleResourceVaultPage: (requestParameters:
|
|
102
|
-
keyValueStoreKeys: (requestParameters:
|
|
103
|
-
keyValueStoreData: (requestParameters:
|
|
104
|
-
nonFungibleData: (requestParameters:
|
|
105
|
-
nonFungibleLocation: (requestParameters:
|
|
106
|
-
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>;
|
|
107
108
|
};
|
|
108
109
|
};
|
|
109
110
|
stream: {
|
|
110
111
|
innerClient: {
|
|
111
|
-
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>;
|
|
112
113
|
};
|
|
113
114
|
};
|
|
114
115
|
transaction: {
|
|
@@ -124,21 +125,21 @@ declare const GatewayApiClient_base: Effect.Service.Class<GatewayApiClient, "Gat
|
|
|
124
125
|
balanceChanges: boolean;
|
|
125
126
|
receiptOutput: boolean;
|
|
126
127
|
manifestInstructions: boolean;
|
|
127
|
-
} | 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>;
|
|
128
129
|
innerClient: {
|
|
129
|
-
transactionSubmit: (requestParameters:
|
|
130
|
-
transactionStatus: (requestParameters:
|
|
131
|
-
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>;
|
|
132
133
|
};
|
|
133
134
|
};
|
|
134
135
|
status: {
|
|
135
|
-
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>;
|
|
136
137
|
innerClient: {
|
|
137
|
-
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>;
|
|
138
139
|
};
|
|
139
140
|
};
|
|
140
141
|
extensions: {
|
|
141
|
-
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>;
|
|
142
143
|
};
|
|
143
144
|
rawClient: GatewayApiClient$1;
|
|
144
145
|
}, never, never>;
|
|
@@ -187,26 +188,23 @@ type EntityFungiblesPageInput = Omit<EntityFungiblesPageRequest['stateEntityFung
|
|
|
187
188
|
at_ledger_state: AtLedgerState;
|
|
188
189
|
};
|
|
189
190
|
declare const EntityFungiblesPage_base: Effect.Service.Class<EntityFungiblesPage, "EntityFungiblesPage", {
|
|
190
|
-
readonly
|
|
191
|
-
readonly effect: Effect.Effect<(this: unknown, input: EntityFungiblesPageInput) => Effect.Effect<_radixdlt_babylon_gateway_api_sdk0.FungibleResourcesCollectionItem[], AccountLockerNotFoundError | InvalidRequestError | EntityNotFoundError | InternalServerError | InvalidEntityError | InvalidTransactionError | NotSyncedUpError | TransactionNotFoundError | ErrorResponse | RateLimitExceededError | ResponseError | UnknownGatewayError, never>, effect_ConfigError17.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>;
|
|
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
|
|
198
|
-
readonly effect: Effect.Effect<(this: unknown, input: Omit<_radixdlt_babylon_gateway_api_sdk0.StateNonFungibleDataRequest, "at_ledger_state"> & {
|
|
197
|
+
readonly effect: Effect.Effect<(this: unknown, input: Omit<_radixdlt_babylon_gateway_api_sdk4.StateNonFungibleDataRequest, "at_ledger_state"> & {
|
|
199
198
|
at_ledger_state: AtLedgerState;
|
|
200
|
-
}) => 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>;
|
|
201
200
|
}>;
|
|
202
201
|
declare class NonFungibleData extends NonFungibleData_base {}
|
|
203
202
|
//#endregion
|
|
204
203
|
//#region src/state/entityNonFungiblesPage.d.ts
|
|
205
204
|
declare const EntityNonFungiblesPage_base: Effect.Service.Class<EntityNonFungiblesPage, "EntityNonFungiblesPage", {
|
|
206
|
-
readonly
|
|
207
|
-
readonly effect: Effect.Effect<(this: unknown, input: Omit<_radixdlt_babylon_gateway_api_sdk0.StateEntityNonFungiblesPageRequest, "at_ledger_state"> & {
|
|
205
|
+
readonly effect: Effect.Effect<(this: unknown, input: Omit<_radixdlt_babylon_gateway_api_sdk4.StateEntityNonFungiblesPageRequest, "at_ledger_state"> & {
|
|
208
206
|
at_ledger_state: AtLedgerState;
|
|
209
|
-
}) => 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>;
|
|
210
208
|
}>;
|
|
211
209
|
declare class EntityNonFungiblesPage extends EntityNonFungiblesPage_base {}
|
|
212
210
|
//#endregion
|
|
@@ -229,7 +227,6 @@ declare const ValidatorSchema: z.ZodObject<{
|
|
|
229
227
|
}>;
|
|
230
228
|
type Validator = z.infer<typeof ValidatorSchema>;
|
|
231
229
|
declare const GetValidators_base: Effect.Service.Class<GetValidators, "GetValidators", {
|
|
232
|
-
readonly dependencies: readonly [effect_Layer18.Layer<GatewayApiClient, never, never>];
|
|
233
230
|
readonly effect: Effect.Effect<(this: unknown) => Effect.Effect<{
|
|
234
231
|
address: string;
|
|
235
232
|
name: string;
|
|
@@ -245,12 +242,11 @@ type GetEntityDetailsInput = GetEntityDetailsVaultAggregatedParameters[0];
|
|
|
245
242
|
type GetEntityDetailsOptions = GetEntityDetailsVaultAggregatedParameters[1];
|
|
246
243
|
type GetEntityDetailsState = GetEntityDetailsVaultAggregatedParameters[2];
|
|
247
244
|
declare const GetEntityDetailsVaultAggregated_base: Effect.Service.Class<GetEntityDetailsVaultAggregated, "GetEntityDetailsVaultAggregated", {
|
|
248
|
-
readonly
|
|
249
|
-
readonly effect: Effect.Effect<(this: unknown, input: string[], options: _radixdlt_babylon_gateway_api_sdk0.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: {
|
|
250
246
|
state_version: number;
|
|
251
247
|
} | {
|
|
252
248
|
timestamp: Date;
|
|
253
|
-
}) => 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>;
|
|
254
250
|
}>;
|
|
255
251
|
declare class GetEntityDetailsVaultAggregated extends GetEntityDetailsVaultAggregated_base {}
|
|
256
252
|
//#endregion
|
|
@@ -263,22 +259,20 @@ type GetNonFungibleIdsInput = {
|
|
|
263
259
|
cursor?: string;
|
|
264
260
|
};
|
|
265
261
|
declare const EntityNonFungibleIdsPage_base: Effect.Service.Class<EntityNonFungibleIdsPage, "EntityNonFungibleIdsPage", {
|
|
266
|
-
readonly dependencies: readonly [effect_Layer18.Layer<GatewayApiClient, never, never>];
|
|
267
262
|
readonly effect: Effect.Effect<(this: unknown, input: GetNonFungibleIdsInput) => Effect.Effect<{
|
|
268
263
|
ids: string[];
|
|
269
264
|
address: string;
|
|
270
|
-
}, 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>;
|
|
271
266
|
}>;
|
|
272
267
|
declare class EntityNonFungibleIdsPage extends EntityNonFungibleIdsPage_base {}
|
|
273
268
|
//#endregion
|
|
274
269
|
//#region src/getNonFungibleLocation.d.ts
|
|
275
270
|
declare const GetNonFungibleLocationService_base: Effect.Service.Class<GetNonFungibleLocationService, "GetNonFungibleLocationService", {
|
|
276
|
-
readonly dependencies: readonly [effect_Layer18.Layer<GatewayApiClient, never, never>];
|
|
277
271
|
readonly effect: Effect.Effect<(this: unknown, input: {
|
|
278
272
|
resourceAddress: string;
|
|
279
273
|
nonFungibleIds: string[];
|
|
280
274
|
at_ledger_state: AtLedgerState;
|
|
281
|
-
}) => 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>;
|
|
282
276
|
}>;
|
|
283
277
|
declare class GetNonFungibleLocationService extends GetNonFungibleLocationService_base {}
|
|
284
278
|
//#endregion
|
|
@@ -295,7 +289,7 @@ type GetAddressByNonFungibleServiceInput = {
|
|
|
295
289
|
at_ledger_state: AtLedgerState;
|
|
296
290
|
};
|
|
297
291
|
declare const GetAddressByNonFungibleService_base: Effect.Service.Class<GetAddressByNonFungibleService, "GetAddressByNonFungibleService", {
|
|
298
|
-
readonly dependencies: readonly [
|
|
292
|
+
readonly dependencies: readonly [effect_Layer0.Layer<GetNonFungibleLocationService, effect_ConfigError1.ConfigError, GatewayApiClient>];
|
|
299
293
|
readonly effect: Effect.Effect<(this: unknown, input: GetAddressByNonFungibleServiceInput) => Effect.Effect<{
|
|
300
294
|
address: string;
|
|
301
295
|
resourceAddress: string;
|
|
@@ -311,7 +305,7 @@ declare class InvalidComponentStateError {
|
|
|
311
305
|
constructor(error: unknown);
|
|
312
306
|
}
|
|
313
307
|
declare const GetComponentStateService_base: Effect.Service.Class<GetComponentStateService, "GetComponentStateService", {
|
|
314
|
-
readonly dependencies: readonly [
|
|
308
|
+
readonly dependencies: readonly [effect_Layer0.Layer<GetEntityDetailsVaultAggregated, effect_ConfigError1.ConfigError, GatewayApiClient>];
|
|
315
309
|
readonly effect: Effect.Effect<{
|
|
316
310
|
run: <T extends StructDefinition, R extends boolean>(this: unknown, input: {
|
|
317
311
|
addresses: string[];
|
|
@@ -329,11 +323,10 @@ declare class GetComponentStateService extends GetComponentStateService_base {}
|
|
|
329
323
|
//#endregion
|
|
330
324
|
//#region src/state/stateEntityDetails.d.ts
|
|
331
325
|
declare const StateEntityDetails_base: Effect.Service.Class<StateEntityDetails, "StateEntityDetails", {
|
|
332
|
-
readonly
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
}, AccountLockerNotFoundError | InvalidRequestError | EntityNotFoundError | InternalServerError | InvalidEntityError | InvalidTransactionError | NotSyncedUpError | TransactionNotFoundError | ErrorResponse | RateLimitExceededError | ResponseError | UnknownGatewayError, never>, effect_ConfigError17.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>;
|
|
337
330
|
}>;
|
|
338
331
|
declare class StateEntityDetails extends StateEntityDetails_base {}
|
|
339
332
|
//#endregion
|
|
@@ -344,47 +337,46 @@ type GetFungibleBalanceInput = Omit<StateEntityDetailsOperationRequest['stateEnt
|
|
|
344
337
|
options?: StateEntityDetailsOperationRequest['stateEntityDetailsRequest']['opt_ins'];
|
|
345
338
|
};
|
|
346
339
|
declare const GetFungibleBalance_base: Effect.Service.Class<GetFungibleBalance, "GetFungibleBalance", {
|
|
347
|
-
readonly dependencies: readonly [
|
|
340
|
+
readonly dependencies: readonly [effect_Layer0.Layer<EntityFungiblesPage, effect_ConfigError1.ConfigError, GatewayApiClient>, effect_Layer0.Layer<StateEntityDetails, effect_ConfigError1.ConfigError, GatewayApiClient>];
|
|
348
341
|
readonly effect: Effect.Effect<(this: unknown, input: GetFungibleBalanceInput) => Effect.Effect<{
|
|
349
342
|
address: string;
|
|
350
343
|
items: {
|
|
351
344
|
amount: BigNumber;
|
|
352
345
|
resource_address: string;
|
|
353
|
-
explicit_metadata?:
|
|
346
|
+
explicit_metadata?: _radixdlt_babylon_gateway_api_sdk4.EntityMetadataCollection;
|
|
354
347
|
last_updated_at_state_version: number;
|
|
355
348
|
}[];
|
|
356
|
-
}[], 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>;
|
|
357
350
|
}>;
|
|
358
351
|
declare class GetFungibleBalance extends GetFungibleBalance_base {}
|
|
359
352
|
//#endregion
|
|
360
353
|
//#region src/keyValueStoreData.d.ts
|
|
361
354
|
declare const KeyValueStoreDataService_base: Effect.Service.Class<KeyValueStoreDataService, "KeyValueStoreDataService", {
|
|
362
|
-
readonly dependencies: readonly [
|
|
355
|
+
readonly dependencies: readonly [effect_Layer0.Layer<GatewayApiClient, never, never>];
|
|
363
356
|
readonly effect: Effect.Effect<(this: unknown, input: Omit<StateKeyValueStoreDataRequest, "at_ledger_state"> & {
|
|
364
357
|
at_ledger_state: AtLedgerState;
|
|
365
|
-
}) => 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>;
|
|
366
359
|
}>;
|
|
367
360
|
declare class KeyValueStoreDataService extends KeyValueStoreDataService_base {}
|
|
368
361
|
//#endregion
|
|
369
362
|
//#region src/keyValueStoreKeys.d.ts
|
|
370
363
|
declare const KeyValueStoreKeysService_base: Effect.Service.Class<KeyValueStoreKeysService, "KeyValueStoreKeysService", {
|
|
371
|
-
readonly dependencies: readonly [effect_Layer18.Layer<GatewayApiClient, never, never>];
|
|
372
364
|
readonly effect: Effect.Effect<(this: unknown, input: Omit<StateKeyValueStoreKeysRequest, "at_ledger_state"> & {
|
|
373
365
|
at_ledger_state: AtLedgerState;
|
|
374
|
-
}) => 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>;
|
|
375
367
|
}>;
|
|
376
368
|
declare class KeyValueStoreKeysService extends KeyValueStoreKeysService_base {}
|
|
377
369
|
//#endregion
|
|
378
370
|
//#region src/getKeyValueStore.d.ts
|
|
379
371
|
declare const GetKeyValueStoreService_base: Effect.Service.Class<GetKeyValueStoreService, "GetKeyValueStoreService", {
|
|
380
|
-
readonly dependencies: readonly [
|
|
372
|
+
readonly dependencies: readonly [effect_Layer0.Layer<KeyValueStoreKeysService, effect_ConfigError1.ConfigError, GatewayApiClient>, effect_Layer0.Layer<KeyValueStoreDataService, effect_ConfigError1.ConfigError, never>];
|
|
381
373
|
readonly effect: Effect.Effect<(this: unknown, input: {
|
|
382
374
|
address: string;
|
|
383
375
|
at_ledger_state: AtLedgerState;
|
|
384
376
|
}) => Effect.Effect<{
|
|
385
377
|
key_value_store_address: string;
|
|
386
|
-
ledger_state:
|
|
387
|
-
entries:
|
|
378
|
+
ledger_state: _radixdlt_babylon_gateway_api_sdk4.LedgerState;
|
|
379
|
+
entries: _radixdlt_babylon_gateway_api_sdk4.StateKeyValueStoreDataResponseItem[];
|
|
388
380
|
}, AccountLockerNotFoundError | InvalidRequestError | EntityNotFoundError | InternalServerError | InvalidEntityError | InvalidTransactionError | NotSyncedUpError | TransactionNotFoundError | ErrorResponse | RateLimitExceededError | ResponseError | UnknownGatewayError, never>, never, KeyValueStoreKeysService | KeyValueStoreDataService>;
|
|
389
381
|
}>;
|
|
390
382
|
declare class GetKeyValueStoreService extends GetKeyValueStoreService_base {}
|
|
@@ -394,8 +386,7 @@ type GetLedgerStateInput = {
|
|
|
394
386
|
at_ledger_state: AtLedgerState;
|
|
395
387
|
};
|
|
396
388
|
declare const GetLedgerStateService_base: Effect.Service.Class<GetLedgerStateService, "GetLedgerStateService", {
|
|
397
|
-
readonly
|
|
398
|
-
readonly effect: Effect.Effect<(this: unknown, input: GetLedgerStateInput) => Effect.Effect<_radixdlt_babylon_gateway_api_sdk0.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>;
|
|
399
390
|
}>;
|
|
400
391
|
declare class GetLedgerStateService extends GetLedgerStateService_base {}
|
|
401
392
|
//#endregion
|
|
@@ -407,14 +398,14 @@ type GetNftResourceManagersInput = {
|
|
|
407
398
|
options?: StateEntityDetailsOperationRequest['stateEntityDetailsRequest']['opt_ins'];
|
|
408
399
|
};
|
|
409
400
|
declare const GetNftResourceManagersService_base: Effect.Service.Class<GetNftResourceManagersService, "GetNftResourceManagersService", {
|
|
410
|
-
readonly dependencies: readonly [
|
|
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>];
|
|
411
402
|
readonly effect: Effect.Effect<(this: unknown, input: GetNftResourceManagersInput) => Effect.Effect<{
|
|
412
403
|
address: string;
|
|
413
404
|
items: {
|
|
414
405
|
resourceAddress: string;
|
|
415
406
|
nftIds: string[];
|
|
416
407
|
}[];
|
|
417
|
-
}[], 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>;
|
|
418
409
|
}>;
|
|
419
410
|
declare class GetNftResourceManagersService extends GetNftResourceManagersService_base {}
|
|
420
411
|
//#endregion
|
|
@@ -432,7 +423,7 @@ type GetNonFungibleBalanceInput = {
|
|
|
432
423
|
};
|
|
433
424
|
type GetNonFungibleBalanceOutput = Effect.Effect.Success<Awaited<ReturnType<(typeof GetNonFungibleBalanceService)['Service']>>>;
|
|
434
425
|
declare const GetNonFungibleBalanceService_base: Effect.Service.Class<GetNonFungibleBalanceService, "GetNonFungibleBalanceService", {
|
|
435
|
-
readonly dependencies: readonly [
|
|
426
|
+
readonly dependencies: readonly [effect_Layer0.Layer<NonFungibleData, effect_ConfigError1.ConfigError, GatewayApiClient>, effect_Layer0.Layer<GetNftResourceManagersService, effect_ConfigError1.ConfigError, GatewayApiClient>];
|
|
436
427
|
readonly effect: Effect.Effect<(this: unknown, input: GetNonFungibleBalanceInput) => Effect.Effect<{
|
|
437
428
|
items: {
|
|
438
429
|
address: string;
|
|
@@ -441,18 +432,18 @@ declare const GetNonFungibleBalanceService_base: Effect.Service.Class<GetNonFung
|
|
|
441
432
|
items: {
|
|
442
433
|
id: string;
|
|
443
434
|
lastUpdatedStateVersion: number;
|
|
444
|
-
sbor:
|
|
435
|
+
sbor: _radixdlt_babylon_gateway_api_sdk4.ProgrammaticScryptoSborValue | undefined;
|
|
445
436
|
isBurned: boolean;
|
|
446
437
|
}[];
|
|
447
438
|
}[];
|
|
448
439
|
}[];
|
|
449
|
-
}, 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>;
|
|
450
441
|
}>;
|
|
451
442
|
declare class GetNonFungibleBalanceService extends GetNonFungibleBalanceService_base {}
|
|
452
443
|
//#endregion
|
|
453
444
|
//#region src/getResourceHolders.d.ts
|
|
454
445
|
declare const GetResourceHoldersService_base: Effect.Service.Class<GetResourceHoldersService, "GetResourceHoldersService", {
|
|
455
|
-
readonly dependencies: readonly [
|
|
446
|
+
readonly dependencies: readonly [effect_Layer0.Layer<GatewayApiClient, never, never>];
|
|
456
447
|
readonly effect: Effect.Effect<(this: unknown, input: {
|
|
457
448
|
resourceAddress: string;
|
|
458
449
|
cursor?: string;
|
|
@@ -515,7 +506,6 @@ type PersonaProof = typeof PersonaProofSchema.Type;
|
|
|
515
506
|
type AccountProof = typeof AccountProofSchema.Type;
|
|
516
507
|
type RolaProof = typeof RolaProofSchema.Type;
|
|
517
508
|
declare const Rola_base: Effect.Service.Class<Rola, "Rola", {
|
|
518
|
-
readonly dependencies: readonly [effect_Layer18.Layer<GatewayApiClient, never, never>];
|
|
519
509
|
readonly effect: Effect.Effect<{
|
|
520
510
|
verifySignedChallenge: (input: RolaProof) => Effect.Effect<undefined, VerifyRolaProofError, never>;
|
|
521
511
|
}, never, GatewayApiClient>;
|
|
@@ -692,4 +682,19 @@ interface ScryptoSborValueEnum {
|
|
|
692
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;
|
|
693
683
|
declare const ScryptoSborValueSchema: Schema.Schema<ScryptoSborValueSchema>;
|
|
694
684
|
//#endregion
|
|
695
|
-
|
|
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,12 +91,13 @@ 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" }));
|
|
98
98
|
};
|
|
99
99
|
return {
|
|
100
|
+
networkId,
|
|
100
101
|
state: {
|
|
101
102
|
getEntityDetailsVaultAggregated: wrapMethod(gatewayApiClient.state.getEntityDetailsVaultAggregated.bind(gatewayApiClient.state)),
|
|
102
103
|
getValidators: wrapMethod(gatewayApiClient.state.getValidators.bind(gatewayApiClient.state)),
|
|
@@ -133,33 +134,30 @@ var GatewayApiClient = class extends Effect.Service()("GatewayApiClient", { effe
|
|
|
133
134
|
|
|
134
135
|
//#endregion
|
|
135
136
|
//#region src/state/entityFungiblesPage.ts
|
|
136
|
-
var EntityFungiblesPage = class extends Effect.Service()("EntityFungiblesPage", {
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
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({
|
|
143
152
|
...input,
|
|
144
|
-
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
const result$1 = yield* entityFungiblesPage({
|
|
153
|
-
...input,
|
|
154
|
-
cursor: nextCursor
|
|
155
|
-
});
|
|
156
|
-
nextCursor = result$1.next_cursor;
|
|
157
|
-
items.push(...result$1.items);
|
|
158
|
-
}
|
|
159
|
-
return items;
|
|
160
|
-
});
|
|
161
|
-
})
|
|
162
|
-
}) {};
|
|
153
|
+
cursor: nextCursor
|
|
154
|
+
});
|
|
155
|
+
nextCursor = result$1.next_cursor;
|
|
156
|
+
items.push(...result$1.items);
|
|
157
|
+
}
|
|
158
|
+
return items;
|
|
159
|
+
});
|
|
160
|
+
}) }) {};
|
|
163
161
|
|
|
164
162
|
//#endregion
|
|
165
163
|
//#region src/helpers/chunker.ts
|
|
@@ -174,40 +172,34 @@ const chunker = (array, size) => {
|
|
|
174
172
|
|
|
175
173
|
//#endregion
|
|
176
174
|
//#region src/state/nonFungibleData.ts
|
|
177
|
-
var NonFungibleData = class extends Effect.Service()("NonFungibleData", {
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
const
|
|
182
|
-
return Effect.fnUntraced(function* (
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
});
|
|
193
|
-
})
|
|
194
|
-
}) {};
|
|
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
|
+
}) }) {};
|
|
195
190
|
|
|
196
191
|
//#endregion
|
|
197
192
|
//#region src/state/entityNonFungiblesPage.ts
|
|
198
|
-
var EntityNonFungiblesPage = class extends Effect.Service()("EntityNonFungiblesPage", {
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
});
|
|
209
|
-
})
|
|
210
|
-
}) {};
|
|
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
|
+
}) }) {};
|
|
211
203
|
|
|
212
204
|
//#endregion
|
|
213
205
|
//#region src/state/getValidators.ts
|
|
@@ -217,102 +209,90 @@ const ValidatorSchema = z.object({
|
|
|
217
209
|
lsuResourceAddress: z.string(),
|
|
218
210
|
claimNftResourceAddress: z.string()
|
|
219
211
|
});
|
|
220
|
-
var GetValidators = class extends Effect.Service()("GetValidators", {
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
lsuResourceAddress: "",
|
|
235
|
-
claimNftResourceAddress: ""
|
|
236
|
-
});
|
|
237
|
-
return {
|
|
238
|
-
address,
|
|
239
|
-
name,
|
|
240
|
-
lsuResourceAddress,
|
|
241
|
-
claimNftResourceAddress
|
|
242
|
-
};
|
|
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: ""
|
|
243
226
|
});
|
|
227
|
+
return {
|
|
228
|
+
address,
|
|
229
|
+
name,
|
|
230
|
+
lsuResourceAddress,
|
|
231
|
+
claimNftResourceAddress
|
|
232
|
+
};
|
|
244
233
|
});
|
|
245
|
-
})
|
|
246
|
-
}) {};
|
|
234
|
+
});
|
|
235
|
+
}) }) {};
|
|
247
236
|
|
|
248
237
|
//#endregion
|
|
249
238
|
//#region src/state/getEntityDetailsVaultAggregated.ts
|
|
250
|
-
var GetEntityDetailsVaultAggregated = class extends Effect.Service()("GetEntityDetailsVaultAggregated", {
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
const
|
|
255
|
-
return Effect.
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
});
|
|
261
|
-
})
|
|
262
|
-
}) {};
|
|
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
|
+
}) }) {};
|
|
263
249
|
|
|
264
250
|
//#endregion
|
|
265
251
|
//#region src/state/entityNonFungibleIdsPage.ts
|
|
266
|
-
var EntityNonFungibleIdsPage = class extends Effect.Service()("EntityNonFungibleIdsPage", {
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
const
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
const
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
});
|
|
294
|
-
})
|
|
295
|
-
}) {};
|
|
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
|
+
}) }) {};
|
|
296
279
|
|
|
297
280
|
//#endregion
|
|
298
281
|
//#region src/getNonFungibleLocation.ts
|
|
299
|
-
var GetNonFungibleLocationService = class extends Effect.Service()("GetNonFungibleLocationService", {
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
const
|
|
304
|
-
return Effect.fn(function* (
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
});
|
|
314
|
-
})
|
|
315
|
-
}) {};
|
|
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
|
+
}) }) {};
|
|
316
296
|
|
|
317
297
|
//#endregion
|
|
318
298
|
//#region src/getAddressByNonFungible.ts
|
|
@@ -379,28 +359,25 @@ var GetComponentStateService = class extends Effect.Service()("GetComponentState
|
|
|
379
359
|
|
|
380
360
|
//#endregion
|
|
381
361
|
//#region src/state/stateEntityDetails.ts
|
|
382
|
-
var StateEntityDetails = class extends Effect.Service()("StateEntityDetails", {
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
const
|
|
388
|
-
return Effect.fnUntraced(function* (
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
});
|
|
402
|
-
})
|
|
403
|
-
}) {};
|
|
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
|
+
}) }) {};
|
|
404
381
|
|
|
405
382
|
//#endregion
|
|
406
383
|
//#region src/getFungibleBalance.ts
|
|
@@ -472,19 +449,16 @@ var KeyValueStoreDataService = class extends Effect.Service()("KeyValueStoreData
|
|
|
472
449
|
|
|
473
450
|
//#endregion
|
|
474
451
|
//#region src/keyValueStoreKeys.ts
|
|
475
|
-
var KeyValueStoreKeysService = class extends Effect.Service()("KeyValueStoreKeysService", {
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
});
|
|
486
|
-
})
|
|
487
|
-
}) {};
|
|
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
|
+
}) }) {};
|
|
488
462
|
|
|
489
463
|
//#endregion
|
|
490
464
|
//#region src/getKeyValueStore.ts
|
|
@@ -527,18 +501,15 @@ var GetKeyValueStoreService = class extends Effect.Service()("GetKeyValueStoreSe
|
|
|
527
501
|
|
|
528
502
|
//#endregion
|
|
529
503
|
//#region src/getLedgerState.ts
|
|
530
|
-
var GetLedgerStateService = class extends Effect.Service()("GetLedgerStateService", {
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
});
|
|
540
|
-
})
|
|
541
|
-
}) {};
|
|
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
|
+
}) }) {};
|
|
542
513
|
|
|
543
514
|
//#endregion
|
|
544
515
|
//#region src/getNftResourceManagers.ts
|
|
@@ -795,22 +766,23 @@ const AccountProofSchema = Schema.Struct({
|
|
|
795
766
|
proof: ProofSchema
|
|
796
767
|
});
|
|
797
768
|
const RolaProofSchema = Schema.Union(PersonaProofSchema, AccountProofSchema);
|
|
798
|
-
var Rola = class extends Effect.Service()("Rola", {
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
})
|
|
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
|
+
}) }) {};
|
|
814
786
|
|
|
815
787
|
//#endregion
|
|
816
788
|
//#region src/sbor.ts
|
|
@@ -946,4 +918,20 @@ const ScryptoSborValueEnumSchema = Schema.suspend(() => Schema.Struct({
|
|
|
946
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);
|
|
947
919
|
|
|
948
920
|
//#endregion
|
|
949
|
-
|
|
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": [
|