@certen.io/sdk 0.5.0 → 0.7.0

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 (105) hide show
  1. package/CHANGELOG.md +576 -0
  2. package/README.md +133 -119
  3. package/dist/client.d.ts +96 -6
  4. package/dist/client.d.ts.map +1 -1
  5. package/dist/client.js +258 -20
  6. package/dist/client.js.map +1 -1
  7. package/dist/doctor.d.ts +53 -0
  8. package/dist/doctor.d.ts.map +1 -0
  9. package/dist/doctor.js +451 -0
  10. package/dist/doctor.js.map +1 -0
  11. package/dist/error-codes.d.ts +14 -0
  12. package/dist/error-codes.d.ts.map +1 -0
  13. package/dist/error-codes.js +55 -0
  14. package/dist/error-codes.js.map +1 -0
  15. package/dist/errors.d.ts +13 -1
  16. package/dist/errors.d.ts.map +1 -1
  17. package/dist/errors.js +18 -1
  18. package/dist/errors.js.map +1 -1
  19. package/dist/funding.d.ts +43 -0
  20. package/dist/funding.d.ts.map +1 -0
  21. package/dist/funding.js +116 -0
  22. package/dist/funding.js.map +1 -0
  23. package/dist/index.d.ts +8 -0
  24. package/dist/index.d.ts.map +1 -1
  25. package/dist/index.js +17 -0
  26. package/dist/index.js.map +1 -1
  27. package/dist/oauth.d.ts +56 -0
  28. package/dist/oauth.d.ts.map +1 -0
  29. package/dist/oauth.js +68 -0
  30. package/dist/oauth.js.map +1 -0
  31. package/dist/registration.d.ts +33 -0
  32. package/dist/registration.d.ts.map +1 -0
  33. package/dist/registration.js +49 -0
  34. package/dist/registration.js.map +1 -0
  35. package/dist/resources/admin.d.ts +52 -1
  36. package/dist/resources/admin.d.ts.map +1 -1
  37. package/dist/resources/admin.js +55 -0
  38. package/dist/resources/admin.js.map +1 -1
  39. package/dist/resources/billing.d.ts +198 -19
  40. package/dist/resources/billing.d.ts.map +1 -1
  41. package/dist/resources/billing.js +297 -7
  42. package/dist/resources/billing.js.map +1 -1
  43. package/dist/resources/chains.d.ts +38 -0
  44. package/dist/resources/chains.d.ts.map +1 -0
  45. package/dist/resources/chains.js +46 -0
  46. package/dist/resources/chains.js.map +1 -0
  47. package/dist/resources/device.d.ts +43 -0
  48. package/dist/resources/device.d.ts.map +1 -0
  49. package/dist/resources/device.js +49 -0
  50. package/dist/resources/device.js.map +1 -0
  51. package/dist/resources/execute.d.ts +10 -0
  52. package/dist/resources/execute.d.ts.map +1 -1
  53. package/dist/resources/execute.js +18 -0
  54. package/dist/resources/execute.js.map +1 -1
  55. package/dist/resources/health.d.ts +34 -0
  56. package/dist/resources/health.d.ts.map +1 -0
  57. package/dist/resources/health.js +43 -0
  58. package/dist/resources/health.js.map +1 -0
  59. package/dist/resources/identity.d.ts +83 -2
  60. package/dist/resources/identity.d.ts.map +1 -1
  61. package/dist/resources/identity.js +154 -2
  62. package/dist/resources/identity.js.map +1 -1
  63. package/dist/resources/oauth-clients.d.ts +71 -0
  64. package/dist/resources/oauth-clients.d.ts.map +1 -0
  65. package/dist/resources/oauth-clients.js +75 -0
  66. package/dist/resources/oauth-clients.js.map +1 -0
  67. package/dist/resources/pending.d.ts +13 -1
  68. package/dist/resources/pending.d.ts.map +1 -1
  69. package/dist/resources/pending.js +15 -0
  70. package/dist/resources/pending.js.map +1 -1
  71. package/dist/resources/proof.d.ts +75 -0
  72. package/dist/resources/proof.d.ts.map +1 -0
  73. package/dist/resources/proof.js +103 -0
  74. package/dist/resources/proof.js.map +1 -0
  75. package/dist/resources/registration-tokens.d.ts +51 -0
  76. package/dist/resources/registration-tokens.d.ts.map +1 -0
  77. package/dist/resources/registration-tokens.js +54 -0
  78. package/dist/resources/registration-tokens.js.map +1 -0
  79. package/dist/resources/transaction.d.ts +20 -0
  80. package/dist/resources/transaction.d.ts.map +1 -1
  81. package/dist/resources/transaction.js +28 -0
  82. package/dist/resources/transaction.js.map +1 -1
  83. package/dist/resources/transparency.d.ts +68 -0
  84. package/dist/resources/transparency.d.ts.map +1 -0
  85. package/dist/resources/transparency.js +83 -0
  86. package/dist/resources/transparency.js.map +1 -0
  87. package/dist/resources/webhooks.d.ts +97 -0
  88. package/dist/resources/webhooks.d.ts.map +1 -0
  89. package/dist/resources/webhooks.js +112 -0
  90. package/dist/resources/webhooks.js.map +1 -0
  91. package/dist/self-signup.d.ts +66 -0
  92. package/dist/self-signup.d.ts.map +1 -0
  93. package/dist/self-signup.js +76 -0
  94. package/dist/self-signup.js.map +1 -0
  95. package/dist/shared-proof.d.ts +34 -0
  96. package/dist/shared-proof.d.ts.map +1 -0
  97. package/dist/shared-proof.js +78 -0
  98. package/dist/shared-proof.js.map +1 -0
  99. package/dist/types.d.ts +790 -19
  100. package/dist/types.d.ts.map +1 -1
  101. package/dist/verify-receipt.d.ts +32 -0
  102. package/dist/verify-receipt.d.ts.map +1 -0
  103. package/dist/verify-receipt.js +176 -0
  104. package/dist/verify-receipt.js.map +1 -0
  105. package/package.json +6 -5
