@namera-ai/api 0.0.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.
- package/README.md +58 -0
- package/dist/common.js +13 -0
- package/dist/common.js.map +1 -0
- package/dist/index.d.ts +32 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +40 -0
- package/dist/index.js.map +1 -0
- package/dist/middlewares/admin.d.ts +25 -0
- package/dist/middlewares/admin.d.ts.map +1 -0
- package/dist/middlewares/admin.js +18 -0
- package/dist/middlewares/admin.js.map +1 -0
- package/dist/middlewares/auth.d.ts +640 -0
- package/dist/middlewares/auth.d.ts.map +1 -0
- package/dist/middlewares/auth.js +26 -0
- package/dist/middlewares/auth.js.map +1 -0
- package/dist/middlewares/index.d.ts +3 -0
- package/dist/routes/address-metadata.d.ts +147 -0
- package/dist/routes/address-metadata.d.ts.map +1 -0
- package/dist/routes/address-metadata.js +24 -0
- package/dist/routes/address-metadata.js.map +1 -0
- package/dist/routes/api-key.d.ts +864 -0
- package/dist/routes/api-key.d.ts.map +1 -0
- package/dist/routes/api-key.js +31 -0
- package/dist/routes/api-key.js.map +1 -0
- package/dist/routes/auth/core/index.d.ts +4 -0
- package/dist/routes/auth/core/magic-link.d.ts +34 -0
- package/dist/routes/auth/core/magic-link.d.ts.map +1 -0
- package/dist/routes/auth/core/magic-link.js +25 -0
- package/dist/routes/auth/core/magic-link.js.map +1 -0
- package/dist/routes/auth/core/session.d.ts +805 -0
- package/dist/routes/auth/core/session.d.ts.map +1 -0
- package/dist/routes/auth/core/session.js +31 -0
- package/dist/routes/auth/core/session.js.map +1 -0
- package/dist/routes/auth/core/user.d.ts +45 -0
- package/dist/routes/auth/core/user.d.ts.map +1 -0
- package/dist/routes/auth/core/user.js +15 -0
- package/dist/routes/auth/core/user.js.map +1 -0
- package/dist/routes/auth/index.d.ts +11 -0
- package/dist/routes/auth/notification.d.ts +392 -0
- package/dist/routes/auth/notification.d.ts.map +1 -0
- package/dist/routes/auth/notification.js +40 -0
- package/dist/routes/auth/notification.js.map +1 -0
- package/dist/routes/auth/oauth.d.ts +1347 -0
- package/dist/routes/auth/oauth.d.ts.map +1 -0
- package/dist/routes/auth/oauth.js +62 -0
- package/dist/routes/auth/oauth.js.map +1 -0
- package/dist/routes/auth/organization/index.d.ts +4 -0
- package/dist/routes/auth/organization/invitation.d.ts +400 -0
- package/dist/routes/auth/organization/invitation.d.ts.map +1 -0
- package/dist/routes/auth/organization/invitation.js +55 -0
- package/dist/routes/auth/organization/invitation.js.map +1 -0
- package/dist/routes/auth/organization/members.d.ts +250 -0
- package/dist/routes/auth/organization/members.d.ts.map +1 -0
- package/dist/routes/auth/organization/members.js +37 -0
- package/dist/routes/auth/organization/members.js.map +1 -0
- package/dist/routes/auth/organization/organization.d.ts +196 -0
- package/dist/routes/auth/organization/organization.d.ts.map +1 -0
- package/dist/routes/auth/organization/organization.js +31 -0
- package/dist/routes/auth/organization/organization.js.map +1 -0
- package/dist/routes/beta-invite.d.ts +24 -0
- package/dist/routes/beta-invite.d.ts.map +1 -0
- package/dist/routes/beta-invite.js +20 -0
- package/dist/routes/beta-invite.js.map +1 -0
- package/dist/routes/billing.d.ts +34 -0
- package/dist/routes/billing.d.ts.map +1 -0
- package/dist/routes/billing.js +14 -0
- package/dist/routes/billing.js.map +1 -0
- package/dist/routes/dashboard.d.ts +58 -0
- package/dist/routes/dashboard.d.ts.map +1 -0
- package/dist/routes/dashboard.js +14 -0
- package/dist/routes/dashboard.js.map +1 -0
- package/dist/routes/ens.d.ts +14 -0
- package/dist/routes/ens.d.ts.map +1 -0
- package/dist/routes/ens.js +15 -0
- package/dist/routes/ens.js.map +1 -0
- package/dist/routes/execution.d.ts +816 -0
- package/dist/routes/execution.d.ts.map +1 -0
- package/dist/routes/execution.js +50 -0
- package/dist/routes/execution.js.map +1 -0
- package/dist/routes/health.d.ts +10 -0
- package/dist/routes/health.d.ts.map +1 -0
- package/dist/routes/health.js +10 -0
- package/dist/routes/health.js.map +1 -0
- package/dist/routes/index.d.ts +23 -0
- package/dist/routes/portfolio.d.ts +94 -0
- package/dist/routes/portfolio.d.ts.map +1 -0
- package/dist/routes/portfolio.js +16 -0
- package/dist/routes/portfolio.js.map +1 -0
- package/dist/routes/session-key.d.ts +1844 -0
- package/dist/routes/session-key.d.ts.map +1 -0
- package/dist/routes/session-key.js +55 -0
- package/dist/routes/session-key.js.map +1 -0
- package/dist/routes/signature.d.ts +195 -0
- package/dist/routes/signature.d.ts.map +1 -0
- package/dist/routes/signature.js +38 -0
- package/dist/routes/signature.js.map +1 -0
- package/dist/routes/waitlist.d.ts +42 -0
- package/dist/routes/waitlist.d.ts.map +1 -0
- package/dist/routes/waitlist.js +27 -0
- package/dist/routes/waitlist.js.map +1 -0
- package/dist/routes/wallet.d.ts +547 -0
- package/dist/routes/wallet.d.ts.map +1 -0
- package/dist/routes/wallet.js +50 -0
- package/dist/routes/wallet.js.map +1 -0
- package/package.json +61 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"session-key.d.ts","names":[],"sources":["../../src/routes/session-key.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cA+Ba,wBAAwB"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { CommonErrors } from "../common.js";
|
|
2
|
+
import { Authorization } from "../middlewares/auth.js";
|
|
3
|
+
import { HttpApiEndpoint, HttpApiGroup, HttpApiSchema, OpenApi } from "effect/unstable/httpapi";
|
|
4
|
+
import { BillingLimitExceededError, SessionKeyCreationError, SessionKeyNotFoundError, SessionKeyOperationError, WalletNotFoundError } from "@namera-ai/protocol";
|
|
5
|
+
import { CompleteSessionKeyOperationRequest, CreateSessionKeyRequest, CreateSessionKeyResponse, GetActiveSessionKeyOperationRequest, GetActiveSessionKeyOperationResponse, GetSessionKeyOperationRequest, GetSessionKeyRequest, GetSessionKeyResponse, ListSessionKeysForOrganizationResponse, ListSessionKeysForWalletRequest, ListSessionKeysForWalletResponse, PrepareSessionKeyOperationRequest, PrepareSessionKeyOperationResponse, RevokeSessionKeyRequest, RevokeSessionKeyResponse, SessionKeyOperationResponse } from "@namera-ai/protocol/dto";
|
|
6
|
+
|
|
7
|
+
//#region src/routes/session-key.ts
|
|
8
|
+
var SessionKeyGroup = class extends HttpApiGroup.make("sessionKey").add(HttpApiEndpoint.get("getActiveOperation", "/installations/:installationId/operations/:kind", {
|
|
9
|
+
params: GetActiveSessionKeyOperationRequest,
|
|
10
|
+
success: GetActiveSessionKeyOperationResponse,
|
|
11
|
+
error: [SessionKeyOperationError, ...CommonErrors]
|
|
12
|
+
}).annotate(OpenApi.Summary, "Recover an active installation or removal approval"), HttpApiEndpoint.get("getOperation", "/operations/:operationId", {
|
|
13
|
+
params: GetSessionKeyOperationRequest,
|
|
14
|
+
success: SessionKeyOperationResponse,
|
|
15
|
+
error: [SessionKeyOperationError, ...CommonErrors]
|
|
16
|
+
}).annotate(OpenApi.Summary, "Read the status of a stored owner approval operation"), HttpApiEndpoint.post("completeOperation", "/operations/complete", {
|
|
17
|
+
payload: CompleteSessionKeyOperationRequest,
|
|
18
|
+
success: SessionKeyOperationResponse,
|
|
19
|
+
error: [
|
|
20
|
+
SessionKeyOperationError,
|
|
21
|
+
BillingLimitExceededError,
|
|
22
|
+
...CommonErrors
|
|
23
|
+
]
|
|
24
|
+
}).annotate(OpenApi.Summary, "Approve a stored session operation with the wallet owner passkey"), HttpApiEndpoint.post("prepareOperation", "/operations/prepare", {
|
|
25
|
+
payload: PrepareSessionKeyOperationRequest,
|
|
26
|
+
success: PrepareSessionKeyOperationResponse,
|
|
27
|
+
error: [SessionKeyOperationError, ...CommonErrors]
|
|
28
|
+
}).annotate(OpenApi.Summary, "Prepare a passkey-approved session installation or removal"), HttpApiEndpoint.post("create", "/", {
|
|
29
|
+
payload: CreateSessionKeyRequest,
|
|
30
|
+
success: CreateSessionKeyResponse.pipe(HttpApiSchema.status("Created")),
|
|
31
|
+
error: [
|
|
32
|
+
WalletNotFoundError,
|
|
33
|
+
SessionKeyCreationError,
|
|
34
|
+
...CommonErrors
|
|
35
|
+
]
|
|
36
|
+
}).annotate(OpenApi.Summary, "Create a session key"), HttpApiEndpoint.get("listForOrganization", "/", {
|
|
37
|
+
success: ListSessionKeysForOrganizationResponse,
|
|
38
|
+
error: CommonErrors
|
|
39
|
+
}).annotate(OpenApi.Summary, "List session keys for the active organization"), HttpApiEndpoint.get("listForWallet", "/wallets/:walletId", {
|
|
40
|
+
params: ListSessionKeysForWalletRequest,
|
|
41
|
+
success: ListSessionKeysForWalletResponse,
|
|
42
|
+
error: [WalletNotFoundError, ...CommonErrors]
|
|
43
|
+
}).annotate(OpenApi.Summary, "List session keys for a wallet"), HttpApiEndpoint.get("get", "/:sessionKeyId", {
|
|
44
|
+
params: GetSessionKeyRequest,
|
|
45
|
+
success: GetSessionKeyResponse,
|
|
46
|
+
error: [SessionKeyNotFoundError, ...CommonErrors]
|
|
47
|
+
}).annotate(OpenApi.Summary, "Get a session key"), HttpApiEndpoint.post("revoke", "/:sessionKeyId/revoke", {
|
|
48
|
+
params: RevokeSessionKeyRequest,
|
|
49
|
+
success: RevokeSessionKeyResponse,
|
|
50
|
+
error: [SessionKeyNotFoundError, ...CommonErrors]
|
|
51
|
+
}).annotate(OpenApi.Summary, "Revoke a session key and all of its active grants")).annotate(OpenApi.Description, "Local session signers, onchain installations and additional API policies").middleware(Authorization).prefix("/session-keys") {};
|
|
52
|
+
|
|
53
|
+
//#endregion
|
|
54
|
+
export { SessionKeyGroup };
|
|
55
|
+
//# sourceMappingURL=session-key.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"session-key.js","names":[],"sources":["../../src/routes/session-key.ts"],"sourcesContent":["import { HttpApiEndpoint, HttpApiGroup, HttpApiSchema, OpenApi } from \"effect/unstable/httpapi\";\n\nimport {\n SessionKeyCreationError,\n SessionKeyNotFoundError,\n WalletNotFoundError,\n SessionKeyOperationError,\n BillingLimitExceededError,\n} from \"@namera-ai/protocol\";\nimport {\n CreateSessionKeyRequest,\n CreateSessionKeyResponse,\n GetSessionKeyRequest,\n GetSessionKeyResponse,\n ListSessionKeysForOrganizationResponse,\n ListSessionKeysForWalletRequest,\n ListSessionKeysForWalletResponse,\n RevokeSessionKeyRequest,\n RevokeSessionKeyResponse,\n PrepareSessionKeyOperationRequest,\n PrepareSessionKeyOperationResponse,\n CompleteSessionKeyOperationRequest,\n SessionKeyOperationResponse,\n GetSessionKeyOperationRequest,\n GetActiveSessionKeyOperationRequest,\n GetActiveSessionKeyOperationResponse,\n} from \"@namera-ai/protocol/dto\";\n\nimport { CommonErrors } from \"#/common\";\nimport { Authorization } from \"#/middlewares/index\";\n\nexport class SessionKeyGroup extends HttpApiGroup.make(\"sessionKey\")\n .add(\n HttpApiEndpoint.get(\"getActiveOperation\", \"/installations/:installationId/operations/:kind\", {\n params: GetActiveSessionKeyOperationRequest,\n success: GetActiveSessionKeyOperationResponse,\n error: [SessionKeyOperationError, ...CommonErrors],\n }).annotate(OpenApi.Summary, \"Recover an active installation or removal approval\"),\n HttpApiEndpoint.get(\"getOperation\", \"/operations/:operationId\", {\n params: GetSessionKeyOperationRequest,\n success: SessionKeyOperationResponse,\n error: [SessionKeyOperationError, ...CommonErrors],\n }).annotate(OpenApi.Summary, \"Read the status of a stored owner approval operation\"),\n HttpApiEndpoint.post(\"completeOperation\", \"/operations/complete\", {\n payload: CompleteSessionKeyOperationRequest,\n success: SessionKeyOperationResponse,\n error: [SessionKeyOperationError, BillingLimitExceededError, ...CommonErrors],\n }).annotate(\n OpenApi.Summary,\n \"Approve a stored session operation with the wallet owner passkey\",\n ),\n HttpApiEndpoint.post(\"prepareOperation\", \"/operations/prepare\", {\n payload: PrepareSessionKeyOperationRequest,\n success: PrepareSessionKeyOperationResponse,\n error: [SessionKeyOperationError, ...CommonErrors],\n }).annotate(OpenApi.Summary, \"Prepare a passkey-approved session installation or removal\"),\n HttpApiEndpoint.post(\"create\", \"/\", {\n payload: CreateSessionKeyRequest,\n success: CreateSessionKeyResponse.pipe(HttpApiSchema.status(\"Created\")),\n error: [WalletNotFoundError, SessionKeyCreationError, ...CommonErrors],\n }).annotate(OpenApi.Summary, \"Create a session key\"),\n HttpApiEndpoint.get(\"listForOrganization\", \"/\", {\n success: ListSessionKeysForOrganizationResponse,\n error: CommonErrors,\n }).annotate(OpenApi.Summary, \"List session keys for the active organization\"),\n HttpApiEndpoint.get(\"listForWallet\", \"/wallets/:walletId\", {\n params: ListSessionKeysForWalletRequest,\n success: ListSessionKeysForWalletResponse,\n error: [WalletNotFoundError, ...CommonErrors],\n }).annotate(OpenApi.Summary, \"List session keys for a wallet\"),\n HttpApiEndpoint.get(\"get\", \"/:sessionKeyId\", {\n params: GetSessionKeyRequest,\n success: GetSessionKeyResponse,\n error: [SessionKeyNotFoundError, ...CommonErrors],\n }).annotate(OpenApi.Summary, \"Get a session key\"),\n HttpApiEndpoint.post(\"revoke\", \"/:sessionKeyId/revoke\", {\n params: RevokeSessionKeyRequest,\n success: RevokeSessionKeyResponse,\n error: [SessionKeyNotFoundError, ...CommonErrors],\n }).annotate(OpenApi.Summary, \"Revoke a session key and all of its active grants\"),\n )\n .annotate(\n OpenApi.Description,\n \"Local session signers, onchain installations and additional API policies\",\n )\n .middleware(Authorization)\n .prefix(\"/session-keys\") {}\n"],"mappings":";;;;;;;AA+BA,IAAa,kBAAb,cAAqC,aAAa,KAAK,YAAY,CAAC,CACjE,IACC,gBAAgB,IAAI,sBAAsB,mDAAmD;CAC3F,QAAQ;CACR,SAAS;CACT,OAAO,CAAC,0BAA0B,GAAG,YAAY;AACnD,CAAC,CAAC,CAAC,SAAS,QAAQ,SAAS,oDAAoD,GACjF,gBAAgB,IAAI,gBAAgB,4BAA4B;CAC9D,QAAQ;CACR,SAAS;CACT,OAAO,CAAC,0BAA0B,GAAG,YAAY;AACnD,CAAC,CAAC,CAAC,SAAS,QAAQ,SAAS,sDAAsD,GACnF,gBAAgB,KAAK,qBAAqB,wBAAwB;CAChE,SAAS;CACT,SAAS;CACT,OAAO;EAAC;EAA0B;EAA2B,GAAG;CAAY;AAC9E,CAAC,CAAC,CAAC,SACD,QAAQ,SACR,kEACF,GACA,gBAAgB,KAAK,oBAAoB,uBAAuB;CAC9D,SAAS;CACT,SAAS;CACT,OAAO,CAAC,0BAA0B,GAAG,YAAY;AACnD,CAAC,CAAC,CAAC,SAAS,QAAQ,SAAS,4DAA4D,GACzF,gBAAgB,KAAK,UAAU,KAAK;CAClC,SAAS;CACT,SAAS,yBAAyB,KAAK,cAAc,OAAO,SAAS,CAAC;CACtE,OAAO;EAAC;EAAqB;EAAyB,GAAG;CAAY;AACvE,CAAC,CAAC,CAAC,SAAS,QAAQ,SAAS,sBAAsB,GACnD,gBAAgB,IAAI,uBAAuB,KAAK;CAC9C,SAAS;CACT,OAAO;AACT,CAAC,CAAC,CAAC,SAAS,QAAQ,SAAS,+CAA+C,GAC5E,gBAAgB,IAAI,iBAAiB,sBAAsB;CACzD,QAAQ;CACR,SAAS;CACT,OAAO,CAAC,qBAAqB,GAAG,YAAY;AAC9C,CAAC,CAAC,CAAC,SAAS,QAAQ,SAAS,gCAAgC,GAC7D,gBAAgB,IAAI,OAAO,kBAAkB;CAC3C,QAAQ;CACR,SAAS;CACT,OAAO,CAAC,yBAAyB,GAAG,YAAY;AAClD,CAAC,CAAC,CAAC,SAAS,QAAQ,SAAS,mBAAmB,GAChD,gBAAgB,KAAK,UAAU,yBAAyB;CACtD,QAAQ;CACR,SAAS;CACT,OAAO,CAAC,yBAAyB,GAAG,YAAY;AAClD,CAAC,CAAC,CAAC,SAAS,QAAQ,SAAS,mDAAmD,CAClF,CAAC,CACA,SACC,QAAQ,aACR,0EACF,CAAC,CACA,WAAW,aAAa,CAAC,CACzB,OAAO,eAAe,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
import { Authorization } from "../middlewares/auth.js";
|
|
2
|
+
import "../middlewares/index.js";
|
|
3
|
+
import { HttpApiEndpoint, HttpApiGroup } from "effect/unstable/httpapi";
|
|
4
|
+
import { SignatureError } from "@namera-ai/protocol";
|
|
5
|
+
//#region src/routes/signature.d.ts
|
|
6
|
+
declare const SignatureGroup_base: HttpApiGroup.HttpApiGroup<"signature", HttpApiEndpoint.HttpApiEndpoint<"prepare", "POST", "/signatures/prepare", never, never, import("effect/Schema").toCodecJson<import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
|
|
7
|
+
readonly sessionKeyId: import("effect/Schema").brand<import("effect/Schema").String, "SessionKeyId">;
|
|
8
|
+
readonly type: import("effect/Schema").Literal<"message">;
|
|
9
|
+
readonly message: import("effect/Schema").String;
|
|
10
|
+
readonly namespace: import("effect/Schema").Literal<"eip155">;
|
|
11
|
+
readonly walletId: import("effect/Schema").brand<import("effect/Schema").String, "WalletId">;
|
|
12
|
+
readonly chainId: import("effect/Schema").Literals<readonly ["eip155:1", "eip155:10", "eip155:8453", "eip155:42161", "eip155:84532", "eip155:421614", "eip155:11155111", "eip155:11155420"]>;
|
|
13
|
+
}>, import("effect/Schema").Struct<{
|
|
14
|
+
readonly sessionKeyId: import("effect/Schema").brand<import("effect/Schema").String, "SessionKeyId">;
|
|
15
|
+
readonly type: import("effect/Schema").Literal<"typed-data">;
|
|
16
|
+
readonly typedData: import("effect/Schema").Struct<{
|
|
17
|
+
readonly domain: import("effect/Schema").Struct<{
|
|
18
|
+
readonly name: import("effect/Schema").optionalKey<import("effect/Schema").String>;
|
|
19
|
+
readonly version: import("effect/Schema").optionalKey<import("effect/Schema").String>;
|
|
20
|
+
readonly chainId: import("effect/Schema").optionalKey<import("effect/Schema").Int>;
|
|
21
|
+
readonly verifyingContract: import("effect/Schema").optionalKey<import("effect/Schema").brand<import("effect/Schema").TemplateLiteral<readonly ["0x", import("effect/Schema").String]>, "EthereumAddress">>;
|
|
22
|
+
readonly salt: import("effect/Schema").optionalKey<import("effect/Schema").brand<import("effect/Schema").TemplateLiteral<readonly ["0x", import("effect/Schema").String]>, "Bytes32">>;
|
|
23
|
+
}>;
|
|
24
|
+
readonly types: import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").$Array<import("effect/Schema").Struct<{
|
|
25
|
+
readonly name: import("effect/Schema").String;
|
|
26
|
+
readonly type: import("effect/Schema").String;
|
|
27
|
+
}>>>;
|
|
28
|
+
readonly primaryType: import("effect/Schema").String;
|
|
29
|
+
readonly message: import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").Codec<import("effect/Schema").Json, import("effect/Schema").Json, never, never>>;
|
|
30
|
+
}>;
|
|
31
|
+
readonly namespace: import("effect/Schema").Literal<"eip155">;
|
|
32
|
+
readonly walletId: import("effect/Schema").brand<import("effect/Schema").String, "WalletId">;
|
|
33
|
+
readonly chainId: import("effect/Schema").Literals<readonly ["eip155:1", "eip155:10", "eip155:8453", "eip155:42161", "eip155:84532", "eip155:421614", "eip155:11155111", "eip155:11155420"]>;
|
|
34
|
+
}>]>>, import("effect/Schema").toCodecStringTree<import("effect/Schema").Struct<{
|
|
35
|
+
readonly "idempotency-key": import("effect/Schema").String;
|
|
36
|
+
}>>, import("effect/Schema").toCodecJson<import("effect/Schema").Struct<{
|
|
37
|
+
readonly namespace: import("effect/Schema").Literal<"eip155">;
|
|
38
|
+
readonly operationId: import("effect/Schema").brand<import("effect/Schema").String, "SignatureOperationId">;
|
|
39
|
+
readonly installationId: import("effect/Schema").brand<import("effect/Schema").String, "SessionKeyInstallationId">;
|
|
40
|
+
readonly signingKeyId: import("effect/Schema").brand<import("effect/Schema").String, "SigningKeyId">;
|
|
41
|
+
readonly request: import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
|
|
42
|
+
readonly sessionKeyId: import("effect/Schema").brand<import("effect/Schema").String, "SessionKeyId">;
|
|
43
|
+
readonly type: import("effect/Schema").Literal<"message">;
|
|
44
|
+
readonly message: import("effect/Schema").String;
|
|
45
|
+
readonly namespace: import("effect/Schema").Literal<"eip155">;
|
|
46
|
+
readonly walletId: import("effect/Schema").brand<import("effect/Schema").String, "WalletId">;
|
|
47
|
+
readonly chainId: import("effect/Schema").Literals<readonly ["eip155:1", "eip155:10", "eip155:8453", "eip155:42161", "eip155:84532", "eip155:421614", "eip155:11155111", "eip155:11155420"]>;
|
|
48
|
+
}>, import("effect/Schema").Struct<{
|
|
49
|
+
readonly sessionKeyId: import("effect/Schema").brand<import("effect/Schema").String, "SessionKeyId">;
|
|
50
|
+
readonly type: import("effect/Schema").Literal<"typed-data">;
|
|
51
|
+
readonly typedData: import("effect/Schema").Struct<{
|
|
52
|
+
readonly domain: import("effect/Schema").Struct<{
|
|
53
|
+
readonly name: import("effect/Schema").optionalKey<import("effect/Schema").String>;
|
|
54
|
+
readonly version: import("effect/Schema").optionalKey<import("effect/Schema").String>;
|
|
55
|
+
readonly chainId: import("effect/Schema").optionalKey<import("effect/Schema").Int>;
|
|
56
|
+
readonly verifyingContract: import("effect/Schema").optionalKey<import("effect/Schema").brand<import("effect/Schema").TemplateLiteral<readonly ["0x", import("effect/Schema").String]>, "EthereumAddress">>;
|
|
57
|
+
readonly salt: import("effect/Schema").optionalKey<import("effect/Schema").brand<import("effect/Schema").TemplateLiteral<readonly ["0x", import("effect/Schema").String]>, "Bytes32">>;
|
|
58
|
+
}>;
|
|
59
|
+
readonly types: import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").$Array<import("effect/Schema").Struct<{
|
|
60
|
+
readonly name: import("effect/Schema").String;
|
|
61
|
+
readonly type: import("effect/Schema").String;
|
|
62
|
+
}>>>;
|
|
63
|
+
readonly primaryType: import("effect/Schema").String;
|
|
64
|
+
readonly message: import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").Codec<import("effect/Schema").Json, import("effect/Schema").Json, never, never>>;
|
|
65
|
+
}>;
|
|
66
|
+
readonly namespace: import("effect/Schema").Literal<"eip155">;
|
|
67
|
+
readonly walletId: import("effect/Schema").brand<import("effect/Schema").String, "WalletId">;
|
|
68
|
+
readonly chainId: import("effect/Schema").Literals<readonly ["eip155:1", "eip155:10", "eip155:8453", "eip155:42161", "eip155:84532", "eip155:421614", "eip155:11155111", "eip155:11155420"]>;
|
|
69
|
+
}>]>;
|
|
70
|
+
readonly signing: import("effect/Schema").Struct<{
|
|
71
|
+
readonly method: import("effect/Schema").Literal<"eth_signTypedData_v4">;
|
|
72
|
+
readonly typedData: import("effect/Schema").Struct<{
|
|
73
|
+
readonly domain: import("effect/Schema").Struct<{
|
|
74
|
+
readonly name: import("effect/Schema").optionalKey<import("effect/Schema").String>;
|
|
75
|
+
readonly version: import("effect/Schema").optionalKey<import("effect/Schema").String>;
|
|
76
|
+
readonly chainId: import("effect/Schema").optionalKey<import("effect/Schema").Int>;
|
|
77
|
+
readonly verifyingContract: import("effect/Schema").optionalKey<import("effect/Schema").brand<import("effect/Schema").TemplateLiteral<readonly ["0x", import("effect/Schema").String]>, "EthereumAddress">>;
|
|
78
|
+
readonly salt: import("effect/Schema").optionalKey<import("effect/Schema").brand<import("effect/Schema").TemplateLiteral<readonly ["0x", import("effect/Schema").String]>, "Bytes32">>;
|
|
79
|
+
}>;
|
|
80
|
+
readonly types: import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").$Array<import("effect/Schema").Struct<{
|
|
81
|
+
readonly name: import("effect/Schema").String;
|
|
82
|
+
readonly type: import("effect/Schema").String;
|
|
83
|
+
}>>>;
|
|
84
|
+
readonly primaryType: import("effect/Schema").String;
|
|
85
|
+
readonly message: import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").Codec<import("effect/Schema").Json, import("effect/Schema").Json, never, never>>;
|
|
86
|
+
}>;
|
|
87
|
+
}>;
|
|
88
|
+
readonly expiresAt: import("effect/Schema").DateTimeUtcFromDate;
|
|
89
|
+
}>>, import("effect/Schema").toCodecJson<import("effect/unstable/httpapi/HttpApiSchema").asNoContent<typeof import("effect/unstable/httpapi/HttpApiError").Forbidden> | import("effect/unstable/httpapi/HttpApiSchema").asNoContent<typeof import("effect/unstable/httpapi/HttpApiError").InternalServerError> | typeof import("@namera-ai/protocol").RateLimitExceeded | typeof import("@namera-ai/protocol").BillingLimitExceededError | typeof SignatureError>, Authorization, never> | HttpApiEndpoint.HttpApiEndpoint<"complete", "POST", "/signatures/complete", never, never, import("effect/Schema").toCodecJson<import("effect/Schema").Struct<{
|
|
90
|
+
readonly namespace: import("effect/Schema").Literal<"eip155">;
|
|
91
|
+
readonly operationId: import("effect/Schema").brand<import("effect/Schema").String, "SignatureOperationId">;
|
|
92
|
+
readonly signature: import("effect/Schema").TemplateLiteral<readonly ["0x", import("effect/Schema").String]>;
|
|
93
|
+
}>>, never, import("effect/Schema").toCodecJson<import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
|
|
94
|
+
readonly type: import("effect/Schema").Literal<"message">;
|
|
95
|
+
readonly namespace: import("effect/Schema").Literal<"eip155">;
|
|
96
|
+
readonly walletId: import("effect/Schema").brand<import("effect/Schema").String, "WalletId">;
|
|
97
|
+
readonly chainId: import("effect/Schema").Literals<readonly ["eip155:1", "eip155:10", "eip155:8453", "eip155:42161", "eip155:84532", "eip155:421614", "eip155:11155111", "eip155:11155420"]>;
|
|
98
|
+
readonly account: import("effect/Schema").brand<import("effect/Schema").TemplateLiteral<readonly ["0x", import("effect/Schema").String]>, "EthereumAddress">;
|
|
99
|
+
readonly signature: import("effect/Schema").TemplateLiteral<readonly ["0x", import("effect/Schema").String]>;
|
|
100
|
+
}>, import("effect/Schema").Struct<{
|
|
101
|
+
readonly type: import("effect/Schema").Literal<"typed-data">;
|
|
102
|
+
readonly namespace: import("effect/Schema").Literal<"eip155">;
|
|
103
|
+
readonly walletId: import("effect/Schema").brand<import("effect/Schema").String, "WalletId">;
|
|
104
|
+
readonly chainId: import("effect/Schema").Literals<readonly ["eip155:1", "eip155:10", "eip155:8453", "eip155:42161", "eip155:84532", "eip155:421614", "eip155:11155111", "eip155:11155420"]>;
|
|
105
|
+
readonly account: import("effect/Schema").brand<import("effect/Schema").TemplateLiteral<readonly ["0x", import("effect/Schema").String]>, "EthereumAddress">;
|
|
106
|
+
readonly signature: import("effect/Schema").TemplateLiteral<readonly ["0x", import("effect/Schema").String]>;
|
|
107
|
+
}>]>>, import("effect/Schema").toCodecJson<import("effect/unstable/httpapi/HttpApiSchema").asNoContent<typeof import("effect/unstable/httpapi/HttpApiError").Forbidden> | import("effect/unstable/httpapi/HttpApiSchema").asNoContent<typeof import("effect/unstable/httpapi/HttpApiError").InternalServerError> | typeof import("@namera-ai/protocol").RateLimitExceeded | typeof SignatureError>, Authorization, never> | HttpApiEndpoint.HttpApiEndpoint<"verify", "POST", "/signatures/verify", never, never, import("effect/Schema").toCodecJson<import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
|
|
108
|
+
readonly type: import("effect/Schema").Literal<"message">;
|
|
109
|
+
readonly message: import("effect/Schema").String;
|
|
110
|
+
readonly signature: import("effect/Schema").TemplateLiteral<readonly ["0x", import("effect/Schema").String]>;
|
|
111
|
+
readonly namespace: import("effect/Schema").Literal<"eip155">;
|
|
112
|
+
readonly walletId: import("effect/Schema").brand<import("effect/Schema").String, "WalletId">;
|
|
113
|
+
readonly chainId: import("effect/Schema").Literals<readonly ["eip155:1", "eip155:10", "eip155:8453", "eip155:42161", "eip155:84532", "eip155:421614", "eip155:11155111", "eip155:11155420"]>;
|
|
114
|
+
}>, import("effect/Schema").Struct<{
|
|
115
|
+
readonly type: import("effect/Schema").Literal<"typed-data">;
|
|
116
|
+
readonly typedData: import("effect/Schema").Struct<{
|
|
117
|
+
readonly domain: import("effect/Schema").Struct<{
|
|
118
|
+
readonly name: import("effect/Schema").optionalKey<import("effect/Schema").String>;
|
|
119
|
+
readonly version: import("effect/Schema").optionalKey<import("effect/Schema").String>;
|
|
120
|
+
readonly chainId: import("effect/Schema").optionalKey<import("effect/Schema").Int>;
|
|
121
|
+
readonly verifyingContract: import("effect/Schema").optionalKey<import("effect/Schema").brand<import("effect/Schema").TemplateLiteral<readonly ["0x", import("effect/Schema").String]>, "EthereumAddress">>;
|
|
122
|
+
readonly salt: import("effect/Schema").optionalKey<import("effect/Schema").brand<import("effect/Schema").TemplateLiteral<readonly ["0x", import("effect/Schema").String]>, "Bytes32">>;
|
|
123
|
+
}>;
|
|
124
|
+
readonly types: import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").$Array<import("effect/Schema").Struct<{
|
|
125
|
+
readonly name: import("effect/Schema").String;
|
|
126
|
+
readonly type: import("effect/Schema").String;
|
|
127
|
+
}>>>;
|
|
128
|
+
readonly primaryType: import("effect/Schema").String;
|
|
129
|
+
readonly message: import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").Codec<import("effect/Schema").Json, import("effect/Schema").Json, never, never>>;
|
|
130
|
+
}>;
|
|
131
|
+
readonly signature: import("effect/Schema").TemplateLiteral<readonly ["0x", import("effect/Schema").String]>;
|
|
132
|
+
readonly namespace: import("effect/Schema").Literal<"eip155">;
|
|
133
|
+
readonly walletId: import("effect/Schema").brand<import("effect/Schema").String, "WalletId">;
|
|
134
|
+
readonly chainId: import("effect/Schema").Literals<readonly ["eip155:1", "eip155:10", "eip155:8453", "eip155:42161", "eip155:84532", "eip155:421614", "eip155:11155111", "eip155:11155420"]>;
|
|
135
|
+
}>]>>, never, import("effect/Schema").toCodecJson<import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
|
|
136
|
+
readonly type: import("effect/Schema").Literal<"message">;
|
|
137
|
+
readonly namespace: import("effect/Schema").Literal<"eip155">;
|
|
138
|
+
readonly walletId: import("effect/Schema").brand<import("effect/Schema").String, "WalletId">;
|
|
139
|
+
readonly chainId: import("effect/Schema").Literals<readonly ["eip155:1", "eip155:10", "eip155:8453", "eip155:42161", "eip155:84532", "eip155:421614", "eip155:11155111", "eip155:11155420"]>;
|
|
140
|
+
readonly account: import("effect/Schema").brand<import("effect/Schema").TemplateLiteral<readonly ["0x", import("effect/Schema").String]>, "EthereumAddress">;
|
|
141
|
+
readonly valid: import("effect/Schema").Boolean;
|
|
142
|
+
}>, import("effect/Schema").Struct<{
|
|
143
|
+
readonly type: import("effect/Schema").Literal<"typed-data">;
|
|
144
|
+
readonly namespace: import("effect/Schema").Literal<"eip155">;
|
|
145
|
+
readonly walletId: import("effect/Schema").brand<import("effect/Schema").String, "WalletId">;
|
|
146
|
+
readonly chainId: import("effect/Schema").Literals<readonly ["eip155:1", "eip155:10", "eip155:8453", "eip155:42161", "eip155:84532", "eip155:421614", "eip155:11155111", "eip155:11155420"]>;
|
|
147
|
+
readonly account: import("effect/Schema").brand<import("effect/Schema").TemplateLiteral<readonly ["0x", import("effect/Schema").String]>, "EthereumAddress">;
|
|
148
|
+
readonly valid: import("effect/Schema").Boolean;
|
|
149
|
+
}>]>>, import("effect/Schema").toCodecJson<import("effect/unstable/httpapi/HttpApiSchema").asNoContent<typeof import("effect/unstable/httpapi/HttpApiError").Forbidden> | import("effect/unstable/httpapi/HttpApiSchema").asNoContent<typeof import("effect/unstable/httpapi/HttpApiError").InternalServerError> | typeof import("@namera-ai/protocol").RateLimitExceeded | typeof SignatureError>, Authorization, never> | HttpApiEndpoint.HttpApiEndpoint<"sign", "POST", "/signatures/", never, never, import("effect/Schema").toCodecJson<import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
|
|
150
|
+
readonly type: import("effect/Schema").Literal<"message">;
|
|
151
|
+
readonly message: import("effect/Schema").String;
|
|
152
|
+
readonly namespace: import("effect/Schema").Literal<"eip155">;
|
|
153
|
+
readonly walletId: import("effect/Schema").brand<import("effect/Schema").String, "WalletId">;
|
|
154
|
+
readonly chainId: import("effect/Schema").Literals<readonly ["eip155:1", "eip155:10", "eip155:8453", "eip155:42161", "eip155:84532", "eip155:421614", "eip155:11155111", "eip155:11155420"]>;
|
|
155
|
+
}>, import("effect/Schema").Struct<{
|
|
156
|
+
readonly type: import("effect/Schema").Literal<"typed-data">;
|
|
157
|
+
readonly typedData: import("effect/Schema").Struct<{
|
|
158
|
+
readonly domain: import("effect/Schema").Struct<{
|
|
159
|
+
readonly name: import("effect/Schema").optionalKey<import("effect/Schema").String>;
|
|
160
|
+
readonly version: import("effect/Schema").optionalKey<import("effect/Schema").String>;
|
|
161
|
+
readonly chainId: import("effect/Schema").optionalKey<import("effect/Schema").Int>;
|
|
162
|
+
readonly verifyingContract: import("effect/Schema").optionalKey<import("effect/Schema").brand<import("effect/Schema").TemplateLiteral<readonly ["0x", import("effect/Schema").String]>, "EthereumAddress">>;
|
|
163
|
+
readonly salt: import("effect/Schema").optionalKey<import("effect/Schema").brand<import("effect/Schema").TemplateLiteral<readonly ["0x", import("effect/Schema").String]>, "Bytes32">>;
|
|
164
|
+
}>;
|
|
165
|
+
readonly types: import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").$Array<import("effect/Schema").Struct<{
|
|
166
|
+
readonly name: import("effect/Schema").String;
|
|
167
|
+
readonly type: import("effect/Schema").String;
|
|
168
|
+
}>>>;
|
|
169
|
+
readonly primaryType: import("effect/Schema").String;
|
|
170
|
+
readonly message: import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").Codec<import("effect/Schema").Json, import("effect/Schema").Json, never, never>>;
|
|
171
|
+
}>;
|
|
172
|
+
readonly namespace: import("effect/Schema").Literal<"eip155">;
|
|
173
|
+
readonly walletId: import("effect/Schema").brand<import("effect/Schema").String, "WalletId">;
|
|
174
|
+
readonly chainId: import("effect/Schema").Literals<readonly ["eip155:1", "eip155:10", "eip155:8453", "eip155:42161", "eip155:84532", "eip155:421614", "eip155:11155111", "eip155:11155420"]>;
|
|
175
|
+
}>]>>, import("effect/Schema").toCodecStringTree<import("effect/Schema").Struct<{
|
|
176
|
+
readonly "idempotency-key": import("effect/Schema").String;
|
|
177
|
+
}>>, import("effect/Schema").toCodecJson<import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
|
|
178
|
+
readonly type: import("effect/Schema").Literal<"message">;
|
|
179
|
+
readonly namespace: import("effect/Schema").Literal<"eip155">;
|
|
180
|
+
readonly walletId: import("effect/Schema").brand<import("effect/Schema").String, "WalletId">;
|
|
181
|
+
readonly chainId: import("effect/Schema").Literals<readonly ["eip155:1", "eip155:10", "eip155:8453", "eip155:42161", "eip155:84532", "eip155:421614", "eip155:11155111", "eip155:11155420"]>;
|
|
182
|
+
readonly account: import("effect/Schema").brand<import("effect/Schema").TemplateLiteral<readonly ["0x", import("effect/Schema").String]>, "EthereumAddress">;
|
|
183
|
+
readonly signature: import("effect/Schema").TemplateLiteral<readonly ["0x", import("effect/Schema").String]>;
|
|
184
|
+
}>, import("effect/Schema").Struct<{
|
|
185
|
+
readonly type: import("effect/Schema").Literal<"typed-data">;
|
|
186
|
+
readonly namespace: import("effect/Schema").Literal<"eip155">;
|
|
187
|
+
readonly walletId: import("effect/Schema").brand<import("effect/Schema").String, "WalletId">;
|
|
188
|
+
readonly chainId: import("effect/Schema").Literals<readonly ["eip155:1", "eip155:10", "eip155:8453", "eip155:42161", "eip155:84532", "eip155:421614", "eip155:11155111", "eip155:11155420"]>;
|
|
189
|
+
readonly account: import("effect/Schema").brand<import("effect/Schema").TemplateLiteral<readonly ["0x", import("effect/Schema").String]>, "EthereumAddress">;
|
|
190
|
+
readonly signature: import("effect/Schema").TemplateLiteral<readonly ["0x", import("effect/Schema").String]>;
|
|
191
|
+
}>]>>, import("effect/Schema").toCodecJson<import("effect/unstable/httpapi/HttpApiSchema").asNoContent<typeof import("effect/unstable/httpapi/HttpApiError").Forbidden> | import("effect/unstable/httpapi/HttpApiSchema").asNoContent<typeof import("effect/unstable/httpapi/HttpApiError").InternalServerError> | typeof import("@namera-ai/protocol").RateLimitExceeded | typeof import("@namera-ai/protocol").BillingLimitExceededError | typeof SignatureError>, Authorization, never>, false>;
|
|
192
|
+
declare class SignatureGroup extends SignatureGroup_base {}
|
|
193
|
+
//#endregion
|
|
194
|
+
export { SignatureGroup };
|
|
195
|
+
//# sourceMappingURL=signature.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"signature.d.ts","names":[],"sources":["../../src/routes/signature.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAkBa,uBAAuB"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { CommonErrors } from "../common.js";
|
|
2
|
+
import { Authorization } from "../middlewares/auth.js";
|
|
3
|
+
import { HttpApiEndpoint, HttpApiGroup, OpenApi } from "effect/unstable/httpapi";
|
|
4
|
+
import { BillingErrors, SignatureError } from "@namera-ai/protocol";
|
|
5
|
+
import { CompleteSignatureRequest, CompleteSignatureResponse, PrepareSignatureRequest, PrepareSignatureResponse, SignRequest, SignRequestHeaders, SignResponse, VerifySignatureRequest, VerifySignatureResponse } from "@namera-ai/protocol/dto";
|
|
6
|
+
|
|
7
|
+
//#region src/routes/signature.ts
|
|
8
|
+
var SignatureGroup = class extends HttpApiGroup.make("signature").add(HttpApiEndpoint.post("prepare", "/prepare", {
|
|
9
|
+
payload: PrepareSignatureRequest,
|
|
10
|
+
headers: SignRequestHeaders,
|
|
11
|
+
success: PrepareSignatureResponse,
|
|
12
|
+
error: [
|
|
13
|
+
SignatureError,
|
|
14
|
+
...BillingErrors,
|
|
15
|
+
...CommonErrors
|
|
16
|
+
]
|
|
17
|
+
}).annotate(OpenApi.Summary, "Prepare a locally signed session signature")).add(HttpApiEndpoint.post("complete", "/complete", {
|
|
18
|
+
payload: CompleteSignatureRequest,
|
|
19
|
+
success: CompleteSignatureResponse,
|
|
20
|
+
error: [SignatureError, ...CommonErrors]
|
|
21
|
+
}).annotate(OpenApi.Summary, "Verify and meter a local session signature")).add(HttpApiEndpoint.post("verify", "/verify", {
|
|
22
|
+
payload: VerifySignatureRequest,
|
|
23
|
+
success: VerifySignatureResponse,
|
|
24
|
+
error: [SignatureError, ...CommonErrors]
|
|
25
|
+
}).annotate(OpenApi.Summary, "Verify an EVM smart-account signature")).add(HttpApiEndpoint.post("sign", "/", {
|
|
26
|
+
payload: SignRequest,
|
|
27
|
+
headers: SignRequestHeaders,
|
|
28
|
+
success: SignResponse,
|
|
29
|
+
error: [
|
|
30
|
+
SignatureError,
|
|
31
|
+
...BillingErrors,
|
|
32
|
+
...CommonErrors
|
|
33
|
+
]
|
|
34
|
+
}).annotate(OpenApi.Summary, "Sign a message or typed data through an authorized session key")).annotate(OpenApi.Description, "Namespace-discriminated programmable wallet signatures").middleware(Authorization).prefix("/signatures") {};
|
|
35
|
+
|
|
36
|
+
//#endregion
|
|
37
|
+
export { SignatureGroup };
|
|
38
|
+
//# sourceMappingURL=signature.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"signature.js","names":[],"sources":["../../src/routes/signature.ts"],"sourcesContent":["import { HttpApiEndpoint, HttpApiGroup, OpenApi } from \"effect/unstable/httpapi\";\n\nimport { BillingErrors, SignatureError } from \"@namera-ai/protocol\";\nimport {\n SignRequest,\n SignRequestHeaders,\n SignResponse,\n VerifySignatureRequest,\n VerifySignatureResponse,\n PrepareSignatureRequest,\n PrepareSignatureResponse,\n CompleteSignatureRequest,\n CompleteSignatureResponse,\n} from \"@namera-ai/protocol/dto\";\n\nimport { CommonErrors } from \"#/common\";\nimport { Authorization } from \"#/middlewares/index\";\n\nexport class SignatureGroup extends HttpApiGroup.make(\"signature\")\n .add(\n HttpApiEndpoint.post(\"prepare\", \"/prepare\", {\n payload: PrepareSignatureRequest,\n headers: SignRequestHeaders,\n success: PrepareSignatureResponse,\n error: [SignatureError, ...BillingErrors, ...CommonErrors],\n }).annotate(OpenApi.Summary, \"Prepare a locally signed session signature\"),\n )\n .add(\n HttpApiEndpoint.post(\"complete\", \"/complete\", {\n payload: CompleteSignatureRequest,\n success: CompleteSignatureResponse,\n error: [SignatureError, ...CommonErrors],\n }).annotate(OpenApi.Summary, \"Verify and meter a local session signature\"),\n )\n .add(\n HttpApiEndpoint.post(\"verify\", \"/verify\", {\n payload: VerifySignatureRequest,\n success: VerifySignatureResponse,\n error: [SignatureError, ...CommonErrors],\n }).annotate(OpenApi.Summary, \"Verify an EVM smart-account signature\"),\n )\n .add(\n HttpApiEndpoint.post(\"sign\", \"/\", {\n payload: SignRequest,\n headers: SignRequestHeaders,\n success: SignResponse,\n error: [SignatureError, ...BillingErrors, ...CommonErrors],\n }).annotate(OpenApi.Summary, \"Sign a message or typed data through an authorized session key\"),\n )\n .annotate(OpenApi.Description, \"Namespace-discriminated programmable wallet signatures\")\n .middleware(Authorization)\n .prefix(\"/signatures\") {}\n"],"mappings":";;;;;;;AAkBA,IAAa,iBAAb,cAAoC,aAAa,KAAK,WAAW,CAAC,CAC/D,IACC,gBAAgB,KAAK,WAAW,YAAY;CAC1C,SAAS;CACT,SAAS;CACT,SAAS;CACT,OAAO;EAAC;EAAgB,GAAG;EAAe,GAAG;CAAY;AAC3D,CAAC,CAAC,CAAC,SAAS,QAAQ,SAAS,4CAA4C,CAC3E,CAAC,CACA,IACC,gBAAgB,KAAK,YAAY,aAAa;CAC5C,SAAS;CACT,SAAS;CACT,OAAO,CAAC,gBAAgB,GAAG,YAAY;AACzC,CAAC,CAAC,CAAC,SAAS,QAAQ,SAAS,4CAA4C,CAC3E,CAAC,CACA,IACC,gBAAgB,KAAK,UAAU,WAAW;CACxC,SAAS;CACT,SAAS;CACT,OAAO,CAAC,gBAAgB,GAAG,YAAY;AACzC,CAAC,CAAC,CAAC,SAAS,QAAQ,SAAS,uCAAuC,CACtE,CAAC,CACA,IACC,gBAAgB,KAAK,QAAQ,KAAK;CAChC,SAAS;CACT,SAAS;CACT,SAAS;CACT,OAAO;EAAC;EAAgB,GAAG;EAAe,GAAG;CAAY;AAC3D,CAAC,CAAC,CAAC,SAAS,QAAQ,SAAS,gEAAgE,CAC/F,CAAC,CACA,SAAS,QAAQ,aAAa,wDAAwD,CAAC,CACvF,WAAW,aAAa,CAAC,CACzB,OAAO,aAAa,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { AdminAuthorization } from "../middlewares/admin.js";
|
|
2
|
+
import { HttpApiEndpoint, HttpApiGroup } from "effect/unstable/httpapi";
|
|
3
|
+
import { Schema } from "effect";
|
|
4
|
+
import { WaitlistNotFoundError } from "@namera-ai/protocol";
|
|
5
|
+
//#region src/routes/waitlist.d.ts
|
|
6
|
+
declare const WaitlistGroup_base: HttpApiGroup.HttpApiGroup<"waitlist", HttpApiEndpoint.HttpApiEndpoint<"join", "POST", "/waitlist", never, never, Schema.toCodecJson<Schema.Struct<{
|
|
7
|
+
readonly email: Schema.brand<Schema.decodeTo<Schema.toType<Schema.String>, Schema.String, never, never>, "Email">;
|
|
8
|
+
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
9
|
+
readonly accepted: Schema.Literal<true>;
|
|
10
|
+
}>>, Schema.toCodecJson<import("effect/unstable/httpapi/HttpApiSchema").asNoContent<typeof import("effect/unstable/httpapi/HttpApiError").Forbidden> | import("effect/unstable/httpapi/HttpApiSchema").asNoContent<typeof import("effect/unstable/httpapi/HttpApiError").InternalServerError> | typeof import("@namera-ai/protocol").RateLimitExceeded>, never, never>, false>;
|
|
11
|
+
declare class WaitlistGroup extends WaitlistGroup_base {}
|
|
12
|
+
declare const AdminWaitlistGroup_base: HttpApiGroup.HttpApiGroup<"adminWaitlist", HttpApiEndpoint.HttpApiEndpoint<"list", "GET", "/internal/waitlist", never, Schema.toCodecStringTree<Schema.Struct<{
|
|
13
|
+
readonly limit: Schema.optionalKey<Schema.NumberFromString>;
|
|
14
|
+
readonly cursor: Schema.optionalKey<Schema.String>;
|
|
15
|
+
readonly status: Schema.optionalKey<Schema.Literals<readonly ["pending", "completed"]>>;
|
|
16
|
+
readonly search: Schema.optionalKey<Schema.String>;
|
|
17
|
+
}>>, never, never, Schema.toCodecJson<Schema.Struct<{
|
|
18
|
+
readonly entries: Schema.$Array<Schema.Struct<{
|
|
19
|
+
readonly id: Schema.String;
|
|
20
|
+
readonly email: Schema.brand<Schema.decodeTo<Schema.toType<Schema.String>, Schema.String, never, never>, "Email">;
|
|
21
|
+
readonly status: Schema.Literals<readonly ["pending", "completed"]>;
|
|
22
|
+
readonly createdAt: Schema.DateTimeUtcFromDate;
|
|
23
|
+
readonly updatedAt: Schema.DateTimeUtcFromDate;
|
|
24
|
+
readonly completedAt: Schema.NullOr<Schema.DateTimeUtcFromDate>;
|
|
25
|
+
}>>;
|
|
26
|
+
readonly nextCursor: Schema.NullOr<Schema.String>;
|
|
27
|
+
}>>, Schema.toCodecJson<import("effect/unstable/httpapi/HttpApiSchema").asNoContent<typeof import("effect/unstable/httpapi/HttpApiError").Forbidden> | import("effect/unstable/httpapi/HttpApiSchema").asNoContent<typeof import("effect/unstable/httpapi/HttpApiError").InternalServerError> | typeof import("@namera-ai/protocol").RateLimitExceeded>, AdminAuthorization, never> | HttpApiEndpoint.HttpApiEndpoint<"setStatus", "PATCH", "/internal/waitlist/:id", Schema.toCodecStringTree<Schema.Struct<{
|
|
28
|
+
id: Schema.String;
|
|
29
|
+
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
30
|
+
readonly status: Schema.Literals<readonly ["pending", "completed"]>;
|
|
31
|
+
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
32
|
+
readonly id: Schema.String;
|
|
33
|
+
readonly email: Schema.brand<Schema.decodeTo<Schema.toType<Schema.String>, Schema.String, never, never>, "Email">;
|
|
34
|
+
readonly status: Schema.Literals<readonly ["pending", "completed"]>;
|
|
35
|
+
readonly createdAt: Schema.DateTimeUtcFromDate;
|
|
36
|
+
readonly updatedAt: Schema.DateTimeUtcFromDate;
|
|
37
|
+
readonly completedAt: Schema.NullOr<Schema.DateTimeUtcFromDate>;
|
|
38
|
+
}>>, Schema.toCodecJson<import("effect/unstable/httpapi/HttpApiSchema").asNoContent<typeof import("effect/unstable/httpapi/HttpApiError").Forbidden> | import("effect/unstable/httpapi/HttpApiSchema").asNoContent<typeof import("effect/unstable/httpapi/HttpApiError").InternalServerError> | typeof import("@namera-ai/protocol").RateLimitExceeded | typeof WaitlistNotFoundError>, AdminAuthorization, never>, false>;
|
|
39
|
+
declare class AdminWaitlistGroup extends AdminWaitlistGroup_base {}
|
|
40
|
+
//#endregion
|
|
41
|
+
export { AdminWaitlistGroup, WaitlistGroup };
|
|
42
|
+
//# sourceMappingURL=waitlist.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"waitlist.d.ts","names":[],"sources":["../../src/routes/waitlist.ts"],"mappings":";;;;;;;;;;cAgBa,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAQtB,2BAA2B"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { CommonErrors } from "../common.js";
|
|
2
|
+
import { AdminAuthorization } from "../middlewares/admin.js";
|
|
3
|
+
import { HttpApiEndpoint, HttpApiGroup } from "effect/unstable/httpapi";
|
|
4
|
+
import { Schema } from "effect";
|
|
5
|
+
import { WaitlistNotFoundError } from "@namera-ai/protocol";
|
|
6
|
+
import { JoinWaitlistRequest, JoinWaitlistResponse, ListWaitlistRequest, ListWaitlistResponse, UpdateWaitlistRequest, WaitlistEntryResponse } from "@namera-ai/protocol/dto";
|
|
7
|
+
|
|
8
|
+
//#region src/routes/waitlist.ts
|
|
9
|
+
var WaitlistGroup = class extends HttpApiGroup.make("waitlist").add(HttpApiEndpoint.post("join", "/waitlist", {
|
|
10
|
+
payload: JoinWaitlistRequest,
|
|
11
|
+
success: JoinWaitlistResponse,
|
|
12
|
+
error: CommonErrors
|
|
13
|
+
})) {};
|
|
14
|
+
var AdminWaitlistGroup = class extends HttpApiGroup.make("adminWaitlist").add(HttpApiEndpoint.get("list", "/internal/waitlist", {
|
|
15
|
+
query: ListWaitlistRequest,
|
|
16
|
+
success: ListWaitlistResponse,
|
|
17
|
+
error: CommonErrors
|
|
18
|
+
}), HttpApiEndpoint.patch("setStatus", "/internal/waitlist/:id", {
|
|
19
|
+
params: { id: Schema.String.check(Schema.isUUID()) },
|
|
20
|
+
payload: UpdateWaitlistRequest,
|
|
21
|
+
success: WaitlistEntryResponse,
|
|
22
|
+
error: [WaitlistNotFoundError, ...CommonErrors]
|
|
23
|
+
})).middleware(AdminAuthorization) {};
|
|
24
|
+
|
|
25
|
+
//#endregion
|
|
26
|
+
export { AdminWaitlistGroup, WaitlistGroup };
|
|
27
|
+
//# sourceMappingURL=waitlist.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"waitlist.js","names":[],"sources":["../../src/routes/waitlist.ts"],"sourcesContent":["import { Schema } from \"effect\";\nimport { HttpApiEndpoint, HttpApiGroup } from \"effect/unstable/httpapi\";\n\nimport { WaitlistNotFoundError } from \"@namera-ai/protocol\";\nimport {\n JoinWaitlistRequest,\n JoinWaitlistResponse,\n ListWaitlistRequest,\n ListWaitlistResponse,\n UpdateWaitlistRequest,\n WaitlistEntryResponse,\n} from \"@namera-ai/protocol/dto\";\n\nimport { CommonErrors } from \"#/common\";\nimport { AdminAuthorization } from \"#/middlewares/admin\";\n\nexport class WaitlistGroup extends HttpApiGroup.make(\"waitlist\").add(\n HttpApiEndpoint.post(\"join\", \"/waitlist\", {\n payload: JoinWaitlistRequest,\n success: JoinWaitlistResponse,\n error: CommonErrors,\n }),\n) {}\n\nexport class AdminWaitlistGroup extends HttpApiGroup.make(\"adminWaitlist\")\n .add(\n HttpApiEndpoint.get(\"list\", \"/internal/waitlist\", {\n query: ListWaitlistRequest,\n success: ListWaitlistResponse,\n error: CommonErrors,\n }),\n HttpApiEndpoint.patch(\"setStatus\", \"/internal/waitlist/:id\", {\n params: { id: Schema.String.check(Schema.isUUID()) },\n payload: UpdateWaitlistRequest,\n success: WaitlistEntryResponse,\n error: [WaitlistNotFoundError, ...CommonErrors],\n }),\n )\n .middleware(AdminAuthorization) {}\n"],"mappings":";;;;;;;;AAgBA,IAAa,gBAAb,cAAmC,aAAa,KAAK,UAAU,CAAC,CAAC,IAC/D,gBAAgB,KAAK,QAAQ,aAAa;CACxC,SAAS;CACT,SAAS;CACT,OAAO;AACT,CAAC,CACH,CAAC,CAAC,CAAC;AAEH,IAAa,qBAAb,cAAwC,aAAa,KAAK,eAAe,CAAC,CACvE,IACC,gBAAgB,IAAI,QAAQ,sBAAsB;CAChD,OAAO;CACP,SAAS;CACT,OAAO;AACT,CAAC,GACD,gBAAgB,MAAM,aAAa,0BAA0B;CAC3D,QAAQ,EAAE,IAAI,OAAO,OAAO,MAAM,OAAO,OAAO,CAAC,EAAE;CACnD,SAAS;CACT,SAAS;CACT,OAAO,CAAC,uBAAuB,GAAG,YAAY;AAChD,CAAC,CACH,CAAC,CACA,WAAW,kBAAkB,CAAC,CAAC,CAAC"}
|