@settlemint/dalp-sdk 3.1.18-main.33808370488 → 3.1.18

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 (104) hide show
  1. package/README.md +169 -154
  2. package/dist/{auth/permissions.d.ts → auth-permissions.d.ts} +2 -1
  3. package/dist/auth-permissions.d.ts.map +1 -0
  4. package/dist/{auth/wallet-plugins.d.ts → auth-wallet-plugins.d.ts} +5 -69
  5. package/dist/auth-wallet-plugins.d.ts.map +1 -0
  6. package/dist/auth.d.ts +115 -22
  7. package/dist/auth.d.ts.map +1 -0
  8. package/dist/bundler.d.ts +207 -14
  9. package/dist/bundler.d.ts.map +1 -0
  10. package/dist/chunk-xm8h1dzh.js +33 -0
  11. package/dist/client.d.ts +19 -0
  12. package/dist/client.d.ts.map +1 -0
  13. package/dist/contract-errors.d.ts +4156 -0
  14. package/dist/contract-errors.d.ts.map +1 -0
  15. package/dist/contract.d.ts +17 -0
  16. package/dist/contract.d.ts.map +1 -0
  17. package/dist/cookie-store.d.ts +10 -0
  18. package/dist/cookie-store.d.ts.map +1 -0
  19. package/dist/dapi-errors.d.ts +650 -0
  20. package/dist/dapi-errors.d.ts.map +1 -0
  21. package/dist/errors.d.ts +633 -0
  22. package/dist/errors.d.ts.map +1 -0
  23. package/dist/index.d.ts +40 -28
  24. package/dist/index.d.ts.map +1 -0
  25. package/dist/index.js +96109 -131
  26. package/dist/platform.d.ts +41 -0
  27. package/dist/platform.d.ts.map +1 -0
  28. package/dist/plugins/index.d.ts +13 -0
  29. package/dist/plugins/index.d.ts.map +1 -0
  30. package/dist/plugins/index.js +10 -0
  31. package/dist/sdk-error.d.ts +74 -0
  32. package/dist/sdk-error.d.ts.map +1 -0
  33. package/dist/serializers.d.ts +41 -0
  34. package/dist/serializers.d.ts.map +1 -0
  35. package/dist/types.d.ts +102 -65
  36. package/dist/types.d.ts.map +1 -0
  37. package/dist/url.d.ts +1 -0
  38. package/dist/url.d.ts.map +1 -0
  39. package/dist/verify-webhook.d.ts +28 -17
  40. package/dist/verify-webhook.d.ts.map +1 -0
  41. package/dist/version.d.ts +1 -0
  42. package/dist/version.d.ts.map +1 -0
  43. package/dist/wait-for-transaction.d.ts +81 -54
  44. package/dist/wait-for-transaction.d.ts.map +1 -0
  45. package/dist/webhook-events.d.ts +27 -44
  46. package/dist/webhook-events.d.ts.map +1 -0
  47. package/package.json +30 -103
  48. package/dist/auth/client.d.ts +0 -113
  49. package/dist/auth/live.d.ts +0 -4366
  50. package/dist/auth.js +0 -329
  51. package/dist/bundler.js +0 -99
  52. package/dist/chunk-9k284df4.js +0 -4
  53. package/dist/chunk-def7rqy6.js +0 -946
  54. package/dist/chunk-f4t1bm86.js +0 -67
  55. package/dist/chunk-fjnq61hj.js +0 -11
  56. package/dist/chunk-h12fatty.js +0 -63
  57. package/dist/chunk-qp5ty384.js +0 -260
  58. package/dist/chunk-r0vsftj4.js +0 -102
  59. package/dist/chunk-tmk1f2yb.js +0 -33
  60. package/dist/chunk-y0d2c7kp.js +0 -54
  61. package/dist/client/conditional-request.d.ts +0 -30
  62. package/dist/client/factory.d.ts +0 -14
  63. package/dist/client/query-serializer.d.ts +0 -2
  64. package/dist/client/request-compression.d.ts +0 -47
  65. package/dist/client/ssr-fetch.d.ts +0 -12
  66. package/dist/effect.d.ts +0 -69
  67. package/dist/effect.js +0 -82
  68. package/dist/errors/api-error.d.ts +0 -29
  69. package/dist/errors/find-current-error.d.ts +0 -8
  70. package/dist/errors/sdk-error.d.ts +0 -52
  71. package/dist/errors/sdk-error.js +0 -8
  72. package/dist/generated/api-types.d.ts +0 -41271
  73. package/dist/generated/response-scalars.d.ts +0 -9
  74. package/dist/generated/routes.d.ts +0 -12
  75. package/dist/proxy/builder.d.ts +0 -47
  76. package/dist/proxy/client.d.ts +0 -32
  77. package/dist/proxy/fetch-executor.d.ts +0 -28
  78. package/dist/proxy/flat-args.d.ts +0 -51
  79. package/dist/proxy/settlement.d.ts +0 -67
  80. package/dist/proxy/sse.d.ts +0 -54
  81. package/dist/proxy/tanstack.d.ts +0 -27
  82. package/dist/proxy/transport.d.ts +0 -73
  83. package/dist/react-query.d.ts +0 -16
  84. package/dist/react-query.js +0 -13
  85. package/dist/readonly-deep.d.ts +0 -12
  86. package/dist/reads-as-funding-paused.d.ts +0 -20
  87. package/dist/routes/index.d.ts +0 -20
  88. package/dist/routes/index.js +0 -10
  89. package/dist/routes/types.d.ts +0 -51
  90. package/dist/runtime-exports.d.ts +0 -20
  91. package/dist/runtime-exports.js +0 -16
  92. package/dist/scalars/big-decimal.d.ts +0 -16
  93. package/dist/scalars/ethereum-address.d.ts +0 -20
  94. package/dist/scalars/exchange-rates.d.ts +0 -27
  95. package/dist/scalars/index.d.ts +0 -18
  96. package/dist/scalars/index.js +0 -86
  97. package/dist/scalars/organization-id.d.ts +0 -20
  98. package/dist/secret.d.ts +0 -14
  99. package/dist/sign-webhook-receipt.d.ts +0 -76
  100. package/dist/sign-webhook-receipt.js +0 -26
  101. package/dist/transport/cookie-store.d.ts +0 -9
  102. package/dist/transport/sse-lifecycle.d.ts +0 -44
  103. package/dist/verify-webhook.js +0 -8
  104. package/dist/wait-for-transaction.js +0 -120
