@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.
Files changed (123) hide show
  1. package/README.md +172 -239
  2. package/dist/api-types.generated.d.ts +14160 -0
  3. package/dist/api-types.generated.d.ts.map +1 -0
  4. package/dist/{auth/permissions.d.ts → auth-permissions.d.ts} +8 -0
  5. package/dist/auth-permissions.d.ts.map +1 -0
  6. package/dist/{auth/wallet-plugins.d.ts → auth-wallet-plugins.d.ts} +6 -68
  7. package/dist/auth-wallet-plugins.d.ts.map +1 -0
  8. package/dist/auth.d.ts +115 -8
  9. package/dist/auth.d.ts.map +1 -0
  10. package/dist/bundler.d.ts +217 -0
  11. package/dist/bundler.d.ts.map +1 -0
  12. package/dist/chunk-xm8h1dzh.js +33 -0
  13. package/dist/client.d.ts +19 -0
  14. package/dist/client.d.ts.map +1 -0
  15. package/dist/contract-errors.d.ts +4156 -0
  16. package/dist/contract-errors.d.ts.map +1 -0
  17. package/dist/contract.d.ts +22 -0
  18. package/dist/contract.d.ts.map +1 -0
  19. package/dist/cookie-store.d.ts +10 -0
  20. package/dist/cookie-store.d.ts.map +1 -0
  21. package/dist/dapi-errors.d.ts +654 -0
  22. package/dist/dapi-errors.d.ts.map +1 -0
  23. package/dist/errors.d.ts +637 -0
  24. package/dist/errors.d.ts.map +1 -0
  25. package/dist/index.d.ts +45 -28
  26. package/dist/index.d.ts.map +1 -0
  27. package/dist/index.js +96216 -150
  28. package/dist/platform.d.ts +41 -0
  29. package/dist/platform.d.ts.map +1 -0
  30. package/dist/plugins/index.d.ts +13 -0
  31. package/dist/plugins/index.d.ts.map +1 -0
  32. package/dist/plugins/index.js +10 -0
  33. package/dist/sdk-error.d.ts +74 -0
  34. package/dist/sdk-error.d.ts.map +1 -0
  35. package/dist/serializers.d.ts +41 -0
  36. package/dist/serializers.d.ts.map +1 -0
  37. package/dist/types.d.ts +114 -37
  38. package/dist/types.d.ts.map +1 -0
  39. package/dist/url.d.ts +1 -0
  40. package/dist/url.d.ts.map +1 -0
  41. package/dist/verify-webhook.d.ts +28 -17
  42. package/dist/verify-webhook.d.ts.map +1 -0
  43. package/dist/version.d.ts +3 -0
  44. package/dist/version.d.ts.map +1 -0
  45. package/dist/version.generated.d.ts +8 -0
  46. package/dist/version.generated.d.ts.map +1 -0
  47. package/dist/wait-for-transaction.d.ts +86 -44
  48. package/dist/wait-for-transaction.d.ts.map +1 -0
  49. package/dist/webhook-events.d.ts +33 -543
  50. package/dist/webhook-events.d.ts.map +1 -0
  51. package/package.json +34 -110
  52. package/dist/auth/client.d.ts +0 -103
  53. package/dist/auth/invite-step-up.d.ts +0 -2
  54. package/dist/auth/live.d.ts +0 -47
  55. package/dist/auth/native-passkey.d.ts +0 -9
  56. package/dist/auth-surface.d.ts +0 -2
  57. package/dist/auth.js +0 -525
  58. package/dist/chunk-4f4kjtt0.js +0 -149
  59. package/dist/chunk-b03ycwb7.js +0 -68
  60. package/dist/chunk-ghgcmyhk.js +0 -5
  61. package/dist/chunk-h241xecg.js +0 -1625
  62. package/dist/chunk-hqz56e6q.js +0 -4
  63. package/dist/chunk-k3ntysxx.js +0 -57
  64. package/dist/chunk-pjjrxre1.js +0 -36
  65. package/dist/chunk-qvtjb3dz.js +0 -102
  66. package/dist/chunk-v54k7mgr.js +0 -271
  67. package/dist/chunk-w361dpdk.js +0 -5
  68. package/dist/client/conditional-request.d.ts +0 -8
  69. package/dist/client/factory.d.ts +0 -4
  70. package/dist/client/query-serializer.d.ts +0 -1
  71. package/dist/client/request-compression.d.ts +0 -12
  72. package/dist/client/ssr-fetch.d.ts +0 -10
  73. package/dist/client/step-up-challenge.d.ts +0 -10
  74. package/dist/effect.d.ts +0 -38
  75. package/dist/effect.js +0 -87
  76. package/dist/errors/api-error.d.ts +0 -35
  77. package/dist/errors/error-codes.d.ts +0 -21
  78. package/dist/errors/find-current-error.d.ts +0 -2
  79. package/dist/errors/sdk-error.d.ts +0 -52
  80. package/dist/errors/sdk-error.js +0 -8
  81. package/dist/generated/api-types.d.ts +0 -69961
  82. package/dist/generated/console-routes.d.ts +0 -12
  83. package/dist/generated/error-catalog.d.ts +0 -9
  84. package/dist/generated/error-codes.d.ts +0 -9
  85. package/dist/generated/response-scalars.d.ts +0 -9
  86. package/dist/generated/response-schemas.d.ts +0 -9
  87. package/dist/generated/route-error-codes.d.ts +0 -9
  88. package/dist/generated/routes.d.ts +0 -12
  89. package/dist/proxy/builder.d.ts +0 -17
  90. package/dist/proxy/client-core.d.ts +0 -28
  91. package/dist/proxy/client.d.ts +0 -5
  92. package/dist/proxy/fetch-executor.d.ts +0 -6
  93. package/dist/proxy/flat-args.d.ts +0 -24
  94. package/dist/proxy/response-decode.d.ts +0 -37
  95. package/dist/proxy/sse.d.ts +0 -11
  96. package/dist/proxy/step-up-challenge.d.ts +0 -4
  97. package/dist/proxy/tanstack.d.ts +0 -6
  98. package/dist/proxy/transport.d.ts +0 -63
  99. package/dist/react-query.d.ts +0 -2
  100. package/dist/react-query.js +0 -12
  101. package/dist/readonly-deep.d.ts +0 -3
  102. package/dist/routes/console.d.ts +0 -14
  103. package/dist/routes/console.js +0 -25
  104. package/dist/routes/index.d.ts +0 -4
  105. package/dist/routes/index.js +0 -10
  106. package/dist/routes/types.d.ts +0 -72
  107. package/dist/runtime-exports.d.ts +0 -4
  108. package/dist/runtime-exports.js +0 -16
  109. package/dist/runtime.d.ts +0 -11
  110. package/dist/scalars/big-decimal.d.ts +0 -4
  111. package/dist/scalars/ethereum-address.d.ts +0 -5
  112. package/dist/scalars/exchange-rates.d.ts +0 -13
  113. package/dist/scalars/index.d.ts +0 -10
  114. package/dist/scalars/index.js +0 -102
  115. package/dist/scalars/organization-id.d.ts +0 -5
  116. package/dist/scalars/token-decimals.d.ts +0 -4
  117. package/dist/secret.d.ts +0 -12
  118. package/dist/sign-webhook-receipt.d.ts +0 -16
  119. package/dist/sign-webhook-receipt.js +0 -26
  120. package/dist/transport/cookie-store.d.ts +0 -9
  121. package/dist/transport/sse-lifecycle.d.ts +0 -24
  122. package/dist/verify-webhook.js +0 -8
  123. package/dist/wait-for-transaction.js +0 -151
