@1claw/openapi-spec 0.61.48 → 0.61.49
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/openapi.json +326 -1
- package/openapi.yaml +234 -1
- package/package.json +2 -2
package/openapi.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"openapi": "3.1.0",
|
|
3
3
|
"info": {
|
|
4
4
|
"title": "1Claw API",
|
|
5
|
-
"version": "0.61.
|
|
5
|
+
"version": "0.61.49",
|
|
6
6
|
"description": "Secure secret management for AI agents. Provides vaults, secrets,\npolicy-based access control, agent identity, Intents API,\nsharing, billing, and audit logging. Automations (workflow_spec,\nwebhook tokens, event triggers, Assist), cloud runtimes with\ninteractive shell sessions, agent memory, and discovery.\n\n## Domains\n\n`api.1claw.co` is canonical: it is the OIDC issuer, the `aud` the API\nmints, and the first entry in `servers` — a generated client takes its\nbase URL from there, and the previous ordering pointed every SDK at the\ndomain the issuer had already left. `api.1claw.xyz` still answers and is\nstill accepted on token validation, because tokens minted before the\nmove carry it; it is never minted now.\n\nOne deliberate exception: the Shroud attestation identity token is\nrequested from GCP with `audience: https://api.1claw.xyz`, so\n`/v1/shroud/attestation` reports that as its `expected_audience`. That\nis accurate rather than stale — the audience is a verification contract\nwith anyone already checking the token, and moving it is a breaking\nchange for them, not a rename.\n\nAll endpoints require JWT Bearer authentication unless marked with\n`security: []`.\n",
|
|
7
7
|
"contact": {
|
|
8
8
|
"email": "ops@1claw.co"
|
|
@@ -7760,6 +7760,194 @@
|
|
|
7760
7760
|
}
|
|
7761
7761
|
}
|
|
7762
7762
|
},
|
|
7763
|
+
"/v1/staking/points": {
|
|
7764
|
+
"get": {
|
|
7765
|
+
"tags": [
|
|
7766
|
+
"Billing"
|
|
7767
|
+
],
|
|
7768
|
+
"summary": "Staking points for the signed-in user's wallet",
|
|
7769
|
+
"description": "Points earned by staking, what has been redeemed here, and what is\nleft.\n\nThe two halves come from different places on purpose. `earned` is\nread per request from the staking service, which recomputes it from\non-chain events; `spent` is this service's own append-only ledger.\n`available` is the difference, floored at zero.\n\nThe wallet is the one on the account, proven by a SIWE signature at\nsign-in — there is no way to ask about another address.\n\n`can_redeem` is false until the account has a real, verified email:\na wallet signature proves possession of a key, not a reachable\nperson, and `redeem_blocked_reason` says what to do about it.\n",
|
|
7770
|
+
"operationId": "getStakingPoints",
|
|
7771
|
+
"responses": {
|
|
7772
|
+
"200": {
|
|
7773
|
+
"description": "Points and rates",
|
|
7774
|
+
"content": {
|
|
7775
|
+
"application/json": {
|
|
7776
|
+
"schema": {
|
|
7777
|
+
"type": "object",
|
|
7778
|
+
"properties": {
|
|
7779
|
+
"wallet_address": {
|
|
7780
|
+
"type": "string"
|
|
7781
|
+
},
|
|
7782
|
+
"earned": {
|
|
7783
|
+
"type": "integer",
|
|
7784
|
+
"format": "int64"
|
|
7785
|
+
},
|
|
7786
|
+
"spent": {
|
|
7787
|
+
"type": "integer",
|
|
7788
|
+
"format": "int64"
|
|
7789
|
+
},
|
|
7790
|
+
"available": {
|
|
7791
|
+
"type": "integer",
|
|
7792
|
+
"format": "int64"
|
|
7793
|
+
},
|
|
7794
|
+
"can_redeem": {
|
|
7795
|
+
"type": "boolean"
|
|
7796
|
+
},
|
|
7797
|
+
"redeem_blocked_reason": {
|
|
7798
|
+
"type": "string",
|
|
7799
|
+
"nullable": true
|
|
7800
|
+
},
|
|
7801
|
+
"rates": {
|
|
7802
|
+
"type": "object",
|
|
7803
|
+
"properties": {
|
|
7804
|
+
"points_per_pro_month": {
|
|
7805
|
+
"type": "integer"
|
|
7806
|
+
},
|
|
7807
|
+
"micro_usd_per_point": {
|
|
7808
|
+
"type": "integer"
|
|
7809
|
+
},
|
|
7810
|
+
"points_per_day_per_100m_tokens": {
|
|
7811
|
+
"type": "integer"
|
|
7812
|
+
},
|
|
7813
|
+
"max_pro_months_per_redemption": {
|
|
7814
|
+
"type": "integer"
|
|
7815
|
+
}
|
|
7816
|
+
}
|
|
7817
|
+
},
|
|
7818
|
+
"recent": {
|
|
7819
|
+
"type": "array",
|
|
7820
|
+
"items": {
|
|
7821
|
+
"type": "object",
|
|
7822
|
+
"properties": {
|
|
7823
|
+
"id": {
|
|
7824
|
+
"type": "string",
|
|
7825
|
+
"format": "uuid"
|
|
7826
|
+
},
|
|
7827
|
+
"wallet_address": {
|
|
7828
|
+
"type": "string"
|
|
7829
|
+
},
|
|
7830
|
+
"points_spent": {
|
|
7831
|
+
"type": "integer",
|
|
7832
|
+
"format": "int64"
|
|
7833
|
+
},
|
|
7834
|
+
"reward_type": {
|
|
7835
|
+
"type": "string",
|
|
7836
|
+
"enum": [
|
|
7837
|
+
"pro_months",
|
|
7838
|
+
"credits"
|
|
7839
|
+
]
|
|
7840
|
+
},
|
|
7841
|
+
"reward_detail": {
|
|
7842
|
+
"type": "object"
|
|
7843
|
+
},
|
|
7844
|
+
"created_at": {
|
|
7845
|
+
"type": "string",
|
|
7846
|
+
"format": "date-time"
|
|
7847
|
+
}
|
|
7848
|
+
}
|
|
7849
|
+
}
|
|
7850
|
+
}
|
|
7851
|
+
}
|
|
7852
|
+
}
|
|
7853
|
+
}
|
|
7854
|
+
}
|
|
7855
|
+
},
|
|
7856
|
+
"400": {
|
|
7857
|
+
"description": "No wallet linked to this account"
|
|
7858
|
+
},
|
|
7859
|
+
"403": {
|
|
7860
|
+
"description": "Only a signed-in person can read staking points"
|
|
7861
|
+
},
|
|
7862
|
+
"503": {
|
|
7863
|
+
"description": "The staking service could not report points. Deliberately not\nreported as zero — that would tell a staker their earnings\nhad vanished.\n"
|
|
7864
|
+
}
|
|
7865
|
+
}
|
|
7866
|
+
}
|
|
7867
|
+
},
|
|
7868
|
+
"/v1/staking/redeem": {
|
|
7869
|
+
"post": {
|
|
7870
|
+
"tags": [
|
|
7871
|
+
"Billing"
|
|
7872
|
+
],
|
|
7873
|
+
"summary": "Redeem staking points for plan time or credits",
|
|
7874
|
+
"description": "Spends points from the wallet on the account.\n\n`quantity` is **months** for `pro_months` and **points** for\n`credits`; the response always states the cost actually charged.\n\nPro months extend an existing period rather than replacing it, so\nredeeming twice does not discard the time already granted. They are\nrefused when the organisation has a Stripe subscription, or is on a\ntier above Pro: a comped tier would overwrite the plan being paid\nfor and would never expire. Credits apply on top of a subscription\nand are the right choice there.\n\nRedemption serialises on the wallet's ledger, so two concurrent\nrequests cannot spend the same points.\n",
|
|
7875
|
+
"operationId": "redeemStakingPoints",
|
|
7876
|
+
"requestBody": {
|
|
7877
|
+
"required": true,
|
|
7878
|
+
"content": {
|
|
7879
|
+
"application/json": {
|
|
7880
|
+
"schema": {
|
|
7881
|
+
"type": "object",
|
|
7882
|
+
"required": [
|
|
7883
|
+
"reward_type",
|
|
7884
|
+
"quantity"
|
|
7885
|
+
],
|
|
7886
|
+
"properties": {
|
|
7887
|
+
"reward_type": {
|
|
7888
|
+
"type": "string",
|
|
7889
|
+
"enum": [
|
|
7890
|
+
"pro_months",
|
|
7891
|
+
"credits"
|
|
7892
|
+
]
|
|
7893
|
+
},
|
|
7894
|
+
"quantity": {
|
|
7895
|
+
"type": "integer",
|
|
7896
|
+
"format": "int64",
|
|
7897
|
+
"minimum": 1,
|
|
7898
|
+
"description": "Months for pro_months; points for credits"
|
|
7899
|
+
}
|
|
7900
|
+
}
|
|
7901
|
+
}
|
|
7902
|
+
}
|
|
7903
|
+
}
|
|
7904
|
+
},
|
|
7905
|
+
"responses": {
|
|
7906
|
+
"200": {
|
|
7907
|
+
"description": "Redeemed",
|
|
7908
|
+
"content": {
|
|
7909
|
+
"application/json": {
|
|
7910
|
+
"schema": {
|
|
7911
|
+
"type": "object",
|
|
7912
|
+
"properties": {
|
|
7913
|
+
"redemption_id": {
|
|
7914
|
+
"type": "string",
|
|
7915
|
+
"format": "uuid"
|
|
7916
|
+
},
|
|
7917
|
+
"points_spent": {
|
|
7918
|
+
"type": "integer",
|
|
7919
|
+
"format": "int64"
|
|
7920
|
+
},
|
|
7921
|
+
"remaining_available": {
|
|
7922
|
+
"type": "integer",
|
|
7923
|
+
"format": "int64"
|
|
7924
|
+
},
|
|
7925
|
+
"reward_type": {
|
|
7926
|
+
"type": "string"
|
|
7927
|
+
},
|
|
7928
|
+
"reward_detail": {
|
|
7929
|
+
"type": "object"
|
|
7930
|
+
}
|
|
7931
|
+
}
|
|
7932
|
+
}
|
|
7933
|
+
}
|
|
7934
|
+
}
|
|
7935
|
+
},
|
|
7936
|
+
"400": {
|
|
7937
|
+
"description": "Not enough points, or no wallet linked"
|
|
7938
|
+
},
|
|
7939
|
+
"403": {
|
|
7940
|
+
"description": "A real verified email is required before redeeming"
|
|
7941
|
+
},
|
|
7942
|
+
"409": {
|
|
7943
|
+
"description": "Pro months refused because the organisation's billing is owned\nby Stripe, or its tier is above Pro. Redeem credits instead.\n"
|
|
7944
|
+
},
|
|
7945
|
+
"503": {
|
|
7946
|
+
"description": "The staking service could not report points; nothing was charged"
|
|
7947
|
+
}
|
|
7948
|
+
}
|
|
7949
|
+
}
|
|
7950
|
+
},
|
|
7763
7951
|
"/v1/billing/credits/topup": {
|
|
7764
7952
|
"post": {
|
|
7765
7953
|
"tags": [
|
|
@@ -17674,6 +17862,143 @@
|
|
|
17674
17862
|
}
|
|
17675
17863
|
}
|
|
17676
17864
|
},
|
|
17865
|
+
"/v1/auth/siwe/challenge": {
|
|
17866
|
+
"post": {
|
|
17867
|
+
"tags": [
|
|
17868
|
+
"Authentication"
|
|
17869
|
+
],
|
|
17870
|
+
"summary": "Start wallet sign-in (SIWE)",
|
|
17871
|
+
"description": "Returns the exact EIP-4361 message to sign, for signing in to the\ndashboard with an Ethereum wallet.\n\nThe message is built server-side and returned whole: the domain and\nthe nonce are ours to decide, and a client that assembles its own\nmessage is a client that can be talked into signing a different\none. Sign it unmodified and post it back to\n`/v1/auth/siwe/verify`.\n\nThe nonce is single-use and valid for five minutes. Distinct from\n`/v1/platform/siwe/challenge`, which needs a `plt_` caller and\nissues nonces scoped to one platform app for *its* end users.\n",
|
|
17872
|
+
"operationId": "siweLoginChallenge",
|
|
17873
|
+
"security": [],
|
|
17874
|
+
"requestBody": {
|
|
17875
|
+
"required": true,
|
|
17876
|
+
"content": {
|
|
17877
|
+
"application/json": {
|
|
17878
|
+
"schema": {
|
|
17879
|
+
"type": "object",
|
|
17880
|
+
"required": [
|
|
17881
|
+
"address"
|
|
17882
|
+
],
|
|
17883
|
+
"properties": {
|
|
17884
|
+
"address": {
|
|
17885
|
+
"type": "string",
|
|
17886
|
+
"description": "0x-prefixed 20-byte Ethereum address",
|
|
17887
|
+
"example": "0x0000000000000000000000000000000000000001"
|
|
17888
|
+
}
|
|
17889
|
+
}
|
|
17890
|
+
}
|
|
17891
|
+
}
|
|
17892
|
+
}
|
|
17893
|
+
},
|
|
17894
|
+
"responses": {
|
|
17895
|
+
"200": {
|
|
17896
|
+
"description": "Message to sign",
|
|
17897
|
+
"content": {
|
|
17898
|
+
"application/json": {
|
|
17899
|
+
"schema": {
|
|
17900
|
+
"type": "object",
|
|
17901
|
+
"properties": {
|
|
17902
|
+
"message": {
|
|
17903
|
+
"type": "string",
|
|
17904
|
+
"description": "Sign this verbatim"
|
|
17905
|
+
},
|
|
17906
|
+
"nonce": {
|
|
17907
|
+
"type": "string"
|
|
17908
|
+
},
|
|
17909
|
+
"expires_in_secs": {
|
|
17910
|
+
"type": "integer"
|
|
17911
|
+
}
|
|
17912
|
+
}
|
|
17913
|
+
}
|
|
17914
|
+
}
|
|
17915
|
+
}
|
|
17916
|
+
},
|
|
17917
|
+
"400": {
|
|
17918
|
+
"description": "Not a valid Ethereum address"
|
|
17919
|
+
},
|
|
17920
|
+
"429": {
|
|
17921
|
+
"description": "Rate limited"
|
|
17922
|
+
}
|
|
17923
|
+
}
|
|
17924
|
+
}
|
|
17925
|
+
},
|
|
17926
|
+
"/v1/auth/siwe/verify": {
|
|
17927
|
+
"post": {
|
|
17928
|
+
"tags": [
|
|
17929
|
+
"Authentication"
|
|
17930
|
+
],
|
|
17931
|
+
"summary": "Complete wallet sign-in and get a JWT",
|
|
17932
|
+
"description": "Verifies the signature over the challenge message and returns an\nordinary user JWT — the same token social login and email-OTP\nproduce.\n\nFirst sign-in for an address creates a user and org. That user's\nemail starts synthetic (`email_pending: true`) and unverified: a\nwallet signature proves possession of a key, not a reachable\nperson. Staking redemption refuses until a real address is added\nand confirmed.\n\nThe wallet recovered from the signature is stored on the account\nand is the identity staking points are counted against. It is\nnever accepted from a request body anywhere.\n",
|
|
17933
|
+
"operationId": "siweLoginVerify",
|
|
17934
|
+
"security": [],
|
|
17935
|
+
"requestBody": {
|
|
17936
|
+
"required": true,
|
|
17937
|
+
"content": {
|
|
17938
|
+
"application/json": {
|
|
17939
|
+
"schema": {
|
|
17940
|
+
"type": "object",
|
|
17941
|
+
"required": [
|
|
17942
|
+
"message",
|
|
17943
|
+
"signature"
|
|
17944
|
+
],
|
|
17945
|
+
"properties": {
|
|
17946
|
+
"message": {
|
|
17947
|
+
"type": "string",
|
|
17948
|
+
"description": "The challenge message, unmodified"
|
|
17949
|
+
},
|
|
17950
|
+
"signature": {
|
|
17951
|
+
"type": "string",
|
|
17952
|
+
"description": "Hex signature over the message"
|
|
17953
|
+
}
|
|
17954
|
+
}
|
|
17955
|
+
}
|
|
17956
|
+
}
|
|
17957
|
+
}
|
|
17958
|
+
},
|
|
17959
|
+
"responses": {
|
|
17960
|
+
"200": {
|
|
17961
|
+
"description": "Authenticated",
|
|
17962
|
+
"content": {
|
|
17963
|
+
"application/json": {
|
|
17964
|
+
"schema": {
|
|
17965
|
+
"type": "object",
|
|
17966
|
+
"properties": {
|
|
17967
|
+
"token": {
|
|
17968
|
+
"type": "string"
|
|
17969
|
+
},
|
|
17970
|
+
"user_id": {
|
|
17971
|
+
"type": "string",
|
|
17972
|
+
"format": "uuid"
|
|
17973
|
+
},
|
|
17974
|
+
"org_id": {
|
|
17975
|
+
"type": "string",
|
|
17976
|
+
"format": "uuid"
|
|
17977
|
+
},
|
|
17978
|
+
"wallet_address": {
|
|
17979
|
+
"type": "string"
|
|
17980
|
+
},
|
|
17981
|
+
"is_new_user": {
|
|
17982
|
+
"type": "boolean"
|
|
17983
|
+
},
|
|
17984
|
+
"email_pending": {
|
|
17985
|
+
"type": "boolean",
|
|
17986
|
+
"description": "True while the account email is still the synthetic\nwallet address. Redemption is blocked until a real\none is verified.\n"
|
|
17987
|
+
}
|
|
17988
|
+
}
|
|
17989
|
+
}
|
|
17990
|
+
}
|
|
17991
|
+
}
|
|
17992
|
+
},
|
|
17993
|
+
"400": {
|
|
17994
|
+
"description": "Expired or reused challenge, or a message signed for another domain"
|
|
17995
|
+
},
|
|
17996
|
+
"401": {
|
|
17997
|
+
"description": "Signature does not match the address in the message"
|
|
17998
|
+
}
|
|
17999
|
+
}
|
|
18000
|
+
}
|
|
18001
|
+
},
|
|
17677
18002
|
"/v1/oauth/authorize": {
|
|
17678
18003
|
"get": {
|
|
17679
18004
|
"tags": [
|
package/openapi.yaml
CHANGED
|
@@ -2,7 +2,7 @@ openapi: 3.1.0
|
|
|
2
2
|
|
|
3
3
|
info:
|
|
4
4
|
title: 1Claw API
|
|
5
|
-
version: "0.61.
|
|
5
|
+
version: "0.61.49"
|
|
6
6
|
description: |
|
|
7
7
|
Secure secret management for AI agents. Provides vaults, secrets,
|
|
8
8
|
policy-based access control, agent identity, Intents API,
|
|
@@ -5015,6 +5015,132 @@ paths:
|
|
|
5015
5015
|
schema:
|
|
5016
5016
|
$ref: "#/components/schemas/SubscriptionResponse"
|
|
5017
5017
|
|
|
5018
|
+
/v1/staking/points:
|
|
5019
|
+
get:
|
|
5020
|
+
tags: [Billing]
|
|
5021
|
+
summary: Staking points for the signed-in user's wallet
|
|
5022
|
+
description: |
|
|
5023
|
+
Points earned by staking, what has been redeemed here, and what is
|
|
5024
|
+
left.
|
|
5025
|
+
|
|
5026
|
+
The two halves come from different places on purpose. `earned` is
|
|
5027
|
+
read per request from the staking service, which recomputes it from
|
|
5028
|
+
on-chain events; `spent` is this service's own append-only ledger.
|
|
5029
|
+
`available` is the difference, floored at zero.
|
|
5030
|
+
|
|
5031
|
+
The wallet is the one on the account, proven by a SIWE signature at
|
|
5032
|
+
sign-in — there is no way to ask about another address.
|
|
5033
|
+
|
|
5034
|
+
`can_redeem` is false until the account has a real, verified email:
|
|
5035
|
+
a wallet signature proves possession of a key, not a reachable
|
|
5036
|
+
person, and `redeem_blocked_reason` says what to do about it.
|
|
5037
|
+
operationId: getStakingPoints
|
|
5038
|
+
responses:
|
|
5039
|
+
"200":
|
|
5040
|
+
description: Points and rates
|
|
5041
|
+
content:
|
|
5042
|
+
application/json:
|
|
5043
|
+
schema:
|
|
5044
|
+
type: object
|
|
5045
|
+
properties:
|
|
5046
|
+
wallet_address: { type: string }
|
|
5047
|
+
earned: { type: integer, format: int64 }
|
|
5048
|
+
spent: { type: integer, format: int64 }
|
|
5049
|
+
available: { type: integer, format: int64 }
|
|
5050
|
+
can_redeem: { type: boolean }
|
|
5051
|
+
redeem_blocked_reason:
|
|
5052
|
+
type: string
|
|
5053
|
+
nullable: true
|
|
5054
|
+
rates:
|
|
5055
|
+
type: object
|
|
5056
|
+
properties:
|
|
5057
|
+
points_per_pro_month: { type: integer }
|
|
5058
|
+
micro_usd_per_point: { type: integer }
|
|
5059
|
+
points_per_day_per_100m_tokens: { type: integer }
|
|
5060
|
+
max_pro_months_per_redemption: { type: integer }
|
|
5061
|
+
recent:
|
|
5062
|
+
type: array
|
|
5063
|
+
items:
|
|
5064
|
+
type: object
|
|
5065
|
+
properties:
|
|
5066
|
+
id: { type: string, format: uuid }
|
|
5067
|
+
wallet_address: { type: string }
|
|
5068
|
+
points_spent: { type: integer, format: int64 }
|
|
5069
|
+
reward_type:
|
|
5070
|
+
type: string
|
|
5071
|
+
enum: [pro_months, credits]
|
|
5072
|
+
reward_detail: { type: object }
|
|
5073
|
+
created_at: { type: string, format: date-time }
|
|
5074
|
+
"400":
|
|
5075
|
+
description: No wallet linked to this account
|
|
5076
|
+
"403":
|
|
5077
|
+
description: Only a signed-in person can read staking points
|
|
5078
|
+
"503":
|
|
5079
|
+
description: |
|
|
5080
|
+
The staking service could not report points. Deliberately not
|
|
5081
|
+
reported as zero — that would tell a staker their earnings
|
|
5082
|
+
had vanished.
|
|
5083
|
+
|
|
5084
|
+
/v1/staking/redeem:
|
|
5085
|
+
post:
|
|
5086
|
+
tags: [Billing]
|
|
5087
|
+
summary: Redeem staking points for plan time or credits
|
|
5088
|
+
description: |
|
|
5089
|
+
Spends points from the wallet on the account.
|
|
5090
|
+
|
|
5091
|
+
`quantity` is **months** for `pro_months` and **points** for
|
|
5092
|
+
`credits`; the response always states the cost actually charged.
|
|
5093
|
+
|
|
5094
|
+
Pro months extend an existing period rather than replacing it, so
|
|
5095
|
+
redeeming twice does not discard the time already granted. They are
|
|
5096
|
+
refused when the organisation has a Stripe subscription, or is on a
|
|
5097
|
+
tier above Pro: a comped tier would overwrite the plan being paid
|
|
5098
|
+
for and would never expire. Credits apply on top of a subscription
|
|
5099
|
+
and are the right choice there.
|
|
5100
|
+
|
|
5101
|
+
Redemption serialises on the wallet's ledger, so two concurrent
|
|
5102
|
+
requests cannot spend the same points.
|
|
5103
|
+
operationId: redeemStakingPoints
|
|
5104
|
+
requestBody:
|
|
5105
|
+
required: true
|
|
5106
|
+
content:
|
|
5107
|
+
application/json:
|
|
5108
|
+
schema:
|
|
5109
|
+
type: object
|
|
5110
|
+
required: [reward_type, quantity]
|
|
5111
|
+
properties:
|
|
5112
|
+
reward_type:
|
|
5113
|
+
type: string
|
|
5114
|
+
enum: [pro_months, credits]
|
|
5115
|
+
quantity:
|
|
5116
|
+
type: integer
|
|
5117
|
+
format: int64
|
|
5118
|
+
minimum: 1
|
|
5119
|
+
description: Months for pro_months; points for credits
|
|
5120
|
+
responses:
|
|
5121
|
+
"200":
|
|
5122
|
+
description: Redeemed
|
|
5123
|
+
content:
|
|
5124
|
+
application/json:
|
|
5125
|
+
schema:
|
|
5126
|
+
type: object
|
|
5127
|
+
properties:
|
|
5128
|
+
redemption_id: { type: string, format: uuid }
|
|
5129
|
+
points_spent: { type: integer, format: int64 }
|
|
5130
|
+
remaining_available: { type: integer, format: int64 }
|
|
5131
|
+
reward_type: { type: string }
|
|
5132
|
+
reward_detail: { type: object }
|
|
5133
|
+
"400":
|
|
5134
|
+
description: Not enough points, or no wallet linked
|
|
5135
|
+
"403":
|
|
5136
|
+
description: A real verified email is required before redeeming
|
|
5137
|
+
"409":
|
|
5138
|
+
description: |
|
|
5139
|
+
Pro months refused because the organisation's billing is owned
|
|
5140
|
+
by Stripe, or its tier is above Pro. Redeem credits instead.
|
|
5141
|
+
"503":
|
|
5142
|
+
description: The staking service could not report points; nothing was charged
|
|
5143
|
+
|
|
5018
5144
|
/v1/billing/credits/topup:
|
|
5019
5145
|
post:
|
|
5020
5146
|
tags: [Billing]
|
|
@@ -11262,6 +11388,113 @@ paths:
|
|
|
11262
11388
|
"429":
|
|
11263
11389
|
description: Rate limited
|
|
11264
11390
|
|
|
11391
|
+
/v1/auth/siwe/challenge:
|
|
11392
|
+
post:
|
|
11393
|
+
tags: [Authentication]
|
|
11394
|
+
summary: Start wallet sign-in (SIWE)
|
|
11395
|
+
description: |
|
|
11396
|
+
Returns the exact EIP-4361 message to sign, for signing in to the
|
|
11397
|
+
dashboard with an Ethereum wallet.
|
|
11398
|
+
|
|
11399
|
+
The message is built server-side and returned whole: the domain and
|
|
11400
|
+
the nonce are ours to decide, and a client that assembles its own
|
|
11401
|
+
message is a client that can be talked into signing a different
|
|
11402
|
+
one. Sign it unmodified and post it back to
|
|
11403
|
+
`/v1/auth/siwe/verify`.
|
|
11404
|
+
|
|
11405
|
+
The nonce is single-use and valid for five minutes. Distinct from
|
|
11406
|
+
`/v1/platform/siwe/challenge`, which needs a `plt_` caller and
|
|
11407
|
+
issues nonces scoped to one platform app for *its* end users.
|
|
11408
|
+
operationId: siweLoginChallenge
|
|
11409
|
+
security: []
|
|
11410
|
+
requestBody:
|
|
11411
|
+
required: true
|
|
11412
|
+
content:
|
|
11413
|
+
application/json:
|
|
11414
|
+
schema:
|
|
11415
|
+
type: object
|
|
11416
|
+
required: [address]
|
|
11417
|
+
properties:
|
|
11418
|
+
address:
|
|
11419
|
+
type: string
|
|
11420
|
+
description: 0x-prefixed 20-byte Ethereum address
|
|
11421
|
+
example: "0x0000000000000000000000000000000000000001"
|
|
11422
|
+
responses:
|
|
11423
|
+
"200":
|
|
11424
|
+
description: Message to sign
|
|
11425
|
+
content:
|
|
11426
|
+
application/json:
|
|
11427
|
+
schema:
|
|
11428
|
+
type: object
|
|
11429
|
+
properties:
|
|
11430
|
+
message:
|
|
11431
|
+
type: string
|
|
11432
|
+
description: Sign this verbatim
|
|
11433
|
+
nonce: { type: string }
|
|
11434
|
+
expires_in_secs: { type: integer }
|
|
11435
|
+
"400":
|
|
11436
|
+
description: Not a valid Ethereum address
|
|
11437
|
+
"429":
|
|
11438
|
+
description: Rate limited
|
|
11439
|
+
|
|
11440
|
+
/v1/auth/siwe/verify:
|
|
11441
|
+
post:
|
|
11442
|
+
tags: [Authentication]
|
|
11443
|
+
summary: Complete wallet sign-in and get a JWT
|
|
11444
|
+
description: |
|
|
11445
|
+
Verifies the signature over the challenge message and returns an
|
|
11446
|
+
ordinary user JWT — the same token social login and email-OTP
|
|
11447
|
+
produce.
|
|
11448
|
+
|
|
11449
|
+
First sign-in for an address creates a user and org. That user's
|
|
11450
|
+
email starts synthetic (`email_pending: true`) and unverified: a
|
|
11451
|
+
wallet signature proves possession of a key, not a reachable
|
|
11452
|
+
person. Staking redemption refuses until a real address is added
|
|
11453
|
+
and confirmed.
|
|
11454
|
+
|
|
11455
|
+
The wallet recovered from the signature is stored on the account
|
|
11456
|
+
and is the identity staking points are counted against. It is
|
|
11457
|
+
never accepted from a request body anywhere.
|
|
11458
|
+
operationId: siweLoginVerify
|
|
11459
|
+
security: []
|
|
11460
|
+
requestBody:
|
|
11461
|
+
required: true
|
|
11462
|
+
content:
|
|
11463
|
+
application/json:
|
|
11464
|
+
schema:
|
|
11465
|
+
type: object
|
|
11466
|
+
required: [message, signature]
|
|
11467
|
+
properties:
|
|
11468
|
+
message:
|
|
11469
|
+
type: string
|
|
11470
|
+
description: The challenge message, unmodified
|
|
11471
|
+
signature:
|
|
11472
|
+
type: string
|
|
11473
|
+
description: Hex signature over the message
|
|
11474
|
+
responses:
|
|
11475
|
+
"200":
|
|
11476
|
+
description: Authenticated
|
|
11477
|
+
content:
|
|
11478
|
+
application/json:
|
|
11479
|
+
schema:
|
|
11480
|
+
type: object
|
|
11481
|
+
properties:
|
|
11482
|
+
token: { type: string }
|
|
11483
|
+
user_id: { type: string, format: uuid }
|
|
11484
|
+
org_id: { type: string, format: uuid }
|
|
11485
|
+
wallet_address: { type: string }
|
|
11486
|
+
is_new_user: { type: boolean }
|
|
11487
|
+
email_pending:
|
|
11488
|
+
type: boolean
|
|
11489
|
+
description: |
|
|
11490
|
+
True while the account email is still the synthetic
|
|
11491
|
+
wallet address. Redemption is blocked until a real
|
|
11492
|
+
one is verified.
|
|
11493
|
+
"400":
|
|
11494
|
+
description: Expired or reused challenge, or a message signed for another domain
|
|
11495
|
+
"401":
|
|
11496
|
+
description: Signature does not match the address in the message
|
|
11497
|
+
|
|
11265
11498
|
# ---------------------------------------------------------------------------
|
|
11266
11499
|
# OAuth
|
|
11267
11500
|
# ---------------------------------------------------------------------------
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@1claw/openapi-spec",
|
|
3
|
-
"version": "0.61.
|
|
4
|
-
"description": "OpenAPI 3.1.0 specification for the 1Claw Vault API
|
|
3
|
+
"version": "0.61.49",
|
|
4
|
+
"description": "OpenAPI 3.1.0 specification for the 1Claw Vault API \u2014 generate clients in any language",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|