@settlemint/dalp-sdk 3.0.6-main.28276968545 → 3.0.6

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@settlemint/dalp-sdk",
3
- "version": "3.0.6-main.28276968545",
3
+ "version": "3.0.6",
4
4
  "private": false,
5
5
  "description": "Fully typed SDK for the DALP tokenization platform API",
6
6
  "homepage": "https://settlemint.com",
@@ -41,37 +41,37 @@
41
41
  "access": "public"
42
42
  },
43
43
  "scripts": {
44
- "build": "rm -rf dist && bun scripts/build.js && tsc -p tsconfig.build.json && bun scripts/fix-dts-extensions.js",
44
+ "build": "rm -rf dist && bun scripts/build.js && tsgo -p tsconfig.build.json && bun scripts/fix-dts-extensions.js",
45
45
  "publint": "publint run --strict --pack npm",
46
46
  "attw": "attw --pack . --profile esm-only",
47
47
  "publish": "cp ../../LICENSE . && npm publish --ignore-scripts --tag ${TAG:-latest} --access public",
48
48
  "prepack": "cp ../../LICENSE .",
49
49
  "test": "bun test --parallel=2 tests",
50
- "typecheck": "tsc"
50
+ "typecheck": "tsgo"
51
51
  },
52
52
  "dependencies": {
53
- "@better-auth/api-key": "1.6.20",
54
- "@better-auth/passkey": "1.6.20",
53
+ "@better-auth/api-key": "1.6.19",
54
+ "@better-auth/passkey": "1.6.19",
55
55
  "@orpc/client": "1.14.6",
56
56
  "@orpc/contract": "1.14.6",
57
57
  "@orpc/openapi-client": "1.14.6",
58
- "better-auth": "1.6.20",
58
+ "better-auth": "1.6.19",
59
59
  "currency-codes": "2.2.0",
60
60
  "date-fns": "4.4.0",
61
61
  "dnum": "2.17.0",
62
62
  "iso-3166": "4.4.0",
63
63
  "standardwebhooks": "1.0.0",
64
- "viem": "2.53.1",
64
+ "viem": "2.52.2",
65
65
  "zod": "4.4.3"
66
66
  },
67
67
  "devDependencies": {
68
- "@arethetypeswrong/cli": "0.18.4",
68
+ "@arethetypeswrong/cli": "0.18.3",
69
69
  "@dalp/api-contract": "workspace:*",
70
70
  "@dalp/errors": "workspace:*",
71
71
  "@tools/typescript-config": "workspace:*",
72
72
  "@types/bun": "1.3.14",
73
73
  "publint": "0.3.21",
74
- "typescript": "7.0.1-rc"
74
+ "typescript": "6.0.3"
75
75
  },
76
76
  "engines": {
77
77
  "node": ">=20"
@@ -1,72 +0,0 @@
1
- /**
2
- * Counter-sign a DALP webhook delivery receipt.
3
- *
4
- * The inbound half of webhook signing (`verifyWebhook`) proves a delivery
5
- * DALP sent is authentic. This is the return half: after a consumer verifies
6
- * and accepts a delivery, it counter-signs a receipt so the platform has
7
- * non-repudiation proof the consumer received and acknowledged that specific
8
- * delivery. Submit the result to `POST /api/v2/webhook-receipts`.
9
- *
10
- * The canonical signing string and HMAC mirror the server-side implementation,
11
- * which a published package cannot import. A shared golden test vector pins the
12
- * output of both so the two copies cannot drift.
13
- *
14
- * @module
15
- */
16
- /**
17
- * Scheme tag prefixed to the counter-signed receipt signing string. It
18
- * domain-separates receipt signatures from inbound delivery signatures and
19
- * reserves room for a future scheme revision.
20
- */
21
- export declare const RECEIPT_SIGNING_SCHEME = "dalp.whr.v1";
22
- /** The delivery tuple a receipt signature binds. */
23
- export interface ReceiptSigningTuple {
24
- /** The delivery being acknowledged. A retry allocates a fresh `deliveryId`. */
25
- deliveryId: string;
26
- /** The endpoint that received the delivery. */
27
- endpointId: string;
28
- /** The event identifier carried by the delivery (`evt_*`). */
29
- evtId: string;
30
- /** The hash of the delivered event body (`sha256:<hex>`). */
31
- innerEventHash: string;
32
- }
33
- export interface SignWebhookReceiptInput extends ReceiptSigningTuple {
34
- /** The endpoint signing secret (`dalp_whsk_...`); the prefix is stripped for you. */
35
- secret: string;
36
- }
37
- /**
38
- * Build the canonical string a consumer HMACs to counter-sign a receipt.
39
- *
40
- * Binding the signature to the full delivery tuple, not just the event body
41
- * hash, is what closes the receipt-replay window: a retry allocates a fresh
42
- * `deliveryId` for the same event, so a signature minted for one attempt
43
- * produces a different signing string than another attempt and no longer
44
- * verifies against it.
45
- *
46
- * Newline-joined is unambiguous because every field carries no newline:
47
- * `deliveryId`/`endpointId` are UUIDs, `evtId` is the server-issued `evt_*`
48
- * identifier, and `innerEventHash` is `sha256:<hex>`.
49
- */
50
- export declare function buildReceiptSigningString(tuple: ReceiptSigningTuple): string;
51
- /**
52
- * Counter-sign a webhook delivery receipt.
53
- *
54
- * Returns the lowercase hex `HMAC-SHA256(key, signingString)` to submit as the
55
- * receipt's `consumerSignature`. The key is the base64-decoded prefix-stripped
56
- * secret, the same derivation the Standard Webhooks library uses for inbound
57
- * delivery verification (`verifyWebhook`) and that the dispatcher signs with —
58
- * so the receipt and the delivery share key material.
59
- *
60
- * @example
61
- * ```typescript
62
- * const consumerSignature = signWebhookReceipt({
63
- * deliveryId,
64
- * endpointId,
65
- * evtId,
66
- * innerEventHash,
67
- * secret, // the endpoint's dalp_whsk_... signing secret
68
- * });
69
- * ```
70
- */
71
- export declare function signWebhookReceipt({ secret, ...tuple }: SignWebhookReceiptInput): string;
72
- //# sourceMappingURL=sign-webhook-receipt.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"sign-webhook-receipt.d.ts","sourceRoot":"","sources":["../src/sign-webhook-receipt.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAKH;;;;GAIG;AACH,eAAO,MAAM,sBAAsB,gBAAgB,CAAC;AAEpD,oDAAoD;AACpD,MAAM,WAAW,mBAAmB;IAClC,+EAA+E;IAC/E,UAAU,EAAE,MAAM,CAAC;IACnB,+CAA+C;IAC/C,UAAU,EAAE,MAAM,CAAC;IACnB,8DAA8D;IAC9D,KAAK,EAAE,MAAM,CAAC;IACd,6DAA6D;IAC7D,cAAc,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,uBAAwB,SAAQ,mBAAmB;IAClE,qFAAqF;IACrF,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,mBAAmB,GAAG,MAAM,CAE5E;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,kBAAkB,CAAC,EAAE,MAAM,EAAE,GAAG,KAAK,EAAE,EAAE,uBAAuB,GAAG,MAAM,CAGxF"}