@@ -1,5 +1,13 @@
1
+ /**
2
+ * Client-side Better Auth access-control metadata for DALP auth clients.
3
+ *
4
+ * Related: packages/dalp/auth/src/utils/permissions.ts, kit/sdk/src/auth.ts
5
+ *
6
+ * @module
7
+ */
1
8
  import { type AccessControl, type Role } from "better-auth/plugins/access";
2
9
  export declare const accessControl: AccessControl;
3
10
  export declare const adminRole: Role;
4
11
  export declare const ownerRole: Role;
5
12
  export declare const memberRole: Role;
13
+ //# sourceMappingURL=auth-permissions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"auth-permissions.d.ts","sourceRoot":"","sources":["../src/auth-permissions.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,EAAE,KAAK,aAAa,EAAE,KAAK,IAAI,EAAuB,MAAM,4BAA4B,CAAC;AAuBhG,eAAO,MAAM,aAAa,EAAE,aAI1B,CAAC;AAEH,eAAO,MAAM,SAAS,EAAE,IAOtB,CAAC;AAEH,eAAO,MAAM,SAAS,EAAE,IAMtB,CAAC;AAEH,eAAO,MAAM,UAAU,EAAE,IAKvB,CAAC"}
@@ -1,68 +1,3 @@
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
- }
66
1
  export declare const walletPincodeClient: () => {
67
2
  id: "wallet-pincode";
68
3
  $InferServerPlugin: {
@@ -143,6 +78,9 @@ export declare const walletSecretCodesClient: () => {
143
78
  signal: "$sessionSignal";
144
79
  }[];
145
80
  };
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>;
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
+ /** CLI coverage keys for DALP wallet Better Auth plugin endpoints (no leading slash). */
84
+ export type WalletAuthEndpointPath = StripLeadingSlash<WalletPluginPathMethodKeys & string>;
85
+ export {};
86
+ //# sourceMappingURL=auth-wallet-plugins.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"auth-wallet-plugins.d.ts","sourceRoot":"","sources":["../src/auth-wallet-plugins.ts"],"names":[],"mappings":"AA6BA,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqBK,CAAC;AAEtC,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;CAoBG,CAAC;AAEtC,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;CAmBC,CAAC;AAEtC,KAAK,iBAAiB,CAAC,CAAC,SAAS,MAAM,IAAI,CAAC,SAAS,IAAI,MAAM,IAAI,EAAE,GAAG,IAAI,GAAG,KAAK,CAAC;AAErF,KAAK,0BAA0B,GAC3B,MAAM,UAAU,CAAC,OAAO,mBAAmB,CAAC,CAAC,aAAa,CAAC,GAC3D,MAAM,UAAU,CAAC,OAAO,qBAAqB,CAAC,CAAC,aAAa,CAAC,GAC7D,MAAM,UAAU,CAAC,OAAO,uBAAuB,CAAC,CAAC,aAAa,CAAC,CAAC;AAEpE,yFAAyF;AACzF,MAAM,MAAM,sBAAsB,GAAG,iBAAiB,CAAC,0BAA0B,GAAG,MAAM,CAAC,CAAC"}
package/dist/auth.d.ts CHANGED
@@ -1,8 +1,115 @@
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";
1
+ import { DalpCookieStore } from "./cookie-store.js";
2
+ export interface DalpAuthClientConfig {
3
+ /** Base URL of the DALP API (e.g., `"https://dalp.example.com"`). */
4
+ url: string;
5
+ /** API key used for Better Auth API-key-authenticated operations. */
6
+ apiKey?: string;
7
+ /** Better Auth session token sent as an Authorization bearer token. */
8
+ sessionToken?: string;
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
@@ -0,0 +1 @@
1
+ {"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../src/auth.ts"],"names":[],"mappings":"AAoBA,OAAO,EAA0B,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAK5E,MAAM,WAAW,oBAAoB;IACnC,qEAAqE;IACrE,GAAG,EAAE,MAAM,CAAC;IAEZ,qEAAqE;IACrE,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB,uEAAuE;IACvE,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB,qEAAqE;IACrE,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB,+EAA+E;IAC/E,WAAW,CAAC,EAAE,eAAe,CAAC;IAE9B;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAEjC;;;OAGG;IACH,KAAK,CAAC,EAAE,OAAO,UAAU,CAAC,KAAK,CAAC;CACjC;AAED,MAAM,WAAW,aAAa;IAC5B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAED,MAAM,WAAW,cAAc,CAAC,KAAK,GAAG,OAAO,EAAE,MAAM,GAAG,aAAa;IACrE,IAAI,EAAE,KAAK,GAAG,IAAI,CAAC;IACnB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;CACtB;AAGD,MAAM,MAAM,iBAAiB,CAAC,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,KAAK,GAAG,OAAO,IAAI,CACjF,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AC,CAAC;IAE9E,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACvC;AAED,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,oBAAoB,GAAG,cAAc,CA+CjF"}
@@ -0,0 +1,217 @@
1
+ import type { Address, Hex } from "viem";
2
+ import type { RpcEstimateUserOperationGasReturnType, RpcUserOperation, RpcUserOperationRequest } from "viem/account-abstraction";
3
+ import type { DapiPublicError } from "./dapi-errors.js";
4
+ import { DalpSdkError } from "./sdk-error.js";
5
+ /**
6
+ * viem's ERC-4337 RPC **input** types, re-exported under SDK-owned names so
7
+ * consumer code never imports from `viem`. These stay type-only — `import type`
8
+ * keeps viem's account-abstraction runtime off the published call path. The
9
+ * viem generic is pinned to `"0.9"` because the DALP bundler serves EntryPoint
10
+ * v0.9 only and reconstructs a `UserOperation<"0.9">` from the v0.9 fields; the
11
+ * version-generic types would accept older-EntryPoint fields (`initCode`,
12
+ * `paymasterAndData`) the server silently drops.
13
+ */
14
+ export type DalpEstimateUserOperationGasReturnType = RpcEstimateUserOperationGasReturnType<"0.9">;
15
+ export type DalpUserOperation = RpcUserOperation<"0.9">;
16
+ export type DalpUserOperationRequest = RpcUserOperationRequest<"0.9">;
17
+ /**
18
+ * ERC-7769 / ERC-4337 account-abstraction JSON-RPC error codes, vendored from
19
+ * `kit/dapi/src/routes/bundler/types.ts`. The catalog is non-contiguous:
20
+ * `-32506` is intentionally absent from this v0.9 dispatcher surface. The codes
21
+ * are fixed by ERC-7769, so the drift test (`bundler.test.ts`) asserts these
22
+ * against the explicit standard values as a transcription guard.
23
+ */
24
+ export declare const BUNDLER_AA_ERROR_CODES: {
25
+ readonly AA_VALIDATION: -32500;
26
+ readonly AA_PAYMASTER_VALIDATION: -32501;
27
+ readonly AA_OPCODE: -32502;
28
+ readonly AA_OUT_OF_TIME_RANGE: -32503;
29
+ readonly AA_PAYMASTER_THROTTLED: -32504;
30
+ readonly AA_STAKE: -32505;
31
+ readonly AA_SIGNATURE: -32507;
32
+ readonly AA_PAYMASTER_BALANCE: -32508;
33
+ };
34
+ export declare const BUNDLER_VENDOR_ERROR_CODES: {
35
+ readonly EXECUTION_REVERTED: -32521;
36
+ };
37
+ /** Name of a vendored ERC-7769 account-abstraction error code. */
38
+ export type BundlerAaErrorName = keyof typeof BUNDLER_AA_ERROR_CODES;
39
+ export type BundlerVendorErrorName = keyof typeof BUNDLER_VENDOR_ERROR_CODES;
40
+ /** Options for constructing a {@link DalpBundlerError}. */
41
+ export interface DalpBundlerErrorOptions {
42
+ /** The numeric JSON-RPC error code returned by the bundler endpoint. */
43
+ code: number;
44
+ message: string;
45
+ why: string;
46
+ fix: string;
47
+ aaErrorName?: BundlerAaErrorName;
48
+ vendorErrorName?: BundlerVendorErrorName;
49
+ revertData?: Hex;
50
+ dapiError?: DapiPublicError;
51
+ status?: number;
52
+ /** Whether the failure is retryable. Defaults to `false` when omitted. */
53
+ retryable?: boolean;
54
+ cause?: unknown;
55
+ }
56
+ declare class DalpBundlerRpcError extends DalpSdkError {
57
+ /** The vendored AA error name when `code` maps to a known ERC-7769 code. */
58
+ readonly aaErrorName?: BundlerAaErrorName;
59
+ readonly vendorErrorName?: BundlerVendorErrorName;
60
+ readonly revertData?: Hex;
61
+ constructor(options: DalpBundlerErrorOptions);
62
+ }
63
+ /**
64
+ * A bundler/paymaster JSON-RPC failure. Extends {@link DalpSdkError}; the
65
+ * `code` field carries the numeric ERC-7769 JSON-RPC error code so callers can
66
+ * branch on `BUNDLER_AA_ERROR_CODES`. The concrete class is re-typed here so
67
+ * `code` surfaces as `number` rather than ORPCError's inherited `string`.
68
+ */
69
+ export type DalpBundlerError = Omit<DalpBundlerRpcError, "code"> & {
70
+ readonly code: number;
71
+ };
72
+ export declare const DalpBundlerError: {
73
+ new (options: DalpBundlerErrorOptions): DalpBundlerError;
74
+ readonly prototype: DalpBundlerError;
75
+ };
76
+ /**
77
+ * A mined or in-flight UserOperation as returned by `eth_getUserOperationByHash`.
78
+ *
79
+ * SDK-owned (not viem's `RpcGetUserOperationByHashReturnType`) because the server
80
+ * emits a DALP-partial shape: a mined result carries only
81
+ * `userOperation: { sender, nonce }` with `blockHash: null`, while an in-flight
82
+ * result carries the full canonical UserOperation with `blockNumber`/`blockHash`/
83
+ * `transactionHash` null. Fields the server always emits are required; fields it
84
+ * omits are optional.
85
+ */
86
+ export interface BundlerUserOperationByHash {
87
+ userOperation: {
88
+ sender: Address;
89
+ nonce: Hex;
90
+ callData?: Hex;
91
+ callGasLimit?: Hex;
92
+ verificationGasLimit?: Hex;
93
+ preVerificationGas?: Hex;
94
+ maxFeePerGas?: Hex;
95
+ maxPriorityFeePerGas?: Hex;
96
+ factory?: Address;
97
+ factoryData?: Hex;
98
+ paymaster?: Address;
99
+ paymasterVerificationGasLimit?: Hex;
100
+ paymasterPostOpGasLimit?: Hex;
101
+ paymasterData?: Hex;
102
+ signature?: Hex;
103
+ };
104
+ entryPoint: Address;
105
+ transactionHash: Hex | null;
106
+ blockNumber: Hex | null;
107
+ blockHash: Hex | null;
108
+ }
109
+ /** A single log entry within a {@link BundlerUserOperationReceipt}. */
110
+ export interface BundlerUserOperationReceiptLog {
111
+ address: Address;
112
+ /** Raw indexed EVM log topics for this UserOperation-attributed event. */
113
+ topics: Hex[];
114
+ data: Hex;
115
+ blockNumber: Hex;
116
+ blockHash: Hex | null;
117
+ transactionHash: Hex;
118
+ transactionIndex: Hex;
119
+ logIndex: Hex;
120
+ removed: boolean;
121
+ }
122
+ /**
123
+ * A UserOperation receipt as returned by `eth_getUserOperationReceipt`.
124
+ *
125
+ * SDK-owned (not viem's `RpcUserOperationReceipt`) because the server emits a
126
+ * minimal `receipt` ({@link BundlerUserOperationReceipt.receipt}), logs with a
127
+ * nullable `blockHash`, and a nullable `paymaster`.
128
+ */
129
+ export interface BundlerUserOperationReceipt {
130
+ userOpHash: Hex;
131
+ entryPoint: Address;
132
+ sender: Address;
133
+ nonce: Hex;
134
+ paymaster: Address | null;
135
+ actualGasCost: Hex;
136
+ actualGasUsed: Hex;
137
+ success: boolean;
138
+ logs: BundlerUserOperationReceiptLog[];
139
+ receipt: {
140
+ transactionHash: Hex;
141
+ blockNumber: Hex;
142
+ transactionIndex: Hex;
143
+ };
144
+ }
145
+ /** Result of `pm_getPaymasterStubData`. */
146
+ export interface BundlerPaymasterStubData {
147
+ paymaster: Address;
148
+ paymasterData: Hex;
149
+ paymasterVerificationGasLimit?: Hex;
150
+ paymasterPostOpGasLimit?: Hex;
151
+ }
152
+ /** Result of `pm_getPaymasterData`. */
153
+ export interface BundlerPaymasterData {
154
+ paymaster: Address;
155
+ paymasterData: Hex;
156
+ }
157
+ /**
158
+ * Configuration for {@link createDalpBundlerClient}.
159
+ *
160
+ * Unlike {@link createDalpClient}, `apiKey` is **required**: the bundler
161
+ * endpoint is auth-only (`requireApiKey: true`) with no public variant.
162
+ */
163
+ export interface DalpBundlerClientConfig {
164
+ /** Base URL of the DALP API (e.g., `"https://dalp.example.com"`). */
165
+ url: string;
166
+ /** API key for the bundler endpoint (issued via the DALP dashboard or CLI). */
167
+ apiKey: string;
168
+ /**
169
+ * Organization ID for multi-tenant setups.
170
+ * Pass this explicitly when the API key may map to more than one organization.
171
+ */
172
+ organizationId?: string;
173
+ /**
174
+ * Additional headers merged into every request. Cannot override the security
175
+ * headers (`x-api-key`, `x-organization-id`).
176
+ */
177
+ headers?: Record<string, string> | (() => Record<string, string> | Promise<Record<string, string>>);
178
+ /** Custom `fetch` implementation (logging, proxy, test doubles). */
179
+ fetch?: typeof globalThis.fetch;
180
+ }
181
+ /** A typed client over the eight ERC-4337 / ERC-7677 bundler JSON-RPC methods. */
182
+ export interface DalpBundlerClient {
183
+ /** `eth_sendUserOperation` — submit a caller-signed UserOperation; resolves to its hash. */
184
+ sendUserOperation(userOperation: RpcUserOperation<"0.9">, entryPoint: Address): Promise<Hex>;
185
+ /**
186
+ * `eth_estimateUserOperationGas` — estimate gas limits for a UserOperation.
187
+ * Takes the partial request shape (`RpcUserOperationRequest`): the gas and
188
+ * signature fields the estimate computes need not be populated.
189
+ */
190
+ estimateUserOperationGas(userOperation: RpcUserOperationRequest<"0.9">, entryPoint: Address): Promise<RpcEstimateUserOperationGasReturnType<"0.9">>;
191
+ /** `eth_getUserOperationByHash` — resolves the (DALP-partial) UserOperation, or `null` on miss. */
192
+ getUserOperationByHash(hash: Hex): Promise<BundlerUserOperationByHash | null>;
193
+ /** `eth_getUserOperationReceipt` — resolves the receipt, or `null` on miss. */
194
+ getUserOperationReceipt(hash: Hex): Promise<BundlerUserOperationReceipt | null>;
195
+ /** `eth_supportedEntryPoints` — the EntryPoint addresses this bundler serves. */
196
+ getSupportedEntryPoints(): Promise<Address[]>;
197
+ /**
198
+ * `eth_chainId` — the served chain id as a `bigint`, decoded from its hex
199
+ * quantity. Returns `bigint` (not `number`) so chain ids above
200
+ * `Number.MAX_SAFE_INTEGER` are represented without precision loss.
201
+ */
202
+ getChainId(): Promise<bigint>;
203
+ /**
204
+ * `pm_getPaymasterStubData` — stub paymaster data for gas estimation. Takes
205
+ * the partial request shape (`RpcUserOperationRequest`); paymaster fields are
206
+ * what this call produces.
207
+ */
208
+ getPaymasterStubData(userOperation: RpcUserOperationRequest<"0.9">, entryPoint: Address, chainId: number | bigint, context?: unknown): Promise<BundlerPaymasterStubData>;
209
+ /**
210
+ * `pm_getPaymasterData` — final paymaster sponsorship data. Takes the partial
211
+ * request shape (`RpcUserOperationRequest`).
212
+ */
213
+ getPaymasterData(userOperation: RpcUserOperationRequest<"0.9">, entryPoint: Address, chainId: number | bigint, context?: unknown): Promise<BundlerPaymasterData>;
214
+ }
215
+ export declare function createDalpBundlerClient(config: DalpBundlerClientConfig): DalpBundlerClient;
216
+ export {};
217
+ //# sourceMappingURL=bundler.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bundler.d.ts","sourceRoot":"","sources":["../src/bundler.ts"],"names":[],"mappings":"AA0BA,OAAO,KAAK,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,M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MAAM,CAAC,CAAC;IAC9B;;;;OAIG;IACH,oBAAoB,CAClB,aAAa,EAAE,uBAAuB,CAAC,KAAK,CAAC,EAC7C,UAAU,EAAE,OAAO,EACnB,OAAO,EAAE,MAAM,GAAG,MAAM,EACxB,OAAO,CAAC,EAAE,OAAO,GAChB,OAAO,CAAC,wBAAwB,CAAC,CAAC;IACrC;;;OAGG;IACH,gBAAgB,CACd,aAAa,EAAE,uBAAuB,CAAC,KAAK,CAAC,EAC7C,UAAU,EAAE,OAAO,EACnB,OAAO,EAAE,MAAM,GAAG,MAAM,EACxB,OAAO,CAAC,EAAE,OAAO,GAChB,OAAO,CAAC,oBAAoB,CAAC,CAAC;CAClC;AA2FD,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,uBAAuB,GAAG,iBAAiB,CA6I1F"}
@@ -0,0 +1,33 @@
1
+ var __create = Object.create;
2
+ var __getProtoOf = Object.getPrototypeOf;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ function __accessProp(key) {
7
+ return this[key];
8
+ }
9
+ var __toESMCache_node;
10
+ var __toESMCache_esm;
11
+ var __toESM = (mod, isNodeMode, target) => {
12
+ var canCache = mod != null && typeof mod === "object";
13
+ if (canCache) {
14
+ var cache = isNodeMode ? __toESMCache_node ??= new WeakMap : __toESMCache_esm ??= new WeakMap;
15
+ var cached = cache.get(mod);
16
+ if (cached)
17
+ return cached;
18
+ }
19
+ target = mod != null ? __create(__getProtoOf(mod)) : {};
20
+ const to = isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
21
+ for (let key of __getOwnPropNames(mod))
22
+ if (!__hasOwnProp.call(to, key))
23
+ __defProp(to, key, {
24
+ get: __accessProp.bind(mod, key),
25
+ enumerable: true
26
+ });
27
+ if (canCache)
28
+ cache.set(mod, to);
29
+ return to;
30
+ };
31
+ var __commonJS = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
32
+
33
+ export { __toESM, __commonJS };
@@ -0,0 +1,19 @@
1
+ import type { DalpClient, DalpClientConfig, PublicDalpClientConfig } from "./types.js";
2
+ /**
3
+ * Create a fully typed DALP API client.
4
+ *
5
+ * @example
6
+ * ```typescript
7
+ * import { createDalpClient } from "@settlemint/dalp-sdk";
8
+ *
9
+ * const dalp = createDalpClient({
10
+ * url: "https://dalp.example.com",
11
+ * apiKey: "sm_dalp_...",
12
+ * organizationId: "org_...",
13
+ * });
14
+ *
15
+ * const tokens = await dalp.token.list({ query: {} });
16
+ * ```
17
+ */
18
+ export declare function createDalpClient(config: DalpClientConfig | PublicDalpClientConfig): DalpClient;
19
+ //# sourceMappingURL=client.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAoBA,OAAO,KAAK,EAAE,UAAU,EAAyB,gBAAgB,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAC;AAmB9G;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,gBAAgB,GAAG,sBAAsB,GAAG,UAAU,CAsG9F"}