@settlemint/dalp-sdk 3.1.25 → 3.1.26-main.37116470199
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 +239 -172
- package/dist/auth/client.d.ts +103 -0
- package/dist/auth/invite-step-up.d.ts +2 -0
- package/dist/auth/live.d.ts +47 -0
- package/dist/auth/native-passkey.d.ts +9 -0
- package/dist/{auth-permissions.d.ts → auth/permissions.d.ts} +0 -8
- package/dist/{auth-wallet-plugins.d.ts → auth/wallet-plugins.d.ts} +68 -6
- package/dist/auth-surface.d.ts +2 -0
- package/dist/auth.d.ts +8 -115
- package/dist/auth.js +525 -0
- package/dist/chunk-4f4kjtt0.js +149 -0
- package/dist/chunk-b03ycwb7.js +68 -0
- package/dist/chunk-ghgcmyhk.js +5 -0
- package/dist/chunk-h241xecg.js +1625 -0
- package/dist/chunk-hqz56e6q.js +4 -0
- package/dist/chunk-k3ntysxx.js +57 -0
- package/dist/chunk-pjjrxre1.js +36 -0
- package/dist/chunk-qvtjb3dz.js +102 -0
- package/dist/chunk-v54k7mgr.js +271 -0
- package/dist/chunk-w361dpdk.js +5 -0
- package/dist/client/conditional-request.d.ts +8 -0
- package/dist/client/factory.d.ts +4 -0
- package/dist/client/query-serializer.d.ts +1 -0
- package/dist/client/request-compression.d.ts +12 -0
- package/dist/client/ssr-fetch.d.ts +10 -0
- package/dist/client/step-up-challenge.d.ts +10 -0
- package/dist/effect.d.ts +38 -0
- package/dist/effect.js +87 -0
- package/dist/errors/api-error.d.ts +35 -0
- package/dist/errors/error-codes.d.ts +21 -0
- package/dist/errors/find-current-error.d.ts +2 -0
- package/dist/errors/sdk-error.d.ts +52 -0
- package/dist/errors/sdk-error.js +8 -0
- package/dist/generated/api-types.d.ts +69961 -0
- package/dist/generated/console-routes.d.ts +12 -0
- package/dist/generated/error-catalog.d.ts +9 -0
- package/dist/generated/error-codes.d.ts +9 -0
- package/dist/generated/response-scalars.d.ts +9 -0
- package/dist/generated/response-schemas.d.ts +9 -0
- package/dist/generated/route-error-codes.d.ts +9 -0
- package/dist/generated/routes.d.ts +12 -0
- package/dist/index.d.ts +28 -45
- package/dist/index.js +150 -96216
- package/dist/proxy/builder.d.ts +17 -0
- package/dist/proxy/client-core.d.ts +28 -0
- package/dist/proxy/client.d.ts +5 -0
- package/dist/proxy/fetch-executor.d.ts +6 -0
- package/dist/proxy/flat-args.d.ts +24 -0
- package/dist/proxy/response-decode.d.ts +37 -0
- package/dist/proxy/sse.d.ts +11 -0
- package/dist/proxy/step-up-challenge.d.ts +4 -0
- package/dist/proxy/tanstack.d.ts +6 -0
- package/dist/proxy/transport.d.ts +63 -0
- package/dist/react-query.d.ts +2 -0
- package/dist/react-query.js +12 -0
- package/dist/readonly-deep.d.ts +3 -0
- package/dist/routes/console.d.ts +14 -0
- package/dist/routes/console.js +25 -0
- package/dist/routes/index.d.ts +4 -0
- package/dist/routes/index.js +10 -0
- package/dist/routes/types.d.ts +72 -0
- package/dist/runtime-exports.d.ts +4 -0
- package/dist/runtime-exports.js +16 -0
- package/dist/runtime.d.ts +11 -0
- package/dist/scalars/big-decimal.d.ts +4 -0
- package/dist/scalars/ethereum-address.d.ts +5 -0
- package/dist/scalars/exchange-rates.d.ts +13 -0
- package/dist/scalars/index.d.ts +10 -0
- package/dist/scalars/index.js +102 -0
- package/dist/scalars/organization-id.d.ts +5 -0
- package/dist/scalars/token-decimals.d.ts +4 -0
- package/dist/secret.d.ts +12 -0
- package/dist/sign-webhook-receipt.d.ts +16 -0
- package/dist/sign-webhook-receipt.js +26 -0
- package/dist/transport/cookie-store.d.ts +9 -0
- package/dist/transport/sse-lifecycle.d.ts +24 -0
- package/dist/types.d.ts +37 -114
- package/dist/url.d.ts +0 -1
- package/dist/verify-webhook.d.ts +17 -28
- package/dist/verify-webhook.js +8 -0
- package/dist/version.d.ts +0 -3
- package/dist/wait-for-transaction.d.ts +44 -86
- package/dist/wait-for-transaction.js +151 -0
- package/dist/webhook-events.d.ts +543 -33
- package/package.json +110 -34
- package/dist/api-types.generated.d.ts +0 -14160
- package/dist/api-types.generated.d.ts.map +0 -1
- package/dist/auth-permissions.d.ts.map +0 -1
- package/dist/auth-wallet-plugins.d.ts.map +0 -1
- package/dist/auth.d.ts.map +0 -1
- package/dist/bundler.d.ts +0 -217
- package/dist/bundler.d.ts.map +0 -1
- package/dist/chunk-xm8h1dzh.js +0 -33
- package/dist/client.d.ts +0 -19
- package/dist/client.d.ts.map +0 -1
- package/dist/contract-errors.d.ts +0 -4156
- package/dist/contract-errors.d.ts.map +0 -1
- package/dist/contract.d.ts +0 -22
- package/dist/contract.d.ts.map +0 -1
- package/dist/cookie-store.d.ts +0 -10
- package/dist/cookie-store.d.ts.map +0 -1
- package/dist/dapi-errors.d.ts +0 -654
- package/dist/dapi-errors.d.ts.map +0 -1
- package/dist/errors.d.ts +0 -637
- package/dist/errors.d.ts.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/platform.d.ts +0 -41
- package/dist/platform.d.ts.map +0 -1
- package/dist/plugins/index.d.ts +0 -13
- package/dist/plugins/index.d.ts.map +0 -1
- package/dist/plugins/index.js +0 -10
- package/dist/sdk-error.d.ts +0 -74
- package/dist/sdk-error.d.ts.map +0 -1
- package/dist/serializers.d.ts +0 -41
- package/dist/serializers.d.ts.map +0 -1
- package/dist/types.d.ts.map +0 -1
- package/dist/url.d.ts.map +0 -1
- package/dist/verify-webhook.d.ts.map +0 -1
- package/dist/version.d.ts.map +0 -1
- package/dist/version.generated.d.ts +0 -8
- package/dist/version.generated.d.ts.map +0 -1
- package/dist/wait-for-transaction.d.ts.map +0 -1
- package/dist/webhook-events.d.ts.map +0 -1
|
@@ -1,3 +1,68 @@
|
|
|
1
|
+
import type { DalpAuthResult } from "./client.ts";
|
|
2
|
+
export type WalletAuthOperation<TInput, TData> = (input: TInput, options?: unknown) => Promise<DalpAuthResult<TData>>;
|
|
3
|
+
export interface DalpWalletAuthClient {
|
|
4
|
+
readonly wallet: {
|
|
5
|
+
readonly pincode: {
|
|
6
|
+
readonly enable: WalletAuthOperation<{
|
|
7
|
+
readonly pincode: string;
|
|
8
|
+
readonly password?: string;
|
|
9
|
+
}, {
|
|
10
|
+
readonly success: boolean;
|
|
11
|
+
}>;
|
|
12
|
+
readonly update: WalletAuthOperation<{
|
|
13
|
+
readonly newPincode: string;
|
|
14
|
+
readonly password: string;
|
|
15
|
+
}, {
|
|
16
|
+
readonly success: boolean;
|
|
17
|
+
}>;
|
|
18
|
+
readonly disable: WalletAuthOperation<{
|
|
19
|
+
readonly password: string;
|
|
20
|
+
}, {
|
|
21
|
+
readonly success: boolean;
|
|
22
|
+
}>;
|
|
23
|
+
readonly reset: WalletAuthOperation<{
|
|
24
|
+
readonly newPincode: string;
|
|
25
|
+
readonly recoveryCode: string;
|
|
26
|
+
}, {
|
|
27
|
+
readonly success: boolean;
|
|
28
|
+
readonly recoveryCodes?: ReadonlyArray<string>;
|
|
29
|
+
}>;
|
|
30
|
+
};
|
|
31
|
+
readonly twoFactor: {
|
|
32
|
+
readonly enable: WalletAuthOperation<{
|
|
33
|
+
readonly issuer?: string;
|
|
34
|
+
readonly password?: string;
|
|
35
|
+
}, {
|
|
36
|
+
readonly totpURI: string;
|
|
37
|
+
}>;
|
|
38
|
+
readonly verify: WalletAuthOperation<{
|
|
39
|
+
readonly code: string;
|
|
40
|
+
}, {
|
|
41
|
+
readonly status: boolean;
|
|
42
|
+
}>;
|
|
43
|
+
readonly disable: WalletAuthOperation<{
|
|
44
|
+
readonly password: string;
|
|
45
|
+
}, {
|
|
46
|
+
readonly status: boolean;
|
|
47
|
+
}>;
|
|
48
|
+
};
|
|
49
|
+
readonly secretCodes: {
|
|
50
|
+
readonly generate: WalletAuthOperation<{
|
|
51
|
+
readonly password?: string;
|
|
52
|
+
}, {
|
|
53
|
+
readonly rotated: boolean;
|
|
54
|
+
readonly secretCodes: ReadonlyArray<string>;
|
|
55
|
+
readonly verificationId: string;
|
|
56
|
+
}>;
|
|
57
|
+
readonly confirm: WalletAuthOperation<{
|
|
58
|
+
readonly stored: boolean;
|
|
59
|
+
readonly verificationId: string;
|
|
60
|
+
}, {
|
|
61
|
+
readonly success: boolean;
|
|
62
|
+
}>;
|
|
63
|
+
};
|
|
64
|
+
};
|
|
65
|
+
}
|
|
1
66
|
export declare const walletPincodeClient: () => {
|
|
2
67
|
id: "wallet-pincode";
|
|
3
68
|
$InferServerPlugin: {
|
|
@@ -78,9 +143,6 @@ export declare const walletSecretCodesClient: () => {
|
|
|
78
143
|
signal: "$sessionSignal";
|
|
79
144
|
}[];
|
|
80
145
|
};
|
|
81
|
-
type StripLeadingSlash<T extends string> = T extends `/${infer Rest}` ? Rest : never;
|
|
82
|
-
type WalletPluginPathMethodKeys = keyof ReturnType<typeof walletPincodeClient>["pathMethods"] | keyof ReturnType<typeof walletTwoFactorClient>["pathMethods"] | keyof ReturnType<typeof walletSecretCodesClient>["pathMethods"];
|
|
83
|
-
|
|
84
|
-
export type WalletAuthEndpointPath = StripLeadingSlash<WalletPluginPathMethodKeys & string>;
|
|
85
|
-
export {};
|
|
86
|
-
//# sourceMappingURL=auth-wallet-plugins.d.ts.map
|
|
146
|
+
export type StripLeadingSlash<T extends string> = T extends `/${infer Rest}` ? Rest : never;
|
|
147
|
+
export type WalletPluginPathMethodKeys = keyof ReturnType<typeof walletPincodeClient>["pathMethods"] | keyof ReturnType<typeof walletTwoFactorClient>["pathMethods"] | keyof ReturnType<typeof walletSecretCodesClient>["pathMethods"];
|
|
148
|
+
export type WalletAuthEndpointPath = StripLeadingSlash<WalletPluginPathMethodKeys>;
|
package/dist/auth.d.ts
CHANGED
|
@@ -1,115 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
export
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
/** Cookie header value for explicit Node/browser-session handoff. */
|
|
10
|
-
cookie?: string;
|
|
11
|
-
/** Cookie store for Node-side session persistence across Better Auth calls. */
|
|
12
|
-
cookieStore?: DalpCookieStore;
|
|
13
|
-
/**
|
|
14
|
-
* Organization ID for multi-tenant setups.
|
|
15
|
-
* Sent as `x-organization-id` when provided.
|
|
16
|
-
*/
|
|
17
|
-
organizationId?: string;
|
|
18
|
-
/**
|
|
19
|
-
* Additional headers merged into every Better Auth request.
|
|
20
|
-
* Can override defaults like `User-Agent` but cannot override configured security headers.
|
|
21
|
-
*/
|
|
22
|
-
headers?: Record<string, string>;
|
|
23
|
-
/**
|
|
24
|
-
* Custom `fetch` implementation.
|
|
25
|
-
* Use this to inject logging, proxy configuration, or test doubles.
|
|
26
|
-
*/
|
|
27
|
-
fetch?: typeof globalThis.fetch;
|
|
28
|
-
}
|
|
29
|
-
export interface DalpAuthError {
|
|
30
|
-
code?: string;
|
|
31
|
-
message?: string;
|
|
32
|
-
status?: number;
|
|
33
|
-
statusText?: string;
|
|
34
|
-
[key: string]: unknown;
|
|
35
|
-
}
|
|
36
|
-
export interface DalpAuthResult<TData = unknown, TError = DalpAuthError> {
|
|
37
|
-
data: TData | null;
|
|
38
|
-
error: TError | null;
|
|
39
|
-
}
|
|
40
|
-
export type DalpAuthOperation<TInput = Record<string, unknown>, TData = unknown> = (input?: TInput, options?: unknown) => Promise<DalpAuthResult<TData>>;
|
|
41
|
-
export interface DalpAuthClient {
|
|
42
|
-
signIn: Record<string, DalpAuthOperation> & {
|
|
43
|
-
email: DalpAuthOperation;
|
|
44
|
-
};
|
|
45
|
-
signUp: Record<string, DalpAuthOperation> & {
|
|
46
|
-
email: DalpAuthOperation;
|
|
47
|
-
};
|
|
48
|
-
getSession: DalpAuthOperation;
|
|
49
|
-
listSessions: DalpAuthOperation;
|
|
50
|
-
revokeSession: DalpAuthOperation;
|
|
51
|
-
revokeOtherSessions: DalpAuthOperation;
|
|
52
|
-
apiKey: Record<string, DalpAuthOperation> & {
|
|
53
|
-
create: DalpAuthOperation;
|
|
54
|
-
list: DalpAuthOperation;
|
|
55
|
-
delete: DalpAuthOperation;
|
|
56
|
-
};
|
|
57
|
-
organization: Record<string, DalpAuthOperation> & {
|
|
58
|
-
create: DalpAuthOperation;
|
|
59
|
-
list: DalpAuthOperation;
|
|
60
|
-
setActive: DalpAuthOperation;
|
|
61
|
-
inviteMember: DalpAuthOperation;
|
|
62
|
-
acceptInvitation: DalpAuthOperation;
|
|
63
|
-
listMembers: DalpAuthOperation;
|
|
64
|
-
addMember: DalpAuthOperation;
|
|
65
|
-
removeMember: DalpAuthOperation;
|
|
66
|
-
};
|
|
67
|
-
admin: Record<string, DalpAuthOperation> & {
|
|
68
|
-
listUsers: DalpAuthOperation;
|
|
69
|
-
createUser: DalpAuthOperation;
|
|
70
|
-
removeUser: DalpAuthOperation;
|
|
71
|
-
setRole: DalpAuthOperation;
|
|
72
|
-
};
|
|
73
|
-
device: Record<string, DalpAuthOperation> & {
|
|
74
|
-
code: DalpAuthOperation;
|
|
75
|
-
token: DalpAuthOperation;
|
|
76
|
-
approve: DalpAuthOperation;
|
|
77
|
-
deny: DalpAuthOperation;
|
|
78
|
-
};
|
|
79
|
-
passkey: Record<string, DalpAuthOperation>;
|
|
80
|
-
twoFactor: Record<string, DalpAuthOperation> & {
|
|
81
|
-
enable: DalpAuthOperation;
|
|
82
|
-
disable: DalpAuthOperation;
|
|
83
|
-
verifyTotp: DalpAuthOperation;
|
|
84
|
-
verifyBackupCode: DalpAuthOperation;
|
|
85
|
-
generateBackupCodes: DalpAuthOperation;
|
|
86
|
-
};
|
|
87
|
-
wallet: {
|
|
88
|
-
pincode: {
|
|
89
|
-
enable: DalpAuthOperation;
|
|
90
|
-
disable: DalpAuthOperation;
|
|
91
|
-
update: DalpAuthOperation;
|
|
92
|
-
reset: DalpAuthOperation;
|
|
93
|
-
};
|
|
94
|
-
twoFactor: {
|
|
95
|
-
enable: DalpAuthOperation;
|
|
96
|
-
disable: DalpAuthOperation;
|
|
97
|
-
verify: DalpAuthOperation;
|
|
98
|
-
};
|
|
99
|
-
secretCodes: {
|
|
100
|
-
generate: DalpAuthOperation;
|
|
101
|
-
confirm: DalpAuthOperation;
|
|
102
|
-
};
|
|
103
|
-
passkey: {
|
|
104
|
-
register: DalpAuthOperation;
|
|
105
|
-
complete: DalpAuthOperation;
|
|
106
|
-
disable: DalpAuthOperation;
|
|
107
|
-
challenge: DalpAuthOperation;
|
|
108
|
-
verify: DalpAuthOperation;
|
|
109
|
-
};
|
|
110
|
-
};
|
|
111
|
-
$fetch: (path: string, options?: Record<string, unknown>) => Promise<unknown>;
|
|
112
|
-
$ERROR_CODES: Record<string, unknown>;
|
|
113
|
-
}
|
|
114
|
-
export declare function createDalpAuthClient(config: DalpAuthClientConfig): DalpAuthClient;
|
|
115
|
-
//# sourceMappingURL=auth.d.ts.map
|
|
1
|
+
export { createDalpAuthClient, makeDalpAuthClient } from "./auth/live.ts";
|
|
2
|
+
export type { DalpAuthClient } from "./auth/live.ts";
|
|
3
|
+
export { decodeDalpAuthClientConfig } from "./auth/client.ts";
|
|
4
|
+
export type { DalpAuthSurface } from "./auth-surface.ts";
|
|
5
|
+
export type { DalpAuthClientConfig, DalpCliAuthClient, DalpAuthError, DalpAuthOperation, DalpAuthResult, DalpOrganizationInvitation, DalpOrganizationInvitationsQuery, DalpOrganizationMember, DalpOrganizationMembersQuery, DecodedDalpAuthClientConfig, } from "./auth/client.ts";
|
|
6
|
+
export type { DalpPasskeyCeremony } from "./auth/native-passkey.ts";
|
|
7
|
+
export type { DalpRuntime } from "./runtime.ts";
|
|
8
|
+
export type { WalletAuthEndpointPath } from "./auth/wallet-plugins.ts";
|