package/dist/bundler.d.ts CHANGED
@@ -1,24 +1,217 @@
1
- import { type Address, type Hex } from "viem";
1
+ import type { Address, Hex } from "viem";
2
2
  import type { RpcEstimateUserOperationGasReturnType, RpcUserOperation, RpcUserOperationRequest } from "viem/account-abstraction";
3
- import type { DalpFetch } from "./client/ssr-fetch.ts";
4
- import type { ReadonlyDeep } from "./readonly-deep.ts";
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
+ */
5
14
  export type DalpEstimateUserOperationGasReturnType = RpcEstimateUserOperationGasReturnType<"0.9">;
6
15
  export type DalpUserOperation = RpcUserOperation<"0.9">;
7
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
+ */
8
163
  export interface DalpBundlerClientConfig {
9
- readonly url: string;
10
- readonly apiKey: string;
11
- readonly organizationId?: string;
12
- readonly fetch?: DalpFetch;
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;
13
180
  }
181
+ /** A typed client over the eight ERC-4337 / ERC-7677 bundler JSON-RPC methods. */
14
182
  export interface DalpBundlerClient {
15
- sendUserOperation(operation: ReadonlyDeep<DalpUserOperation>, entryPoint: Address): Promise<Hex>;
16
- estimateUserOperationGas(operation: ReadonlyDeep<DalpUserOperationRequest>, entryPoint: Address): Promise<DalpEstimateUserOperationGasReturnType>;
17
- getUserOperationByHash(hash: Hex): Promise<unknown>;
18
- getUserOperationReceipt(hash: Hex): Promise<unknown>;
19
- getSupportedEntryPoints(): Promise<ReadonlyArray<Address>>;
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
+ */
20
202
  getChainId(): Promise<bigint>;
21
- getPaymasterStubData(operation: ReadonlyDeep<DalpUserOperationRequest>, entryPoint: Address): Promise<unknown>;
22
- getPaymasterData(operation: ReadonlyDeep<DalpUserOperationRequest>, entryPoint: Address): Promise<unknown>;
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>;
23
214
  }
24
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,MAAM,CAAC;AACzC,OAAO,KAAK,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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"}