@settlemint/dalp-sdk 3.1.10 → 3.1.11-main.33556892334
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 +111 -177
- package/dist/auth/client.d.ts +115 -0
- package/dist/auth/live.d.ts +4366 -0
- package/dist/{auth-permissions.d.ts → auth/permissions.d.ts} +1 -2
- package/dist/{auth-wallet-plugins.d.ts → auth/wallet-plugins.d.ts} +69 -5
- package/dist/auth.d.ts +22 -115
- package/dist/auth.js +248 -0
- package/dist/bundler.d.ts +17 -207
- package/dist/bundler.js +111 -0
- package/dist/chunk-63xjs3xe.js +45725 -0
- package/dist/chunk-cy9b59s6.js +503 -0
- package/dist/chunk-h12fatty.js +63 -0
- package/dist/chunk-nac758dt.js +14542 -0
- package/dist/chunk-q8bjy1aa.js +255 -0
- package/dist/chunk-r0vsftj4.js +102 -0
- package/dist/chunk-w21k7p99.js +843 -0
- package/dist/chunk-y0d2c7kp.js +54 -0
- package/dist/client/conditional-request.d.ts +16 -0
- package/dist/client/factory.d.ts +39 -0
- package/dist/client/query-serializer.d.ts +2 -0
- package/dist/client/request-compression.d.ts +47 -0
- package/dist/client/ssr-fetch.d.ts +12 -0
- package/dist/errors/api-error.d.ts +29 -0
- package/dist/errors/find-current-error.d.ts +8 -0
- package/dist/errors/sdk-error.d.ts +52 -0
- package/dist/errors/sdk-error.js +8 -0
- package/dist/generated/@tanstack/react-query.gen.d.ts +17380 -0
- package/dist/generated/client/client.gen.d.ts +2 -0
- package/dist/generated/client/index.d.ts +10 -0
- package/dist/generated/client/types.gen.d.ts +120 -0
- package/dist/generated/client/utils.gen.d.ts +37 -0
- package/dist/generated/client.gen.d.ts +12 -0
- package/dist/generated/core/auth.gen.d.ts +25 -0
- package/dist/generated/core/bodySerializer.gen.d.ts +25 -0
- package/dist/generated/core/params.gen.d.ts +43 -0
- package/dist/generated/core/pathSerializer.gen.d.ts +33 -0
- package/dist/generated/core/queryKeySerializer.gen.d.ts +18 -0
- package/dist/generated/core/serverSentEvents.gen.d.ts +71 -0
- package/dist/generated/core/types.gen.d.ts +83 -0
- package/dist/generated/core/utils.gen.d.ts +19 -0
- package/dist/generated/index.d.ts +2 -0
- package/dist/generated/sdk.gen.d.ts +5214 -0
- package/dist/generated/types.gen.d.ts +137282 -0
- package/dist/generated/zod.gen.d.ts +181286 -0
- package/dist/index.d.ts +23 -40
- package/dist/index.js +208 -96098
- package/dist/operations.d.ts +12 -0
- package/dist/operations.js +1747 -0
- package/dist/react-query.d.ts +11 -0
- package/dist/react-query.js +16485 -0
- package/dist/readonly-deep.d.ts +12 -0
- package/dist/runtime-exports.d.ts +20 -0
- package/dist/runtime-exports.js +16 -0
- package/dist/scalars/big-decimal.d.ts +16 -0
- package/dist/scalars/ethereum-address.d.ts +8 -0
- package/dist/scalars/exchange-rates.d.ts +36 -0
- package/dist/scalars/index.d.ts +15 -0
- package/dist/scalars/index.js +39 -0
- package/dist/scalars/organization-id.d.ts +8 -0
- package/dist/schemas.d.ts +10 -0
- package/dist/schemas.js +12040 -0
- package/dist/secret.d.ts +14 -0
- package/dist/sign-webhook-receipt.d.ts +76 -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 +44 -0
- package/dist/types.d.ts +67 -102
- 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 -1
- package/dist/wait-for-transaction.d.ts +40 -86
- package/dist/wait-for-transaction.js +112 -0
- package/dist/webhook-events.d.ts +44 -27
- package/package.json +98 -30
- 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.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 -17
- 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 -650
- package/dist/dapi-errors.d.ts.map +0 -1
- package/dist/errors.d.ts +0 -633
- 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/wait-for-transaction.d.ts.map +0 -1
- package/dist/webhook-events.d.ts.map +0 -1
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A local deep-readonly, exported as a module rather than declared ambiently.
|
|
3
|
+
*
|
|
4
|
+
* An ambient `.d.ts` global compiles inside this workspace but never reaches the
|
|
5
|
+
* tarball, so every emitted declaration that named it referenced a type the
|
|
6
|
+
* consumer could not resolve. Exporting it makes the published declarations
|
|
7
|
+
* self-contained. The repository copy at `@core/schema/deep-readonly` is a
|
|
8
|
+
* private workspace package and must not be imported here.
|
|
9
|
+
*/
|
|
10
|
+
export type ReadonlyDeep<T> = T extends string | number | bigint | boolean | symbol | null | undefined | Date | RegExp | Map<unknown, unknown> | Set<unknown> | Promise<unknown> ? T : T extends CallableFunction ? T : T extends object ? {
|
|
11
|
+
readonly [Key in keyof T]: ReadonlyDeep<T[Key]>;
|
|
12
|
+
} : T;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Runtime dist files probed by Console `/readyz`.
|
|
3
|
+
*
|
|
4
|
+
* Completeness of the published package is the export graph walked by
|
|
5
|
+
* `kit/sdk/scripts/sdk-dist-artifact-graph.ts`. This list is the smaller boot
|
|
6
|
+
* probe subset. Keep in sync with `kit/dapp/server/sdk-runtime-export-paths.ts`
|
|
7
|
+
* (probe boot must not resolve this package at module evaluation).
|
|
8
|
+
*
|
|
9
|
+
* @module
|
|
10
|
+
*/
|
|
11
|
+
/** Relative paths under the `@settlemint/dalp-sdk` package root. */
|
|
12
|
+
export declare const SDK_RUNTIME_EXPORT_RELATIVE_PATHS: readonly ["dist/index.js", "dist/operations.js", "dist/types.js", "dist/index.d.ts", "dist/runtime-exports.js", "dist/runtime-exports.d.ts"];
|
|
13
|
+
/**
|
|
14
|
+
* Type-only published entries. Bun emits a 0-byte JS file for `export type *`
|
|
15
|
+
* modules; that empty file is valid ESM, so ensure-dist accepts size 0 here.
|
|
16
|
+
*/
|
|
17
|
+
export declare const SDK_TYPE_ONLY_EXPORT_RELATIVE_PATHS: readonly ["dist/types.js"];
|
|
18
|
+
export type SdkRuntimeExportRelativePath = (typeof SDK_RUNTIME_EXPORT_RELATIVE_PATHS)[number];
|
|
19
|
+
/** First runtime export — historical single-sentinel alias. */
|
|
20
|
+
export declare const SDK_BUILD_SENTINEL_RELATIVE_PATH: "dist/index.js";
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
// src/runtime-exports.ts
|
|
2
|
+
var SDK_RUNTIME_EXPORT_RELATIVE_PATHS = [
|
|
3
|
+
"dist/index.js",
|
|
4
|
+
"dist/operations.js",
|
|
5
|
+
"dist/types.js",
|
|
6
|
+
"dist/index.d.ts",
|
|
7
|
+
"dist/runtime-exports.js",
|
|
8
|
+
"dist/runtime-exports.d.ts"
|
|
9
|
+
];
|
|
10
|
+
var SDK_TYPE_ONLY_EXPORT_RELATIVE_PATHS = ["dist/types.js"];
|
|
11
|
+
var [SDK_BUILD_SENTINEL_RELATIVE_PATH] = SDK_RUNTIME_EXPORT_RELATIVE_PATHS;
|
|
12
|
+
export {
|
|
13
|
+
SDK_BUILD_SENTINEL_RELATIVE_PATH,
|
|
14
|
+
SDK_RUNTIME_EXPORT_RELATIVE_PATHS,
|
|
15
|
+
SDK_TYPE_ONLY_EXPORT_RELATIVE_PATHS
|
|
16
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* BigDecimal wire scalar: the API encodes arbitrary-precision decimals as
|
|
3
|
+
* plain decimal strings; consumers work with `dnum` values.
|
|
4
|
+
*
|
|
5
|
+
* Declared as a codec so both directions live in one place: `BigDecimal.parse`
|
|
6
|
+
* (or `z.decode`) reads a wire string into a `Dnum`, and `z.encode` writes it
|
|
7
|
+
* back. `encodeBigDecimal` stays as the named encoder callers already use.
|
|
8
|
+
*
|
|
9
|
+
* Encoding normalizes: `dnum` does not preserve trailing fractional zeros, so
|
|
10
|
+
* `"1.100"` decodes to the same value as `"1.1"` and re-encodes as `"1.1"`.
|
|
11
|
+
*/
|
|
12
|
+
import type { Dnum } from "dnum";
|
|
13
|
+
import * as z from "zod";
|
|
14
|
+
export declare const BigDecimal: z.ZodCodec<z.ZodString, z.ZodCustom<Dnum, Dnum>>;
|
|
15
|
+
export type BigDecimalValue = z.output<typeof BigDecimal>;
|
|
16
|
+
export declare const encodeBigDecimal: (value: Dnum) => string;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* EVM address scalar: accepts checksummed or lowercase wire forms, normalizes
|
|
3
|
+
* to the EIP-55 checksum via viem, and brands the result so plain strings do
|
|
4
|
+
* not pass as validated addresses at the type level.
|
|
5
|
+
*/
|
|
6
|
+
import * as z from "zod";
|
|
7
|
+
export declare const EthereumAddress: z.core.$ZodBranded<z.ZodPipe<z.ZodString & z.ZodType<`0x${string}`, string, z.core.$ZodTypeInternals<`0x${string}`, string>>, z.ZodTransform<`0x${string}`, `0x${string}`>>, "EthereumAddress", "out">;
|
|
8
|
+
export type EthereumAddressValue = z.output<typeof EthereumAddress>;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Reference scalar wrapper: composes the rich scalars onto the generated
|
|
3
|
+
* exchange-rates list response by extending the generated zod constants —
|
|
4
|
+
* generated files are never edited. The exported transformer is the KTD6
|
|
5
|
+
* injection mechanism: pass it as a per-call `responseTransformer` to the
|
|
6
|
+
* generated operation function or TanStack factory (caller options spread
|
|
7
|
+
* after the generated transformer, so the override wins; `createQueryKey`
|
|
8
|
+
* ignores it, so query keys stay stable).
|
|
9
|
+
*/
|
|
10
|
+
import * as z from "zod";
|
|
11
|
+
export declare const ExchangeRatesListResponse: z.ZodObject<{
|
|
12
|
+
meta: z.ZodObject<{
|
|
13
|
+
total: z.ZodInt;
|
|
14
|
+
facets: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodObject<{
|
|
15
|
+
value: z.ZodString;
|
|
16
|
+
count: z.ZodInt;
|
|
17
|
+
}, z.core.$strict>>>>;
|
|
18
|
+
}, z.core.$strict>;
|
|
19
|
+
links: z.ZodObject<{
|
|
20
|
+
self: z.ZodString;
|
|
21
|
+
first: z.ZodString;
|
|
22
|
+
prev: z.ZodNullable<z.ZodString>;
|
|
23
|
+
next: z.ZodNullable<z.ZodString>;
|
|
24
|
+
last: z.ZodString;
|
|
25
|
+
}, z.core.$strict>;
|
|
26
|
+
data: z.ZodArray<z.ZodObject<{
|
|
27
|
+
baseCurrency: z.ZodString;
|
|
28
|
+
quoteCurrency: z.ZodString;
|
|
29
|
+
effectiveAt: z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodString, z.ZodNumber]>>;
|
|
30
|
+
updatedAt: z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodString, z.ZodNumber]>>;
|
|
31
|
+
rate: z.ZodNullable<z.ZodCodec<z.ZodString, z.ZodCustom<import("dnum").Dnum, import("dnum").Dnum>>>;
|
|
32
|
+
feedAddress: z.ZodNullable<z.core.$ZodBranded<z.ZodPipe<z.ZodString & z.ZodType<`0x${string}`, string, z.core.$ZodTypeInternals<`0x${string}`, string>>, z.ZodTransform<`0x${string}`, `0x${string}`>>, "EthereumAddress", "out">>;
|
|
33
|
+
}, z.core.$strict>>;
|
|
34
|
+
}, z.core.$strict>;
|
|
35
|
+
export type ExchangeRatesListResponse = z.output<typeof ExchangeRatesListResponse>;
|
|
36
|
+
export declare const exchangeRatesListTransformer: (data: unknown) => Promise<ExchangeRatesListResponse>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Rich-scalar seam: zod schemas that decode the contract-faithful wire strings
|
|
3
|
+
* the generated core returns into `dnum` amounts, checksummed addresses, and
|
|
4
|
+
* branded entity ids. Composed onto the generated zod constants, never by
|
|
5
|
+
* editing generated files.
|
|
6
|
+
*
|
|
7
|
+
* @module
|
|
8
|
+
*/
|
|
9
|
+
export { BigDecimal, encodeBigDecimal } from "./big-decimal.ts";
|
|
10
|
+
export type { BigDecimalValue } from "./big-decimal.ts";
|
|
11
|
+
export { EthereumAddress } from "./ethereum-address.ts";
|
|
12
|
+
export type { EthereumAddressValue } from "./ethereum-address.ts";
|
|
13
|
+
export { OrganizationId } from "./organization-id.ts";
|
|
14
|
+
export type { OrganizationIdValue } from "./organization-id.ts";
|
|
15
|
+
export { ExchangeRatesListResponse, exchangeRatesListTransformer } from "./exchange-rates.ts";
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import {
|
|
2
|
+
zV2ExchangeRatesListResponse
|
|
3
|
+
} from "../chunk-63xjs3xe.js";
|
|
4
|
+
|
|
5
|
+
// src/scalars/big-decimal.ts
|
|
6
|
+
import * as dn from "dnum";
|
|
7
|
+
import * as z from "zod";
|
|
8
|
+
var decimalWire = /^-?\d+(?:\.\d+)?$/;
|
|
9
|
+
var dnum = z.custom((value) => Array.isArray(value) && value.length === 2, "must be a dnum value");
|
|
10
|
+
var BigDecimal = z.codec(z.string().regex(decimalWire, "must be a plain decimal string"), dnum, {
|
|
11
|
+
decode: (wire) => dn.from(wire),
|
|
12
|
+
encode: (value) => dn.toString(value)
|
|
13
|
+
});
|
|
14
|
+
var encodeBigDecimal = (value) => z.encode(BigDecimal, value);
|
|
15
|
+
// src/scalars/ethereum-address.ts
|
|
16
|
+
import { getAddress, isAddress } from "viem";
|
|
17
|
+
import * as z2 from "zod";
|
|
18
|
+
var EthereumAddress = z2.string().refine((value) => isAddress(value, { strict: false }), "must be an EVM address").transform((value) => getAddress(value)).brand();
|
|
19
|
+
// src/scalars/organization-id.ts
|
|
20
|
+
import * as z3 from "zod";
|
|
21
|
+
var OrganizationId = z3.string().min(1).brand();
|
|
22
|
+
// src/scalars/exchange-rates.ts
|
|
23
|
+
import * as z4 from "zod";
|
|
24
|
+
var row = zV2ExchangeRatesListResponse.shape.data.element.extend({
|
|
25
|
+
rate: BigDecimal.nullable(),
|
|
26
|
+
feedAddress: EthereumAddress.nullable()
|
|
27
|
+
});
|
|
28
|
+
var ExchangeRatesListResponse = zV2ExchangeRatesListResponse.extend({
|
|
29
|
+
data: z4.array(row)
|
|
30
|
+
});
|
|
31
|
+
var exchangeRatesListTransformer = async (data) => ExchangeRatesListResponse.parse(data);
|
|
32
|
+
export {
|
|
33
|
+
BigDecimal,
|
|
34
|
+
EthereumAddress,
|
|
35
|
+
ExchangeRatesListResponse,
|
|
36
|
+
OrganizationId,
|
|
37
|
+
encodeBigDecimal,
|
|
38
|
+
exchangeRatesListTransformer
|
|
39
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Branded organization id: the only entity id branded end-to-end across the
|
|
3
|
+
* platform. Runtime validation is minimal (non-empty); the brand is the
|
|
4
|
+
* type-level contract.
|
|
5
|
+
*/
|
|
6
|
+
import * as z from "zod";
|
|
7
|
+
export declare const OrganizationId: z.core.$ZodBranded<z.ZodString, "OrganizationId", "out">;
|
|
8
|
+
export type OrganizationIdValue = z.output<typeof OrganizationId>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated zod v4 schemas for the v2 surface — the same schemas the generated
|
|
3
|
+
* SDK uses as its response validator.
|
|
4
|
+
*
|
|
5
|
+
* Custom scalars (BigDecimal, addresses, branded ids) are not applied here;
|
|
6
|
+
* those live on `@settlemint/dalp-sdk/scalars`, which composes onto these.
|
|
7
|
+
*
|
|
8
|
+
* @module
|
|
9
|
+
*/
|
|
10
|
+
export * from "./generated/zod.gen.ts";
|