@settlemint/dalp-sdk 3.1.26-main.37116470199 → 3.1.26
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/README.md +172 -239
- package/dist/api-types.generated.d.ts +14160 -0
- package/dist/api-types.generated.d.ts.map +1 -0
- package/dist/{auth/permissions.d.ts → auth-permissions.d.ts} +8 -0
- package/dist/auth-permissions.d.ts.map +1 -0
- package/dist/{auth/wallet-plugins.d.ts → auth-wallet-plugins.d.ts} +6 -68
- package/dist/auth-wallet-plugins.d.ts.map +1 -0
- package/dist/auth.d.ts +115 -8
- package/dist/auth.d.ts.map +1 -0
- package/dist/bundler.d.ts +217 -0
- package/dist/bundler.d.ts.map +1 -0
- package/dist/chunk-xm8h1dzh.js +33 -0
- package/dist/client.d.ts +19 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/contract-errors.d.ts +4156 -0
- package/dist/contract-errors.d.ts.map +1 -0
- package/dist/contract.d.ts +22 -0
- package/dist/contract.d.ts.map +1 -0
- package/dist/cookie-store.d.ts +10 -0
- package/dist/cookie-store.d.ts.map +1 -0
- package/dist/dapi-errors.d.ts +654 -0
- package/dist/dapi-errors.d.ts.map +1 -0
- package/dist/errors.d.ts +637 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/index.d.ts +45 -28
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +96216 -150
- package/dist/platform.d.ts +41 -0
- package/dist/platform.d.ts.map +1 -0
- package/dist/plugins/index.d.ts +13 -0
- package/dist/plugins/index.d.ts.map +1 -0
- package/dist/plugins/index.js +10 -0
- package/dist/sdk-error.d.ts +74 -0
- package/dist/sdk-error.d.ts.map +1 -0
- package/dist/serializers.d.ts +41 -0
- package/dist/serializers.d.ts.map +1 -0
- package/dist/types.d.ts +114 -37
- package/dist/types.d.ts.map +1 -0
- package/dist/url.d.ts +1 -0
- package/dist/url.d.ts.map +1 -0
- package/dist/verify-webhook.d.ts +28 -17
- package/dist/verify-webhook.d.ts.map +1 -0
- package/dist/version.d.ts +3 -0
- package/dist/version.d.ts.map +1 -0
- package/dist/version.generated.d.ts +8 -0
- package/dist/version.generated.d.ts.map +1 -0
- package/dist/wait-for-transaction.d.ts +86 -44
- package/dist/wait-for-transaction.d.ts.map +1 -0
- package/dist/webhook-events.d.ts +33 -543
- package/dist/webhook-events.d.ts.map +1 -0
- package/package.json +34 -110
- package/dist/auth/client.d.ts +0 -103
- package/dist/auth/invite-step-up.d.ts +0 -2
- package/dist/auth/live.d.ts +0 -47
- package/dist/auth/native-passkey.d.ts +0 -9
- package/dist/auth-surface.d.ts +0 -2
- package/dist/auth.js +0 -525
- package/dist/chunk-4f4kjtt0.js +0 -149
- package/dist/chunk-b03ycwb7.js +0 -68
- package/dist/chunk-ghgcmyhk.js +0 -5
- package/dist/chunk-h241xecg.js +0 -1625
- package/dist/chunk-hqz56e6q.js +0 -4
- package/dist/chunk-k3ntysxx.js +0 -57
- package/dist/chunk-pjjrxre1.js +0 -36
- package/dist/chunk-qvtjb3dz.js +0 -102
- package/dist/chunk-v54k7mgr.js +0 -271
- package/dist/chunk-w361dpdk.js +0 -5
- package/dist/client/conditional-request.d.ts +0 -8
- package/dist/client/factory.d.ts +0 -4
- package/dist/client/query-serializer.d.ts +0 -1
- package/dist/client/request-compression.d.ts +0 -12
- package/dist/client/ssr-fetch.d.ts +0 -10
- package/dist/client/step-up-challenge.d.ts +0 -10
- package/dist/effect.d.ts +0 -38
- package/dist/effect.js +0 -87
- package/dist/errors/api-error.d.ts +0 -35
- package/dist/errors/error-codes.d.ts +0 -21
- package/dist/errors/find-current-error.d.ts +0 -2
- package/dist/errors/sdk-error.d.ts +0 -52
- package/dist/errors/sdk-error.js +0 -8
- package/dist/generated/api-types.d.ts +0 -69961
- package/dist/generated/console-routes.d.ts +0 -12
- package/dist/generated/error-catalog.d.ts +0 -9
- package/dist/generated/error-codes.d.ts +0 -9
- package/dist/generated/response-scalars.d.ts +0 -9
- package/dist/generated/response-schemas.d.ts +0 -9
- package/dist/generated/route-error-codes.d.ts +0 -9
- package/dist/generated/routes.d.ts +0 -12
- package/dist/proxy/builder.d.ts +0 -17
- package/dist/proxy/client-core.d.ts +0 -28
- package/dist/proxy/client.d.ts +0 -5
- package/dist/proxy/fetch-executor.d.ts +0 -6
- package/dist/proxy/flat-args.d.ts +0 -24
- package/dist/proxy/response-decode.d.ts +0 -37
- package/dist/proxy/sse.d.ts +0 -11
- package/dist/proxy/step-up-challenge.d.ts +0 -4
- package/dist/proxy/tanstack.d.ts +0 -6
- package/dist/proxy/transport.d.ts +0 -63
- package/dist/react-query.d.ts +0 -2
- package/dist/react-query.js +0 -12
- package/dist/readonly-deep.d.ts +0 -3
- package/dist/routes/console.d.ts +0 -14
- package/dist/routes/console.js +0 -25
- package/dist/routes/index.d.ts +0 -4
- package/dist/routes/index.js +0 -10
- package/dist/routes/types.d.ts +0 -72
- package/dist/runtime-exports.d.ts +0 -4
- package/dist/runtime-exports.js +0 -16
- package/dist/runtime.d.ts +0 -11
- package/dist/scalars/big-decimal.d.ts +0 -4
- package/dist/scalars/ethereum-address.d.ts +0 -5
- package/dist/scalars/exchange-rates.d.ts +0 -13
- package/dist/scalars/index.d.ts +0 -10
- package/dist/scalars/index.js +0 -102
- package/dist/scalars/organization-id.d.ts +0 -5
- package/dist/scalars/token-decimals.d.ts +0 -4
- package/dist/secret.d.ts +0 -12
- package/dist/sign-webhook-receipt.d.ts +0 -16
- package/dist/sign-webhook-receipt.js +0 -26
- package/dist/transport/cookie-store.d.ts +0 -9
- package/dist/transport/sse-lifecycle.d.ts +0 -24
- package/dist/verify-webhook.js +0 -8
- package/dist/wait-for-transaction.js +0 -151
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { findCurrentError } from "./find-current-error.ts";
|
|
2
|
-
import type { DalpSdkErrorDetails } from "./sdk-error.ts";
|
|
3
|
-
import type { DalpApiErrorCode } from "./error-codes.ts";
|
|
4
|
-
export type DalpApiErrorCategory = "client" | "auth" | "permission" | "domain" | "contract" | "dependency" | "operational" | "config" | "unknown";
|
|
5
|
-
export interface DalpApiErrorOptions<Code extends DalpApiErrorCode = DalpApiErrorCode> {
|
|
6
|
-
readonly message: string;
|
|
7
|
-
readonly cause?: unknown;
|
|
8
|
-
readonly id?: string;
|
|
9
|
-
readonly code: Code;
|
|
10
|
-
readonly routeId?: string;
|
|
11
|
-
readonly category: DalpApiErrorCategory;
|
|
12
|
-
readonly status?: number;
|
|
13
|
-
readonly retryable: boolean;
|
|
14
|
-
readonly why: string;
|
|
15
|
-
readonly fix: string;
|
|
16
|
-
readonly retryAfterSeconds?: number;
|
|
17
|
-
readonly data?: DalpSdkErrorDetails;
|
|
18
|
-
}
|
|
19
|
-
export declare class DalpApiError<Code extends DalpApiErrorCode = DalpApiErrorCode> extends Error {
|
|
20
|
-
readonly id?: string;
|
|
21
|
-
readonly code: Code;
|
|
22
|
-
readonly routeId?: string;
|
|
23
|
-
readonly category: DalpApiErrorCategory;
|
|
24
|
-
readonly status?: number;
|
|
25
|
-
readonly retryable: boolean;
|
|
26
|
-
readonly why: string;
|
|
27
|
-
readonly fix: string;
|
|
28
|
-
readonly retryAfterSeconds?: number;
|
|
29
|
-
readonly data?: DalpSdkErrorDetails;
|
|
30
|
-
constructor(options: DalpApiErrorOptions<Code>);
|
|
31
|
-
static make(options: DalpApiErrorOptions): DalpApiError;
|
|
32
|
-
}
|
|
33
|
-
export declare const isDalpApiError: (error: unknown) => error is DalpApiError;
|
|
34
|
-
export declare const findDalpSdkError: typeof findCurrentError;
|
|
35
|
-
export declare const makeDalpApiError: (error: unknown) => DalpApiError;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import type { DalpErrorCode, DalpRouteErrorCode, DalpRouteId } from "../generated/api-types.d.ts";
|
|
2
|
-
import { type DalpApiError } from "./api-error.ts";
|
|
3
|
-
export type DalpSdkLocalErrorCode = "DALP_SDK_ERROR" | "sdk.transport.REQUEST_FAILED" | "sdk.transport.MALFORMED_RESPONSE" | "sdk.transport.UNPUBLISHED_ERROR_CODE" | "sdk.transport.UNVERIFIED_ERROR_CODE" | `sdk.transport.HTTP_${number}` | "sdk.response.MALFORMED_SUCCESS" | "sdk.stream.FAILED" | "sdk.stream.UNREADABLE_BODY" | "sdk.scalar.BIG_DECIMAL_INVALID" | "sdk.scalar.EVM_ADDRESS_INVALID" | "sdk.scalar.ORGANIZATION_ID_INVALID" | "sdk.scalar.TOKEN_DECIMALS_INVALID";
|
|
4
|
-
export type DalpApiErrorCode = DalpErrorCode | DalpSdkLocalErrorCode;
|
|
5
|
-
export declare const isDalpErrorCode: (code: string) => code is DalpErrorCode;
|
|
6
|
-
export declare const isDalpSdkLocalErrorCode: (code: string) => code is DalpSdkLocalErrorCode;
|
|
7
|
-
export declare const isDalpApiErrorCode: (code: string) => code is DalpApiErrorCode;
|
|
8
|
-
/** @internal */
|
|
9
|
-
export type RouteErrorCodeCheck = {
|
|
10
|
-
readonly kind: "published";
|
|
11
|
-
readonly code: DalpErrorCode;
|
|
12
|
-
} | {
|
|
13
|
-
readonly kind: "unpublished";
|
|
14
|
-
} | {
|
|
15
|
-
readonly kind: "unverified";
|
|
16
|
-
};
|
|
17
|
-
/** @internal */
|
|
18
|
-
export declare function checkRouteErrorCode(routeId: string, code: string): Promise<RouteErrorCodeCheck>;
|
|
19
|
-
/** @internal */
|
|
20
|
-
export declare const answeredByRoute: (error: DalpApiError, routeIds: ReadonlyArray<string>) => boolean;
|
|
21
|
-
export declare const isDalpRouteError: <Id extends DalpRouteId>(error: unknown, ...routeIds: readonly [Id, ...ReadonlyArray<Id>]) => error is DalpApiError<DalpRouteErrorCode<Id> | DalpSdkLocalErrorCode>;
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import type { DalpApiErrorCode } from "./error-codes.ts";
|
|
2
|
-
export interface DalpSdkErrorOptions {
|
|
3
|
-
readonly code?: DalpApiErrorCode;
|
|
4
|
-
readonly routeId?: string;
|
|
5
|
-
readonly category: string;
|
|
6
|
-
readonly status?: number;
|
|
7
|
-
readonly retryable: boolean;
|
|
8
|
-
readonly message: string;
|
|
9
|
-
readonly why: string;
|
|
10
|
-
readonly fix: string;
|
|
11
|
-
readonly details?: DalpSdkErrorDetails;
|
|
12
|
-
readonly retryAfterSeconds?: number;
|
|
13
|
-
readonly cause?: unknown;
|
|
14
|
-
}
|
|
15
|
-
export type DalpSdkJsonValue = null | boolean | number | string | ReadonlyArray<DalpSdkJsonValue> | DalpSdkJsonObject;
|
|
16
|
-
export interface DalpSdkJsonObject {
|
|
17
|
-
readonly [key: string]: DalpSdkJsonValue;
|
|
18
|
-
}
|
|
19
|
-
export type DalpSdkErrorDetails = DalpSdkJsonObject;
|
|
20
|
-
export interface DalpSdkConfigurationErrorInput {
|
|
21
|
-
readonly message: string;
|
|
22
|
-
readonly why: string;
|
|
23
|
-
readonly fix: string;
|
|
24
|
-
readonly cause?: unknown;
|
|
25
|
-
}
|
|
26
|
-
export interface DalpSdkErrorJson {
|
|
27
|
-
readonly name: "DalpSdkError";
|
|
28
|
-
readonly code: DalpApiErrorCode;
|
|
29
|
-
readonly routeId?: string;
|
|
30
|
-
readonly category: string;
|
|
31
|
-
readonly status?: number;
|
|
32
|
-
readonly retryable: boolean;
|
|
33
|
-
readonly message: string;
|
|
34
|
-
readonly why: string;
|
|
35
|
-
readonly fix: string;
|
|
36
|
-
readonly details?: DalpSdkErrorDetails;
|
|
37
|
-
readonly retryAfterSeconds?: number;
|
|
38
|
-
}
|
|
39
|
-
export declare class DalpSdkError extends Error {
|
|
40
|
-
readonly code: DalpApiErrorCode;
|
|
41
|
-
readonly routeId?: string;
|
|
42
|
-
readonly category: string;
|
|
43
|
-
readonly status?: number;
|
|
44
|
-
readonly retryable: boolean;
|
|
45
|
-
readonly why: string;
|
|
46
|
-
readonly fix: string;
|
|
47
|
-
readonly details?: DalpSdkErrorDetails;
|
|
48
|
-
readonly retryAfterSeconds?: number;
|
|
49
|
-
constructor(options: Readonly<DalpSdkErrorOptions>);
|
|
50
|
-
toJSON(): DalpSdkErrorJson;
|
|
51
|
-
}
|
|
52
|
-
export declare function createDalpSdkConfigurationError(input: Readonly<DalpSdkConfigurationErrorInput>): DalpSdkError;
|