@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
package/dist/chunk-b03ycwb7.js
DELETED
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
// src/proxy/builder.ts
|
|
2
|
-
var ROUTE_ID_DOT_OR_SLASH = /[./]/u;
|
|
3
|
-
function buildIndex(table) {
|
|
4
|
-
const root = { children: new Map };
|
|
5
|
-
for (const id of Object.keys(table.routes)) {
|
|
6
|
-
let cursor = root;
|
|
7
|
-
for (const segment of id.split(ROUTE_ID_DOT_OR_SLASH)) {
|
|
8
|
-
let next = cursor.children.get(segment);
|
|
9
|
-
if (next === undefined) {
|
|
10
|
-
next = { children: new Map };
|
|
11
|
-
cursor.children.set(segment, next);
|
|
12
|
-
}
|
|
13
|
-
cursor = next;
|
|
14
|
-
}
|
|
15
|
-
cursor.routeId = id;
|
|
16
|
-
}
|
|
17
|
-
return root;
|
|
18
|
-
}
|
|
19
|
-
function makeNode(node, table, executor, factories, cache) {
|
|
20
|
-
const cached = cache.get(node);
|
|
21
|
-
if (cached !== undefined) {
|
|
22
|
-
return cached;
|
|
23
|
-
}
|
|
24
|
-
const route = node.routeId === undefined ? undefined : table.routes[node.routeId];
|
|
25
|
-
const id = node.routeId;
|
|
26
|
-
const target = route === undefined || id === undefined ? {} : Object.assign((input, options) => executor(route, id, input, options), {
|
|
27
|
-
queryOptions: (input, options) => factories.queryOptions(route, id, input, options),
|
|
28
|
-
mutationOptions: (options) => factories.mutationOptions(route, id, options)
|
|
29
|
-
});
|
|
30
|
-
const proxy = new Proxy(target, {
|
|
31
|
-
get(base, property, receiver) {
|
|
32
|
-
if (typeof property !== "string") {
|
|
33
|
-
return Reflect.get(base, property, receiver);
|
|
34
|
-
}
|
|
35
|
-
if (Object.hasOwn(base, property) || property in Function.prototype) {
|
|
36
|
-
return Reflect.get(base, property, receiver);
|
|
37
|
-
}
|
|
38
|
-
const child = node.children.get(property);
|
|
39
|
-
return child === undefined ? undefined : makeNode(child, table, executor, factories, cache);
|
|
40
|
-
},
|
|
41
|
-
has(base, property) {
|
|
42
|
-
return typeof property === "string" && node.children.has(property) || Reflect.has(base, property);
|
|
43
|
-
},
|
|
44
|
-
ownKeys(base) {
|
|
45
|
-
return [...new Set([...Reflect.ownKeys(base), ...node.children.keys()])];
|
|
46
|
-
},
|
|
47
|
-
getOwnPropertyDescriptor(base, property) {
|
|
48
|
-
if (typeof property === "string" && node.children.has(property)) {
|
|
49
|
-
return {
|
|
50
|
-
configurable: true,
|
|
51
|
-
enumerable: true,
|
|
52
|
-
value: makeNode(node.children.get(property), table, executor, factories, cache)
|
|
53
|
-
};
|
|
54
|
-
}
|
|
55
|
-
return Reflect.getOwnPropertyDescriptor(base, property);
|
|
56
|
-
}
|
|
57
|
-
});
|
|
58
|
-
cache.set(node, proxy);
|
|
59
|
-
return proxy;
|
|
60
|
-
}
|
|
61
|
-
function buildProxy(table, executor, factories) {
|
|
62
|
-
return makeNode(buildIndex(table), table, executor, factories, new Map);
|
|
63
|
-
}
|
|
64
|
-
function findRoute(table, id) {
|
|
65
|
-
return table.routes[id];
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
export { buildProxy, findRoute };
|