Repository Public
1{2 "openapi": "3.1.0",3 "info": {4 "title": "SP Wallet core API",5 "version": "1.0.0",6 "description": "Everything a wallet client (web, macOS, iOS) uses outside `/api/v1/trading`: authentication, accounts, portfolio, transfers, activity, address book, settings, security, alerts, events, analytics, search.\n\nAuthentication: the owner session — a `__Host-spw` cookie set by the passkey sign-in. Every mutating request also carries `Origin` (the wallet's own origin) and `X-SPW-CSRF: 1`. An API key (`Authorization: Bearer spw_live_…`) opens nothing here.\n\nADDITIVE: no member is ever removed, renamed or retyped; every object is open — ignore members you do not know. New routes and members only.\n\nAMOUNTS are strings of integer base units, next to a display string computed with exact arithmetic. Fiat figures are decimal strings. Market prices are display numbers and are never used as amounts.\n\nESTIMATES are flagged: a figure that is an estimate, partial or stale carries the member that says so (`complete`, `estimate`, `stale`, `unvalued`, `unknown`…). An estimate is never called a realised return.\n\nENUMERATIONS are components. `x-spw-open: true` means new values may appear in a later release: decode with an \"unknown\" fallback (the known values are in `x-spw-values`). `x-spw-open: false` is frozen for good.\n\nERRORS are `{ \"error\": \"<code>\", \"message\": \"<English sentence>\", \"data\"?: … }`. Every operation lists its codes with their status in `x-spw-errors`; `x-spw-errors-open` means a chain adapter or the signer can add one of its own (`signer_<code>`). What each code means and what to do: `x-spw-error-catalog`. A 400 `bad_request` from input validation carries `data.fields` (path, code, message — never the submitted value).\n\nA transfer's state is read in `lifecycle` (`x-spw-lifecycle`). `state` keeps the vocabulary shipped clients know and never grows. Once an approval left the device its outcome is unknown until the server answers: re-read the proposal, never assume failure.\n\nIDLE RULE. A session ends after 30 minutes without activity (12 hours at most). A client marks the requests made on a real interaction of the user with the header `X-SPW-Interaction: 1` (`x-spw-interaction-header`); from the first such request on, only those keep the session alive — background polling no longer does. A session that never sent the header keeps the earlier behaviour (any authenticated request refreshes it).\n\nCONTROL CHARACTERS. A NUL anywhere in a request (query, path, JSON body), or any control character in the query string or a path parameter, is refused with 400 `bad_request` before the route runs.\n\nOther route families of the same server are documented elsewhere: `x-spw-other-families`."7 },8 "servers": [9 {10 "url": "/",11 "description": "the wallet's own origin"12 }13 ],14 "tags": [15 {16 "name": "Meta",17 "description": "Liveness and readiness."18 },19 {20 "name": "Auth",21 "description": "Passkey sign-in and the one-time setup. The session is a `__Host-` HttpOnly cookie; nothing here returns a token."22 },23 {24 "name": "Wallet",25 "description": "Networks, the verified asset registry, the wallet's addresses, asset preferences, market prices."26 },27 {28 "name": "Portfolio",29 "description": "Balances with the provenance of their read, the server-computed summary, value history."30 },31 {32 "name": "Transfers",33 "description": "A transfer is prepared (draft), frozen and shown (request-approval), approved with a passkey assertion over the intent hash, then followed on-chain. Read `lifecycle`."34 },35 {36 "name": "Activity",37 "description": "What the wallet did and received."38 },39 {40 "name": "AddressBook",41 "description": "Contacts: labels for the owner's eyes. The destination approved is always the full address shown on the review."42 },43 {44 "name": "Settings",45 "description": "Language, currency, appearance: shared by every device."46 },47 {48 "name": "Security",49 "description": "Signer state, passkeys, sessions, the audit chain, the emergency halt."50 },51 {52 "name": "Alerts",53 "description": "In-app alerts, their settings, Web Push subscriptions, the optional webhook."54 },55 {56 "name": "Events",57 "description": "The wallet event log: how clients stay in step without re-reading everything on a timer."58 },59 {60 "name": "Dashboard",61 "description": "Read-only aggregates that compose the wallet and the trading services."62 },63 {64 "name": "Analytics",65 "description": "Flows, fees paid, outcomes and counterparties, from recorded facts only."66 },67 {68 "name": "Search",69 "description": "One search over assets, contacts and transactions."70 }71 ],72 "paths": {73 "/api/v1/health/live": {74 "get": {75 "operationId": "healthLive",76 "tags": [77 "Meta"78 ],79 "summary": "Liveness",80 "security": [],81 "x-spw-auth": "public",82 "x-spw-csrf": false,83 "x-spw-errors": [84 {85 "status": 429,86 "code": "rate_limited"87 },88 {89 "status": 500,90 "code": "internal"91 }92 ],93 "parameters": [],94 "responses": {95 "200": {96 "description": "OK",97 "content": {98 "application/json": {99 "schema": {100 "type": "object",101 "properties": {102 "ok": {103 "type": "boolean",104 "const": true105 }106 },107 "required": [108 "ok"109 ],110 "additionalProperties": {}111 }112 }113 }114 },115 "429": {116 "description": "Too many requests: `rate_limited`",117 "content": {118 "application/json": {119 "schema": {120 "$ref": "#/components/schemas/Error"121 }122 }123 }124 },125 "500": {126 "description": "Server error: `internal`",127 "content": {128 "application/json": {129 "schema": {130 "$ref": "#/components/schemas/Error"131 }132 }133 }134 }135 }136 }137 },138 "/api/v1/health/ready": {139 "get": {140 "operationId": "healthReady",141 "tags": [142 "Meta"143 ],144 "summary": "Readiness: database, signer, networks, data sources",145 "security": [146 {147 "session": []148 }149 ],150 "x-spw-auth": "session",151 "x-spw-csrf": false,152 "x-spw-errors": [153 {154 "status": 401,155 "code": "unauthenticated"156 },157 {158 "status": 429,159 "code": "rate_limited"160 },161 {162 "status": 500,163 "code": "internal"164 }165 ],166 "parameters": [],167 "responses": {168 "200": {169 "description": "OK",170 "content": {171 "application/json": {172 "schema": {173 "type": "object",174 "properties": {175 "db": {176 "type": "boolean"177 },178 "signer": {179 "type": "object",180 "properties": {181 "ok": {182 "type": "boolean"183 },184 "halted": {185 "type": [186 "boolean",187 "null"188 ]189 }190 },191 "required": [192 "ok",193 "halted"194 ],195 "additionalProperties": {}196 },197 "networks": {198 "type": "array",199 "items": {200 "type": "object",201 "properties": {202 "network": {203 "type": "string"204 },205 "ok": {206 "type": "boolean",207 "description": "every source up and identity verified: transfers possible"208 },209 "readable": {210 "type": "boolean",211 "description": "at least one source up: balances readable"212 },213 "identityVerified": {214 "type": "boolean"215 },216 "height": {217 "type": [218 "number",219 "null"220 ]221 },222 "endpoints": {223 "type": "array",224 "items": {225 "type": "object",226 "properties": {227 "url": {228 "type": "string"229 },230 "ok": {231 "type": "boolean"232 },233 "ms": {234 "type": [235 "number",236 "null"237 ]238 }239 },240 "required": [241 "url",242 "ok",243 "ms"244 ],245 "additionalProperties": {}246 }247 },248 "checkedAt": {249 "type": "string",250 "description": "date-time, ISO 8601, UTC"251 }252 },253 "required": [254 "network",255 "ok",256 "readable",257 "identityVerified",258 "height",259 "endpoints",260 "checkedAt"261 ],262 "additionalProperties": {}263 }264 },265 "rpcEndpoints": {266 "type": "array",267 "items": {268 "type": "object",269 "properties": {},270 "additionalProperties": {}271 }272 }273 },274 "required": [275 "db",276 "signer",277 "networks",278 "rpcEndpoints"279 ],280 "additionalProperties": {}281 }282 }283 }284 },285 "401": {286 "description": "No valid session: `unauthenticated`",287 "content": {288 "application/json": {289 "schema": {290 "$ref": "#/components/schemas/Error"291 }292 }293 }294 },295 "429": {296 "description": "Too many requests: `rate_limited`",297 "content": {298 "application/json": {299 "schema": {300 "$ref": "#/components/schemas/Error"301 }302 }303 }304 },305 "500": {306 "description": "Server error: `internal`",307 "content": {308 "application/json": {309 "schema": {310 "$ref": "#/components/schemas/Error"311 }312 }313 }314 }315 }316 }317 },318 "/api/v1/openapi.json": {319 "get": {320 "operationId": "getOpenApi",321 "tags": [322 "Meta"323 ],324 "summary": "This document",325 "description": "The OpenAPI 3.1 document as built into this server (the content of docs/openapi/wallet-v1.json). Owner session, like every route.",326 "security": [327 {328 "session": []329 }330 ],331 "x-spw-auth": "session",332 "x-spw-csrf": false,333 "x-spw-since": "next",334 "x-spw-errors": [335 {336 "status": 401,337 "code": "unauthenticated"338 },339 {340 "status": 429,341 "code": "rate_limited"342 },343 {344 "status": 500,345 "code": "internal"346 }347 ],348 "parameters": [],349 "responses": {350 "200": {351 "description": "OK",352 "content": {353 "application/json": {354 "schema": {355 "type": "object",356 "properties": {},357 "additionalProperties": {},358 "description": "an OpenAPI 3.1 document: openapi, info, servers, tags, paths, components, and the `x-spw-*` catalogues"359 }360 }361 }362 },363 "401": {364 "description": "No valid session: `unauthenticated`",365 "content": {366 "application/json": {367 "schema": {368 "$ref": "#/components/schemas/Error"369 }370 }371 }372 },373 "429": {374 "description": "Too many requests: `rate_limited`",375 "content": {376 "application/json": {377 "schema": {378 "$ref": "#/components/schemas/Error"379 }380 }381 }382 },383 "500": {384 "description": "Server error: `internal`",385 "content": {386 "application/json": {387 "schema": {388 "$ref": "#/components/schemas/Error"389 }390 }391 }392 }393 }394 }395 },396 "/api/v1/auth/state": {397 "get": {398 "operationId": "authState",399 "tags": [400 "Auth"401 ],402 "summary": "Is the wallet set up, and is this client signed in",403 "security": [],404 "x-spw-auth": "public",405 "x-spw-csrf": false,406 "x-spw-errors": [407 {408 "status": 429,409 "code": "rate_limited"410 },411 {412 "status": 500,413 "code": "internal"414 }415 ],416 "parameters": [],417 "responses": {418 "200": {419 "description": "OK",420 "content": {421 "application/json": {422 "schema": {423 "type": "object",424 "properties": {425 "setupRequired": {426 "type": "boolean"427 },428 "authenticated": {429 "type": "boolean"430 }431 },432 "required": [433 "setupRequired",434 "authenticated"435 ],436 "additionalProperties": {}437 }438 }439 }440 },441 "429": {442 "description": "Too many requests: `rate_limited`",443 "content": {444 "application/json": {445 "schema": {446 "$ref": "#/components/schemas/Error"447 }448 }449 }450 },451 "500": {452 "description": "Server error: `internal`",453 "content": {454 "application/json": {455 "schema": {456 "$ref": "#/components/schemas/Error"457 }458 }459 }460 }461 }462 }463 },464 "/api/v1/auth/setup/options": {465 "post": {466 "operationId": "setupOptions",467 "tags": [468 "Auth"469 ],470 "summary": "One-time setup: passkey creation options",471 "description": "Closed for ever once a passkey exists.",472 "security": [],473 "x-spw-auth": "public",474 "x-spw-csrf": true,475 "x-spw-errors": [476 {477 "status": 400,478 "code": "bad_request"479 },480 {481 "status": 403,482 "code": "csrf"483 },484 {485 "status": 403,486 "code": "setup_closed"487 },488 {489 "status": 429,490 "code": "rate_limited"491 },492 {493 "status": 500,494 "code": "internal"495 }496 ],497 "parameters": [],498 "responses": {499 "200": {500 "description": "OK",501 "content": {502 "application/json": {503 "schema": {504 "type": "object",505 "properties": {506 "challengeId": {507 "type": "string",508 "format": "uuid",509 "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"510 },511 "options": {512 "type": "object",513 "properties": {},514 "additionalProperties": {},515 "description": "WebAuthn options (PublicKeyCredentialRequestOptions / CreationOptions as JSON), to hand to the platform API"516 }517 },518 "required": [519 "challengeId",520 "options"521 ],522 "additionalProperties": {}523 }524 }525 }526 },527 "400": {528 "description": "The request is not valid: `bad_request`",529 "content": {530 "application/json": {531 "schema": {532 "$ref": "#/components/schemas/Error"533 }534 }535 }536 },537 "403": {538 "description": "Refused: `csrf`, `setup_closed`",539 "content": {540 "application/json": {541 "schema": {542 "$ref": "#/components/schemas/Error"543 }544 }545 }546 },547 "429": {548 "description": "Too many requests: `rate_limited`",549 "content": {550 "application/json": {551 "schema": {552 "$ref": "#/components/schemas/Error"553 }554 }555 }556 },557 "500": {558 "description": "Server error: `internal`",559 "content": {560 "application/json": {561 "schema": {562 "$ref": "#/components/schemas/Error"563 }564 }565 }566 }567 }568 }569 },570 "/api/v1/auth/setup/verify": {571 "post": {572 "operationId": "setupVerify",573 "tags": [574 "Auth"575 ],576 "summary": "One-time setup: enrol the first passkey with the signer's setup token",577 "description": "The signer validates the one-time token and pins the passkey as the only approver. Sets the session cookie. A wrong token is refused by the signer (`signer_<code>`, 422).",578 "security": [],579 "x-spw-auth": "public",580 "x-spw-csrf": true,581 "x-spw-errors": [582 {583 "status": 400,584 "code": "bad_request"585 },586 {587 "status": 401,588 "code": "challenge_expired"589 },590 {591 "status": 401,592 "code": "registration_failed"593 },594 {595 "status": 403,596 "code": "csrf"597 },598 {599 "status": 403,600 "code": "setup_closed"601 },602 {603 "status": 403,604 "code": "setup_token"605 },606 {607 "status": 429,608 "code": "rate_limited"609 },610 {611 "status": 500,612 "code": "internal"613 },614 {615 "status": 503,616 "code": "signer_unreachable"617 }618 ],619 "x-spw-errors-open": true,620 "parameters": [],621 "requestBody": {622 "required": true,623 "content": {624 "application/json": {625 "schema": {626 "type": "object",627 "properties": {628 "challengeId": {629 "type": "string",630 "format": "uuid",631 "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"632 },633 "response": {634 "description": "the WebAuthn registration response"635 },636 "setupToken": {637 "type": "string",638 "minLength": 8,639 "maxLength": 100640 },641 "label": {642 "type": "string",643 "maxLength": 40644 }645 },646 "required": [647 "challengeId",648 "response"649 ]650 }651 }652 }653 },654 "responses": {655 "200": {656 "description": "OK",657 "content": {658 "application/json": {659 "schema": {660 "type": "object",661 "properties": {662 "ok": {663 "type": "boolean",664 "const": true665 }666 },667 "required": [668 "ok"669 ],670 "additionalProperties": {}671 }672 }673 }674 },675 "400": {676 "description": "The request is not valid: `bad_request`",677 "content": {678 "application/json": {679 "schema": {680 "$ref": "#/components/schemas/Error"681 }682 }683 }684 },685 "401": {686 "description": "No valid session: `challenge_expired`, `registration_failed`",687 "content": {688 "application/json": {689 "schema": {690 "$ref": "#/components/schemas/Error"691 }692 }693 }694 },695 "403": {696 "description": "Refused: `csrf`, `setup_closed`, `setup_token`",697 "content": {698 "application/json": {699 "schema": {700 "$ref": "#/components/schemas/Error"701 }702 }703 }704 },705 "429": {706 "description": "Too many requests: `rate_limited`",707 "content": {708 "application/json": {709 "schema": {710 "$ref": "#/components/schemas/Error"711 }712 }713 }714 },715 "500": {716 "description": "Server error: `internal`",717 "content": {718 "application/json": {719 "schema": {720 "$ref": "#/components/schemas/Error"721 }722 }723 }724 },725 "503": {726 "description": "A backing service is unavailable; nothing was done: `signer_unreachable`",727 "content": {728 "application/json": {729 "schema": {730 "$ref": "#/components/schemas/Error"731 }732 }733 }734 }735 }736 }737 },738 "/api/v1/auth/login/options": {739 "post": {740 "operationId": "loginOptions",741 "tags": [742 "Auth"743 ],744 "summary": "Sign-in: assertion options",745 "security": [],746 "x-spw-auth": "public",747 "x-spw-csrf": true,748 "x-spw-errors": [749 {750 "status": 400,751 "code": "bad_request"752 },753 {754 "status": 403,755 "code": "csrf"756 },757 {758 "status": 429,759 "code": "rate_limited"760 },761 {762 "status": 500,763 "code": "internal"764 }765 ],766 "parameters": [],767 "responses": {768 "200": {769 "description": "OK",770 "content": {771 "application/json": {772 "schema": {773 "type": "object",774 "properties": {775 "challengeId": {776 "type": "string",777 "format": "uuid",778 "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"779 },780 "options": {781 "type": "object",782 "properties": {},783 "additionalProperties": {},784 "description": "WebAuthn options (PublicKeyCredentialRequestOptions / CreationOptions as JSON), to hand to the platform API"785 }786 },787 "required": [788 "challengeId",789 "options"790 ],791 "additionalProperties": {}792 }793 }794 }795 },796 "400": {797 "description": "The request is not valid: `bad_request`",798 "content": {799 "application/json": {800 "schema": {801 "$ref": "#/components/schemas/Error"802 }803 }804 }805 },806 "403": {807 "description": "Refused: `csrf`",808 "content": {809 "application/json": {810 "schema": {811 "$ref": "#/components/schemas/Error"812 }813 }814 }815 },816 "429": {817 "description": "Too many requests: `rate_limited`",818 "content": {819 "application/json": {820 "schema": {821 "$ref": "#/components/schemas/Error"822 }823 }824 }825 },826 "500": {827 "description": "Server error: `internal`",828 "content": {829 "application/json": {830 "schema": {831 "$ref": "#/components/schemas/Error"832 }833 }834 }835 }836 }837 }838 },839 "/api/v1/auth/login/verify": {840 "post": {841 "operationId": "loginVerify",842 "tags": [843 "Auth"844 ],845 "summary": "Sign-in: verify the assertion, open a session",846 "description": "Sets the `__Host-spw` cookie (HttpOnly, Secure, SameSite=Strict). A challenge is single-use. A passkey the signer no longer lists opens no session (`login_failed`); when the signer does not answer, or holds no passkey at all, the API's own table decides — the wallet can then be viewed, and nothing can be approved.",847 "security": [],848 "x-spw-auth": "public",849 "x-spw-csrf": true,850 "x-spw-errors": [851 {852 "status": 400,853 "code": "bad_request"854 },855 {856 "status": 401,857 "code": "challenge_expired"858 },859 {860 "status": 401,861 "code": "login_failed"862 },863 {864 "status": 403,865 "code": "csrf"866 },867 {868 "status": 429,869 "code": "rate_limited"870 },871 {872 "status": 500,873 "code": "internal"874 }875 ],876 "parameters": [],877 "requestBody": {878 "required": true,879 "content": {880 "application/json": {881 "schema": {882 "type": "object",883 "properties": {884 "challengeId": {885 "type": "string",886 "format": "uuid",887 "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"888 },889 "response": {890 "description": "the WebAuthn assertion"891 }892 },893 "required": [894 "challengeId",895 "response"896 ]897 }898 }899 }900 },901 "responses": {902 "200": {903 "description": "OK",904 "content": {905 "application/json": {906 "schema": {907 "type": "object",908 "properties": {909 "ok": {910 "type": "boolean",911 "const": true912 }913 },914 "required": [915 "ok"916 ],917 "additionalProperties": {}918 }919 }920 }921 },922 "400": {923 "description": "The request is not valid: `bad_request`",924 "content": {925 "application/json": {926 "schema": {927 "$ref": "#/components/schemas/Error"928 }929 }930 }931 },932 "401": {933 "description": "No valid session: `challenge_expired`, `login_failed`",934 "content": {935 "application/json": {936 "schema": {937 "$ref": "#/components/schemas/Error"938 }939 }940 }941 },942 "403": {943 "description": "Refused: `csrf`",944 "content": {945 "application/json": {946 "schema": {947 "$ref": "#/components/schemas/Error"948 }949 }950 }951 },952 "429": {953 "description": "Too many requests: `rate_limited`",954 "content": {955 "application/json": {956 "schema": {957 "$ref": "#/components/schemas/Error"958 }959 }960 }961 },962 "500": {963 "description": "Server error: `internal`",964 "content": {965 "application/json": {966 "schema": {967 "$ref": "#/components/schemas/Error"968 }969 }970 }971 }972 }973 }974 },975 "/api/v1/auth/logout": {976 "post": {977 "operationId": "logout",978 "tags": [979 "Auth"980 ],981 "summary": "End this session",982 "security": [],983 "x-spw-auth": "public",984 "x-spw-csrf": true,985 "x-spw-errors": [986 {987 "status": 400,988 "code": "bad_request"989 },990 {991 "status": 403,992 "code": "csrf"993 },994 {995 "status": 429,996 "code": "rate_limited"997 },998 {999 "status": 500,1000 "code": "internal"1001 }1002 ],1003 "parameters": [],1004 "responses": {1005 "200": {1006 "description": "OK",1007 "content": {1008 "application/json": {1009 "schema": {1010 "type": "object",1011 "properties": {1012 "ok": {1013 "type": "boolean",1014 "const": true1015 }1016 },1017 "required": [1018 "ok"1019 ],1020 "additionalProperties": {}1021 }1022 }1023 }1024 },1025 "400": {1026 "description": "The request is not valid: `bad_request`",1027 "content": {1028 "application/json": {1029 "schema": {1030 "$ref": "#/components/schemas/Error"1031 }1032 }1033 }1034 },1035 "403": {1036 "description": "Refused: `csrf`",1037 "content": {1038 "application/json": {1039 "schema": {1040 "$ref": "#/components/schemas/Error"1041 }1042 }1043 }1044 },1045 "429": {1046 "description": "Too many requests: `rate_limited`",1047 "content": {1048 "application/json": {1049 "schema": {1050 "$ref": "#/components/schemas/Error"1051 }1052 }1053 }1054 },1055 "500": {1056 "description": "Server error: `internal`",1057 "content": {1058 "application/json": {1059 "schema": {1060 "$ref": "#/components/schemas/Error"1061 }1062 }1063 }1064 }1065 }1066 }1067 },1068 "/api/v1/networks": {1069 "get": {1070 "operationId": "listNetworks",1071 "tags": [1072 "Wallet"1073 ],1074 "summary": "The networks of the wallet, with their verified assets and their health",1075 "security": [1076 {1077 "session": []1078 }1079 ],1080 "x-spw-auth": "session",1081 "x-spw-csrf": false,1082 "x-spw-errors": [1083 {1084 "status": 401,1085 "code": "unauthenticated"1086 },1087 {1088 "status": 429,1089 "code": "rate_limited"1090 },1091 {1092 "status": 500,1093 "code": "internal"1094 }1095 ],1096 "parameters": [],1097 "responses": {1098 "200": {1099 "description": "OK",1100 "content": {1101 "application/json": {1102 "schema": {1103 "type": "array",1104 "items": {1105 "type": "object",1106 "properties": {1107 "id": {1108 "type": "string"1109 },1110 "name": {1111 "type": "string"1112 },1113 "family": {1114 "type": "string",1115 "description": "evm, btc, sol, or a plugin family; new families appear"1116 },1117 "chainRef": {1118 "type": "string"1119 },1120 "native": {1121 "type": "object",1122 "properties": {1123 "id": {1124 "type": "string",1125 "description": "`native`, or the token contract / mint address"1126 },1127 "symbol": {1128 "type": "string"1129 },1130 "name": {1131 "type": "string"1132 },1133 "decimals": {1134 "type": "integer",1135 "minimum": -9007199254740991,1136 "maximum": 90071992547409911137 },1138 "program": {1139 "description": "Solana: the token program that owns the mint",1140 "type": "string"1141 },1142 "onchainSymbol": {1143 "description": "what the contract itself answers as symbol when it differs",1144 "type": "string"1145 }1146 },1147 "required": [1148 "id",1149 "symbol",1150 "name",1151 "decimals"1152 ],1153 "additionalProperties": {}1154 },1155 "tokens": {1156 "type": "array",1157 "items": {1158 "type": "object",1159 "properties": {1160 "id": {1161 "type": "string",1162 "description": "`native`, or the token contract / mint address"1163 },1164 "symbol": {1165 "type": "string"1166 },1167 "name": {1168 "type": "string"1169 },1170 "decimals": {1171 "type": "integer",1172 "minimum": -9007199254740991,1173 "maximum": 90071992547409911174 },1175 "program": {1176 "description": "Solana: the token program that owns the mint",1177 "type": "string"1178 },1179 "onchainSymbol": {1180 "description": "what the contract itself answers as symbol when it differs",1181 "type": "string"1182 }1183 },1184 "required": [1185 "id",1186 "symbol",1187 "name",1188 "decimals"1189 ],1190 "additionalProperties": {}1191 }1192 },1193 "memo": {1194 "description": "`text` or `uint32` when transfers carry a memo / tag",1195 "type": [1196 "string",1197 "null"1198 ]1199 },1200 "activation": {1201 "type": [1202 "string",1203 "null"1204 ]1205 },1206 "explorerAddr": {1207 "type": "string"1208 },1209 "minConf": {1210 "type": "integer",1211 "minimum": -9007199254740991,1212 "maximum": 90071992547409911213 },1214 "health": {1215 "anyOf": [1216 {1217 "type": "object",1218 "properties": {1219 "network": {1220 "type": "string"1221 },1222 "ok": {1223 "type": "boolean",1224 "description": "every source up and identity verified: transfers possible"1225 },1226 "readable": {1227 "type": "boolean",1228 "description": "at least one source up: balances readable"1229 },1230 "identityVerified": {1231 "type": "boolean"1232 },1233 "height": {1234 "type": [1235 "number",1236 "null"1237 ]1238 },1239 "endpoints": {1240 "type": "array",1241 "items": {1242 "type": "object",1243 "properties": {1244 "url": {1245 "type": "string"1246 },1247 "ok": {1248 "type": "boolean"1249 },1250 "ms": {1251 "type": [1252 "number",1253 "null"1254 ]1255 }1256 },1257 "required": [1258 "url",1259 "ok",1260 "ms"1261 ],1262 "additionalProperties": {}1263 }1264 },1265 "checkedAt": {1266 "type": "string",1267 "description": "date-time, ISO 8601, UTC"1268 }1269 },1270 "required": [1271 "network",1272 "ok",1273 "readable",1274 "identityVerified",1275 "height",1276 "endpoints",1277 "checkedAt"1278 ],1279 "additionalProperties": {}1280 },1281 {1282 "type": "null"1283 }1284 ],1285 "description": "null until the first health pass"1286 }1287 },1288 "required": [1289 "id",1290 "name",1291 "family",1292 "chainRef",1293 "native",1294 "tokens",1295 "memo",1296 "activation",1297 "explorerAddr",1298 "minConf",1299 "health"1300 ],1301 "additionalProperties": {}1302 }1303 }1304 }1305 }1306 },1307 "401": {1308 "description": "No valid session: `unauthenticated`",1309 "content": {1310 "application/json": {1311 "schema": {1312 "$ref": "#/components/schemas/Error"1313 }1314 }1315 }1316 },1317 "429": {1318 "description": "Too many requests: `rate_limited`",1319 "content": {1320 "application/json": {1321 "schema": {1322 "$ref": "#/components/schemas/Error"1323 }1324 }1325 }1326 },1327 "500": {1328 "description": "Server error: `internal`",1329 "content": {1330 "application/json": {1331 "schema": {1332 "$ref": "#/components/schemas/Error"1333 }1334 }1335 }1336 }1337 }1338 }1339 },1340 "/api/v1/assets": {1341 "get": {1342 "operationId": "listAssets",1343 "tags": [1344 "Wallet"1345 ],1346 "summary": "The verified asset registry, flat",1347 "security": [1348 {1349 "session": []1350 }1351 ],1352 "x-spw-auth": "session",1353 "x-spw-csrf": false,1354 "x-spw-errors": [1355 {1356 "status": 400,1357 "code": "bad_request"1358 },1359 {1360 "status": 401,1361 "code": "unauthenticated"1362 },1363 {1364 "status": 429,1365 "code": "rate_limited"1366 },1367 {1368 "status": 500,1369 "code": "internal"1370 }1371 ],1372 "parameters": [1373 {1374 "name": "network",1375 "in": "query",1376 "required": false,1377 "schema": {1378 "type": "string"1379 }1380 }1381 ],1382 "responses": {1383 "200": {1384 "description": "OK",1385 "content": {1386 "application/json": {1387 "schema": {1388 "type": "array",1389 "items": {1390 "type": "object",1391 "properties": {1392 "network": {1393 "type": "string"1394 },1395 "id": {1396 "type": "string",1397 "description": "`native`, or the token contract / mint address"1398 },1399 "symbol": {1400 "type": "string"1401 },1402 "name": {1403 "type": "string"1404 },1405 "decimals": {1406 "type": "integer",1407 "minimum": -9007199254740991,1408 "maximum": 90071992547409911409 },1410 "program": {1411 "description": "Solana: the token program that owns the mint",1412 "type": "string"1413 },1414 "onchainSymbol": {1415 "description": "what the contract itself answers as symbol when it differs",1416 "type": "string"1417 }1418 },1419 "required": [1420 "network",1421 "id",1422 "symbol",1423 "name",1424 "decimals"1425 ],1426 "additionalProperties": {}1427 }1428 }1429 }1430 }1431 },1432 "400": {1433 "description": "The request is not valid: `bad_request`",1434 "content": {1435 "application/json": {1436 "schema": {1437 "$ref": "#/components/schemas/Error"1438 }1439 }1440 }1441 },1442 "401": {1443 "description": "No valid session: `unauthenticated`",1444 "content": {1445 "application/json": {1446 "schema": {1447 "$ref": "#/components/schemas/Error"1448 }1449 }1450 }1451 },1452 "429": {1453 "description": "Too many requests: `rate_limited`",1454 "content": {1455 "application/json": {1456 "schema": {1457 "$ref": "#/components/schemas/Error"1458 }1459 }1460 }1461 },1462 "500": {1463 "description": "Server error: `internal`",1464 "content": {1465 "application/json": {1466 "schema": {1467 "$ref": "#/components/schemas/Error"1468 }1469 }1470 }1471 }1472 }1473 }1474 },1475 "/api/v1/accounts": {1476 "get": {1477 "operationId": "listAccounts",1478 "tags": [1479 "Wallet"1480 ],1481 "summary": "The wallet's own address on every network",1482 "description": "Addresses come from the signer, never from a client. When the signer is unreachable the last known addresses are answered (`signerReachable: false`); 503 only when they were never seen.",1483 "security": [1484 {1485 "session": []1486 }1487 ],1488 "x-spw-auth": "session",1489 "x-spw-csrf": false,1490 "x-spw-errors": [1491 {1492 "status": 401,1493 "code": "unauthenticated"1494 },1495 {1496 "status": 429,1497 "code": "rate_limited"1498 },1499 {1500 "status": 500,1501 "code": "internal"1502 },1503 {1504 "status": 503,1505 "code": "signer_unreachable"1506 }1507 ],1508 "parameters": [],1509 "responses": {1510 "200": {1511 "description": "OK",1512 "content": {1513 "application/json": {1514 "schema": {1515 "type": "object",1516 "properties": {1517 "keyId": {1518 "type": "string"1519 },1520 "signerReachable": {1521 "type": "boolean"1522 },1523 "addressesAsOf": {1524 "type": "string",1525 "description": "when the signer last gave these addresses"1526 },1527 "accounts": {1528 "type": "array",1529 "items": {1530 "type": "object",1531 "properties": {1532 "network": {1533 "type": "string"1534 },1535 "name": {1536 "type": "string"1537 },1538 "family": {1539 "type": "string"1540 },1541 "address": {1542 "type": "string"1543 },1544 "explorer": {1545 "type": "string"1546 }1547 },1548 "required": [1549 "network",1550 "name",1551 "family",1552 "address",1553 "explorer"1554 ],1555 "additionalProperties": {}1556 }1557 }1558 },1559 "required": [1560 "keyId",1561 "signerReachable",1562 "addressesAsOf",1563 "accounts"1564 ],1565 "additionalProperties": {}1566 }1567 }1568 }1569 },1570 "401": {1571 "description": "No valid session: `unauthenticated`",1572 "content": {1573 "application/json": {1574 "schema": {1575 "$ref": "#/components/schemas/Error"1576 }1577 }1578 }1579 },1580 "429": {1581 "description": "Too many requests: `rate_limited`",1582 "content": {1583 "application/json": {1584 "schema": {1585 "$ref": "#/components/schemas/Error"1586 }1587 }1588 }1589 },1590 "500": {1591 "description": "Server error: `internal`",1592 "content": {1593 "application/json": {1594 "schema": {1595 "$ref": "#/components/schemas/Error"1596 }1597 }1598 }1599 },1600 "503": {1601 "description": "A backing service is unavailable; nothing was done: `signer_unreachable`",1602 "content": {1603 "application/json": {1604 "schema": {1605 "$ref": "#/components/schemas/Error"1606 }1607 }1608 }1609 }1610 }1611 }1612 },1613 "/api/v1/assets/prefs": {1614 "get": {1615 "operationId": "getAssetPrefs",1616 "tags": [1617 "Wallet"1618 ],1619 "summary": "Hidden and favourite assets",1620 "security": [1621 {1622 "session": []1623 }1624 ],1625 "x-spw-auth": "session",1626 "x-spw-csrf": false,1627 "x-spw-since": "next",1628 "x-spw-errors": [1629 {1630 "status": 401,1631 "code": "unauthenticated"1632 },1633 {1634 "status": 429,1635 "code": "rate_limited"1636 },1637 {1638 "status": 500,1639 "code": "internal"1640 }1641 ],1642 "parameters": [],1643 "responses": {1644 "200": {1645 "description": "OK",1646 "content": {1647 "application/json": {1648 "schema": {1649 "type": "object",1650 "properties": {1651 "prefs": {1652 "type": "array",1653 "items": {1654 "type": "object",1655 "properties": {1656 "network": {1657 "type": "string"1658 },1659 "asset": {1660 "type": "string"1661 },1662 "hidden": {1663 "type": "boolean"1664 },1665 "favorite": {1666 "type": "boolean"1667 },1668 "updatedAt": {1669 "type": "string",1670 "description": "date-time, ISO 8601, UTC"1671 }1672 },1673 "required": [1674 "network",1675 "asset",1676 "hidden",1677 "favorite",1678 "updatedAt"1679 ],1680 "additionalProperties": {}1681 }1682 }1683 },1684 "required": [1685 "prefs"1686 ],1687 "additionalProperties": {}1688 }1689 }1690 }1691 },1692 "401": {1693 "description": "No valid session: `unauthenticated`",1694 "content": {1695 "application/json": {1696 "schema": {1697 "$ref": "#/components/schemas/Error"1698 }1699 }1700 }1701 },1702 "429": {1703 "description": "Too many requests: `rate_limited`",1704 "content": {1705 "application/json": {1706 "schema": {1707 "$ref": "#/components/schemas/Error"1708 }1709 }1710 }1711 },1712 "500": {1713 "description": "Server error: `internal`",1714 "content": {1715 "application/json": {1716 "schema": {1717 "$ref": "#/components/schemas/Error"1718 }1719 }1720 }1721 }1722 }1723 }1724 },1725 "/api/v1/assets/prefs/{network}/{asset}": {1726 "put": {1727 "operationId": "setAssetPref",1728 "tags": [1729 "Wallet"1730 ],1731 "summary": "Hide, show or favourite one asset",1732 "description": "Display only: a hidden asset is still read, counted in the total and announced when received.",1733 "security": [1734 {1735 "session": []1736 }1737 ],1738 "x-spw-auth": "session",1739 "x-spw-csrf": true,1740 "x-spw-since": "next",1741 "x-spw-errors": [1742 {1743 "status": 400,1744 "code": "bad_request"1745 },1746 {1747 "status": 401,1748 "code": "unauthenticated"1749 },1750 {1751 "status": 403,1752 "code": "csrf"1753 },1754 {1755 "status": 404,1756 "code": "unsupported_asset"1757 },1758 {1759 "status": 429,1760 "code": "rate_limited"1761 },1762 {1763 "status": 500,1764 "code": "internal"1765 }1766 ],1767 "parameters": [1768 {1769 "name": "network",1770 "in": "path",1771 "required": true,1772 "schema": {1773 "type": "string"1774 }1775 },1776 {1777 "name": "asset",1778 "in": "path",1779 "required": true,1780 "schema": {1781 "type": "string"1782 }1783 }1784 ],1785 "requestBody": {1786 "required": true,1787 "content": {1788 "application/json": {1789 "schema": {1790 "type": "object",1791 "properties": {1792 "hidden": {1793 "type": "boolean"1794 },1795 "favorite": {1796 "type": "boolean"1797 }1798 },1799 "additionalProperties": false1800 }1801 }1802 }1803 },1804 "responses": {1805 "200": {1806 "description": "OK",1807 "content": {1808 "application/json": {1809 "schema": {1810 "type": "object",1811 "properties": {1812 "network": {1813 "type": "string"1814 },1815 "asset": {1816 "type": "string"1817 },1818 "hidden": {1819 "type": "boolean"1820 },1821 "favorite": {1822 "type": "boolean"1823 },1824 "updatedAt": {1825 "type": "string",1826 "description": "date-time, ISO 8601, UTC"1827 }1828 },1829 "required": [1830 "network",1831 "asset",1832 "hidden",1833 "favorite",1834 "updatedAt"1835 ],1836 "additionalProperties": {}1837 }1838 }1839 }1840 },1841 "400": {1842 "description": "The request is not valid: `bad_request`",1843 "content": {1844 "application/json": {1845 "schema": {1846 "$ref": "#/components/schemas/Error"1847 }1848 }1849 }1850 },1851 "401": {1852 "description": "No valid session: `unauthenticated`",1853 "content": {1854 "application/json": {1855 "schema": {1856 "$ref": "#/components/schemas/Error"1857 }1858 }1859 }1860 },1861 "403": {1862 "description": "Refused: `csrf`",1863 "content": {1864 "application/json": {1865 "schema": {1866 "$ref": "#/components/schemas/Error"1867 }1868 }1869 }1870 },1871 "404": {1872 "description": "The object does not exist: `unsupported_asset`",1873 "content": {1874 "application/json": {1875 "schema": {1876 "$ref": "#/components/schemas/Error"1877 }1878 }1879 }1880 },1881 "429": {1882 "description": "Too many requests: `rate_limited`",1883 "content": {1884 "application/json": {1885 "schema": {1886 "$ref": "#/components/schemas/Error"1887 }1888 }1889 }1890 },1891 "500": {1892 "description": "Server error: `internal`",1893 "content": {1894 "application/json": {1895 "schema": {1896 "$ref": "#/components/schemas/Error"1897 }1898 }1899 }1900 }1901 }1902 }1903 },1904 "/api/v1/market/{symbol}": {1905 "get": {1906 "operationId": "getMarket",1907 "tags": [1908 "Wallet"1909 ],1910 "summary": "Price history of one asset",1911 "description": "An unknown symbol, or prices switched off, answers `{ symbol, points: [], market: null }` (no `currency`, no `days`).",1912 "security": [1913 {1914 "session": []1915 }1916 ],1917 "x-spw-auth": "session",1918 "x-spw-csrf": false,1919 "x-spw-errors": [1920 {1921 "status": 400,1922 "code": "bad_request"1923 },1924 {1925 "status": 401,1926 "code": "unauthenticated"1927 },1928 {1929 "status": 429,1930 "code": "rate_limited"1931 },1932 {1933 "status": 500,1934 "code": "internal"1935 }1936 ],1937 "parameters": [1938 {1939 "name": "symbol",1940 "in": "path",1941 "required": true,1942 "schema": {1943 "type": "string"1944 }1945 },1946 {1947 "name": "days",1948 "in": "query",1949 "required": false,1950 "schema": {1951 "default": "7",1952 "type": "string",1953 "enum": [1954 "1",1955 "7",1956 "30",1957 "365"1958 ]1959 }1960 },1961 {1962 "name": "currency",1963 "in": "query",1964 "required": false,1965 "schema": {1966 "default": "cad",1967 "type": "string",1968 "enum": [1969 "usd",1970 "cad"1971 ]1972 }1973 }1974 ],1975 "responses": {1976 "200": {1977 "description": "OK",1978 "content": {1979 "application/json": {1980 "schema": {1981 "type": "object",1982 "properties": {1983 "symbol": {1984 "type": "string"1985 },1986 "currency": {1987 "type": "string"1988 },1989 "days": {1990 "type": "string"1991 },1992 "points": {1993 "type": "array",1994 "items": {1995 "type": "object",1996 "properties": {1997 "t": {1998 "type": "integer",1999 "minimum": -9007199254740991,2000 "maximum": 9007199254740991,2001 "description": "milliseconds since the Unix epoch"2002 },2003 "p": {2004 "type": "number"2005 }2006 },2007 "required": [2008 "t",2009 "p"2010 ],2011 "additionalProperties": {}2012 }2013 },2014 "market": {2015 "anyOf": [2016 {2017 "type": "object",2018 "properties": {2019 "priceAt": {2020 "anyOf": [2021 {2022 "type": "string",2023 "description": "date-time, ISO 8601, UTC"2024 },2025 {2026 "type": "null"2027 }2028 ],2029 "description": "when the source last updated THIS price"2030 },2031 "stale": {2032 "type": "boolean"2033 },2034 "usd": {2035 "type": "number"2036 },2037 "cad": {2038 "type": "number"2039 },2040 "change24h": {2041 "type": [2042 "number",2043 "null"2044 ]2045 },2046 "change7d": {2047 "type": [2048 "number",2049 "null"2050 ]2051 },2052 "marketCap": {2053 "type": [2054 "number",2055 "null"2056 ]2057 },2058 "volume24h": {2059 "type": [2060 "number",2061 "null"2062 ]2063 },2064 "high24h": {2065 "type": [2066 "number",2067 "null"2068 ]2069 },2070 "low24h": {2071 "type": [2072 "number",2073 "null"2074 ]2075 },2076 "ath": {2077 "type": [2078 "number",2079 "null"2080 ]2081 },2082 "rank": {2083 "type": [2084 "number",2085 "null"2086 ]2087 },2088 "spark": {2089 "type": "array",2090 "items": {2091 "type": "number"2092 },2093 "description": "7-day price line, at most 42 points"2094 },2095 "source": {2096 "type": "string",2097 "description": "coingecko | apibricks"2098 },2099 "fallback": {2100 "type": "boolean",2101 "description": "true: the displayed price is the second source's because the primary had none or a stale one"2102 },2103 "sources": {2104 "type": "array",2105 "items": {2106 "type": "object",2107 "properties": {2108 "source": {2109 "type": "string"2110 },2111 "usd": {2112 "type": "number"2113 },2114 "cad": {2115 "type": [2116 "number",2117 "null"2118 ]2119 },2120 "priceAt": {2121 "anyOf": [2122 {2123 "type": "string",2124 "description": "date-time, ISO 8601, UTC"2125 },2126 {2127 "type": "null"2128 }2129 ]2130 },2131 "stale": {2132 "type": "boolean"2133 }2134 },2135 "required": [2136 "source",2137 "usd",2138 "cad",2139 "priceAt",2140 "stale"2141 ],2142 "additionalProperties": {}2143 }2144 },2145 "divergent": {2146 "type": "boolean"2147 },2148 "divergenceBps": {2149 "type": [2150 "number",2151 "null"2152 ]2153 }2154 },2155 "required": [2156 "priceAt",2157 "stale",2158 "usd",2159 "cad",2160 "change24h",2161 "change7d",2162 "marketCap",2163 "volume24h",2164 "high24h",2165 "low24h",2166 "ath",2167 "rank",2168 "spark",2169 "source",2170 "fallback",2171 "sources",2172 "divergent",2173 "divergenceBps"2174 ],2175 "additionalProperties": {},2176 "description": "market prices are display figures (numbers); they are never used as amounts"2177 },2178 {2179 "type": "null"2180 }2181 ]2182 }2183 },2184 "required": [2185 "symbol",2186 "points",2187 "market"2188 ],2189 "additionalProperties": {}2190 }2191 }2192 }2193 },2194 "400": {2195 "description": "The request is not valid: `bad_request`",2196 "content": {2197 "application/json": {2198 "schema": {2199 "$ref": "#/components/schemas/Error"2200 }2201 }2202 }2203 },2204 "401": {2205 "description": "No valid session: `unauthenticated`",2206 "content": {2207 "application/json": {2208 "schema": {2209 "$ref": "#/components/schemas/Error"2210 }2211 }2212 }2213 },2214 "429": {2215 "description": "Too many requests: `rate_limited`",2216 "content": {2217 "application/json": {2218 "schema": {2219 "$ref": "#/components/schemas/Error"2220 }2221 }2222 }2223 },2224 "500": {2225 "description": "Server error: `internal`",2226 "content": {2227 "application/json": {2228 "schema": {2229 "$ref": "#/components/schemas/Error"2230 }2231 }2232 }2233 }2234 }2235 }2236 },2237 "/api/v1/portfolio": {2238 "get": {2239 "operationId": "getPortfolio",2240 "tags": [2241 "Portfolio"2242 ],2243 "summary": "Balances with provenance, prices, the server-side summary and the operations in flight",2244 "security": [2245 {2246 "session": []2247 }2248 ],2249 "x-spw-auth": "session",2250 "x-spw-csrf": false,2251 "x-spw-errors": [2252 {2253 "status": 401,2254 "code": "unauthenticated"2255 },2256 {2257 "status": 429,2258 "code": "rate_limited"2259 },2260 {2261 "status": 500,2262 "code": "internal"2263 },2264 {2265 "status": 503,2266 "code": "signer_unreachable"2267 }2268 ],2269 "parameters": [],2270 "responses": {2271 "200": {2272 "description": "OK",2273 "content": {2274 "application/json": {2275 "schema": {2276 "type": "object",2277 "properties": {2278 "asOf": {2279 "type": "string",2280 "description": "date-time, ISO 8601, UTC"2281 },2282 "prices": {2283 "anyOf": [2284 {2285 "type": "object",2286 "propertyNames": {2287 "type": "string"2288 },2289 "additionalProperties": {2290 "type": "object",2291 "properties": {2292 "priceAt": {2293 "anyOf": [2294 {2295 "type": "string",2296 "description": "date-time, ISO 8601, UTC"2297 },2298 {2299 "type": "null"2300 }2301 ],2302 "description": "when the source last updated THIS price"2303 },2304 "stale": {2305 "type": "boolean"2306 },2307 "usd": {2308 "type": "number"2309 },2310 "cad": {2311 "type": "number"2312 },2313 "change24h": {2314 "type": [2315 "number",2316 "null"2317 ]2318 },2319 "change7d": {2320 "type": [2321 "number",2322 "null"2323 ]2324 },2325 "marketCap": {2326 "type": [2327 "number",2328 "null"2329 ]2330 },2331 "volume24h": {2332 "type": [2333 "number",2334 "null"2335 ]2336 },2337 "high24h": {2338 "type": [2339 "number",2340 "null"2341 ]2342 },2343 "low24h": {2344 "type": [2345 "number",2346 "null"2347 ]2348 },2349 "ath": {2350 "type": [2351 "number",2352 "null"2353 ]2354 },2355 "rank": {2356 "type": [2357 "number",2358 "null"2359 ]2360 },2361 "spark": {2362 "type": "array",2363 "items": {2364 "type": "number"2365 },2366 "description": "7-day price line, at most 42 points"2367 },2368 "source": {2369 "type": "string",2370 "description": "coingecko | apibricks"2371 },2372 "fallback": {2373 "type": "boolean",2374 "description": "true: the displayed price is the second source's because the primary had none or a stale one"2375 },2376 "sources": {2377 "type": "array",2378 "items": {2379 "type": "object",2380 "properties": {2381 "source": {2382 "type": "string"2383 },2384 "usd": {2385 "type": "number"2386 },2387 "cad": {2388 "type": [2389 "number",2390 "null"2391 ]2392 },2393 "priceAt": {2394 "anyOf": [2395 {2396 "type": "string",2397 "description": "date-time, ISO 8601, UTC"2398 },2399 {2400 "type": "null"2401 }2402 ]2403 },2404 "stale": {2405 "type": "boolean"2406 }2407 },2408 "required": [2409 "source",2410 "usd",2411 "cad",2412 "priceAt",2413 "stale"2414 ],2415 "additionalProperties": {}2416 }2417 },2418 "divergent": {2419 "type": "boolean"2420 },2421 "divergenceBps": {2422 "type": [2423 "number",2424 "null"2425 ]2426 }2427 },2428 "required": [2429 "priceAt",2430 "stale",2431 "usd",2432 "cad",2433 "change24h",2434 "change7d",2435 "marketCap",2436 "volume24h",2437 "high24h",2438 "low24h",2439 "ath",2440 "rank",2441 "spark",2442 "source",2443 "fallback",2444 "sources",2445 "divergent",2446 "divergenceBps"2447 ],2448 "additionalProperties": {},2449 "description": "market prices are display figures (numbers); they are never used as amounts"2450 }2451 },2452 {2453 "type": "null"2454 }2455 ],2456 "description": "by symbol; null when prices are off or no source answers"2457 },2458 "priceSource": {2459 "description": "coingecko | apibricks | mixed",2460 "type": [2461 "string",2462 "null"2463 ]2464 },2465 "priceSources": {2466 "anyOf": [2467 {2468 "type": "object",2469 "properties": {2470 "primary": {2471 "type": "string"2472 },2473 "second": {2474 "type": [2475 "string",2476 "null"2477 ]2478 },2479 "fallback": {2480 "type": "array",2481 "items": {2482 "type": "string"2483 }2484 },2485 "divergent": {2486 "type": "array",2487 "items": {2488 "type": "string"2489 }2490 },2491 "compared": {2492 "type": "integer",2493 "minimum": -9007199254740991,2494 "maximum": 90071992547409912495 },2496 "maxDivergenceBps": {2497 "type": [2498 "number",2499 "null"2500 ]2501 }2502 },2503 "required": [2504 "primary",2505 "second",2506 "fallback",2507 "divergent",2508 "compared",2509 "maxDivergenceBps"2510 ],2511 "additionalProperties": {}2512 },2513 {2514 "type": "null"2515 }2516 ]2517 },2518 "pricesAsOf": {2519 "anyOf": [2520 {2521 "type": "string",2522 "description": "date-time, ISO 8601, UTC"2523 },2524 {2525 "type": "null"2526 }2527 ],2528 "description": "the oldest price date"2529 },2530 "pricesStale": {2531 "type": "boolean"2532 },2533 "balances": {2534 "type": "array",2535 "items": {2536 "type": "object",2537 "properties": {2538 "network": {2539 "type": "string"2540 },2541 "networkName": {2542 "type": "string"2543 },2544 "asset": {2545 "type": "string"2546 },2547 "symbol": {2548 "type": "string"2549 },2550 "name": {2551 "type": "string"2552 },2553 "decimals": {2554 "type": "integer",2555 "minimum": -9007199254740991,2556 "maximum": 90071992547409912557 },2558 "amount": {2559 "anyOf": [2560 {2561 "type": "string",2562 "description": "integer amount in base units, as a string"2563 },2564 {2565 "type": "null"2566 }2567 ],2568 "description": "null when the balance could not be established — never 0 for \"unknown\""2569 },2570 "display": {2571 "anyOf": [2572 {2573 "type": "string",2574 "description": "the same amount as a decimal string (exact arithmetic)"2575 },2576 {2577 "type": "null"2578 }2579 ]2580 },2581 "error": {2582 "type": [2583 "string",2584 "null"2585 ]2586 },2587 "height": {2588 "description": "block / slot of the read",2589 "type": [2590 "number",2591 "null"2592 ]2593 },2594 "sources": {2595 "type": "integer",2596 "minimum": -9007199254740991,2597 "maximum": 9007199254740991,2598 "description": "sources that gave `amount`"2599 },2600 "sourcesAsked": {2601 "anyOf": [2602 {2603 "type": "integer",2604 "minimum": -9007199254740991,2605 "maximum": 90071992547409912606 },2607 {2608 "type": "null"2609 }2610 ]2611 },2612 "agreed": {2613 "type": "boolean",2614 "description": "false: the sources did not give the same amount; the figure is not a fact"2615 },2616 "stale": {2617 "type": "boolean"2618 },2619 "readAt": {2620 "anyOf": [2621 {2622 "type": "string",2623 "description": "date-time, ISO 8601, UTC"2624 },2625 {2626 "type": "null"2627 }2628 ]2629 },2630 "reason": {2631 "description": "why `amount` is null: network_unavailable, no_source_answered, zero_not_confirmed, sources_disagree_on_existence, inconsistent_source, not_read",2632 "type": [2633 "string",2634 "null"2635 ]2636 },2637 "confirmed": {2638 "description": "Bitcoin-style networks: confirmed coins",2639 "type": "string"2640 },2641 "pendingOut": {2642 "type": "string",2643 "description": "integer amount in base units, as a string"2644 },2645 "pendingIn": {2646 "type": "string",2647 "description": "integer amount in base units, as a string"2648 }2649 },2650 "required": [2651 "network",2652 "networkName",2653 "asset",2654 "symbol",2655 "name",2656 "decimals",2657 "amount",2658 "display",2659 "error",2660 "height",2661 "sources",2662 "sourcesAsked",2663 "agreed",2664 "stale",2665 "readAt",2666 "reason"2667 ],2668 "additionalProperties": {}2669 }2670 },2671 "summary": {2672 "type": "object",2673 "properties": {2674 "currency": {2675 "$ref": "#/components/schemas/Currency"2676 },2677 "total": {2678 "anyOf": [2679 {2680 "type": "string",2681 "description": "amount in the display currency, a decimal string with 2 decimals"2682 },2683 {2684 "type": "null"2685 }2686 ],2687 "description": "value of what was read AND priced; null without a price list"2688 },2689 "complete": {2690 "type": "boolean",2691 "description": "true only when `total` is the whole wallet: nothing missing, uncertain or unpriced"2692 },2693 "missing": {2694 "type": "array",2695 "items": {2696 "type": "object",2697 "properties": {2698 "network": {2699 "type": "string"2700 },2701 "asset": {2702 "type": "string"2703 },2704 "reason": {2705 "type": "string"2706 }2707 },2708 "required": [2709 "network",2710 "reason"2711 ],2712 "additionalProperties": {}2713 }2714 },2715 "uncertain": {2716 "type": "array",2717 "items": {2718 "type": "object",2719 "properties": {2720 "network": {2721 "type": "string"2722 },2723 "asset": {2724 "type": "string"2725 },2726 "reason": {2727 "type": "string"2728 }2729 },2730 "required": [2731 "network",2732 "asset",2733 "reason"2734 ],2735 "additionalProperties": {}2736 }2737 },2738 "priced": {2739 "type": "integer",2740 "minimum": -9007199254740991,2741 "maximum": 90071992547409912742 },2743 "unpriced": {2744 "type": "array",2745 "items": {2746 "type": "object",2747 "properties": {2748 "network": {2749 "type": "string"2750 },2751 "asset": {2752 "type": "string"2753 },2754 "symbol": {2755 "type": "string"2756 }2757 },2758 "required": [2759 "network",2760 "asset",2761 "symbol"2762 ],2763 "additionalProperties": {}2764 }2765 },2766 "stalePrices": {2767 "type": "array",2768 "items": {2769 "type": "string"2770 }2771 },2772 "pricesStale": {2773 "type": "boolean"2774 },2775 "change24h": {2776 "anyOf": [2777 {2778 "type": "object",2779 "properties": {2780 "abs": {2781 "type": "string",2782 "description": "amount in the display currency, a decimal string with 2 decimals"2783 },2784 "pct": {2785 "type": "number"2786 },2787 "basis": {2788 "type": "string"2789 }2790 },2791 "required": [2792 "abs",2793 "pct",2794 "basis"2795 ],2796 "additionalProperties": {}2797 },2798 {2799 "type": "null"2800 }2801 ],2802 "description": "how much the CURRENT holdings moved in 24 h from each asset's own price change — not the change of the wallet's value"2803 },2804 "byNetwork": {2805 "type": "array",2806 "items": {2807 "type": "object",2808 "properties": {2809 "network": {2810 "type": "string"2811 },2812 "value": {2813 "type": "string",2814 "description": "amount in the display currency, a decimal string with 2 decimals"2815 },2816 "share": {2817 "type": "number"2818 }2819 },2820 "required": [2821 "network",2822 "value",2823 "share"2824 ],2825 "additionalProperties": {}2826 }2827 },2828 "byAsset": {2829 "type": "array",2830 "items": {2831 "type": "object",2832 "properties": {2833 "symbol": {2834 "type": "string"2835 },2836 "value": {2837 "type": "string",2838 "description": "amount in the display currency, a decimal string with 2 decimals"2839 },2840 "share": {2841 "type": "number"2842 }2843 },2844 "required": [2845 "symbol",2846 "value",2847 "share"2848 ],2849 "additionalProperties": {}2850 }2851 }2852 },2853 "required": [2854 "currency",2855 "total",2856 "complete",2857 "missing",2858 "uncertain",2859 "priced",2860 "unpriced",2861 "stalePrices",2862 "pricesStale",2863 "change24h",2864 "byNetwork",2865 "byAsset"2866 ],2867 "additionalProperties": {}2868 },2869 "pending": {2870 "type": "array",2871 "items": {2872 "$ref": "#/components/schemas/Proposal"2873 },2874 "description": "proposals awaiting approval or in flight"2875 },2876 "halted": {2877 "description": "emergency halt; null when the signer cannot be reached",2878 "type": [2879 "boolean",2880 "null"2881 ]2882 },2883 "signer": {2884 "type": "object",2885 "properties": {2886 "reachable": {2887 "type": "boolean"2888 },2889 "addressesAsOf": {2890 "type": "string",2891 "description": "date-time, ISO 8601, UTC"2892 }2893 },2894 "required": [2895 "reachable",2896 "addressesAsOf"2897 ],2898 "additionalProperties": {}2899 }2900 },2901 "required": [2902 "asOf",2903 "prices",2904 "priceSource",2905 "priceSources",2906 "pricesAsOf",2907 "pricesStale",2908 "balances",2909 "summary",2910 "pending",2911 "halted",2912 "signer"2913 ],2914 "additionalProperties": {}2915 }2916 }2917 }2918 },2919 "401": {2920 "description": "No valid session: `unauthenticated`",2921 "content": {2922 "application/json": {2923 "schema": {2924 "$ref": "#/components/schemas/Error"2925 }2926 }2927 }2928 },2929 "429": {2930 "description": "Too many requests: `rate_limited`",2931 "content": {2932 "application/json": {2933 "schema": {2934 "$ref": "#/components/schemas/Error"2935 }2936 }2937 }2938 },2939 "500": {2940 "description": "Server error: `internal`",2941 "content": {2942 "application/json": {2943 "schema": {2944 "$ref": "#/components/schemas/Error"2945 }2946 }2947 }2948 },2949 "503": {2950 "description": "A backing service is unavailable; nothing was done: `signer_unreachable`",2951 "content": {2952 "application/json": {2953 "schema": {2954 "$ref": "#/components/schemas/Error"2955 }2956 }2957 }2958 }2959 }2960 }2961 },2962 "/api/v1/portfolio/history": {2963 "get": {2964 "operationId": "getPortfolioHistory",2965 "tags": [2966 "Portfolio"2967 ],2968 "summary": "Value of the wallet over time, with what entered and left",2969 "description": "Complete snapshots only are charted; a pass recorded while a network was unreadable is counted in `omitted` and never drawn as a low.",2970 "security": [2971 {2972 "session": []2973 }2974 ],2975 "x-spw-auth": "session",2976 "x-spw-csrf": false,2977 "x-spw-since": "next",2978 "x-spw-errors": [2979 {2980 "status": 400,2981 "code": "bad_request"2982 },2983 {2984 "status": 401,2985 "code": "unauthenticated"2986 },2987 {2988 "status": 429,2989 "code": "rate_limited"2990 },2991 {2992 "status": 500,2993 "code": "internal"2994 }2995 ],2996 "parameters": [2997 {2998 "name": "range",2999 "in": "query",3000 "required": false,3001 "schema": {3002 "default": "1W",3003 "type": "string",3004 "enum": [3005 "1D",3006 "1W",3007 "1M",3008 "3M",3009 "1Y",3010 "ALL"3011 ]3012 }3013 },3014 {3015 "name": "currency",3016 "in": "query",3017 "required": false,3018 "schema": {3019 "type": "string",3020 "enum": [3021 "USD",3022 "CAD"3023 ]3024 }3025 }3026 ],3027 "responses": {3028 "200": {3029 "description": "OK",3030 "content": {3031 "application/json": {3032 "schema": {3033 "type": "object",3034 "properties": {3035 "range": {3036 "type": "string"3037 },3038 "currency": {3039 "$ref": "#/components/schemas/Currency"3040 },3041 "asOf": {3042 "type": "string",3043 "description": "date-time, ISO 8601, UTC"3044 },3045 "points": {3046 "type": "array",3047 "items": {3048 "type": "object",3049 "properties": {3050 "t": {3051 "type": "string",3052 "description": "date-time, ISO 8601, UTC"3053 },3054 "total": {3055 "type": "string",3056 "description": "amount in the display currency, a decimal string with 2 decimals"3057 }3058 },3059 "required": [3060 "t",3061 "total"3062 ],3063 "additionalProperties": {}3064 }3065 },3066 "first": {3067 "anyOf": [3068 {3069 "type": "object",3070 "properties": {3071 "t": {3072 "type": "string",3073 "description": "date-time, ISO 8601, UTC"3074 },3075 "total": {3076 "type": "string",3077 "description": "amount in the display currency, a decimal string with 2 decimals"3078 }3079 },3080 "required": [3081 "t",3082 "total"3083 ],3084 "additionalProperties": {}3085 },3086 {3087 "type": "null"3088 }3089 ]3090 },3091 "last": {3092 "anyOf": [3093 {3094 "type": "object",3095 "properties": {3096 "t": {3097 "type": "string",3098 "description": "date-time, ISO 8601, UTC"3099 },3100 "total": {3101 "type": "string",3102 "description": "amount in the display currency, a decimal string with 2 decimals"3103 }3104 },3105 "required": [3106 "t",3107 "total"3108 ],3109 "additionalProperties": {}3110 },3111 {3112 "type": "null"3113 }3114 ]3115 },3116 "valueChange": {3117 "anyOf": [3118 {3119 "type": "object",3120 "properties": {3121 "abs": {3122 "type": "string",3123 "description": "amount in the display currency, a decimal string with 2 decimals"3124 },3125 "pct": {3126 "type": [3127 "number",3128 "null"3129 ]3130 }3131 },3132 "required": [3133 "abs",3134 "pct"3135 ],3136 "additionalProperties": {}3137 },3138 {3139 "type": "null"3140 }3141 ]3142 },3143 "flows": {3144 "type": "object",3145 "properties": {3146 "from": {3147 "anyOf": [3148 {3149 "type": "string",3150 "description": "date-time, ISO 8601, UTC"3151 },3152 {3153 "type": "null"3154 }3155 ]3156 },3157 "to": {3158 "anyOf": [3159 {3160 "type": "string",3161 "description": "date-time, ISO 8601, UTC"3162 },3163 {3164 "type": "null"3165 }3166 ]3167 },3168 "external": {3169 "type": "object",3170 "properties": {3171 "in": {3172 "type": "string",3173 "description": "amount in the display currency, a decimal string with 2 decimals"3174 },3175 "out": {3176 "type": "string",3177 "description": "amount in the display currency, a decimal string with 2 decimals"3178 },3179 "net": {3180 "type": "string",3181 "description": "amount in the display currency, a decimal string with 2 decimals"3182 }3183 },3184 "required": [3185 "in",3186 "out",3187 "net"3188 ],3189 "additionalProperties": {}3190 },3191 "ownAccounts": {3192 "type": "object",3193 "properties": {3194 "in": {3195 "type": "string",3196 "description": "amount in the display currency, a decimal string with 2 decimals"3197 },3198 "out": {3199 "type": "string",3200 "description": "amount in the display currency, a decimal string with 2 decimals"3201 },3202 "net": {3203 "type": "string",3204 "description": "amount in the display currency, a decimal string with 2 decimals"3205 }3206 },3207 "required": [3208 "in",3209 "out",3210 "net"3211 ],3212 "additionalProperties": {}3213 },3214 "net": {3215 "type": "string",3216 "description": "amount in the display currency, a decimal string with 2 decimals"3217 },3218 "valued": {3219 "type": "integer",3220 "minimum": -9007199254740991,3221 "maximum": 90071992547409913222 },3223 "unvalued": {3224 "type": "array",3225 "items": {3226 "type": "object",3227 "properties": {3228 "refType": {3229 "type": "string"3230 },3231 "refId": {3232 "type": "string"3233 },3234 "at": {3235 "type": "string",3236 "description": "date-time, ISO 8601, UTC"3237 },3238 "direction": {3239 "type": "string"3240 },3241 "scope": {3242 "type": "string"3243 },3244 "network": {3245 "type": "string"3246 },3247 "symbol": {3248 "type": "string"3249 },3250 "amount": {3251 "type": "string",3252 "description": "the same amount as a decimal string (exact arithmetic)"3253 }3254 },3255 "required": [3256 "refType",3257 "refId",3258 "at",3259 "direction",3260 "scope",3261 "network",3262 "symbol",3263 "amount"3264 ],3265 "additionalProperties": {}3266 }3267 },3268 "complete": {3269 "type": "boolean"3270 }3271 },3272 "required": [3273 "from",3274 "to",3275 "external",3276 "ownAccounts",3277 "net",3278 "valued",3279 "unvalued",3280 "complete"3281 ],3282 "additionalProperties": {}3283 },3284 "estimatedMarketChange": {3285 "anyOf": [3286 {3287 "type": "object",3288 "properties": {3289 "abs": {3290 "type": "string",3291 "description": "amount in the display currency, a decimal string with 2 decimals"3292 },3293 "pct": {3294 "type": [3295 "number",3296 "null"3297 ]3298 },3299 "method": {3300 "type": "string"3301 },3302 "estimate": {3303 "type": "boolean",3304 "const": true3305 },3306 "complete": {3307 "type": "boolean"3308 }3309 },3310 "required": [3311 "abs",3312 "pct",3313 "method",3314 "estimate",3315 "complete"3316 ],3317 "additionalProperties": {}3318 },3319 {3320 "type": "null"3321 }3322 ],3323 "description": "value change minus net flows: an ESTIMATE, never a realised return"3324 },3325 "omitted": {3326 "type": "object",3327 "properties": {3328 "incomplete": {3329 "type": "integer",3330 "minimum": -9007199254740991,3331 "maximum": 90071992547409913332 }3333 },3334 "required": [3335 "incomplete"3336 ],3337 "additionalProperties": {}3338 },3339 "retention": {3340 "type": "object",3341 "properties": {3342 "everyPointDays": {3343 "type": "number"3344 },3345 "hourlyDays": {3346 "type": "number"3347 },3348 "snapshotEveryMinutes": {3349 "type": "number"3350 }3351 },3352 "required": [3353 "everyPointDays",3354 "hourlyDays",3355 "snapshotEveryMinutes"3356 ],3357 "additionalProperties": {}3358 }3359 },3360 "required": [3361 "range",3362 "currency",3363 "asOf",3364 "points",3365 "first",3366 "last",3367 "valueChange",3368 "flows",3369 "estimatedMarketChange",3370 "omitted",3371 "retention"3372 ],3373 "additionalProperties": {}3374 }3375 }3376 }3377 },3378 "400": {3379 "description": "The request is not valid: `bad_request`",3380 "content": {3381 "application/json": {3382 "schema": {3383 "$ref": "#/components/schemas/Error"3384 }3385 }3386 }3387 },3388 "401": {3389 "description": "No valid session: `unauthenticated`",3390 "content": {3391 "application/json": {3392 "schema": {3393 "$ref": "#/components/schemas/Error"3394 }3395 }3396 }3397 },3398 "429": {3399 "description": "Too many requests: `rate_limited`",3400 "content": {3401 "application/json": {3402 "schema": {3403 "$ref": "#/components/schemas/Error"3404 }3405 }3406 }3407 },3408 "500": {3409 "description": "Server error: `internal`",3410 "content": {3411 "application/json": {3412 "schema": {3413 "$ref": "#/components/schemas/Error"3414 }3415 }3416 }3417 }3418 }3419 }3420 },3421 "/api/v1/transfers/proposals": {3422 "post": {3423 "operationId": "createTransfer",3424 "tags": [3425 "Transfers"3426 ],3427 "summary": "Prepare a transfer: validation, fee estimate, policy pre-check, warnings",3428 "description": "Creates a `draft`. The same Idempotency-Key with the same body answers the same draft; with another body, 409. Nothing is signed.",3429 "security": [3430 {3431 "session": []3432 }3433 ],3434 "x-spw-auth": "session",3435 "x-spw-csrf": true,3436 "x-spw-idempotency-key": true,3437 "x-spw-errors": [3438 {3439 "status": 400,3440 "code": "bad_address"3441 },3442 {3443 "status": 400,3444 "code": "bad_amount"3445 },3446 {3447 "status": 400,3448 "code": "bad_destination"3449 },3450 {3451 "status": 400,3452 "code": "bad_memo"3453 },3454 {3455 "status": 400,3456 "code": "bad_request"3457 },3458 {3459 "status": 400,3460 "code": "bad_source"3461 },3462 {3463 "status": 400,3464 "code": "below_rent"3465 },3466 {3467 "status": 400,3468 "code": "below_reserve"3469 },3470 {3471 "status": 400,3472 "code": "contract_destination"3473 },3474 {3475 "status": 400,3476 "code": "fee_too_high"3477 },3478 {3479 "status": 400,3480 "code": "idempotency"3481 },3482 {3483 "status": 400,3484 "code": "insufficient_funds"3485 },3486 {3487 "status": 400,3488 "code": "insufficient_gas"3489 },3490 {3491 "status": 400,3492 "code": "insufficient_unlocked_funds"3493 },3494 {3495 "status": 400,3496 "code": "memo_required"3497 },3498 {3499 "status": 400,3500 "code": "pending_tx"3501 },3502 {3503 "status": 400,3504 "code": "simulation_failed"3505 },3506 {3507 "status": 400,3508 "code": "too_many_coins"3509 },3510 {3511 "status": 400,3512 "code": "unsupported_account"3513 },3514 {3515 "status": 400,3516 "code": "unsupported_asset"3517 },3518 {3519 "status": 400,3520 "code": "unsupported_funds"3521 },3522 {3523 "status": 401,3524 "code": "unauthenticated"3525 },3526 {3527 "status": 403,3528 "code": "csrf"3529 },3530 {3531 "status": 409,3532 "code": "conflict"3533 },3534 {3535 "status": 409,3536 "code": "idempotency_mismatch"3537 },3538 {3539 "status": 409,3540 "code": "pending_tx"3541 },3542 {3543 "status": 422,3544 "code": "fee_ceiling"3545 },3546 {3547 "status": 422,3548 "code": "policy"3549 },3550 {3551 "status": 429,3552 "code": "rate_limited"3553 },3554 {3555 "status": 500,3556 "code": "internal"3557 },3558 {3559 "status": 503,3560 "code": "fee_too_high"3561 },3562 {3563 "status": 503,3564 "code": "protocol_changed"3565 },3566 {3567 "status": 503,3568 "code": "rpc_degraded"3569 },3570 {3571 "status": 503,3572 "code": "rpc_disagreement"3573 },3574 {3575 "status": 503,3576 "code": "runtime_changed"3577 },3578 {3579 "status": 503,3580 "code": "signer_unreachable"3581 },3582 {3583 "status": 503,3584 "code": "unsupported_network"3585 }3586 ],3587 "x-spw-errors-open": true,3588 "parameters": [3589 {3590 "name": "Idempotency-Key",3591 "in": "header",3592 "required": true,3593 "description": "One key per intended operation: 16 to 64 letters, digits or dashes. The same key with the same body answers the first result; with another body, 409 `idempotency_mismatch`.",3594 "schema": {3595 "type": "string",3596 "pattern": "^[A-Za-z0-9-]{16,64}$"3597 }3598 }3599 ],3600 "requestBody": {3601 "required": true,3602 "content": {3603 "application/json": {3604 "schema": {3605 "type": "object",3606 "properties": {3607 "network": {3608 "type": "string",3609 "maxLength": 203610 },3611 "asset": {3612 "type": "string",3613 "maxLength": 803614 },3615 "to": {3616 "type": "string",3617 "minLength": 1,3618 "maxLength": 1303619 },3620 "amount": {3621 "type": "string",3622 "minLength": 1,3623 "maxLength": 80,3624 "description": "decimal string in the asset's own unit"3625 },3626 "note": {3627 "default": "",3628 "type": "string",3629 "maxLength": 803630 },3631 "memo": {3632 "type": "string",3633 "maxLength": 1203634 }3635 },3636 "required": [3637 "network",3638 "asset",3639 "to",3640 "amount"3641 ],3642 "additionalProperties": false3643 }3644 }3645 }3646 },3647 "responses": {3648 "200": {3649 "description": "OK",3650 "content": {3651 "application/json": {3652 "schema": {3653 "$ref": "#/components/schemas/Proposal"3654 }3655 }3656 }3657 },3658 "400": {3659 "description": "The request is not valid: `bad_address`, `bad_amount`, `bad_destination`, `bad_memo`, `bad_request`, `bad_source`, `below_rent`, `below_reserve`, `contract_destination`, `fee_too_high`, `idempotency`, `insufficient_funds`, `insufficient_gas`, `insufficient_unlocked_funds`, `memo_required`, `pending_tx`, `simulation_failed`, `too_many_coins`, `unsupported_account`, `unsupported_asset`, `unsupported_funds`",3660 "content": {3661 "application/json": {3662 "schema": {3663 "$ref": "#/components/schemas/Error"3664 }3665 }3666 }3667 },3668 "401": {3669 "description": "No valid session: `unauthenticated`",3670 "content": {3671 "application/json": {3672 "schema": {3673 "$ref": "#/components/schemas/Error"3674 }3675 }3676 }3677 },3678 "403": {3679 "description": "Refused: `csrf`",3680 "content": {3681 "application/json": {3682 "schema": {3683 "$ref": "#/components/schemas/Error"3684 }3685 }3686 }3687 },3688 "409": {3689 "description": "Conflicts with the state of the object: `conflict`, `idempotency_mismatch`, `pending_tx`",3690 "content": {3691 "application/json": {3692 "schema": {3693 "$ref": "#/components/schemas/Error"3694 }3695 }3696 }3697 },3698 "422": {3699 "description": "A valid request that cannot be carried out: `fee_ceiling`, `policy`",3700 "content": {3701 "application/json": {3702 "schema": {3703 "$ref": "#/components/schemas/Error"3704 }3705 }3706 }3707 },3708 "429": {3709 "description": "Too many requests: `rate_limited`",3710 "content": {3711 "application/json": {3712 "schema": {3713 "$ref": "#/components/schemas/Error"3714 }3715 }3716 }3717 },3718 "500": {3719 "description": "Server error: `internal`",3720 "content": {3721 "application/json": {3722 "schema": {3723 "$ref": "#/components/schemas/Error"3724 }3725 }3726 }3727 },3728 "503": {3729 "description": "A backing service is unavailable; nothing was done: `fee_too_high`, `protocol_changed`, `rpc_degraded`, `rpc_disagreement`, `runtime_changed`, `signer_unreachable`, `unsupported_network`",3730 "content": {3731 "application/json": {3732 "schema": {3733 "$ref": "#/components/schemas/Error"3734 }3735 }3736 }3737 }3738 }3739 }3740 },3741 "/api/v1/transfers/proposals/{id}": {3742 "get": {3743 "operationId": "getTransfer",3744 "tags": [3745 "Transfers"3746 ],3747 "summary": "One proposal",3748 "security": [3749 {3750 "session": []3751 }3752 ],3753 "x-spw-auth": "session",3754 "x-spw-csrf": false,3755 "x-spw-errors": [3756 {3757 "status": 400,3758 "code": "bad_request"3759 },3760 {3761 "status": 401,3762 "code": "unauthenticated"3763 },3764 {3765 "status": 404,3766 "code": "not_found"3767 },3768 {3769 "status": 429,3770 "code": "rate_limited"3771 },3772 {3773 "status": 500,3774 "code": "internal"3775 }3776 ],3777 "parameters": [3778 {3779 "name": "id",3780 "in": "path",3781 "required": true,3782 "description": "the id returned by the creation or by a list",3783 "schema": {3784 "type": "string"3785 }3786 }3787 ],3788 "responses": {3789 "200": {3790 "description": "OK",3791 "content": {3792 "application/json": {3793 "schema": {3794 "$ref": "#/components/schemas/Proposal"3795 }3796 }3797 }3798 },3799 "400": {3800 "description": "The request is not valid: `bad_request`",3801 "content": {3802 "application/json": {3803 "schema": {3804 "$ref": "#/components/schemas/Error"3805 }3806 }3807 }3808 },3809 "401": {3810 "description": "No valid session: `unauthenticated`",3811 "content": {3812 "application/json": {3813 "schema": {3814 "$ref": "#/components/schemas/Error"3815 }3816 }3817 }3818 },3819 "404": {3820 "description": "The object does not exist: `not_found`",3821 "content": {3822 "application/json": {3823 "schema": {3824 "$ref": "#/components/schemas/Error"3825 }3826 }3827 }3828 },3829 "429": {3830 "description": "Too many requests: `rate_limited`",3831 "content": {3832 "application/json": {3833 "schema": {3834 "$ref": "#/components/schemas/Error"3835 }3836 }3837 }3838 },3839 "500": {3840 "description": "Server error: `internal`",3841 "content": {3842 "application/json": {3843 "schema": {3844 "$ref": "#/components/schemas/Error"3845 }3846 }3847 }3848 }3849 }3850 }3851 },3852 "/api/v1/transfers/{id}/status": {3853 "get": {3854 "operationId": "getTransferStatus",3855 "tags": [3856 "Transfers"3857 ],3858 "summary": "The short status of one proposal",3859 "description": "The short form for polling. NEXT added `lifecycle`, `finalized`, `watched`, `feePaid`, `feePaidDisplay`.",3860 "security": [3861 {3862 "session": []3863 }3864 ],3865 "x-spw-auth": "session",3866 "x-spw-csrf": false,3867 "x-spw-errors": [3868 {3869 "status": 400,3870 "code": "bad_request"3871 },3872 {3873 "status": 401,3874 "code": "unauthenticated"3875 },3876 {3877 "status": 404,3878 "code": "not_found"3879 },3880 {3881 "status": 429,3882 "code": "rate_limited"3883 },3884 {3885 "status": 500,3886 "code": "internal"3887 }3888 ],3889 "parameters": [3890 {3891 "name": "id",3892 "in": "path",3893 "required": true,3894 "description": "the id returned by the creation or by a list",3895 "schema": {3896 "type": "string"3897 }3898 }3899 ],3900 "responses": {3901 "200": {3902 "description": "OK",3903 "content": {3904 "application/json": {3905 "schema": {3906 "type": "object",3907 "properties": {3908 "id": {3909 "type": "string",3910 "format": "uuid",3911 "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"3912 },3913 "state": {3914 "$ref": "#/components/schemas/ProposalState"3915 },3916 "lifecycle": {3917 "$ref": "#/components/schemas/Lifecycle"3918 },3919 "finalized": {3920 "type": "boolean"3921 },3922 "watched": {3923 "type": "boolean"3924 },3925 "feePaid": {3926 "anyOf": [3927 {3928 "type": "string",3929 "description": "integer amount in base units, as a string"3930 },3931 {3932 "type": "null"3933 }3934 ],3935 "description": "the fee the network actually charged; null until known (rows older than NEXT have none)"3936 },3937 "feePaidDisplay": {3938 "anyOf": [3939 {3940 "type": "string",3941 "description": "the same amount as a decimal string (exact arithmetic)"3942 },3943 {3944 "type": "null"3945 }3946 ]3947 },3948 "txid": {3949 "type": [3950 "string",3951 "null"3952 ]3953 },3954 "confirmations": {3955 "type": "integer",3956 "minimum": -9007199254740991,3957 "maximum": 90071992547409913958 },3959 "error": {3960 "type": [3961 "string",3962 "null"3963 ]3964 },3965 "errorCode": {3966 "anyOf": [3967 {3968 "$ref": "#/components/schemas/ProposalErrorCode"3969 },3970 {3971 "type": "null"3972 }3973 ]3974 },3975 "errorParams": {3976 "anyOf": [3977 {3978 "type": "object",3979 "propertyNames": {3980 "type": "string"3981 },3982 "additionalProperties": {3983 "type": [3984 "string",3985 "number"3986 ]3987 }3988 },3989 {3990 "type": "null"3991 }3992 ]3993 },3994 "explorer": {3995 "type": [3996 "string",3997 "null"3998 ]3999 },4000 "kind": {4001 "$ref": "#/components/schemas/ProposalKind"4002 },4003 "execution": {4004 "type": "object",4005 "properties": {4006 "kind": {4007 "type": "string"4008 },4009 "state": {4010 "type": "string",4011 "description": "pending, awaiting_approval, signing, sending, confirming, waiting, confirmed, failed, refunded, unknown"4012 },4013 "updatedAt": {4014 "anyOf": [4015 {4016 "type": "string",4017 "description": "date-time, ISO 8601, UTC"4018 },4019 {4020 "type": "null"4021 }4022 ]4023 },4024 "steps": {4025 "type": "array",4026 "items": {4027 "type": "object",4028 "properties": {4029 "id": {4030 "type": "string"4031 },4032 "kind": {4033 "type": "string"4034 },4035 "network": {4036 "type": "string"4037 },4038 "provider": {4039 "type": [4040 "string",4041 "null"4042 ]4043 },4044 "state": {4045 "type": "string"4046 },4047 "txid": {4048 "type": [4049 "string",4050 "null"4051 ]4052 },4053 "explorer": {4054 "type": [4055 "string",4056 "null"4057 ]4058 },4059 "startedAt": {4060 "anyOf": [4061 {4062 "type": "string",4063 "description": "date-time, ISO 8601, UTC"4064 },4065 {4066 "type": "null"4067 }4068 ]4069 },4070 "endedAt": {4071 "anyOf": [4072 {4073 "type": "string",4074 "description": "date-time, ISO 8601, UTC"4075 },4076 {4077 "type": "null"4078 }4079 ]4080 },4081 "code": {4082 "type": [4083 "string",4084 "null"4085 ]4086 }4087 },4088 "required": [4089 "id",4090 "kind",4091 "network",4092 "provider",4093 "state",4094 "txid",4095 "explorer",4096 "startedAt",4097 "endedAt",4098 "code"4099 ],4100 "additionalProperties": {}4101 }4102 }4103 },4104 "required": [4105 "kind",4106 "state",4107 "updatedAt",4108 "steps"4109 ],4110 "additionalProperties": {},4111 "description": "one status shape for every kind of operation"4112 }4113 },4114 "required": [4115 "id",4116 "state",4117 "lifecycle",4118 "finalized",4119 "watched",4120 "feePaid",4121 "feePaidDisplay",4122 "txid",4123 "confirmations",4124 "error",4125 "errorCode",4126 "errorParams",4127 "explorer",4128 "kind",4129 "execution"4130 ],4131 "additionalProperties": {}4132 }4133 }4134 }4135 },4136 "400": {4137 "description": "The request is not valid: `bad_request`",4138 "content": {4139 "application/json": {4140 "schema": {4141 "$ref": "#/components/schemas/Error"4142 }4143 }4144 }4145 },4146 "401": {4147 "description": "No valid session: `unauthenticated`",4148 "content": {4149 "application/json": {4150 "schema": {4151 "$ref": "#/components/schemas/Error"4152 }4153 }4154 }4155 },4156 "404": {4157 "description": "The object does not exist: `not_found`",4158 "content": {4159 "application/json": {4160 "schema": {4161 "$ref": "#/components/schemas/Error"4162 }4163 }4164 }4165 },4166 "429": {4167 "description": "Too many requests: `rate_limited`",4168 "content": {4169 "application/json": {4170 "schema": {4171 "$ref": "#/components/schemas/Error"4172 }4173 }4174 }4175 },4176 "500": {4177 "description": "Server error: `internal`",4178 "content": {4179 "application/json": {4180 "schema": {4181 "$ref": "#/components/schemas/Error"4182 }4183 }4184 }4185 }4186 }4187 }4188 },4189 "/api/v1/transfers/proposals/{id}/request-approval": {4190 "post": {4191 "operationId": "requestApproval",4192 "tags": [4193 "Transfers"4194 ],4195 "summary": "Freeze the exact transaction and get the passkey challenge",4196 "description": "Moves a draft to `pending_approval` (or re-issues a fresh challenge). The client shows `intent` in full before asking for the passkey.",4197 "security": [4198 {4199 "session": []4200 }4201 ],4202 "x-spw-auth": "session",4203 "x-spw-csrf": true,4204 "x-spw-errors": [4205 {4206 "status": 400,4207 "code": "bad_destination"4208 },4209 {4210 "status": 400,4211 "code": "bad_request"4212 },4213 {4214 "status": 400,4215 "code": "bad_source"4216 },4217 {4218 "status": 400,4219 "code": "below_rent"4220 },4221 {4222 "status": 400,4223 "code": "below_reserve"4224 },4225 {4226 "status": 400,4227 "code": "contract_destination"4228 },4229 {4230 "status": 400,4231 "code": "fee_too_high"4232 },4233 {4234 "status": 400,4235 "code": "insufficient_funds"4236 },4237 {4238 "status": 400,4239 "code": "insufficient_gas"4240 },4241 {4242 "status": 400,4243 "code": "insufficient_unlocked_funds"4244 },4245 {4246 "status": 400,4247 "code": "memo_required"4248 },4249 {4250 "status": 400,4251 "code": "pending_tx"4252 },4253 {4254 "status": 400,4255 "code": "simulation_failed"4256 },4257 {4258 "status": 400,4259 "code": "too_many_coins"4260 },4261 {4262 "status": 400,4263 "code": "unsupported_account"4264 },4265 {4266 "status": 400,4267 "code": "unsupported_funds"4268 },4269 {4270 "status": 401,4271 "code": "unauthenticated"4272 },4273 {4274 "status": 403,4275 "code": "csrf"4276 },4277 {4278 "status": 404,4279 "code": "not_found"4280 },4281 {4282 "status": 409,4283 "code": "bad_state"4284 },4285 {4286 "status": 409,4287 "code": "conflict"4288 },4289 {4290 "status": 409,4291 "code": "pending_tx"4292 },4293 {4294 "status": 422,4295 "code": "fee_ceiling"4296 },4297 {4298 "status": 422,4299 "code": "policy"4300 },4301 {4302 "status": 423,4303 "code": "halted"4304 },4305 {4306 "status": 429,4307 "code": "rate_limited"4308 },4309 {4310 "status": 500,4311 "code": "internal"4312 },4313 {4314 "status": 503,4315 "code": "fee_too_high"4316 },4317 {4318 "status": 503,4319 "code": "protocol_changed"4320 },4321 {4322 "status": 503,4323 "code": "rpc_degraded"4324 },4325 {4326 "status": 503,4327 "code": "rpc_disagreement"4328 },4329 {4330 "status": 503,4331 "code": "runtime_changed"4332 },4333 {4334 "status": 503,4335 "code": "signer_unreachable"4336 },4337 {4338 "status": 503,4339 "code": "unsupported_network"4340 }4341 ],4342 "x-spw-errors-open": true,4343 "parameters": [4344 {4345 "name": "id",4346 "in": "path",4347 "required": true,4348 "description": "the id returned by the creation or by a list",4349 "schema": {4350 "type": "string"4351 }4352 }4353 ],4354 "responses": {4355 "200": {4356 "description": "OK",4357 "content": {4358 "application/json": {4359 "schema": {4360 "type": "object",4361 "properties": {4362 "proposal": {4363 "$ref": "#/components/schemas/Proposal"4364 },4365 "intent": {4366 "type": "object",4367 "properties": {},4368 "additionalProperties": {},4369 "description": "the canonical intent: every field the signer will check; its SHA-256 is the challenge"4370 },4371 "options": {4372 "type": "object",4373 "properties": {},4374 "additionalProperties": {},4375 "description": "WebAuthn options (PublicKeyCredentialRequestOptions / CreationOptions as JSON), to hand to the platform API"4376 }4377 },4378 "required": [4379 "proposal",4380 "intent",4381 "options"4382 ],4383 "additionalProperties": {}4384 }4385 }4386 }4387 },4388 "400": {4389 "description": "The request is not valid: `bad_destination`, `bad_request`, `bad_source`, `below_rent`, `below_reserve`, `contract_destination`, `fee_too_high`, `insufficient_funds`, `insufficient_gas`, `insufficient_unlocked_funds`, `memo_required`, `pending_tx`, `simulation_failed`, `too_many_coins`, `unsupported_account`, `unsupported_funds`",4390 "content": {4391 "application/json": {4392 "schema": {4393 "$ref": "#/components/schemas/Error"4394 }4395 }4396 }4397 },4398 "401": {4399 "description": "No valid session: `unauthenticated`",4400 "content": {4401 "application/json": {4402 "schema": {4403 "$ref": "#/components/schemas/Error"4404 }4405 }4406 }4407 },4408 "403": {4409 "description": "Refused: `csrf`",4410 "content": {4411 "application/json": {4412 "schema": {4413 "$ref": "#/components/schemas/Error"4414 }4415 }4416 }4417 },4418 "404": {4419 "description": "The object does not exist: `not_found`",4420 "content": {4421 "application/json": {4422 "schema": {4423 "$ref": "#/components/schemas/Error"4424 }4425 }4426 }4427 },4428 "409": {4429 "description": "Conflicts with the state of the object: `bad_state`, `conflict`, `pending_tx`",4430 "content": {4431 "application/json": {4432 "schema": {4433 "$ref": "#/components/schemas/Error"4434 }4435 }4436 }4437 },4438 "422": {4439 "description": "A valid request that cannot be carried out: `fee_ceiling`, `policy`",4440 "content": {4441 "application/json": {4442 "schema": {4443 "$ref": "#/components/schemas/Error"4444 }4445 }4446 }4447 },4448 "423": {4449 "description": "Blocked by the emergency halt: `halted`",4450 "content": {4451 "application/json": {4452 "schema": {4453 "$ref": "#/components/schemas/Error"4454 }4455 }4456 }4457 },4458 "429": {4459 "description": "Too many requests: `rate_limited`",4460 "content": {4461 "application/json": {4462 "schema": {4463 "$ref": "#/components/schemas/Error"4464 }4465 }4466 }4467 },4468 "500": {4469 "description": "Server error: `internal`",4470 "content": {4471 "application/json": {4472 "schema": {4473 "$ref": "#/components/schemas/Error"4474 }4475 }4476 }4477 },4478 "503": {4479 "description": "A backing service is unavailable; nothing was done: `fee_too_high`, `protocol_changed`, `rpc_degraded`, `rpc_disagreement`, `runtime_changed`, `signer_unreachable`, `unsupported_network`",4480 "content": {4481 "application/json": {4482 "schema": {4483 "$ref": "#/components/schemas/Error"4484 }4485 }4486 }4487 }4488 }4489 }4490 },4491 "/api/v1/transfers/proposals/{id}/approve": {4492 "post": {4493 "operationId": "approveTransfer",4494 "tags": [4495 "Transfers"4496 ],4497 "summary": "Approve with the passkey assertion over the intent hash; sign and relay",4498 "description": "The HTTP call is not the approval: the assertion is, and only the signer judges it (`signer_<code>`, 422). After this call left the device the outcome is UNKNOWN until the server says otherwise: on a lost answer, re-read the proposal — never re-enable Approve, never offer Cancel.",4499 "security": [4500 {4501 "session": []4502 }4503 ],4504 "x-spw-auth": "session",4505 "x-spw-csrf": true,4506 "x-spw-errors": [4507 {4508 "status": 400,4509 "code": "bad_request"4510 },4511 {4512 "status": 401,4513 "code": "unauthenticated"4514 },4515 {4516 "status": 403,4517 "code": "csrf"4518 },4519 {4520 "status": 404,4521 "code": "not_found"4522 },4523 {4524 "status": 409,4525 "code": "bad_state"4526 },4527 {4528 "status": 409,4529 "code": "conflict"4530 },4531 {4532 "status": 409,4533 "code": "pending_tx"4534 },4535 {4536 "status": 410,4537 "code": "expired"4538 },4539 {4540 "status": 429,4541 "code": "rate_limited"4542 },4543 {4544 "status": 500,4545 "code": "hash_mismatch"4546 },4547 {4548 "status": 500,4549 "code": "internal"4550 },4551 {4552 "status": 503,4553 "code": "signer_unreachable"4554 }4555 ],4556 "x-spw-errors-open": true,4557 "parameters": [4558 {4559 "name": "id",4560 "in": "path",4561 "required": true,4562 "description": "the id returned by the creation or by a list",4563 "schema": {4564 "type": "string"4565 }4566 }4567 ],4568 "requestBody": {4569 "required": true,4570 "content": {4571 "application/json": {4572 "schema": {4573 "type": "object",4574 "properties": {4575 "assertion": {4576 "type": "object",4577 "propertyNames": {4578 "type": "string"4579 },4580 "additionalProperties": {},4581 "description": "the WebAuthn assertion over the challenge"4582 }4583 },4584 "required": [4585 "assertion"4586 ]4587 }4588 }4589 }4590 },4591 "responses": {4592 "200": {4593 "description": "OK",4594 "content": {4595 "application/json": {4596 "schema": {4597 "$ref": "#/components/schemas/Proposal"4598 }4599 }4600 }4601 },4602 "400": {4603 "description": "The request is not valid: `bad_request`",4604 "content": {4605 "application/json": {4606 "schema": {4607 "$ref": "#/components/schemas/Error"4608 }4609 }4610 }4611 },4612 "401": {4613 "description": "No valid session: `unauthenticated`",4614 "content": {4615 "application/json": {4616 "schema": {4617 "$ref": "#/components/schemas/Error"4618 }4619 }4620 }4621 },4622 "403": {4623 "description": "Refused: `csrf`",4624 "content": {4625 "application/json": {4626 "schema": {4627 "$ref": "#/components/schemas/Error"4628 }4629 }4630 }4631 },4632 "404": {4633 "description": "The object does not exist: `not_found`",4634 "content": {4635 "application/json": {4636 "schema": {4637 "$ref": "#/components/schemas/Error"4638 }4639 }4640 }4641 },4642 "409": {4643 "description": "Conflicts with the state of the object: `bad_state`, `conflict`, `pending_tx`",4644 "content": {4645 "application/json": {4646 "schema": {4647 "$ref": "#/components/schemas/Error"4648 }4649 }4650 }4651 },4652 "410": {4653 "description": "Expired: `expired`",4654 "content": {4655 "application/json": {4656 "schema": {4657 "$ref": "#/components/schemas/Error"4658 }4659 }4660 }4661 },4662 "429": {4663 "description": "Too many requests: `rate_limited`",4664 "content": {4665 "application/json": {4666 "schema": {4667 "$ref": "#/components/schemas/Error"4668 }4669 }4670 }4671 },4672 "500": {4673 "description": "Server error: `hash_mismatch`, `internal`",4674 "content": {4675 "application/json": {4676 "schema": {4677 "$ref": "#/components/schemas/Error"4678 }4679 }4680 }4681 },4682 "503": {4683 "description": "A backing service is unavailable; nothing was done: `signer_unreachable`",4684 "content": {4685 "application/json": {4686 "schema": {4687 "$ref": "#/components/schemas/Error"4688 }4689 }4690 }4691 }4692 }4693 }4694 },4695 "/api/v1/transfers/proposals/{id}/reject": {4696 "post": {4697 "operationId": "rejectTransfer",4698 "tags": [4699 "Transfers"4700 ],4701 "summary": "Reject a draft or a proposal awaiting approval",4702 "security": [4703 {4704 "session": []4705 }4706 ],4707 "x-spw-auth": "session",4708 "x-spw-csrf": true,4709 "x-spw-errors": [4710 {4711 "status": 400,4712 "code": "bad_request"4713 },4714 {4715 "status": 401,4716 "code": "unauthenticated"4717 },4718 {4719 "status": 403,4720 "code": "csrf"4721 },4722 {4723 "status": 404,4724 "code": "not_found"4725 },4726 {4727 "status": 409,4728 "code": "bad_state"4729 },4730 {4731 "status": 409,4732 "code": "conflict"4733 },4734 {4735 "status": 429,4736 "code": "rate_limited"4737 },4738 {4739 "status": 500,4740 "code": "internal"4741 }4742 ],4743 "parameters": [4744 {4745 "name": "id",4746 "in": "path",4747 "required": true,4748 "description": "the id returned by the creation or by a list",4749 "schema": {4750 "type": "string"4751 }4752 }4753 ],4754 "responses": {4755 "200": {4756 "description": "OK",4757 "content": {4758 "application/json": {4759 "schema": {4760 "$ref": "#/components/schemas/Proposal"4761 }4762 }4763 }4764 },4765 "400": {4766 "description": "The request is not valid: `bad_request`",4767 "content": {4768 "application/json": {4769 "schema": {4770 "$ref": "#/components/schemas/Error"4771 }4772 }4773 }4774 },4775 "401": {4776 "description": "No valid session: `unauthenticated`",4777 "content": {4778 "application/json": {4779 "schema": {4780 "$ref": "#/components/schemas/Error"4781 }4782 }4783 }4784 },4785 "403": {4786 "description": "Refused: `csrf`",4787 "content": {4788 "application/json": {4789 "schema": {4790 "$ref": "#/components/schemas/Error"4791 }4792 }4793 }4794 },4795 "404": {4796 "description": "The object does not exist: `not_found`",4797 "content": {4798 "application/json": {4799 "schema": {4800 "$ref": "#/components/schemas/Error"4801 }4802 }4803 }4804 },4805 "409": {4806 "description": "Conflicts with the state of the object: `bad_state`, `conflict`",4807 "content": {4808 "application/json": {4809 "schema": {4810 "$ref": "#/components/schemas/Error"4811 }4812 }4813 }4814 },4815 "429": {4816 "description": "Too many requests: `rate_limited`",4817 "content": {4818 "application/json": {4819 "schema": {4820 "$ref": "#/components/schemas/Error"4821 }4822 }4823 }4824 },4825 "500": {4826 "description": "Server error: `internal`",4827 "content": {4828 "application/json": {4829 "schema": {4830 "$ref": "#/components/schemas/Error"4831 }4832 }4833 }4834 }4835 }4836 }4837 },4838 "/api/v1/activity": {4839 "get": {4840 "operationId": "listActivity",4841 "tags": [4842 "Activity"4843 ],4844 "summary": "Operations and receipts of the wallet, newest first",4845 "description": "The latest `limit` operations and the latest `limit` receipts, merged. With `network` / `asset` the filter is applied in SQL before the limit, so an asset page reaches that asset's movements however old they are.",4846 "security": [4847 {4848 "session": []4849 }4850 ],4851 "x-spw-auth": "session",4852 "x-spw-csrf": false,4853 "x-spw-errors": [4854 {4855 "status": 400,4856 "code": "bad_request"4857 },4858 {4859 "status": 401,4860 "code": "unauthenticated"4861 },4862 {4863 "status": 429,4864 "code": "rate_limited"4865 },4866 {4867 "status": 500,4868 "code": "internal"4869 }4870 ],4871 "parameters": [4872 {4873 "name": "limit",4874 "in": "query",4875 "required": false,4876 "description": "rows returned at most",4877 "schema": {4878 "default": 100,4879 "type": "integer",4880 "minimum": 1,4881 "maximum": 5004882 }4883 },4884 {4885 "name": "network",4886 "in": "query",4887 "required": false,4888 "description": "NEXT: only the movements on this network id",4889 "schema": {4890 "type": "string",4891 "minLength": 1,4892 "maxLength": 20,4893 "pattern": "^[^\\u0000-\\u001f\\u007f]*$"4894 }4895 },4896 {4897 "name": "asset",4898 "in": "query",4899 "required": false,4900 "description": "NEXT: only the movements of this asset id (`native` or a contract / mint address); use it with `network`",4901 "schema": {4902 "type": "string",4903 "minLength": 1,4904 "maxLength": 130,4905 "pattern": "^[^\\u0000-\\u001f\\u007f]*$"4906 }4907 }4908 ],4909 "responses": {4910 "200": {4911 "description": "OK",4912 "content": {4913 "application/json": {4914 "schema": {4915 "type": "object",4916 "properties": {4917 "items": {4918 "type": "array",4919 "items": {4920 "anyOf": [4921 {4922 "$ref": "#/components/schemas/ActivityOperation"4923 },4924 {4925 "$ref": "#/components/schemas/ActivityReceipt"4926 }4927 ]4928 }4929 }4930 },4931 "required": [4932 "items"4933 ],4934 "additionalProperties": {}4935 }4936 }4937 }4938 },4939 "400": {4940 "description": "The request is not valid: `bad_request`",4941 "content": {4942 "application/json": {4943 "schema": {4944 "$ref": "#/components/schemas/Error"4945 }4946 }4947 }4948 },4949 "401": {4950 "description": "No valid session: `unauthenticated`",4951 "content": {4952 "application/json": {4953 "schema": {4954 "$ref": "#/components/schemas/Error"4955 }4956 }4957 }4958 },4959 "429": {4960 "description": "Too many requests: `rate_limited`",4961 "content": {4962 "application/json": {4963 "schema": {4964 "$ref": "#/components/schemas/Error"4965 }4966 }4967 }4968 },4969 "500": {4970 "description": "Server error: `internal`",4971 "content": {4972 "application/json": {4973 "schema": {4974 "$ref": "#/components/schemas/Error"4975 }4976 }4977 }4978 }4979 }4980 }4981 },4982 "/api/v1/export/activity.csv": {4983 "get": {4984 "operationId": "exportActivityCsv",4985 "tags": [4986 "Activity"4987 ],4988 "summary": "Every operation and receipt as CSV",4989 "description": "Columns are only ever appended. NEXT appended: lifecycle, fee_paid_base_units, fee_paid, fee_symbol, deposit_kind, deposit_origin, contact_label. Cells starting with = + - @ (or a tab / carriage return) are prefixed with an apostrophe.",4990 "security": [4991 {4992 "session": []4993 }4994 ],4995 "x-spw-auth": "session",4996 "x-spw-csrf": false,4997 "x-spw-errors": [4998 {4999 "status": 401,5000 "code": "unauthenticated"5001 },5002 {5003 "status": 429,5004 "code": "rate_limited"5005 },5006 {5007 "status": 500,5008 "code": "internal"5009 }5010 ],5011 "parameters": [],5012 "responses": {5013 "200": {5014 "description": "OK",5015 "content": {5016 "text/csv": {5017 "schema": {5018 "type": "string"5019 }5020 }5021 }5022 },5023 "401": {5024 "description": "No valid session: `unauthenticated`",5025 "content": {5026 "application/json": {5027 "schema": {5028 "$ref": "#/components/schemas/Error"5029 }5030 }5031 }5032 },5033 "429": {5034 "description": "Too many requests: `rate_limited`",5035 "content": {5036 "application/json": {5037 "schema": {5038 "$ref": "#/components/schemas/Error"5039 }5040 }5041 }5042 },5043 "500": {5044 "description": "Server error: `internal`",5045 "content": {5046 "application/json": {5047 "schema": {5048 "$ref": "#/components/schemas/Error"5049 }5050 }5051 }5052 }5053 }5054 }5055 },5056 "/api/v1/addressbook": {5057 "get": {5058 "operationId": "listAddressBook",5059 "tags": [5060 "AddressBook"5061 ],5062 "summary": "Contacts (legacy shape)",5063 "security": [5064 {5065 "session": []5066 }5067 ],5068 "x-spw-auth": "session",5069 "x-spw-csrf": false,5070 "x-spw-errors": [5071 {5072 "status": 401,5073 "code": "unauthenticated"5074 },5075 {5076 "status": 429,5077 "code": "rate_limited"5078 },5079 {5080 "status": 500,5081 "code": "internal"5082 }5083 ],5084 "parameters": [],5085 "responses": {5086 "200": {5087 "description": "OK",5088 "content": {5089 "application/json": {5090 "schema": {5091 "type": "array",5092 "items": {5093 "type": "object",5094 "properties": {5095 "id": {5096 "type": "string",5097 "format": "uuid",5098 "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"5099 },5100 "network": {5101 "type": "string"5102 },5103 "address": {5104 "type": "string"5105 },5106 "label": {5107 "type": "string"5108 },5109 "created_at": {5110 "type": "string",5111 "description": "date-time, ISO 8601, UTC"5112 }5113 },5114 "required": [5115 "id",5116 "network",5117 "address",5118 "label",5119 "created_at"5120 ],5121 "additionalProperties": {}5122 }5123 }5124 }5125 }5126 },5127 "401": {5128 "description": "No valid session: `unauthenticated`",5129 "content": {5130 "application/json": {5131 "schema": {5132 "$ref": "#/components/schemas/Error"5133 }5134 }5135 }5136 },5137 "429": {5138 "description": "Too many requests: `rate_limited`",5139 "content": {5140 "application/json": {5141 "schema": {5142 "$ref": "#/components/schemas/Error"5143 }5144 }5145 }5146 },5147 "500": {5148 "description": "Server error: `internal`",5149 "content": {5150 "application/json": {5151 "schema": {5152 "$ref": "#/components/schemas/Error"5153 }5154 }5155 }5156 }5157 }5158 },5159 "post": {5160 "operationId": "saveContact",5161 "tags": [5162 "AddressBook"5163 ],5164 "summary": "Create a contact, or relabel the one that has this address",5165 "security": [5166 {5167 "session": []5168 }5169 ],5170 "x-spw-auth": "session",5171 "x-spw-csrf": true,5172 "x-spw-errors": [5173 {5174 "status": 400,5175 "code": "bad_address"5176 },5177 {5178 "status": 400,5179 "code": "bad_request"5180 },5181 {5182 "status": 401,5183 "code": "unauthenticated"5184 },5185 {5186 "status": 403,5187 "code": "csrf"5188 },5189 {5190 "status": 429,5191 "code": "rate_limited"5192 },5193 {5194 "status": 500,5195 "code": "internal"5196 }5197 ],5198 "parameters": [],5199 "requestBody": {5200 "required": true,5201 "content": {5202 "application/json": {5203 "schema": {5204 "type": "object",5205 "properties": {5206 "network": {5207 "type": "string",5208 "maxLength": 205209 },5210 "address": {5211 "type": "string",5212 "maxLength": 1105213 },5214 "label": {5215 "type": "string",5216 "minLength": 1,5217 "maxLength": 405218 }5219 },5220 "required": [5221 "network",5222 "address",5223 "label"5224 ],5225 "additionalProperties": false5226 }5227 }5228 }5229 },5230 "responses": {5231 "200": {5232 "description": "OK",5233 "content": {5234 "application/json": {5235 "schema": {5236 "type": "object",5237 "properties": {5238 "id": {5239 "type": "string",5240 "format": "uuid",5241 "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"5242 },5243 "network": {5244 "type": "string"5245 },5246 "address": {5247 "type": "string"5248 },5249 "label": {5250 "type": "string"5251 }5252 },5253 "required": [5254 "id",5255 "network",5256 "address",5257 "label"5258 ],5259 "additionalProperties": {}5260 }5261 }5262 }5263 },5264 "400": {5265 "description": "The request is not valid: `bad_address`, `bad_request`",5266 "content": {5267 "application/json": {5268 "schema": {5269 "$ref": "#/components/schemas/Error"5270 }5271 }5272 }5273 },5274 "401": {5275 "description": "No valid session: `unauthenticated`",5276 "content": {5277 "application/json": {5278 "schema": {5279 "$ref": "#/components/schemas/Error"5280 }5281 }5282 }5283 },5284 "403": {5285 "description": "Refused: `csrf`",5286 "content": {5287 "application/json": {5288 "schema": {5289 "$ref": "#/components/schemas/Error"5290 }5291 }5292 }5293 },5294 "429": {5295 "description": "Too many requests: `rate_limited`",5296 "content": {5297 "application/json": {5298 "schema": {5299 "$ref": "#/components/schemas/Error"5300 }5301 }5302 }5303 },5304 "500": {5305 "description": "Server error: `internal`",5306 "content": {5307 "application/json": {5308 "schema": {5309 "$ref": "#/components/schemas/Error"5310 }5311 }5312 }5313 }5314 }5315 }5316 },5317 "/api/v1/addressbook/{id}": {5318 "patch": {5319 "operationId": "updateContact",5320 "tags": [5321 "AddressBook"5322 ],5323 "summary": "Edit a contact: label, note, favourite, address",5324 "description": "Changing where a contact points raises the event `security.contact_address_changed`.",5325 "security": [5326 {5327 "session": []5328 }5329 ],5330 "x-spw-auth": "session",5331 "x-spw-csrf": true,5332 "x-spw-since": "next",5333 "x-spw-errors": [5334 {5335 "status": 400,5336 "code": "bad_address"5337 },5338 {5339 "status": 400,5340 "code": "bad_request"5341 },5342 {5343 "status": 401,5344 "code": "unauthenticated"5345 },5346 {5347 "status": 403,5348 "code": "csrf"5349 },5350 {5351 "status": 404,5352 "code": "not_found"5353 },5354 {5355 "status": 409,5356 "code": "duplicate_contact"5357 },5358 {5359 "status": 409,5360 "code": "stale_contact"5361 },5362 {5363 "status": 429,5364 "code": "rate_limited"5365 },5366 {5367 "status": 500,5368 "code": "internal"5369 }5370 ],5371 "parameters": [5372 {5373 "name": "id",5374 "in": "path",5375 "required": true,5376 "description": "the id returned by the creation or by a list",5377 "schema": {5378 "type": "string"5379 }5380 }5381 ],5382 "requestBody": {5383 "required": true,5384 "content": {5385 "application/json": {5386 "schema": {5387 "type": "object",5388 "properties": {5389 "label": {5390 "type": "string",5391 "minLength": 1,5392 "maxLength": 405393 },5394 "note": {5395 "type": "string",5396 "maxLength": 2005397 },5398 "favorite": {5399 "type": "boolean"5400 },5401 "address": {5402 "type": "string",5403 "maxLength": 1105404 },5405 "currentAddress": {5406 "description": "required to change `address`: the address the client believes is current",5407 "type": "string",5408 "maxLength": 1105409 }5410 },5411 "additionalProperties": false5412 }5413 }5414 }5415 },5416 "responses": {5417 "200": {5418 "description": "OK",5419 "content": {5420 "application/json": {5421 "schema": {5422 "$ref": "#/components/schemas/Contact"5423 }5424 }5425 }5426 },5427 "400": {5428 "description": "The request is not valid: `bad_address`, `bad_request`",5429 "content": {5430 "application/json": {5431 "schema": {5432 "$ref": "#/components/schemas/Error"5433 }5434 }5435 }5436 },5437 "401": {5438 "description": "No valid session: `unauthenticated`",5439 "content": {5440 "application/json": {5441 "schema": {5442 "$ref": "#/components/schemas/Error"5443 }5444 }5445 }5446 },5447 "403": {5448 "description": "Refused: `csrf`",5449 "content": {5450 "application/json": {5451 "schema": {5452 "$ref": "#/components/schemas/Error"5453 }5454 }5455 }5456 },5457 "404": {5458 "description": "The object does not exist: `not_found`",5459 "content": {5460 "application/json": {5461 "schema": {5462 "$ref": "#/components/schemas/Error"5463 }5464 }5465 }5466 },5467 "409": {5468 "description": "Conflicts with the state of the object: `duplicate_contact`, `stale_contact`",5469 "content": {5470 "application/json": {5471 "schema": {5472 "$ref": "#/components/schemas/Error"5473 }5474 }5475 }5476 },5477 "429": {5478 "description": "Too many requests: `rate_limited`",5479 "content": {5480 "application/json": {5481 "schema": {5482 "$ref": "#/components/schemas/Error"5483 }5484 }5485 }5486 },5487 "500": {5488 "description": "Server error: `internal`",5489 "content": {5490 "application/json": {5491 "schema": {5492 "$ref": "#/components/schemas/Error"5493 }5494 }5495 }5496 }5497 }5498 },5499 "delete": {5500 "operationId": "deleteContact",5501 "tags": [5502 "AddressBook"5503 ],5504 "summary": "Delete a contact",5505 "security": [5506 {5507 "session": []5508 }5509 ],5510 "x-spw-auth": "session",5511 "x-spw-csrf": true,5512 "x-spw-errors": [5513 {5514 "status": 400,5515 "code": "bad_request"5516 },5517 {5518 "status": 401,5519 "code": "unauthenticated"5520 },5521 {5522 "status": 403,5523 "code": "csrf"5524 },5525 {5526 "status": 429,5527 "code": "rate_limited"5528 },5529 {5530 "status": 500,5531 "code": "internal"5532 }5533 ],5534 "parameters": [5535 {5536 "name": "id",5537 "in": "path",5538 "required": true,5539 "description": "the id returned by the creation or by a list",5540 "schema": {5541 "type": "string"5542 }5543 }5544 ],5545 "responses": {5546 "200": {5547 "description": "OK",5548 "content": {5549 "application/json": {5550 "schema": {5551 "type": "object",5552 "properties": {5553 "ok": {5554 "type": "boolean",5555 "const": true5556 }5557 },5558 "required": [5559 "ok"5560 ],5561 "additionalProperties": {}5562 }5563 }5564 }5565 },5566 "400": {5567 "description": "The request is not valid: `bad_request`",5568 "content": {5569 "application/json": {5570 "schema": {5571 "$ref": "#/components/schemas/Error"5572 }5573 }5574 }5575 },5576 "401": {5577 "description": "No valid session: `unauthenticated`",5578 "content": {5579 "application/json": {5580 "schema": {5581 "$ref": "#/components/schemas/Error"5582 }5583 }5584 }5585 },5586 "403": {5587 "description": "Refused: `csrf`",5588 "content": {5589 "application/json": {5590 "schema": {5591 "$ref": "#/components/schemas/Error"5592 }5593 }5594 }5595 },5596 "429": {5597 "description": "Too many requests: `rate_limited`",5598 "content": {5599 "application/json": {5600 "schema": {5601 "$ref": "#/components/schemas/Error"5602 }5603 }5604 }5605 },5606 "500": {5607 "description": "Server error: `internal`",5608 "content": {5609 "application/json": {5610 "schema": {5611 "$ref": "#/components/schemas/Error"5612 }5613 }5614 }5615 }5616 }5617 }5618 },5619 "/api/v1/contacts": {5620 "get": {5621 "operationId": "listContacts",5622 "tags": [5623 "AddressBook"5624 ],5625 "summary": "Contacts with note and favourite, favourites first",5626 "security": [5627 {5628 "session": []5629 }5630 ],5631 "x-spw-auth": "session",5632 "x-spw-csrf": false,5633 "x-spw-since": "next",5634 "x-spw-errors": [5635 {5636 "status": 401,5637 "code": "unauthenticated"5638 },5639 {5640 "status": 429,5641 "code": "rate_limited"5642 },5643 {5644 "status": 500,5645 "code": "internal"5646 }5647 ],5648 "parameters": [],5649 "responses": {5650 "200": {5651 "description": "OK",5652 "content": {5653 "application/json": {5654 "schema": {5655 "type": "object",5656 "properties": {5657 "contacts": {5658 "type": "array",5659 "items": {5660 "$ref": "#/components/schemas/Contact"5661 }5662 }5663 },5664 "required": [5665 "contacts"5666 ],5667 "additionalProperties": {}5668 }5669 }5670 }5671 },5672 "401": {5673 "description": "No valid session: `unauthenticated`",5674 "content": {5675 "application/json": {5676 "schema": {5677 "$ref": "#/components/schemas/Error"5678 }5679 }5680 }5681 },5682 "429": {5683 "description": "Too many requests: `rate_limited`",5684 "content": {5685 "application/json": {5686 "schema": {5687 "$ref": "#/components/schemas/Error"5688 }5689 }5690 }5691 },5692 "500": {5693 "description": "Server error: `internal`",5694 "content": {5695 "application/json": {5696 "schema": {5697 "$ref": "#/components/schemas/Error"5698 }5699 }5700 }5701 }5702 }5703 }5704 },5705 "/api/v1/settings": {5706 "get": {5707 "operationId": "getSettings",5708 "tags": [5709 "Settings"5710 ],5711 "summary": "Account settings shared by every device",5712 "security": [5713 {5714 "session": []5715 }5716 ],5717 "x-spw-auth": "session",5718 "x-spw-csrf": false,5719 "x-spw-errors": [5720 {5721 "status": 401,5722 "code": "unauthenticated"5723 },5724 {5725 "status": 429,5726 "code": "rate_limited"5727 },5728 {5729 "status": 500,5730 "code": "internal"5731 }5732 ],5733 "parameters": [],5734 "responses": {5735 "200": {5736 "description": "OK",5737 "content": {5738 "application/json": {5739 "schema": {5740 "type": "object",5741 "properties": {5742 "locale": {5743 "type": "string",5744 "enum": [5745 "fr",5746 "en"5747 ]5748 },5749 "currency": {5750 "$ref": "#/components/schemas/Currency"5751 },5752 "hideBalances": {5753 "type": "boolean"5754 },5755 "prices": {5756 "type": "boolean"5757 },5758 "theme": {5759 "type": "string",5760 "enum": [5761 "system",5762 "light",5763 "dark"5764 ]5765 }5766 },5767 "required": [5768 "locale",5769 "currency",5770 "hideBalances",5771 "prices",5772 "theme"5773 ],5774 "additionalProperties": {}5775 }5776 }5777 }5778 },5779 "401": {5780 "description": "No valid session: `unauthenticated`",5781 "content": {5782 "application/json": {5783 "schema": {5784 "$ref": "#/components/schemas/Error"5785 }5786 }5787 }5788 },5789 "429": {5790 "description": "Too many requests: `rate_limited`",5791 "content": {5792 "application/json": {5793 "schema": {5794 "$ref": "#/components/schemas/Error"5795 }5796 }5797 }5798 },5799 "500": {5800 "description": "Server error: `internal`",5801 "content": {5802 "application/json": {5803 "schema": {5804 "$ref": "#/components/schemas/Error"5805 }5806 }5807 }5808 }5809 }5810 },5811 "put": {5812 "operationId": "putSettings",5813 "tags": [5814 "Settings"5815 ],5816 "summary": "Change settings (any subset)",5817 "description": "Writes the audit event `settings.saved` (the keys changed and their new values), mirrored into the wallet event log so that other devices follow.",5818 "security": [5819 {5820 "session": []5821 }5822 ],5823 "x-spw-auth": "session",5824 "x-spw-csrf": true,5825 "x-spw-errors": [5826 {5827 "status": 400,5828 "code": "bad_request"5829 },5830 {5831 "status": 401,5832 "code": "unauthenticated"5833 },5834 {5835 "status": 403,5836 "code": "csrf"5837 },5838 {5839 "status": 429,5840 "code": "rate_limited"5841 },5842 {5843 "status": 500,5844 "code": "internal"5845 }5846 ],5847 "parameters": [],5848 "requestBody": {5849 "required": true,5850 "content": {5851 "application/json": {5852 "schema": {5853 "type": "object",5854 "properties": {5855 "locale": {5856 "type": "string",5857 "enum": [5858 "fr",5859 "en"5860 ]5861 },5862 "currency": {5863 "type": "string",5864 "enum": [5865 "USD",5866 "CAD"5867 ]5868 },5869 "hideBalances": {5870 "type": "boolean"5871 },5872 "prices": {5873 "type": "boolean"5874 },5875 "theme": {5876 "type": "string",5877 "enum": [5878 "system",5879 "light",5880 "dark"5881 ]5882 }5883 },5884 "additionalProperties": false5885 }5886 }5887 }5888 },5889 "responses": {5890 "200": {5891 "description": "OK",5892 "content": {5893 "application/json": {5894 "schema": {5895 "type": "object",5896 "properties": {5897 "locale": {5898 "type": "string",5899 "enum": [5900 "fr",5901 "en"5902 ]5903 },5904 "currency": {5905 "$ref": "#/components/schemas/Currency"5906 },5907 "hideBalances": {5908 "type": "boolean"5909 },5910 "prices": {5911 "type": "boolean"5912 },5913 "theme": {5914 "type": "string",5915 "enum": [5916 "system",5917 "light",5918 "dark"5919 ]5920 }5921 },5922 "required": [5923 "locale",5924 "currency",5925 "hideBalances",5926 "prices",5927 "theme"5928 ],5929 "additionalProperties": {}5930 }5931 }5932 }5933 },5934 "400": {5935 "description": "The request is not valid: `bad_request`",5936 "content": {5937 "application/json": {5938 "schema": {5939 "$ref": "#/components/schemas/Error"5940 }5941 }5942 }5943 },5944 "401": {5945 "description": "No valid session: `unauthenticated`",5946 "content": {5947 "application/json": {5948 "schema": {5949 "$ref": "#/components/schemas/Error"5950 }5951 }5952 }5953 },5954 "403": {5955 "description": "Refused: `csrf`",5956 "content": {5957 "application/json": {5958 "schema": {5959 "$ref": "#/components/schemas/Error"5960 }5961 }5962 }5963 },5964 "429": {5965 "description": "Too many requests: `rate_limited`",5966 "content": {5967 "application/json": {5968 "schema": {5969 "$ref": "#/components/schemas/Error"5970 }5971 }5972 }5973 },5974 "500": {5975 "description": "Server error: `internal`",5976 "content": {5977 "application/json": {5978 "schema": {5979 "$ref": "#/components/schemas/Error"5980 }5981 }5982 }5983 }5984 }5985 }5986 },5987 "/api/v1/security/overview": {5988 "get": {5989 "operationId": "securityOverview",5990 "tags": [5991 "Security"5992 ],5993 "summary": "Signer state, passkeys (both lists), sessions",5994 "description": "Every member that existed before NEXT keeps its name and type. A divergence between the two passkey lists that lasts 30 s is written once to the audit chain (`credentials.mismatch`) and raises the alert `security.credential_mismatch`.",5995 "security": [5996 {5997 "session": []5998 }5999 ],6000 "x-spw-auth": "session",6001 "x-spw-csrf": false,6002 "x-spw-errors": [6003 {6004 "status": 401,6005 "code": "unauthenticated"6006 },6007 {6008 "status": 429,6009 "code": "rate_limited"6010 },6011 {6012 "status": 500,6013 "code": "internal"6014 }6015 ],6016 "parameters": [],6017 "responses": {6018 "200": {6019 "description": "OK",6020 "content": {6021 "application/json": {6022 "schema": {6023 "type": "object",6024 "properties": {6025 "signer": {6026 "type": "object",6027 "properties": {6028 "reachable": {6029 "type": "boolean"6030 },6031 "keyId": {6032 "type": "string"6033 },6034 "halted": {6035 "type": "boolean"6036 },6037 "journalLength": {6038 "type": "number"6039 },6040 "journalHead": {6041 "type": [6042 "string",6043 "null"6044 ]6045 },6046 "policy": {6047 "type": "object",6048 "properties": {},6049 "additionalProperties": {}6050 },6051 "spentToday": {6052 "type": "object",6053 "propertyNames": {6054 "type": "string"6055 },6056 "additionalProperties": {6057 "type": "string"6058 }6059 },6060 "recoveryExportedAt": {6061 "description": "when the recovery phrase was last displayed on the signer; null: never recorded",6062 "anyOf": [6063 {6064 "type": "string",6065 "description": "date-time, ISO 8601, UTC"6066 },6067 {6068 "type": "null"6069 }6070 ]6071 },6072 "recoveryVerifiedAt": {6073 "description": "when the recovery phrase was last proved; null: never",6074 "anyOf": [6075 {6076 "type": "string",6077 "description": "date-time, ISO 8601, UTC"6078 },6079 {6080 "type": "null"6081 }6082 ]6083 },6084 "credentialCooldownSec": {6085 "description": "how long a newly added passkey cannot approve anything (0 = off)",6086 "type": "number"6087 }6088 },6089 "required": [6090 "reachable"6091 ],6092 "additionalProperties": {},6093 "description": "only `reachable: false` when the signer cannot be reached"6094 },6095 "devices": {6096 "type": "array",6097 "items": {6098 "type": "object",6099 "properties": {6100 "id": {6101 "type": "string",6102 "description": "first 12 characters of the credential id"6103 },6104 "label": {6105 "type": "string"6106 },6107 "deviceType": {6108 "type": "string"6109 },6110 "backedUp": {6111 "type": "boolean"6112 },6113 "createdAt": {6114 "type": "string",6115 "description": "date-time, ISO 8601, UTC"6116 },6117 "lastUsedAt": {6118 "anyOf": [6119 {6120 "type": "string",6121 "description": "date-time, ISO 8601, UTC"6122 },6123 {6124 "type": "null"6125 }6126 ]6127 },6128 "enrolledOnSigner": {6129 "type": "boolean"6130 },6131 "credentialId": {6132 "type": "string",6133 "description": "the full credential id: what the revoke routes take"6134 },6135 "inCooldown": {6136 "type": "boolean"6137 },6138 "revocable": {6139 "type": "boolean",6140 "description": "false for the last passkey on the signer, and while the signer is unreachable"6141 }6142 },6143 "required": [6144 "id",6145 "label",6146 "deviceType",6147 "backedUp",6148 "createdAt",6149 "lastUsedAt",6150 "enrolledOnSigner",6151 "credentialId",6152 "inCooldown",6153 "revocable"6154 ],6155 "additionalProperties": {}6156 },6157 "description": "the API's own table: a copy"6158 },6159 "sessions": {6160 "type": "array",6161 "items": {6162 "type": "object",6163 "properties": {6164 "created_at": {6165 "type": "string",6166 "description": "date-time, ISO 8601, UTC"6167 },6168 "last_seen": {6169 "type": "string",6170 "description": "date-time, ISO 8601, UTC"6171 },6172 "ua": {6173 "type": "string"6174 },6175 "ip": {6176 "type": "string"6177 },6178 "id": {6179 "type": "string",6180 "format": "uuid",6181 "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",6182 "description": "PUBLIC id of the session (never derived from its token): what POST /security/sessions/{id}/revoke takes"6183 },6184 "current": {6185 "type": "boolean"6186 },6187 "device": {6188 "type": "string",6189 "description": "coarse label: browser · system"6190 },6191 "credential": {6192 "description": "12-character prefix of the passkey that opened it; null for a session older than NEXT",6193 "type": [6194 "string",6195 "null"6196 ]6197 }6198 },6199 "required": [6200 "created_at",6201 "last_seen",6202 "ua",6203 "ip",6204 "id",6205 "current",6206 "device",6207 "credential"6208 ],6209 "additionalProperties": {}6210 }6211 },6212 "origin": {6213 "type": "string"6214 },6215 "broadcast": {6216 "type": "boolean"6217 },6218 "signerCredentials": {6219 "anyOf": [6220 {6221 "type": "array",6222 "items": {6223 "type": "object",6224 "properties": {6225 "id": {6226 "type": "string"6227 },6228 "createdAt": {6229 "type": "string",6230 "description": "date-time, ISO 8601, UTC"6231 },6232 "lastUsedAt": {6233 "anyOf": [6234 {6235 "type": "string",6236 "description": "date-time, ISO 8601, UTC"6237 },6238 {6239 "type": "null"6240 }6241 ]6242 },6243 "inCooldown": {6244 "type": "boolean"6245 },6246 "cooldownUntil": {6247 "description": "Unix seconds",6248 "type": [6249 "number",6250 "null"6251 ]6252 },6253 "known": {6254 "type": "boolean",6255 "description": "false: pinned on the signer with no row in the API — it can approve and is listed nowhere else"6256 },6257 "label": {6258 "type": [6259 "string",6260 "null"6261 ]6262 },6263 "revocable": {6264 "type": "boolean"6265 }6266 },6267 "required": [6268 "id",6269 "createdAt",6270 "lastUsedAt",6271 "inCooldown",6272 "cooldownUntil",6273 "known",6274 "label",6275 "revocable"6276 ],6277 "additionalProperties": {}6278 }6279 },6280 {6281 "type": "null"6282 }6283 ],6284 "description": "the SIGNER's list — the source of truth for who can approve; null when it cannot be reached"6285 },6286 "mismatch": {6287 "anyOf": [6288 {6289 "type": "array",6290 "items": {6291 "type": "object",6292 "properties": {6293 "id": {6294 "type": "string"6295 },6296 "side": {6297 "type": "string",6298 "enum": [6299 "signer",6300 "api"6301 ]6302 }6303 },6304 "required": [6305 "id",6306 "side"6307 ],6308 "additionalProperties": {}6309 }6310 },6311 {6312 "type": "null"6313 }6314 ],6315 "description": "credential ids known to one side only; null when the signer cannot be reached"6316 },6317 "currentSessionId": {6318 "anyOf": [6319 {6320 "type": "string",6321 "format": "uuid",6322 "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"6323 },6324 {6325 "type": "null"6326 }6327 ]6328 }6329 },6330 "required": [6331 "signer",6332 "devices",6333 "sessions",6334 "origin",6335 "broadcast",6336 "signerCredentials",6337 "mismatch",6338 "currentSessionId"6339 ],6340 "additionalProperties": {}6341 }6342 }6343 }6344 },6345 "401": {6346 "description": "No valid session: `unauthenticated`",6347 "content": {6348 "application/json": {6349 "schema": {6350 "$ref": "#/components/schemas/Error"6351 }6352 }6353 }6354 },6355 "429": {6356 "description": "Too many requests: `rate_limited`",6357 "content": {6358 "application/json": {6359 "schema": {6360 "$ref": "#/components/schemas/Error"6361 }6362 }6363 }6364 },6365 "500": {6366 "description": "Server error: `internal`",6367 "content": {6368 "application/json": {6369 "schema": {6370 "$ref": "#/components/schemas/Error"6371 }6372 }6373 }6374 }6375 }6376 }6377 },6378 "/api/v1/security/logins": {6379 "get": {6380 "operationId": "listLogins",6381 "tags": [6382 "Security"6383 ],6384 "summary": "The last sign-ins",6385 "description": "From the audit chain (`login.ok`), newest first. Members a record written before NEXT does not carry are null.",6386 "security": [6387 {6388 "session": []6389 }6390 ],6391 "x-spw-auth": "session",6392 "x-spw-csrf": false,6393 "x-spw-since": "next",6394 "x-spw-errors": [6395 {6396 "status": 400,6397 "code": "bad_request"6398 },6399 {6400 "status": 401,6401 "code": "unauthenticated"6402 },6403 {6404 "status": 429,6405 "code": "rate_limited"6406 },6407 {6408 "status": 500,6409 "code": "internal"6410 }6411 ],6412 "parameters": [6413 {6414 "name": "limit",6415 "in": "query",6416 "required": false,6417 "description": "rows returned at most",6418 "schema": {6419 "default": 20,6420 "type": "integer",6421 "minimum": 1,6422 "maximum": 2006423 }6424 }6425 ],6426 "responses": {6427 "200": {6428 "description": "OK",6429 "content": {6430 "application/json": {6431 "schema": {6432 "type": "object",6433 "properties": {6434 "logins": {6435 "type": "array",6436 "items": {6437 "type": "object",6438 "properties": {6439 "seq": {6440 "type": "integer",6441 "minimum": -9007199254740991,6442 "maximum": 90071992547409916443 },6444 "at": {6445 "type": "string",6446 "description": "date-time, ISO 8601, UTC"6447 },6448 "credential": {6449 "type": [6450 "string",6451 "null"6452 ]6453 },6454 "label": {6455 "type": [6456 "string",6457 "null"6458 ]6459 },6460 "ip": {6461 "type": [6462 "string",6463 "null"6464 ]6465 },6466 "device": {6467 "type": [6468 "string",6469 "null"6470 ]6471 },6472 "newDevice": {6473 "description": "no session had ever been opened with this user agent",6474 "type": [6475 "boolean",6476 "null"6477 ]6478 },6479 "session": {6480 "type": [6481 "string",6482 "null"6483 ]6484 }6485 },6486 "required": [6487 "seq",6488 "at",6489 "credential",6490 "label",6491 "ip",6492 "device",6493 "newDevice",6494 "session"6495 ],6496 "additionalProperties": {}6497 }6498 }6499 },6500 "required": [6501 "logins"6502 ],6503 "additionalProperties": {}6504 }6505 }6506 }6507 },6508 "400": {6509 "description": "The request is not valid: `bad_request`",6510 "content": {6511 "application/json": {6512 "schema": {6513 "$ref": "#/components/schemas/Error"6514 }6515 }6516 }6517 },6518 "401": {6519 "description": "No valid session: `unauthenticated`",6520 "content": {6521 "application/json": {6522 "schema": {6523 "$ref": "#/components/schemas/Error"6524 }6525 }6526 }6527 },6528 "429": {6529 "description": "Too many requests: `rate_limited`",6530 "content": {6531 "application/json": {6532 "schema": {6533 "$ref": "#/components/schemas/Error"6534 }6535 }6536 }6537 },6538 "500": {6539 "description": "Server error: `internal`",6540 "content": {6541 "application/json": {6542 "schema": {6543 "$ref": "#/components/schemas/Error"6544 }6545 }6546 }6547 }6548 }6549 }6550 },6551 "/api/v1/security/audit": {6552 "get": {6553 "operationId": "securityAudit",6554 "tags": [6555 "Security"6556 ],6557 "summary": "The audit hash chain, newest first",6558 "security": [6559 {6560 "session": []6561 }6562 ],6563 "x-spw-auth": "session",6564 "x-spw-csrf": false,6565 "x-spw-errors": [6566 {6567 "status": 400,6568 "code": "bad_request"6569 },6570 {6571 "status": 401,6572 "code": "unauthenticated"6573 },6574 {6575 "status": 429,6576 "code": "rate_limited"6577 },6578 {6579 "status": 500,6580 "code": "internal"6581 }6582 ],6583 "parameters": [6584 {6585 "name": "limit",6586 "in": "query",6587 "required": false,6588 "description": "rows returned at most",6589 "schema": {6590 "default": 100,6591 "type": "integer",6592 "minimum": 1,6593 "maximum": 5006594 }6595 }6596 ],6597 "responses": {6598 "200": {6599 "description": "OK",6600 "content": {6601 "application/json": {6602 "schema": {6603 "type": "object",6604 "properties": {6605 "events": {6606 "type": "array",6607 "items": {6608 "type": "object",6609 "properties": {6610 "seq": {6611 "type": "integer",6612 "minimum": -9007199254740991,6613 "maximum": 90071992547409916614 },6615 "ts": {6616 "type": "string",6617 "description": "date-time, ISO 8601, UTC"6618 },6619 "type": {6620 "type": "string"6621 },6622 "actor": {6623 "type": "string"6624 },6625 "data": {6626 "type": "object",6627 "properties": {},6628 "additionalProperties": {}6629 },6630 "prev": {6631 "type": "string"6632 },6633 "hash": {6634 "type": "string"6635 }6636 },6637 "required": [6638 "seq",6639 "ts",6640 "type",6641 "actor",6642 "data",6643 "prev",6644 "hash"6645 ],6646 "additionalProperties": {}6647 }6648 },6649 "intact": {6650 "type": "boolean"6651 },6652 "brokenAt": {6653 "type": [6654 "number",6655 "null"6656 ]6657 },6658 "total": {6659 "type": "integer",6660 "minimum": -9007199254740991,6661 "maximum": 90071992547409916662 }6663 },6664 "required": [6665 "events",6666 "intact",6667 "brokenAt",6668 "total"6669 ],6670 "additionalProperties": {}6671 }6672 }6673 }6674 },6675 "400": {6676 "description": "The request is not valid: `bad_request`",6677 "content": {6678 "application/json": {6679 "schema": {6680 "$ref": "#/components/schemas/Error"6681 }6682 }6683 }6684 },6685 "401": {6686 "description": "No valid session: `unauthenticated`",6687 "content": {6688 "application/json": {6689 "schema": {6690 "$ref": "#/components/schemas/Error"6691 }6692 }6693 }6694 },6695 "429": {6696 "description": "Too many requests: `rate_limited`",6697 "content": {6698 "application/json": {6699 "schema": {6700 "$ref": "#/components/schemas/Error"6701 }6702 }6703 }6704 },6705 "500": {6706 "description": "Server error: `internal`",6707 "content": {6708 "application/json": {6709 "schema": {6710 "$ref": "#/components/schemas/Error"6711 }6712 }6713 }6714 }6715 }6716 }6717 },6718 "/api/v1/security/devices": {6719 "get": {6720 "operationId": "listDevices",6721 "tags": [6722 "Security"6723 ],6724 "summary": "Passkeys known to the API",6725 "security": [6726 {6727 "session": []6728 }6729 ],6730 "x-spw-auth": "session",6731 "x-spw-csrf": false,6732 "x-spw-errors": [6733 {6734 "status": 401,6735 "code": "unauthenticated"6736 },6737 {6738 "status": 429,6739 "code": "rate_limited"6740 },6741 {6742 "status": 500,6743 "code": "internal"6744 }6745 ],6746 "parameters": [],6747 "responses": {6748 "200": {6749 "description": "OK",6750 "content": {6751 "application/json": {6752 "schema": {6753 "type": "array",6754 "items": {6755 "type": "object",6756 "properties": {6757 "id": {6758 "type": "string"6759 },6760 "label": {6761 "type": "string"6762 },6763 "createdAt": {6764 "type": "string",6765 "description": "date-time, ISO 8601, UTC"6766 },6767 "lastUsedAt": {6768 "anyOf": [6769 {6770 "type": "string",6771 "description": "date-time, ISO 8601, UTC"6772 },6773 {6774 "type": "null"6775 }6776 ]6777 }6778 },6779 "required": [6780 "id",6781 "label",6782 "createdAt",6783 "lastUsedAt"6784 ],6785 "additionalProperties": {}6786 }6787 }6788 }6789 }6790 },6791 "401": {6792 "description": "No valid session: `unauthenticated`",6793 "content": {6794 "application/json": {6795 "schema": {6796 "$ref": "#/components/schemas/Error"6797 }6798 }6799 }6800 },6801 "429": {6802 "description": "Too many requests: `rate_limited`",6803 "content": {6804 "application/json": {6805 "schema": {6806 "$ref": "#/components/schemas/Error"6807 }6808 }6809 }6810 },6811 "500": {6812 "description": "Server error: `internal`",6813 "content": {6814 "application/json": {6815 "schema": {6816 "$ref": "#/components/schemas/Error"6817 }6818 }6819 }6820 }6821 }6822 }6823 },6824 "/api/v1/security/devices/options": {6825 "post": {6826 "operationId": "deviceOptions",6827 "tags": [6828 "Security"6829 ],6830 "summary": "Add a passkey, step 1: creation options",6831 "security": [6832 {6833 "session": []6834 }6835 ],6836 "x-spw-auth": "session",6837 "x-spw-csrf": true,6838 "x-spw-errors": [6839 {6840 "status": 400,6841 "code": "bad_request"6842 },6843 {6844 "status": 401,6845 "code": "unauthenticated"6846 },6847 {6848 "status": 403,6849 "code": "csrf"6850 },6851 {6852 "status": 429,6853 "code": "rate_limited"6854 },6855 {6856 "status": 500,6857 "code": "internal"6858 }6859 ],6860 "parameters": [],6861 "responses": {6862 "200": {6863 "description": "OK",6864 "content": {6865 "application/json": {6866 "schema": {6867 "type": "object",6868 "properties": {6869 "challengeId": {6870 "type": "string",6871 "format": "uuid",6872 "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"6873 },6874 "options": {6875 "type": "object",6876 "properties": {},6877 "additionalProperties": {},6878 "description": "WebAuthn options (PublicKeyCredentialRequestOptions / CreationOptions as JSON), to hand to the platform API"6879 }6880 },6881 "required": [6882 "challengeId",6883 "options"6884 ],6885 "additionalProperties": {}6886 }6887 }6888 }6889 },6890 "400": {6891 "description": "The request is not valid: `bad_request`",6892 "content": {6893 "application/json": {6894 "schema": {6895 "$ref": "#/components/schemas/Error"6896 }6897 }6898 }6899 },6900 "401": {6901 "description": "No valid session: `unauthenticated`",6902 "content": {6903 "application/json": {6904 "schema": {6905 "$ref": "#/components/schemas/Error"6906 }6907 }6908 }6909 },6910 "403": {6911 "description": "Refused: `csrf`",6912 "content": {6913 "application/json": {6914 "schema": {6915 "$ref": "#/components/schemas/Error"6916 }6917 }6918 }6919 },6920 "429": {6921 "description": "Too many requests: `rate_limited`",6922 "content": {6923 "application/json": {6924 "schema": {6925 "$ref": "#/components/schemas/Error"6926 }6927 }6928 }6929 },6930 "500": {6931 "description": "Server error: `internal`",6932 "content": {6933 "application/json": {6934 "schema": {6935 "$ref": "#/components/schemas/Error"6936 }6937 }6938 }6939 }6940 }6941 }6942 },6943 "/api/v1/security/devices/verify": {6944 "post": {6945 "operationId": "deviceVerify",6946 "tags": [6947 "Security"6948 ],6949 "summary": "Add a passkey, step 2: verify the new passkey, get the request an ENROLLED passkey must approve",6950 "description": "The server builds an `add` credential request (valid 5 minutes, single use). A client that signs `options` as returned works unchanged; one that recomputed the pre-NEXT `SPW-ENROLL-v1` challenge must be updated.",6951 "security": [6952 {6953 "session": []6954 }6955 ],6956 "x-spw-auth": "session",6957 "x-spw-csrf": true,6958 "x-spw-errors": [6959 {6960 "status": 400,6961 "code": "bad_request"6962 },6963 {6964 "status": 401,6965 "code": "challenge_expired"6966 },6967 {6968 "status": 401,6969 "code": "registration_failed"6970 },6971 {6972 "status": 401,6973 "code": "unauthenticated"6974 },6975 {6976 "status": 403,6977 "code": "csrf"6978 },6979 {6980 "status": 429,6981 "code": "rate_limited"6982 },6983 {6984 "status": 500,6985 "code": "internal"6986 },6987 {6988 "status": 503,6989 "code": "signer_unreachable"6990 }6991 ],6992 "x-spw-errors-open": true,6993 "parameters": [],6994 "requestBody": {6995 "required": true,6996 "content": {6997 "application/json": {6998 "schema": {6999 "type": "object",7000 "properties": {7001 "challengeId": {7002 "type": "string",7003 "format": "uuid",7004 "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"7005 },7006 "response": {7007 "description": "the WebAuthn registration response"7008 },7009 "setupToken": {7010 "type": "string",7011 "minLength": 8,7012 "maxLength": 1007013 },7014 "label": {7015 "type": "string",7016 "maxLength": 407017 }7018 },7019 "required": [7020 "challengeId",7021 "response"7022 ]7023 }7024 }7025 }7026 },7027 "responses": {7028 "200": {7029 "description": "OK",7030 "content": {7031 "application/json": {7032 "schema": {7033 "type": "object",7034 "properties": {7035 "pendingId": {7036 "type": "string"7037 },7038 "options": {7039 "type": "object",7040 "properties": {},7041 "additionalProperties": {},7042 "description": "assertion options: challenge = SHA-256 of `request`; allowCredentials = the passkeys that may approve (on the signer, out of cool-down, not the new one)"7043 },7044 "request": {7045 "$ref": "#/components/schemas/CredentialRequest"7046 }7047 },7048 "required": [7049 "pendingId",7050 "options",7051 "request"7052 ],7053 "additionalProperties": {}7054 }7055 }7056 }7057 },7058 "400": {7059 "description": "The request is not valid: `bad_request`",7060 "content": {7061 "application/json": {7062 "schema": {7063 "$ref": "#/components/schemas/Error"7064 }7065 }7066 }7067 },7068 "401": {7069 "description": "No valid session: `challenge_expired`, `registration_failed`, `unauthenticated`",7070 "content": {7071 "application/json": {7072 "schema": {7073 "$ref": "#/components/schemas/Error"7074 }7075 }7076 }7077 },7078 "403": {7079 "description": "Refused: `csrf`",7080 "content": {7081 "application/json": {7082 "schema": {7083 "$ref": "#/components/schemas/Error"7084 }7085 }7086 }7087 },7088 "429": {7089 "description": "Too many requests: `rate_limited`",7090 "content": {7091 "application/json": {7092 "schema": {7093 "$ref": "#/components/schemas/Error"7094 }7095 }7096 }7097 },7098 "500": {7099 "description": "Server error: `internal`",7100 "content": {7101 "application/json": {7102 "schema": {7103 "$ref": "#/components/schemas/Error"7104 }7105 }7106 }7107 },7108 "503": {7109 "description": "A backing service is unavailable; nothing was done: `signer_unreachable`",7110 "content": {7111 "application/json": {7112 "schema": {7113 "$ref": "#/components/schemas/Error"7114 }7115 }7116 }7117 }7118 }7119 }7120 },7121 "/api/v1/security/devices/confirm": {7122 "post": {7123 "operationId": "deviceConfirm",7124 "tags": [7125 "Security"7126 ],7127 "summary": "Add a passkey, step 3: the enrolled passkey's assertion; the signer verifies it and pins the new passkey",7128 "description": "Refusals are the signer's own: `signer_bad_approval`, `signer_expired`, `signer_cooldown` (the approving passkey was added too recently), `signer_self_approval`… A lost answer is safe to repeat: when the signer says the request was already applied and lists the passkey, the call succeeds.",7129 "security": [7130 {7131 "session": []7132 }7133 ],7134 "x-spw-auth": "session",7135 "x-spw-csrf": true,7136 "x-spw-errors": [7137 {7138 "status": 400,7139 "code": "bad_request"7140 },7141 {7142 "status": 400,7143 "code": "expired"7144 },7145 {7146 "status": 401,7147 "code": "unauthenticated"7148 },7149 {7150 "status": 403,7151 "code": "csrf"7152 },7153 {7154 "status": 429,7155 "code": "rate_limited"7156 },7157 {7158 "status": 500,7159 "code": "internal"7160 },7161 {7162 "status": 503,7163 "code": "signer_unreachable"7164 }7165 ],7166 "x-spw-errors-open": true,7167 "parameters": [],7168 "requestBody": {7169 "required": true,7170 "content": {7171 "application/json": {7172 "schema": {7173 "type": "object",7174 "properties": {7175 "pendingId": {7176 "type": "string",7177 "maxLength": 10247178 },7179 "assertion": {}7180 },7181 "required": [7182 "pendingId",7183 "assertion"7184 ]7185 }7186 }7187 }7188 },7189 "responses": {7190 "200": {7191 "description": "OK",7192 "content": {7193 "application/json": {7194 "schema": {7195 "type": "object",7196 "properties": {7197 "ok": {7198 "type": "boolean",7199 "const": true7200 }7201 },7202 "required": [7203 "ok"7204 ],7205 "additionalProperties": {}7206 }7207 }7208 }7209 },7210 "400": {7211 "description": "The request is not valid: `bad_request`, `expired`",7212 "content": {7213 "application/json": {7214 "schema": {7215 "$ref": "#/components/schemas/Error"7216 }7217 }7218 }7219 },7220 "401": {7221 "description": "No valid session: `unauthenticated`",7222 "content": {7223 "application/json": {7224 "schema": {7225 "$ref": "#/components/schemas/Error"7226 }7227 }7228 }7229 },7230 "403": {7231 "description": "Refused: `csrf`",7232 "content": {7233 "application/json": {7234 "schema": {7235 "$ref": "#/components/schemas/Error"7236 }7237 }7238 }7239 },7240 "429": {7241 "description": "Too many requests: `rate_limited`",7242 "content": {7243 "application/json": {7244 "schema": {7245 "$ref": "#/components/schemas/Error"7246 }7247 }7248 }7249 },7250 "500": {7251 "description": "Server error: `internal`",7252 "content": {7253 "application/json": {7254 "schema": {7255 "$ref": "#/components/schemas/Error"7256 }7257 }7258 }7259 },7260 "503": {7261 "description": "A backing service is unavailable; nothing was done: `signer_unreachable`",7262 "content": {7263 "application/json": {7264 "schema": {7265 "$ref": "#/components/schemas/Error"7266 }7267 }7268 }7269 }7270 }7271 }7272 },7273 "/api/v1/security/devices/revoke/options": {7274 "post": {7275 "operationId": "revokeDeviceOptions",7276 "tags": [7277 "Security"7278 ],7279 "summary": "Revoke a passkey, step 1: the request ANOTHER enrolled passkey must approve",7280 "security": [7281 {7282 "session": []7283 }7284 ],7285 "x-spw-auth": "session",7286 "x-spw-csrf": true,7287 "x-spw-since": "next",7288 "x-spw-errors": [7289 {7290 "status": 400,7291 "code": "bad_request"7292 },7293 {7294 "status": 401,7295 "code": "unauthenticated"7296 },7297 {7298 "status": 403,7299 "code": "csrf"7300 },7301 {7302 "status": 404,7303 "code": "not_found"7304 },7305 {7306 "status": 409,7307 "code": "last_credential"7308 },7309 {7310 "status": 409,7311 "code": "no_approver"7312 },7313 {7314 "status": 429,7315 "code": "rate_limited"7316 },7317 {7318 "status": 500,7319 "code": "internal"7320 },7321 {7322 "status": 503,7323 "code": "signer_unreachable"7324 }7325 ],7326 "x-spw-errors-open": true,7327 "parameters": [],7328 "requestBody": {7329 "required": true,7330 "content": {7331 "application/json": {7332 "schema": {7333 "type": "object",7334 "properties": {7335 "credentialId": {7336 "type": "string",7337 "minLength": 16,7338 "maxLength": 1024,7339 "description": "`devices[].credentialId` or `signerCredentials[].id` of the overview"7340 }7341 },7342 "required": [7343 "credentialId"7344 ],7345 "additionalProperties": false7346 }7347 }7348 }7349 },7350 "responses": {7351 "200": {7352 "description": "OK",7353 "content": {7354 "application/json": {7355 "schema": {7356 "type": "object",7357 "properties": {7358 "challengeId": {7359 "type": "string",7360 "format": "uuid",7361 "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"7362 },7363 "request": {7364 "$ref": "#/components/schemas/CredentialRequest"7365 },7366 "options": {7367 "type": "object",7368 "properties": {},7369 "additionalProperties": {},7370 "description": "assertion options: challenge = SHA-256 of `request`; allowCredentials never contains the passkey being revoked"7371 }7372 },7373 "required": [7374 "challengeId",7375 "request",7376 "options"7377 ],7378 "additionalProperties": {}7379 }7380 }7381 }7382 },7383 "400": {7384 "description": "The request is not valid: `bad_request`",7385 "content": {7386 "application/json": {7387 "schema": {7388 "$ref": "#/components/schemas/Error"7389 }7390 }7391 }7392 },7393 "401": {7394 "description": "No valid session: `unauthenticated`",7395 "content": {7396 "application/json": {7397 "schema": {7398 "$ref": "#/components/schemas/Error"7399 }7400 }7401 }7402 },7403 "403": {7404 "description": "Refused: `csrf`",7405 "content": {7406 "application/json": {7407 "schema": {7408 "$ref": "#/components/schemas/Error"7409 }7410 }7411 }7412 },7413 "404": {7414 "description": "The object does not exist: `not_found`",7415 "content": {7416 "application/json": {7417 "schema": {7418 "$ref": "#/components/schemas/Error"7419 }7420 }7421 }7422 },7423 "409": {7424 "description": "Conflicts with the state of the object: `last_credential`, `no_approver`",7425 "content": {7426 "application/json": {7427 "schema": {7428 "$ref": "#/components/schemas/Error"7429 }7430 }7431 }7432 },7433 "429": {7434 "description": "Too many requests: `rate_limited`",7435 "content": {7436 "application/json": {7437 "schema": {7438 "$ref": "#/components/schemas/Error"7439 }7440 }7441 }7442 },7443 "500": {7444 "description": "Server error: `internal`",7445 "content": {7446 "application/json": {7447 "schema": {7448 "$ref": "#/components/schemas/Error"7449 }7450 }7451 }7452 },7453 "503": {7454 "description": "A backing service is unavailable; nothing was done: `signer_unreachable`",7455 "content": {7456 "application/json": {7457 "schema": {7458 "$ref": "#/components/schemas/Error"7459 }7460 }7461 }7462 }7463 }7464 }7465 },7466 "/api/v1/security/devices/revoke/confirm": {7467 "post": {7468 "operationId": "revokeDeviceConfirm",7469 "tags": [7470 "Security"7471 ],7472 "summary": "Revoke a passkey, step 2: the approval; the signer removes it, its sessions end",7473 "description": "The challenge is single use. The signer judges the approval (`signer_bad_approval`, `signer_cooldown`, `signer_last_credential`…). A row the signer does not list is removed on the API's own verification of the same request by a passkey the signer does list (`bad_approval` otherwise).",7474 "security": [7475 {7476 "session": []7477 }7478 ],7479 "x-spw-auth": "session",7480 "x-spw-csrf": true,7481 "x-spw-since": "next",7482 "x-spw-errors": [7483 {7484 "status": 400,7485 "code": "bad_request"7486 },7487 {7488 "status": 400,7489 "code": "self_approval"7490 },7491 {7492 "status": 401,7493 "code": "challenge_expired"7494 },7495 {7496 "status": 401,7497 "code": "unauthenticated"7498 },7499 {7500 "status": 403,7501 "code": "csrf"7502 },7503 {7504 "status": 422,7505 "code": "bad_approval"7506 },7507 {7508 "status": 429,7509 "code": "rate_limited"7510 },7511 {7512 "status": 500,7513 "code": "internal"7514 },7515 {7516 "status": 503,7517 "code": "signer_unreachable"7518 }7519 ],7520 "x-spw-errors-open": true,7521 "parameters": [],7522 "requestBody": {7523 "required": true,7524 "content": {7525 "application/json": {7526 "schema": {7527 "type": "object",7528 "properties": {7529 "challengeId": {7530 "type": "string",7531 "format": "uuid",7532 "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"7533 },7534 "assertion": {}7535 },7536 "required": [7537 "challengeId",7538 "assertion"7539 ]7540 }7541 }7542 }7543 },7544 "responses": {7545 "200": {7546 "description": "OK",7547 "content": {7548 "application/json": {7549 "schema": {7550 "type": "object",7551 "properties": {7552 "ok": {7553 "type": "boolean",7554 "const": true7555 },7556 "signer": {7557 "type": "boolean",7558 "description": "true: the passkey was on the signer's list and the signer removed it; false: only the API's row existed"7559 },7560 "sessionsRevoked": {7561 "type": "integer",7562 "minimum": -9007199254740991,7563 "maximum": 90071992547409917564 }7565 },7566 "required": [7567 "ok",7568 "signer",7569 "sessionsRevoked"7570 ],7571 "additionalProperties": {}7572 }7573 }7574 }7575 },7576 "400": {7577 "description": "The request is not valid: `bad_request`, `self_approval`",7578 "content": {7579 "application/json": {7580 "schema": {7581 "$ref": "#/components/schemas/Error"7582 }7583 }7584 }7585 },7586 "401": {7587 "description": "No valid session: `challenge_expired`, `unauthenticated`",7588 "content": {7589 "application/json": {7590 "schema": {7591 "$ref": "#/components/schemas/Error"7592 }7593 }7594 }7595 },7596 "403": {7597 "description": "Refused: `csrf`",7598 "content": {7599 "application/json": {7600 "schema": {7601 "$ref": "#/components/schemas/Error"7602 }7603 }7604 }7605 },7606 "422": {7607 "description": "A valid request that cannot be carried out: `bad_approval`",7608 "content": {7609 "application/json": {7610 "schema": {7611 "$ref": "#/components/schemas/Error"7612 }7613 }7614 }7615 },7616 "429": {7617 "description": "Too many requests: `rate_limited`",7618 "content": {7619 "application/json": {7620 "schema": {7621 "$ref": "#/components/schemas/Error"7622 }7623 }7624 }7625 },7626 "500": {7627 "description": "Server error: `internal`",7628 "content": {7629 "application/json": {7630 "schema": {7631 "$ref": "#/components/schemas/Error"7632 }7633 }7634 }7635 },7636 "503": {7637 "description": "A backing service is unavailable; nothing was done: `signer_unreachable`",7638 "content": {7639 "application/json": {7640 "schema": {7641 "$ref": "#/components/schemas/Error"7642 }7643 }7644 }7645 }7646 }7647 }7648 },7649 "/api/v1/security/sessions/revoke-all": {7650 "post": {7651 "operationId": "revokeAllSessions",7652 "tags": [7653 "Security"7654 ],7655 "summary": "Revoke every session, this one included",7656 "security": [7657 {7658 "session": []7659 }7660 ],7661 "x-spw-auth": "session",7662 "x-spw-csrf": true,7663 "x-spw-errors": [7664 {7665 "status": 400,7666 "code": "bad_request"7667 },7668 {7669 "status": 401,7670 "code": "unauthenticated"7671 },7672 {7673 "status": 403,7674 "code": "csrf"7675 },7676 {7677 "status": 429,7678 "code": "rate_limited"7679 },7680 {7681 "status": 500,7682 "code": "internal"7683 }7684 ],7685 "parameters": [],7686 "responses": {7687 "200": {7688 "description": "OK",7689 "content": {7690 "application/json": {7691 "schema": {7692 "type": "object",7693 "properties": {7694 "ok": {7695 "type": "boolean",7696 "const": true7697 }7698 },7699 "required": [7700 "ok"7701 ],7702 "additionalProperties": {}7703 }7704 }7705 }7706 },7707 "400": {7708 "description": "The request is not valid: `bad_request`",7709 "content": {7710 "application/json": {7711 "schema": {7712 "$ref": "#/components/schemas/Error"7713 }7714 }7715 }7716 },7717 "401": {7718 "description": "No valid session: `unauthenticated`",7719 "content": {7720 "application/json": {7721 "schema": {7722 "$ref": "#/components/schemas/Error"7723 }7724 }7725 }7726 },7727 "403": {7728 "description": "Refused: `csrf`",7729 "content": {7730 "application/json": {7731 "schema": {7732 "$ref": "#/components/schemas/Error"7733 }7734 }7735 }7736 },7737 "429": {7738 "description": "Too many requests: `rate_limited`",7739 "content": {7740 "application/json": {7741 "schema": {7742 "$ref": "#/components/schemas/Error"7743 }7744 }7745 }7746 },7747 "500": {7748 "description": "Server error: `internal`",7749 "content": {7750 "application/json": {7751 "schema": {7752 "$ref": "#/components/schemas/Error"7753 }7754 }7755 }7756 }7757 }7758 }7759 },7760 "/api/v1/security/sessions/{id}/revoke": {7761 "post": {7762 "operationId": "revokeSession",7763 "tags": [7764 "Security"7765 ],7766 "summary": "Revoke one session by its public id",7767 "security": [7768 {7769 "session": []7770 }7771 ],7772 "x-spw-auth": "session",7773 "x-spw-csrf": true,7774 "x-spw-since": "next",7775 "x-spw-errors": [7776 {7777 "status": 400,7778 "code": "bad_request"7779 },7780 {7781 "status": 401,7782 "code": "unauthenticated"7783 },7784 {7785 "status": 403,7786 "code": "csrf"7787 },7788 {7789 "status": 404,7790 "code": "not_found"7791 },7792 {7793 "status": 429,7794 "code": "rate_limited"7795 },7796 {7797 "status": 500,7798 "code": "internal"7799 }7800 ],7801 "parameters": [7802 {7803 "name": "id",7804 "in": "path",7805 "required": true,7806 "description": "the id returned by the creation or by a list",7807 "schema": {7808 "type": "string"7809 }7810 }7811 ],7812 "responses": {7813 "200": {7814 "description": "OK",7815 "content": {7816 "application/json": {7817 "schema": {7818 "type": "object",7819 "properties": {7820 "ok": {7821 "type": "boolean",7822 "const": true7823 },7824 "current": {7825 "type": "boolean",7826 "description": "true: it was this session; its cookie is cleared"7827 }7828 },7829 "required": [7830 "ok",7831 "current"7832 ],7833 "additionalProperties": {}7834 }7835 }7836 }7837 },7838 "400": {7839 "description": "The request is not valid: `bad_request`",7840 "content": {7841 "application/json": {7842 "schema": {7843 "$ref": "#/components/schemas/Error"7844 }7845 }7846 }7847 },7848 "401": {7849 "description": "No valid session: `unauthenticated`",7850 "content": {7851 "application/json": {7852 "schema": {7853 "$ref": "#/components/schemas/Error"7854 }7855 }7856 }7857 },7858 "403": {7859 "description": "Refused: `csrf`",7860 "content": {7861 "application/json": {7862 "schema": {7863 "$ref": "#/components/schemas/Error"7864 }7865 }7866 }7867 },7868 "404": {7869 "description": "The object does not exist: `not_found`",7870 "content": {7871 "application/json": {7872 "schema": {7873 "$ref": "#/components/schemas/Error"7874 }7875 }7876 }7877 },7878 "429": {7879 "description": "Too many requests: `rate_limited`",7880 "content": {7881 "application/json": {7882 "schema": {7883 "$ref": "#/components/schemas/Error"7884 }7885 }7886 }7887 },7888 "500": {7889 "description": "Server error: `internal`",7890 "content": {7891 "application/json": {7892 "schema": {7893 "$ref": "#/components/schemas/Error"7894 }7895 }7896 }7897 }7898 }7899 }7900 },7901 "/api/v1/security/emergency-halt": {7902 "post": {7903 "operationId": "emergencyHalt",7904 "tags": [7905 "Security"7906 ],7907 "summary": "Trigger the emergency halt of the signer",7908 "description": "One-way from the app: lifting the halt requires the command line on the signer machine.",7909 "security": [7910 {7911 "session": []7912 }7913 ],7914 "x-spw-auth": "session",7915 "x-spw-csrf": true,7916 "x-spw-errors": [7917 {7918 "status": 400,7919 "code": "bad_request"7920 },7921 {7922 "status": 401,7923 "code": "unauthenticated"7924 },7925 {7926 "status": 403,7927 "code": "csrf"7928 },7929 {7930 "status": 429,7931 "code": "rate_limited"7932 },7933 {7934 "status": 500,7935 "code": "internal"7936 },7937 {7938 "status": 503,7939 "code": "signer_unreachable"7940 }7941 ],7942 "x-spw-errors-open": true,7943 "parameters": [],7944 "responses": {7945 "200": {7946 "description": "OK",7947 "content": {7948 "application/json": {7949 "schema": {7950 "type": "object",7951 "properties": {7952 "ok": {7953 "type": "boolean",7954 "const": true7955 },7956 "halted": {7957 "type": "boolean",7958 "const": true7959 }7960 },7961 "required": [7962 "ok",7963 "halted"7964 ],7965 "additionalProperties": {}7966 }7967 }7968 }7969 },7970 "400": {7971 "description": "The request is not valid: `bad_request`",7972 "content": {7973 "application/json": {7974 "schema": {7975 "$ref": "#/components/schemas/Error"7976 }7977 }7978 }7979 },7980 "401": {7981 "description": "No valid session: `unauthenticated`",7982 "content": {7983 "application/json": {7984 "schema": {7985 "$ref": "#/components/schemas/Error"7986 }7987 }7988 }7989 },7990 "403": {7991 "description": "Refused: `csrf`",7992 "content": {7993 "application/json": {7994 "schema": {7995 "$ref": "#/components/schemas/Error"7996 }7997 }7998 }7999 },8000 "429": {8001 "description": "Too many requests: `rate_limited`",8002 "content": {8003 "application/json": {8004 "schema": {8005 "$ref": "#/components/schemas/Error"8006 }8007 }8008 }8009 },8010 "500": {8011 "description": "Server error: `internal`",8012 "content": {8013 "application/json": {8014 "schema": {8015 "$ref": "#/components/schemas/Error"8016 }8017 }8018 }8019 },8020 "503": {8021 "description": "A backing service is unavailable; nothing was done: `signer_unreachable`",8022 "content": {8023 "application/json": {8024 "schema": {8025 "$ref": "#/components/schemas/Error"8026 }8027 }8028 }8029 }8030 }8031 }8032 },8033 "/api/v1/alerts": {8034 "get": {8035 "operationId": "listAlerts",8036 "tags": [8037 "Alerts"8038 ],8039 "summary": "In-app alerts, newest first",8040 "security": [8041 {8042 "session": []8043 }8044 ],8045 "x-spw-auth": "session",8046 "x-spw-csrf": false,8047 "x-spw-errors": [8048 {8049 "status": 400,8050 "code": "bad_request"8051 },8052 {8053 "status": 401,8054 "code": "unauthenticated"8055 },8056 {8057 "status": 429,8058 "code": "rate_limited"8059 },8060 {8061 "status": 500,8062 "code": "internal"8063 }8064 ],8065 "parameters": [8066 {8067 "name": "limit",8068 "in": "query",8069 "required": false,8070 "description": "rows returned at most",8071 "schema": {8072 "default": 50,8073 "type": "integer",8074 "minimum": 1,8075 "maximum": 2008076 }8077 },8078 {8079 "name": "before",8080 "in": "query",8081 "required": false,8082 "description": "ids strictly below",8083 "schema": {8084 "type": "integer",8085 "exclusiveMinimum": 0,8086 "maximum": 90071992547409918087 }8088 },8089 {8090 "name": "severity",8091 "in": "query",8092 "required": false,8093 "schema": {8094 "type": "string",8095 "enum": [8096 "info",8097 "warning",8098 "critical"8099 ]8100 }8101 },8102 {8103 "name": "group",8104 "in": "query",8105 "required": false,8106 "schema": {8107 "type": "string",8108 "enum": [8109 "transfers",8110 "agents",8111 "derivatives",8112 "security",8113 "system"8114 ]8115 }8116 },8117 {8118 "name": "unread",8119 "in": "query",8120 "required": false,8121 "schema": {8122 "type": "string",8123 "enum": [8124 "1"8125 ]8126 }8127 }8128 ],8129 "responses": {8130 "200": {8131 "description": "OK",8132 "content": {8133 "application/json": {8134 "schema": {8135 "type": "object",8136 "properties": {8137 "items": {8138 "type": "array",8139 "items": {8140 "$ref": "#/components/schemas/Alert"8141 }8142 },8143 "unread": {8144 "type": "integer",8145 "minimum": -9007199254740991,8146 "maximum": 90071992547409918147 },8148 "critical": {8149 "type": "integer",8150 "minimum": -9007199254740991,8151 "maximum": 90071992547409918152 },8153 "lastId": {8154 "type": "integer",8155 "minimum": -9007199254740991,8156 "maximum": 90071992547409918157 }8158 },8159 "required": [8160 "items",8161 "unread",8162 "critical",8163 "lastId"8164 ],8165 "additionalProperties": {}8166 }8167 }8168 }8169 },8170 "400": {8171 "description": "The request is not valid: `bad_request`",8172 "content": {8173 "application/json": {8174 "schema": {8175 "$ref": "#/components/schemas/Error"8176 }8177 }8178 }8179 },8180 "401": {8181 "description": "No valid session: `unauthenticated`",8182 "content": {8183 "application/json": {8184 "schema": {8185 "$ref": "#/components/schemas/Error"8186 }8187 }8188 }8189 },8190 "429": {8191 "description": "Too many requests: `rate_limited`",8192 "content": {8193 "application/json": {8194 "schema": {8195 "$ref": "#/components/schemas/Error"8196 }8197 }8198 }8199 },8200 "500": {8201 "description": "Server error: `internal`",8202 "content": {8203 "application/json": {8204 "schema": {8205 "$ref": "#/components/schemas/Error"8206 }8207 }8208 }8209 }8210 }8211 }8212 },8213 "/api/v1/alerts/unread": {8214 "get": {8215 "operationId": "unreadAlerts",8216 "tags": [8217 "Alerts"8218 ],8219 "summary": "Unread counters",8220 "security": [8221 {8222 "session": []8223 }8224 ],8225 "x-spw-auth": "session",8226 "x-spw-csrf": false,8227 "x-spw-errors": [8228 {8229 "status": 401,8230 "code": "unauthenticated"8231 },8232 {8233 "status": 429,8234 "code": "rate_limited"8235 },8236 {8237 "status": 500,8238 "code": "internal"8239 }8240 ],8241 "parameters": [],8242 "responses": {8243 "200": {8244 "description": "OK",8245 "content": {8246 "application/json": {8247 "schema": {8248 "type": "object",8249 "properties": {8250 "unread": {8251 "type": "integer",8252 "minimum": -9007199254740991,8253 "maximum": 90071992547409918254 },8255 "critical": {8256 "type": "integer",8257 "minimum": -9007199254740991,8258 "maximum": 90071992547409918259 },8260 "lastId": {8261 "type": "integer",8262 "minimum": -9007199254740991,8263 "maximum": 90071992547409918264 }8265 },8266 "required": [8267 "unread",8268 "critical",8269 "lastId"8270 ],8271 "additionalProperties": {}8272 }8273 }8274 }8275 },8276 "401": {8277 "description": "No valid session: `unauthenticated`",8278 "content": {8279 "application/json": {8280 "schema": {8281 "$ref": "#/components/schemas/Error"8282 }8283 }8284 }8285 },8286 "429": {8287 "description": "Too many requests: `rate_limited`",8288 "content": {8289 "application/json": {8290 "schema": {8291 "$ref": "#/components/schemas/Error"8292 }8293 }8294 }8295 },8296 "500": {8297 "description": "Server error: `internal`",8298 "content": {8299 "application/json": {8300 "schema": {8301 "$ref": "#/components/schemas/Error"8302 }8303 }8304 }8305 }8306 }8307 }8308 },8309 "/api/v1/alerts/read": {8310 "post": {8311 "operationId": "readAlerts",8312 "tags": [8313 "Alerts"8314 ],8315 "summary": "Mark alerts read",8316 "security": [8317 {8318 "session": []8319 }8320 ],8321 "x-spw-auth": "session",8322 "x-spw-csrf": true,8323 "x-spw-errors": [8324 {8325 "status": 400,8326 "code": "bad_request"8327 },8328 {8329 "status": 401,8330 "code": "unauthenticated"8331 },8332 {8333 "status": 403,8334 "code": "csrf"8335 },8336 {8337 "status": 429,8338 "code": "rate_limited"8339 },8340 {8341 "status": 500,8342 "code": "internal"8343 }8344 ],8345 "parameters": [],8346 "requestBody": {8347 "required": true,8348 "content": {8349 "application/json": {8350 "schema": {8351 "anyOf": [8352 {8353 "type": "object",8354 "properties": {8355 "all": {8356 "type": "boolean",8357 "const": true8358 }8359 },8360 "required": [8361 "all"8362 ],8363 "additionalProperties": false8364 },8365 {8366 "type": "object",8367 "properties": {8368 "ids": {8369 "minItems": 1,8370 "maxItems": 500,8371 "type": "array",8372 "items": {8373 "type": "integer",8374 "exclusiveMinimum": 0,8375 "maximum": 90071992547409918376 }8377 }8378 },8379 "required": [8380 "ids"8381 ],8382 "additionalProperties": false8383 }8384 ]8385 }8386 }8387 }8388 },8389 "responses": {8390 "200": {8391 "description": "OK",8392 "content": {8393 "application/json": {8394 "schema": {8395 "type": "object",8396 "properties": {8397 "unread": {8398 "type": "integer",8399 "minimum": -9007199254740991,8400 "maximum": 90071992547409918401 },8402 "critical": {8403 "type": "integer",8404 "minimum": -9007199254740991,8405 "maximum": 90071992547409918406 },8407 "lastId": {8408 "type": "integer",8409 "minimum": -9007199254740991,8410 "maximum": 90071992547409918411 }8412 },8413 "required": [8414 "unread",8415 "critical",8416 "lastId"8417 ],8418 "additionalProperties": {}8419 }8420 }8421 }8422 },8423 "400": {8424 "description": "The request is not valid: `bad_request`",8425 "content": {8426 "application/json": {8427 "schema": {8428 "$ref": "#/components/schemas/Error"8429 }8430 }8431 }8432 },8433 "401": {8434 "description": "No valid session: `unauthenticated`",8435 "content": {8436 "application/json": {8437 "schema": {8438 "$ref": "#/components/schemas/Error"8439 }8440 }8441 }8442 },8443 "403": {8444 "description": "Refused: `csrf`",8445 "content": {8446 "application/json": {8447 "schema": {8448 "$ref": "#/components/schemas/Error"8449 }8450 }8451 }8452 },8453 "429": {8454 "description": "Too many requests: `rate_limited`",8455 "content": {8456 "application/json": {8457 "schema": {8458 "$ref": "#/components/schemas/Error"8459 }8460 }8461 }8462 },8463 "500": {8464 "description": "Server error: `internal`",8465 "content": {8466 "application/json": {8467 "schema": {8468 "$ref": "#/components/schemas/Error"8469 }8470 }8471 }8472 }8473 }8474 }8475 },8476 "/api/v1/alerts/stream": {8477 "get": {8478 "operationId": "streamAlerts",8479 "tags": [8480 "Alerts"8481 ],8482 "summary": "Unread counters as Server-Sent Events",8483 "description": "Event `unread` (the counters) now and at every change. No event id, no replay: on reconnect the first event is the present. Ends after ten minutes.",8484 "security": [8485 {8486 "session": []8487 }8488 ],8489 "x-spw-auth": "session",8490 "x-spw-csrf": false,8491 "x-spw-errors": [8492 {8493 "status": 401,8494 "code": "unauthenticated"8495 },8496 {8497 "status": 429,8498 "code": "rate_limited"8499 },8500 {8501 "status": 429,8502 "code": "too_many_streams"8503 },8504 {8505 "status": 500,8506 "code": "internal"8507 }8508 ],8509 "parameters": [],8510 "responses": {8511 "200": {8512 "description": "OK",8513 "content": {8514 "text/event-stream": {8515 "schema": {8516 "type": "string"8517 }8518 }8519 }8520 },8521 "401": {8522 "description": "No valid session: `unauthenticated`",8523 "content": {8524 "application/json": {8525 "schema": {8526 "$ref": "#/components/schemas/Error"8527 }8528 }8529 }8530 },8531 "429": {8532 "description": "Too many requests: `rate_limited`, `too_many_streams`",8533 "content": {8534 "application/json": {8535 "schema": {8536 "$ref": "#/components/schemas/Error"8537 }8538 }8539 }8540 },8541 "500": {8542 "description": "Server error: `internal`",8543 "content": {8544 "application/json": {8545 "schema": {8546 "$ref": "#/components/schemas/Error"8547 }8548 }8549 }8550 }8551 }8552 }8553 },8554 "/api/v1/alerts/settings": {8555 "get": {8556 "operationId": "getAlertSettings",8557 "tags": [8558 "Alerts"8559 ],8560 "summary": "The owner's alert switches, quiet hours, thresholds, webhook",8561 "security": [8562 {8563 "session": []8564 }8565 ],8566 "x-spw-auth": "session",8567 "x-spw-csrf": false,8568 "x-spw-errors": [8569 {8570 "status": 401,8571 "code": "unauthenticated"8572 },8573 {8574 "status": 429,8575 "code": "rate_limited"8576 },8577 {8578 "status": 500,8579 "code": "internal"8580 }8581 ],8582 "parameters": [],8583 "responses": {8584 "200": {8585 "description": "OK",8586 "content": {8587 "application/json": {8588 "schema": {8589 "type": "object",8590 "properties": {8591 "settings": {8592 "type": "object",8593 "properties": {8594 "rules": {8595 "type": "object",8596 "propertyNames": {8597 "type": "string"8598 },8599 "additionalProperties": {8600 "type": "boolean"8601 }8602 },8603 "quiet": {8604 "type": "object",8605 "properties": {8606 "enabled": {8607 "type": "boolean"8608 },8609 "start": {8610 "type": "string"8611 },8612 "end": {8613 "type": "string"8614 },8615 "tz": {8616 "type": "string"8617 }8618 },8619 "required": [8620 "enabled",8621 "start",8622 "end",8623 "tz"8624 ],8625 "additionalProperties": {}8626 },8627 "showDetails": {8628 "type": "boolean",8629 "description": "amounts, prices and reasons in push notifications (lock screen). Off by default"8630 },8631 "capPerHour": {8632 "type": "integer",8633 "minimum": -9007199254740991,8634 "maximum": 90071992547409918635 },8636 "thresholds": {8637 "type": "object",8638 "propertyNames": {8639 "type": "string"8640 },8641 "additionalProperties": {8642 "type": "number"8643 }8644 },8645 "webhook": {8646 "type": "object",8647 "properties": {8648 "enabled": {8649 "type": "boolean"8650 },8651 "url": {8652 "type": "string"8653 },8654 "details": {8655 "type": "boolean"8656 }8657 },8658 "required": [8659 "enabled",8660 "url",8661 "details"8662 ],8663 "additionalProperties": {}8664 }8665 },8666 "required": [8667 "rules",8668 "quiet",8669 "showDetails",8670 "capPerHour",8671 "thresholds",8672 "webhook"8673 ],8674 "additionalProperties": {}8675 },8676 "kinds": {8677 "type": "array",8678 "items": {8679 "type": "object",8680 "properties": {8681 "kind": {8682 "$ref": "#/components/schemas/AlertKind"8683 },8684 "group": {8685 "$ref": "#/components/schemas/AlertGroup"8686 },8687 "severity": {8688 "$ref": "#/components/schemas/AlertSeverity"8689 },8690 "default": {8691 "type": "boolean"8692 },8693 "fixed": {8694 "type": "boolean"8695 }8696 },8697 "required": [8698 "kind",8699 "group",8700 "severity",8701 "default",8702 "fixed"8703 ],8704 "additionalProperties": {}8705 }8706 },8707 "webhook": {8708 "type": "object",8709 "properties": {8710 "secretSet": {8711 "type": "boolean"8712 }8713 },8714 "required": [8715 "secretSet"8716 ],8717 "additionalProperties": {}8718 },8719 "webhookSample": {8720 "type": "object",8721 "properties": {},8722 "additionalProperties": {}8723 }8724 },8725 "required": [8726 "settings",8727 "kinds",8728 "webhook",8729 "webhookSample"8730 ],8731 "additionalProperties": {}8732 }8733 }8734 }8735 },8736 "401": {8737 "description": "No valid session: `unauthenticated`",8738 "content": {8739 "application/json": {8740 "schema": {8741 "$ref": "#/components/schemas/Error"8742 }8743 }8744 }8745 },8746 "429": {8747 "description": "Too many requests: `rate_limited`",8748 "content": {8749 "application/json": {8750 "schema": {8751 "$ref": "#/components/schemas/Error"8752 }8753 }8754 }8755 },8756 "500": {8757 "description": "Server error: `internal`",8758 "content": {8759 "application/json": {8760 "schema": {8761 "$ref": "#/components/schemas/Error"8762 }8763 }8764 }8765 }8766 }8767 },8768 "put": {8769 "operationId": "putAlertSettings",8770 "tags": [8771 "Alerts"8772 ],8773 "summary": "Change alert settings (any subset)",8774 "security": [8775 {8776 "session": []8777 }8778 ],8779 "x-spw-auth": "session",8780 "x-spw-csrf": true,8781 "x-spw-errors": [8782 {8783 "status": 400,8784 "code": "bad_request"8785 },8786 {8787 "status": 401,8788 "code": "unauthenticated"8789 },8790 {8791 "status": 403,8792 "code": "csrf"8793 },8794 {8795 "status": 429,8796 "code": "rate_limited"8797 },8798 {8799 "status": 500,8800 "code": "internal"8801 }8802 ],8803 "parameters": [],8804 "requestBody": {8805 "required": true,8806 "content": {8807 "application/json": {8808 "schema": {8809 "type": "object",8810 "properties": {8811 "rules": {8812 "type": "object",8813 "propertyNames": {8814 "type": "string"8815 },8816 "additionalProperties": {8817 "type": "boolean"8818 }8819 },8820 "quiet": {8821 "type": "object",8822 "properties": {},8823 "additionalProperties": {}8824 },8825 "showDetails": {8826 "type": "boolean"8827 },8828 "capPerHour": {8829 "type": "integer",8830 "minimum": 1,8831 "maximum": 5008832 },8833 "thresholds": {8834 "type": "object",8835 "properties": {},8836 "additionalProperties": {}8837 },8838 "webhook": {8839 "type": "object",8840 "properties": {},8841 "additionalProperties": {}8842 }8843 },8844 "additionalProperties": false8845 }8846 }8847 }8848 },8849 "responses": {8850 "200": {8851 "description": "OK",8852 "content": {8853 "application/json": {8854 "schema": {8855 "type": "object",8856 "properties": {8857 "settings": {8858 "type": "object",8859 "properties": {8860 "rules": {8861 "type": "object",8862 "propertyNames": {8863 "type": "string"8864 },8865 "additionalProperties": {8866 "type": "boolean"8867 }8868 },8869 "quiet": {8870 "type": "object",8871 "properties": {8872 "enabled": {8873 "type": "boolean"8874 },8875 "start": {8876 "type": "string"8877 },8878 "end": {8879 "type": "string"8880 },8881 "tz": {8882 "type": "string"8883 }8884 },8885 "required": [8886 "enabled",8887 "start",8888 "end",8889 "tz"8890 ],8891 "additionalProperties": {}8892 },8893 "showDetails": {8894 "type": "boolean",8895 "description": "amounts, prices and reasons in push notifications (lock screen). Off by default"8896 },8897 "capPerHour": {8898 "type": "integer",8899 "minimum": -9007199254740991,8900 "maximum": 90071992547409918901 },8902 "thresholds": {8903 "type": "object",8904 "propertyNames": {8905 "type": "string"8906 },8907 "additionalProperties": {8908 "type": "number"8909 }8910 },8911 "webhook": {8912 "type": "object",8913 "properties": {8914 "enabled": {8915 "type": "boolean"8916 },8917 "url": {8918 "type": "string"8919 },8920 "details": {8921 "type": "boolean"8922 }8923 },8924 "required": [8925 "enabled",8926 "url",8927 "details"8928 ],8929 "additionalProperties": {}8930 }8931 },8932 "required": [8933 "rules",8934 "quiet",8935 "showDetails",8936 "capPerHour",8937 "thresholds",8938 "webhook"8939 ],8940 "additionalProperties": {}8941 },8942 "kinds": {8943 "type": "array",8944 "items": {8945 "type": "object",8946 "properties": {8947 "kind": {8948 "$ref": "#/components/schemas/AlertKind"8949 },8950 "group": {8951 "$ref": "#/components/schemas/AlertGroup"8952 },8953 "severity": {8954 "$ref": "#/components/schemas/AlertSeverity"8955 },8956 "default": {8957 "type": "boolean"8958 },8959 "fixed": {8960 "type": "boolean"8961 }8962 },8963 "required": [8964 "kind",8965 "group",8966 "severity",8967 "default",8968 "fixed"8969 ],8970 "additionalProperties": {}8971 }8972 },8973 "webhook": {8974 "type": "object",8975 "properties": {8976 "secretSet": {8977 "type": "boolean"8978 }8979 },8980 "required": [8981 "secretSet"8982 ],8983 "additionalProperties": {}8984 },8985 "webhookSample": {8986 "type": "object",8987 "properties": {},8988 "additionalProperties": {}8989 }8990 },8991 "required": [8992 "settings",8993 "kinds",8994 "webhook",8995 "webhookSample"8996 ],8997 "additionalProperties": {}8998 }8999 }9000 }9001 },9002 "400": {9003 "description": "The request is not valid: `bad_request`",9004 "content": {9005 "application/json": {9006 "schema": {9007 "$ref": "#/components/schemas/Error"9008 }9009 }9010 }9011 },9012 "401": {9013 "description": "No valid session: `unauthenticated`",9014 "content": {9015 "application/json": {9016 "schema": {9017 "$ref": "#/components/schemas/Error"9018 }9019 }9020 }9021 },9022 "403": {9023 "description": "Refused: `csrf`",9024 "content": {9025 "application/json": {9026 "schema": {9027 "$ref": "#/components/schemas/Error"9028 }9029 }9030 }9031 },9032 "429": {9033 "description": "Too many requests: `rate_limited`",9034 "content": {9035 "application/json": {9036 "schema": {9037 "$ref": "#/components/schemas/Error"9038 }9039 }9040 }9041 },9042 "500": {9043 "description": "Server error: `internal`",9044 "content": {9045 "application/json": {9046 "schema": {9047 "$ref": "#/components/schemas/Error"9048 }9049 }9050 }9051 }9052 }9053 }9054 },9055 "/api/v1/alerts/webhook/secret": {9056 "post": {9057 "operationId": "rotateWebhookSecret",9058 "tags": [9059 "Alerts"9060 ],9061 "summary": "Generate the webhook signing secret (shown once)",9062 "security": [9063 {9064 "session": []9065 }9066 ],9067 "x-spw-auth": "session",9068 "x-spw-csrf": true,9069 "x-spw-errors": [9070 {9071 "status": 400,9072 "code": "bad_request"9073 },9074 {9075 "status": 401,9076 "code": "unauthenticated"9077 },9078 {9079 "status": 403,9080 "code": "csrf"9081 },9082 {9083 "status": 429,9084 "code": "rate_limited"9085 },9086 {9087 "status": 500,9088 "code": "internal"9089 }9090 ],9091 "parameters": [],9092 "responses": {9093 "200": {9094 "description": "OK",9095 "content": {9096 "application/json": {9097 "schema": {9098 "type": "object",9099 "properties": {9100 "secret": {9101 "type": "string"9102 }9103 },9104 "required": [9105 "secret"9106 ],9107 "additionalProperties": {}9108 }9109 }9110 }9111 },9112 "400": {9113 "description": "The request is not valid: `bad_request`",9114 "content": {9115 "application/json": {9116 "schema": {9117 "$ref": "#/components/schemas/Error"9118 }9119 }9120 }9121 },9122 "401": {9123 "description": "No valid session: `unauthenticated`",9124 "content": {9125 "application/json": {9126 "schema": {9127 "$ref": "#/components/schemas/Error"9128 }9129 }9130 }9131 },9132 "403": {9133 "description": "Refused: `csrf`",9134 "content": {9135 "application/json": {9136 "schema": {9137 "$ref": "#/components/schemas/Error"9138 }9139 }9140 }9141 },9142 "429": {9143 "description": "Too many requests: `rate_limited`",9144 "content": {9145 "application/json": {9146 "schema": {9147 "$ref": "#/components/schemas/Error"9148 }9149 }9150 }9151 },9152 "500": {9153 "description": "Server error: `internal`",9154 "content": {9155 "application/json": {9156 "schema": {9157 "$ref": "#/components/schemas/Error"9158 }9159 }9160 }9161 }9162 }9163 }9164 },9165 "/api/v1/alerts/webhook/test": {9166 "post": {9167 "operationId": "testWebhook",9168 "tags": [9169 "Alerts"9170 ],9171 "summary": "Send a test call to the webhook",9172 "security": [9173 {9174 "session": []9175 }9176 ],9177 "x-spw-auth": "session",9178 "x-spw-csrf": true,9179 "x-spw-errors": [9180 {9181 "status": 400,9182 "code": "bad_request"9183 },9184 {9185 "status": 401,9186 "code": "unauthenticated"9187 },9188 {9189 "status": 403,9190 "code": "csrf"9191 },9192 {9193 "status": 429,9194 "code": "rate_limited"9195 },9196 {9197 "status": 500,9198 "code": "internal"9199 }9200 ],9201 "parameters": [],9202 "responses": {9203 "200": {9204 "description": "OK",9205 "content": {9206 "application/json": {9207 "schema": {9208 "type": "object",9209 "properties": {9210 "ok": {9211 "type": "boolean"9212 },9213 "status": {9214 "type": [9215 "number",9216 "null"9217 ]9218 },9219 "error": {9220 "type": [9221 "string",9222 "null"9223 ]9224 }9225 },9226 "required": [9227 "ok",9228 "status",9229 "error"9230 ],9231 "additionalProperties": {}9232 }9233 }9234 }9235 },9236 "400": {9237 "description": "The request is not valid: `bad_request`",9238 "content": {9239 "application/json": {9240 "schema": {9241 "$ref": "#/components/schemas/Error"9242 }9243 }9244 }9245 },9246 "401": {9247 "description": "No valid session: `unauthenticated`",9248 "content": {9249 "application/json": {9250 "schema": {9251 "$ref": "#/components/schemas/Error"9252 }9253 }9254 }9255 },9256 "403": {9257 "description": "Refused: `csrf`",9258 "content": {9259 "application/json": {9260 "schema": {9261 "$ref": "#/components/schemas/Error"9262 }9263 }9264 }9265 },9266 "429": {9267 "description": "Too many requests: `rate_limited`",9268 "content": {9269 "application/json": {9270 "schema": {9271 "$ref": "#/components/schemas/Error"9272 }9273 }9274 }9275 },9276 "500": {9277 "description": "Server error: `internal`",9278 "content": {9279 "application/json": {9280 "schema": {9281 "$ref": "#/components/schemas/Error"9282 }9283 }9284 }9285 }9286 }9287 }9288 },9289 "/api/v1/push/key": {9290 "get": {9291 "operationId": "pushKey",9292 "tags": [9293 "Alerts"9294 ],9295 "summary": "VAPID public key for Web Push",9296 "security": [9297 {9298 "session": []9299 }9300 ],9301 "x-spw-auth": "session",9302 "x-spw-csrf": false,9303 "x-spw-errors": [9304 {9305 "status": 401,9306 "code": "unauthenticated"9307 },9308 {9309 "status": 429,9310 "code": "rate_limited"9311 },9312 {9313 "status": 500,9314 "code": "internal"9315 }9316 ],9317 "parameters": [],9318 "responses": {9319 "200": {9320 "description": "OK",9321 "content": {9322 "application/json": {9323 "schema": {9324 "type": "object",9325 "properties": {9326 "publicKey": {9327 "type": "string"9328 }9329 },9330 "required": [9331 "publicKey"9332 ],9333 "additionalProperties": {}9334 }9335 }9336 }9337 },9338 "401": {9339 "description": "No valid session: `unauthenticated`",9340 "content": {9341 "application/json": {9342 "schema": {9343 "$ref": "#/components/schemas/Error"9344 }9345 }9346 }9347 },9348 "429": {9349 "description": "Too many requests: `rate_limited`",9350 "content": {9351 "application/json": {9352 "schema": {9353 "$ref": "#/components/schemas/Error"9354 }9355 }9356 }9357 },9358 "500": {9359 "description": "Server error: `internal`",9360 "content": {9361 "application/json": {9362 "schema": {9363 "$ref": "#/components/schemas/Error"9364 }9365 }9366 }9367 }9368 }9369 }9370 },9371 "/api/v1/push/subscriptions": {9372 "get": {9373 "operationId": "listPushSubscriptions",9374 "tags": [9375 "Alerts"9376 ],9377 "summary": "Devices subscribed to push",9378 "security": [9379 {9380 "session": []9381 }9382 ],9383 "x-spw-auth": "session",9384 "x-spw-csrf": false,9385 "x-spw-errors": [9386 {9387 "status": 401,9388 "code": "unauthenticated"9389 },9390 {9391 "status": 429,9392 "code": "rate_limited"9393 },9394 {9395 "status": 500,9396 "code": "internal"9397 }9398 ],9399 "parameters": [],9400 "responses": {9401 "200": {9402 "description": "OK",9403 "content": {9404 "application/json": {9405 "schema": {9406 "type": "array",9407 "items": {9408 "type": "object",9409 "properties": {9410 "id": {9411 "type": "string",9412 "format": "uuid",9413 "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"9414 },9415 "label": {9416 "type": "string"9417 },9418 "locale": {9419 "type": "string"9420 },9421 "service": {9422 "type": "string"9423 },9424 "endpointTail": {9425 "type": "string"9426 },9427 "ua": {9428 "type": "string"9429 },9430 "createdAt": {9431 "type": "integer",9432 "minimum": -9007199254740991,9433 "maximum": 9007199254740991,9434 "description": "milliseconds since the Unix epoch"9435 },9436 "lastOkAt": {9437 "anyOf": [9438 {9439 "type": "integer",9440 "minimum": -9007199254740991,9441 "maximum": 9007199254740991,9442 "description": "milliseconds since the Unix epoch"9443 },9444 {9445 "type": "null"9446 }9447 ]9448 },9449 "lastError": {9450 "type": [9451 "string",9452 "null"9453 ]9454 },9455 "failures": {9456 "type": "integer",9457 "minimum": -9007199254740991,9458 "maximum": 90071992547409919459 }9460 },9461 "required": [9462 "id",9463 "label",9464 "locale",9465 "service",9466 "endpointTail",9467 "ua",9468 "createdAt",9469 "lastOkAt",9470 "lastError",9471 "failures"9472 ],9473 "additionalProperties": {}9474 }9475 }9476 }9477 }9478 },9479 "401": {9480 "description": "No valid session: `unauthenticated`",9481 "content": {9482 "application/json": {9483 "schema": {9484 "$ref": "#/components/schemas/Error"9485 }9486 }9487 }9488 },9489 "429": {9490 "description": "Too many requests: `rate_limited`",9491 "content": {9492 "application/json": {9493 "schema": {9494 "$ref": "#/components/schemas/Error"9495 }9496 }9497 }9498 },9499 "500": {9500 "description": "Server error: `internal`",9501 "content": {9502 "application/json": {9503 "schema": {9504 "$ref": "#/components/schemas/Error"9505 }9506 }9507 }9508 }9509 }9510 },9511 "post": {9512 "operationId": "subscribePush",9513 "tags": [9514 "Alerts"9515 ],9516 "summary": "Subscribe this device",9517 "security": [9518 {9519 "session": []9520 }9521 ],9522 "x-spw-auth": "session",9523 "x-spw-csrf": true,9524 "x-spw-errors": [9525 {9526 "status": 400,9527 "code": "bad_request"9528 },9529 {9530 "status": 401,9531 "code": "unauthenticated"9532 },9533 {9534 "status": 403,9535 "code": "csrf"9536 },9537 {9538 "status": 422,9539 "code": "too_many_subscriptions"9540 },9541 {9542 "status": 429,9543 "code": "rate_limited"9544 },9545 {9546 "status": 500,9547 "code": "internal"9548 }9549 ],9550 "parameters": [],9551 "requestBody": {9552 "required": true,9553 "content": {9554 "application/json": {9555 "schema": {9556 "type": "object",9557 "properties": {9558 "endpoint": {9559 "type": "string",9560 "maxLength": 1000,9561 "format": "uri"9562 },9563 "keys": {9564 "type": "object",9565 "properties": {9566 "p256dh": {9567 "type": "string"9568 },9569 "auth": {9570 "type": "string"9571 }9572 },9573 "required": [9574 "p256dh",9575 "auth"9576 ],9577 "additionalProperties": false9578 },9579 "label": {9580 "default": "",9581 "type": "string",9582 "maxLength": 409583 },9584 "locale": {9585 "default": "fr",9586 "type": "string",9587 "enum": [9588 "fr",9589 "en"9590 ]9591 }9592 },9593 "required": [9594 "endpoint",9595 "keys"9596 ],9597 "additionalProperties": false9598 }9599 }9600 }9601 },9602 "responses": {9603 "200": {9604 "description": "OK",9605 "content": {9606 "application/json": {9607 "schema": {9608 "type": "object",9609 "properties": {9610 "id": {9611 "type": "string",9612 "format": "uuid",9613 "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"9614 },9615 "label": {9616 "type": "string"9617 },9618 "locale": {9619 "type": "string"9620 },9621 "service": {9622 "type": "string"9623 },9624 "endpointTail": {9625 "type": "string"9626 },9627 "ua": {9628 "type": "string"9629 },9630 "createdAt": {9631 "type": "integer",9632 "minimum": -9007199254740991,9633 "maximum": 9007199254740991,9634 "description": "milliseconds since the Unix epoch"9635 },9636 "lastOkAt": {9637 "anyOf": [9638 {9639 "type": "integer",9640 "minimum": -9007199254740991,9641 "maximum": 9007199254740991,9642 "description": "milliseconds since the Unix epoch"9643 },9644 {9645 "type": "null"9646 }9647 ]9648 },9649 "lastError": {9650 "type": [9651 "string",9652 "null"9653 ]9654 },9655 "failures": {9656 "type": "integer",9657 "minimum": -9007199254740991,9658 "maximum": 90071992547409919659 }9660 },9661 "required": [9662 "id",9663 "label",9664 "locale",9665 "service",9666 "endpointTail",9667 "ua",9668 "createdAt",9669 "lastOkAt",9670 "lastError",9671 "failures"9672 ],9673 "additionalProperties": {}9674 }9675 }9676 }9677 },9678 "400": {9679 "description": "The request is not valid: `bad_request`",9680 "content": {9681 "application/json": {9682 "schema": {9683 "$ref": "#/components/schemas/Error"9684 }9685 }9686 }9687 },9688 "401": {9689 "description": "No valid session: `unauthenticated`",9690 "content": {9691 "application/json": {9692 "schema": {9693 "$ref": "#/components/schemas/Error"9694 }9695 }9696 }9697 },9698 "403": {9699 "description": "Refused: `csrf`",9700 "content": {9701 "application/json": {9702 "schema": {9703 "$ref": "#/components/schemas/Error"9704 }9705 }9706 }9707 },9708 "422": {9709 "description": "A valid request that cannot be carried out: `too_many_subscriptions`",9710 "content": {9711 "application/json": {9712 "schema": {9713 "$ref": "#/components/schemas/Error"9714 }9715 }9716 }9717 },9718 "429": {9719 "description": "Too many requests: `rate_limited`",9720 "content": {9721 "application/json": {9722 "schema": {9723 "$ref": "#/components/schemas/Error"9724 }9725 }9726 }9727 },9728 "500": {9729 "description": "Server error: `internal`",9730 "content": {9731 "application/json": {9732 "schema": {9733 "$ref": "#/components/schemas/Error"9734 }9735 }9736 }9737 }9738 }9739 }9740 },9741 "/api/v1/push/subscriptions/{id}": {9742 "patch": {9743 "operationId": "updatePushSubscription",9744 "tags": [9745 "Alerts"9746 ],9747 "summary": "Rename a device, change its language",9748 "security": [9749 {9750 "session": []9751 }9752 ],9753 "x-spw-auth": "session",9754 "x-spw-csrf": true,9755 "x-spw-errors": [9756 {9757 "status": 400,9758 "code": "bad_request"9759 },9760 {9761 "status": 401,9762 "code": "unauthenticated"9763 },9764 {9765 "status": 403,9766 "code": "csrf"9767 },9768 {9769 "status": 404,9770 "code": "not_found"9771 },9772 {9773 "status": 429,9774 "code": "rate_limited"9775 },9776 {9777 "status": 500,9778 "code": "internal"9779 }9780 ],9781 "parameters": [9782 {9783 "name": "id",9784 "in": "path",9785 "required": true,9786 "description": "the id returned by the creation or by a list",9787 "schema": {9788 "type": "string"9789 }9790 }9791 ],9792 "requestBody": {9793 "required": true,9794 "content": {9795 "application/json": {9796 "schema": {9797 "type": "object",9798 "properties": {9799 "label": {9800 "type": "string",9801 "maxLength": 409802 },9803 "locale": {9804 "type": "string",9805 "enum": [9806 "fr",9807 "en"9808 ]9809 }9810 },9811 "additionalProperties": false9812 }9813 }9814 }9815 },9816 "responses": {9817 "200": {9818 "description": "OK",9819 "content": {9820 "application/json": {9821 "schema": {9822 "type": "object",9823 "properties": {9824 "id": {9825 "type": "string",9826 "format": "uuid",9827 "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"9828 },9829 "label": {9830 "type": "string"9831 },9832 "locale": {9833 "type": "string"9834 },9835 "service": {9836 "type": "string"9837 },9838 "endpointTail": {9839 "type": "string"9840 },9841 "ua": {9842 "type": "string"9843 },9844 "createdAt": {9845 "type": "integer",9846 "minimum": -9007199254740991,9847 "maximum": 9007199254740991,9848 "description": "milliseconds since the Unix epoch"9849 },9850 "lastOkAt": {9851 "anyOf": [9852 {9853 "type": "integer",9854 "minimum": -9007199254740991,9855 "maximum": 9007199254740991,9856 "description": "milliseconds since the Unix epoch"9857 },9858 {9859 "type": "null"9860 }9861 ]9862 },9863 "lastError": {9864 "type": [9865 "string",9866 "null"9867 ]9868 },9869 "failures": {9870 "type": "integer",9871 "minimum": -9007199254740991,9872 "maximum": 90071992547409919873 }9874 },9875 "required": [9876 "id",9877 "label",9878 "locale",9879 "service",9880 "endpointTail",9881 "ua",9882 "createdAt",9883 "lastOkAt",9884 "lastError",9885 "failures"9886 ],9887 "additionalProperties": {}9888 }9889 }9890 }9891 },9892 "400": {9893 "description": "The request is not valid: `bad_request`",9894 "content": {9895 "application/json": {9896 "schema": {9897 "$ref": "#/components/schemas/Error"9898 }9899 }9900 }9901 },9902 "401": {9903 "description": "No valid session: `unauthenticated`",9904 "content": {9905 "application/json": {9906 "schema": {9907 "$ref": "#/components/schemas/Error"9908 }9909 }9910 }9911 },9912 "403": {9913 "description": "Refused: `csrf`",9914 "content": {9915 "application/json": {9916 "schema": {9917 "$ref": "#/components/schemas/Error"9918 }9919 }9920 }9921 },9922 "404": {9923 "description": "The object does not exist: `not_found`",9924 "content": {9925 "application/json": {9926 "schema": {9927 "$ref": "#/components/schemas/Error"9928 }9929 }9930 }9931 },9932 "429": {9933 "description": "Too many requests: `rate_limited`",9934 "content": {9935 "application/json": {9936 "schema": {9937 "$ref": "#/components/schemas/Error"9938 }9939 }9940 }9941 },9942 "500": {9943 "description": "Server error: `internal`",9944 "content": {9945 "application/json": {9946 "schema": {9947 "$ref": "#/components/schemas/Error"9948 }9949 }9950 }9951 }9952 }9953 },9954 "delete": {9955 "operationId": "deletePushSubscription",9956 "tags": [9957 "Alerts"9958 ],9959 "summary": "Unsubscribe a device",9960 "security": [9961 {9962 "session": []9963 }9964 ],9965 "x-spw-auth": "session",9966 "x-spw-csrf": true,9967 "x-spw-errors": [9968 {9969 "status": 400,9970 "code": "bad_request"9971 },9972 {9973 "status": 401,9974 "code": "unauthenticated"9975 },9976 {9977 "status": 403,9978 "code": "csrf"9979 },9980 {9981 "status": 429,9982 "code": "rate_limited"9983 },9984 {9985 "status": 500,9986 "code": "internal"9987 }9988 ],9989 "parameters": [9990 {9991 "name": "id",9992 "in": "path",9993 "required": true,9994 "description": "the id returned by the creation or by a list",9995 "schema": {9996 "type": "string"9997 }9998 }9999 ],10000 "responses": {10001 "200": {10002 "description": "OK",10003 "content": {10004 "application/json": {10005 "schema": {10006 "type": "object",10007 "properties": {10008 "ok": {10009 "type": "boolean",10010 "const": true10011 }10012 },10013 "required": [10014 "ok"10015 ],10016 "additionalProperties": {}10017 }10018 }10019 }10020 },10021 "400": {10022 "description": "The request is not valid: `bad_request`",10023 "content": {10024 "application/json": {10025 "schema": {10026 "$ref": "#/components/schemas/Error"10027 }10028 }10029 }10030 },10031 "401": {10032 "description": "No valid session: `unauthenticated`",10033 "content": {10034 "application/json": {10035 "schema": {10036 "$ref": "#/components/schemas/Error"10037 }10038 }10039 }10040 },10041 "403": {10042 "description": "Refused: `csrf`",10043 "content": {10044 "application/json": {10045 "schema": {10046 "$ref": "#/components/schemas/Error"10047 }10048 }10049 }10050 },10051 "429": {10052 "description": "Too many requests: `rate_limited`",10053 "content": {10054 "application/json": {10055 "schema": {10056 "$ref": "#/components/schemas/Error"10057 }10058 }10059 }10060 },10061 "500": {10062 "description": "Server error: `internal`",10063 "content": {10064 "application/json": {10065 "schema": {10066 "$ref": "#/components/schemas/Error"10067 }10068 }10069 }10070 }10071 }10072 }10073 },10074 "/api/v1/push/test": {10075 "post": {10076 "operationId": "testPush",10077 "tags": [10078 "Alerts"10079 ],10080 "summary": "Send a test notification",10081 "security": [10082 {10083 "session": []10084 }10085 ],10086 "x-spw-auth": "session",10087 "x-spw-csrf": true,10088 "x-spw-errors": [10089 {10090 "status": 400,10091 "code": "bad_request"10092 },10093 {10094 "status": 401,10095 "code": "unauthenticated"10096 },10097 {10098 "status": 403,10099 "code": "csrf"10100 },10101 {10102 "status": 404,10103 "code": "not_found"10104 },10105 {10106 "status": 429,10107 "code": "rate_limited"10108 },10109 {10110 "status": 500,10111 "code": "internal"10112 }10113 ],10114 "parameters": [],10115 "requestBody": {10116 "required": true,10117 "content": {10118 "application/json": {10119 "schema": {10120 "type": "object",10121 "properties": {10122 "id": {10123 "type": "string",10124 "format": "uuid",10125 "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"10126 }10127 },10128 "additionalProperties": false10129 }10130 }10131 }10132 },10133 "responses": {10134 "200": {10135 "description": "OK",10136 "content": {10137 "application/json": {10138 "schema": {10139 "type": "object",10140 "properties": {10141 "results": {10142 "type": "array",10143 "items": {10144 "type": "object",10145 "properties": {10146 "id": {10147 "type": "string",10148 "format": "uuid",10149 "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"10150 },10151 "ok": {10152 "type": "boolean"10153 },10154 "status": {10155 "type": [10156 "number",10157 "null"10158 ]10159 },10160 "removed": {10161 "type": "boolean"10162 },10163 "error": {10164 "type": [10165 "string",10166 "null"10167 ]10168 }10169 },10170 "required": [10171 "id",10172 "ok",10173 "status",10174 "removed",10175 "error"10176 ],10177 "additionalProperties": {}10178 }10179 }10180 },10181 "required": [10182 "results"10183 ],10184 "additionalProperties": {}10185 }10186 }10187 }10188 },10189 "400": {10190 "description": "The request is not valid: `bad_request`",10191 "content": {10192 "application/json": {10193 "schema": {10194 "$ref": "#/components/schemas/Error"10195 }10196 }10197 }10198 },10199 "401": {10200 "description": "No valid session: `unauthenticated`",10201 "content": {10202 "application/json": {10203 "schema": {10204 "$ref": "#/components/schemas/Error"10205 }10206 }10207 }10208 },10209 "403": {10210 "description": "Refused: `csrf`",10211 "content": {10212 "application/json": {10213 "schema": {10214 "$ref": "#/components/schemas/Error"10215 }10216 }10217 }10218 },10219 "404": {10220 "description": "The object does not exist: `not_found`",10221 "content": {10222 "application/json": {10223 "schema": {10224 "$ref": "#/components/schemas/Error"10225 }10226 }10227 }10228 },10229 "429": {10230 "description": "Too many requests: `rate_limited`",10231 "content": {10232 "application/json": {10233 "schema": {10234 "$ref": "#/components/schemas/Error"10235 }10236 }10237 }10238 },10239 "500": {10240 "description": "Server error: `internal`",10241 "content": {10242 "application/json": {10243 "schema": {10244 "$ref": "#/components/schemas/Error"10245 }10246 }10247 }10248 }10249 }10250 }10251 },10252 "/api/v1/events": {10253 "get": {10254 "operationId": "listEvents",10255 "tags": [10256 "Events"10257 ],10258 "summary": "Catch-up read of the wallet event log",10259 "description": "Events are facts that say \"look\": re-read the object named by `ref`. Delivered at least once; processing an id twice must be harmless.",10260 "security": [10261 {10262 "session": []10263 }10264 ],10265 "x-spw-auth": "session",10266 "x-spw-csrf": false,10267 "x-spw-since": "next",10268 "x-spw-errors": [10269 {10270 "status": 400,10271 "code": "bad_request"10272 },10273 {10274 "status": 401,10275 "code": "unauthenticated"10276 },10277 {10278 "status": 429,10279 "code": "rate_limited"10280 },10281 {10282 "status": 500,10283 "code": "internal"10284 }10285 ],10286 "parameters": [10287 {10288 "name": "after",10289 "in": "query",10290 "required": false,10291 "description": "the last event id processed",10292 "schema": {10293 "default": 0,10294 "type": "integer",10295 "minimum": 0,10296 "maximum": 900719925474099110297 }10298 },10299 {10300 "name": "limit",10301 "in": "query",10302 "required": false,10303 "description": "rows returned at most",10304 "schema": {10305 "default": 500,10306 "type": "integer",10307 "minimum": 1,10308 "maximum": 50010309 }10310 }10311 ],10312 "responses": {10313 "200": {10314 "description": "OK",10315 "content": {10316 "application/json": {10317 "schema": {10318 "type": "object",10319 "properties": {10320 "reset": {10321 "type": "boolean",10322 "description": "true: the position cannot be resumed — forget it, reload everything, continue from `latest`"10323 },10324 "events": {10325 "type": "array",10326 "items": {10327 "$ref": "#/components/schemas/WalletEvent"10328 }10329 },10330 "latest": {10331 "type": "integer",10332 "minimum": -9007199254740991,10333 "maximum": 900719925474099110334 },10335 "more": {10336 "type": "boolean",10337 "description": "true: the page is full, ask again from the last id. Always present (false on `reset`)"10338 }10339 },10340 "required": [10341 "reset",10342 "events",10343 "latest",10344 "more"10345 ],10346 "additionalProperties": {}10347 }10348 }10349 }10350 },10351 "400": {10352 "description": "The request is not valid: `bad_request`",10353 "content": {10354 "application/json": {10355 "schema": {10356 "$ref": "#/components/schemas/Error"10357 }10358 }10359 }10360 },10361 "401": {10362 "description": "No valid session: `unauthenticated`",10363 "content": {10364 "application/json": {10365 "schema": {10366 "$ref": "#/components/schemas/Error"10367 }10368 }10369 }10370 },10371 "429": {10372 "description": "Too many requests: `rate_limited`",10373 "content": {10374 "application/json": {10375 "schema": {10376 "$ref": "#/components/schemas/Error"10377 }10378 }10379 }10380 },10381 "500": {10382 "description": "Server error: `internal`",10383 "content": {10384 "application/json": {10385 "schema": {10386 "$ref": "#/components/schemas/Error"10387 }10388 }10389 }10390 }10391 }10392 }10393 },10394 "/api/v1/events/stream": {10395 "get": {10396 "operationId": "streamEvents",10397 "tags": [10398 "Events"10399 ],10400 "summary": "The wallet event log as Server-Sent Events",10401 "description": "Resumed with the standard `Last-Event-ID` header (or `?after=`). First event: `hello` `{ from }` (no id), or `reset` `{ latest }` when the position cannot be resumed. Then one event per row: `id:` = event id, `event:` = type, `data:` = the event. Ends after ten minutes; polling GET /events stays valid.",10402 "security": [10403 {10404 "session": []10405 }10406 ],10407 "x-spw-auth": "session",10408 "x-spw-csrf": false,10409 "x-spw-since": "next",10410 "x-spw-errors": [10411 {10412 "status": 400,10413 "code": "bad_request"10414 },10415 {10416 "status": 401,10417 "code": "unauthenticated"10418 },10419 {10420 "status": 429,10421 "code": "rate_limited"10422 },10423 {10424 "status": 429,10425 "code": "too_many_streams"10426 },10427 {10428 "status": 500,10429 "code": "internal"10430 }10431 ],10432 "parameters": [10433 {10434 "name": "after",10435 "in": "query",10436 "required": false,10437 "schema": {10438 "type": "integer",10439 "minimum": 0,10440 "maximum": 900719925474099110441 }10442 },10443 {10444 "name": "Last-Event-ID",10445 "in": "header",10446 "required": false,10447 "description": "The id of the last event processed (sent by EventSource on reconnect).",10448 "schema": {10449 "type": "string",10450 "pattern": "^\\d+$"10451 }10452 }10453 ],10454 "responses": {10455 "200": {10456 "description": "OK",10457 "content": {10458 "text/event-stream": {10459 "schema": {10460 "type": "string"10461 }10462 }10463 }10464 },10465 "400": {10466 "description": "The request is not valid: `bad_request`",10467 "content": {10468 "application/json": {10469 "schema": {10470 "$ref": "#/components/schemas/Error"10471 }10472 }10473 }10474 },10475 "401": {10476 "description": "No valid session: `unauthenticated`",10477 "content": {10478 "application/json": {10479 "schema": {10480 "$ref": "#/components/schemas/Error"10481 }10482 }10483 }10484 },10485 "429": {10486 "description": "Too many requests: `rate_limited`, `too_many_streams`",10487 "content": {10488 "application/json": {10489 "schema": {10490 "$ref": "#/components/schemas/Error"10491 }10492 }10493 }10494 },10495 "500": {10496 "description": "Server error: `internal`",10497 "content": {10498 "application/json": {10499 "schema": {10500 "$ref": "#/components/schemas/Error"10501 }10502 }10503 }10504 }10505 }10506 }10507 },10508 "/api/v1/dashboard/status": {10509 "get": {10510 "operationId": "dashboardStatus",10511 "tags": [10512 "Dashboard"10513 ],10514 "summary": "Risk switches and live-limit completeness (header indicator)",10515 "security": [10516 {10517 "session": []10518 }10519 ],10520 "x-spw-auth": "session",10521 "x-spw-csrf": false,10522 "x-spw-errors": [10523 {10524 "status": 401,10525 "code": "unauthenticated"10526 },10527 {10528 "status": 403,10529 "code": "owner_only"10530 },10531 {10532 "status": 429,10533 "code": "rate_limited"10534 },10535 {10536 "status": 500,10537 "code": "internal"10538 }10539 ],10540 "parameters": [],10541 "responses": {10542 "200": {10543 "description": "OK",10544 "content": {10545 "application/json": {10546 "schema": {10547 "type": "object",10548 "properties": {10549 "ts": {10550 "type": "integer",10551 "minimum": -9007199254740991,10552 "maximum": 9007199254740991,10553 "description": "milliseconds since the Unix epoch"10554 },10555 "switches": {10556 "anyOf": [10557 {10558 "type": "object",10559 "properties": {10560 "ok": {10561 "type": "boolean",10562 "const": true10563 },10564 "data": {10565 "type": "object",10566 "properties": {},10567 "additionalProperties": {}10568 },10569 "asOf": {10570 "type": "integer",10571 "minimum": -9007199254740991,10572 "maximum": 9007199254740991,10573 "description": "milliseconds since the Unix epoch"10574 }10575 },10576 "required": [10577 "ok",10578 "data",10579 "asOf"10580 ],10581 "additionalProperties": {}10582 },10583 {10584 "type": "object",10585 "properties": {10586 "ok": {10587 "type": "boolean",10588 "const": false10589 },10590 "error": {10591 "type": "object",10592 "properties": {10593 "code": {10594 "type": "string"10595 },10596 "message": {10597 "type": "string"10598 }10599 },10600 "required": [10601 "code",10602 "message"10603 ],10604 "additionalProperties": {}10605 }10606 },10607 "required": [10608 "ok",10609 "error"10610 ],10611 "additionalProperties": {}10612 }10613 ],10614 "description": "one source, isolated: its answer, or why it could not be read"10615 },10616 "liveLimits": {10617 "anyOf": [10618 {10619 "type": "object",10620 "properties": {10621 "ok": {10622 "type": "boolean",10623 "const": true10624 },10625 "data": {10626 "type": "object",10627 "properties": {},10628 "additionalProperties": {}10629 },10630 "asOf": {10631 "type": "integer",10632 "minimum": -9007199254740991,10633 "maximum": 9007199254740991,10634 "description": "milliseconds since the Unix epoch"10635 }10636 },10637 "required": [10638 "ok",10639 "data",10640 "asOf"10641 ],10642 "additionalProperties": {}10643 },10644 {10645 "type": "object",10646 "properties": {10647 "ok": {10648 "type": "boolean",10649 "const": false10650 },10651 "error": {10652 "type": "object",10653 "properties": {10654 "code": {10655 "type": "string"10656 },10657 "message": {10658 "type": "string"10659 }10660 },10661 "required": [10662 "code",10663 "message"10664 ],10665 "additionalProperties": {}10666 }10667 },10668 "required": [10669 "ok",10670 "error"10671 ],10672 "additionalProperties": {}10673 }10674 ],10675 "description": "one source, isolated: its answer, or why it could not be read"10676 }10677 },10678 "required": [10679 "ts",10680 "switches",10681 "liveLimits"10682 ],10683 "additionalProperties": {}10684 }10685 }10686 }10687 },10688 "401": {10689 "description": "No valid session: `unauthenticated`",10690 "content": {10691 "application/json": {10692 "schema": {10693 "$ref": "#/components/schemas/Error"10694 }10695 }10696 }10697 },10698 "403": {10699 "description": "Refused: `owner_only`",10700 "content": {10701 "application/json": {10702 "schema": {10703 "$ref": "#/components/schemas/Error"10704 }10705 }10706 }10707 },10708 "429": {10709 "description": "Too many requests: `rate_limited`",10710 "content": {10711 "application/json": {10712 "schema": {10713 "$ref": "#/components/schemas/Error"10714 }10715 }10716 }10717 },10718 "500": {10719 "description": "Server error: `internal`",10720 "content": {10721 "application/json": {10722 "schema": {10723 "$ref": "#/components/schemas/Error"10724 }10725 }10726 }10727 }10728 }10729 }10730 },10731 "/api/v1/dashboard/summary": {10732 "get": {10733 "operationId": "dashboardSummary",10734 "tags": [10735 "Dashboard"10736 ],10737 "summary": "Trading books, risk, agents, health, audit chain — each section fails on its own",10738 "description": "Composes the trading services; the section payloads are documented with those families. Paper and live are never added.",10739 "security": [10740 {10741 "session": []10742 }10743 ],10744 "x-spw-auth": "session",10745 "x-spw-csrf": false,10746 "x-spw-errors": [10747 {10748 "status": 401,10749 "code": "unauthenticated"10750 },10751 {10752 "status": 403,10753 "code": "owner_only"10754 },10755 {10756 "status": 429,10757 "code": "rate_limited"10758 },10759 {10760 "status": 500,10761 "code": "internal"10762 }10763 ],10764 "parameters": [],10765 "responses": {10766 "200": {10767 "description": "OK",10768 "content": {10769 "application/json": {10770 "schema": {10771 "type": "object",10772 "properties": {10773 "ts": {10774 "type": "integer",10775 "minimum": -9007199254740991,10776 "maximum": 9007199254740991,10777 "description": "milliseconds since the Unix epoch"10778 },10779 "books": {10780 "type": "object",10781 "properties": {10782 "paper": {10783 "anyOf": [10784 {10785 "type": "object",10786 "properties": {10787 "ok": {10788 "type": "boolean",10789 "const": true10790 },10791 "data": {10792 "type": "object",10793 "properties": {},10794 "additionalProperties": {}10795 },10796 "asOf": {10797 "type": "integer",10798 "minimum": -9007199254740991,10799 "maximum": 9007199254740991,10800 "description": "milliseconds since the Unix epoch"10801 }10802 },10803 "required": [10804 "ok",10805 "data",10806 "asOf"10807 ],10808 "additionalProperties": {}10809 },10810 {10811 "type": "object",10812 "properties": {10813 "ok": {10814 "type": "boolean",10815 "const": false10816 },10817 "error": {10818 "type": "object",10819 "properties": {10820 "code": {10821 "type": "string"10822 },10823 "message": {10824 "type": "string"10825 }10826 },10827 "required": [10828 "code",10829 "message"10830 ],10831 "additionalProperties": {}10832 }10833 },10834 "required": [10835 "ok",10836 "error"10837 ],10838 "additionalProperties": {}10839 }10840 ],10841 "description": "one source, isolated: its answer, or why it could not be read"10842 },10843 "live": {10844 "anyOf": [10845 {10846 "type": "object",10847 "properties": {10848 "ok": {10849 "type": "boolean",10850 "const": true10851 },10852 "data": {10853 "type": "object",10854 "properties": {},10855 "additionalProperties": {}10856 },10857 "asOf": {10858 "type": "integer",10859 "minimum": -9007199254740991,10860 "maximum": 9007199254740991,10861 "description": "milliseconds since the Unix epoch"10862 }10863 },10864 "required": [10865 "ok",10866 "data",10867 "asOf"10868 ],10869 "additionalProperties": {}10870 },10871 {10872 "type": "object",10873 "properties": {10874 "ok": {10875 "type": "boolean",10876 "const": false10877 },10878 "error": {10879 "type": "object",10880 "properties": {10881 "code": {10882 "type": "string"10883 },10884 "message": {10885 "type": "string"10886 }10887 },10888 "required": [10889 "code",10890 "message"10891 ],10892 "additionalProperties": {}10893 }10894 },10895 "required": [10896 "ok",10897 "error"10898 ],10899 "additionalProperties": {}10900 }10901 ],10902 "description": "one source, isolated: its answer, or why it could not be read"10903 },10904 "liveTestnet": {10905 "anyOf": [10906 {10907 "type": "object",10908 "properties": {10909 "ok": {10910 "type": "boolean",10911 "const": true10912 },10913 "data": {10914 "type": "object",10915 "properties": {},10916 "additionalProperties": {}10917 },10918 "asOf": {10919 "type": "integer",10920 "minimum": -9007199254740991,10921 "maximum": 9007199254740991,10922 "description": "milliseconds since the Unix epoch"10923 }10924 },10925 "required": [10926 "ok",10927 "data",10928 "asOf"10929 ],10930 "additionalProperties": {}10931 },10932 {10933 "type": "object",10934 "properties": {10935 "ok": {10936 "type": "boolean",10937 "const": false10938 },10939 "error": {10940 "type": "object",10941 "properties": {10942 "code": {10943 "type": "string"10944 },10945 "message": {10946 "type": "string"10947 }10948 },10949 "required": [10950 "code",10951 "message"10952 ],10953 "additionalProperties": {}10954 }10955 },10956 "required": [10957 "ok",10958 "error"10959 ],10960 "additionalProperties": {}10961 }10962 ],10963 "description": "one source, isolated: its answer, or why it could not be read"10964 }10965 },10966 "required": [10967 "paper",10968 "live",10969 "liveTestnet"10970 ],10971 "additionalProperties": {}10972 },10973 "risk": {10974 "anyOf": [10975 {10976 "type": "object",10977 "properties": {10978 "ok": {10979 "type": "boolean",10980 "const": true10981 },10982 "data": {10983 "type": "object",10984 "properties": {},10985 "additionalProperties": {}10986 },10987 "asOf": {10988 "type": "integer",10989 "minimum": -9007199254740991,10990 "maximum": 9007199254740991,10991 "description": "milliseconds since the Unix epoch"10992 }10993 },10994 "required": [10995 "ok",10996 "data",10997 "asOf"10998 ],10999 "additionalProperties": {}11000 },11001 {11002 "type": "object",11003 "properties": {11004 "ok": {11005 "type": "boolean",11006 "const": false11007 },11008 "error": {11009 "type": "object",11010 "properties": {11011 "code": {11012 "type": "string"11013 },11014 "message": {11015 "type": "string"11016 }11017 },11018 "required": [11019 "code",11020 "message"11021 ],11022 "additionalProperties": {}11023 }11024 },11025 "required": [11026 "ok",11027 "error"11028 ],11029 "additionalProperties": {}11030 }11031 ],11032 "description": "one source, isolated: its answer, or why it could not be read"11033 },11034 "agents": {11035 "anyOf": [11036 {11037 "type": "object",11038 "properties": {11039 "ok": {11040 "type": "boolean",11041 "const": true11042 },11043 "data": {11044 "type": "object",11045 "properties": {},11046 "additionalProperties": {}11047 },11048 "asOf": {11049 "type": "integer",11050 "minimum": -9007199254740991,11051 "maximum": 9007199254740991,11052 "description": "milliseconds since the Unix epoch"11053 }11054 },11055 "required": [11056 "ok",11057 "data",11058 "asOf"11059 ],11060 "additionalProperties": {}11061 },11062 {11063 "type": "object",11064 "properties": {11065 "ok": {11066 "type": "boolean",11067 "const": false11068 },11069 "error": {11070 "type": "object",11071 "properties": {11072 "code": {11073 "type": "string"11074 },11075 "message": {11076 "type": "string"11077 }11078 },11079 "required": [11080 "code",11081 "message"11082 ],11083 "additionalProperties": {}11084 }11085 },11086 "required": [11087 "ok",11088 "error"11089 ],11090 "additionalProperties": {}11091 }11092 ],11093 "description": "one source, isolated: its answer, or why it could not be read"11094 },11095 "agentsPnl": {11096 "anyOf": [11097 {11098 "type": "object",11099 "properties": {11100 "ok": {11101 "type": "boolean",11102 "const": true11103 },11104 "data": {11105 "type": "object",11106 "properties": {},11107 "additionalProperties": {}11108 },11109 "asOf": {11110 "type": "integer",11111 "minimum": -9007199254740991,11112 "maximum": 9007199254740991,11113 "description": "milliseconds since the Unix epoch"11114 }11115 },11116 "required": [11117 "ok",11118 "data",11119 "asOf"11120 ],11121 "additionalProperties": {}11122 },11123 {11124 "type": "object",11125 "properties": {11126 "ok": {11127 "type": "boolean",11128 "const": false11129 },11130 "error": {11131 "type": "object",11132 "properties": {11133 "code": {11134 "type": "string"11135 },11136 "message": {11137 "type": "string"11138 }11139 },11140 "required": [11141 "code",11142 "message"11143 ],11144 "additionalProperties": {}11145 }11146 },11147 "required": [11148 "ok",11149 "error"11150 ],11151 "additionalProperties": {}11152 }11153 ],11154 "description": "one source, isolated: its answer, or why it could not be read"11155 },11156 "health": {11157 "anyOf": [11158 {11159 "type": "object",11160 "properties": {11161 "ok": {11162 "type": "boolean",11163 "const": true11164 },11165 "data": {11166 "type": "object",11167 "properties": {},11168 "additionalProperties": {}11169 },11170 "asOf": {11171 "type": "integer",11172 "minimum": -9007199254740991,11173 "maximum": 9007199254740991,11174 "description": "milliseconds since the Unix epoch"11175 }11176 },11177 "required": [11178 "ok",11179 "data",11180 "asOf"11181 ],11182 "additionalProperties": {}11183 },11184 {11185 "type": "object",11186 "properties": {11187 "ok": {11188 "type": "boolean",11189 "const": false11190 },11191 "error": {11192 "type": "object",11193 "properties": {11194 "code": {11195 "type": "string"11196 },11197 "message": {11198 "type": "string"11199 }11200 },11201 "required": [11202 "code",11203 "message"11204 ],11205 "additionalProperties": {}11206 }11207 },11208 "required": [11209 "ok",11210 "error"11211 ],11212 "additionalProperties": {}11213 }11214 ],11215 "description": "one source, isolated: its answer, or why it could not be read"11216 },11217 "audit": {11218 "anyOf": [11219 {11220 "type": "object",11221 "properties": {11222 "ok": {11223 "type": "boolean",11224 "const": true11225 },11226 "data": {11227 "type": "object",11228 "properties": {},11229 "additionalProperties": {}11230 },11231 "asOf": {11232 "type": "integer",11233 "minimum": -9007199254740991,11234 "maximum": 9007199254740991,11235 "description": "milliseconds since the Unix epoch"11236 }11237 },11238 "required": [11239 "ok",11240 "data",11241 "asOf"11242 ],11243 "additionalProperties": {}11244 },11245 {11246 "type": "object",11247 "properties": {11248 "ok": {11249 "type": "boolean",11250 "const": false11251 },11252 "error": {11253 "type": "object",11254 "properties": {11255 "code": {11256 "type": "string"11257 },11258 "message": {11259 "type": "string"11260 }11261 },11262 "required": [11263 "code",11264 "message"11265 ],11266 "additionalProperties": {}11267 }11268 },11269 "required": [11270 "ok",11271 "error"11272 ],11273 "additionalProperties": {}11274 }11275 ],11276 "description": "one source, isolated: its answer, or why it could not be read"11277 }11278 },11279 "required": [11280 "ts",11281 "books",11282 "risk",11283 "agents",11284 "agentsPnl",11285 "health",11286 "audit"11287 ],11288 "additionalProperties": {}11289 }11290 }11291 }11292 },11293 "401": {11294 "description": "No valid session: `unauthenticated`",11295 "content": {11296 "application/json": {11297 "schema": {11298 "$ref": "#/components/schemas/Error"11299 }11300 }11301 }11302 },11303 "403": {11304 "description": "Refused: `owner_only`",11305 "content": {11306 "application/json": {11307 "schema": {11308 "$ref": "#/components/schemas/Error"11309 }11310 }11311 }11312 },11313 "429": {11314 "description": "Too many requests: `rate_limited`",11315 "content": {11316 "application/json": {11317 "schema": {11318 "$ref": "#/components/schemas/Error"11319 }11320 }11321 }11322 },11323 "500": {11324 "description": "Server error: `internal`",11325 "content": {11326 "application/json": {11327 "schema": {11328 "$ref": "#/components/schemas/Error"11329 }11330 }11331 }11332 }11333 }11334 }11335 },11336 "/api/v1/dashboard/activity": {11337 "get": {11338 "operationId": "dashboardActivity",11339 "tags": [11340 "Dashboard"11341 ],11342 "summary": "One history of every operation: wallet, plans, orders, risk denials, audit",11343 "description": "With `network` / `asset` (NEXT) the wallet source is filtered in SQL; `asset` keeps wallet rows only (the other sources have no asset).",11344 "security": [11345 {11346 "session": []11347 }11348 ],11349 "x-spw-auth": "session",11350 "x-spw-csrf": false,11351 "x-spw-errors": [11352 {11353 "status": 400,11354 "code": "bad_request"11355 },11356 {11357 "status": 400,11358 "code": "invalid_cursor"11359 },11360 {11361 "status": 401,11362 "code": "unauthenticated"11363 },11364 {11365 "status": 403,11366 "code": "owner_only"11367 },11368 {11369 "status": 429,11370 "code": "rate_limited"11371 },11372 {11373 "status": 500,11374 "code": "internal"11375 }11376 ],11377 "parameters": [11378 {11379 "name": "kind",11380 "in": "query",11381 "required": false,11382 "schema": {11383 "type": "string"11384 }11385 },11386 {11387 "name": "mode",11388 "in": "query",11389 "required": false,11390 "schema": {11391 "type": "string",11392 "enum": [11393 "live",11394 "paper",11395 "research"11396 ]11397 }11398 },11399 {11400 "name": "venue",11401 "in": "query",11402 "required": false,11403 "schema": {11404 "type": "string",11405 "minLength": 1,11406 "maxLength": 4011407 }11408 },11409 {11410 "name": "principal",11411 "in": "query",11412 "required": false,11413 "schema": {11414 "type": "string",11415 "enum": [11416 "owner",11417 "agent",11418 "api_key",11419 "system"11420 ]11421 }11422 },11423 {11424 "name": "from",11425 "in": "query",11426 "required": false,11427 "schema": {11428 "type": "string",11429 "maxLength": 4011430 }11431 },11432 {11433 "name": "to",11434 "in": "query",11435 "required": false,11436 "schema": {11437 "type": "string",11438 "maxLength": 4011439 }11440 },11441 {11442 "name": "network",11443 "in": "query",11444 "required": false,11445 "description": "NEXT: only the movements on this network id",11446 "schema": {11447 "type": "string",11448 "minLength": 1,11449 "maxLength": 20,11450 "pattern": "^[^\\u0000-\\u001f\\u007f]*$"11451 }11452 },11453 {11454 "name": "asset",11455 "in": "query",11456 "required": false,11457 "description": "NEXT: only the movements of this asset id (`native` or a contract / mint address); use it with `network`",11458 "schema": {11459 "type": "string",11460 "minLength": 1,11461 "maxLength": 130,11462 "pattern": "^[^\\u0000-\\u001f\\u007f]*$"11463 }11464 },11465 {11466 "name": "limit",11467 "in": "query",11468 "required": false,11469 "description": "rows returned at most",11470 "schema": {11471 "default": 50,11472 "type": "integer",11473 "minimum": 1,11474 "maximum": 20011475 }11476 },11477 {11478 "name": "cursor",11479 "in": "query",11480 "required": false,11481 "schema": {11482 "type": "string"11483 }11484 }11485 ],11486 "responses": {11487 "200": {11488 "description": "OK",11489 "content": {11490 "application/json": {11491 "schema": {11492 "type": "object",11493 "properties": {11494 "items": {11495 "type": "array",11496 "items": {11497 "type": "object",11498 "properties": {11499 "id": {11500 "type": "string"11501 },11502 "kind": {11503 "type": "string",11504 "description": "transfer, receive, swap, bridge, plan, order, agent, mandate, risk, key, security"11505 },11506 "source": {11507 "type": "string"11508 },11509 "at": {11510 "type": "string",11511 "description": "date-time, ISO 8601, UTC"11512 },11513 "mode": {11514 "type": [11515 "string",11516 "null"11517 ]11518 },11519 "venue": {11520 "type": [11521 "string",11522 "null"11523 ]11524 },11525 "network": {11526 "type": [11527 "string",11528 "null"11529 ]11530 },11531 "principal": {11532 "anyOf": [11533 {11534 "type": "object",11535 "properties": {11536 "kind": {11537 "type": "string"11538 },11539 "id": {11540 "type": "string"11541 }11542 },11543 "required": [11544 "kind",11545 "id"11546 ],11547 "additionalProperties": {}11548 },11549 {11550 "type": "null"11551 }11552 ]11553 },11554 "code": {11555 "type": "string"11556 },11557 "params": {11558 "type": "object",11559 "propertyNames": {11560 "type": "string"11561 },11562 "additionalProperties": {11563 "type": [11564 "string",11565 "number",11566 "boolean",11567 "null"11568 ]11569 }11570 },11571 "status": {11572 "type": [11573 "string",11574 "null"11575 ]11576 },11577 "instrument": {11578 "type": [11579 "string",11580 "null"11581 ]11582 },11583 "side": {11584 "type": [11585 "string",11586 "null"11587 ]11588 },11589 "amount": {11590 "anyOf": [11591 {11592 "type": "object",11593 "properties": {11594 "value": {11595 "type": "string"11596 },11597 "symbol": {11598 "type": [11599 "string",11600 "null"11601 ]11602 }11603 },11604 "required": [11605 "value",11606 "symbol"11607 ],11608 "additionalProperties": {}11609 },11610 {11611 "type": "null"11612 }11613 ]11614 },11615 "received": {11616 "anyOf": [11617 {11618 "type": "object",11619 "properties": {11620 "value": {11621 "type": "string"11622 },11623 "symbol": {11624 "type": [11625 "string",11626 "null"11627 ]11628 }11629 },11630 "required": [11631 "value",11632 "symbol"11633 ],11634 "additionalProperties": {}11635 },11636 {11637 "type": "null"11638 }11639 ]11640 },11641 "ref": {11642 "type": "object",11643 "properties": {11644 "type": {11645 "type": "string"11646 },11647 "id": {11648 "type": "string"11649 }11650 },11651 "required": [11652 "type",11653 "id"11654 ],11655 "additionalProperties": {}11656 },11657 "txid": {11658 "type": [11659 "string",11660 "null"11661 ]11662 },11663 "explorer": {11664 "type": [11665 "string",11666 "null"11667 ]11668 },11669 "wallet": {11670 "description": "wallet items: the row exactly as GET /activity answers it",11671 "anyOf": [11672 {11673 "$ref": "#/components/schemas/ActivityOperation"11674 },11675 {11676 "$ref": "#/components/schemas/ActivityReceipt"11677 }11678 ]11679 }11680 },11681 "required": [11682 "id",11683 "kind",11684 "source",11685 "at",11686 "mode",11687 "venue",11688 "network",11689 "principal",11690 "code",11691 "params",11692 "status",11693 "instrument",11694 "side",11695 "amount",11696 "received",11697 "ref",11698 "txid",11699 "explorer"11700 ],11701 "additionalProperties": {}11702 }11703 },11704 "nextCursor": {11705 "type": [11706 "string",11707 "null"11708 ]11709 },11710 "errors": {11711 "type": "array",11712 "items": {11713 "type": "object",11714 "properties": {11715 "source": {11716 "type": "string"11717 },11718 "code": {11719 "type": "string"11720 },11721 "message": {11722 "type": "string"11723 }11724 },11725 "required": [11726 "source",11727 "code",11728 "message"11729 ],11730 "additionalProperties": {}11731 }11732 },11733 "audit": {11734 "anyOf": [11735 {11736 "type": "object",11737 "properties": {11738 "intact": {11739 "type": "boolean"11740 },11741 "brokenAt": {11742 "type": [11743 "number",11744 "null"11745 ]11746 },11747 "total": {11748 "type": "number"11749 },11750 "checkedAt": {11751 "anyOf": [11752 {11753 "type": "integer",11754 "minimum": -9007199254740991,11755 "maximum": 9007199254740991,11756 "description": "milliseconds since the Unix epoch"11757 },11758 {11759 "type": "null"11760 }11761 ]11762 }11763 },11764 "required": [11765 "intact",11766 "brokenAt",11767 "total",11768 "checkedAt"11769 ],11770 "additionalProperties": {}11771 },11772 {11773 "type": "null"11774 }11775 ]11776 },11777 "bounds": {11778 "type": "object",11779 "properties": {11780 "perSource": {11781 "type": "integer",11782 "minimum": -9007199254740991,11783 "maximum": 900719925474099111784 },11785 "plans": {11786 "type": "integer",11787 "minimum": -9007199254740991,11788 "maximum": 900719925474099111789 }11790 },11791 "required": [11792 "perSource",11793 "plans"11794 ],11795 "additionalProperties": {}11796 },11797 "kinds": {11798 "type": "array",11799 "items": {11800 "type": "string"11801 }11802 },11803 "ts": {11804 "type": "integer",11805 "minimum": -9007199254740991,11806 "maximum": 9007199254740991,11807 "description": "milliseconds since the Unix epoch"11808 }11809 },11810 "required": [11811 "items",11812 "nextCursor",11813 "errors",11814 "audit",11815 "bounds",11816 "kinds",11817 "ts"11818 ],11819 "additionalProperties": {}11820 }11821 }11822 }11823 },11824 "400": {11825 "description": "The request is not valid: `bad_request`, `invalid_cursor`",11826 "content": {11827 "application/json": {11828 "schema": {11829 "$ref": "#/components/schemas/Error"11830 }11831 }11832 }11833 },11834 "401": {11835 "description": "No valid session: `unauthenticated`",11836 "content": {11837 "application/json": {11838 "schema": {11839 "$ref": "#/components/schemas/Error"11840 }11841 }11842 }11843 },11844 "403": {11845 "description": "Refused: `owner_only`",11846 "content": {11847 "application/json": {11848 "schema": {11849 "$ref": "#/components/schemas/Error"11850 }11851 }11852 }11853 },11854 "429": {11855 "description": "Too many requests: `rate_limited`",11856 "content": {11857 "application/json": {11858 "schema": {11859 "$ref": "#/components/schemas/Error"11860 }11861 }11862 }11863 },11864 "500": {11865 "description": "Server error: `internal`",11866 "content": {11867 "application/json": {11868 "schema": {11869 "$ref": "#/components/schemas/Error"11870 }11871 }11872 }11873 }11874 }11875 }11876 },11877 "/api/v1/dashboard/activity.csv": {11878 "get": {11879 "operationId": "dashboardActivityCsv",11880 "tags": [11881 "Dashboard"11882 ],11883 "summary": "The same history as CSV",11884 "description": "Columns are only ever appended. NEXT appended: lifecycle, fee_paid, fee_symbol, deposit_kind, deposit_origin, contact_label.",11885 "security": [11886 {11887 "session": []11888 }11889 ],11890 "x-spw-auth": "session",11891 "x-spw-csrf": false,11892 "x-spw-errors": [11893 {11894 "status": 400,11895 "code": "bad_request"11896 },11897 {11898 "status": 401,11899 "code": "unauthenticated"11900 },11901 {11902 "status": 403,11903 "code": "owner_only"11904 },11905 {11906 "status": 429,11907 "code": "rate_limited"11908 },11909 {11910 "status": 500,11911 "code": "internal"11912 }11913 ],11914 "parameters": [11915 {11916 "name": "kind",11917 "in": "query",11918 "required": false,11919 "schema": {11920 "type": "string"11921 }11922 },11923 {11924 "name": "mode",11925 "in": "query",11926 "required": false,11927 "schema": {11928 "type": "string",11929 "enum": [11930 "live",11931 "paper",11932 "research"11933 ]11934 }11935 },11936 {11937 "name": "venue",11938 "in": "query",11939 "required": false,11940 "schema": {11941 "type": "string",11942 "minLength": 1,11943 "maxLength": 4011944 }11945 },11946 {11947 "name": "principal",11948 "in": "query",11949 "required": false,11950 "schema": {11951 "type": "string",11952 "enum": [11953 "owner",11954 "agent",11955 "api_key",11956 "system"11957 ]11958 }11959 },11960 {11961 "name": "from",11962 "in": "query",11963 "required": false,11964 "schema": {11965 "type": "string",11966 "maxLength": 4011967 }11968 },11969 {11970 "name": "to",11971 "in": "query",11972 "required": false,11973 "schema": {11974 "type": "string",11975 "maxLength": 4011976 }11977 },11978 {11979 "name": "network",11980 "in": "query",11981 "required": false,11982 "description": "NEXT: only the movements on this network id",11983 "schema": {11984 "type": "string",11985 "minLength": 1,11986 "maxLength": 20,11987 "pattern": "^[^\\u0000-\\u001f\\u007f]*$"11988 }11989 },11990 {11991 "name": "asset",11992 "in": "query",11993 "required": false,11994 "description": "NEXT: only the movements of this asset id (`native` or a contract / mint address); use it with `network`",11995 "schema": {11996 "type": "string",11997 "minLength": 1,11998 "maxLength": 130,11999 "pattern": "^[^\\u0000-\\u001f\\u007f]*$"12000 }12001 }12002 ],12003 "responses": {12004 "200": {12005 "description": "OK",12006 "content": {12007 "text/csv": {12008 "schema": {12009 "type": "string"12010 }12011 }12012 }12013 },12014 "400": {12015 "description": "The request is not valid: `bad_request`",12016 "content": {12017 "application/json": {12018 "schema": {12019 "$ref": "#/components/schemas/Error"12020 }12021 }12022 }12023 },12024 "401": {12025 "description": "No valid session: `unauthenticated`",12026 "content": {12027 "application/json": {12028 "schema": {12029 "$ref": "#/components/schemas/Error"12030 }12031 }12032 }12033 },12034 "403": {12035 "description": "Refused: `owner_only`",12036 "content": {12037 "application/json": {12038 "schema": {12039 "$ref": "#/components/schemas/Error"12040 }12041 }12042 }12043 },12044 "429": {12045 "description": "Too many requests: `rate_limited`",12046 "content": {12047 "application/json": {12048 "schema": {12049 "$ref": "#/components/schemas/Error"12050 }12051 }12052 }12053 },12054 "500": {12055 "description": "Server error: `internal`",12056 "content": {12057 "application/json": {12058 "schema": {12059 "$ref": "#/components/schemas/Error"12060 }12061 }12062 }12063 }12064 }12065 }12066 },12067 "/api/v1/analytics": {12068 "get": {12069 "operationId": "getAnalytics",12070 "tags": [12071 "Analytics"12072 ],12073 "summary": "What entered and left, fees paid, outcomes, counterparties — from the database only",12074 "description": "Read-only, no chain or price call. Inflows are recorded deposits, outflows are FINAL operations. A fiat value exists only where a price was recorded when the movement was seen; the rest is counted in `unvalued` and left out. Nothing here is a return or a profit.",12075 "security": [12076 {12077 "session": []12078 }12079 ],12080 "x-spw-auth": "session",12081 "x-spw-csrf": false,12082 "x-spw-since": "next",12083 "x-spw-errors": [12084 {12085 "status": 400,12086 "code": "bad_request"12087 },12088 {12089 "status": 401,12090 "code": "unauthenticated"12091 },12092 {12093 "status": 429,12094 "code": "rate_limited"12095 },12096 {12097 "status": 500,12098 "code": "internal"12099 }12100 ],12101 "parameters": [12102 {12103 "name": "range",12104 "in": "query",12105 "required": false,12106 "schema": {12107 "default": "1M",12108 "type": "string",12109 "enum": [12110 "1M",12111 "3M",12112 "1Y",12113 "ALL"12114 ]12115 }12116 },12117 {12118 "name": "currency",12119 "in": "query",12120 "required": false,12121 "description": "default: the account setting",12122 "schema": {12123 "type": "string",12124 "enum": [12125 "USD",12126 "CAD"12127 ]12128 }12129 }12130 ],12131 "responses": {12132 "200": {12133 "description": "OK",12134 "content": {12135 "application/json": {12136 "schema": {12137 "$ref": "#/components/schemas/Analytics"12138 }12139 }12140 }12141 },12142 "400": {12143 "description": "The request is not valid: `bad_request`",12144 "content": {12145 "application/json": {12146 "schema": {12147 "$ref": "#/components/schemas/Error"12148 }12149 }12150 }12151 },12152 "401": {12153 "description": "No valid session: `unauthenticated`",12154 "content": {12155 "application/json": {12156 "schema": {12157 "$ref": "#/components/schemas/Error"12158 }12159 }12160 }12161 },12162 "429": {12163 "description": "Too many requests: `rate_limited`",12164 "content": {12165 "application/json": {12166 "schema": {12167 "$ref": "#/components/schemas/Error"12168 }12169 }12170 }12171 },12172 "500": {12173 "description": "Server error: `internal`",12174 "content": {12175 "application/json": {12176 "schema": {12177 "$ref": "#/components/schemas/Error"12178 }12179 }12180 }12181 }12182 }12183 }12184 },12185 "/api/v1/search": {12186 "get": {12187 "operationId": "search",12188 "tags": [12189 "Search"12190 ],12191 "summary": "Universal search: assets, contacts, transactions",12192 "description": "Assets by symbol, name, network or contract address; contacts by label, address or note; transactions by transaction id (prefix), address (from 4 characters) or exact amount. Database and registry only: nothing is sent to a third party.",12193 "security": [12194 {12195 "session": []12196 }12197 ],12198 "x-spw-auth": "session",12199 "x-spw-csrf": false,12200 "x-spw-since": "next",12201 "x-spw-errors": [12202 {12203 "status": 400,12204 "code": "bad_request"12205 },12206 {12207 "status": 401,12208 "code": "unauthenticated"12209 },12210 {12211 "status": 429,12212 "code": "rate_limited"12213 },12214 {12215 "status": 500,12216 "code": "internal"12217 }12218 ],12219 "parameters": [12220 {12221 "name": "q",12222 "in": "query",12223 "required": true,12224 "description": "at least 2 characters after trimming; no control character",12225 "schema": {12226 "type": "string",12227 "minLength": 2,12228 "maxLength": 120,12229 "pattern": "^[^\\u0000-\\u001f\\u007f]*$"12230 }12231 },12232 {12233 "name": "limit",12234 "in": "query",12235 "required": false,12236 "description": "results per group",12237 "schema": {12238 "default": 8,12239 "type": "integer",12240 "minimum": 1,12241 "maximum": 2512242 }12243 }12244 ],12245 "responses": {12246 "200": {12247 "description": "OK",12248 "content": {12249 "application/json": {12250 "schema": {12251 "$ref": "#/components/schemas/SearchResults"12252 }12253 }12254 }12255 },12256 "400": {12257 "description": "The request is not valid: `bad_request`",12258 "content": {12259 "application/json": {12260 "schema": {12261 "$ref": "#/components/schemas/Error"12262 }12263 }12264 }12265 },12266 "401": {12267 "description": "No valid session: `unauthenticated`",12268 "content": {12269 "application/json": {12270 "schema": {12271 "$ref": "#/components/schemas/Error"12272 }12273 }12274 }12275 },12276 "429": {12277 "description": "Too many requests: `rate_limited`",12278 "content": {12279 "application/json": {12280 "schema": {12281 "$ref": "#/components/schemas/Error"12282 }12283 }12284 }12285 },12286 "500": {12287 "description": "Server error: `internal`",12288 "content": {12289 "application/json": {12290 "schema": {12291 "$ref": "#/components/schemas/Error"12292 }12293 }12294 }12295 }12296 }12297 }12298 }12299 },12300 "components": {12301 "securitySchemes": {12302 "session": {12303 "type": "apiKey",12304 "in": "cookie",12305 "name": "__Host-spw",12306 "description": "Session cookie set by POST /api/v1/auth/login/verify. HttpOnly, Secure, SameSite=Strict."12307 }12308 },12309 "schemas": {12310 "ActivityOperation": {12311 "type": "object",12312 "properties": {12313 "id": {12314 "type": "string",12315 "format": "uuid",12316 "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"12317 },12318 "state": {12319 "$ref": "#/components/schemas/ProposalState"12320 },12321 "lifecycle": {12322 "$ref": "#/components/schemas/Lifecycle"12323 },12324 "finalized": {12325 "type": "boolean",12326 "description": "true exactly when the transaction is final"12327 },12328 "watched": {12329 "type": "boolean",12330 "description": "true for a dropped or replaced transfer the worker still re-checks"12331 },12332 "network": {12333 "type": "string"12334 },12335 "networkName": {12336 "type": "string"12337 },12338 "asset": {12339 "type": "string"12340 },12341 "symbol": {12342 "type": "string"12343 },12344 "decimals": {12345 "type": "integer",12346 "minimum": -9007199254740991,12347 "maximum": 900719925474099112348 },12349 "amount": {12350 "type": "string",12351 "description": "integer amount in base units, as a string"12352 },12353 "amountDisplay": {12354 "type": "string",12355 "description": "the same amount as a decimal string (exact arithmetic)"12356 },12357 "from": {12358 "type": "string"12359 },12360 "to": {12361 "type": "string"12362 },12363 "note": {12364 "type": "string"12365 },12366 "memo": {12367 "type": [12368 "string",12369 "null"12370 ]12371 },12372 "feeEstimate": {12373 "anyOf": [12374 {12375 "type": "string",12376 "description": "integer amount in base units, as a string"12377 },12378 {12379 "type": "null"12380 }12381 ],12382 "description": "ESTIMATE of the network fee, base units of the network's native coin"12383 },12384 "maxFee": {12385 "anyOf": [12386 {12387 "type": "string",12388 "description": "integer amount in base units, as a string"12389 },12390 {12391 "type": "null"12392 }12393 ],12394 "description": "ceiling the signer enforces"12395 },12396 "feeSymbol": {12397 "type": "string"12398 },12399 "feeDecimals": {12400 "type": "integer",12401 "minimum": -9007199254740991,12402 "maximum": 900719925474099112403 },12404 "feeDisplay": {12405 "anyOf": [12406 {12407 "type": "string",12408 "description": "the same amount as a decimal string (exact arithmetic)"12409 },12410 {12411 "type": "null"12412 }12413 ]12414 },12415 "maxFeeDisplay": {12416 "anyOf": [12417 {12418 "type": "string",12419 "description": "the same amount as a decimal string (exact arithmetic)"12420 },12421 {12422 "type": "null"12423 }12424 ]12425 },12426 "warnings": {12427 "type": "array",12428 "items": {12429 "$ref": "#/components/schemas/TransferWarning"12430 }12431 },12432 "intentHash": {12433 "description": "hex SHA-256 of the canonical intent: the passkey challenge",12434 "type": [12435 "string",12436 "null"12437 ]12438 },12439 "txid": {12440 "type": [12441 "string",12442 "null"12443 ]12444 },12445 "explorer": {12446 "type": [12447 "string",12448 "null"12449 ]12450 },12451 "confirmations": {12452 "type": "integer",12453 "minimum": -9007199254740991,12454 "maximum": 900719925474099112455 },12456 "error": {12457 "type": [12458 "string",12459 "null"12460 ]12461 },12462 "errorCode": {12463 "anyOf": [12464 {12465 "$ref": "#/components/schemas/ProposalErrorCode"12466 },12467 {12468 "type": "null"12469 }12470 ]12471 },12472 "errorParams": {12473 "anyOf": [12474 {12475 "type": "object",12476 "propertyNames": {12477 "type": "string"12478 },12479 "additionalProperties": {12480 "type": [12481 "string",12482 "number"12483 ]12484 }12485 },12486 {12487 "type": "null"12488 }12489 ]12490 },12491 "createdAt": {12492 "type": "string",12493 "description": "date-time, ISO 8601, UTC"12494 },12495 "updatedAt": {12496 "type": "string",12497 "description": "date-time, ISO 8601, UTC"12498 },12499 "expiresAt": {12500 "anyOf": [12501 {12502 "type": "string",12503 "description": "date-time, ISO 8601, UTC"12504 },12505 {12506 "type": "null"12507 }12508 ]12509 },12510 "broadcastAt": {12511 "anyOf": [12512 {12513 "type": "string",12514 "description": "date-time, ISO 8601, UTC"12515 },12516 {12517 "type": "null"12518 }12519 ]12520 },12521 "finalizedAt": {12522 "anyOf": [12523 {12524 "type": "string",12525 "description": "date-time, ISO 8601, UTC"12526 },12527 {12528 "type": "null"12529 }12530 ]12531 },12532 "relayAttemptedAt": {12533 "anyOf": [12534 {12535 "type": "string",12536 "description": "date-time, ISO 8601, UTC"12537 },12538 {12539 "type": "null"12540 }12541 ],12542 "description": "set BEFORE the first network call: from then on only the chain can say nothing was sent"12543 },12544 "feePaid": {12545 "anyOf": [12546 {12547 "type": "string",12548 "description": "integer amount in base units, as a string"12549 },12550 {12551 "type": "null"12552 }12553 ],12554 "description": "the fee the network actually charged; null until known (rows older than NEXT have none)"12555 },12556 "feePaidDisplay": {12557 "anyOf": [12558 {12559 "type": "string",12560 "description": "the same amount as a decimal string (exact arithmetic)"12561 },12562 {12563 "type": "null"12564 }12565 ]12566 },12567 "kind": {12568 "$ref": "#/components/schemas/ActivityRowKind"12569 },12570 "swap": {12571 "anyOf": [12572 {12573 "type": "object",12574 "properties": {},12575 "additionalProperties": {}12576 },12577 {12578 "type": "null"12579 }12580 ],12581 "description": "same-network swap detail (swap family)"12582 },12583 "bridge": {12584 "anyOf": [12585 {12586 "type": "object",12587 "properties": {},12588 "additionalProperties": {}12589 },12590 {12591 "type": "null"12592 }12593 ],12594 "description": "CCTP transfer detail (bridge family)"12595 },12596 "xswap": {12597 "anyOf": [12598 {12599 "type": "object",12600 "properties": {},12601 "additionalProperties": {}12602 },12603 {12604 "type": "null"12605 }12606 ],12607 "description": "native cross-chain swap detail (xswap family)"12608 },12609 "execution": {12610 "type": "object",12611 "properties": {12612 "kind": {12613 "type": "string"12614 },12615 "state": {12616 "type": "string",12617 "description": "pending, awaiting_approval, signing, sending, confirming, waiting, confirmed, failed, refunded, unknown"12618 },12619 "updatedAt": {12620 "anyOf": [12621 {12622 "type": "string",12623 "description": "date-time, ISO 8601, UTC"12624 },12625 {12626 "type": "null"12627 }12628 ]12629 },12630 "steps": {12631 "type": "array",12632 "items": {12633 "type": "object",12634 "properties": {12635 "id": {12636 "type": "string"12637 },12638 "kind": {12639 "type": "string"12640 },12641 "network": {12642 "type": "string"12643 },12644 "provider": {12645 "type": [12646 "string",12647 "null"12648 ]12649 },12650 "state": {12651 "type": "string"12652 },12653 "txid": {12654 "type": [12655 "string",12656 "null"12657 ]12658 },12659 "explorer": {12660 "type": [12661 "string",12662 "null"12663 ]12664 },12665 "startedAt": {12666 "anyOf": [12667 {12668 "type": "string",12669 "description": "date-time, ISO 8601, UTC"12670 },12671 {12672 "type": "null"12673 }12674 ]12675 },12676 "endedAt": {12677 "anyOf": [12678 {12679 "type": "string",12680 "description": "date-time, ISO 8601, UTC"12681 },12682 {12683 "type": "null"12684 }12685 ]12686 },12687 "code": {12688 "type": [12689 "string",12690 "null"12691 ]12692 }12693 },12694 "required": [12695 "id",12696 "kind",12697 "network",12698 "provider",12699 "state",12700 "txid",12701 "explorer",12702 "startedAt",12703 "endedAt",12704 "code"12705 ],12706 "additionalProperties": {}12707 }12708 }12709 },12710 "required": [12711 "kind",12712 "state",12713 "updatedAt",12714 "steps"12715 ],12716 "additionalProperties": {},12717 "description": "one status shape for every kind of operation"12718 },12719 "nft": {12720 "anyOf": [12721 {12722 "type": "object",12723 "properties": {},12724 "additionalProperties": {}12725 },12726 {12727 "type": "null"12728 }12729 ],12730 "description": "NFT transfer review (nft family)"12731 },12732 "quote": {12733 "anyOf": [12734 {12735 "type": "object",12736 "properties": {},12737 "additionalProperties": {}12738 },12739 {12740 "type": "null"12741 }12742 ],12743 "description": "the quote the owner was shown next to the firm figures (swap family)"12744 },12745 "rawKind": {12746 "$ref": "#/components/schemas/ProposalKind"12747 },12748 "at": {12749 "type": "string",12750 "description": "date-time, ISO 8601, UTC"12751 },12752 "contactLabel": {12753 "description": "NEXT: address-book label of `to`, when the address is a contact",12754 "type": [12755 "string",12756 "null"12757 ]12758 }12759 },12760 "required": [12761 "id",12762 "state",12763 "lifecycle",12764 "finalized",12765 "watched",12766 "network",12767 "networkName",12768 "asset",12769 "symbol",12770 "decimals",12771 "amount",12772 "amountDisplay",12773 "from",12774 "to",12775 "note",12776 "memo",12777 "feeEstimate",12778 "maxFee",12779 "feeSymbol",12780 "feeDecimals",12781 "feeDisplay",12782 "maxFeeDisplay",12783 "warnings",12784 "intentHash",12785 "txid",12786 "explorer",12787 "confirmations",12788 "error",12789 "errorCode",12790 "errorParams",12791 "createdAt",12792 "updatedAt",12793 "expiresAt",12794 "broadcastAt",12795 "finalizedAt",12796 "relayAttemptedAt",12797 "feePaid",12798 "feePaidDisplay",12799 "kind",12800 "swap",12801 "bridge",12802 "xswap",12803 "execution",12804 "nft",12805 "quote",12806 "rawKind",12807 "at",12808 "contactLabel"12809 ],12810 "additionalProperties": {}12811 },12812 "ActivityReceipt": {12813 "type": "object",12814 "properties": {12815 "kind": {12816 "type": "string",12817 "const": "receive"12818 },12819 "at": {12820 "type": "string",12821 "description": "date-time, ISO 8601, UTC"12822 },12823 "id": {12824 "type": "string",12825 "description": "`network:txid:index`"12826 },12827 "network": {12828 "type": "string"12829 },12830 "networkName": {12831 "type": "string"12832 },12833 "asset": {12834 "type": "string"12835 },12836 "symbol": {12837 "type": "string"12838 },12839 "decimals": {12840 "type": "integer",12841 "minimum": -9007199254740991,12842 "maximum": 900719925474099112843 },12844 "amount": {12845 "type": "string",12846 "description": "integer amount in base units, as a string"12847 },12848 "amountDisplay": {12849 "type": "string",12850 "description": "the same amount as a decimal string (exact arithmetic)"12851 },12852 "from": {12853 "type": "string",12854 "description": "sender; empty when the chain does not give one"12855 },12856 "txid": {12857 "type": "string",12858 "description": "transaction id — or a BLOCK hash when `txidIsBlock`"12859 },12860 "explorer": {12861 "type": "string"12862 },12863 "state": {12864 "type": "string",12865 "enum": [12866 "confirming",12867 "finalized"12868 ]12869 },12870 "depositKind": {12871 "$ref": "#/components/schemas/DepositKind"12872 },12873 "origin": {12874 "anyOf": [12875 {12876 "$ref": "#/components/schemas/DepositOrigin"12877 },12878 {12879 "type": "null"12880 }12881 ]12882 },12883 "proposalId": {12884 "type": [12885 "string",12886 "null"12887 ]12888 },12889 "detection": {12890 "anyOf": [12891 {12892 "$ref": "#/components/schemas/DepositDetection"12893 },12894 {12895 "type": "null"12896 }12897 ]12898 },12899 "txidIsBlock": {12900 "type": "boolean"12901 },12902 "blockHash": {12903 "type": [12904 "string",12905 "null"12906 ]12907 },12908 "block": {12909 "type": "number"12910 },12911 "contactLabel": {12912 "description": "NEXT: address-book label of `from`, when the address is a contact",12913 "type": [12914 "string",12915 "null"12916 ]12917 }12918 },12919 "required": [12920 "kind",12921 "at",12922 "id",12923 "network",12924 "networkName",12925 "asset",12926 "symbol",12927 "decimals",12928 "amount",12929 "amountDisplay",12930 "from",12931 "txid",12932 "explorer",12933 "state",12934 "depositKind",12935 "origin",12936 "proposalId",12937 "detection",12938 "txidIsBlock",12939 "blockHash",12940 "block",12941 "contactLabel"12942 ],12943 "additionalProperties": {}12944 },12945 "ActivityRowKind": {12946 "type": "string",12947 "description": "What a row of GET /activity is. `rawKind` keeps the stored proposal kind (xswap is shown with the swaps).",12948 "x-spw-open": true,12949 "x-spw-values": [12950 "send",12951 "receive",12952 "swap",12953 "bridge",12954 "gmx"12955 ]12956 },12957 "Alert": {12958 "type": "object",12959 "properties": {12960 "id": {12961 "type": "integer",12962 "minimum": -9007199254740991,12963 "maximum": 900719925474099112964 },12965 "ts": {12966 "type": "integer",12967 "minimum": -9007199254740991,12968 "maximum": 9007199254740991,12969 "description": "milliseconds since the Unix epoch"12970 },12971 "kind": {12972 "$ref": "#/components/schemas/AlertKind"12973 },12974 "severity": {12975 "$ref": "#/components/schemas/AlertSeverity"12976 },12977 "group": {12978 "$ref": "#/components/schemas/AlertGroup"12979 },12980 "params": {12981 "type": "object",12982 "propertyNames": {12983 "type": "string"12984 },12985 "additionalProperties": {12986 "type": [12987 "string",12988 "number",12989 "boolean",12990 "null"12991 ]12992 }12993 },12994 "subject": {12995 "anyOf": [12996 {12997 "type": "object",12998 "properties": {12999 "type": {13000 "type": "string"13001 },13002 "id": {13003 "type": "string"13004 },13005 "network": {13006 "type": "string"13007 }13008 },13009 "required": [13010 "type"13011 ],13012 "additionalProperties": {}13013 },13014 {13015 "type": "null"13016 }13017 ]13018 },13019 "count": {13020 "type": "integer",13021 "minimum": -9007199254740991,13022 "maximum": 900719925474099113023 },13024 "readAt": {13025 "anyOf": [13026 {13027 "type": "integer",13028 "minimum": -9007199254740991,13029 "maximum": 9007199254740991,13030 "description": "milliseconds since the Unix epoch"13031 },13032 {13033 "type": "null"13034 }13035 ]13036 },13037 "delivery": {13038 "type": "string",13039 "description": "pending, inapp, sent, quiet, capped, off…"13040 },13041 "channels": {13042 "type": "object",13043 "properties": {},13044 "additionalProperties": {}13045 }13046 },13047 "required": [13048 "id",13049 "ts",13050 "kind",13051 "severity",13052 "group",13053 "params",13054 "subject",13055 "count",13056 "readAt",13057 "delivery",13058 "channels"13059 ],13060 "additionalProperties": {}13061 },13062 "AlertGroup": {13063 "type": "string",13064 "description": "Group of an alert kind.",13065 "x-spw-open": true,13066 "x-spw-values": [13067 "transfers",13068 "agents",13069 "derivatives",13070 "security",13071 "system"13072 ]13073 },13074 "AlertKind": {13075 "type": "string",13076 "description": "Kind of an alert (packages/core/src/alert-catalog.ts, which also holds its FR / EN wording). A release adds kinds: show an unknown one with its `kind` and severity.",13077 "x-spw-open": true,13078 "x-spw-values": [13079 "transfer.confirmed",13080 "transfer.failed",13081 "transfer.dropped",13082 "transfer.replaced",13083 "transfer.expired",13084 "transfer.recovered",13085 "swap.confirmed",13086 "swap.failed",13087 "bridge.confirmed",13088 "bridge.failed",13089 "transfer.stuck",13090 "deposit.received",13091 "plan.step_ready",13092 "plan.paused",13093 "plan.done",13094 "agent.order_filled",13095 "agent.stopped_loss",13096 "agent.stopped_mandate",13097 "agent.stopped",13098 "agent.mm_breaker",13099 "agent.mm_halted",13100 "agent.mm_dead_man_switch",13101 "agent.mm_signer_refusals",13102 "agent.mm_rate_budget",13103 "agent.mm_session_ended",13104 "agent.mandate_revoked",13105 "agent.data_stale",13106 "agent.signal_failures",13107 "agent.research_submitted",13108 "agent.research_failed",13109 "mandate.expiring",13110 "deriv.paper.filled",13111 "deriv.live.filled",13112 "deriv.order_rejected",13113 "deriv.order_unknown",13114 "deriv.position_opened",13115 "deriv.position_closed",13116 "deriv.margin_warning",13117 "deriv.paper.liquidation",13118 "deriv.live.liquidation",13119 "deriv.funding",13120 "deriv.loss_limit",13121 "deriv.halt",13122 "deriv.divergence",13123 "deriv.divergence_cleared",13124 "deriv.asset_table_mismatch",13125 "security.passkey_added",13126 "security.passkey_revoked",13127 "security.credential_mismatch",13128 "security.new_device",13129 "security.login_failed",13130 "security.signer_unreachable",13131 "security.signer_back",13132 "security.signer_halted",13133 "security.signer_unhalted",13134 "security.kill_switch_on",13135 "security.kill_switch_off",13136 "security.signer_refused",13137 "security.pin_mismatch",13138 "security.audit_broken",13139 "security.policy_changed",13140 "system.api_restarted",13141 "system.worker_failing",13142 "system.backup_missing",13143 "system.disk_low",13144 "system.lab_sandbox_unavailable",13145 "system.lab_sandbox_back",13146 "system.lab_sandbox_off",13147 "conn.down",13148 "conn.up",13149 "system.alerts_capped",13150 "system.test"13151 ]13152 },13153 "AlertSeverity": {13154 "type": "string",13155 "enum": [13156 "info",13157 "warning",13158 "critical"13159 ],13160 "description": "Severity of an alert.",13161 "x-spw-open": false,13162 "x-spw-values": [13163 "info",13164 "warning",13165 "critical"13166 ]13167 },13168 "Analytics": {13169 "type": "object",13170 "properties": {13171 "range": {13172 "type": "string",13173 "enum": [13174 "1M",13175 "3M",13176 "1Y",13177 "ALL"13178 ]13179 },13180 "currency": {13181 "$ref": "#/components/schemas/Currency"13182 },13183 "from": {13184 "anyOf": [13185 {13186 "type": "string",13187 "description": "date-time, ISO 8601, UTC"13188 },13189 {13190 "type": "null"13191 }13192 ],13193 "description": "start of the period; null for ALL"13194 },13195 "to": {13196 "type": "string",13197 "description": "date-time, ISO 8601, UTC"13198 },13199 "asOf": {13200 "type": "string",13201 "description": "date-time, ISO 8601, UTC"13202 },13203 "flows": {13204 "type": "object",13205 "properties": {13206 "byAsset": {13207 "type": "array",13208 "items": {13209 "type": "object",13210 "properties": {13211 "network": {13212 "type": "string"13213 },13214 "networkName": {13215 "type": "string"13216 },13217 "asset": {13218 "type": "string"13219 },13220 "symbol": {13221 "type": "string"13222 },13223 "decimals": {13224 "type": "integer",13225 "minimum": -9007199254740991,13226 "maximum": 900719925474099113227 },13228 "in": {13229 "type": "object",13230 "properties": {13231 "external": {13232 "type": "object",13233 "properties": {13234 "count": {13235 "type": "integer",13236 "minimum": -9007199254740991,13237 "maximum": 900719925474099113238 },13239 "amount": {13240 "type": "string",13241 "description": "integer amount in base units, as a string"13242 },13243 "display": {13244 "type": "string",13245 "description": "the same amount as a decimal string (exact arithmetic)"13246 },13247 "value": {13248 "anyOf": [13249 {13250 "type": "string",13251 "description": "amount in the display currency, a decimal string with 2 decimals"13252 },13253 {13254 "type": "null"13255 }13256 ],13257 "description": "fiat value of the movements of this bucket that HAVE a recorded price; null when none has"13258 },13259 "valued": {13260 "type": "integer",13261 "minimum": -9007199254740991,13262 "maximum": 9007199254740991,13263 "description": "movements with a recorded price (in `value`)"13264 },13265 "unvalued": {13266 "type": "integer",13267 "minimum": -9007199254740991,13268 "maximum": 9007199254740991,13269 "description": "movements without one (NOT in `value`)"13270 }13271 },13272 "required": [13273 "count",13274 "amount",13275 "display",13276 "value",13277 "valued",13278 "unvalued"13279 ],13280 "additionalProperties": {}13281 },13282 "internal": {13283 "type": "object",13284 "properties": {13285 "count": {13286 "type": "integer",13287 "minimum": -9007199254740991,13288 "maximum": 900719925474099113289 },13290 "amount": {13291 "type": "string",13292 "description": "integer amount in base units, as a string"13293 },13294 "display": {13295 "type": "string",13296 "description": "the same amount as a decimal string (exact arithmetic)"13297 },13298 "value": {13299 "anyOf": [13300 {13301 "type": "string",13302 "description": "amount in the display currency, a decimal string with 2 decimals"13303 },13304 {13305 "type": "null"13306 }13307 ],13308 "description": "fiat value of the movements of this bucket that HAVE a recorded price; null when none has"13309 },13310 "valued": {13311 "type": "integer",13312 "minimum": -9007199254740991,13313 "maximum": 9007199254740991,13314 "description": "movements with a recorded price (in `value`)"13315 },13316 "unvalued": {13317 "type": "integer",13318 "minimum": -9007199254740991,13319 "maximum": 9007199254740991,13320 "description": "movements without one (NOT in `value`)"13321 }13322 },13323 "required": [13324 "count",13325 "amount",13326 "display",13327 "value",13328 "valued",13329 "unvalued"13330 ],13331 "additionalProperties": {}13332 },13333 "ownAccounts": {13334 "type": "object",13335 "properties": {13336 "count": {13337 "type": "integer",13338 "minimum": -9007199254740991,13339 "maximum": 900719925474099113340 },13341 "amount": {13342 "type": "string",13343 "description": "integer amount in base units, as a string"13344 },13345 "display": {13346 "type": "string",13347 "description": "the same amount as a decimal string (exact arithmetic)"13348 },13349 "value": {13350 "anyOf": [13351 {13352 "type": "string",13353 "description": "amount in the display currency, a decimal string with 2 decimals"13354 },13355 {13356 "type": "null"13357 }13358 ],13359 "description": "fiat value of the movements of this bucket that HAVE a recorded price; null when none has"13360 },13361 "valued": {13362 "type": "integer",13363 "minimum": -9007199254740991,13364 "maximum": 9007199254740991,13365 "description": "movements with a recorded price (in `value`)"13366 },13367 "unvalued": {13368 "type": "integer",13369 "minimum": -9007199254740991,13370 "maximum": 9007199254740991,13371 "description": "movements without one (NOT in `value`)"13372 }13373 },13374 "required": [13375 "count",13376 "amount",13377 "display",13378 "value",13379 "valued",13380 "unvalued"13381 ],13382 "additionalProperties": {}13383 }13384 },13385 "required": [13386 "external",13387 "internal",13388 "ownAccounts"13389 ],13390 "additionalProperties": {}13391 },13392 "out": {13393 "type": "object",13394 "properties": {13395 "external": {13396 "type": "object",13397 "properties": {13398 "count": {13399 "type": "integer",13400 "minimum": -9007199254740991,13401 "maximum": 900719925474099113402 },13403 "amount": {13404 "type": "string",13405 "description": "integer amount in base units, as a string"13406 },13407 "display": {13408 "type": "string",13409 "description": "the same amount as a decimal string (exact arithmetic)"13410 },13411 "value": {13412 "anyOf": [13413 {13414 "type": "string",13415 "description": "amount in the display currency, a decimal string with 2 decimals"13416 },13417 {13418 "type": "null"13419 }13420 ],13421 "description": "fiat value of the movements of this bucket that HAVE a recorded price; null when none has"13422 },13423 "valued": {13424 "type": "integer",13425 "minimum": -9007199254740991,13426 "maximum": 9007199254740991,13427 "description": "movements with a recorded price (in `value`)"13428 },13429 "unvalued": {13430 "type": "integer",13431 "minimum": -9007199254740991,13432 "maximum": 9007199254740991,13433 "description": "movements without one (NOT in `value`)"13434 }13435 },13436 "required": [13437 "count",13438 "amount",13439 "display",13440 "value",13441 "valued",13442 "unvalued"13443 ],13444 "additionalProperties": {}13445 },13446 "internal": {13447 "type": "object",13448 "properties": {13449 "count": {13450 "type": "integer",13451 "minimum": -9007199254740991,13452 "maximum": 900719925474099113453 },13454 "amount": {13455 "type": "string",13456 "description": "integer amount in base units, as a string"13457 },13458 "display": {13459 "type": "string",13460 "description": "the same amount as a decimal string (exact arithmetic)"13461 },13462 "value": {13463 "anyOf": [13464 {13465 "type": "string",13466 "description": "amount in the display currency, a decimal string with 2 decimals"13467 },13468 {13469 "type": "null"13470 }13471 ],13472 "description": "fiat value of the movements of this bucket that HAVE a recorded price; null when none has"13473 },13474 "valued": {13475 "type": "integer",13476 "minimum": -9007199254740991,13477 "maximum": 9007199254740991,13478 "description": "movements with a recorded price (in `value`)"13479 },13480 "unvalued": {13481 "type": "integer",13482 "minimum": -9007199254740991,13483 "maximum": 9007199254740991,13484 "description": "movements without one (NOT in `value`)"13485 }13486 },13487 "required": [13488 "count",13489 "amount",13490 "display",13491 "value",13492 "valued",13493 "unvalued"13494 ],13495 "additionalProperties": {}13496 },13497 "ownAccounts": {13498 "type": "object",13499 "properties": {13500 "count": {13501 "type": "integer",13502 "minimum": -9007199254740991,13503 "maximum": 900719925474099113504 },13505 "amount": {13506 "type": "string",13507 "description": "integer amount in base units, as a string"13508 },13509 "display": {13510 "type": "string",13511 "description": "the same amount as a decimal string (exact arithmetic)"13512 },13513 "value": {13514 "anyOf": [13515 {13516 "type": "string",13517 "description": "amount in the display currency, a decimal string with 2 decimals"13518 },13519 {13520 "type": "null"13521 }13522 ],13523 "description": "fiat value of the movements of this bucket that HAVE a recorded price; null when none has"13524 },13525 "valued": {13526 "type": "integer",13527 "minimum": -9007199254740991,13528 "maximum": 9007199254740991,13529 "description": "movements with a recorded price (in `value`)"13530 },13531 "unvalued": {13532 "type": "integer",13533 "minimum": -9007199254740991,13534 "maximum": 9007199254740991,13535 "description": "movements without one (NOT in `value`)"13536 }13537 },13538 "required": [13539 "count",13540 "amount",13541 "display",13542 "value",13543 "valued",13544 "unvalued"13545 ],13546 "additionalProperties": {}13547 }13548 },13549 "required": [13550 "external",13551 "internal",13552 "ownAccounts"13553 ],13554 "additionalProperties": {}13555 }13556 },13557 "required": [13558 "network",13559 "networkName",13560 "asset",13561 "symbol",13562 "decimals",13563 "in",13564 "out"13565 ],13566 "additionalProperties": {}13567 }13568 },13569 "byNetwork": {13570 "type": "array",13571 "items": {13572 "type": "object",13573 "properties": {13574 "network": {13575 "type": "string"13576 },13577 "networkName": {13578 "type": "string"13579 },13580 "in": {13581 "type": "object",13582 "properties": {13583 "external": {13584 "type": "integer",13585 "minimum": -9007199254740991,13586 "maximum": 900719925474099113587 },13588 "internal": {13589 "type": "integer",13590 "minimum": -9007199254740991,13591 "maximum": 900719925474099113592 },13593 "ownAccounts": {13594 "type": "integer",13595 "minimum": -9007199254740991,13596 "maximum": 900719925474099113597 }13598 },13599 "required": [13600 "external",13601 "internal",13602 "ownAccounts"13603 ],13604 "additionalProperties": {}13605 },13606 "out": {13607 "type": "object",13608 "properties": {13609 "external": {13610 "type": "integer",13611 "minimum": -9007199254740991,13612 "maximum": 900719925474099113613 },13614 "internal": {13615 "type": "integer",13616 "minimum": -9007199254740991,13617 "maximum": 900719925474099113618 },13619 "ownAccounts": {13620 "type": "integer",13621 "minimum": -9007199254740991,13622 "maximum": 900719925474099113623 }13624 },13625 "required": [13626 "external",13627 "internal",13628 "ownAccounts"13629 ],13630 "additionalProperties": {}13631 }13632 },13633 "required": [13634 "network",13635 "networkName",13636 "in",13637 "out"13638 ],13639 "additionalProperties": {}13640 },13641 "description": "movement COUNTS per network (amounts of different assets are never added)"13642 },13643 "fiat": {13644 "type": "object",13645 "properties": {13646 "in": {13647 "type": "object",13648 "properties": {13649 "external": {13650 "type": "object",13651 "properties": {13652 "value": {13653 "type": "string",13654 "description": "amount in the display currency, a decimal string with 2 decimals"13655 },13656 "valued": {13657 "type": "integer",13658 "minimum": -9007199254740991,13659 "maximum": 900719925474099113660 },13661 "unvalued": {13662 "type": "integer",13663 "minimum": -9007199254740991,13664 "maximum": 900719925474099113665 },13666 "complete": {13667 "type": "boolean",13668 "description": "false: some movements have no recorded price and are not in `value`"13669 }13670 },13671 "required": [13672 "value",13673 "valued",13674 "unvalued",13675 "complete"13676 ],13677 "additionalProperties": {}13678 },13679 "ownAccounts": {13680 "type": "object",13681 "properties": {13682 "value": {13683 "type": "string",13684 "description": "amount in the display currency, a decimal string with 2 decimals"13685 },13686 "valued": {13687 "type": "integer",13688 "minimum": -9007199254740991,13689 "maximum": 900719925474099113690 },13691 "unvalued": {13692 "type": "integer",13693 "minimum": -9007199254740991,13694 "maximum": 900719925474099113695 },13696 "complete": {13697 "type": "boolean",13698 "description": "false: some movements have no recorded price and are not in `value`"13699 }13700 },13701 "required": [13702 "value",13703 "valued",13704 "unvalued",13705 "complete"13706 ],13707 "additionalProperties": {}13708 }13709 },13710 "required": [13711 "external",13712 "ownAccounts"13713 ],13714 "additionalProperties": {}13715 },13716 "out": {13717 "type": "object",13718 "properties": {13719 "external": {13720 "type": "object",13721 "properties": {13722 "value": {13723 "type": "string",13724 "description": "amount in the display currency, a decimal string with 2 decimals"13725 },13726 "valued": {13727 "type": "integer",13728 "minimum": -9007199254740991,13729 "maximum": 900719925474099113730 },13731 "unvalued": {13732 "type": "integer",13733 "minimum": -9007199254740991,13734 "maximum": 900719925474099113735 },13736 "complete": {13737 "type": "boolean",13738 "description": "false: some movements have no recorded price and are not in `value`"13739 }13740 },13741 "required": [13742 "value",13743 "valued",13744 "unvalued",13745 "complete"13746 ],13747 "additionalProperties": {}13748 },13749 "ownAccounts": {13750 "type": "object",13751 "properties": {13752 "value": {13753 "type": "string",13754 "description": "amount in the display currency, a decimal string with 2 decimals"13755 },13756 "valued": {13757 "type": "integer",13758 "minimum": -9007199254740991,13759 "maximum": 900719925474099113760 },13761 "unvalued": {13762 "type": "integer",13763 "minimum": -9007199254740991,13764 "maximum": 900719925474099113765 },13766 "complete": {13767 "type": "boolean",13768 "description": "false: some movements have no recorded price and are not in `value`"13769 }13770 },13771 "required": [13772 "value",13773 "valued",13774 "unvalued",13775 "complete"13776 ],13777 "additionalProperties": {}13778 }13779 },13780 "required": [13781 "external",13782 "ownAccounts"13783 ],13784 "additionalProperties": {}13785 },13786 "method": {13787 "type": "string",13788 "const": "price_recorded_when_seen"13789 },13790 "note": {13791 "type": "string"13792 }13793 },13794 "required": [13795 "in",13796 "out",13797 "method",13798 "note"13799 ],13800 "additionalProperties": {},13801 "description": "fiat totals of what entered and left, from the prices recorded when each movement was seen. Internal movements are not valued: nothing entered or left"13802 },13803 "basis": {13804 "type": "object",13805 "properties": {13806 "in": {13807 "type": "string"13808 },13809 "out": {13810 "type": "string"13811 },13812 "classification": {13813 "type": "string"13814 }13815 },13816 "required": [13817 "in",13818 "out",13819 "classification"13820 ],13821 "additionalProperties": {}13822 }13823 },13824 "required": [13825 "byAsset",13826 "byNetwork",13827 "fiat",13828 "basis"13829 ],13830 "additionalProperties": {}13831 },13832 "fees": {13833 "type": "object",13834 "properties": {13835 "byNetwork": {13836 "type": "array",13837 "items": {13838 "type": "object",13839 "properties": {13840 "network": {13841 "type": "string"13842 },13843 "networkName": {13844 "type": "string"13845 },13846 "symbol": {13847 "type": "string"13848 },13849 "decimals": {13850 "type": "integer",13851 "minimum": -9007199254740991,13852 "maximum": 900719925474099113853 },13854 "paid": {13855 "type": "string",13856 "description": "sum of the fees the network charged, where recorded"13857 },13858 "paidDisplay": {13859 "type": "string",13860 "description": "the same amount as a decimal string (exact arithmetic)"13861 },13862 "known": {13863 "type": "integer",13864 "minimum": -9007199254740991,13865 "maximum": 9007199254740991,13866 "description": "on-chain transactions whose fee is recorded (in `paid`)"13867 },13868 "unknown": {13869 "type": "integer",13870 "minimum": -9007199254740991,13871 "maximum": 9007199254740991,13872 "description": "on-chain transactions whose fee was never recorded (older rows): NOT in `paid`"13873 },13874 "complete": {13875 "type": "boolean"13876 }13877 },13878 "required": [13879 "network",13880 "networkName",13881 "symbol",13882 "decimals",13883 "paid",13884 "paidDisplay",13885 "known",13886 "unknown",13887 "complete"13888 ],13889 "additionalProperties": {}13890 }13891 },13892 "covers": {13893 "type": "string"13894 },13895 "fiat": {13896 "type": "null",13897 "description": "fees are not valued: no price is recorded with a fee"13898 }13899 },13900 "required": [13901 "byNetwork",13902 "covers",13903 "fiat"13904 ],13905 "additionalProperties": {}13906 },13907 "outcomes": {13908 "type": "object",13909 "properties": {13910 "total": {13911 "type": "integer",13912 "minimum": -9007199254740991,13913 "maximum": 900719925474099113914 },13915 "byLifecycle": {13916 "type": "array",13917 "items": {13918 "type": "object",13919 "properties": {13920 "lifecycle": {13921 "$ref": "#/components/schemas/Lifecycle"13922 },13923 "count": {13924 "type": "integer",13925 "minimum": -9007199254740991,13926 "maximum": 900719925474099113927 }13928 },13929 "required": [13930 "lifecycle",13931 "count"13932 ],13933 "additionalProperties": {}13934 }13935 },13936 "byKind": {13937 "type": "array",13938 "items": {13939 "type": "object",13940 "properties": {13941 "kind": {13942 "$ref": "#/components/schemas/ProposalKind"13943 },13944 "count": {13945 "type": "integer",13946 "minimum": -9007199254740991,13947 "maximum": 900719925474099113948 }13949 },13950 "required": [13951 "kind",13952 "count"13953 ],13954 "additionalProperties": {}13955 }13956 },13957 "basis": {13958 "type": "string"13959 }13960 },13961 "required": [13962 "total",13963 "byLifecycle",13964 "byKind",13965 "basis"13966 ],13967 "additionalProperties": {}13968 },13969 "counterparties": {13970 "type": "object",13971 "properties": {13972 "sentTo": {13973 "type": "array",13974 "items": {13975 "type": "object",13976 "properties": {13977 "network": {13978 "type": "string"13979 },13980 "address": {13981 "type": "string"13982 },13983 "contactLabel": {13984 "type": [13985 "string",13986 "null"13987 ]13988 },13989 "count": {13990 "type": "integer",13991 "minimum": -9007199254740991,13992 "maximum": 900719925474099113993 },13994 "lastAt": {13995 "type": "string",13996 "description": "date-time, ISO 8601, UTC"13997 },13998 "assets": {13999 "type": "array",14000 "items": {14001 "type": "object",14002 "properties": {14003 "asset": {14004 "type": "string"14005 },14006 "symbol": {14007 "type": "string"14008 },14009 "amount": {14010 "type": "string",14011 "description": "integer amount in base units, as a string"14012 },14013 "display": {14014 "type": "string",14015 "description": "the same amount as a decimal string (exact arithmetic)"14016 },14017 "count": {14018 "type": "integer",14019 "minimum": -9007199254740991,14020 "maximum": 900719925474099114021 }14022 },14023 "required": [14024 "asset",14025 "symbol",14026 "amount",14027 "display",14028 "count"14029 ],14030 "additionalProperties": {}14031 }14032 }14033 },14034 "required": [14035 "network",14036 "address",14037 "contactLabel",14038 "count",14039 "lastAt",14040 "assets"14041 ],14042 "additionalProperties": {}14043 }14044 },14045 "receivedFrom": {14046 "type": "array",14047 "items": {14048 "type": "object",14049 "properties": {14050 "network": {14051 "type": "string"14052 },14053 "address": {14054 "type": "string"14055 },14056 "contactLabel": {14057 "type": [14058 "string",14059 "null"14060 ]14061 },14062 "count": {14063 "type": "integer",14064 "minimum": -9007199254740991,14065 "maximum": 900719925474099114066 },14067 "lastAt": {14068 "type": "string",14069 "description": "date-time, ISO 8601, UTC"14070 },14071 "assets": {14072 "type": "array",14073 "items": {14074 "type": "object",14075 "properties": {14076 "asset": {14077 "type": "string"14078 },14079 "symbol": {14080 "type": "string"14081 },14082 "amount": {14083 "type": "string",14084 "description": "integer amount in base units, as a string"14085 },14086 "display": {14087 "type": "string",14088 "description": "the same amount as a decimal string (exact arithmetic)"14089 },14090 "count": {14091 "type": "integer",14092 "minimum": -9007199254740991,14093 "maximum": 900719925474099114094 }14095 },14096 "required": [14097 "asset",14098 "symbol",14099 "amount",14100 "display",14101 "count"14102 ],14103 "additionalProperties": {}14104 }14105 }14106 },14107 "required": [14108 "network",14109 "address",14110 "contactLabel",14111 "count",14112 "lastAt",14113 "assets"14114 ],14115 "additionalProperties": {}14116 }14117 },14118 "limit": {14119 "type": "integer",14120 "minimum": -9007199254740991,14121 "maximum": 900719925474099114122 },14123 "rankedBy": {14124 "type": "string",14125 "const": "count"14126 }14127 },14128 "required": [14129 "sentTo",14130 "receivedFrom",14131 "limit",14132 "rankedBy"14133 ],14134 "additionalProperties": {}14135 },14136 "disclaimer": {14137 "type": "string",14138 "description": "says what these figures are not"14139 }14140 },14141 "required": [14142 "range",14143 "currency",14144 "from",14145 "to",14146 "asOf",14147 "flows",14148 "fees",14149 "outcomes",14150 "counterparties",14151 "disclaimer"14152 ],14153 "additionalProperties": {}14154 },14155 "Contact": {14156 "type": "object",14157 "properties": {14158 "id": {14159 "type": "string",14160 "format": "uuid",14161 "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"14162 },14163 "network": {14164 "type": "string"14165 },14166 "address": {14167 "type": "string"14168 },14169 "label": {14170 "type": "string"14171 },14172 "note": {14173 "type": "string"14174 },14175 "favorite": {14176 "type": "boolean"14177 },14178 "created_at": {14179 "type": "string",14180 "description": "date-time, ISO 8601, UTC"14181 },14182 "updatedAt": {14183 "anyOf": [14184 {14185 "type": "string",14186 "description": "date-time, ISO 8601, UTC"14187 },14188 {14189 "type": "null"14190 }14191 ]14192 }14193 },14194 "required": [14195 "id",14196 "network",14197 "address",14198 "label",14199 "note",14200 "favorite",14201 "created_at",14202 "updatedAt"14203 ],14204 "additionalProperties": {}14205 },14206 "CredentialRequest": {14207 "type": "object",14208 "properties": {14209 "v": {14210 "type": "number",14211 "const": 214212 },14213 "action": {14214 "type": "string",14215 "enum": [14216 "add",14217 "revoke"14218 ]14219 },14220 "requestId": {14221 "type": "string",14222 "format": "uuid",14223 "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",14224 "description": "single use: the signer records it and refuses it a second time"14225 },14226 "keyId": {14227 "type": "string",14228 "description": "the signer this request is for"14229 },14230 "credentialId": {14231 "type": "string",14232 "description": "WebAuthn credential id, base64url: the passkey to add, or the one to revoke"14233 },14234 "publicKey": {14235 "description": "`add` only: COSE public key of the new passkey, base64url",14236 "type": "string"14237 },14238 "createdAt": {14239 "type": "integer",14240 "minimum": -9007199254740991,14241 "maximum": 9007199254740991,14242 "description": "Unix seconds"14243 },14244 "expiresAt": {14245 "type": "integer",14246 "minimum": -9007199254740991,14247 "maximum": 9007199254740991,14248 "description": "Unix seconds; at most 300 s after createdAt"14249 }14250 },14251 "required": [14252 "v",14253 "action",14254 "requestId",14255 "keyId",14256 "credentialId",14257 "createdAt",14258 "expiresAt"14259 ],14260 "additionalProperties": {},14261 "description": "The canonical credential request. The WebAuthn challenge of `options` is the SHA-256 of its domain-separated, length-prefixed serialisation (domain `SPW-CRED-v2`; fields v, action, requestId, keyId, credentialId, publicKey — empty for a revocation —, createdAt, expiresAt, in that order). A client that shows or re-derives what is being approved reads it here; the signer verifies the approval itself."14262 },14263 "Currency": {14264 "type": "string",14265 "enum": [14266 "USD",14267 "CAD"14268 ],14269 "description": "Display currency.",14270 "x-spw-open": false,14271 "x-spw-values": [14272 "USD",14273 "CAD"14274 ]14275 },14276 "DepositDetection": {14277 "type": "string",14278 "description": "How a native-coin deposit was located: its transaction, a contract call inside a block, or a balance difference over a block window (`txidIsBlock`).",14279 "x-spw-open": true,14280 "x-spw-values": [14281 "tx",14282 "internal_call",14283 "aggregate"14284 ]14285 },14286 "DepositKind": {14287 "type": "string",14288 "description": "external = someone paid the wallet; internal = the result of one of the wallet's own operations (`origin` says which).",14289 "x-spw-open": true,14290 "x-spw-values": [14291 "external",14292 "internal"14293 ]14294 },14295 "DepositOrigin": {14296 "type": "string",14297 "description": "The own operation an internal deposit comes from. `agent_withdrawal` and `venue_withdrawal` come back from the owner's own accounts outside the wallet.",14298 "x-spw-open": true,14299 "x-spw-values": [14300 "transfer",14301 "swap",14302 "bridge",14303 "xswap",14304 "gmx",14305 "nft",14306 "agent_withdrawal",14307 "venue_withdrawal"14308 ]14309 },14310 "Error": {14311 "type": "object",14312 "properties": {14313 "error": {14314 "type": "string",14315 "description": "stable machine code: one of the operation's `x-spw-errors` (catalogue: `x-spw-error-catalog`)"14316 },14317 "message": {14318 "type": "string",14319 "description": "sentence in English; a client translates the code, not the sentence"14320 },14321 "data": {14322 "description": "machine-readable detail of a refusal",14323 "type": "object",14324 "properties": {14325 "fields": {14326 "description": "`bad_request` from input validation: one entry per refused member (at most 20)",14327 "type": "array",14328 "items": {14329 "type": "object",14330 "properties": {14331 "path": {14332 "type": "string",14333 "description": "dotted path of the member in the body, the query or the path parameters; empty for the request as a whole"14334 },14335 "code": {14336 "type": "string",14337 "description": "zod issue code: invalid_type, too_small, too_big, invalid_format, invalid_value, unrecognized_keys, invalid_union, custom…"14338 },14339 "message": {14340 "type": "string",14341 "description": "what is expected — never the value that was sent"14342 }14343 },14344 "required": [14345 "path",14346 "code",14347 "message"14348 ],14349 "additionalProperties": {}14350 }14351 }14352 },14353 "additionalProperties": {}14354 }14355 },14356 "required": [14357 "error",14358 "message"14359 ],14360 "additionalProperties": {}14361 },14362 "EventType": {14363 "type": "string",14364 "description": "Types of the wallet event log. Every audit type matching deposit.*, device.*, session(s).*, addressbook.*, settings.*, halt.*, security.* is mirrored: new types appear without notice.",14365 "x-spw-open": true,14366 "x-spw-values": [14367 "transfer.state",14368 "transfer.relay",14369 "transfer.confirmations",14370 "deposit.seen",14371 "deposit.native_window",14372 "deposit.scan_gap",14373 "device.added",14374 "device.revoked",14375 "session.revoked",14376 "credentials.mismatch",14377 "credentials.reconciled",14378 "settings.saved",14379 "sessions.revoked",14380 "login.ok",14381 "owner.setup",14382 "addressbook.saved",14383 "addressbook.removed",14384 "settings.asset_pref",14385 "halt.on",14386 "security.contact_address_changed"14387 ],14388 "x-spw-value-docs": {14389 "transfer.state": "a proposal changed state — `data`: `{ from, to, lifecycle, network, kind, txid, confirmations, errorCode }`; `ref` = proposal id",14390 "transfer.relay": "a relay of the signed transaction to the network started (its outcome is not known yet) — `data`: `{ network, lifecycle: \"broadcasting\", txid }`",14391 "transfer.confirmations": "the confirmation count of a tracked transaction changed — `data`: `{ network, confirmations, txid }`",14392 "deposit.seen": "an incoming payment was recorded — `data`: `{ network, txid, asset, amount, kind, origin?, proposal?, detection? }`",14393 "deposit.native_window": "EVM native-coin scan: a balance difference was located to a block window, not to a transaction",14394 "deposit.scan_gap": "a transaction of the deposit scan is no longer served by any source",14395 "device.added": "a passkey was added — `data`: `{ credential, label }`",14396 "device.revoked": "a passkey was revoked — `data`: `{ credential, label, signer, sessions, ip }` (`signer`: it was on the signer's list; `sessions`: sessions it had opened, ended with it)",14397 "session.revoked": "one session was revoked by its public id — `data`: `{ session, current, ip }`",14398 "credentials.mismatch": "the signer's passkey list and the API's differ, and still did 30 s later — `data`: `{ count, signerOnly, apiOnly }` (12-character id prefixes)",14399 "credentials.reconciled": "the two passkey lists agree again",14400 "settings.saved": "account settings changed — `data`: `{ changed: { locale?, currency?, hideBalances?, prices?, theme? } }`: re-read GET /settings",14401 "sessions.revoked": "every session was revoked",14402 "login.ok": "a sign-in succeeded — `data`: `{ credential, ip, label, device, newDevice, session }`",14403 "owner.setup": "the first passkey was enrolled (one-time setup)",14404 "addressbook.saved": "a contact was created or changed — `data`: `{ network, address, label }`",14405 "addressbook.removed": "a contact was deleted",14406 "settings.asset_pref": "an asset was hidden / shown / made favourite — `data`: `{ network, asset, hidden, favorite }`",14407 "halt.on": "the emergency halt of the signer was triggered",14408 "security.contact_address_changed": "a contact now points to another address — `data`: `{ id, network, label, from, to }`"14409 }14410 },14411 "FlowScope": {14412 "type": "string",14413 "enum": [14414 "external",14415 "internal",14416 "ownAccounts"14417 ],14418 "description": "Classification of a movement: external (in from / out to someone else), internal (the wallet's own swaps, bridges, self-transfers: nothing entered or left), ownAccounts (to / from the owner's agent vaults and venue accounts).",14419 "x-spw-open": false,14420 "x-spw-values": [14421 "external",14422 "internal",14423 "ownAccounts"14424 ]14425 },14426 "Lifecycle": {14427 "type": "string",14428 "description": "The life cycle of a transfer as a client shows it — one vocabulary for web, macOS and iOS. Only `confirmed` means done.",14429 "x-spw-open": true,14430 "x-spw-values": [14431 "draft",14432 "awaiting_confirmation",14433 "awaiting_signature",14434 "signed",14435 "broadcasting",14436 "pending",14437 "confirming",14438 "confirmed",14439 "failed",14440 "replaced",14441 "dropped",14442 "expired",14443 "rejected",14444 "not_sent"14445 ],14446 "x-spw-value-docs": {14447 "draft": "prepared, nothing frozen; expires by itself",14448 "awaiting_confirmation": "the exact transaction is frozen and shown; the passkey has not been given",14449 "awaiting_signature": "the passkey was given; the signer call is in flight",14450 "signed": "signed; no relay to the network has started",14451 "broadcasting": "signed and a relay has started: from here only the chain can say that nothing was sent",14452 "pending": "handed to the network, not in a block yet",14453 "confirming": "in a block, not final (see `confirmations`); a reorganisation can still undo it",14454 "confirmed": "FINAL. The only value a client may treat as done",14455 "failed": "ended without effect, or reverted on-chain (`errorCode` says which)",14456 "replaced": "another transaction used the same nonce or coins. Still re-checked for a day (`watched`): it becomes confirming / confirmed if it turns out to be in a block",14457 "dropped": "no source knows it and nothing proves it dead. NOT a failure: it stays watched and is recorded if it appears; a new send on the network replaces it",14458 "expired": "the approval window passed before the passkey, or the validity window of the signed transaction closed on-chain (`errorCode: expired_onchain`); nothing moved",14459 "rejected": "rejected by the owner before signing",14460 "not_sent": "signed and deliberately not relayed (broadcasting is disabled on this server)"14461 }14462 },14463 "Proposal": {14464 "type": "object",14465 "properties": {14466 "id": {14467 "type": "string",14468 "format": "uuid",14469 "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"14470 },14471 "state": {14472 "$ref": "#/components/schemas/ProposalState"14473 },14474 "lifecycle": {14475 "$ref": "#/components/schemas/Lifecycle"14476 },14477 "finalized": {14478 "type": "boolean",14479 "description": "true exactly when the transaction is final"14480 },14481 "watched": {14482 "type": "boolean",14483 "description": "true for a dropped or replaced transfer the worker still re-checks"14484 },14485 "network": {14486 "type": "string"14487 },14488 "networkName": {14489 "type": "string"14490 },14491 "asset": {14492 "type": "string"14493 },14494 "symbol": {14495 "type": "string"14496 },14497 "decimals": {14498 "type": "integer",14499 "minimum": -9007199254740991,14500 "maximum": 900719925474099114501 },14502 "amount": {14503 "type": "string",14504 "description": "integer amount in base units, as a string"14505 },14506 "amountDisplay": {14507 "type": "string",14508 "description": "the same amount as a decimal string (exact arithmetic)"14509 },14510 "from": {14511 "type": "string"14512 },14513 "to": {14514 "type": "string"14515 },14516 "note": {14517 "type": "string"14518 },14519 "memo": {14520 "type": [14521 "string",14522 "null"14523 ]14524 },14525 "feeEstimate": {14526 "anyOf": [14527 {14528 "type": "string",14529 "description": "integer amount in base units, as a string"14530 },14531 {14532 "type": "null"14533 }14534 ],14535 "description": "ESTIMATE of the network fee, base units of the network's native coin"14536 },14537 "maxFee": {14538 "anyOf": [14539 {14540 "type": "string",14541 "description": "integer amount in base units, as a string"14542 },14543 {14544 "type": "null"14545 }14546 ],14547 "description": "ceiling the signer enforces"14548 },14549 "feeSymbol": {14550 "type": "string"14551 },14552 "feeDecimals": {14553 "type": "integer",14554 "minimum": -9007199254740991,14555 "maximum": 900719925474099114556 },14557 "feeDisplay": {14558 "anyOf": [14559 {14560 "type": "string",14561 "description": "the same amount as a decimal string (exact arithmetic)"14562 },14563 {14564 "type": "null"14565 }14566 ]14567 },14568 "maxFeeDisplay": {14569 "anyOf": [14570 {14571 "type": "string",14572 "description": "the same amount as a decimal string (exact arithmetic)"14573 },14574 {14575 "type": "null"14576 }14577 ]14578 },14579 "warnings": {14580 "type": "array",14581 "items": {14582 "$ref": "#/components/schemas/TransferWarning"14583 }14584 },14585 "intentHash": {14586 "description": "hex SHA-256 of the canonical intent: the passkey challenge",14587 "type": [14588 "string",14589 "null"14590 ]14591 },14592 "txid": {14593 "type": [14594 "string",14595 "null"14596 ]14597 },14598 "explorer": {14599 "type": [14600 "string",14601 "null"14602 ]14603 },14604 "confirmations": {14605 "type": "integer",14606 "minimum": -9007199254740991,14607 "maximum": 900719925474099114608 },14609 "error": {14610 "type": [14611 "string",14612 "null"14613 ]14614 },14615 "errorCode": {14616 "anyOf": [14617 {14618 "$ref": "#/components/schemas/ProposalErrorCode"14619 },14620 {14621 "type": "null"14622 }14623 ]14624 },14625 "errorParams": {14626 "anyOf": [14627 {14628 "type": "object",14629 "propertyNames": {14630 "type": "string"14631 },14632 "additionalProperties": {14633 "type": [14634 "string",14635 "number"14636 ]14637 }14638 },14639 {14640 "type": "null"14641 }14642 ]14643 },14644 "createdAt": {14645 "type": "string",14646 "description": "date-time, ISO 8601, UTC"14647 },14648 "updatedAt": {14649 "type": "string",14650 "description": "date-time, ISO 8601, UTC"14651 },14652 "expiresAt": {14653 "anyOf": [14654 {14655 "type": "string",14656 "description": "date-time, ISO 8601, UTC"14657 },14658 {14659 "type": "null"14660 }14661 ]14662 },14663 "broadcastAt": {14664 "anyOf": [14665 {14666 "type": "string",14667 "description": "date-time, ISO 8601, UTC"14668 },14669 {14670 "type": "null"14671 }14672 ]14673 },14674 "finalizedAt": {14675 "anyOf": [14676 {14677 "type": "string",14678 "description": "date-time, ISO 8601, UTC"14679 },14680 {14681 "type": "null"14682 }14683 ]14684 },14685 "relayAttemptedAt": {14686 "anyOf": [14687 {14688 "type": "string",14689 "description": "date-time, ISO 8601, UTC"14690 },14691 {14692 "type": "null"14693 }14694 ],14695 "description": "set BEFORE the first network call: from then on only the chain can say nothing was sent"14696 },14697 "feePaid": {14698 "anyOf": [14699 {14700 "type": "string",14701 "description": "integer amount in base units, as a string"14702 },14703 {14704 "type": "null"14705 }14706 ],14707 "description": "the fee the network actually charged; null until known (rows older than NEXT have none)"14708 },14709 "feePaidDisplay": {14710 "anyOf": [14711 {14712 "type": "string",14713 "description": "the same amount as a decimal string (exact arithmetic)"14714 },14715 {14716 "type": "null"14717 }14718 ]14719 },14720 "kind": {14721 "$ref": "#/components/schemas/ProposalKind"14722 },14723 "swap": {14724 "anyOf": [14725 {14726 "type": "object",14727 "properties": {},14728 "additionalProperties": {}14729 },14730 {14731 "type": "null"14732 }14733 ],14734 "description": "same-network swap detail (swap family)"14735 },14736 "bridge": {14737 "anyOf": [14738 {14739 "type": "object",14740 "properties": {},14741 "additionalProperties": {}14742 },14743 {14744 "type": "null"14745 }14746 ],14747 "description": "CCTP transfer detail (bridge family)"14748 },14749 "xswap": {14750 "anyOf": [14751 {14752 "type": "object",14753 "properties": {},14754 "additionalProperties": {}14755 },14756 {14757 "type": "null"14758 }14759 ],14760 "description": "native cross-chain swap detail (xswap family)"14761 },14762 "execution": {14763 "type": "object",14764 "properties": {14765 "kind": {14766 "type": "string"14767 },14768 "state": {14769 "type": "string",14770 "description": "pending, awaiting_approval, signing, sending, confirming, waiting, confirmed, failed, refunded, unknown"14771 },14772 "updatedAt": {14773 "anyOf": [14774 {14775 "type": "string",14776 "description": "date-time, ISO 8601, UTC"14777 },14778 {14779 "type": "null"14780 }14781 ]14782 },14783 "steps": {14784 "type": "array",14785 "items": {14786 "type": "object",14787 "properties": {14788 "id": {14789 "type": "string"14790 },14791 "kind": {14792 "type": "string"14793 },14794 "network": {14795 "type": "string"14796 },14797 "provider": {14798 "type": [14799 "string",14800 "null"14801 ]14802 },14803 "state": {14804 "type": "string"14805 },14806 "txid": {14807 "type": [14808 "string",14809 "null"14810 ]14811 },14812 "explorer": {14813 "type": [14814 "string",14815 "null"14816 ]14817 },14818 "startedAt": {14819 "anyOf": [14820 {14821 "type": "string",14822 "description": "date-time, ISO 8601, UTC"14823 },14824 {14825 "type": "null"14826 }14827 ]14828 },14829 "endedAt": {14830 "anyOf": [14831 {14832 "type": "string",14833 "description": "date-time, ISO 8601, UTC"14834 },14835 {14836 "type": "null"14837 }14838 ]14839 },14840 "code": {14841 "type": [14842 "string",14843 "null"14844 ]14845 }14846 },14847 "required": [14848 "id",14849 "kind",14850 "network",14851 "provider",14852 "state",14853 "txid",14854 "explorer",14855 "startedAt",14856 "endedAt",14857 "code"14858 ],14859 "additionalProperties": {}14860 }14861 }14862 },14863 "required": [14864 "kind",14865 "state",14866 "updatedAt",14867 "steps"14868 ],14869 "additionalProperties": {},14870 "description": "one status shape for every kind of operation"14871 },14872 "nft": {14873 "anyOf": [14874 {14875 "type": "object",14876 "properties": {},14877 "additionalProperties": {}14878 },14879 {14880 "type": "null"14881 }14882 ],14883 "description": "NFT transfer review (nft family)"14884 },14885 "quote": {14886 "anyOf": [14887 {14888 "type": "object",14889 "properties": {},14890 "additionalProperties": {}14891 },14892 {14893 "type": "null"14894 }14895 ],14896 "description": "the quote the owner was shown next to the firm figures (swap family)"14897 }14898 },14899 "required": [14900 "id",14901 "state",14902 "lifecycle",14903 "finalized",14904 "watched",14905 "network",14906 "networkName",14907 "asset",14908 "symbol",14909 "decimals",14910 "amount",14911 "amountDisplay",14912 "from",14913 "to",14914 "note",14915 "memo",14916 "feeEstimate",14917 "maxFee",14918 "feeSymbol",14919 "feeDecimals",14920 "feeDisplay",14921 "maxFeeDisplay",14922 "warnings",14923 "intentHash",14924 "txid",14925 "explorer",14926 "confirmations",14927 "error",14928 "errorCode",14929 "errorParams",14930 "createdAt",14931 "updatedAt",14932 "expiresAt",14933 "broadcastAt",14934 "finalizedAt",14935 "relayAttemptedAt",14936 "feePaid",14937 "feePaidDisplay",14938 "kind",14939 "swap",14940 "bridge",14941 "xswap",14942 "execution",14943 "nft",14944 "quote"14945 ],14946 "additionalProperties": {}14947 },14948 "ProposalErrorCode": {14949 "type": "string",14950 "description": "Why a proposal ended or is held (`errorCode`; `error` is the English sentence, `errorParams` its parameters). A signer refusal carries the signer's own code, prefixed `signer_`.",14951 "x-spw-open": true,14952 "x-spw-values": [14953 "broadcast_disabled",14954 "approval_expired",14955 "expired_before_approval",14956 "interrupted_signing",14957 "not_broadcast_in_time",14958 "rejected_by_owner",14959 "signer_refused",14960 "signer_hash_mismatch",14961 "broadcast_attempt_failed",14962 "tx_failed",14963 "relay_unconfirmed",14964 "dropped",14965 "expired_onchain",14966 "replaced_onchain",14967 "swap_late",14968 "swap_approval_reverted",14969 "swap_would_revert",14970 "swap_would_revert_approved",14971 "bridge_late",14972 "bridge_approval_reverted",14973 "burn_would_revert",14974 "burn_would_revert_approved",14975 "xswap_late",14976 "xswap_vault_unconfirmed",14977 "xswap_approval_reverted",14978 "deposit_would_revert",14979 "deposit_would_revert_approved",14980 "sol_swap_unverified",14981 "sol_swap_expired",14982 "sol_swap_refused",14983 "sol_swap_would_fail",14984 "sol_swap_below_min",14985 "sol_swap_no_balances",14986 "sol_burn_mismatch",14987 "sol_burn_expired",14988 "sol_burn_refused",14989 "sol_burn_would_fail"14990 ],14991 "x-spw-value-prefixes": [14992 "signer_"14993 ],14994 "x-spw-value-docs": {14995 "broadcast_disabled": "signed but NOT broadcast: broadcasting is disabled on this server (SPW_BROADCAST=off); nothing was sent to the network",14996 "approval_expired": "approval window expired",14997 "expired_before_approval": "expired before approval",14998 "interrupted_signing": "interrupted during signing; nothing was broadcast",14999 "not_broadcast_in_time": "could not be broadcast in time; nothing was sent",15000 "rejected_by_owner": "rejected by owner",15001 "signer_refused": "the signer refused: {detail}",15002 "signer_hash_mismatch": "signer hash mismatch",15003 "broadcast_attempt_failed": "broadcast attempt failed: {detail}",15004 "tx_failed": "the transaction failed on-chain: {detail}",15005 "relay_unconfirmed": "handed to the network without an acknowledgement and not found on-chain; it stays watched and is recorded if it appears. A new transfer on this network replaces it",15006 "dropped": "no longer known to the network and not confirmed; it stays watched and is recorded if it appears. A new transfer on this network replaces it",15007 "expired_onchain": "its validity window closed before the network included it; nothing moved",15008 "replaced_onchain": "another transaction used the same nonce or the same coins; this one can no longer be included",15009 "swap_late": "the swap could not be sent in time; nothing was swapped",15010 "swap_approval_reverted": "the token approval reverted; nothing was swapped",15011 "swap_would_revert": "the swap would revert now ({detail}); it was not sent",15012 "swap_would_revert_approved": "the swap would revert now ({detail}); it was not sent. The exact-amount approval stays in place for the next attempt",15013 "bridge_late": "the transfer could not be sent in time; nothing was burned",15014 "bridge_approval_reverted": "the token approval reverted; nothing was burned",15015 "burn_would_revert": "the burn would revert now ({detail}); it was not sent",15016 "burn_would_revert_approved": "the burn would revert now ({detail}); it was not sent. The exact-amount approval stays in place for the next attempt",15017 "xswap_late": "the swap could not be sent in time; nothing was sent to the vault",15018 "xswap_vault_unconfirmed": "the vault is no longer confirmed ({detail}); nothing was sent to it",15019 "xswap_approval_reverted": "the token approval reverted; nothing was sent to the vault",15020 "deposit_would_revert": "the deposit would revert now ({detail}); it was not sent",15021 "deposit_would_revert_approved": "the deposit would revert now ({detail}); it was not sent. The exact-amount approval of the router stays in place; only this wallet can use it",15022 "sol_swap_unverified": "the stored swap no longer verifies; it was not sent",15023 "sol_swap_expired": "the swap expired before it could be sent (blockhash too old); nothing was swapped",15024 "sol_swap_refused": "the node refused the signed swap ({detail}); it was not sent",15025 "sol_swap_would_fail": "the swap would fail now ({detail}); it was not sent",15026 "sol_swap_below_min": "the swap no longer delivers the approved minimum in simulation; it was not sent",15027 "sol_swap_no_balances": "the node did not report the simulated balances; the swap was not sent",15028 "sol_burn_mismatch": "the signer returned a transaction that is not the approved burn; it was not sent",15029 "sol_burn_expired": "the transfer expired before it could be sent (blockhash too old); nothing was burned",15030 "sol_burn_refused": "the node refused the signed burn ({detail}); it was not sent",15031 "sol_burn_would_fail": "{detail}; it was not sent"15032 }15033 },15034 "ProposalKind": {15035 "type": "string",15036 "description": "What a proposal is: a plain transfer, a same-network swap, a CCTP bridge, a native cross-chain swap, a GMX order transaction, an NFT transfer.",15037 "x-spw-open": true,15038 "x-spw-values": [15039 "transfer",15040 "swap",15041 "bridge",15042 "xswap",15043 "gmx",15044 "nft"15045 ]15046 },15047 "ProposalState": {15048 "type": "string",15049 "enum": [15050 "draft",15051 "pending_approval",15052 "approved",15053 "signed",15054 "broadcast",15055 "confirming",15056 "finalized",15057 "rejected",15058 "expired",15059 "failed",15060 "replaced",15061 "reorged",15062 "not_broadcast"15063 ],15064 "description": "Stored state in the vocabulary shipped clients know. FROZEN: no value is ever added here (native builds decode it with a closed enum); a `dropped` transfer reads `failed` with `errorCode: dropped`. New clients read `lifecycle`.",15065 "x-spw-open": false,15066 "x-spw-values": [15067 "draft",15068 "pending_approval",15069 "approved",15070 "signed",15071 "broadcast",15072 "confirming",15073 "finalized",15074 "rejected",15075 "expired",15076 "failed",15077 "replaced",15078 "reorged",15079 "not_broadcast"15080 ]15081 },15082 "SearchMatch": {15083 "type": "string",15084 "description": "Which member of a search result matched the query.",15085 "x-spw-open": true,15086 "x-spw-values": [15087 "symbol",15088 "name",15089 "network",15090 "contract",15091 "label",15092 "address",15093 "note",15094 "txid",15095 "amount"15096 ]15097 },15098 "SearchResults": {15099 "type": "object",15100 "properties": {15101 "q": {15102 "type": "string",15103 "description": "the query as searched (trimmed)"15104 },15105 "limit": {15106 "type": "integer",15107 "minimum": -9007199254740991,15108 "maximum": 900719925474099115109 },15110 "assets": {15111 "type": "object",15112 "properties": {15113 "items": {15114 "type": "array",15115 "items": {15116 "type": "object",15117 "properties": {15118 "type": {15119 "type": "string",15120 "const": "asset"15121 },15122 "network": {15123 "type": "string"15124 },15125 "networkName": {15126 "type": "string"15127 },15128 "asset": {15129 "type": "string"15130 },15131 "symbol": {15132 "type": "string"15133 },15134 "name": {15135 "type": "string"15136 },15137 "decimals": {15138 "type": "integer",15139 "minimum": -9007199254740991,15140 "maximum": 900719925474099115141 },15142 "matched": {15143 "$ref": "#/components/schemas/SearchMatch"15144 }15145 },15146 "required": [15147 "type",15148 "network",15149 "networkName",15150 "asset",15151 "symbol",15152 "name",15153 "decimals",15154 "matched"15155 ],15156 "additionalProperties": {}15157 }15158 },15159 "truncated": {15160 "type": "boolean",15161 "description": "true: more results matched than the cap"15162 }15163 },15164 "required": [15165 "items",15166 "truncated"15167 ],15168 "additionalProperties": {}15169 },15170 "contacts": {15171 "type": "object",15172 "properties": {15173 "items": {15174 "type": "array",15175 "items": {15176 "type": "object",15177 "properties": {15178 "type": {15179 "type": "string",15180 "const": "contact"15181 },15182 "id": {15183 "type": "string",15184 "format": "uuid",15185 "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"15186 },15187 "network": {15188 "type": "string"15189 },15190 "address": {15191 "type": "string"15192 },15193 "label": {15194 "type": "string"15195 },15196 "note": {15197 "type": "string"15198 },15199 "favorite": {15200 "type": "boolean"15201 },15202 "matched": {15203 "$ref": "#/components/schemas/SearchMatch"15204 }15205 },15206 "required": [15207 "type",15208 "id",15209 "network",15210 "address",15211 "label",15212 "note",15213 "favorite",15214 "matched"15215 ],15216 "additionalProperties": {}15217 }15218 },15219 "truncated": {15220 "type": "boolean",15221 "description": "true: more results matched than the cap"15222 }15223 },15224 "required": [15225 "items",15226 "truncated"15227 ],15228 "additionalProperties": {}15229 },15230 "transactions": {15231 "type": "object",15232 "properties": {15233 "items": {15234 "type": "array",15235 "items": {15236 "type": "object",15237 "properties": {15238 "type": {15239 "type": "string",15240 "enum": [15241 "proposal",15242 "deposit"15243 ]15244 },15245 "id": {15246 "type": "string",15247 "description": "proposal id, or the deposit id of GET /activity"15248 },15249 "kind": {15250 "$ref": "#/components/schemas/ActivityRowKind"15251 },15252 "network": {15253 "type": "string"15254 },15255 "networkName": {15256 "type": "string"15257 },15258 "asset": {15259 "type": "string"15260 },15261 "symbol": {15262 "type": "string"15263 },15264 "amount": {15265 "type": "string",15266 "description": "integer amount in base units, as a string"15267 },15268 "amountDisplay": {15269 "type": "string",15270 "description": "the same amount as a decimal string (exact arithmetic)"15271 },15272 "counterparty": {15273 "type": "string"15274 },15275 "contactLabel": {15276 "type": [15277 "string",15278 "null"15279 ]15280 },15281 "txid": {15282 "type": [15283 "string",15284 "null"15285 ]15286 },15287 "at": {15288 "type": "string",15289 "description": "date-time, ISO 8601, UTC"15290 },15291 "lifecycle": {15292 "anyOf": [15293 {15294 "$ref": "#/components/schemas/Lifecycle"15295 },15296 {15297 "type": "null"15298 }15299 ],15300 "description": "proposals; null for a deposit"15301 },15302 "state": {15303 "type": "string"15304 },15305 "matched": {15306 "$ref": "#/components/schemas/SearchMatch"15307 }15308 },15309 "required": [15310 "type",15311 "id",15312 "kind",15313 "network",15314 "networkName",15315 "asset",15316 "symbol",15317 "amount",15318 "amountDisplay",15319 "counterparty",15320 "contactLabel",15321 "txid",15322 "at",15323 "lifecycle",15324 "state",15325 "matched"15326 ],15327 "additionalProperties": {}15328 }15329 },15330 "truncated": {15331 "type": "boolean",15332 "description": "true: more results matched than the cap"15333 }15334 },15335 "required": [15336 "items",15337 "truncated"15338 ],15339 "additionalProperties": {}15340 }15341 },15342 "required": [15343 "q",15344 "limit",15345 "assets",15346 "contacts",15347 "transactions"15348 ],15349 "additionalProperties": {}15350 },15351 "TransferWarning": {15352 "type": "string",15353 "description": "Warning codes of a transfer review. A client shows an unknown code as a generic caution.",15354 "x-spw-open": true,15355 "x-spw-values": [15356 "new_destination",15357 "address_poisoning_suspected",15358 "duplicate_recent",15359 "contract_destination",15360 "network_congested",15361 "creates_account",15362 "creates_token_account",15363 "near_creates_account",15364 "activates_account",15365 "deploys_wallet",15366 "destination_not_initialized",15367 "memo_numeric_id",15368 "dt_new_account",15369 "cd_token_outputs",15370 "l1_fee_unknown"15371 ],15372 "x-spw-value-docs": {15373 "new_destination": "the wallet never sent to this address and it is not in the address book — to acknowledge before approving",15374 "address_poisoning_suspected": "the address differs from a known one but starts and ends with the same characters: the classic look-alike of an address-poisoning attack — to acknowledge before approving",15375 "duplicate_recent": "the same asset, amount and destination was sent, or may have been sent, in the last 24 hours — to acknowledge before approving",15376 "contract_destination": "the destination is a contract (EVM) or a program-owned account (Solana), not a plain wallet: it may not be able to use what it receives",15377 "network_congested": "the network is congested: the fee is capped, so the transfer may expire without being included (nothing moves in that case)",15378 "creates_account": "the destination account does not exist yet on this network: the transfer creates it and part of the amount stays locked as its reserve",15379 "creates_token_account": "Solana: the destination has no account for this token; the transfer creates it and the sender pays its rent",15380 "near_creates_account": "NEAR: the destination account does not exist yet; the transfer creates it, which adds a fee paid by the sender",15381 "activates_account": "the address was never used on this network: activating it is charged to the sender on top of the amount (TRON)",15382 "deploys_wallet": "TON: the first outgoing transfer also deploys the wallet contract (slightly higher fee, cannot be simulated beforehand)",15383 "destination_not_initialized": "TON: no contract is deployed at the destination (a new wallet, or a wrong address); the funds are credited there and cannot bounce back",15384 "memo_numeric_id": "Stellar: the memo is digits only and is sent as a numeric id (MEMO_ID), the format exchanges expect",15385 "dt_new_account": "Polkadot Asset Hub: the destination account does not exist yet; this transfer creates it and it must always keep the existential deposit",15386 "cd_token_outputs": "Cardano: some outputs of this wallet carry native tokens or script data; they are never spent and their ADA stays locked with them",15387 "l1_fee_unknown": "OP-stack networks: the L1 data fee could not be read; the fee ESTIMATE covers the L2 part only and the chain charges the data fee on top (it is not a field the signer can bound)"15388 }15389 },15390 "WalletEvent": {15391 "type": "object",15392 "properties": {15393 "id": {15394 "type": "integer",15395 "minimum": -9007199254740991,15396 "maximum": 9007199254740991,15397 "description": "increasing; the position a client remembers"15398 },15399 "at": {15400 "type": "string",15401 "description": "date-time, ISO 8601, UTC"15402 },15403 "type": {15404 "$ref": "#/components/schemas/EventType"15405 },15406 "ref": {15407 "description": "the object to re-read (a proposal id…)",15408 "type": [15409 "string",15410 "null"15411 ]15412 },15413 "data": {15414 "type": "object",15415 "properties": {},15416 "additionalProperties": {}15417 }15418 },15419 "required": [15420 "id",15421 "at",15422 "type",15423 "ref",15424 "data"15425 ],15426 "additionalProperties": {}15427 }15428 }15429 },15430 "x-spw-error-catalog": {15431 "bad_address": {15432 "statuses": [15433 40015434 ],15435 "meaning": "the destination is not a valid address of this network, or is the wallet itself",15436 "action": "correct the address"15437 },15438 "bad_amount": {15439 "statuses": [15440 40015441 ],15442 "meaning": "the amount is not a positive decimal within the asset's precision",15443 "action": "correct the amount"15444 },15445 "bad_approval": {15446 "statuses": [15447 42215448 ],15449 "meaning": "the approval could not be verified against the signer's list",15450 "action": "approve again with a passkey the signer lists"15451 },15452 "bad_destination": {15453 "statuses": [15454 40015455 ],15456 "meaning": "the destination cannot receive this asset (account type, missing trust line…)",15457 "action": "check the destination"15458 },15459 "bad_memo": {15460 "statuses": [15461 40015462 ],15463 "meaning": "the memo / destination tag is not accepted on this network",15464 "action": "correct or remove it"15465 },15466 "bad_request": {15467 "statuses": [15468 40015469 ],15470 "meaning": "the request is not valid; `data.fields` lists the refused members when it comes from input validation",15471 "action": "fix the request; do not retry unchanged"15472 },15473 "bad_source": {15474 "statuses": [15475 40015476 ],15477 "meaning": "the wallet's own account cannot send this asset in its present state",15478 "action": "see the message"15479 },15480 "bad_state": {15481 "statuses": [15482 40915483 ],15484 "meaning": "the proposal is not in a state that allows this",15485 "action": "re-read the proposal and show its real state"15486 },15487 "below_rent": {15488 "statuses": [15489 40015490 ],15491 "meaning": "the transfer would leave an account below its rent-exempt minimum",15492 "action": "change the amount"15493 },15494 "below_reserve": {15495 "statuses": [15496 40015497 ],15498 "meaning": "the transfer would leave the account below the network reserve",15499 "action": "change the amount"15500 },15501 "challenge_expired": {15502 "statuses": [15503 40115504 ],15505 "meaning": "the challenge expired or was already used",15506 "action": "ask for new options and try again"15507 },15508 "conflict": {15509 "statuses": [15510 40915511 ],15512 "meaning": "the object changed concurrently",15513 "action": "reload it, then decide again"15514 },15515 "contract_destination": {15516 "statuses": [15517 40015518 ],15519 "meaning": "the destination is a contract that cannot receive this transfer",15520 "action": "check the destination"15521 },15522 "csrf": {15523 "statuses": [15524 40315525 ],15526 "meaning": "a mutating request without the same-origin proof (`Origin` + `X-SPW-CSRF: 1`)",15527 "action": "send both headers; never retry from another origin"15528 },15529 "duplicate_contact": {15530 "statuses": [15531 40915532 ],15533 "meaning": "another contact already has this address",15534 "action": "edit that contact"15535 },15536 "expired": {15537 "statuses": [15538 400,15539 41015540 ],15541 "meaning": "the approval window, or the pending passkey, expired",15542 "action": "start again"15543 },15544 "fee_ceiling": {15545 "statuses": [15546 42215547 ],15548 "meaning": "the fee needed exceeds the signer's ceiling",15549 "action": "retry later"15550 },15551 "fee_too_high": {15552 "statuses": [15553 400,15554 50315555 ],15556 "meaning": "the network fee is above the wallet's ceiling right now, or could not be established",15557 "action": "retry later"15558 },15559 "halted": {15560 "statuses": [15561 42315562 ],15563 "meaning": "the emergency halt is active",15564 "action": "nothing can be signed until the halt is lifted on the signer"15565 },15566 "hash_mismatch": {15567 "statuses": [15568 50015569 ],15570 "meaning": "the signer answered another intent hash; the transfer was marked failed",15571 "action": "report it; nothing was sent"15572 },15573 "idempotency": {15574 "statuses": [15575 40015576 ],15577 "meaning": "the `Idempotency-Key` header is missing or malformed (16–64 letters, digits, dashes)",15578 "action": "send one key per intended transfer"15579 },15580 "idempotency_mismatch": {15581 "statuses": [15582 40915583 ],15584 "meaning": "this Idempotency-Key was already used for a different request",15585 "action": "use a new key"15586 },15587 "insufficient_funds": {15588 "statuses": [15589 40015590 ],15591 "meaning": "the balance does not cover the amount and the fee",15592 "action": "lower the amount"15593 },15594 "insufficient_gas": {15595 "statuses": [15596 40015597 ],15598 "meaning": "not enough of the network's native coin to pay the fee",15599 "action": "fund the native coin"15600 },15601 "insufficient_unlocked_funds": {15602 "statuses": [15603 40015604 ],15605 "meaning": "part of the balance is locked",15606 "action": "lower the amount"15607 },15608 "internal": {15609 "statuses": [15610 50015611 ],15612 "meaning": "server error",15613 "action": "retry later; a transfer approval is NOT retried blindly — re-read the proposal first"15614 },15615 "invalid_cursor": {15616 "statuses": [15617 40015618 ],15619 "meaning": "the cursor is not one a previous page returned",15620 "action": "restart from the first page"15621 },15622 "last_credential": {15623 "statuses": [15624 40915625 ],15626 "meaning": "the last passkey on the signer cannot be revoked",15627 "action": "add another passkey first"15628 },15629 "login_failed": {15630 "statuses": [15631 40115632 ],15633 "meaning": "authentication failed (unknown passkey or bad assertion)",15634 "action": "try again; repeated failures raise an alert"15635 },15636 "memo_required": {15637 "statuses": [15638 40015639 ],15640 "meaning": "the destination requires a memo / tag",15641 "action": "add it"15642 },15643 "no_approver": {15644 "statuses": [15645 40915646 ],15647 "meaning": "no other passkey can approve this revocation (none enrolled on the signer and out of its cool-down)",15648 "action": "wait for the cool-down of the other passkey, or add one"15649 },15650 "not_found": {15651 "statuses": [15652 40415653 ],15654 "meaning": "the object does not exist",15655 "action": "reload the list"15656 },15657 "owner_only": {15658 "statuses": [15659 40315660 ],15661 "meaning": "the route is for the owner's session, not an API key",15662 "action": "use the session"15663 },15664 "pending_tx": {15665 "statuses": [15666 400,15667 40915668 ],15669 "meaning": "another transfer or swap on this network is not confirmed yet",15670 "action": "wait for it; a dropped one no longer blocks"15671 },15672 "policy": {15673 "statuses": [15674 42215675 ],15676 "meaning": "the signer's policy refuses it (limit per transfer, per day, asset not allowed, halt)",15677 "action": "see the message; limits are changed on the signer only"15678 },15679 "protocol_changed": {15680 "statuses": [15681 50315682 ],15683 "meaning": "the network's protocol changed since this wallet was reviewed; sending is suspended",15684 "action": "update the wallet"15685 },15686 "rate_limited": {15687 "statuses": [15688 42915689 ],15690 "meaning": "too many requests from this address",15691 "action": "wait a minute"15692 },15693 "registration_failed": {15694 "statuses": [15695 40115696 ],15697 "meaning": "the passkey registration could not be verified",15698 "action": "try again"15699 },15700 "rpc_degraded": {15701 "statuses": [15702 50315703 ],15704 "meaning": "not enough data sources answered for this network; nothing was prepared",15705 "action": "retry later"15706 },15707 "rpc_disagreement": {15708 "statuses": [15709 50315710 ],15711 "meaning": "the data sources disagree; nothing was prepared",15712 "action": "retry later"15713 },15714 "runtime_changed": {15715 "statuses": [15716 50315717 ],15718 "meaning": "the network's runtime changed since this wallet was reviewed; sending is suspended",15719 "action": "update the wallet"15720 },15721 "self_approval": {15722 "statuses": [15723 40015724 ],15725 "meaning": "a passkey cannot approve its own revocation",15726 "action": "approve with another passkey"15727 },15728 "setup_closed": {15729 "statuses": [15730 40315731 ],15732 "meaning": "the one-time setup was already completed",15733 "action": "sign in instead"15734 },15735 "setup_token": {15736 "statuses": [15737 40315738 ],15739 "meaning": "the setup token is missing",15740 "action": "ask for the token printed by the signer"15741 },15742 "signer_unreachable": {15743 "statuses": [15744 50315745 ],15746 "meaning": "the signer cannot be reached; nothing was signed",15747 "action": "reads still work; retry sending later"15748 },15749 "simulation_failed": {15750 "statuses": [15751 40015752 ],15753 "meaning": "the exact transaction could not be built or would fail now",15754 "action": "see the message; nothing was signed"15755 },15756 "stale_contact": {15757 "statuses": [15758 40915759 ],15760 "meaning": "the contact changed since it was read",15761 "action": "reload it before changing its address"15762 },15763 "too_many_coins": {15764 "statuses": [15765 40015766 ],15767 "meaning": "too many small coins are needed for this amount",15768 "action": "send a smaller amount first"15769 },15770 "too_many_streams": {15771 "statuses": [15772 42915773 ],15774 "meaning": "too many event streams are open",15775 "action": "close one, or fall back to polling"15776 },15777 "too_many_subscriptions": {15778 "statuses": [15779 42215780 ],15781 "meaning": "too many push devices",15782 "action": "remove one"15783 },15784 "unauthenticated": {15785 "statuses": [15786 40115787 ],15788 "meaning": "no valid session",15789 "action": "sign in with the passkey, then repeat the request"15790 },15791 "unsupported_account": {15792 "statuses": [15793 40015794 ],15795 "meaning": "the account type is not supported",15796 "action": "see the message"15797 },15798 "unsupported_asset": {15799 "statuses": [15800 400,15801 40415802 ],15803 "meaning": "the asset is not in the verified registry of this network",15804 "action": "pick an asset of GET /assets"15805 },15806 "unsupported_funds": {15807 "statuses": [15808 40015809 ],15810 "meaning": "the balance is of a kind this wallet does not spend",15811 "action": "see the message"15812 },15813 "unsupported_network": {15814 "statuses": [15815 50315816 ],15817 "meaning": "the signer has no key for this network",15818 "action": "do not offer this network"15819 }15820 },15821 "x-spw-lifecycle": [15822 {15823 "lifecycle": "draft",15824 "description": "prepared, nothing frozen; expires by itself"15825 },15826 {15827 "lifecycle": "awaiting_confirmation",15828 "description": "the exact transaction is frozen and shown; the passkey has not been given"15829 },15830 {15831 "lifecycle": "awaiting_signature",15832 "description": "the passkey was given; the signer call is in flight"15833 },15834 {15835 "lifecycle": "signed",15836 "description": "signed; no relay to the network has started"15837 },15838 {15839 "lifecycle": "broadcasting",15840 "description": "signed and a relay has started: from here only the chain can say that nothing was sent"15841 },15842 {15843 "lifecycle": "pending",15844 "description": "handed to the network, not in a block yet"15845 },15846 {15847 "lifecycle": "confirming",15848 "description": "in a block, not final (see `confirmations`); a reorganisation can still undo it"15849 },15850 {15851 "lifecycle": "confirmed",15852 "description": "FINAL. The only value a client may treat as done"15853 },15854 {15855 "lifecycle": "failed",15856 "description": "ended without effect, or reverted on-chain (`errorCode` says which)"15857 },15858 {15859 "lifecycle": "replaced",15860 "description": "another transaction used the same nonce or coins. Still re-checked for a day (`watched`): it becomes confirming / confirmed if it turns out to be in a block"15861 },15862 {15863 "lifecycle": "dropped",15864 "description": "no source knows it and nothing proves it dead. NOT a failure: it stays watched and is recorded if it appears; a new send on the network replaces it"15865 },15866 {15867 "lifecycle": "expired",15868 "description": "the approval window passed before the passkey, or the validity window of the signed transaction closed on-chain (`errorCode: expired_onchain`); nothing moved"15869 },15870 {15871 "lifecycle": "rejected",15872 "description": "rejected by the owner before signing"15873 },15874 {15875 "lifecycle": "not_sent",15876 "description": "signed and deliberately not relayed (broadcasting is disabled on this server)"15877 }15878 ],15879 "x-spw-transfer-warnings": [15880 {15881 "code": "new_destination",15882 "meaning": "the wallet never sent to this address and it is not in the address book",15883 "ack": true,15884 "emitted": true15885 },15886 {15887 "code": "address_poisoning_suspected",15888 "meaning": "the address differs from a known one but starts and ends with the same characters: the classic look-alike of an address-poisoning attack",15889 "ack": true,15890 "emitted": true15891 },15892 {15893 "code": "duplicate_recent",15894 "meaning": "the same asset, amount and destination was sent, or may have been sent, in the last 24 hours",15895 "ack": true,15896 "emitted": true15897 },15898 {15899 "code": "contract_destination",15900 "meaning": "the destination is a contract (EVM) or a program-owned account (Solana), not a plain wallet: it may not be able to use what it receives",15901 "ack": false,15902 "emitted": true15903 },15904 {15905 "code": "network_congested",15906 "meaning": "the network is congested: the fee is capped, so the transfer may expire without being included (nothing moves in that case)",15907 "ack": false,15908 "emitted": true15909 },15910 {15911 "code": "creates_account",15912 "meaning": "the destination account does not exist yet on this network: the transfer creates it and part of the amount stays locked as its reserve",15913 "ack": false,15914 "emitted": true15915 },15916 {15917 "code": "creates_token_account",15918 "meaning": "Solana: the destination has no account for this token; the transfer creates it and the sender pays its rent",15919 "ack": false,15920 "emitted": true15921 },15922 {15923 "code": "near_creates_account",15924 "meaning": "NEAR: the destination account does not exist yet; the transfer creates it, which adds a fee paid by the sender",15925 "ack": false,15926 "emitted": true15927 },15928 {15929 "code": "activates_account",15930 "meaning": "the address was never used on this network: activating it is charged to the sender on top of the amount (TRON)",15931 "ack": false,15932 "emitted": true15933 },15934 {15935 "code": "deploys_wallet",15936 "meaning": "TON: the first outgoing transfer also deploys the wallet contract (slightly higher fee, cannot be simulated beforehand)",15937 "ack": false,15938 "emitted": true15939 },15940 {15941 "code": "destination_not_initialized",15942 "meaning": "TON: no contract is deployed at the destination (a new wallet, or a wrong address); the funds are credited there and cannot bounce back",15943 "ack": false,15944 "emitted": true15945 },15946 {15947 "code": "memo_numeric_id",15948 "meaning": "Stellar: the memo is digits only and is sent as a numeric id (MEMO_ID), the format exchanges expect",15949 "ack": false,15950 "emitted": true15951 },15952 {15953 "code": "dt_new_account",15954 "meaning": "Polkadot Asset Hub: the destination account does not exist yet; this transfer creates it and it must always keep the existential deposit",15955 "ack": false,15956 "emitted": true15957 },15958 {15959 "code": "cd_token_outputs",15960 "meaning": "Cardano: some outputs of this wallet carry native tokens or script data; they are never spent and their ADA stays locked with them",15961 "ack": false,15962 "emitted": true15963 },15964 {15965 "code": "l1_fee_unknown",15966 "meaning": "OP-stack networks: the L1 data fee could not be read; the fee ESTIMATE covers the L2 part only and the chain charges the data fee on top (it is not a field the signer can bound)",15967 "ack": false,15968 "emitted": true15969 }15970 ],15971 "x-spw-event-types": [15972 {15973 "type": "transfer.state",15974 "description": "a proposal changed state — `data`: `{ from, to, lifecycle, network, kind, txid, confirmations, errorCode }`; `ref` = proposal id"15975 },15976 {15977 "type": "transfer.relay",15978 "description": "a relay of the signed transaction to the network started (its outcome is not known yet) — `data`: `{ network, lifecycle: \"broadcasting\", txid }`"15979 },15980 {15981 "type": "transfer.confirmations",15982 "description": "the confirmation count of a tracked transaction changed — `data`: `{ network, confirmations, txid }`"15983 },15984 {15985 "type": "deposit.seen",15986 "description": "an incoming payment was recorded — `data`: `{ network, txid, asset, amount, kind, origin?, proposal?, detection? }`"15987 },15988 {15989 "type": "deposit.native_window",15990 "description": "EVM native-coin scan: a balance difference was located to a block window, not to a transaction"15991 },15992 {15993 "type": "deposit.scan_gap",15994 "description": "a transaction of the deposit scan is no longer served by any source"15995 },15996 {15997 "type": "device.added",15998 "description": "a passkey was added — `data`: `{ credential, label }`"15999 },16000 {16001 "type": "device.revoked",16002 "description": "a passkey was revoked — `data`: `{ credential, label, signer, sessions, ip }` (`signer`: it was on the signer's list; `sessions`: sessions it had opened, ended with it)"16003 },16004 {16005 "type": "session.revoked",16006 "description": "one session was revoked by its public id — `data`: `{ session, current, ip }`"16007 },16008 {16009 "type": "credentials.mismatch",16010 "description": "the signer's passkey list and the API's differ, and still did 30 s later — `data`: `{ count, signerOnly, apiOnly }` (12-character id prefixes)"16011 },16012 {16013 "type": "credentials.reconciled",16014 "description": "the two passkey lists agree again"16015 },16016 {16017 "type": "settings.saved",16018 "description": "account settings changed — `data`: `{ changed: { locale?, currency?, hideBalances?, prices?, theme? } }`: re-read GET /settings"16019 },16020 {16021 "type": "sessions.revoked",16022 "description": "every session was revoked"16023 },16024 {16025 "type": "login.ok",16026 "description": "a sign-in succeeded — `data`: `{ credential, ip, label, device, newDevice, session }`"16027 },16028 {16029 "type": "owner.setup",16030 "description": "the first passkey was enrolled (one-time setup)"16031 },16032 {16033 "type": "addressbook.saved",16034 "description": "a contact was created or changed — `data`: `{ network, address, label }`"16035 },16036 {16037 "type": "addressbook.removed",16038 "description": "a contact was deleted"16039 },16040 {16041 "type": "settings.asset_pref",16042 "description": "an asset was hidden / shown / made favourite — `data`: `{ network, asset, hidden, favorite }`"16043 },16044 {16045 "type": "halt.on",16046 "description": "the emergency halt of the signer was triggered"16047 },16048 {16049 "type": "security.contact_address_changed",16050 "description": "a contact now points to another address — `data`: `{ id, network, label, from, to }`"16051 }16052 ],16053 "x-spw-other-families": {16054 "/api/v1/trading": "docs/openapi/trading-v1.json (SP Trading API)",16055 "/api/v1/developer": "docs/TRADING-API-REFERENCE.md (API keys, webhooks)",16056 "/api/v1/swap": "swap family",16057 "/api/v1/bridge": "CCTP bridge family",16058 "/api/v1/xswap": "native cross-chain swap family",16059 "/api/v1/plans": "any-to-any plans",16060 "/api/v1/nfts": "NFT family",16061 "/api/v1/derivatives": "derivatives family",16062 "/api/v1/agents": "agents family",16063 "/api/v1/strategies": "agents family",16064 "/api/v1/research": "research runtime",16065 "/api/v1/monitor": "monitoring dashboard",16066 "/api/v1/markets-hub": "markets hub",16067 "/api/v1/private-markets": "private markets",16068 "/api/v1/market-data": "market data engine (candles, data quality)",16069 "/api/v1/utxo-locks": "UTXO locks (Bitcoin-style coins set aside; docs/adr)",16070 "/api/v1/risk": "risk engine",16071 "/api/v1/mandates": "trading mandates",16072 "/api/v1/mm": "live market making",16073 "/api/v1/stream": "quote engine websocket (docs/V11-QUOTE-ENGINE.md)"16074 },16075 "x-spw-interaction-header": {16076 "name": "X-SPW-Interaction",16077 "value": "1",16078 "in": "header",16079 "required": false,16080 "idleMinutes": 30,16081 "absoluteHours": 12,16082 "description": "Send it on requests caused by the user (a tap, a navigation), never on timers. Once a session has sent it, requests without it no longer refresh the idle timer."16083 }16084}16085