mirror of
https://github.com/hanzoai/iam.git
synced 2026-11-19 18:37:16 +00:00
A wallet is a free key, so headless web3 sign-up minted one free account per key without limit. Cap counts account creations, never sign-ins, per client address and per IPv4 /24 or IPv6 /64 in a window: default 10 and 50 per 24h, set by IAM_WALLET_CAP_IP, IAM_WALLET_CAP_SUBNET and IAM_WALLET_CAP_WINDOW (0 = off). The count is the wallet-signup audit ledger, read and written in the account's own transaction, so a refusal writes no row and concurrent creations cannot share a count. Past a bound: 429, Retry-After, code wallet_signup_capped and the bound in data. The client address is httpx.Client, the identifier throttle's rule moved so both read one: CF-Connecting-IP, else the last X-Forwarded-For hop.
17 lines
1.3 KiB
Go
17 lines
1.3 KiB
Go
// Code generated by zipdoc; DO NOT EDIT.
|
|
|
|
package wallet
|
|
|
|
import (
|
|
"github.com/zap-proto/zip"
|
|
)
|
|
|
|
func init() {
|
|
zip.Describe("github.com/hanzoai/iam/internal/wallet GET /v1/iam/web3/nonce", zip.Doc{
|
|
Description: "Starts a wallet sign-in: it returns a one-time challenge for the wallet\nto sign. The challenge is good once and is tied to the site that asked for it,\nso a signature collected elsewhere cannot be replayed here. Pass your\napplication's clientId and, from a page at one of its registered redirect\norigins, the challenge names that page's site, which is what the wallet shows\nthe person.",
|
|
})
|
|
zip.Describe("github.com/hanzoai/iam/internal/wallet POST /v1/iam/web3/verify", zip.Doc{
|
|
Description: "Completes a wallet sign-in: it verifies the signed challenge and, if it\nholds, signs the wallet's owner in.\n\nThis IS the login — it answers exactly as a password sign-in does, so the rest\nof your flow does not branch on how somebody arrived.\n\nA wallet no account holds yet creates one, and one address or one network\ncreates only so many in a window, a day by default. Past that the answer is\n429 with Retry-After and code wallet_signup_capped; data names the bound (\"ip\"\nor \"subnet\"), its limit, and its window in seconds. A wallet already on file\nis never counted.",
|
|
})
|
|
}
|