@@ -0,0 +1 @@
1
+ {"version":3,"file":"self-signup.d.ts","sourceRoot":"","sources":["../src/self-signup.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,eAAe,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AAExE;;;;;;;;;;;;;;GAcG;AAEH,UAAU,QAAQ;IAChB,gDAAgD;IAChD,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAcD;;;;;GAKG;AACH,wBAAsB,sBAAsB,CAC1C,SAAS,CAAC,EAAE,MAAM,EAClB,OAAO,GAAE,QAAa,GACrB,OAAO,CAAC,eAAe,CAAC,CAY1B;AAED;;;;;;;;;GASG;AACH,wBAAsB,cAAc,CAClC,MAAM,EAAE;IAAE,SAAS,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAA;CAAE,EACjF,OAAO,GAAE,QAAa,GACrB,OAAO,CAAC,oBAAoB,CAAC,CAiB/B;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAsB,UAAU,CAC9B,MAAM,EAAE;IACN,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IACrD,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,EACD,OAAO,GAAE,QAAa,GACrB,OAAO,CAAC,oBAAoB,CAAC,CAY/B"}
@@ -0,0 +1,76 @@
1
+ import axios from 'axios';
2
+ import { DEFAULT_BASE_URL } from './client.js';
3
+ import { CertenError } from './errors.js';
4
+ function fail(err, fallbackCode) {
5
+ const e = err;
6
+ const status = e.response?.status ?? 0;
7
+ const payload = e.response?.data;
8
+ throw new CertenError(`certen: ${payload?.error ?? e.message}`, status, payload?.code ?? (status ? fallbackCode : 'NETWORK_ERROR'), { body: payload });
9
+ }
10
+ /**
11
+ * Ask for a nonce to sign.
12
+ *
13
+ * Pass `publicKey` — it binds the challenge to your key, so nobody who observes the nonce in flight
14
+ * can answer it with their own.
15
+ */
16
+ export async function requestSignupChallenge(publicKey, options = {}) {
17
+ const base = (options.baseUrl ?? DEFAULT_BASE_URL).replace(/\/+$/, '');
18
+ try {
19
+ const { data } = await axios.post(`${base}/v1/signup/challenge`, publicKey ? { public_key: publicKey } : {}, { timeout: options.timeoutMs ?? 30_000, headers: { 'Content-Type': 'application/json' } });
20
+ return data;
21
+ }
22
+ catch (err) {
23
+ return fail(err, 'SIGNUP_CHALLENGE_FAILED');
24
+ }
25
+ }
26
+ /**
27
+ * Answer a challenge and receive a new organization with its first API key.
28
+ *
29
+ * `signature` is a DETACHED Ed25519 signature over the raw bytes of the nonce — decode the hex
30
+ * first. Signing the hex text instead is the one mistake worth calling out, and the gateway says so
31
+ * explicitly when it happens.
32
+ *
33
+ * **The API key is returned once.** The nonce is spent by this call whether or not it succeeded, so
34
+ * a retry needs a fresh challenge.
35
+ */
36
+ export async function completeSignup(params, options = {}) {
37
+ const base = (options.baseUrl ?? DEFAULT_BASE_URL).replace(/\/+$/, '');
38
+ try {
39
+ const { data } = await axios.post(`${base}/v1/signup`, {
40
+ public_key: params.publicKey,
41
+ nonce: params.nonce,
42
+ signature: params.signature,
43
+ ...(params.orgName ? { org_name: params.orgName } : {}),
44
+ }, { timeout: options.timeoutMs ?? 30_000, headers: { 'Content-Type': 'application/json' } });
45
+ return data;
46
+ }
47
+ catch (err) {
48
+ return fail(err, 'SIGNUP_FAILED');
49
+ }
50
+ }
51
+ /**
52
+ * Both steps, for a caller that can sign.
53
+ *
54
+ * ```ts
55
+ * const { org, api_key } = await selfSignup({
56
+ * publicKey: myPublicKeyHex,
57
+ * sign: (nonceHex) => signWithMyKey(nonceHex), // detached ed25519 over the nonce BYTES
58
+ * orgName: 'my-agent',
59
+ * });
60
+ * ```
61
+ *
62
+ * `sign` receives the nonce as hex and must return the signature as hex. That signature is made
63
+ * with a private key this SDK never sees — which is the point, and why signing is a callback rather
64
+ * than a key parameter.
65
+ */
66
+ export async function selfSignup(params, options = {}) {
67
+ const challenge = await requestSignupChallenge(params.publicKey, options);
68
+ const signature = await params.sign(challenge.nonce);
69
+ return completeSignup({
70
+ publicKey: params.publicKey,
71
+ nonce: challenge.nonce,
72
+ signature,
73
+ orgName: params.orgName,
74
+ }, options);
75
+ }
76
+ //# sourceMappingURL=self-signup.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"self-signup.js","sourceRoot":"","sources":["../src/self-signup.ts"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAC1C,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAyB1C,SAAS,IAAI,CAAC,GAAY,EAAE,YAAoB;IAC9C,MAAM,CAAC,GAAG,GAAoD,CAAC;IAC/D,MAAM,MAAM,GAAG,CAAC,CAAC,QAAQ,EAAE,MAAM,IAAI,CAAC,CAAC;IACvC,MAAM,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AAK,CAAC,IAAI,CAC/B,GAAG,IAAI,YAAY,EACnB;YACE,UAAU,EAAE,MAAM,CAAC,SAAS;YAC5B,KAAK,EAAE,MAAM,CAAC,KAAK;YACnB,SAAS,EAAE,MAAM,CAAC,SAAS;YAC3B,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,MAAM,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;SACxD,EACD,EAAE,OAAO,EAAE,OAAO,CAAC,SAAS,IAAI,MAAM,EAAE,OAAO,EAAE,EAAE,cAAc,EAAE,kBAAkB,EAAE,EAAE,CAC1F,CAAC;QACF,OAAO,IAA4B,CAAC;IACtC,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,OAAO,IAAI,CAAC,GAAG,EAAE,eAAe,CAAC,CAAC;IACpC,CAAC;AACH,CAAC;AAED;;;;;;;;;;;;;;GAcG;AACH,MAAM,CAAC,KAAK,UAAU,UAAU,CAC9B,MAIC,EACD,UAAoB,EAAE;IAEtB,MAAM,SAAS,GAAG,MAAM,sBAAsB,CAAC,MAAM,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;IAC1E,MAAM,SAAS,GAAG,MAAM,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;IACrD,OAAO,cAAc,CACnB;QACE,SAAS,EAAE,MAAM,CAAC,SAAS;QAC3B,KAAK,EAAE,SAAS,CAAC,KAAK;QACtB,SAAS;QACT,OAAO,EAAE,MAAM,CAAC,OAAO;KACxB,EACD,OAAO,CACR,CAAC;AACJ,CAAC"}
@@ -0,0 +1,34 @@
1
+ import type { SharedProof } from './types.js';
2
+ /**
3
+ * Read a proof someone shared with you.
4
+ *
5
+ * **Deliberately not a method on `CertenClient`.** The whole point of a share link is that the
6
+ * person redeeming it is a counterparty with no CERTEN relationship — the endpoint takes no API key
7
+ * precisely because "requiring a Certen credential to verify a Certen proof would defeat the
8
+ * purpose". Putting the only client-side way to redeem behind a constructor that demands an
9
+ * `apiKey` would have reimposed exactly the requirement the endpoint exists to avoid.
10
+ *
11
+ * This was the asymmetry: the SDK could create a share, list shares and revoke a share — every
12
+ * operation for the person SENDING — and had nothing at all for the person receiving, who is the
13
+ * one the feature is for.
14
+ *
15
+ * Takes the share URL as handed over, or the bare token:
16
+ *
17
+ * ```ts
18
+ * const { bundle } = await fetchSharedProof('https://gateway.kompendium.co/v1/proof/shared/abc123');
19
+ * ```
20
+ *
21
+ * When given a URL the origin comes from it, so a counterparty configures nothing. Asking them to
22
+ * separate the token from the link they were sent, and then tell the SDK which gateway it came
23
+ * from, would be work created for no reason.
24
+ */
25
+ export declare function fetchSharedProof(tokenOrUrl: string, options?: {
26
+ baseUrl?: string;
27
+ timeoutMs?: number;
28
+ }): Promise<SharedProof>;
29
+ /** `https://host/v1/proof/shared/<token>`, or the token on its own. */
30
+ export declare function parseShareTarget(tokenOrUrl: string, baseUrlOverride?: string): {
31
+ token: string;
32
+ baseUrl: string;
33
+ };
34
+ //# sourceMappingURL=shared-proof.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shared-proof.d.ts","sourceRoot":"","sources":["../src/shared-proof.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAE9C;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAsB,gBAAgB,CACpC,UAAU,EAAE,MAAM,EAClB,OAAO,GAAE;IAAE,OAAO,CAAC,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAAO,GACrD,OAAO,CAAC,WAAW,CAAC,CAiBtB;AAED,uEAAuE;AACvE,wBAAgB,gBAAgB,CAC9B,UAAU,EAAE,MAAM,EAClB,eAAe,CAAC,EAAE,MAAM,GACvB;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAmBpC"}
@@ -0,0 +1,78 @@
1
+ import axios from 'axios';
2
+ import { DEFAULT_BASE_URL } from './client.js';
3
+ import { CertenError } from './errors.js';
4
+ /**
5
+ * Read a proof someone shared with you.
6
+ *
7
+ * **Deliberately not a method on `CertenClient`.** The whole point of a share link is that the
8
+ * person redeeming it is a counterparty with no CERTEN relationship — the endpoint takes no API key
9
+ * precisely because "requiring a Certen credential to verify a Certen proof would defeat the
10
+ * purpose". Putting the only client-side way to redeem behind a constructor that demands an
11
+ * `apiKey` would have reimposed exactly the requirement the endpoint exists to avoid.
12
+ *
13
+ * This was the asymmetry: the SDK could create a share, list shares and revoke a share — every
14
+ * operation for the person SENDING — and had nothing at all for the person receiving, who is the
15
+ * one the feature is for.
16
+ *
17
+ * Takes the share URL as handed over, or the bare token:
18
+ *
19
+ * ```ts
20
+ * const { bundle } = await fetchSharedProof('https://gateway.kompendium.co/v1/proof/shared/abc123');
21
+ * ```
22
+ *
23
+ * When given a URL the origin comes from it, so a counterparty configures nothing. Asking them to
24
+ * separate the token from the link they were sent, and then tell the SDK which gateway it came
25
+ * from, would be work created for no reason.
26
+ */
27
+ export async function fetchSharedProof(tokenOrUrl, options = {}) {
28
+ const { token, baseUrl } = parseShareTarget(tokenOrUrl, options.baseUrl);
29
+ try {
30
+ const { data } = await axios.get(`${baseUrl.replace(/\/+$/, '')}/v1/proof/shared/${encodeURIComponent(token)}`, {
31
+ timeout: options.timeoutMs ?? 30_000,
32
+ headers: { 'Content-Type': 'application/json' },
33
+ // No API key. See above — sending one would be harmless but misleading about what this
34
+ // endpoint requires.
35
+ });
36
+ return data;
37
+ }
38
+ catch (err) {
39
+ throw translate(err);
40
+ }
41
+ }
42
+ /** `https://host/v1/proof/shared/<token>`, or the token on its own. */
43
+ export function parseShareTarget(tokenOrUrl, baseUrlOverride) {
44
+ const trimmed = tokenOrUrl.trim();
45
+ if (/^https?:\/\//i.test(trimmed)) {
46
+ const url = new URL(trimmed);
47
+ const match = url.pathname.match(/\/v1\/proof\/shared\/([^/]+)\/?$/);
48
+ if (!match) {
49
+ throw new CertenError(`certen: ${trimmed} is not a share link — expected a path ending /v1/proof/shared/<token>`, 0, 'INVALID_SHARE_LINK');
50
+ }
51
+ return {
52
+ token: decodeURIComponent(match[1]),
53
+ // The link's own origin wins over any configured default: a proof shared from one deployment
54
+ // must not be fetched from another, where the token means nothing.
55
+ baseUrl: baseUrlOverride ?? url.origin,
56
+ };
57
+ }
58
+ return { token: trimmed, baseUrl: baseUrlOverride ?? DEFAULT_BASE_URL };
59
+ }
60
+ function translate(err) {
61
+ const axiosErr = err;
62
+ const status = axiosErr.response?.status;
63
+ const body = axiosErr.response?.data;
64
+ // 410 is the case worth naming. It means the link WAS real and is now revoked, expired, or out
65
+ // of views — so the right response is to ask for a fresh one. Collapsing it into "not found"
66
+ // would leave a counterparty believing the proof never existed.
67
+ if (status === 410) {
68
+ return new CertenError(`certen: ${body?.error ?? 'This share link is no longer valid'} — ask for a new link.`, 410, body?.code ?? 'SHARE_NO_LONGER_VALID');
69
+ }
70
+ if (status === 404) {
71
+ return new CertenError('certen: no such share link. Check the link was copied in full.', 404, 'NOT_FOUND');
72
+ }
73
+ if (status) {
74
+ return new CertenError(`certen: ${body?.error ?? axiosErr.message}`, status, body?.code ?? 'HTTP_ERROR');
75
+ }
76
+ return new CertenError(`certen: ${axiosErr.message}`, 0, 'NETWORK_ERROR');
77
+ }
78
+ //# sourceMappingURL=shared-proof.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shared-proof.js","sourceRoot":"","sources":["../src/shared-proof.ts"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAC1C,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAG1C;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,CAAC,KAAK,UAAU,gBAAgB,CACpC,UAAkB,EAClB,UAAoD,EAAE;IAEtD,MAAM,EAAE,KAAK,EAA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