@radix-effects/gateway 0.1.0 → 0.2.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 +128 -65
- package/dist/index.js +41 -2
- package/package.json +2 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { Effect } from "effect";
|
|
2
|
-
import * as
|
|
1
|
+
import { Effect, Schema } from "effect";
|
|
2
|
+
import * as _radixdlt_babylon_gateway_api_sdk7 from "@radixdlt/babylon-gateway-api-sdk";
|
|
3
3
|
import { AccountLockerNotFoundError as AccountLockerNotFoundError$1, EntityFungiblesPageRequest, EntityNotFoundError as EntityNotFoundError$1, ErrorResponse as ErrorResponse$1, GatewayApiClient as GatewayApiClient$1, InternalServerError as InternalServerError$1, InvalidEntityError as InvalidEntityError$1, InvalidRequestError as InvalidRequestError$1, InvalidTransactionError as InvalidTransactionError$1, NotSyncedUpError as NotSyncedUpError$1, ResourceHoldersCollectionItem, ResponseError as ResponseError$1, StateEntityDetailsOperationRequest, StateEntityDetailsVaultResponseItem, StateKeyValueStoreDataRequest, StateKeyValueStoreKeysRequest, TransactionNotFoundError as TransactionNotFoundError$1 } from "@radixdlt/babylon-gateway-api-sdk";
|
|
4
4
|
import { z } from "zod";
|
|
5
|
-
import
|
|
5
|
+
import { RolaError } from "@radixdlt/rola";
|
|
6
|
+
import * as effect_ConfigError13 from "effect/ConfigError";
|
|
6
7
|
import * as effect_Layer0 from "effect/Layer";
|
|
7
8
|
import * as effect_Types0 from "effect/Types";
|
|
8
9
|
import * as effect_Cause0 from "effect/Cause";
|
|
@@ -90,24 +91,24 @@ declare class UnknownGatewayError extends UnknownGatewayError_base<{
|
|
|
90
91
|
declare const GatewayApiClient_base: Effect.Service.Class<GatewayApiClient, "GatewayApiClient", {
|
|
91
92
|
readonly effect: Effect.Effect<{
|
|
92
93
|
state: {
|
|
93
|
-
getEntityDetailsVaultAggregated: (addresses: string[], options?:
|
|
94
|
-
getValidators: (cursor?: string | undefined) => Effect.Effect<
|
|
94
|
+
getEntityDetailsVaultAggregated: (addresses: string[], options?: _radixdlt_babylon_gateway_api_sdk7.StateEntityDetailsOptions | undefined, ledgerState?: _radixdlt_babylon_gateway_api_sdk7.LedgerStateSelector | undefined) => Effect.Effect<_radixdlt_babylon_gateway_api_sdk7.StateEntityDetailsVaultResponseItem[], AccountLockerNotFoundError | InvalidRequestError | EntityNotFoundError | InternalServerError | InvalidEntityError | InvalidTransactionError | NotSyncedUpError | TransactionNotFoundError | ErrorResponse | RateLimitExceededError | ResponseError | UnknownGatewayError, never>;
|
|
95
|
+
getValidators: (cursor?: string | undefined) => Effect.Effect<_radixdlt_babylon_gateway_api_sdk7.ValidatorCollection, AccountLockerNotFoundError | InvalidRequestError | EntityNotFoundError | InternalServerError | InvalidEntityError | InvalidTransactionError | NotSyncedUpError | TransactionNotFoundError | ErrorResponse | RateLimitExceededError | ResponseError | UnknownGatewayError, never>;
|
|
95
96
|
innerClient: {
|
|
96
|
-
stateEntityDetails: (requestParameters:
|
|
97
|
-
entityFungiblesPage: (requestParameters:
|
|
98
|
-
entityNonFungiblesPage: (requestParameters:
|
|
99
|
-
entityNonFungibleIdsPage: (requestParameters:
|
|
100
|
-
entityNonFungibleResourceVaultPage: (requestParameters:
|
|
101
|
-
keyValueStoreKeys: (requestParameters:
|
|
102
|
-
keyValueStoreData: (requestParameters:
|
|
103
|
-
nonFungibleData: (requestParameters:
|
|
104
|
-
nonFungibleLocation: (requestParameters:
|
|
105
|
-
nonFungibleIds: (requestParameters:
|
|
97
|
+
stateEntityDetails: (requestParameters: _radixdlt_babylon_gateway_api_sdk7.StateEntityDetailsOperationRequest, initOverrides?: RequestInit | _radixdlt_babylon_gateway_api_sdk7.InitOverrideFunction | undefined) => Effect.Effect<_radixdlt_babylon_gateway_api_sdk7.StateEntityDetailsResponse, AccountLockerNotFoundError | InvalidRequestError | EntityNotFoundError | InternalServerError | InvalidEntityError | InvalidTransactionError | NotSyncedUpError | TransactionNotFoundError | ErrorResponse | RateLimitExceededError | ResponseError | UnknownGatewayError, never>;
|
|
98
|
+
entityFungiblesPage: (requestParameters: _radixdlt_babylon_gateway_api_sdk7.EntityFungiblesPageRequest, initOverrides?: RequestInit | _radixdlt_babylon_gateway_api_sdk7.InitOverrideFunction | undefined) => Effect.Effect<_radixdlt_babylon_gateway_api_sdk7.StateEntityFungiblesPageResponse, AccountLockerNotFoundError | InvalidRequestError | EntityNotFoundError | InternalServerError | InvalidEntityError | InvalidTransactionError | NotSyncedUpError | TransactionNotFoundError | ErrorResponse | RateLimitExceededError | ResponseError | UnknownGatewayError, never>;
|
|
99
|
+
entityNonFungiblesPage: (requestParameters: _radixdlt_babylon_gateway_api_sdk7.EntityNonFungiblesPageRequest, initOverrides?: RequestInit | _radixdlt_babylon_gateway_api_sdk7.InitOverrideFunction | undefined) => Effect.Effect<_radixdlt_babylon_gateway_api_sdk7.StateEntityNonFungiblesPageResponse, AccountLockerNotFoundError | InvalidRequestError | EntityNotFoundError | InternalServerError | InvalidEntityError | InvalidTransactionError | NotSyncedUpError | TransactionNotFoundError | ErrorResponse | RateLimitExceededError | ResponseError | UnknownGatewayError, never>;
|
|
100
|
+
entityNonFungibleIdsPage: (requestParameters: _radixdlt_babylon_gateway_api_sdk7.EntityNonFungibleIdsPageRequest, initOverrides?: RequestInit | _radixdlt_babylon_gateway_api_sdk7.InitOverrideFunction | undefined) => Effect.Effect<_radixdlt_babylon_gateway_api_sdk7.StateEntityNonFungibleIdsPageResponse, AccountLockerNotFoundError | InvalidRequestError | EntityNotFoundError | InternalServerError | InvalidEntityError | InvalidTransactionError | NotSyncedUpError | TransactionNotFoundError | ErrorResponse | RateLimitExceededError | ResponseError | UnknownGatewayError, never>;
|
|
101
|
+
entityNonFungibleResourceVaultPage: (requestParameters: _radixdlt_babylon_gateway_api_sdk7.EntityNonFungibleResourceVaultPageRequest, initOverrides?: RequestInit | _radixdlt_babylon_gateway_api_sdk7.InitOverrideFunction | undefined) => Effect.Effect<_radixdlt_babylon_gateway_api_sdk7.StateEntityNonFungibleResourceVaultsPageResponse, AccountLockerNotFoundError | InvalidRequestError | EntityNotFoundError | InternalServerError | InvalidEntityError | InvalidTransactionError | NotSyncedUpError | TransactionNotFoundError | ErrorResponse | RateLimitExceededError | ResponseError | UnknownGatewayError, never>;
|
|
102
|
+
keyValueStoreKeys: (requestParameters: _radixdlt_babylon_gateway_api_sdk7.KeyValueStoreKeysRequest, initOverrides?: RequestInit | _radixdlt_babylon_gateway_api_sdk7.InitOverrideFunction | undefined) => Effect.Effect<_radixdlt_babylon_gateway_api_sdk7.StateKeyValueStoreKeysResponse, AccountLockerNotFoundError | InvalidRequestError | EntityNotFoundError | InternalServerError | InvalidEntityError | InvalidTransactionError | NotSyncedUpError | TransactionNotFoundError | ErrorResponse | RateLimitExceededError | ResponseError | UnknownGatewayError, never>;
|
|
103
|
+
keyValueStoreData: (requestParameters: _radixdlt_babylon_gateway_api_sdk7.KeyValueStoreDataRequest, initOverrides?: RequestInit | _radixdlt_babylon_gateway_api_sdk7.InitOverrideFunction | undefined) => Effect.Effect<_radixdlt_babylon_gateway_api_sdk7.StateKeyValueStoreDataResponse, AccountLockerNotFoundError | InvalidRequestError | EntityNotFoundError | InternalServerError | InvalidEntityError | InvalidTransactionError | NotSyncedUpError | TransactionNotFoundError | ErrorResponse | RateLimitExceededError | ResponseError | UnknownGatewayError, never>;
|
|
104
|
+
nonFungibleData: (requestParameters: _radixdlt_babylon_gateway_api_sdk7.NonFungibleDataRequest, initOverrides?: RequestInit | _radixdlt_babylon_gateway_api_sdk7.InitOverrideFunction | undefined) => Effect.Effect<_radixdlt_babylon_gateway_api_sdk7.StateNonFungibleDataResponse, AccountLockerNotFoundError | InvalidRequestError | EntityNotFoundError | InternalServerError | InvalidEntityError | InvalidTransactionError | NotSyncedUpError | TransactionNotFoundError | ErrorResponse | RateLimitExceededError | ResponseError | UnknownGatewayError, never>;
|
|
105
|
+
nonFungibleLocation: (requestParameters: _radixdlt_babylon_gateway_api_sdk7.NonFungibleLocationRequest, initOverrides?: RequestInit | _radixdlt_babylon_gateway_api_sdk7.InitOverrideFunction | undefined) => Effect.Effect<_radixdlt_babylon_gateway_api_sdk7.StateNonFungibleLocationResponse, AccountLockerNotFoundError | InvalidRequestError | EntityNotFoundError | InternalServerError | InvalidEntityError | InvalidTransactionError | NotSyncedUpError | TransactionNotFoundError | ErrorResponse | RateLimitExceededError | ResponseError | UnknownGatewayError, never>;
|
|
106
|
+
nonFungibleIds: (requestParameters: _radixdlt_babylon_gateway_api_sdk7.NonFungibleIdsRequest, initOverrides?: RequestInit | _radixdlt_babylon_gateway_api_sdk7.InitOverrideFunction | undefined) => Effect.Effect<_radixdlt_babylon_gateway_api_sdk7.StateNonFungibleIdsResponse, AccountLockerNotFoundError | InvalidRequestError | EntityNotFoundError | InternalServerError | InvalidEntityError | InvalidTransactionError | NotSyncedUpError | TransactionNotFoundError | ErrorResponse | RateLimitExceededError | ResponseError | UnknownGatewayError, never>;
|
|
106
107
|
};
|
|
107
108
|
};
|
|
108
109
|
stream: {
|
|
109
110
|
innerClient: {
|
|
110
|
-
streamTransactions: (requestParameters:
|
|
111
|
+
streamTransactions: (requestParameters: _radixdlt_babylon_gateway_api_sdk7.StreamTransactionsOperationRequest, initOverrides?: RequestInit | _radixdlt_babylon_gateway_api_sdk7.InitOverrideFunction | undefined) => Effect.Effect<_radixdlt_babylon_gateway_api_sdk7.StreamTransactionsResponse, AccountLockerNotFoundError | InvalidRequestError | EntityNotFoundError | InternalServerError | InvalidEntityError | InvalidTransactionError | NotSyncedUpError | TransactionNotFoundError | ErrorResponse | RateLimitExceededError | ResponseError | UnknownGatewayError, never>;
|
|
111
112
|
};
|
|
112
113
|
};
|
|
113
114
|
transaction: {
|
|
@@ -123,23 +124,23 @@ declare const GatewayApiClient_base: Effect.Service.Class<GatewayApiClient, "Gat
|
|
|
123
124
|
balanceChanges: boolean;
|
|
124
125
|
receiptOutput: boolean;
|
|
125
126
|
manifestInstructions: boolean;
|
|
126
|
-
} | undefined) => Effect.Effect<
|
|
127
|
+
} | undefined) => Effect.Effect<_radixdlt_babylon_gateway_api_sdk7.TransactionCommittedDetailsResponse, AccountLockerNotFoundError | InvalidRequestError | EntityNotFoundError | InternalServerError | InvalidEntityError | InvalidTransactionError | NotSyncedUpError | TransactionNotFoundError | ErrorResponse | RateLimitExceededError | ResponseError | UnknownGatewayError, never>;
|
|
127
128
|
innerClient: {
|
|
128
|
-
transactionSubmit: (requestParameters:
|
|
129
|
-
transactionStatus: (requestParameters:
|
|
129
|
+
transactionSubmit: (requestParameters: _radixdlt_babylon_gateway_api_sdk7.TransactionSubmitOperationRequest, initOverrides?: RequestInit | _radixdlt_babylon_gateway_api_sdk7.InitOverrideFunction | undefined) => Effect.Effect<_radixdlt_babylon_gateway_api_sdk7.TransactionSubmitResponse, AccountLockerNotFoundError | InvalidRequestError | EntityNotFoundError | InternalServerError | InvalidEntityError | InvalidTransactionError | NotSyncedUpError | TransactionNotFoundError | ErrorResponse | RateLimitExceededError | ResponseError | UnknownGatewayError, never>;
|
|
130
|
+
transactionStatus: (requestParameters: _radixdlt_babylon_gateway_api_sdk7.TransactionStatusOperationRequest, initOverrides?: RequestInit | _radixdlt_babylon_gateway_api_sdk7.InitOverrideFunction | undefined) => Effect.Effect<_radixdlt_babylon_gateway_api_sdk7.TransactionStatusResponse, AccountLockerNotFoundError | InvalidRequestError | EntityNotFoundError | InternalServerError | InvalidEntityError | InvalidTransactionError | NotSyncedUpError | TransactionNotFoundError | ErrorResponse | RateLimitExceededError | ResponseError | UnknownGatewayError, never>;
|
|
130
131
|
};
|
|
131
132
|
};
|
|
132
133
|
status: {
|
|
133
|
-
getCurrent: () => Effect.Effect<
|
|
134
|
+
getCurrent: () => Effect.Effect<_radixdlt_babylon_gateway_api_sdk7.GatewayStatusResponse, AccountLockerNotFoundError | InvalidRequestError | EntityNotFoundError | InternalServerError | InvalidEntityError | InvalidTransactionError | NotSyncedUpError | TransactionNotFoundError | ErrorResponse | RateLimitExceededError | ResponseError | UnknownGatewayError, never>;
|
|
134
135
|
innerClient: {
|
|
135
|
-
gatewayStatus: (initOverrides?: RequestInit |
|
|
136
|
+
gatewayStatus: (initOverrides?: RequestInit | _radixdlt_babylon_gateway_api_sdk7.InitOverrideFunction | undefined) => Effect.Effect<_radixdlt_babylon_gateway_api_sdk7.GatewayStatusResponse, AccountLockerNotFoundError | InvalidRequestError | EntityNotFoundError | InternalServerError | InvalidEntityError | InvalidTransactionError | NotSyncedUpError | TransactionNotFoundError | ErrorResponse | RateLimitExceededError | ResponseError | UnknownGatewayError, never>;
|
|
136
137
|
};
|
|
137
138
|
};
|
|
138
139
|
extensions: {
|
|
139
|
-
getResourceHolders: (resourceAddress: string, cursor?: string | undefined) => Effect.Effect<
|
|
140
|
+
getResourceHolders: (resourceAddress: string, cursor?: string | undefined) => Effect.Effect<_radixdlt_babylon_gateway_api_sdk7.ResourceHoldersResponse, AccountLockerNotFoundError | InvalidRequestError | EntityNotFoundError | InternalServerError | InvalidEntityError | InvalidTransactionError | NotSyncedUpError | TransactionNotFoundError | ErrorResponse | RateLimitExceededError | ResponseError | UnknownGatewayError, never>;
|
|
140
141
|
};
|
|
141
142
|
rawClient: GatewayApiClient$1;
|
|
142
|
-
},
|
|
143
|
+
}, effect_ConfigError13.ConfigError, never>;
|
|
143
144
|
}>;
|
|
144
145
|
declare class GatewayApiClient extends GatewayApiClient_base {}
|
|
145
146
|
//#endregion
|
|
@@ -185,26 +186,26 @@ type EntityFungiblesPageInput = Omit<EntityFungiblesPageRequest['stateEntityFung
|
|
|
185
186
|
at_ledger_state: AtLedgerState;
|
|
186
187
|
};
|
|
187
188
|
declare const EntityFungiblesPage_base: Effect.Service.Class<EntityFungiblesPage, "EntityFungiblesPage", {
|
|
188
|
-
readonly dependencies: readonly [effect_Layer0.Layer<GatewayApiClient,
|
|
189
|
-
readonly effect: Effect.Effect<(this: unknown, input: EntityFungiblesPageInput) => Effect.Effect<
|
|
189
|
+
readonly dependencies: readonly [effect_Layer0.Layer<GatewayApiClient, effect_ConfigError13.ConfigError, never>];
|
|
190
|
+
readonly effect: Effect.Effect<(this: unknown, input: EntityFungiblesPageInput) => Effect.Effect<_radixdlt_babylon_gateway_api_sdk7.FungibleResourcesCollectionItem[], AccountLockerNotFoundError | InvalidRequestError | EntityNotFoundError | InternalServerError | InvalidEntityError | InvalidTransactionError | NotSyncedUpError | TransactionNotFoundError | ErrorResponse | RateLimitExceededError | ResponseError | UnknownGatewayError, never>, effect_ConfigError13.ConfigError, GatewayApiClient>;
|
|
190
191
|
}>;
|
|
191
192
|
declare class EntityFungiblesPage extends EntityFungiblesPage_base {}
|
|
192
193
|
//#endregion
|
|
193
194
|
//#region src/state/nonFungibleData.d.ts
|
|
194
195
|
declare const NonFungibleData_base: Effect.Service.Class<NonFungibleData, "NonFungibleData", {
|
|
195
|
-
readonly dependencies: readonly [effect_Layer0.Layer<GatewayApiClient,
|
|
196
|
-
readonly effect: Effect.Effect<(this: unknown, input: Omit<
|
|
196
|
+
readonly dependencies: readonly [effect_Layer0.Layer<GatewayApiClient, effect_ConfigError13.ConfigError, never>];
|
|
197
|
+
readonly effect: Effect.Effect<(this: unknown, input: Omit<_radixdlt_babylon_gateway_api_sdk7.StateNonFungibleDataRequest, "at_ledger_state"> & {
|
|
197
198
|
at_ledger_state: AtLedgerState;
|
|
198
|
-
}) => Effect.Effect<
|
|
199
|
+
}) => Effect.Effect<_radixdlt_babylon_gateway_api_sdk7.StateNonFungibleDetailsResponseItem[], AccountLockerNotFoundError | InvalidRequestError | EntityNotFoundError | InternalServerError | InvalidEntityError | InvalidTransactionError | NotSyncedUpError | TransactionNotFoundError | ErrorResponse | RateLimitExceededError | ResponseError | UnknownGatewayError, never>, effect_ConfigError13.ConfigError, GatewayApiClient>;
|
|
199
200
|
}>;
|
|
200
201
|
declare class NonFungibleData extends NonFungibleData_base {}
|
|
201
202
|
//#endregion
|
|
202
203
|
//#region src/state/entityNonFungiblesPage.d.ts
|
|
203
204
|
declare const EntityNonFungiblesPage_base: Effect.Service.Class<EntityNonFungiblesPage, "EntityNonFungiblesPage", {
|
|
204
|
-
readonly dependencies: readonly [effect_Layer0.Layer<GatewayApiClient,
|
|
205
|
-
readonly effect: Effect.Effect<(this: unknown, input: Omit<
|
|
205
|
+
readonly dependencies: readonly [effect_Layer0.Layer<GatewayApiClient, effect_ConfigError13.ConfigError, never>];
|
|
206
|
+
readonly effect: Effect.Effect<(this: unknown, input: Omit<_radixdlt_babylon_gateway_api_sdk7.StateEntityNonFungiblesPageRequest, "at_ledger_state"> & {
|
|
206
207
|
at_ledger_state: AtLedgerState;
|
|
207
|
-
}) => Effect.Effect<
|
|
208
|
+
}) => Effect.Effect<_radixdlt_babylon_gateway_api_sdk7.StateEntityNonFungiblesPageResponse, AccountLockerNotFoundError | InvalidRequestError | EntityNotFoundError | InternalServerError | InvalidEntityError | InvalidTransactionError | NotSyncedUpError | TransactionNotFoundError | ErrorResponse | RateLimitExceededError | ResponseError | UnknownGatewayError, never>, effect_ConfigError13.ConfigError, GatewayApiClient>;
|
|
208
209
|
}>;
|
|
209
210
|
declare class EntityNonFungiblesPage extends EntityNonFungiblesPage_base {}
|
|
210
211
|
//#endregion
|
|
@@ -227,7 +228,7 @@ declare const ValidatorSchema: z.ZodObject<{
|
|
|
227
228
|
}>;
|
|
228
229
|
type Validator = z.infer<typeof ValidatorSchema>;
|
|
229
230
|
declare const GetValidators_base: Effect.Service.Class<GetValidators, "GetValidators", {
|
|
230
|
-
readonly dependencies: readonly [effect_Layer0.Layer<GatewayApiClient,
|
|
231
|
+
readonly dependencies: readonly [effect_Layer0.Layer<GatewayApiClient, effect_ConfigError13.ConfigError, never>];
|
|
231
232
|
readonly effect: Effect.Effect<(this: unknown) => Effect.Effect<{
|
|
232
233
|
address: string;
|
|
233
234
|
name: string;
|
|
@@ -243,12 +244,12 @@ type GetEntityDetailsInput = GetEntityDetailsVaultAggregatedParameters[0];
|
|
|
243
244
|
type GetEntityDetailsOptions = GetEntityDetailsVaultAggregatedParameters[1];
|
|
244
245
|
type GetEntityDetailsState = GetEntityDetailsVaultAggregatedParameters[2];
|
|
245
246
|
declare const GetEntityDetailsVaultAggregated_base: Effect.Service.Class<GetEntityDetailsVaultAggregated, "GetEntityDetailsVaultAggregated", {
|
|
246
|
-
readonly dependencies: readonly [effect_Layer0.Layer<GatewayApiClient,
|
|
247
|
-
readonly effect: Effect.Effect<(this: unknown, input: string[], options:
|
|
247
|
+
readonly dependencies: readonly [effect_Layer0.Layer<GatewayApiClient, effect_ConfigError13.ConfigError, never>];
|
|
248
|
+
readonly effect: Effect.Effect<(this: unknown, input: string[], options: _radixdlt_babylon_gateway_api_sdk7.StateEntityDetailsOptions | undefined, at_ledger_state: {
|
|
248
249
|
state_version: number;
|
|
249
250
|
} | {
|
|
250
251
|
timestamp: Date;
|
|
251
|
-
}) => Effect.Effect<
|
|
252
|
+
}) => Effect.Effect<_radixdlt_babylon_gateway_api_sdk7.StateEntityDetailsVaultResponseItem[], AccountLockerNotFoundError | InvalidRequestError | EntityNotFoundError | InternalServerError | InvalidEntityError | InvalidTransactionError | NotSyncedUpError | TransactionNotFoundError | ErrorResponse | RateLimitExceededError | ResponseError | UnknownGatewayError, never>, effect_ConfigError13.ConfigError, GatewayApiClient>;
|
|
252
253
|
}>;
|
|
253
254
|
declare class GetEntityDetailsVaultAggregated extends GetEntityDetailsVaultAggregated_base {}
|
|
254
255
|
//#endregion
|
|
@@ -261,22 +262,22 @@ type GetNonFungibleIdsInput = {
|
|
|
261
262
|
cursor?: string;
|
|
262
263
|
};
|
|
263
264
|
declare const EntityNonFungibleIdsPage_base: Effect.Service.Class<EntityNonFungibleIdsPage, "EntityNonFungibleIdsPage", {
|
|
264
|
-
readonly dependencies: readonly [effect_Layer0.Layer<GatewayApiClient,
|
|
265
|
+
readonly dependencies: readonly [effect_Layer0.Layer<GatewayApiClient, effect_ConfigError13.ConfigError, never>];
|
|
265
266
|
readonly effect: Effect.Effect<(this: unknown, input: GetNonFungibleIdsInput) => Effect.Effect<{
|
|
266
267
|
ids: string[];
|
|
267
268
|
address: string;
|
|
268
|
-
}, AccountLockerNotFoundError | InvalidRequestError | EntityNotFoundError | InternalServerError | InvalidEntityError | InvalidTransactionError | NotSyncedUpError | TransactionNotFoundError | ErrorResponse | RateLimitExceededError | ResponseError | UnknownGatewayError, never>,
|
|
269
|
+
}, AccountLockerNotFoundError | InvalidRequestError | EntityNotFoundError | InternalServerError | InvalidEntityError | InvalidTransactionError | NotSyncedUpError | TransactionNotFoundError | ErrorResponse | RateLimitExceededError | ResponseError | UnknownGatewayError, never>, effect_ConfigError13.ConfigError, GatewayApiClient>;
|
|
269
270
|
}>;
|
|
270
271
|
declare class EntityNonFungibleIdsPage extends EntityNonFungibleIdsPage_base {}
|
|
271
272
|
//#endregion
|
|
272
273
|
//#region src/getNonFungibleLocation.d.ts
|
|
273
274
|
declare const GetNonFungibleLocationService_base: Effect.Service.Class<GetNonFungibleLocationService, "GetNonFungibleLocationService", {
|
|
274
|
-
readonly dependencies: readonly [effect_Layer0.Layer<GatewayApiClient,
|
|
275
|
+
readonly dependencies: readonly [effect_Layer0.Layer<GatewayApiClient, effect_ConfigError13.ConfigError, never>];
|
|
275
276
|
readonly effect: Effect.Effect<(this: unknown, input: {
|
|
276
277
|
resourceAddress: string;
|
|
277
278
|
nonFungibleIds: string[];
|
|
278
279
|
at_ledger_state: AtLedgerState;
|
|
279
|
-
}) => Effect.Effect<
|
|
280
|
+
}) => Effect.Effect<_radixdlt_babylon_gateway_api_sdk7.StateNonFungibleLocationResponse[], AccountLockerNotFoundError | InvalidRequestError | EntityNotFoundError | InternalServerError | InvalidEntityError | InvalidTransactionError | NotSyncedUpError | TransactionNotFoundError | ErrorResponse | RateLimitExceededError | ResponseError | UnknownGatewayError, never>, effect_ConfigError13.ConfigError, GatewayApiClient>;
|
|
280
281
|
}>;
|
|
281
282
|
declare class GetNonFungibleLocationService extends GetNonFungibleLocationService_base {}
|
|
282
283
|
//#endregion
|
|
@@ -293,7 +294,7 @@ type GetAddressByNonFungibleServiceInput = {
|
|
|
293
294
|
at_ledger_state: AtLedgerState;
|
|
294
295
|
};
|
|
295
296
|
declare const GetAddressByNonFungibleService_base: Effect.Service.Class<GetAddressByNonFungibleService, "GetAddressByNonFungibleService", {
|
|
296
|
-
readonly dependencies: readonly [effect_Layer0.Layer<GetNonFungibleLocationService,
|
|
297
|
+
readonly dependencies: readonly [effect_Layer0.Layer<GetNonFungibleLocationService, effect_ConfigError13.ConfigError, never>];
|
|
297
298
|
readonly effect: Effect.Effect<(this: unknown, input: GetAddressByNonFungibleServiceInput) => Effect.Effect<{
|
|
298
299
|
address: string;
|
|
299
300
|
resourceAddress: string;
|
|
@@ -309,7 +310,7 @@ declare class InvalidComponentStateError {
|
|
|
309
310
|
constructor(error: unknown);
|
|
310
311
|
}
|
|
311
312
|
declare const GetComponentStateService_base: Effect.Service.Class<GetComponentStateService, "GetComponentStateService", {
|
|
312
|
-
readonly dependencies: readonly [effect_Layer0.Layer<GetEntityDetailsVaultAggregated,
|
|
313
|
+
readonly dependencies: readonly [effect_Layer0.Layer<GetEntityDetailsVaultAggregated, effect_ConfigError13.ConfigError, never>];
|
|
313
314
|
readonly effect: Effect.Effect<{
|
|
314
315
|
run: <T extends StructDefinition, R extends boolean>(this: unknown, input: {
|
|
315
316
|
addresses: string[];
|
|
@@ -327,11 +328,11 @@ declare class GetComponentStateService extends GetComponentStateService_base {}
|
|
|
327
328
|
//#endregion
|
|
328
329
|
//#region src/state/stateEntityDetails.d.ts
|
|
329
330
|
declare const StateEntityDetails_base: Effect.Service.Class<StateEntityDetails, "StateEntityDetails", {
|
|
330
|
-
readonly dependencies: readonly [effect_Layer0.Layer<GatewayApiClient,
|
|
331
|
-
readonly effect: Effect.Effect<(this: unknown, input:
|
|
332
|
-
ledger_state:
|
|
333
|
-
items:
|
|
334
|
-
}, AccountLockerNotFoundError | InvalidRequestError | EntityNotFoundError | InternalServerError | InvalidEntityError | InvalidTransactionError | NotSyncedUpError | TransactionNotFoundError | ErrorResponse | RateLimitExceededError | ResponseError | UnknownGatewayError, never>,
|
|
331
|
+
readonly dependencies: readonly [effect_Layer0.Layer<GatewayApiClient, effect_ConfigError13.ConfigError, never>];
|
|
332
|
+
readonly effect: Effect.Effect<(this: unknown, input: _radixdlt_babylon_gateway_api_sdk7.StateEntityDetailsRequest) => Effect.Effect<{
|
|
333
|
+
ledger_state: _radixdlt_babylon_gateway_api_sdk7.LedgerState;
|
|
334
|
+
items: _radixdlt_babylon_gateway_api_sdk7.StateEntityDetailsResponseItem[];
|
|
335
|
+
}, AccountLockerNotFoundError | InvalidRequestError | EntityNotFoundError | InternalServerError | InvalidEntityError | InvalidTransactionError | NotSyncedUpError | TransactionNotFoundError | ErrorResponse | RateLimitExceededError | ResponseError | UnknownGatewayError, never>, effect_ConfigError13.ConfigError, GatewayApiClient>;
|
|
335
336
|
}>;
|
|
336
337
|
declare class StateEntityDetails extends StateEntityDetails_base {}
|
|
337
338
|
//#endregion
|
|
@@ -342,47 +343,47 @@ type GetFungibleBalanceInput = Omit<StateEntityDetailsOperationRequest['stateEnt
|
|
|
342
343
|
options?: StateEntityDetailsOperationRequest['stateEntityDetailsRequest']['opt_ins'];
|
|
343
344
|
};
|
|
344
345
|
declare const GetFungibleBalance_base: Effect.Service.Class<GetFungibleBalance, "GetFungibleBalance", {
|
|
345
|
-
readonly dependencies: readonly [effect_Layer0.Layer<EntityFungiblesPage,
|
|
346
|
+
readonly dependencies: readonly [effect_Layer0.Layer<EntityFungiblesPage, effect_ConfigError13.ConfigError, never>, effect_Layer0.Layer<StateEntityDetails, effect_ConfigError13.ConfigError, never>];
|
|
346
347
|
readonly effect: Effect.Effect<(this: unknown, input: GetFungibleBalanceInput) => Effect.Effect<{
|
|
347
348
|
address: string;
|
|
348
349
|
items: {
|
|
349
350
|
amount: BigNumber;
|
|
350
351
|
resource_address: string;
|
|
351
|
-
explicit_metadata?:
|
|
352
|
+
explicit_metadata?: _radixdlt_babylon_gateway_api_sdk7.EntityMetadataCollection;
|
|
352
353
|
last_updated_at_state_version: number;
|
|
353
354
|
}[];
|
|
354
|
-
}[], AccountLockerNotFoundError | InvalidRequestError | EntityNotFoundError | InternalServerError | InvalidEntityError | InvalidTransactionError | NotSyncedUpError | TransactionNotFoundError | ErrorResponse | RateLimitExceededError | ResponseError | UnknownGatewayError, never>,
|
|
355
|
+
}[], AccountLockerNotFoundError | InvalidRequestError | EntityNotFoundError | InternalServerError | InvalidEntityError | InvalidTransactionError | NotSyncedUpError | TransactionNotFoundError | ErrorResponse | RateLimitExceededError | ResponseError | UnknownGatewayError, never>, effect_ConfigError13.ConfigError, EntityFungiblesPage | StateEntityDetails>;
|
|
355
356
|
}>;
|
|
356
357
|
declare class GetFungibleBalance extends GetFungibleBalance_base {}
|
|
357
358
|
//#endregion
|
|
358
359
|
//#region src/keyValueStoreData.d.ts
|
|
359
360
|
declare const KeyValueStoreDataService_base: Effect.Service.Class<KeyValueStoreDataService, "KeyValueStoreDataService", {
|
|
360
|
-
readonly dependencies: readonly [effect_Layer0.Layer<GatewayApiClient,
|
|
361
|
+
readonly dependencies: readonly [effect_Layer0.Layer<GatewayApiClient, effect_ConfigError13.ConfigError, never>];
|
|
361
362
|
readonly effect: Effect.Effect<(this: unknown, input: Omit<StateKeyValueStoreDataRequest, "at_ledger_state"> & {
|
|
362
363
|
at_ledger_state: AtLedgerState;
|
|
363
|
-
}) => Effect.Effect<
|
|
364
|
+
}) => Effect.Effect<_radixdlt_babylon_gateway_api_sdk7.StateKeyValueStoreDataResponse[], AccountLockerNotFoundError | InvalidRequestError | EntityNotFoundError | InternalServerError | InvalidEntityError | InvalidTransactionError | NotSyncedUpError | TransactionNotFoundError | ErrorResponse | RateLimitExceededError | ResponseError | UnknownGatewayError, never>, effect_ConfigError13.ConfigError, GatewayApiClient>;
|
|
364
365
|
}>;
|
|
365
366
|
declare class KeyValueStoreDataService extends KeyValueStoreDataService_base {}
|
|
366
367
|
//#endregion
|
|
367
368
|
//#region src/keyValueStoreKeys.d.ts
|
|
368
369
|
declare const KeyValueStoreKeysService_base: Effect.Service.Class<KeyValueStoreKeysService, "KeyValueStoreKeysService", {
|
|
369
|
-
readonly dependencies: readonly [effect_Layer0.Layer<GatewayApiClient,
|
|
370
|
+
readonly dependencies: readonly [effect_Layer0.Layer<GatewayApiClient, effect_ConfigError13.ConfigError, never>];
|
|
370
371
|
readonly effect: Effect.Effect<(this: unknown, input: Omit<StateKeyValueStoreKeysRequest, "at_ledger_state"> & {
|
|
371
372
|
at_ledger_state: AtLedgerState;
|
|
372
|
-
}) => Effect.Effect<
|
|
373
|
+
}) => Effect.Effect<_radixdlt_babylon_gateway_api_sdk7.StateKeyValueStoreKeysResponse, AccountLockerNotFoundError | InvalidRequestError | EntityNotFoundError | InternalServerError | InvalidEntityError | InvalidTransactionError | NotSyncedUpError | TransactionNotFoundError | ErrorResponse | RateLimitExceededError | ResponseError | UnknownGatewayError, never>, effect_ConfigError13.ConfigError, GatewayApiClient>;
|
|
373
374
|
}>;
|
|
374
375
|
declare class KeyValueStoreKeysService extends KeyValueStoreKeysService_base {}
|
|
375
376
|
//#endregion
|
|
376
377
|
//#region src/getKeyValueStore.d.ts
|
|
377
378
|
declare const GetKeyValueStoreService_base: Effect.Service.Class<GetKeyValueStoreService, "GetKeyValueStoreService", {
|
|
378
|
-
readonly dependencies: readonly [effect_Layer0.Layer<KeyValueStoreKeysService,
|
|
379
|
+
readonly dependencies: readonly [effect_Layer0.Layer<KeyValueStoreKeysService, effect_ConfigError13.ConfigError, never>, effect_Layer0.Layer<KeyValueStoreDataService, effect_ConfigError13.ConfigError, never>];
|
|
379
380
|
readonly effect: Effect.Effect<(this: unknown, input: {
|
|
380
381
|
address: string;
|
|
381
382
|
at_ledger_state: AtLedgerState;
|
|
382
383
|
}) => Effect.Effect<{
|
|
383
384
|
key_value_store_address: string;
|
|
384
|
-
ledger_state:
|
|
385
|
-
entries:
|
|
385
|
+
ledger_state: _radixdlt_babylon_gateway_api_sdk7.LedgerState;
|
|
386
|
+
entries: _radixdlt_babylon_gateway_api_sdk7.StateKeyValueStoreDataResponseItem[];
|
|
386
387
|
}, AccountLockerNotFoundError | InvalidRequestError | EntityNotFoundError | InternalServerError | InvalidEntityError | InvalidTransactionError | NotSyncedUpError | TransactionNotFoundError | ErrorResponse | RateLimitExceededError | ResponseError | UnknownGatewayError, never>, never, KeyValueStoreKeysService | KeyValueStoreDataService>;
|
|
387
388
|
}>;
|
|
388
389
|
declare class GetKeyValueStoreService extends GetKeyValueStoreService_base {}
|
|
@@ -392,8 +393,8 @@ type GetLedgerStateInput = {
|
|
|
392
393
|
at_ledger_state: AtLedgerState;
|
|
393
394
|
};
|
|
394
395
|
declare const GetLedgerStateService_base: Effect.Service.Class<GetLedgerStateService, "GetLedgerStateService", {
|
|
395
|
-
readonly dependencies: readonly [effect_Layer0.Layer<GatewayApiClient,
|
|
396
|
-
readonly effect: Effect.Effect<(this: unknown, input: GetLedgerStateInput) => Effect.Effect<
|
|
396
|
+
readonly dependencies: readonly [effect_Layer0.Layer<GatewayApiClient, effect_ConfigError13.ConfigError, never>];
|
|
397
|
+
readonly effect: Effect.Effect<(this: unknown, input: GetLedgerStateInput) => Effect.Effect<_radixdlt_babylon_gateway_api_sdk7.LedgerState, AccountLockerNotFoundError | InvalidRequestError | EntityNotFoundError | InternalServerError | InvalidEntityError | InvalidTransactionError | NotSyncedUpError | TransactionNotFoundError | ErrorResponse | RateLimitExceededError | ResponseError | UnknownGatewayError, never>, never, GatewayApiClient>;
|
|
397
398
|
}>;
|
|
398
399
|
declare class GetLedgerStateService extends GetLedgerStateService_base {}
|
|
399
400
|
//#endregion
|
|
@@ -405,14 +406,14 @@ type GetNftResourceManagersInput = {
|
|
|
405
406
|
options?: StateEntityDetailsOperationRequest['stateEntityDetailsRequest']['opt_ins'];
|
|
406
407
|
};
|
|
407
408
|
declare const GetNftResourceManagersService_base: Effect.Service.Class<GetNftResourceManagersService, "GetNftResourceManagersService", {
|
|
408
|
-
readonly dependencies: readonly [effect_Layer0.Layer<GatewayApiClient,
|
|
409
|
+
readonly dependencies: readonly [effect_Layer0.Layer<GatewayApiClient, effect_ConfigError13.ConfigError, never>, effect_Layer0.Layer<EntityNonFungiblesPage, effect_ConfigError13.ConfigError, never>, effect_Layer0.Layer<EntityNonFungibleIdsPage, effect_ConfigError13.ConfigError, never>];
|
|
409
410
|
readonly effect: Effect.Effect<(this: unknown, input: GetNftResourceManagersInput) => Effect.Effect<{
|
|
410
411
|
address: string;
|
|
411
412
|
items: {
|
|
412
413
|
resourceAddress: string;
|
|
413
414
|
nftIds: string[];
|
|
414
415
|
}[];
|
|
415
|
-
}[], AccountLockerNotFoundError | InvalidRequestError | EntityNotFoundError | InternalServerError | InvalidEntityError | InvalidTransactionError | NotSyncedUpError | TransactionNotFoundError | ErrorResponse | RateLimitExceededError | ResponseError | UnknownGatewayError, never>,
|
|
416
|
+
}[], AccountLockerNotFoundError | InvalidRequestError | EntityNotFoundError | InternalServerError | InvalidEntityError | InvalidTransactionError | NotSyncedUpError | TransactionNotFoundError | ErrorResponse | RateLimitExceededError | ResponseError | UnknownGatewayError, never>, effect_ConfigError13.ConfigError, GatewayApiClient | EntityNonFungiblesPage | EntityNonFungibleIdsPage>;
|
|
416
417
|
}>;
|
|
417
418
|
declare class GetNftResourceManagersService extends GetNftResourceManagersService_base {}
|
|
418
419
|
//#endregion
|
|
@@ -430,7 +431,7 @@ type GetNonFungibleBalanceInput = {
|
|
|
430
431
|
};
|
|
431
432
|
type GetNonFungibleBalanceOutput = Effect.Effect.Success<Awaited<ReturnType<(typeof GetNonFungibleBalanceService)['Service']>>>;
|
|
432
433
|
declare const GetNonFungibleBalanceService_base: Effect.Service.Class<GetNonFungibleBalanceService, "GetNonFungibleBalanceService", {
|
|
433
|
-
readonly dependencies: readonly [effect_Layer0.Layer<NonFungibleData,
|
|
434
|
+
readonly dependencies: readonly [effect_Layer0.Layer<NonFungibleData, effect_ConfigError13.ConfigError, never>, effect_Layer0.Layer<GetNftResourceManagersService, effect_ConfigError13.ConfigError, never>];
|
|
434
435
|
readonly effect: Effect.Effect<(this: unknown, input: GetNonFungibleBalanceInput) => Effect.Effect<{
|
|
435
436
|
items: {
|
|
436
437
|
address: string;
|
|
@@ -439,18 +440,18 @@ declare const GetNonFungibleBalanceService_base: Effect.Service.Class<GetNonFung
|
|
|
439
440
|
items: {
|
|
440
441
|
id: string;
|
|
441
442
|
lastUpdatedStateVersion: number;
|
|
442
|
-
sbor:
|
|
443
|
+
sbor: _radixdlt_babylon_gateway_api_sdk7.ProgrammaticScryptoSborValue | undefined;
|
|
443
444
|
isBurned: boolean;
|
|
444
445
|
}[];
|
|
445
446
|
}[];
|
|
446
447
|
}[];
|
|
447
|
-
}, AccountLockerNotFoundError | InvalidRequestError | EntityNotFoundError | InternalServerError | InvalidEntityError | InvalidTransactionError | NotSyncedUpError | TransactionNotFoundError | ErrorResponse | RateLimitExceededError | ResponseError | UnknownGatewayError, never>,
|
|
448
|
+
}, AccountLockerNotFoundError | InvalidRequestError | EntityNotFoundError | InternalServerError | InvalidEntityError | InvalidTransactionError | NotSyncedUpError | TransactionNotFoundError | ErrorResponse | RateLimitExceededError | ResponseError | UnknownGatewayError, never>, effect_ConfigError13.ConfigError, NonFungibleData | GetNftResourceManagersService>;
|
|
448
449
|
}>;
|
|
449
450
|
declare class GetNonFungibleBalanceService extends GetNonFungibleBalanceService_base {}
|
|
450
451
|
//#endregion
|
|
451
452
|
//#region src/getResourceHolders.d.ts
|
|
452
453
|
declare const GetResourceHoldersService_base: Effect.Service.Class<GetResourceHoldersService, "GetResourceHoldersService", {
|
|
453
|
-
readonly dependencies: readonly [effect_Layer0.Layer<GatewayApiClient,
|
|
454
|
+
readonly dependencies: readonly [effect_Layer0.Layer<GatewayApiClient, effect_ConfigError13.ConfigError, never>];
|
|
454
455
|
readonly effect: Effect.Effect<(this: unknown, input: {
|
|
455
456
|
resourceAddress: string;
|
|
456
457
|
cursor?: string;
|
|
@@ -458,4 +459,66 @@ declare const GetResourceHoldersService_base: Effect.Service.Class<GetResourceHo
|
|
|
458
459
|
}>;
|
|
459
460
|
declare class GetResourceHoldersService extends GetResourceHoldersService_base {}
|
|
460
461
|
//#endregion
|
|
461
|
-
|
|
462
|
+
//#region src/rola.d.ts
|
|
463
|
+
declare const VerifyRolaProofError_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 & {
|
|
464
|
+
readonly _tag: "VerifyRolaProofError";
|
|
465
|
+
} & Readonly<A>;
|
|
466
|
+
declare class VerifyRolaProofError extends VerifyRolaProofError_base<{
|
|
467
|
+
error: RolaError;
|
|
468
|
+
}> {}
|
|
469
|
+
declare const ProofSchema: Schema.Struct<{
|
|
470
|
+
publicKey: typeof Schema.String;
|
|
471
|
+
signature: typeof Schema.String;
|
|
472
|
+
curve: Schema.Union<[Schema.Literal<["curve25519"]>, Schema.Literal<["secp256k1"]>]>;
|
|
473
|
+
}>;
|
|
474
|
+
declare const PersonaProofSchema: Schema.Struct<{
|
|
475
|
+
address: typeof Schema.String;
|
|
476
|
+
type: Schema.Literal<["persona"]>;
|
|
477
|
+
challenge: typeof Schema.String;
|
|
478
|
+
proof: Schema.Struct<{
|
|
479
|
+
publicKey: typeof Schema.String;
|
|
480
|
+
signature: typeof Schema.String;
|
|
481
|
+
curve: Schema.Union<[Schema.Literal<["curve25519"]>, Schema.Literal<["secp256k1"]>]>;
|
|
482
|
+
}>;
|
|
483
|
+
}>;
|
|
484
|
+
declare const AccountProofSchema: Schema.Struct<{
|
|
485
|
+
address: typeof Schema.String;
|
|
486
|
+
type: Schema.Literal<["account"]>;
|
|
487
|
+
challenge: typeof Schema.String;
|
|
488
|
+
proof: Schema.Struct<{
|
|
489
|
+
publicKey: typeof Schema.String;
|
|
490
|
+
signature: typeof Schema.String;
|
|
491
|
+
curve: Schema.Union<[Schema.Literal<["curve25519"]>, Schema.Literal<["secp256k1"]>]>;
|
|
492
|
+
}>;
|
|
493
|
+
}>;
|
|
494
|
+
declare const RolaProofSchema: Schema.Union<[Schema.Struct<{
|
|
495
|
+
address: typeof Schema.String;
|
|
496
|
+
type: Schema.Literal<["persona"]>;
|
|
497
|
+
challenge: typeof Schema.String;
|
|
498
|
+
proof: Schema.Struct<{
|
|
499
|
+
publicKey: typeof Schema.String;
|
|
500
|
+
signature: typeof Schema.String;
|
|
501
|
+
curve: Schema.Union<[Schema.Literal<["curve25519"]>, Schema.Literal<["secp256k1"]>]>;
|
|
502
|
+
}>;
|
|
503
|
+
}>, Schema.Struct<{
|
|
504
|
+
address: typeof Schema.String;
|
|
505
|
+
type: Schema.Literal<["account"]>;
|
|
506
|
+
challenge: typeof Schema.String;
|
|
507
|
+
proof: Schema.Struct<{
|
|
508
|
+
publicKey: typeof Schema.String;
|
|
509
|
+
signature: typeof Schema.String;
|
|
510
|
+
curve: Schema.Union<[Schema.Literal<["curve25519"]>, Schema.Literal<["secp256k1"]>]>;
|
|
511
|
+
}>;
|
|
512
|
+
}>]>;
|
|
513
|
+
type PersonaProof = typeof PersonaProofSchema.Type;
|
|
514
|
+
type AccountProof = typeof AccountProofSchema.Type;
|
|
515
|
+
type RolaProof = typeof RolaProofSchema.Type;
|
|
516
|
+
declare const Rola_base: Effect.Service.Class<Rola, "Rola", {
|
|
517
|
+
readonly dependencies: readonly [effect_Layer0.Layer<GatewayApiClient, effect_ConfigError13.ConfigError, never>];
|
|
518
|
+
readonly effect: Effect.Effect<{
|
|
519
|
+
verifySignedChallenge: (input: RolaProof) => Effect.Effect<undefined, VerifyRolaProofError, never>;
|
|
520
|
+
}, effect_ConfigError13.ConfigError, GatewayApiClient>;
|
|
521
|
+
}>;
|
|
522
|
+
declare class Rola extends Rola_base {}
|
|
523
|
+
//#endregion
|
|
524
|
+
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, ProofSchema, RateLimitExceededError, ResponseError, Rola, RolaProof, RolaProofSchema, StateVersion, StateVersionSchema, TimestampSchema, TransactionNotFoundError, UnknownGatewayError, Validator, ValidatorSchema, VerifyRolaProofError, validateAtLedgerStateInput };
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { Config, Data, Effect } from "effect";
|
|
1
|
+
import { Config, Data, Effect, Schema } from "effect";
|
|
2
2
|
import { GatewayApiClient as GatewayApiClient$1, ResponseError as ResponseError$1 } from "@radixdlt/babylon-gateway-api-sdk";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
import { BigNumber } from "bignumber.js";
|
|
5
|
+
import { Rola as Rola$1 } from "@radixdlt/rola";
|
|
5
6
|
|
|
6
7
|
//#region src/gatewayApiClient.ts
|
|
7
8
|
var AccountLockerNotFoundError = class extends Data.TaggedError("AccountLockerNotFoundError") {};
|
|
@@ -768,4 +769,42 @@ const validateAtLedgerStateInput = (input) => Effect.gen(function* () {
|
|
|
768
769
|
});
|
|
769
770
|
|
|
770
771
|
//#endregion
|
|
771
|
-
|
|
772
|
+
//#region src/rola.ts
|
|
773
|
+
var VerifyRolaProofError = class extends Data.TaggedError("VerifyRolaProofError") {};
|
|
774
|
+
const ProofSchema = Schema.Struct({
|
|
775
|
+
publicKey: Schema.String,
|
|
776
|
+
signature: Schema.String,
|
|
777
|
+
curve: Schema.Union(Schema.Literal("curve25519"), Schema.Literal("secp256k1"))
|
|
778
|
+
});
|
|
779
|
+
const PersonaProofSchema = Schema.Struct({
|
|
780
|
+
address: Schema.String,
|
|
781
|
+
type: Schema.Literal("persona"),
|
|
782
|
+
challenge: Schema.String,
|
|
783
|
+
proof: ProofSchema
|
|
784
|
+
});
|
|
785
|
+
const AccountProofSchema = Schema.Struct({
|
|
786
|
+
address: Schema.String,
|
|
787
|
+
type: Schema.Literal("account"),
|
|
788
|
+
challenge: Schema.String,
|
|
789
|
+
proof: ProofSchema
|
|
790
|
+
});
|
|
791
|
+
const RolaProofSchema = Schema.Union(PersonaProofSchema, AccountProofSchema);
|
|
792
|
+
var Rola = class extends Effect.Service()("Rola", {
|
|
793
|
+
dependencies: [GatewayApiClient.Default],
|
|
794
|
+
effect: Effect.gen(function* () {
|
|
795
|
+
const { verifySignedChallenge } = Rola$1({
|
|
796
|
+
networkId: yield* Config.number("NETWORK_ID").pipe(Config.withDefault(1)),
|
|
797
|
+
applicationName: yield* Config.string("APPLICATION_NAME").pipe(Config.withDefault("@radix-effects/gateway")),
|
|
798
|
+
dAppDefinitionAddress: yield* Config.string("DAPP_DEFINITION_ADDRESS"),
|
|
799
|
+
expectedOrigin: yield* Config.string("ROLA_EXPECTED_ORIGIN"),
|
|
800
|
+
gatewayApiClient: (yield* GatewayApiClient).rawClient
|
|
801
|
+
});
|
|
802
|
+
return { verifySignedChallenge: (input) => Effect.gen(function* () {
|
|
803
|
+
const result = yield* Effect.tryPromise(() => verifySignedChallenge(input)).pipe(Effect.catchTag("UnknownException", Effect.orDie));
|
|
804
|
+
if (result.isErr()) return yield* new VerifyRolaProofError({ error: result.error });
|
|
805
|
+
}) };
|
|
806
|
+
})
|
|
807
|
+
}) {};
|
|
808
|
+
|
|
809
|
+
//#endregion
|
|
810
|
+
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, ProofSchema, RateLimitExceededError, ResponseError, Rola, RolaProofSchema, StateVersionSchema, TimestampSchema, TransactionNotFoundError, 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.2.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -24,6 +24,7 @@
|
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"@radixdlt/babylon-gateway-api-sdk": "^1.10.1",
|
|
26
26
|
"@radixdlt/radix-engine-toolkit": "^1.0.5",
|
|
27
|
+
"@radixdlt/rola": "^2.1.0",
|
|
27
28
|
"bignumber.js": "^9.2.1",
|
|
28
29
|
"effect": "^3.14.1",
|
|
29
30
|
"zod": "^3.24.1",
|