From 9f0419b290c86c37d3c55507ef7a2866075f12d0 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sun, 22 Nov 2026 06:10:54 +0000 Subject: [PATCH] chore: refresh store codegen snapshot --- packages/store/scripts/api-schema/schema.json | 18187 ++++++++++------ .../src/gateway/AUTO_GENERATED/.schema-hash | 2 +- .../src/gateway/AUTO_GENERATED/chains.ts | 3 + .../gateway/AUTO_GENERATED/collectibles.ts | 4 +- .../src/gateway/AUTO_GENERATED/community.ts | 4 +- .../src/gateway/AUTO_GENERATED/delegates.ts | 93 + .../src/gateway/AUTO_GENERATED/messages.ts | 43 +- .../gateway/AUTO_GENERATED/notifications.ts | 6 +- .../src/gateway/AUTO_GENERATED/portfolios.ts | 63 +- .../store/src/gateway/AUTO_GENERATED/relay.ts | 14 +- .../src/gateway/AUTO_GENERATED/safe-shield.ts | 1 + .../src/gateway/AUTO_GENERATED/spaces.ts | 262 +- .../src/gateway/AUTO_GENERATED/surveys.ts | 17 +- .../gateway/AUTO_GENERATED/transactions.ts | 111 +- 14 files changed, 11896 insertions(+), 6914 deletions(-) diff --git a/packages/store/scripts/api-schema/schema.json b/packages/store/scripts/api-schema/schema.json index c87e9026418..07c0a4fc6fb 100644 --- a/packages/store/scripts/api-schema/schema.json +++ b/packages/store/scripts/api-schema/schema.json @@ -434,6 +434,32 @@ ] } }, + "/v1/billing/trial-plans": { + "get": { + "description": "The general trial payment links a space that does not exist yet is offered: the standard trial, no negotiated links. Same shape as the payment links of a space.", + "operationId": "billingGetTrialPlansV1", + "parameters": [], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PaymentLink" + } + } + } + } + } + }, + "summary": "Get the trial plans for a new space", + "tags": [ + "billing" + ] + } + }, "/v1/billing/plans/{planId}": { "get": { "operationId": "billingGetPlanV1", @@ -498,6 +524,9 @@ } } } + }, + "403": { + "description": "Not an admin" } }, "summary": "Get the billing portal session URL for a space", @@ -584,6 +613,12 @@ } } } + }, + "403": { + "description": "Not an admin, or a payment link this workspace is not offered" + }, + "409": { + "description": "This plan doesn't offer enough Safe seats for the workspace's current Safes" } }, "summary": "Create a checkout session for a payment link", @@ -592,6 +627,137 @@ ] } }, + "/v1/billing/spaces/{spaceId}/subscriptions/{subscriptionId}/preview-update": { + "get": { + "operationId": "billingPreviewSubscriptionUpdateV1", + "parameters": [ + { + "name": "subscriptionId", + "required": true, + "in": "path", + "description": "Subscription identifier", + "schema": { + "type": "string" + } + }, + { + "name": "planId", + "required": true, + "in": "query", + "description": "The price id of the plan to preview", + "schema": { + "type": "string" + } + }, + { + "name": "spaceId", + "required": true, + "in": "path", + "description": "Space UUID", + "schema": { + "example": "123e4567-e89b-12d3-a456-426614174000", + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SubscriptionUpdatePreview" + } + } + } + }, + "403": { + "description": "Not an admin, or a plan this workspace is not offered" + }, + "404": { + "description": "Subscription not found" + }, + "409": { + "description": "Already on this plan" + }, + "422": { + "description": "Malformed subscriptionId or planId" + } + }, + "summary": "Preview what moving a subscription to another plan would cost", + "tags": [ + "billing" + ] + } + }, + "/v1/billing/spaces/{spaceId}/subscriptions/{subscriptionId}": { + "patch": { + "description": "Safes in `removedSafes` are removed from the workspace first, then the plan changes. If the plan change fails after that, the answer is 502 and sending the same request again finishes it.", + "operationId": "billingUpdateSubscriptionV1", + "parameters": [ + { + "name": "subscriptionId", + "required": true, + "in": "path", + "description": "Subscription identifier", + "schema": { + "type": "string" + } + }, + { + "name": "spaceId", + "required": true, + "in": "path", + "description": "Space UUID", + "schema": { + "example": "123e4567-e89b-12d3-a456-426614174000", + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateSubscriptionDto" + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateSubscriptionResult" + } + } + } + }, + "403": { + "description": "Not an admin, a plan this workspace is not offered, or a named paymentLinkId this workspace is not offered" + }, + "404": { + "description": "Subscription not found" + }, + "409": { + "description": "One of:\n- Already on this plan\n- The subscription is not in an updatable state\n- Several offered links sell the plan and none was named\n- The target plan doesn't offer enough Safe seats for the workspace's current Safes" + }, + "422": { + "description": "The named payment link does not offer this plan" + }, + "502": { + "description": "The billing service reported the plan change as unsuccessful, or failed after `removedSafes` were removed" + } + }, + "summary": "Move a subscription onto another plan", + "tags": [ + "billing" + ] + } + }, "/v1/billing/sessions/{sessionId}": { "get": { "operationId": "billingGetCheckoutSessionV1", @@ -775,22 +941,41 @@ ] }, "delete": { - "description": "Clears all cached Zerion portfolio data (overview, portfolio, positions) for a specific address", + "description": "Clears all cached Zerion portfolio data (overview, portfolio, positions) for a Safe. Repeat clears for the same Safe within a short cooldown are skipped.", "operationId": "portfolioClearPortfolioV1", "parameters": [ { "name": "address", "required": true, "in": "path", - "description": "Wallet address (0x prefixed hex string)", + "description": "Safe address (0x prefixed hex string)", + "schema": { + "type": "string" + } + }, + { + "name": "chainId", + "required": true, + "in": "query", + "description": "A chain on which the address is a Safe", "schema": { + "example": "1", "type": "string" } } ], "responses": { "204": { - "description": "" + "description": "Cleared, or skipped within cooldown" + }, + "404": { + "description": "The address is not a Safe on chainId" + }, + "422": { + "description": "Invalid address or chainId" + }, + "429": { + "description": "Rate limit reached" } }, "summary": "Clear portfolio cache", @@ -799,6 +984,72 @@ ] } }, + "/v2/portfolio/summaries": { + "get": { + "description": "Returns the fiat value of each Safe, summed from the cached Zerion snapshot that GET /v1/portfolio serves (one /positions call per wallet and environment) on Zerion-supported chains, and from the Transaction Service elsewhere. Safes that cannot be resolved, or that no source can value, are left out of the response.", + "operationId": "portfolioSummariesGetSummariesV2", + "parameters": [ + { + "name": "safes", + "required": true, + "in": "query", + "description": "Comma-separated list of Safe addresses in chainId:address format. Only the first MAX_SAFE_OVERVIEWS distinct entries are used.", + "schema": { + "example": "1:0x1234567890123456789012345678901234567890,137:0xabcdefabcdefabcdefabcdefabcdefabcdefabcd", + "type": "string" + } + }, + { + "name": "currency", + "required": true, + "in": "query", + "description": "Fiat currency code, any case (e.g. USD, eur)", + "schema": { + "example": "USD", + "type": "string" + } + }, + { + "name": "trusted", + "required": false, + "in": "query", + "description": "If true, only trusted tokens count. Defaults to true, like GET /v1/portfolio, so the totals match the Assets page.", + "schema": { + "example": true, + "type": "boolean" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PortfolioSummary" + } + } + } + } + }, + "400": { + "description": "Unsupported currency" + }, + "422": { + "description": "Invalid query parameters" + }, + "429": { + "description": "Rate limit reached" + } + }, + "summary": "Get portfolio summaries", + "tags": [ + "portfolio" + ] + } + }, "/v1/chains": { "get": { "description": "Retrieves a paginated list of all blockchain networks supported by the Safe infrastructure, including their configuration and capabilities.", @@ -824,6 +1075,9 @@ } } } + }, + "422": { + "description": "Invalid cursor" } }, "summary": "Get supported chains", @@ -1072,6 +1326,9 @@ } } } + }, + "422": { + "description": "Invalid cursor" } }, "summary": "Get supported chains (v2)", @@ -1145,15 +1402,15 @@ } }, { - "name": "trusted", + "name": "cursor", "required": false, "in": "query", "schema": { - "type": "boolean" + "type": "string" } }, { - "name": "exclude_spam", + "name": "trusted", "required": false, "in": "query", "schema": { @@ -1161,11 +1418,11 @@ } }, { - "name": "cursor", + "name": "exclude_spam", "required": false, "in": "query", "schema": { - "type": "string" + "type": "boolean" } } ], @@ -1179,6 +1436,9 @@ } } } + }, + "422": { + "description": "Invalid cursor" } }, "tags": [ @@ -1209,6 +1469,9 @@ } } } + }, + "422": { + "description": "Invalid cursor" } }, "tags": [ @@ -1259,7 +1522,7 @@ } }, { - "name": "holder", + "name": "cursor", "required": false, "in": "query", "schema": { @@ -1267,7 +1530,7 @@ } }, { - "name": "cursor", + "name": "holder", "required": false, "in": "query", "schema": { @@ -1276,8 +1539,8 @@ } ], "responses": { - "200": { - "description": "" + "422": { + "description": "Invalid cursor" } }, "tags": [ @@ -1316,6 +1579,9 @@ } } } + }, + "422": { + "description": "Invalid cursor" } }, "tags": [ @@ -1415,6 +1681,9 @@ } } } + }, + "422": { + "description": "Invalid cursor" } }, "tags": [ @@ -1483,6 +1752,9 @@ } } } + }, + "422": { + "description": "Invalid cursor" } }, "tags": [ @@ -1750,6 +2022,9 @@ } } } + }, + "422": { + "description": "Invalid cursor" } }, "summary": "Get supported gas tokens", @@ -1853,6 +2128,9 @@ }, "404": { "description": "Message not found" + }, + "422": { + "description": "Invalid chainId or messageHash" } }, "summary": "Get message by hash", @@ -1908,6 +2186,9 @@ }, "404": { "description": "Safe not found on the specified chain" + }, + "422": { + "description": "Invalid chainId, safeAddress or cursor" } }, "summary": "Get messages for Safe", @@ -1955,7 +2236,10 @@ "description": "Message accepted. The Transaction Service indexes messages asynchronously, so the message may not be immediately retrievable — poll GET /v1/chains/{chainId}/messages/{messageHash}." }, "400": { - "description": "Invalid message format or signature" + "description": "Invalid message format" + }, + "422": { + "description": "Invalid chainId, safeAddress, request body or signature" } }, "summary": "Create message", @@ -2005,10 +2289,13 @@ "description": "Signature added successfully" }, "400": { - "description": "Invalid signature or signer not authorized" + "description": "Rejected by the upstream service" }, "404": { "description": "Message not found" + }, + "422": { + "description": "Invalid chainId, messageHash, request body or signature" } }, "summary": "Add message signature", @@ -2058,6 +2345,9 @@ }, "404": { "description": "User not found - the authenticated wallet is not associated with any user" + }, + "409": { + "description": "User is the last admin of at least one workspace - promote another admin or delete the workspace first" } }, "summary": "Delete user", @@ -2175,7 +2465,7 @@ }, "/v1/spaces/{spaceId}/address-book": { "get": { - "description": "Retrieves all address book entries for a specific space. Address books help organize and label frequently used addresses.", + "description": "Retrieves all address book entries for a specific space, with the tags of each entry and every tag of the space. Address books help organize and label frequently used addresses.", "operationId": "addressBooksGetAddressBookItemsV1", "parameters": [ { @@ -2207,10 +2497,10 @@ "description": "Authentication required - valid JWT token must be provided" }, "403": { - "description": "Access forbidden - user is not a member of this space" + "description": "Access forbidden - user is not an active member of this space" }, "404": { - "description": "User, member, or space not found" + "description": "Space not found" } }, "summary": "Get space address book", @@ -2219,7 +2509,7 @@ ] }, "put": { - "description": "Creates or updates address book entries for a space. This allows adding labels and organizing frequently used addresses.", + "description": "Creates or updates address book entries for a space. This allows adding labels and organizing frequently used addresses. An entry that carries tags gets exactly those tags; an entry without tags keeps its current tags.", "operationId": "addressBooksUpsertAddressBookItemsV1", "parameters": [ { @@ -2256,16 +2546,19 @@ } }, "400": { - "description": "Address book items limit exceeded or invalid data provided" + "description": "Invalid space identifier, address book items limit exceeded, or space tag limit reached" }, "401": { "description": "Authentication required - valid JWT token must be provided" }, "403": { - "description": "Access forbidden - user is not authorized to modify this address book" + "description": "Access forbidden - user is not an active admin of this space" }, "404": { - "description": "User, member, or space not found" + "description": "Space not found" + }, + "422": { + "description": "Invalid body - an invalid address, name or chain ID, an invalid tag name, or more tags on an entry than allowed" } }, "summary": "Update space address book", @@ -2274,8 +2567,256 @@ ] } }, - "/v1/spaces/{spaceId}/address-book/{address}": { - "delete": { + "/v1/spaces/{spaceId}/address-book/tags": { + "put": { + "description": "Replaces the tags of one or more address book entries. Any active member of the space may set tags. A tag name the space does not have yet creates the tag. The request is all or nothing: if one entry cannot be tagged, no entry changes.", + "operationId": "addressBooksSetContactTagsV1", + "parameters": [ + { + "name": "spaceId", + "required": true, + "in": "path", + "description": "Space UUID containing the address book", + "schema": { + "example": "123e4567-e89b-12d3-a456-426614174000", + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "description": "The entries to tag, each with its full set of tag names", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SetContactTagsDto" + } + } + } + }, + "responses": { + "200": { + "description": "Tags set successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SpaceAddressBookDto" + } + } + } + }, + "400": { + "description": "Invalid space identifier, the space tag limit is reached, or more entries than the address book can hold" + }, + "401": { + "description": "Authentication required - valid JWT token must be provided" + }, + "403": { + "description": "Access forbidden - user is not an active member of this space" + }, + "404": { + "description": "Space not found, or an address is not in the address book" + }, + "422": { + "description": "Invalid body - no entries, an address listed twice, an invalid address or tag name, or more tags on an entry than allowed" + }, + "429": { + "description": "Rate limit exceeded" + } + }, + "summary": "Set address book entry tags", + "tags": [ + "spaces" + ] + }, + "post": { + "description": "Creates a tag of the space with no contacts, in a random unused colour. Any active member of the space may create tags.", + "operationId": "addressBooksCreateTagV1", + "parameters": [ + { + "name": "spaceId", + "required": true, + "in": "path", + "description": "Space UUID containing the address book", + "schema": { + "example": "123e4567-e89b-12d3-a456-426614174000", + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "description": "The tag name", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateTagDto" + } + } + } + }, + "responses": { + "201": { + "description": "Tag created successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SpaceAddressBookDto" + } + } + } + }, + "400": { + "description": "Invalid space identifier, or the space already has 8 tags" + }, + "401": { + "description": "Authentication required - valid JWT token must be provided" + }, + "403": { + "description": "Access forbidden - user is not an active member of this space" + }, + "404": { + "description": "Space not found" + }, + "409": { + "description": "The space has a tag with this name, ignoring case" + }, + "422": { + "description": "Invalid tag name" + }, + "429": { + "description": "Rate limit exceeded" + } + }, + "summary": "Create address book tag", + "tags": [ + "spaces" + ] + } + }, + "/v1/spaces/{spaceId}/address-book/tags/{tagId}": { + "patch": { + "description": "Renames a tag of the space; the tag keeps its colour. Renaming to the name of another tag of the space merges the two: the entries of the renamed tag move to the existing tag, which keeps its name and colour. Any active member of the space may rename tags.", + "operationId": "addressBooksRenameTagV1", + "parameters": [ + { + "name": "spaceId", + "required": true, + "in": "path", + "description": "Space UUID containing the address book", + "schema": { + "example": "123e4567-e89b-12d3-a456-426614174000", + "type": "string" + } + }, + { + "name": "tagId", + "required": true, + "in": "path", + "description": "ID of the tag to rename", + "schema": { + "type": "number" + } + } + ], + "requestBody": { + "required": true, + "description": "The new tag name", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RenameTagDto" + } + } + } + }, + "responses": { + "200": { + "description": "Tag renamed successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SpaceAddressBookDto" + } + } + } + }, + "400": { + "description": "Invalid space or tag identifier" + }, + "401": { + "description": "Authentication required - valid JWT token must be provided" + }, + "403": { + "description": "Access forbidden - user is not an active member of this space" + }, + "404": { + "description": "Space not found, or the tag is not a tag of this space" + }, + "422": { + "description": "Invalid tag name, or a tag identifier beyond the safe integer range" + }, + "429": { + "description": "Rate limit exceeded" + } + }, + "summary": "Rename address book tag", + "tags": [ + "spaces" + ] + }, + "delete": { + "description": "Deletes a tag of the space and removes it from every address book entry. Any active member of the space may delete tags.", + "operationId": "addressBooksDeleteTagV1", + "parameters": [ + { + "name": "spaceId", + "required": true, + "in": "path", + "description": "Space UUID containing the address book", + "schema": { + "example": "123e4567-e89b-12d3-a456-426614174000", + "type": "string" + } + }, + { + "name": "tagId", + "required": true, + "in": "path", + "description": "ID of the tag to delete", + "schema": { + "type": "number" + } + } + ], + "responses": { + "204": { + "description": "Tag deleted successfully" + }, + "400": { + "description": "Invalid space or tag identifier" + }, + "401": { + "description": "Authentication required - valid JWT token must be provided" + }, + "403": { + "description": "Access forbidden - user is not an active member of this space" + }, + "404": { + "description": "Space not found, or the tag is not a tag of this space" + }, + "422": { + "description": "A tag identifier beyond the safe integer range" + } + }, + "summary": "Delete address book tag", + "tags": [ + "spaces" + ] + } + }, + "/v1/spaces/{spaceId}/address-book/{address}": { + "delete": { "description": "Removes a specific address from the space address book by its address.", "operationId": "addressBooksDeleteByAddressV1", "parameters": [ @@ -2307,10 +2848,10 @@ "description": "Invalid space identifier" }, "403": { - "description": "Access forbidden - user is not authorized to modify this address book" + "description": "Access forbidden - user is not an active admin of this space" }, "404": { - "description": "User, member, space, or address book entry not found" + "description": "Space not found" } }, "summary": "Delete address book entry", @@ -2577,67 +3118,227 @@ ] } }, - "/v1/spaces/{id}": { - "get": { - "description": "Retrieves detailed information about a specific space. The user must be a member of or invited to the space.", - "operationId": "spacesGetOneV1", - "parameters": [ - { - "name": "id", - "required": true, - "in": "path", - "description": "Space UUID", - "schema": { - "example": "123e4567-e89b-12d3-a456-426614174000", - "type": "string" + "/v1/spaces/setup": { + "post": { + "description": "Creates the space and its creator, stores the rest of the form as a pending setup, and starts the trial checkout. The setup (Safes, contacts, invites, survey) is applied when the trial starts. Without a plan (paymentLinkId null), the setup is applied at once and checkoutUrl is null.", + "operationId": "spacesCreateSetupV1", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateSpaceSetupDto" + } } } - ], + }, "responses": { - "200": { - "description": "Space information retrieved successfully", + "201": { + "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GetSpaceResponse" + "$ref": "#/components/schemas/SpaceSetupCheckoutDto" } } } }, "400": { - "description": "Invalid space identifier" + "description": "Invalid return URL or survey selections" }, "401": { "description": "Authentication required - valid JWT token must be provided" }, "403": { - "description": "Forbidden resource - user is not a member of this space" + "description": "A plan that is not offered, or the space limit is reached" }, "404": { - "description": "Space not found" + "description": "No active survey for this slug" + }, + "409": { + "description": "The plan has fewer Safe seats than selected, or too many invites" + }, + "422": { + "description": "Invalid body, a plan while billing is not available, or no plan while billing is enforced" + }, + "502": { + "description": "The space was created, but the checkout could not start. The body carries spaceId; retry with PUT." } }, - "summary": "Get space by UUID", + "summary": "Create a space from the onboarding form", "tags": [ "spaces" ] - }, - "patch": { - "description": "Updates space information such as name. Only space admins can update space details.", - "operationId": "spacesUpdateV1", + } + }, + "/v1/spaces/{id}/setup": { + "get": { + "description": "Returns the onboarding form stored for the space. While it is pending, the subscription is read from the billing service, and a started trial applies the setup before this answers. Admins only.", + "operationId": "spacesGetSetupV1", "parameters": [ { "name": "id", "required": true, "in": "path", - "description": "Space UUID to update", + "description": "Space UUID", "schema": { "example": "123e4567-e89b-12d3-a456-426614174000", "type": "string" } } ], - "requestBody": { + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SpaceSetupDto" + } + } + } + }, + "400": { + "description": "Invalid space identifier" + }, + "401": { + "description": "Authentication required - valid JWT token must be provided" + }, + "403": { + "description": "User is not an admin of this space" + }, + "404": { + "description": "Space not found, or it has no setup" + } + }, + "summary": "Get the setup of a space", + "tags": [ + "spaces" + ] + }, + "put": { + "description": "Replaces the name and the onboarding form of a space whose trial has not started, and starts a new checkout. Admins only.", + "operationId": "spacesUpdateSetupV1", + "parameters": [ + { + "name": "id", + "required": true, + "in": "path", + "description": "Space UUID", + "schema": { + "example": "123e4567-e89b-12d3-a456-426614174000", + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateSpaceSetupDto" + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SpaceSetupCheckoutDto" + } + } + } + }, + "400": { + "description": "Invalid space identifier, return URL or survey selections" + }, + "401": { + "description": "Authentication required - valid JWT token must be provided" + }, + "403": { + "description": "Elevation required, not an admin, or a plan that is not offered" + }, + "404": { + "description": "Space not found, it has no setup, or no active survey" + }, + "409": { + "description": "The setup is applied or the trial has started, the plan has fewer Safe seats than selected, or too many invites" + }, + "422": { + "description": "Invalid body, a plan while billing is not available, or no plan while billing is enforced" + } + }, + "summary": "Replace the setup of a space", + "tags": [ + "spaces" + ] + } + }, + "/v1/spaces/{id}": { + "get": { + "description": "Retrieves detailed information about a specific space. The user must be a member of or invited to the space.", + "operationId": "spacesGetOneV1", + "parameters": [ + { + "name": "id", + "required": true, + "in": "path", + "description": "Space UUID", + "schema": { + "example": "123e4567-e89b-12d3-a456-426614174000", + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Space information retrieved successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetSpaceResponse" + } + } + } + }, + "400": { + "description": "Invalid space identifier" + }, + "401": { + "description": "Authentication required - valid JWT token must be provided" + }, + "403": { + "description": "Forbidden resource - user is not a member of this space" + }, + "404": { + "description": "Space not found" + } + }, + "summary": "Get space by UUID", + "tags": [ + "spaces" + ] + }, + "patch": { + "description": "Updates space information such as name. Only space admins can update space details.", + "operationId": "spacesUpdateV1", + "parameters": [ + { + "name": "id", + "required": true, + "in": "path", + "description": "Space UUID to update", + "schema": { + "example": "123e4567-e89b-12d3-a456-426614174000", + "type": "string" + } + } + ], + "requestBody": { "required": true, "description": "Space update data including new name or other properties", "content": { @@ -2730,6 +3431,15 @@ "type": "string" } }, + { + "name": "cursor", + "required": false, + "in": "query", + "description": "Pagination cursor for retrieving the next set of results", + "schema": { + "type": "string" + } + }, { "name": "event_type", "required": false, @@ -2778,15 +3488,6 @@ ], "type": "string" } - }, - { - "name": "cursor", - "required": false, - "in": "query", - "description": "Pagination cursor for retrieving the next set of results", - "schema": { - "type": "string" - } } ], "responses": { @@ -2808,6 +3509,9 @@ }, "403": { "description": "User is not an ACTIVE member of the space, or the feature is disabled" + }, + "422": { + "description": "Invalid cursor" } }, "summary": "Get space audit log", @@ -3007,6 +3711,38 @@ ] } }, + "/v1/spaces/safes": { + "get": { + "description": "Retrieves the Safes of every space the user is an active member of, one entry per space with its Safes grouped by chain like the per-space endpoint. A space without Safes has an empty `safes` object.", + "operationId": "spaceSafesGetAllV1", + "parameters": [], + "responses": { + "200": { + "description": "Safes of all spaces retrieved successfully", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/GetSpacesSafesResponse" + } + } + } + } + }, + "401": { + "description": "Authentication required" + }, + "403": { + "description": "Access forbidden - missing or invalid authentication" + } + }, + "summary": "Get Safes of all spaces", + "tags": [ + "spaces" + ] + } + }, "/v1/spaces/{spaceId}/members/invite": { "post": { "description": "Invites one or more users to join a space. Only space admins can send invitations.", @@ -3204,6 +3940,9 @@ }, "409": { "description": "Invitation is not in a pending state" + }, + "429": { + "description": "Invitation was renewed recently" } }, "summary": "Renew space invitation", @@ -3626,38 +4365,55 @@ ] } }, - "/v1/spaces/{spaceId}/surveys/{slug}/state": { + "/v1/spaces/{spaceId}/chains/{chainId}/security/{safeAddress}/recipient/{recipientAddress}": { "get": { - "description": "Returns the active survey definition and this space's response (if any) in a single round trip. Only active admins of the space can read survey state.", - "operationId": "surveysGetStateV1", + "description": "Performs real-time security analysis of a recipient address for a Safe registered to a Space, gated by the copilot_scans plan entitlement.", + "operationId": "spaceSafeShieldAnalyzeRecipientV1", "parameters": [ { - "name": "spaceId", + "name": "chainId", "required": true, "in": "path", - "description": "Space UUID to get survey state for", + "description": "Chain ID where the Safe is deployed", "schema": { - "example": "123e4567-e89b-12d3-a456-426614174000", "type": "string" } }, { - "name": "slug", + "name": "safeAddress", "required": true, "in": "path", + "description": "Safe contract address, must be registered to the Space", + "schema": { + "type": "string" + } + }, + { + "name": "recipientAddress", + "required": true, + "in": "path", + "description": "Recipient address to analyze", + "schema": { + "type": "string" + } + }, + { + "name": "spaceId", + "required": true, + "in": "path", + "description": "Space UUID", "schema": { - "example": "onboarding", "type": "string" } } ], "responses": { "200": { - "description": "", + "description": "Recipient interaction analysis results", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SurveyStateDto" + "$ref": "#/components/schemas/SingleRecipientAnalysisDto" } } } @@ -3666,109 +4422,199 @@ "description": "Invalid space identifier" }, "401": { - "description": "Not authenticated" + "description": "Authentication required" }, - "403": { - "description": "User is not an active admin of this space" + "402": { + "description": "The Space has no copilot_scans entitlement. The body carries `{ code: \"FEATURE_NOT_GRANTED\", feature }`" }, - "404": { - "description": "No active survey for this slug" + "403": { + "description": "Not a member of this Space, or the Safe is not registered to it" } }, - "summary": "Get survey state for a space", + "summary": "Analyze recipient address on a Space", "tags": [ - "surveys" + "safe-shield" ] } }, - "/v1/spaces/{spaceId}/surveys/{slug}/responses": { + "/v1/spaces/{spaceId}/chains/{chainId}/security/{safeAddress}/counterparty-analysis": { "post": { - "description": "Submits or updates the space's response to the active survey for the given slug. Only active admins of the space can submit. Idempotent: repeat submissions overwrite the previous response.", - "operationId": "surveysSubmitResponseV1", + "description": "Performs combined contract and recipient analysis for a Safe transaction on a Safe registered to a Space, gated by the copilot_scans plan entitlement.", + "operationId": "spaceSafeShieldAnalyzeCounterpartyV1", "parameters": [ { - "name": "spaceId", + "name": "chainId", "required": true, "in": "path", - "description": "Space UUID to submit a survey response for", + "description": "Chain ID where the Safe is deployed", "schema": { - "example": "123e4567-e89b-12d3-a456-426614174000", "type": "string" } }, { - "name": "slug", + "name": "safeAddress", "required": true, "in": "path", + "description": "Safe contract address, must be registered to the Space", + "schema": { + "type": "string" + } + }, + { + "name": "spaceId", + "required": true, + "in": "path", + "description": "Space UUID", "schema": { - "example": "onboarding", "type": "string" } } ], "requestBody": { "required": true, + "description": "Transaction data used to analyze all counterparties involved.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SubmitSurveyResponseDto" + "$ref": "#/components/schemas/CounterpartyAnalysisRequestDto" } } } }, "responses": { - "201": { - "description": "", + "200": { + "description": "Combined counterparty analysis including recipients and contracts grouped by status group and mapped to an address.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SurveyResponseResultDto" + "$ref": "#/components/schemas/CounterpartyAnalysisDto" } } } }, "400": { - "description": "Empty selections or unknown option keys" + "description": "Invalid space identifier" }, "401": { - "description": "Not authenticated" + "description": "Authentication required" }, - "403": { - "description": "User is not an active admin of this space" + "402": { + "description": "The Space has no copilot_scans entitlement. The body carries `{ code: \"FEATURE_NOT_GRANTED\", feature }`" }, - "404": { - "description": "No active survey for this slug" + "403": { + "description": "Not a member of this Space, or the Safe is not registered to it" } }, - "summary": "Submit a survey response for a space", + "summary": "Analyze transaction counterparties on a Space", "tags": [ - "surveys" + "safe-shield" ] } }, - "/v1/spaces/{spaceId}/entitlements": { + "/v1/spaces/{spaceId}/transactions/queued": { "get": { - "description": "The single source of truth for what a workspace can do: the active plan and per-feature entitlements, with quotas and usage for metered ones. Free-tier workspaces get the same contract shape.", - "operationId": "entitlementsGetEntitlementsV1", + "description": "Retrieves the pending transactions of every Safe in a Space, across chains, in nonce order. Results are keyed by Safe address and then by chain ID. The queue is read up to a maximum number of queue service pages; `count` is the size of the whole queue. The filters narrow `results`; `counts` are faceted, each applying every filter but its own. A matching transaction is returned with the rest of its conflict group and its label.", + "operationId": "spaceTransactionsGetTransactionQueueV1", "parameters": [ + { + "name": "status", + "required": false, + "in": "query", + "description": "Keep the transactions with one of these statuses, comma-separated. `sign` is a transaction one of the caller wallets still has to sign.", + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "example": "sign,execute" + } + }, + { + "name": "safes", + "required": false, + "in": "query", + "description": "Keep the transactions of these Safes, comma-separated as `{chainId}:{safeAddress}`", + "schema": { + "example": "11155111:0x0000000000000000000000000000000000000000", + "type": "string" + } + }, + { + "name": "chainIds", + "required": false, + "in": "query", + "description": "Keep the transactions on these chains, comma-separated", + "schema": { + "example": "1,137", + "type": "string" + } + }, + { + "name": "signers", + "required": false, + "in": "query", + "description": "Keep the transactions still awaiting a signature from one of these addresses, comma-separated", + "schema": { + "example": "0x0000000000000000000000000000000000000000", + "type": "string" + } + }, + { + "name": "conflicting", + "required": false, + "in": "query", + "description": "Keep the transactions sharing their nonce with another", + "schema": { + "type": "boolean" + } + }, + { + "name": "stale", + "required": false, + "in": "query", + "description": "Keep the transactions proposed more than 7 days ago", + "schema": { + "type": "boolean" + } + }, + { + "name": "search", + "required": false, + "in": "query", + "description": "Keep the transactions whose Safe (address or Space address book name), network name, status, or a signer still to sign (address or name) contains this text, ignoring case. Unlike the filters, it narrows every count. At most 100 characters.", + "schema": { + "example": "treasury", + "type": "string" + } + }, + { + "name": "limit", + "required": false, + "in": "query", + "description": "Return only the first transactions of the queue, by nonce across every Safe (not by age), up to the transactions an unlimited request returns. Without a filter or `search`, only that many are read: `counts` cover only those, and a conflict group cut by the limit is returned in part. With a filter or `search`, the whole queue is read and filtered first, so `counts` cover the whole queue and a conflict group is kept whole, which can return a few more than `limit`. `count` is always the size of the whole queue.", + "schema": { + "minimum": 1, + "example": 4, + "type": "number" + } + }, { "name": "spaceId", "required": true, "in": "path", "description": "Space UUID", "schema": { - "example": "123e4567-e89b-12d3-a456-426614174000", "type": "string" } } ], "responses": { "200": { - "description": "", + "description": "Queue of the Safes in the Space", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EntitlementsResponse" + "$ref": "#/components/schemas/SpaceQueuedItemPage" } } } @@ -3780,607 +4626,765 @@ "description": "Authentication required" }, "403": { - "description": "Access forbidden - user is not a member of this space" + "description": "Not a member of this Space" }, "404": { "description": "Space not found" + }, + "422": { + "description": "Unknown status, invalid CAIP-10 address, chain ID or signer address, non-boolean flag, too long search or invalid limit" } }, - "summary": "Get space entitlements", + "summary": "Get the transaction queue of a Space", "tags": [ - "entitlements" + "transactions" ] } }, - "/v1/chains/{chainId}/owners/{ownerAddress}/safes": { - "get": { - "description": "Retrieves a list of Safe addresses that are owned by the specified address on a specific chain.", - "operationId": "ownersGetSafesByOwnerV1", + "/v1/spaces/{spaceId}/chains/{chainId}/safes/{safeAddress}/policies/requests": { + "post": { + "description": "Stores the `Configuration[]` behind a `requestConfiguration(root)`, which publishes only the hash on-chain, so that the configurations a later `applyConfiguration` needs survive the delay. Call it before requesting the configuration on-chain: the root is recomputed from the configurations and has to match, but it is not required to exist on-chain yet. Idempotent: storing the same root again is a no-op.", + "operationId": "policiesCreateConfigurationRequestV1", "parameters": [ + { + "name": "spaceId", + "required": true, + "in": "path", + "description": "Space UUID the Safe belongs to", + "schema": { + "example": "123e4567-e89b-12d3-a456-426614174000", + "type": "string" + } + }, { "name": "chainId", "required": true, "in": "path", - "description": "Chain ID to search for Safes", + "description": "Chain ID where the Safe is deployed", "schema": { - "example": "1", + "example": "11155111", "type": "string" } }, { - "name": "ownerAddress", + "name": "safeAddress", "required": true, "in": "path", - "description": "Owner address to search Safes for (0x prefixed hex string)", + "description": "Safe contract address, must be registered to the Space", "schema": { "type": "string" } } ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreatePolicyConfigurationRequestDto" + } + } + } + }, "responses": { - "200": { - "description": "List of Safes owned by the specified address", + "201": { + "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SafeList" + "$ref": "#/components/schemas/CreatePolicyConfigurationRequestResponse" } } } + }, + "400": { + "description": "Invalid space identifier, or the Safe holds the maximum number of active requests in this space" + }, + "401": { + "description": "Authentication required" + }, + "403": { + "description": "Access forbidden - user is not a member of this space, or the Safe is not in it" + }, + "422": { + "description": "Invalid chain ID, Safe address or body, the configurations do not hash to the given root, the chain has no policy engine, or a policy is neither a known policy contract on the chain nor the zero address" } }, - "summary": "Get Safes by owner", + "summary": "Store the configurations of a delayed configuration request", "tags": [ - "owners" + "spaces" ] } }, - "/v2/owners/{ownerAddress}/safes": { - "get": { - "description": "Retrieves all Safes owned by the specified address across all supported chains. Returns a map of chain IDs to arrays of Safe addresses.", - "operationId": "ownersGetAllSafesByOwnerV2", + "/v1/spaces/{spaceId}/chains/{chainId}/safes/{safeAddress}/policies/requests/{root}": { + "delete": { + "description": "Deletes the configurations stored behind a root, in any state. A root already requested on-chain stays there until invalidated.", + "operationId": "policiesDeleteConfigurationRequestV1", "parameters": [ { - "name": "ownerAddress", + "name": "spaceId", "required": true, "in": "path", - "description": "Owner address to search Safes for (0x prefixed hex string)", + "description": "Space UUID the Safe belongs to", + "schema": { + "example": "123e4567-e89b-12d3-a456-426614174000", + "type": "string" + } + }, + { + "name": "chainId", + "required": true, + "in": "path", + "description": "Chain ID where the Safe is deployed", + "schema": { + "example": "11155111", + "type": "string" + } + }, + { + "name": "safeAddress", + "required": true, + "in": "path", + "description": "Safe contract address, must be registered to the Space", + "schema": { + "type": "string" + } + }, + { + "name": "root", + "required": true, + "in": "path", + "description": "The stored configuration root, a 32-byte hex", "schema": { "type": "string" } } ], "responses": { - "200": { - "description": "Map of chain IDs to arrays of Safe addresses owned by the address", - "content": { - "application/json": { - "schema": { - "type": "object", - "additionalProperties": { - "type": "array", - "items": { - "type": "string" - } - }, - "example": { - "1": [ - "0x1234567890123456789012345678901234567890" - ], - "5": [ - "0xabcdefabcdefabcdefabcdefabcdefabcdefabcd" - ] - } - } - } - } + "204": { + "description": "Configuration request deleted" + }, + "400": { + "description": "Invalid space identifier" + }, + "401": { + "description": "Authentication required" + }, + "403": { + "description": "Access forbidden - user is not a member of this space, or the Safe is not in it" + }, + "404": { + "description": "No configuration request is stored for this root" + }, + "422": { + "description": "Invalid chain ID, Safe address or root" } }, - "summary": "Get all Safes by owner", + "summary": "Delete a stored configuration request", "tags": [ - "owners" + "spaces" ] } }, - "/v3/owners/{ownerAddress}/safes": { + "/v1/spaces/{spaceId}/policies/active": { "get": { - "description": "Retrieves all Safes owned by the specified address across all supported chains. Returns a map of chain IDs to arrays of Safe addresses.", - "operationId": "ownersGetAllSafesByOwnerV3", + "description": "Returns the policies of every Safe in the Space. A Safe whose enabled modules and guards could not be read is omitted from the spending-limit and guard-enforced policies; a Safe whose delegates could not be read is omitted from the proposer policies.", + "operationId": "spacePoliciesGetActivePoliciesV1", "parameters": [ { - "name": "ownerAddress", + "name": "spaceId", "required": true, "in": "path", - "description": "Owner address to search Safes for (0x prefixed hex string)", + "description": "Space UUID", + "schema": { + "example": "123e4567-e89b-12d3-a456-426614174000", + "type": "string" + } + }, + { + "name": "types", + "required": true, + "in": "query", + "description": "The policy types to report, comma-separated.", "schema": { + "type": "array", + "items": { + "type": "string" + }, + "example": "spending-limit,proposer" + } + }, + { + "name": "safes", + "required": false, + "in": "query", + "description": "Narrow the read to a subset of the Space's Safes, comma-separated as `{chainId}:{safeAddress}`", + "schema": { + "example": "11155111:0x0000000000000000000000000000000000000000", "type": "string" } } ], "responses": { "200": { - "description": "Map of chain IDs to arrays of Safe addresses owned by the address", + "description": "", "content": { "application/json": { "schema": { - "type": "object", - "additionalProperties": { - "type": "array", - "items": { - "type": "string" - } - }, - "example": { - "1": [ - "0x1234567890123456789012345678901234567890" - ], - "5": [ - "0xabcdefabcdefabcdefabcdefabcdefabcdefabcd" - ] + "type": "array", + "items": { + "$ref": "#/components/schemas/ActivePolicyDto" } } } } - } - }, - "summary": "Get all Safes by owner", + }, + "400": { + "description": "Invalid space identifier" + }, + "403": { + "description": "Access forbidden - authentication missing or invalid, or user is not a member of this space" + }, + "422": { + "description": "Invalid CAIP-10 address, a Safe outside this space, or a missing or unknown policy type" + }, + "503": { + "description": "The policy api is unavailable" + } + }, + "summary": "Get the active policies on Safes in a Space", "tags": [ - "owners" + "spaces" ] } }, - "/v1/chains/{chainId}/relay": { - "post": { - "description": "Relays a Safe transaction or Safe creation transaction using the relay service, which pays for gas fees. Supports execTransaction (Safe tx) and createProxyWithNonce (Safe creation) calldata. On relay-fee chains, safeTxHash is required and must match the hash derived on-chain from the submitted calldata. On chains where pre-relay Tenderly simulation is enabled, an execTransaction is simulated before being submitted: a confirmed revert returns SIMULATION_FAILED, and an unreachable simulator returns INDETERMINATE_SIMULATION (retry with acceptUnverifiedSimulation=true to proceed anyway when the simulator is unreachable).", - "operationId": "relayRelayV1", + "/v1/spaces/{spaceId}/policies/pending": { + "get": { + "description": "Returns the pending policy changes of every Safe in the Space. Queued calls are detected only when made directly or one level inside a MultiSend batch, and only against known AllowanceModule and SafePolicyGuard deployments - a change made through a nested MultiSend, a custom batching contract, or a Safe module bypassing the owner queue is not detected.", + "operationId": "spacePoliciesGetPendingPoliciesV1", "parameters": [ { - "name": "chainId", + "name": "spaceId", "required": true, "in": "path", - "description": "Chain ID where the Safe transaction will be executed", + "description": "Space UUID", "schema": { - "example": "1", + "example": "123e4567-e89b-12d3-a456-426614174000", "type": "string" } - } - ], - "requestBody": { - "required": true, - "description": "Transaction data to relay. safeTxHash is required on relay-fee chains and must correspond to the to + data fields. Set acceptUnverifiedSimulation=true to retry a relay skipping the simulation which previously returned INDETERMINATE_SIMULATION.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RelayDto" - } + }, + { + "name": "types", + "required": true, + "in": "query", + "description": "The policy types to report, comma-separated. `spending-limit` returns queued AllowanceModule changes. A guard type (`allow`, `deny`, `cosigner`, `erc20-transfer`, `multisend`, `native-transfer`) returns the delayed `SafePolicyGuard` configurations that may set a policy of that type. `proposer` and `recovery` return none.", + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "example": "spending-limit" + } + }, + { + "name": "safes", + "required": false, + "in": "query", + "description": "Narrow the read to a subset of the Space's Safes, comma-separated as `{chainId}:{safeAddress}`", + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "example": "11155111:0x0000000000000000000000000000000000000000" + } + }, + { + "name": "include_guard_installation", + "required": false, + "in": "query", + "description": "Also report the queued `setGuard` and `setModuleGuard` calls that install, replace or remove a `SafePolicyGuard` on each Safe, as `guard-installation` items.", + "schema": { + "default": false, + "example": true, + "type": "boolean" } } - }, + ], "responses": { "200": { - "description": "Transaction relayed successfully", + "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Relay" + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/PendingPolicyDto" + }, + { + "$ref": "#/components/schemas/PendingGuardInstallationDto" + }, + { + "$ref": "#/components/schemas/PendingImmediateGuardPoliciesDto" + }, + { + "$ref": "#/components/schemas/PendingDelayedGuardPoliciesDto" + } + ], + "discriminator": { + "propertyName": "kind", + "mapping": { + "queued-transaction": "#/components/schemas/PendingPolicyDto", + "guard-installation": "#/components/schemas/PendingGuardInstallationDto", + "immediate-guard-policies": "#/components/schemas/PendingImmediateGuardPoliciesDto", + "delayed-guard-policies": "#/components/schemas/PendingDelayedGuardPoliciesDto" + } + } + } } } } }, "400": { - "description": "Request body failed schema validation" + "description": "Invalid space identifier" }, "403": { - "description": "Relay denied: safeTxHash missing, fee service rejected, or unofficial proxy factory" + "description": "Access forbidden - authentication missing or invalid, or user is not a member of this space" }, "422": { - "description": "Relay rejected. The consumers MUST branch on the `code` field; `message` is informational. Possible cases: safeTxHash does not match the transaction data, unrecognised transaction type, SIMULATION_FAILED (Tenderly confirmed revert), or INDETERMINATE_SIMULATION (simulator unreachable; retry with `acceptUnverifiedSimulation=true` to proceed anyway).", - "schema": { - "examples": { - "simulationFailed": { - "summary": "SIMULATION_FAILED", - "value": { - "code": "SIMULATION_FAILED", - "message": "Relay denied: transaction simulation failed: Reverted with reason string: 'GS013'", - "statusCode": 422 - } - }, - "indeterminateSimulation": { - "summary": "INDETERMINATE_SIMULATION", - "value": { - "code": "INDETERMINATE_SIMULATION", - "message": "Relay simulation could not be completed.", - "statusCode": 422 - } - }, - "safeTxHashMismatch": { - "summary": "safeTxHash mismatch (no `code`)", - "value": { - "message": "Safe transaction hash mismatch: provided hash 0x... does not match the transaction data", - "statusCode": 422 - } - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RelayErrorResponse" - } - } - } + "description": "Invalid CAIP-10 address, a Safe outside this space, a missing or unknown policy type, or an `include_guard_installation` value other than `true` or `false`" }, - "429": { - "description": "Relay limit reached for this Safe" + "503": { + "description": "The policy api is unavailable" } }, - "summary": "Relay transaction", + "summary": "Get the pending policy changes on Safes in a Space", "tags": [ - "relay" + "spaces" ] } }, - "/v1/chains/{chainId}/relay/status/{taskId}": { + "/v1/surveys/{slug}": { "get": { - "description": "Retrieves the status of a relay task from the relay provider. This is a proxy endpoint to securely query task status without exposing the API key.", - "operationId": "relayGetTaskStatusV1", + "description": "Returns the active survey for the slug. It needs no space, so a Workspace that does not exist yet can show it.", + "operationId": "surveysGetActiveSurveyV1", "parameters": [ { - "name": "chainId", - "required": true, - "in": "path", - "description": "Chain ID associated with the relay task", - "schema": { - "example": "11155111", - "type": "string" - } - }, - { - "name": "taskId", + "name": "slug", "required": true, "in": "path", - "description": "Task ID returned from the relay transaction", "schema": { + "example": "onboarding", "type": "string" } } ], "responses": { "200": { - "description": "Task status retrieved successfully", + "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/RelayTaskStatus" + "$ref": "#/components/schemas/SurveyDto" } } } }, + "401": { + "description": "Not authenticated" + }, "404": { - "description": "Task not found" + "description": "No active survey for this slug" } }, - "summary": "Get relay task status", + "summary": "Get the active survey", "tags": [ - "relay" + "surveys" ] } }, - "/v1/chains/{chainId}/relay/{safeAddress}": { + "/v1/spaces/{spaceId}/surveys/{slug}/state": { "get": { - "description": "Retrieves the number of remaining relay transactions available for a specific Safe on the given chain. On relay-fee chains, safeTxHash is forwarded to the fee service to determine per-transaction eligibility (returns remaining=1 when eligible, 0 when not). On daily-limit and no-fee-campaign chains, a count-based quota is returned.", - "operationId": "relayGetRelaysRemainingV1", + "description": "Returns the active survey definition and this space's response (if any) in a single round trip. Only active admins of the space can read survey state.", + "operationId": "surveysGetStateV1", "parameters": [ { - "name": "chainId", + "name": "spaceId", "required": true, "in": "path", - "description": "Chain ID where the Safe is deployed", + "description": "Space UUID to get survey state for", "schema": { - "example": "1", + "example": "123e4567-e89b-12d3-a456-426614174000", "type": "string" } }, { - "name": "safeAddress", + "name": "slug", "required": true, "in": "path", - "description": "Safe contract address (0x prefixed hex string)", - "schema": { - "type": "string" - } - }, - { - "name": "safeTxHash", - "required": false, - "in": "query", - "description": "Safe transaction hash (0x prefixed hex string). Required on relay-fee chains to check per-transaction eligibility with the fee service. Optional on daily-limit and no-fee-campaign chains.", "schema": { + "example": "onboarding", "type": "string" } } ], "responses": { "200": { - "description": "Remaining relay quota retrieved successfully", + "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/RelaysRemaining" + "$ref": "#/components/schemas/SurveyStateDto" } } } + }, + "400": { + "description": "Invalid space identifier" + }, + "401": { + "description": "Not authenticated" + }, + "403": { + "description": "User is not an active admin of this space" + }, + "404": { + "description": "No active survey for this slug" } }, - "summary": "Get remaining relays", + "summary": "Get survey state for a space", "tags": [ - "relay" + "surveys" ] } }, - "/v1/chains/{chainId}/safe-apps": { - "get": { - "description": "Retrieves a list of Safe Apps available for a specific chain, with optional filtering by client URL or app URL.", - "operationId": "safeAppsGetSafeAppsV1", + "/v1/spaces/{spaceId}/surveys/{slug}/responses": { + "post": { + "description": "Submits or updates the space's response to the active survey for the given slug. Only active admins of the space can submit. Idempotent: repeat submissions overwrite the previous response.", + "operationId": "surveysSubmitResponseV1", "parameters": [ { - "name": "chainId", + "name": "spaceId", "required": true, "in": "path", - "description": "Chain ID to get Safe Apps for", - "schema": { - "example": "1", - "type": "string" - } - }, - { - "name": "clientUrl", - "required": false, - "in": "query", - "description": "Filter by client URL to get apps compatible with specific client", + "description": "Space UUID to submit a survey response for", "schema": { + "example": "123e4567-e89b-12d3-a456-426614174000", "type": "string" } }, { - "name": "url", - "required": false, - "in": "query", - "description": "Filter by specific Safe App URL", + "name": "slug", + "required": true, + "in": "path", "schema": { + "example": "onboarding", "type": "string" } } ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SubmitSurveyResponseDto" + } + } + } + }, "responses": { - "200": { - "description": "List of Safe Apps available for the specified chain", + "201": { + "description": "", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SafeApp" - } + "$ref": "#/components/schemas/SurveyResponseResultDto" } } } + }, + "400": { + "description": "Empty selections or unknown option keys" + }, + "401": { + "description": "Not authenticated" + }, + "403": { + "description": "User is not an active admin of this space" + }, + "404": { + "description": "No active survey for this slug" } }, - "summary": "Get Safe Apps", + "summary": "Submit a survey response for a space", "tags": [ - "safe-apps" + "surveys" ] } }, - "/v1/chains/{chainId}/safes/{safeAddress}": { + "/v1/spaces/entitlements": { "get": { - "description": "Retrieves detailed information about a Safe including owners, threshold, modules, and current state.", - "operationId": "safesGetSafeV1", - "parameters": [ - { - "name": "chainId", - "required": true, - "in": "path", - "description": "Chain ID where the Safe is deployed", - "schema": { - "example": "1", - "type": "string" + "description": "The entitlements of every workspace the user is an active member of, keyed by workspace UUID. Each value is what the per-workspace endpoint returns.", + "operationId": "entitlementsGetAllEntitlementsV1", + "parameters": [], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/EntitlementsResponse" + } + } + } } }, + "401": { + "description": "Authentication required" + }, + "403": { + "description": "Access forbidden - missing or invalid authentication" + } + }, + "summary": "Get entitlements of all spaces", + "tags": [ + "entitlements" + ] + } + }, + "/v1/spaces/{spaceId}/entitlements": { + "get": { + "description": "The single source of truth for what a workspace can do: the active plan and per-feature entitlements, with quotas and usage for metered ones. Free-tier workspaces get the same contract shape.", + "operationId": "entitlementsGetEntitlementsV1", + "parameters": [ { - "name": "safeAddress", + "name": "spaceId", "required": true, "in": "path", - "description": "Safe contract address (0x prefixed hex string)", + "description": "Space UUID", "schema": { + "example": "123e4567-e89b-12d3-a456-426614174000", "type": "string" } } ], "responses": { "200": { - "description": "Safe information retrieved successfully", + "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SafeState" + "$ref": "#/components/schemas/EntitlementsResponse" } } } }, + "400": { + "description": "Invalid space identifier" + }, + "401": { + "description": "Authentication required" + }, + "403": { + "description": "Access forbidden - user is not a member of this space" + }, "404": { - "description": "Safe not found on the specified chain" + "description": "Space not found" } }, - "summary": "Get Safe information", + "summary": "Get space entitlements", "tags": [ - "safes" + "entitlements" ] } }, - "/v1/chains/{chainId}/safes/{safeAddress}/nonces": { - "get": { - "description": "Retrieves the current nonces for a Safe, including the transaction nonce and any queued nonces.", - "operationId": "safesGetNoncesV1", + "/v1/spaces/{spaceId}/chains/{chainId}/relay": { + "post": { + "description": "Relays a Safe transaction against the workspace's sponsored-transaction allowance, which its plan grants and this spends one unit of per call — a batch included. The chain must list SUBSCRIPTION among its gas payment options; no other option applies here. A call acting on an existing Safe is admitted only for a Safe the workspace holds; a Safe creation or a passkey signer deployment, having no Safe yet, is admitted as it is there.", + "operationId": "spaceRelayRelayV1", "parameters": [ { "name": "chainId", "required": true, "in": "path", - "description": "Chain ID where the Safe is deployed", + "description": "Chain ID where the Safe transaction will be executed", "schema": { "example": "1", "type": "string" } }, { - "name": "safeAddress", + "name": "spaceId", "required": true, "in": "path", - "description": "Safe contract address (0x prefixed hex string)", + "description": "Space UUID", "schema": { + "example": "123e4567-e89b-12d3-a456-426614174000", "type": "string" } } ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SpaceRelayDto" + } + } + } + }, "responses": { - "200": { - "description": "Safe nonces retrieved successfully", + "201": { + "description": "Transaction relayed", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SafeNonces" + "$ref": "#/components/schemas/Relay" } } } }, + "400": { + "description": "Malformed workspace identifier" + }, + "401": { + "description": "Authentication required" + }, + "402": { + "description": "The workspace's sponsored-transaction allowance is spent. The body carries `quota`, `used` and `resetsAt` so a client can offer to pay for the transaction itself." + }, + "403": { + "description": "Not a member of the workspace, or the transaction was denied" + }, "404": { - "description": "Safe not found on the specified chain" + "description": "Workspace not found" + }, + "409": { + "description": "SUBSCRIPTION cannot pay for this request: the chain does not list it or has no relayer, the Safe is not one the workspace holds, or the transaction refunds gas (`gasPrice` > 0).", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GasPaymentOptionUnavailableResponse" + } + } + } + }, + "422": { + "description": "Request failed schema validation, or the transaction was simulated and would revert (SIMULATION_FAILED) or could not be simulated (INDETERMINATE_SIMULATION)" } }, - "summary": "Get Safe nonces", + "summary": "Relay a transaction at a workspace's expense", "tags": [ - "safes" + "relay" ] } }, - "/v1/safes": { - "get": { - "description": "Retrieves an overview of multiple Safes including their balances, transaction counts, and other summary information. Supports cross-chain queries using CAIP-10 address format.", - "operationId": "safesGetSafeOverviewV1", + "/v1/spaces/{spaceId}/chains/{chainId}/safes/{safeAddress}/safenet/checks": { + "post": { + "description": "Queues a Safenet check of a pending Safe transaction that an owner has signed. Safe Labs pays the fee and counts the check against the workspace in the path. The caller must be an active member of that workspace, the workspace must hold the Safe and its plan must grant policies (Business and Enterprise), and the chain must list SAFENET_CHECKS.", + "operationId": "safenetChecksRequestCheckV1", "parameters": [ { - "name": "currency", + "name": "chainId", "required": true, - "in": "query", - "description": "Fiat currency code for balance conversion (e.g., USD, EUR)", + "in": "path", + "description": "Chain ID where the Safe is deployed", "schema": { - "example": "USD", + "example": "1", "type": "string" } }, { - "name": "safes", + "name": "safeAddress", "required": true, - "in": "query", - "description": "Comma-separated list of Safe addresses in CAIP-10 format (chainId:address)", + "in": "path", + "description": "Safe contract address (0x prefixed hex string)", "schema": { - "example": "1:0x1234567890123456789012345678901234567890,5:0xabcdefabcdefabcdefabcdefabcdefabcdefabcd", "type": "string" } }, { - "name": "trusted", - "required": false, - "in": "query", - "description": "If true, only includes trusted tokens in balance calculations", - "schema": { - "example": false, - "type": "boolean" - } - }, - { - "name": "exclude_spam", - "required": false, - "in": "query", - "description": "If true, excludes spam tokens from balance calculations", - "schema": { - "example": true, - "type": "boolean" - } - }, - { - "name": "wallet_address", - "required": false, - "in": "query", - "description": "Optional wallet address to filter Safes where this address is an owner", + "name": "spaceId", + "required": true, + "in": "path", + "description": "Space UUID", "schema": { + "example": "123e4567-e89b-12d3-a456-426614174000", "type": "string" } } ], - "responses": { - "200": { - "description": "Array of Safe overviews with balances and metadata", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SafeOverview" - } - } + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateSafenetCheckDto" } } } }, - "summary": "Get Safe overview", + "responses": { + "202": { + "description": "Queued, or already queued" + }, + "400": { + "description": "Malformed workspace identifier" + }, + "401": { + "description": "Authentication required" + }, + "402": { + "description": "The workspace plan does not grant policies, which Safenet checks share. The body carries `{ code: \"FEATURE_NOT_GRANTED\", feature }`" + }, + "403": { + "description": "Not a member of the workspace, or the workspace does not hold the Safe" + }, + "404": { + "description": "Workspace not found, or no such transaction for this Safe" + }, + "422": { + "description": "The Safe is older than 1.3.0, or the transaction is executed or stale, unsigned by an owner, or of another Safe" + }, + "429": { + "description": "The workspace has used its daily limit of sponsored Safenet checks" + }, + "501": { + "description": "Safenet checks are not available on this chain" + } + }, + "summary": "Request a Safenet check at a workspace expense", "tags": [ - "safes" + "safenet" ] } }, - "/v2/safes": { + "/v1/chains/{chainId}/owners/{ownerAddress}/safes": { "get": { - "description": "Retrieves an overview of multiple Safes. Supports cross-chain queries using chainId:address format.", - "operationId": "safesGetSafeOverviewV2", + "description": "Retrieves a list of Safe addresses that are owned by the specified address on a specific chain.", + "operationId": "ownersGetSafesByOwnerV1", "parameters": [ { - "name": "currency", + "name": "chainId", "required": true, - "in": "query", - "description": "Fiat currency code for balance conversion (e.g., USD, EUR)", + "in": "path", + "description": "Chain ID to search for Safes", "schema": { - "example": "USD", + "example": "1", "type": "string" } }, { - "name": "safes", + "name": "ownerAddress", "required": true, - "in": "query", - "description": "Comma-separated list of Safe addresses in chainId:address format", - "schema": { - "example": "1:0x1234567890123456789012345678901234567890,5:0xabcdefabcdefabcdefabcdefabcdefabcdefabcd", - "type": "string" - } - }, - { - "name": "trusted", - "required": false, - "in": "query", - "description": "If true, only includes trusted tokens in balance calculations.", - "schema": { - "example": false, - "type": "boolean" - } - }, - { - "name": "wallet_address", - "required": false, - "in": "query", - "description": "Optional wallet address to filter Safes where this address is an owner", + "in": "path", + "description": "Owner address to search Safes for (0x prefixed hex string)", "schema": { "type": "string" } @@ -4388,54 +5392,32 @@ ], "responses": { "200": { - "description": "Array of Safe overviews with balances and metadata", + "description": "List of Safes owned by the specified address", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SafeOverview" - } + "$ref": "#/components/schemas/SafeList" } } } } }, - "summary": "Get Safe overview (v2)", + "summary": "Get Safes by owner", "tags": [ - "safes" + "owners" ] } }, - "/v1/chains/{chainId}/security/{safeAddress}/recipient/{recipientAddress}": { + "/v2/owners/{ownerAddress}/safes": { "get": { - "description": "Performs real-time security analysis of a recipient address for a specific Safe. Returns analysis results grouped by status group, sorted by severity (CRITICAL first).", - "operationId": "safeShieldAnalyzeRecipientV1", + "description": "Retrieves all Safes owned by the specified address across all supported chains. Returns a map of chain IDs to arrays of Safe addresses.", + "operationId": "ownersGetAllSafesByOwnerV2", "parameters": [ { - "name": "chainId", + "name": "ownerAddress", "required": true, "in": "path", - "description": "Chain ID where the Safe is deployed", - "schema": { - "example": "1", - "type": "string" - } - }, - { - "name": "safeAddress", - "required": true, - "in": "path", - "description": "Safe contract address", - "schema": { - "type": "string" - } - }, - { - "name": "recipientAddress", - "required": true, - "in": "path", - "description": "Recipient address to analyze", + "description": "Owner address to search Safes for (0x prefixed hex string)", "schema": { "type": "string" } @@ -4443,207 +5425,259 @@ ], "responses": { "200": { - "description": "Recipient interaction analysis results", + "description": "Map of chain IDs to arrays of Safe addresses owned by the address", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SingleRecipientAnalysisDto" + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + }, + "example": { + "1": [ + "0x1234567890123456789012345678901234567890" + ], + "5": [ + "0xabcdefabcdefabcdefabcdefabcdefabcdefabcd" + ] + } } } } } }, - "summary": "Analyze recipient address", + "summary": "Get all Safes by owner", "tags": [ - "safe-shield" + "owners" ] } }, - "/v1/chains/{chainId}/security/{safeAddress}/counterparty-analysis": { - "post": { - "description": "Performs combined contract and recipient analysis for a Safe transaction. Returns both analyses grouped by status group for each counterparty.", - "operationId": "safeShieldAnalyzeCounterpartyV1", + "/v3/owners/{ownerAddress}/safes": { + "get": { + "description": "Retrieves all Safes owned by the specified address across all supported chains. Returns a map of chain IDs to arrays of Safe addresses.", + "operationId": "ownersGetAllSafesByOwnerV3", "parameters": [ { - "name": "chainId", - "required": true, - "in": "path", - "description": "Chain ID where the Safe is deployed", - "schema": { - "example": "1", - "type": "string" - } - }, - { - "name": "safeAddress", + "name": "ownerAddress", "required": true, "in": "path", - "description": "Safe contract address", + "description": "Owner address to search Safes for (0x prefixed hex string)", "schema": { "type": "string" } } ], - "requestBody": { - "required": true, - "description": "Transaction data used to analyze all counterparties involved.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CounterpartyAnalysisRequestDto" - } - } - } - }, "responses": { "200": { - "description": "Combined counterparty analysis including recipients and contracts grouped by status group and mapped to an address.", + "description": "Map of chain IDs to arrays of Safe addresses owned by the address", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CounterpartyAnalysisDto" + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + }, + "example": { + "1": [ + "0x1234567890123456789012345678901234567890" + ], + "5": [ + "0xabcdefabcdefabcdefabcdefabcdefabcdefabcd" + ] + } } } } } }, - "summary": "Analyze transaction counterparties", + "summary": "Get all Safes by owner", "tags": [ - "safe-shield" + "owners" ] } }, - "/v1/chains/{chainId}/security/{safeAddress}/threat-analysis": { + "/v1/chains/{chainId}/relay": { "post": { - "description": "Performs real-time threat analysis for a Safe transaction.", - "operationId": "safeShieldAnalyzeThreatV1", + "description": "Relays a Safe transaction or Safe creation transaction using the relay service, which pays for gas fees. Supports execTransaction (Safe tx) and createProxyWithNonce (Safe creation) calldata. On relay-fee chains, safeTxHash is required and must match the hash derived on-chain from the submitted calldata. On chains where pre-relay Tenderly simulation is enabled, an execTransaction is simulated before being submitted: a confirmed revert returns SIMULATION_FAILED, and an unreachable simulator returns INDETERMINATE_SIMULATION (retry with acceptUnverifiedSimulation=true to proceed anyway when the simulator is unreachable).", + "operationId": "relayRelayV1", "parameters": [ { "name": "chainId", "required": true, "in": "path", - "description": "Chain ID where the Safe is deployed", - "schema": { - "type": "string" - } - }, - { - "name": "safeAddress", - "required": true, - "in": "path", - "description": "Safe contract address", + "description": "Chain ID where the Safe transaction will be executed", "schema": { + "example": "1", "type": "string" } } ], "requestBody": { "required": true, - "description": "EIP-712 typed data and wallet information for threat analysis.", + "description": "Transaction data to relay. safeTxHash is required on relay-fee chains and must correspond to the to + data fields. Set acceptUnverifiedSimulation=true to retry a relay skipping the simulation which previously returned INDETERMINATE_SIMULATION.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ThreatAnalysisRequestDto" + "$ref": "#/components/schemas/RelayDto" } } } }, "responses": { "200": { - "description": "Threat analysis results including threat findings and balance changes.", + "description": "Transaction relayed successfully", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ThreatAnalysisResponseDto" + "$ref": "#/components/schemas/Relay" + } + } + } + }, + "400": { + "description": "Request body failed schema validation" + }, + "403": { + "description": "Relay denied: safeTxHash missing, fee service rejected, or unofficial proxy factory" + }, + "409": { + "description": "A transaction that refunds gas (`gasPrice` > 0) needs PAY_FROM_SAFE, which the chain does not offer.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GasPaymentOptionUnavailableResponse" + } + } + } + }, + "422": { + "description": "Relay rejected. The consumers MUST branch on the `code` field; `message` is informational. Possible cases: safeTxHash does not match the transaction data, unrecognised transaction type, SIMULATION_FAILED (Tenderly confirmed revert), or INDETERMINATE_SIMULATION (simulator unreachable; retry with `acceptUnverifiedSimulation=true` to proceed anyway).", + "schema": { + "examples": { + "simulationFailed": { + "summary": "SIMULATION_FAILED", + "value": { + "code": "SIMULATION_FAILED", + "message": "Relay denied: transaction simulation failed: Reverted with reason string: 'GS013'", + "statusCode": 422 + } + }, + "indeterminateSimulation": { + "summary": "INDETERMINATE_SIMULATION", + "value": { + "code": "INDETERMINATE_SIMULATION", + "message": "Relay simulation could not be completed.", + "statusCode": 422 + } + }, + "safeTxHashMismatch": { + "summary": "safeTxHash mismatch (no `code`)", + "value": { + "message": "Safe transaction hash mismatch: provided hash 0x... does not match the transaction data", + "statusCode": 422 + } + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RelayErrorResponse" } } } + }, + "429": { + "description": "Relay limit reached for this Safe" } }, - "summary": "Analyze transaction threat", + "summary": "Relay transaction", "tags": [ - "safe-shield" + "relay" ] } }, - "/v1/chains/{chainId}/security/{safeAddress}/report-false-result": { - "post": { - "description": "Reports a FALSE_POSITIVE or FALSE_NEGATIVE Blockaid transaction scan result for review. Use the request_id from the original scan response to identify the transaction.", - "operationId": "safeShieldReportFalseResultV1", + "/v1/chains/{chainId}/relay/status/{taskId}": { + "get": { + "description": "Retrieves the status of a relay task from the relay provider. This is a proxy endpoint to securely query task status without exposing the API key.", + "operationId": "relayGetTaskStatusV1", "parameters": [ { "name": "chainId", "required": true, "in": "path", - "description": "Chain ID where the Safe is deployed", + "description": "Chain ID associated with the relay task", "schema": { - "example": "1", + "example": "11155111", "type": "string" } }, { - "name": "safeAddress", + "name": "taskId", "required": true, "in": "path", - "description": "Safe contract address", + "description": "Task ID returned from the relay transaction", "schema": { "type": "string" } } ], - "requestBody": { - "required": true, - "description": "Report details including event type, request_id from scan response, and details.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ReportFalseResultRequestDto" - } - } - } - }, "responses": { "200": { - "description": "Report submitted successfully.", + "description": "Task status retrieved successfully", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ReportFalseResultResponseDto" + "$ref": "#/components/schemas/RelayTaskStatus" } } } + }, + "404": { + "description": "Task not found" } }, - "summary": "Report false Blockaid scan result", + "summary": "Get relay task status", "tags": [ - "safe-shield" + "relay" ] } }, - "/v1/targeted-messaging/outreaches/{outreachId}/chains/{chainId}/safes/{safeAddress}": { + "/v1/chains/{chainId}/relay/{safeAddress}": { "get": { - "operationId": "targetedMessagingGetTargetedSafeV1", + "description": "Retrieves the free relays left for a specific Safe on the given chain: the no-fee campaign quota where the chain lists NO_FEE_CAMPAIGN, otherwise the daily limit where it lists FREE_DAILY_LIMIT.", + "operationId": "relayGetRelaysRemainingV1", "parameters": [ { - "name": "outreachId", + "name": "chainId", "required": true, "in": "path", + "description": "Chain ID where the Safe is deployed", "schema": { - "type": "number" + "example": "1", + "type": "string" } }, { - "name": "chainId", + "name": "safeAddress", "required": true, "in": "path", + "description": "Safe contract address (0x prefixed hex string)", "schema": { "type": "string" } }, { - "name": "safeAddress", - "required": true, - "in": "path", + "name": "safeTxHash", + "required": false, + "in": "query", + "description": "Safe transaction hash (0x prefixed hex string). Ignored; kept so existing clients do not break.", "schema": { "type": "string" } @@ -4651,56 +5685,54 @@ ], "responses": { "200": { - "description": "", + "description": "Remaining relay quota retrieved successfully", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/TargetedSafe" + "$ref": "#/components/schemas/RelaysRemaining" } } } }, - "404": { - "description": "Safe not targeted." + "403": { + "description": "The chain has no relayer or lists no free option, such as a chain that only lists PAY_FROM_SAFE" } }, + "summary": "Get remaining relays", "tags": [ - "targeted-messaging" + "relay" ] } }, - "/v1/targeted-messaging/outreaches/{outreachId}/chains/{chainId}/safes/{safeAddress}/signers/{signerAddress}/submissions": { + "/v1/chains/{chainId}/safe-apps": { "get": { - "operationId": "targetedMessagingGetSubmissionV1", + "description": "Retrieves a list of Safe Apps available for a specific chain, with optional filtering by client URL or app URL.", + "operationId": "safeAppsGetSafeAppsV1", "parameters": [ { - "name": "outreachId", - "required": true, - "in": "path", - "schema": { - "type": "number" - } - }, - { - "name": "chainId", + "name": "chainId", "required": true, "in": "path", + "description": "Chain ID to get Safe Apps for", "schema": { + "example": "1", "type": "string" } }, { - "name": "safeAddress", - "required": true, - "in": "path", + "name": "clientUrl", + "required": false, + "in": "query", + "description": "Filter by client URL to get apps compatible with specific client", "schema": { "type": "string" } }, { - "name": "signerAddress", - "required": true, - "in": "path", + "name": "url", + "required": false, + "in": "query", + "description": "Filter by specific Safe App URL", "schema": { "type": "string" } @@ -4708,36 +5740,37 @@ ], "responses": { "200": { - "description": "", + "description": "List of Safe Apps available for the specified chain", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Submission" + "type": "array", + "items": { + "$ref": "#/components/schemas/SafeApp" + } } } } } }, + "summary": "Get Safe Apps", "tags": [ - "targeted-messaging" + "safe-apps" ] - }, - "post": { - "operationId": "targetedMessagingCreateSubmissionV1", + } + }, + "/v1/chains/{chainId}/safes/{safeAddress}": { + "get": { + "description": "Retrieves detailed information about a Safe including owners, threshold, modules, and current state.", + "operationId": "safesGetSafeV1", "parameters": [ - { - "name": "outreachId", - "required": true, - "in": "path", - "schema": { - "type": "number" - } - }, { "name": "chainId", "required": true, "in": "path", + "description": "Chain ID where the Safe is deployed", "schema": { + "example": "1", "type": "string" } }, @@ -4745,176 +5778,195 @@ "name": "safeAddress", "required": true, "in": "path", - "schema": { - "type": "string" - } - }, - { - "name": "signerAddress", - "required": true, - "in": "path", + "description": "Safe contract address (0x prefixed hex string)", "schema": { "type": "string" } } ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateSubmissionDto" - } - } - } - }, "responses": { - "201": { - "description": "", + "200": { + "description": "Safe information retrieved successfully", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Submission" + "$ref": "#/components/schemas/SafeState" } } } + }, + "404": { + "description": "Safe not found on the specified chain" } }, + "summary": "Get Safe information", "tags": [ - "targeted-messaging" + "safes" ] } }, - "/v1/chains/{chainId}/transactions/{id}": { + "/v1/chains/{chainId}/safes/{safeAddress}/nonces": { "get": { - "description": "Retrieves detailed information about a specific transaction by its ID, including execution status, confirmations, and decoded transaction data.", - "operationId": "transactionsGetTransactionByIdV1", + "description": "Retrieves the current nonces for a Safe, including the transaction nonce and any queued nonces.", + "operationId": "safesGetNoncesV1", "parameters": [ { "name": "chainId", "required": true, "in": "path", - "description": "Chain ID where the transaction exists", + "description": "Chain ID where the Safe is deployed", "schema": { "example": "1", "type": "string" } }, { - "name": "id", + "name": "safeAddress", "required": true, "in": "path", - "description": "Transaction ID (safe transaction hash or multisig transaction ID)", + "description": "Safe contract address (0x prefixed hex string)", "schema": { - "example": "multisig_0x1234567890123456789012345678901234567890_0x5678...", "type": "string" } } ], "responses": { "200": { - "description": "Transaction details retrieved successfully", + "description": "Safe nonces retrieved successfully", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/TransactionDetails" + "$ref": "#/components/schemas/SafeNonces" } } } }, "404": { - "description": "Transaction not found" + "description": "Safe not found on the specified chain" } }, - "summary": "Get transaction details", + "summary": "Get Safe nonces", "tags": [ - "transactions" + "safes" ] } }, - "/v1/chains/{chainId}/safes/{safeAddress}/multisig-transactions": { + "/v1/safes": { "get": { - "description": "Retrieves a paginated list of multisig transactions for a Safe with optional filtering by execution date, recipient, value, nonce, and execution status.", - "operationId": "transactionsGetMultisigTransactionsV1", + "description": "Retrieves an overview of multiple Safes including their balances, transaction counts, and other summary information. Supports cross-chain queries using CAIP-10 address format.", + "operationId": "safesGetSafeOverviewV1", "parameters": [ { - "name": "chainId", + "name": "currency", "required": true, - "in": "path", - "description": "Chain ID where the Safe is deployed", + "in": "query", + "description": "Fiat currency code for balance conversion (e.g., USD, EUR)", "schema": { - "example": "1", + "example": "USD", "type": "string" } }, { - "name": "safeAddress", + "name": "safes", "required": true, - "in": "path", - "description": "Safe contract address (0x prefixed hex string)", + "in": "query", + "description": "Comma-separated list of Safe addresses in CAIP-10 format (chainId:address)", "schema": { + "example": "1:0x1234567890123456789012345678901234567890,5:0xabcdefabcdefabcdefabcdefabcdefabcdefabcd", "type": "string" } }, { - "name": "execution_date__gte", + "name": "trusted", "required": false, "in": "query", - "description": "Filter by execution date greater than or equal to (ISO 8601 format)", + "description": "If true, only includes trusted tokens in balance calculations", "schema": { - "type": "string" + "example": false, + "type": "boolean" } }, { - "name": "execution_date__lte", + "name": "exclude_spam", "required": false, "in": "query", - "description": "Filter by execution date less than or equal to (ISO 8601 format)", + "description": "If true, excludes spam tokens from balance calculations", "schema": { - "type": "string" + "example": true, + "type": "boolean" } }, { - "name": "to", + "name": "wallet_address", "required": false, "in": "query", - "description": "Filter by recipient address (0x prefixed hex string)", + "description": "Optional wallet address to filter Safes where this address is an owner", "schema": { "type": "string" } - }, + } + ], + "responses": { + "200": { + "description": "Array of Safe overviews with balances and metadata", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SafeOverview" + } + } + } + } + } + }, + "summary": "Get Safe overview", + "tags": [ + "safes" + ] + } + }, + "/v2/safes": { + "get": { + "description": "Retrieves an overview of multiple Safes. Supports cross-chain queries using chainId:address format.", + "operationId": "safesGetSafeOverviewV2", + "parameters": [ { - "name": "value", - "required": false, + "name": "currency", + "required": true, "in": "query", - "description": "Filter by transaction value in wei", + "description": "Fiat currency code for balance conversion (e.g., USD, EUR)", "schema": { + "example": "USD", "type": "string" } }, { - "name": "nonce", - "required": false, + "name": "safes", + "required": true, "in": "query", - "description": "Filter by transaction nonce", + "description": "Comma-separated list of Safe addresses in chainId:address format", "schema": { + "example": "1:0x1234567890123456789012345678901234567890,5:0xabcdefabcdefabcdefabcdefabcdefabcdefabcd", "type": "string" } }, { - "name": "executed", + "name": "trusted", "required": false, "in": "query", - "description": "Filter by execution status (true for executed, false for pending)", + "description": "If true, only includes trusted tokens in balance calculations.", "schema": { + "example": false, "type": "boolean" } }, { - "name": "cursor", + "name": "wallet_address", "required": false, "in": "query", - "description": "Pagination cursor for retrieving the next set of results", + "description": "Optional wallet address to filter Safes where this address is an owner", "schema": { "type": "string" } @@ -4922,79 +5974,84 @@ ], "responses": { "200": { - "description": "Paginated list of multisig transactions", + "description": "Array of Safe overviews with balances and metadata", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/MultisigTransactionPage" + "type": "array", + "items": { + "$ref": "#/components/schemas/SafeOverview" + } } } } } }, - "summary": "Get multisig transactions", + "summary": "Get Safe overview (v2)", "tags": [ - "transactions" + "safes" ] } }, - "/v1/chains/{chainId}/transactions/{safeTxHash}": { - "delete": { - "description": "Deletes a pending multisig transaction. Only the proposer or a Safe owner can delete a transaction.", - "operationId": "transactionsDeleteTransactionV1", + "/v1/chains/{chainId}/security/{safeAddress}/recipient/{recipientAddress}": { + "get": { + "description": "Performs real-time security analysis of a recipient address for a specific Safe. Returns analysis results grouped by status group, sorted by severity (CRITICAL first).", + "operationId": "safeShieldAnalyzeRecipientV1", "parameters": [ { "name": "chainId", "required": true, "in": "path", - "description": "Chain ID where the transaction exists", + "description": "Chain ID where the Safe is deployed", "schema": { "example": "1", "type": "string" } }, { - "name": "safeTxHash", + "name": "safeAddress", "required": true, "in": "path", - "description": "Safe transaction hash (0x prefixed hex string)", + "description": "Safe contract address", + "schema": { + "type": "string" + } + }, + { + "name": "recipientAddress", + "required": true, + "in": "path", + "description": "Recipient address to analyze", "schema": { "type": "string" } } ], - "requestBody": { - "required": true, - "description": "Signature proving authorization to delete the transaction", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeleteTransactionDto" + "responses": { + "200": { + "description": "Recipient interaction analysis results", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SingleRecipientAnalysisDto" + } } } - } - }, - "responses": { - "204": { - "description": "Transaction deleted successfully" - }, - "400": { - "description": "Invalid signature or unauthorized deletion attempt" }, - "404": { - "description": "Transaction not found" + "402": { + "description": "Disabled on Core. The body carries `{ code: \"SAFE_SHIELD_DISABLED_ON_CORE\", message }`." } }, - "summary": "Delete transaction", + "summary": "Analyze recipient address", "tags": [ - "transactions" + "safe-shield" ] } }, - "/v1/chains/{chainId}/safes/{safeAddress}/module-transactions": { - "get": { - "description": "Retrieves a paginated list of module transactions for a Safe. Module transactions are executed directly by enabled modules without requiring owner signatures.", - "operationId": "transactionsGetModuleTransactionsV1", + "/v1/chains/{chainId}/security/{safeAddress}/counterparty-analysis": { + "post": { + "description": "Performs combined contract and recipient analysis for a Safe transaction. Returns both analyses grouped by status group for each counterparty.", + "operationId": "safeShieldAnalyzeCounterpartyV1", "parameters": [ { "name": "chainId", @@ -5010,70 +6067,98 @@ "name": "safeAddress", "required": true, "in": "path", - "description": "Safe contract address (0x prefixed hex string)", + "description": "Safe contract address", "schema": { "type": "string" } - }, - { - "name": "to", - "required": false, - "in": "query", - "description": "Filter by recipient address (0x prefixed hex string)", - "schema": { - "type": "string" + } + ], + "requestBody": { + "required": true, + "description": "Transaction data used to analyze all counterparties involved.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CounterpartyAnalysisRequestDto" + } } - }, - { - "name": "module", - "required": false, - "in": "query", - "description": "Filter by module address that executed the transaction", - "schema": { - "type": "string" + } + }, + "responses": { + "200": { + "description": "Combined counterparty analysis including recipients and contracts grouped by status group and mapped to an address.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CounterpartyAnalysisDto" + } + } } - }, + } + }, + "summary": "Analyze transaction counterparties", + "tags": [ + "safe-shield" + ] + } + }, + "/v1/chains/{chainId}/security/{safeAddress}/threat-analysis": { + "post": { + "description": "Performs real-time threat analysis for a Safe transaction.", + "operationId": "safeShieldAnalyzeThreatV1", + "parameters": [ { - "name": "transaction_hash", - "required": false, - "in": "query", - "description": "Filter by specific transaction hash", + "name": "chainId", + "required": true, + "in": "path", + "description": "Chain ID where the Safe is deployed", "schema": { "type": "string" } }, { - "name": "cursor", - "required": false, - "in": "query", - "description": "Pagination cursor for retrieving the next set of results", + "name": "safeAddress", + "required": true, + "in": "path", + "description": "Safe contract address", "schema": { "type": "string" } } ], + "requestBody": { + "required": true, + "description": "EIP-712 typed data and wallet information for threat analysis.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThreatAnalysisRequestDto" + } + } + } + }, "responses": { "200": { - "description": "Paginated list of module transactions", + "description": "Threat analysis results including threat findings and balance changes.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ModuleTransactionPage" + "$ref": "#/components/schemas/ThreatAnalysisResponseDto" } } } } }, - "summary": "Get module transactions", + "summary": "Analyze transaction threat", "tags": [ - "transactions" + "safe-shield" ] } }, - "/v1/chains/{chainId}/transactions/{safeTxHash}/confirmations": { + "/v1/chains/{chainId}/security/{safeAddress}/report-false-result": { "post": { - "description": "Adds a confirmation signature to a pending multisig transaction. Once enough confirmations are collected to meet the Safe threshold, the transaction can be executed.", - "operationId": "transactionsAddConfirmationV1", + "description": "Reports a FALSE_POSITIVE or FALSE_NEGATIVE Blockaid transaction scan result for review. Use the request_id from the original scan response to identify the transaction.", + "operationId": "safeShieldReportFalseResultV1", "parameters": [ { "name": "chainId", @@ -5086,10 +6171,10 @@ } }, { - "name": "safeTxHash", + "name": "safeAddress", "required": true, "in": "path", - "description": "Safe transaction hash (0x prefixed hex string)", + "description": "Safe contract address", "schema": { "type": "string" } @@ -5097,122 +6182,114 @@ ], "requestBody": { "required": true, - "description": "Confirmation signature from a Safe owner proving their approval of the transaction", + "description": "Report details including event type, request_id from scan response, and details.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AddConfirmationDto" + "$ref": "#/components/schemas/ReportFalseResultRequestDto" } } } }, "responses": { "200": { - "description": "Transaction details with updated confirmation status", + "description": "Report submitted successfully.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Transaction" + "$ref": "#/components/schemas/ReportFalseResultResponseDto" } } } - }, - "400": { - "description": "Invalid signature or confirmation already exists for this owner" - }, - "404": { - "description": "Transaction not found" } }, - "summary": "Add transaction confirmation", + "summary": "Report false Blockaid scan result", "tags": [ - "transactions" + "safe-shield" ] } }, - "/v1/chains/{chainId}/safes/{safeAddress}/incoming-transfers": { + "/v1/targeted-messaging/outreaches/{outreachId}/chains/{chainId}/safes/{safeAddress}": { "get": { - "description": "Retrieves a paginated list of incoming transfers to a Safe, including ETH and token transfers with optional filtering by date, value, token, and trust status.", - "operationId": "transactionsGetIncomingTransfersV1", + "operationId": "targetedMessagingGetTargetedSafeV1", "parameters": [ { - "name": "chainId", + "name": "outreachId", "required": true, "in": "path", - "description": "Chain ID where the Safe is deployed", "schema": { - "example": "1", - "type": "string" + "type": "number" } }, { - "name": "safeAddress", + "name": "chainId", "required": true, "in": "path", - "description": "Safe contract address (0x prefixed hex string)", "schema": { "type": "string" } }, { - "name": "trusted", - "required": false, - "in": "query", - "description": "Filter by trust status (true for trusted tokens, false for untrusted)", - "schema": { - "type": "boolean" - } - }, - { - "name": "execution_date__gte", - "required": false, - "in": "query", - "description": "Filter by execution date greater than or equal to (ISO 8601 format)", + "name": "safeAddress", + "required": true, + "in": "path", "schema": { "type": "string" } - }, - { - "name": "execution_date__lte", - "required": false, - "in": "query", - "description": "Filter by execution date less than or equal to (ISO 8601 format)", - "schema": { - "type": "string" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TargetedSafe" + } + } } }, + "404": { + "description": "Safe not targeted." + } + }, + "tags": [ + "targeted-messaging" + ] + } + }, + "/v1/targeted-messaging/outreaches/{outreachId}/chains/{chainId}/safes/{safeAddress}/signers/{signerAddress}/submissions": { + "get": { + "operationId": "targetedMessagingGetSubmissionV1", + "parameters": [ { - "name": "to", - "required": false, - "in": "query", - "description": "Filter by recipient address (0x prefixed hex string)", + "name": "outreachId", + "required": true, + "in": "path", "schema": { - "type": "string" + "type": "number" } }, { - "name": "value", - "required": false, - "in": "query", - "description": "Filter by transfer value in wei", + "name": "chainId", + "required": true, + "in": "path", "schema": { "type": "string" } }, { - "name": "token_address", - "required": false, - "in": "query", - "description": "Filter by token contract address (0x prefixed hex string for ERC-20 tokens)", + "name": "safeAddress", + "required": true, + "in": "path", "schema": { "type": "string" } }, { - "name": "cursor", - "required": false, - "in": "query", - "description": "Pagination cursor for retrieving the next set of results", + "name": "signerAddress", + "required": true, + "in": "path", "schema": { "type": "string" } @@ -5220,34 +6297,36 @@ ], "responses": { "200": { - "description": "Paginated list of incoming transfers", + "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/IncomingTransferPage" + "$ref": "#/components/schemas/Submission" } } } } }, - "summary": "Get incoming transfers", "tags": [ - "transactions" + "targeted-messaging" ] - } - }, - "/v1/chains/{chainId}/transactions/{safeAddress}/preview": { + }, "post": { - "description": "Simulates a transaction execution to preview its effects, including gas estimates, balance changes, and potential errors before actually proposing or executing it.", - "operationId": "transactionsPreviewTransactionV1", + "operationId": "targetedMessagingCreateSubmissionV1", "parameters": [ + { + "name": "outreachId", + "required": true, + "in": "path", + "schema": { + "type": "number" + } + }, { "name": "chainId", "required": true, "in": "path", - "description": "Chain ID where the Safe is deployed", "schema": { - "example": "1", "type": "string" } }, @@ -5255,7 +6334,14 @@ "name": "safeAddress", "required": true, "in": "path", - "description": "Safe contract address (0x prefixed hex string)", + "schema": { + "type": "string" + } + }, + { + "name": "signerAddress", + "required": true, + "in": "path", "schema": { "type": "string" } @@ -5263,104 +6349,82 @@ ], "requestBody": { "required": true, - "description": "Transaction data to preview including recipient, value, data, and operation type", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PreviewTransactionDto" + "$ref": "#/components/schemas/CreateSubmissionDto" } } } }, "responses": { - "200": { - "description": "Transaction preview with simulation results, gas estimates, and potential effects", + "201": { + "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/TransactionPreview" + "$ref": "#/components/schemas/Submission" } } } - }, - "400": { - "description": "Invalid transaction data or simulation failed" - }, - "404": { - "description": "Safe not found" } }, - "summary": "Preview transaction", "tags": [ - "transactions" + "targeted-messaging" ] } }, - "/v1/chains/{chainId}/safes/{safeAddress}/transactions/queued": { + "/v1/chains/{chainId}/transactions/{id}": { "get": { - "description": "Retrieves a paginated list of queued (pending) transactions for a Safe that are waiting for execution, ordered by nonce.", - "operationId": "transactionsGetTransactionQueueV1", + "description": "Retrieves detailed information about a specific transaction by its ID, including execution status, confirmations, and decoded transaction data.", + "operationId": "transactionsGetTransactionByIdV1", "parameters": [ { "name": "chainId", "required": true, "in": "path", - "description": "Chain ID where the Safe is deployed", + "description": "Chain ID where the transaction exists", "schema": { "example": "1", "type": "string" } }, { - "name": "safeAddress", + "name": "id", "required": true, "in": "path", - "description": "Safe contract address (0x prefixed hex string)", - "schema": { - "type": "string" - } - }, - { - "name": "trusted", - "required": false, - "in": "query", - "description": "Filter by trust status (true for trusted transactions, false for untrusted)", - "schema": { - "type": "boolean" - } - }, - { - "name": "cursor", - "required": false, - "in": "query", - "description": "Pagination cursor for retrieving the next set of results", + "description": "Transaction ID (safe transaction hash or multisig transaction ID)", "schema": { + "example": "multisig_0x1234567890123456789012345678901234567890_0x5678...", "type": "string" } } ], "responses": { "200": { - "description": "Paginated list of queued transactions", + "description": "Transaction details retrieved successfully", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/QueuedItemPage" + "$ref": "#/components/schemas/TransactionDetails" } } } + }, + "404": { + "description": "Transaction not found" } }, - "summary": "Get transaction queue", + "summary": "Get transaction details", "tags": [ "transactions" ] } }, - "/v1/chains/{chainId}/safes/{safeAddress}/transactions/history": { + "/v1/chains/{chainId}/safes/{safeAddress}/multisig-transactions": { "get": { - "description": "Retrieves a paginated list of executed transactions for a Safe, including multisig transactions, module transactions, and incoming transfers, ordered by execution date.", - "operationId": "transactionsGetTransactionsHistoryV1", + "description": "Retrieves a paginated list of multisig transactions for a Safe with optional filtering by execution date, recipient, value, nonce, and execution status.", + "operationId": "transactionsGetMultisigTransactionsV1", "parameters": [ { "name": "chainId", @@ -5372,6 +6436,15 @@ "type": "string" } }, + { + "name": "cursor", + "required": false, + "in": "query", + "description": "Pagination cursor for retrieving the next set of results", + "schema": { + "type": "string" + } + }, { "name": "safeAddress", "required": true, @@ -5382,90 +6455,101 @@ } }, { - "name": "timezone_offset", + "name": "execution_date__gte", "required": false, "in": "query", - "deprecated": true, - "description": "Deprecated: Timezone offset in milliseconds for date formatting (use timezone parameter instead)", + "description": "Filter by execution date greater than or equal to (ISO 8601 format)", "schema": { "type": "string" } }, { - "name": "trusted", + "name": "execution_date__lte", "required": false, "in": "query", - "description": "Filter by trust status (default: true, set to false to include untrusted transactions)", + "description": "Filter by execution date less than or equal to (ISO 8601 format)", "schema": { - "type": "boolean" + "type": "string" } }, { - "name": "imitation", + "name": "to", "required": false, "in": "query", - "description": "Include imitation transactions in results (default: true, set to false to exclude)", + "description": "Filter by recipient address (0x prefixed hex string)", "schema": { - "type": "boolean" + "type": "string" } }, { - "name": "timezone", + "name": "value", "required": false, "in": "query", - "description": "IANA timezone identifier for date formatting (e.g., \"America/New_York\")", + "description": "Filter by transaction value in wei", "schema": { "type": "string" } }, { - "name": "cursor", + "name": "nonce", "required": false, "in": "query", - "description": "Pagination cursor for retrieving the next set of results", + "description": "Filter by transaction nonce", "schema": { "type": "string" } + }, + { + "name": "executed", + "required": false, + "in": "query", + "description": "Filter by execution status (true for executed, false for pending)", + "schema": { + "type": "boolean" + } } ], "responses": { "200": { - "description": "Paginated list of historical transactions", + "description": "Paginated list of multisig transactions", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/TransactionItemPage" + "$ref": "#/components/schemas/MultisigTransactionPage" } } } + }, + "422": { + "description": "Invalid cursor" } }, - "summary": "Get transaction history", + "summary": "Get multisig transactions", "tags": [ "transactions" ] } }, - "/v1/chains/{chainId}/transactions/{safeAddress}/propose": { - "post": { - "description": "Proposes a new multisig transaction for a Safe. The transaction will be pending until enough owners sign it to reach the required threshold.", - "operationId": "transactionsProposeTransactionV1", + "/v1/chains/{chainId}/transactions/{safeTxHash}": { + "delete": { + "description": "Deletes a pending multisig transaction. Only the proposer or a Safe owner can delete a transaction.", + "operationId": "transactionsDeleteTransactionV1", "parameters": [ { "name": "chainId", "required": true, "in": "path", - "description": "Chain ID where the Safe is deployed", + "description": "Chain ID where the transaction exists", "schema": { "example": "1", "type": "string" } }, { - "name": "safeAddress", + "name": "safeTxHash", "required": true, "in": "path", - "description": "Safe contract address (0x prefixed hex string)", + "description": "Safe transaction hash (0x prefixed hex string)", "schema": { "type": "string" } @@ -5473,40 +6557,36 @@ ], "requestBody": { "required": true, - "description": "Transaction proposal including recipient, value, data, and initial signature", + "description": "Signature proving authorization to delete the transaction", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ProposeTransactionDto" + "$ref": "#/components/schemas/DeleteTransactionDto" } } } }, "responses": { - "200": { - "description": "Transaction proposed successfully", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TransactionDetails" - } - } - } + "204": { + "description": "Transaction deleted successfully" }, "400": { - "description": "Invalid transaction data or signature" + "description": "Invalid signature or unauthorized deletion attempt" + }, + "404": { + "description": "Transaction not found" } }, - "summary": "Propose transaction", + "summary": "Delete transaction", "tags": [ "transactions" ] } }, - "/v1/chains/{chainId}/safes/{safeAddress}/transactions/creation": { + "/v1/chains/{chainId}/safes/{safeAddress}/module-transactions": { "get": { - "description": "Retrieves the transaction that created the Safe, including the creation timestamp, creator address, factory used, and setup data.", - "operationId": "transactionsGetCreationTransactionV1", + "description": "Retrieves a paginated list of module transactions for a Safe. Module transactions are executed directly by enabled modules without requiring owner signatures.", + "operationId": "transactionsGetModuleTransactionsV1", "parameters": [ { "name": "chainId", @@ -5518,6 +6598,15 @@ "type": "string" } }, + { + "name": "cursor", + "required": false, + "in": "query", + "description": "Pagination cursor for retrieving the next set of results", + "schema": { + "type": "string" + } + }, { "name": "safeAddress", "required": true, @@ -5526,175 +6615,202 @@ "schema": { "type": "string" } + }, + { + "name": "to", + "required": false, + "in": "query", + "description": "Filter by recipient address (0x prefixed hex string)", + "schema": { + "type": "string" + } + }, + { + "name": "module", + "required": false, + "in": "query", + "description": "Filter by module address that executed the transaction", + "schema": { + "type": "string" + } + }, + { + "name": "transaction_hash", + "required": false, + "in": "query", + "description": "Filter by specific transaction hash", + "schema": { + "type": "string" + } } ], "responses": { "200": { - "description": "Safe creation transaction details", + "description": "Paginated list of module transactions", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreationTransaction" + "$ref": "#/components/schemas/ModuleTransactionPage" } } } }, - "404": { - "description": "Safe not found or creation transaction not available" + "422": { + "description": "Invalid cursor" } }, - "summary": "Get Safe creation transaction", + "summary": "Get module transactions", "tags": [ "transactions" ] } }, - "/v1/export/chains/{chainId}/{safeAddress}": { + "/v1/chains/{chainId}/transactions/{safeTxHash}/confirmations": { "post": { - "operationId": "csvExportLaunchExportV1", + "description": "Adds a confirmation signature to a pending multisig transaction. Once enough confirmations are collected to meet the Safe threshold, the transaction can be executed.", + "operationId": "transactionsAddConfirmationV1", "parameters": [ { "name": "chainId", "required": true, "in": "path", + "description": "Chain ID where the Safe is deployed", "schema": { + "example": "1", "type": "string" } }, { - "name": "safeAddress", + "name": "safeTxHash", "required": true, "in": "path", + "description": "Safe transaction hash (0x prefixed hex string)", "schema": { "type": "string" } } ], "requestBody": { - "required": false, - "description": "Transaction export request", + "required": true, + "description": "Confirmation signature from a Safe owner proving their approval of the transaction", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/TransactionExportDto" + "$ref": "#/components/schemas/AddConfirmationDto" } } } }, "responses": { - "202": { - "description": "", + "200": { + "description": "Transaction details with updated confirmation status", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/JobStatusDto" + "$ref": "#/components/schemas/TransactionDetails" } } } + }, + "400": { + "description": "Confirmation already exists for this owner" + }, + "404": { + "description": "Transaction not found" + }, + "422": { + "description": "Invalid chainId, safeTxHash, request body or signature" } }, + "summary": "Add transaction confirmation", "tags": [ - "export" + "transactions" ] } }, - "/v1/export/{jobId}/status": { + "/v1/chains/{chainId}/safes/{safeAddress}/incoming-transfers": { "get": { - "operationId": "csvExportGetExportStatusV1", + "description": "Retrieves a paginated list of incoming transfers to a Safe, including ETH and token transfers with optional filtering by date, value, token, and trust status.", + "operationId": "transactionsGetIncomingTransfersV1", "parameters": [ { - "name": "jobId", + "name": "chainId", "required": true, "in": "path", + "description": "Chain ID where the Safe is deployed", "schema": { + "example": "1", "type": "string" } - } - ], - "responses": { - "200": { - "description": "CSV export status retrieved successfully", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/JobStatusDto" - } - } + }, + { + "name": "safeAddress", + "required": true, + "in": "path", + "description": "Safe contract address (0x prefixed hex string)", + "schema": { + "type": "string" } }, - "404": { - "description": "CSV export not found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/JobStatusErrorDto" - } - } - } - } - }, - "tags": [ - "export" - ] - } - }, - "/v1/chains/{chainId}/delegates": { - "get": { - "deprecated": true, - "description": "Retrieves a paginated list of delegates for a specific chain. This endpoint is deprecated, please use the v2 version instead.", - "operationId": "delegatesGetDelegatesV1", - "parameters": [ { - "name": "chainId", - "required": true, - "in": "path", - "description": "Chain ID where delegates are registered", + "name": "cursor", + "required": false, + "in": "query", + "description": "Pagination cursor for retrieving the next set of results", "schema": { - "example": "1", "type": "string" } }, { - "name": "cursor", + "name": "trusted", "required": false, "in": "query", - "description": "Pagination cursor for retrieving the next set of results", + "description": "Filter by trust status (true for trusted tokens, false for untrusted)", + "schema": { + "type": "boolean" + } + }, + { + "name": "execution_date__gte", + "required": false, + "in": "query", + "description": "Filter by execution date greater than or equal to (ISO 8601 format)", "schema": { "type": "string" } }, { - "name": "label", + "name": "execution_date__lte", "required": false, "in": "query", - "description": "Filter by delegate label", + "description": "Filter by execution date less than or equal to (ISO 8601 format)", "schema": { "type": "string" } }, { - "name": "delegator", + "name": "to", "required": false, "in": "query", - "description": "Filter by delegator address", + "description": "Filter by recipient address (0x prefixed hex string)", "schema": { "type": "string" } }, { - "name": "delegate", + "name": "value", "required": false, "in": "query", - "description": "Filter by delegate address", + "description": "Filter by transfer value in wei", "schema": { "type": "string" } }, { - "name": "safe", + "name": "token_address", "required": false, "in": "query", - "description": "Filter by Safe address", + "description": "Filter by token contract address (0x prefixed hex string for ERC-20 tokens)", "schema": { "type": "string" } @@ -5702,118 +6818,132 @@ ], "responses": { "200": { - "description": "Paginated list of delegates retrieved successfully", + "description": "Paginated list of incoming transfers", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DelegatePage" + "$ref": "#/components/schemas/IncomingTransferPage" } } } + }, + "422": { + "description": "Invalid cursor" } }, - "summary": "Get delegates (deprecated)", + "summary": "Get incoming transfers", "tags": [ - "delegates" + "transactions" ] - }, - "post": { - "deprecated": true, - "description": "Creates a new delegate for a specific chain. This endpoint is deprecated, please use the v2 version instead.", - "operationId": "delegatesPostDelegateV1", + } + }, + "/v1/chains/{chainId}/safes/{safeAddress}/outgoing-transfers": { + "get": { + "description": "Retrieves native, ERC-20 and ERC-721 transfers sent by a Safe. Unlike multisig-transactions, `to` matches the recipient of each transfer rather than the target of the Safe transaction. Token transfers made inside batches are included; native transfers made inside batches are not available on chains indexed from events (most L2s). Only the newest 1000 transfers per direction and transfer type can be reached, so narrow with filters for older history. A page can hold fewer items than requested, or none, once untrusted transfers are dropped: keep following `next` until it is null.", + "operationId": "transactionsGetOutgoingTransfersV1", "parameters": [ { "name": "chainId", "required": true, "in": "path", - "description": "Chain ID where the delegate will be registered", + "description": "Chain ID where the Safe is deployed", "schema": { "example": "1", "type": "string" } - } - ], - "requestBody": { - "required": true, - "description": "Delegate creation data including Safe address, delegate address, and signature", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateDelegateDto" - } - } - } - }, - "responses": { - "204": { - "description": "Delegate created successfully" }, - "400": { - "description": "Invalid delegate data or signature" - } - }, - "summary": "Create delegate (deprecated)", - "tags": [ - "delegates" - ] - } - }, - "/v1/chains/{chainId}/delegates/{delegateAddress}": { - "delete": { - "deprecated": true, - "description": "Deletes a delegate for a specific chain and address. This endpoint is deprecated, please use the v2 version instead.", - "operationId": "delegatesDeleteDelegateV1", - "parameters": [ { - "name": "chainId", + "name": "safeAddress", "required": true, "in": "path", - "description": "Chain ID where the delegate is registered", + "description": "Safe contract address (0x prefixed hex string)", "schema": { - "example": "1", "type": "string" } }, { - "name": "delegateAddress", - "required": true, - "in": "path", - "description": "Delegate address to delete (0x prefixed hex string)", + "name": "cursor", + "required": false, + "in": "query", + "description": "Pagination cursor for retrieving the next set of results", + "schema": { + "type": "string" + } + }, + { + "name": "trusted", + "required": false, + "in": "query", + "description": "When true (default), ERC-20 transfers of untrusted tokens are omitted, since any token contract can emit a transfer the Safe never made. ERC-721 and native transfers are not filtered. ERC-20 transfers without value are always omitted.", + "schema": { + "type": "boolean" + } + }, + { + "name": "execution_date__gte", + "required": false, + "in": "query", + "description": "Filter by execution date greater than or equal to (ISO 8601 UTC, e.g. 2024-01-01T00:00:00Z)", + "schema": { + "type": "string" + } + }, + { + "name": "execution_date__lte", + "required": false, + "in": "query", + "description": "Filter by execution date less than or equal to (ISO 8601 UTC, e.g. 2024-01-01T00:00:00Z)", + "schema": { + "type": "string" + } + }, + { + "name": "to", + "required": false, + "in": "query", + "description": "Filter by transfer recipient address (0x prefixed hex string)", + "schema": { + "type": "string" + } + }, + { + "name": "token_address", + "required": false, + "in": "query", + "description": "Filter by token contract address (0x prefixed hex string)", "schema": { "type": "string" } } ], - "requestBody": { - "required": true, - "description": "Signature proving authorization to delete the delegate", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeleteDelegateDto" + "responses": { + "200": { + "description": "Paginated list of outgoing transfers", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TransferTransactionItemPage" + } } } - } - }, - "responses": { - "204": { - "description": "Delegate deleted successfully" }, - "400": { - "description": "Invalid signature or unauthorized deletion attempt" + "404": { + "description": "Safe or chain not found" + }, + "422": { + "description": "Invalid chain ID, address, date, trusted flag or cursor" } }, - "summary": "Delete delegate (deprecated)", + "summary": "Get outgoing transfers", "tags": [ - "delegates" + "transactions" ] } }, - "/v1/chains/{chainId}/safes/{safeAddress}/delegates/{delegateAddress}": { - "delete": { - "deprecated": true, - "description": "Removes a delegate from a specific Safe. This endpoint is deprecated, please use the v2 version instead.", - "operationId": "delegatesDeleteSafeDelegateV1", + "/v1/chains/{chainId}/transactions/{safeAddress}/preview": { + "post": { + "description": "Simulates a transaction execution to preview its effects, including gas estimates, balance changes, and potential errors before actually proposing or executing it.", + "operationId": "transactionsPreviewTransactionV1", "parameters": [ { "name": "chainId", @@ -5825,15 +6955,6 @@ "type": "string" } }, - { - "name": "delegateAddress", - "required": true, - "in": "path", - "description": "Delegate address to remove (0x prefixed hex string)", - "schema": { - "type": "string" - } - }, { "name": "safeAddress", "required": true, @@ -5846,167 +6967,215 @@ ], "requestBody": { "required": true, - "description": "Signature proving authorization to remove the delegate", + "description": "Transaction data to preview including recipient, value, data, and operation type", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DeleteSafeDelegateDto" + "$ref": "#/components/schemas/PreviewTransactionDto" } } } }, "responses": { - "204": { - "description": "Safe delegate removed successfully" + "200": { + "description": "Transaction preview with simulation results, gas estimates, and potential effects", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TransactionPreview" + } + } + } }, "400": { - "description": "Invalid signature or unauthorized removal attempt" + "description": "Invalid transaction data or simulation failed" + }, + "404": { + "description": "Safe not found" } }, - "summary": "Delete Safe delegate (deprecated)", + "summary": "Preview transaction", "tags": [ - "delegates" + "transactions" ] } }, - "/v2/chains/{chainId}/delegates": { + "/v1/chains/{chainId}/safes/{safeAddress}/transactions/queued": { "get": { - "description": "Retrieves a paginated list of delegates for a specific chain with optional filtering by Safe, delegate, delegator, or label.", - "operationId": "delegatesGetDelegatesV2", + "description": "Retrieves a paginated list of queued (pending) transactions for a Safe that are waiting for execution, ordered by nonce.", + "operationId": "transactionsGetTransactionQueueV1", "parameters": [ { "name": "chainId", "required": true, "in": "path", - "description": "Chain ID where delegates are registered", + "description": "Chain ID where the Safe is deployed", "schema": { "example": "1", "type": "string" } }, { - "name": "cursor", - "required": false, - "in": "query", - "description": "Pagination cursor for retrieving the next set of results", + "name": "safeAddress", + "required": true, + "in": "path", + "description": "Safe contract address (0x prefixed hex string)", "schema": { "type": "string" } }, { - "name": "label", + "name": "cursor", "required": false, "in": "query", - "description": "Filter by delegate label or name", + "description": "Pagination cursor for retrieving the next set of results", "schema": { "type": "string" } }, { - "name": "delegator", + "name": "trusted", "required": false, "in": "query", - "description": "Filter by delegator address (0x prefixed hex string)", + "description": "Filter by trust status (true for trusted transactions, false for untrusted)", "schema": { - "type": "string" - } - }, - { - "name": "delegate", - "required": false, - "in": "query", - "description": "Filter by delegate address (0x prefixed hex string)", - "schema": { - "type": "string" - } - }, - { - "name": "safe", - "required": false, - "in": "query", - "description": "Filter by Safe address (0x prefixed hex string)", - "schema": { - "type": "string" + "type": "boolean" } } ], "responses": { "200": { - "description": "Paginated list of delegates retrieved successfully", + "description": "Paginated list of queued transactions", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DelegatePage" + "$ref": "#/components/schemas/QueuedItemPage" } } } + }, + "422": { + "description": "Invalid cursor" } }, - "summary": "Get delegates", + "summary": "Get transaction queue", "tags": [ - "delegates" + "transactions" ] - }, - "post": { - "description": "Creates a new delegate relationship between a Safe and a delegate address. Requires proper authorization signature.", - "operationId": "delegatesPostDelegateV2", + } + }, + "/v1/chains/{chainId}/safes/{safeAddress}/transactions/history": { + "get": { + "description": "Retrieves a paginated list of executed transactions for a Safe, including multisig transactions, module transactions, and incoming transfers, ordered by execution date.", + "operationId": "transactionsGetTransactionsHistoryV1", "parameters": [ { "name": "chainId", "required": true, "in": "path", - "description": "Chain ID where the delegate will be registered", + "description": "Chain ID where the Safe is deployed", "schema": { "example": "1", "type": "string" } + }, + { + "name": "safeAddress", + "required": true, + "in": "path", + "description": "Safe contract address (0x prefixed hex string)", + "schema": { + "type": "string" + } + }, + { + "name": "cursor", + "required": false, + "in": "query", + "description": "Pagination cursor for retrieving the next set of results", + "schema": { + "type": "string" + } + }, + { + "name": "timezone_offset", + "required": false, + "in": "query", + "deprecated": true, + "description": "Deprecated: Timezone offset in milliseconds for date formatting (use timezone parameter instead)", + "schema": { + "type": "string" + } + }, + { + "name": "trusted", + "required": false, + "in": "query", + "description": "Filter by trust status (default: true, set to false to include untrusted transactions)", + "schema": { + "type": "boolean" + } + }, + { + "name": "imitation", + "required": false, + "in": "query", + "description": "Include imitation transactions in results (default: true, set to false to exclude)", + "schema": { + "type": "boolean" + } + }, + { + "name": "timezone", + "required": false, + "in": "query", + "description": "IANA timezone identifier for date formatting (e.g., \"America/New_York\")", + "schema": { + "type": "string" + } } ], - "requestBody": { - "required": true, - "description": "Delegate creation data including Safe address, delegate address, label, and authorization signature", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateDelegateDto" + "responses": { + "200": { + "description": "Paginated list of historical transactions", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TransactionItemPage" + } } } - } - }, - "responses": { - "204": { - "description": "Delegate created successfully" }, - "400": { - "description": "Invalid delegate data, signature, or unauthorized creation attempt" + "422": { + "description": "Invalid cursor" } }, - "summary": "Create delegate", + "summary": "Get transaction history", "tags": [ - "delegates" + "transactions" ] } }, - "/v2/chains/{chainId}/delegates/{delegateAddress}": { - "delete": { - "description": "Removes a delegate relationship for a specific delegate address. Requires proper authorization signature.", - "operationId": "delegatesDeleteDelegateV2", + "/v1/chains/{chainId}/transactions/{safeAddress}/propose": { + "post": { + "description": "Proposes a new multisig transaction for a Safe. The transaction will be pending until enough owners sign it to reach the required threshold.", + "operationId": "transactionsProposeTransactionV1", "parameters": [ { "name": "chainId", "required": true, "in": "path", - "description": "Chain ID where the delegate is registered", + "description": "Chain ID where the Safe is deployed", "schema": { "example": "1", "type": "string" } }, { - "name": "delegateAddress", + "name": "safeAddress", "required": true, "in": "path", - "description": "Delegate address to remove (0x prefixed hex string)", + "description": "Safe contract address (0x prefixed hex string)", "schema": { "type": "string" } @@ -6014,121 +7183,94 @@ ], "requestBody": { "required": true, - "description": "Signature and data proving authorization to delete the delegate", + "description": "Transaction proposal including recipient, value, data, and initial signature", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DeleteDelegateV2Dto" + "$ref": "#/components/schemas/ProposeTransactionDto" } } } }, "responses": { - "204": { - "description": "Delegate deleted successfully" - }, - "400": { - "description": "Invalid signature or unauthorized deletion attempt" - } - }, - "summary": "Delete delegate", - "tags": [ - "delegates" - ] - } - }, - "/v1/register/notifications": { - "post": { - "deprecated": true, - "description": "Registers a device to receive push notifications for Safe events. This endpoint is deprecated, please use the v2 version instead.", - "operationId": "notificationsRegisterDeviceV1", - "parameters": [], - "requestBody": { - "required": true, - "description": "Device registration data including device token, UUID, and Safe registrations with signatures", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RegisterDeviceDto" + "200": { + "description": "Transaction proposed successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TransactionDetails" + } } } - } - }, - "responses": { - "200": { - "description": "Device registered successfully for notifications" }, "400": { - "description": "Invalid device data, expired timestamp, or invalid signature" + "description": "Invalid transaction data" + }, + "422": { + "description": "Invalid chainId, safeAddress, request body or signature" } }, - "summary": "Register device for notifications (deprecated)", + "summary": "Propose transaction", "tags": [ - "notifications" + "transactions" ] } }, - "/v1/chains/{chainId}/notifications/devices/{uuid}": { - "delete": { - "deprecated": true, - "description": "Removes a device from receiving notifications. This endpoint is deprecated, please use the v2 version instead.", - "operationId": "notificationsUnregisterDeviceV1", + "/v1/chains/{chainId}/safes/{safeAddress}/transactions/creation": { + "get": { + "description": "Retrieves the transaction that created the Safe, including the creation timestamp, creator address, factory used, and setup data.", + "operationId": "transactionsGetCreationTransactionV1", "parameters": [ { "name": "chainId", "required": true, "in": "path", - "description": "Chain ID (kept for backward compatibility)", + "description": "Chain ID where the Safe is deployed", "schema": { "example": "1", "type": "string" } }, { - "name": "uuid", + "name": "safeAddress", "required": true, "in": "path", - "description": "Device UUID to unregister", + "description": "Safe contract address (0x prefixed hex string)", "schema": { - "example": "550e8400-e29b-41d4-a716-446655440000", "type": "string" } } ], "responses": { - "204": { - "description": "Device unregistered successfully" + "200": { + "description": "Safe creation transaction details", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreationTransaction" + } + } + } + }, + "404": { + "description": "Safe not found or creation transaction not available" } }, - "summary": "Unregister device (deprecated)", + "summary": "Get Safe creation transaction", "tags": [ - "notifications" + "transactions" ] } }, - "/v1/chains/{chainId}/notifications/devices/{uuid}/safes/{safeAddress}": { - "delete": { - "deprecated": true, - "description": "Removes a specific Safe from receiving notifications on a device. This endpoint is deprecated, please use the v2 version instead.", - "operationId": "notificationsUnregisterSafeV1", + "/v1/export/chains/{chainId}/{safeAddress}": { + "post": { + "operationId": "csvExportLaunchExportV1", "parameters": [ { "name": "chainId", "required": true, "in": "path", - "description": "Chain ID where the Safe is deployed", - "schema": { - "example": "1", - "type": "string" - } - }, - { - "name": "uuid", - "required": true, - "in": "path", - "description": "Device UUID", "schema": { - "example": "550e8400-e29b-41d4-a716-446655440000", "type": "string" } }, @@ -6136,97 +7278,136 @@ "name": "safeAddress", "required": true, "in": "path", - "description": "Safe contract address (0x prefixed hex string)", "schema": { "type": "string" } } ], - "responses": { - "204": { - "description": "Safe unregistered from device notifications successfully" + "requestBody": { + "required": false, + "description": "Transaction export request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TransactionExportDto" + } + } } }, - "summary": "Unregister Safe from device (deprecated)", - "tags": [ - "notifications" - ] - } - }, - "/v2/register/notifications": { - "post": { - "description": "Registers or updates a device to receive push notifications for Safe events. Creates subscriptions for specified Safes and notification types.", - "operationId": "notificationsUpsertSubscriptionsV2", - "parameters": [], - "requestBody": { - "required": true, - "description": "Device and subscription data including device token, Safe addresses, and notification preferences", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpsertSubscriptionsDto" + "responses": { + "202": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/JobStatusDto" + } } } } }, + "tags": [ + "export" + ] + } + }, + "/v1/export/{jobId}/status": { + "get": { + "operationId": "csvExportGetExportStatusV1", + "parameters": [ + { + "name": "jobId", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], "responses": { - "201": { - "description": "Device registered successfully with returned device UUID", + "200": { + "description": "CSV export status retrieved successfully", "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "deviceUuid": { - "type": "string", - "format": "uuid", - "description": "Generated UUID for the registered device" - } - } + "$ref": "#/components/schemas/JobStatusDto" } } } }, - "400": { - "description": "Invalid device data or subscription configuration" + "404": { + "description": "CSV export not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/JobStatusErrorDto" + } + } + } } }, - "summary": "Register device for notifications", "tags": [ - "notifications" + "export" ] } }, - "/v2/chains/{chainId}/notifications/devices/{deviceUuid}/safes/{safeAddress}": { + "/v1/chains/{chainId}/delegates": { "get": { - "description": "Retrieves the notification types that a device is subscribed to for a specific Safe.", - "operationId": "notificationsGetSafeSubscriptionV2", + "deprecated": true, + "description": "Retrieves a paginated list of delegates for a specific chain. This endpoint is deprecated, please use the v3 version instead.", + "operationId": "delegatesGetDelegatesV1", "parameters": [ { - "name": "deviceUuid", + "name": "chainId", "required": true, "in": "path", - "description": "Device UUID", + "description": "Chain ID where delegates are registered", "schema": { - "example": "550e8400-e29b-41d4-a716-446655440000", + "example": "1", "type": "string" } }, { - "name": "chainId", - "required": true, - "in": "path", - "description": "Chain ID where the Safe is deployed", + "name": "cursor", + "required": false, + "in": "query", + "description": "Pagination cursor for retrieving the next set of results", "schema": { - "example": "1", "type": "string" } }, { - "name": "safeAddress", - "required": true, - "in": "path", - "description": "Safe contract address (0x prefixed hex string)", + "name": "label", + "required": false, + "in": "query", + "description": "Filter by delegate label", + "schema": { + "type": "string" + } + }, + { + "name": "delegator", + "required": false, + "in": "query", + "description": "Filter by delegator address", + "schema": { + "type": "string" + } + }, + { + "name": "delegate", + "required": false, + "in": "query", + "description": "Filter by delegate address", + "schema": { + "type": "string" + } + }, + { + "name": "safe", + "required": false, + "in": "query", + "description": "Filter by Safe address", "schema": { "type": "string" } @@ -6234,2568 +7415,5269 @@ ], "responses": { "200": { - "description": "List of notification types the device is subscribed to for this Safe", + "description": "Paginated list of delegates retrieved successfully", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/NotificationTypeResponseDto" - } + "$ref": "#/components/schemas/DelegatePage" } } } }, - "401": { - "description": "Authentication required - valid JWT token must be provided" - }, - "404": { - "description": "Device, Safe, or subscription not found" + "422": { + "description": "Invalid cursor" } }, - "summary": "Get Safe subscription", + "summary": "Get delegates (deprecated)", "tags": [ - "notifications" + "delegates" ] }, - "delete": { - "description": "Removes all notification subscriptions for a specific Safe on a device.", - "operationId": "notificationsDeleteSubscriptionV2", + "post": { + "deprecated": true, + "description": "Creates a new delegate for a specific chain. This endpoint is deprecated, please use the v3 version instead.", + "operationId": "delegatesPostDelegateV1", "parameters": [ { - "name": "deviceUuid", + "name": "chainId", "required": true, "in": "path", - "description": "Device UUID", + "description": "Chain ID where the delegate will be registered", "schema": { - "example": "550e8400-e29b-41d4-a716-446655440000", + "example": "1", "type": "string" } + } + ], + "requestBody": { + "required": true, + "description": "Delegate creation data including Safe address, delegate address, and signature", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateDelegateDto" + } + } + } + }, + "responses": { + "204": { + "description": "Delegate created successfully" }, + "400": { + "description": "Invalid delegate data or signature" + } + }, + "summary": "Create delegate (deprecated)", + "tags": [ + "delegates" + ] + } + }, + "/v1/chains/{chainId}/delegates/{delegateAddress}": { + "delete": { + "deprecated": true, + "description": "Deletes a delegate for a specific chain and address. This endpoint is deprecated, please use the v3 version instead.", + "operationId": "delegatesDeleteDelegateV1", + "parameters": [ { "name": "chainId", "required": true, "in": "path", - "description": "Chain ID where the Safe is deployed", + "description": "Chain ID where the delegate is registered", "schema": { "example": "1", "type": "string" } }, { - "name": "safeAddress", + "name": "delegateAddress", "required": true, "in": "path", - "description": "Safe contract address (0x prefixed hex string)", + "description": "Delegate address to delete (0x prefixed hex string)", "schema": { "type": "string" } } ], - "responses": { - "204": { - "description": "Safe subscription deleted successfully" - }, - "404": { - "description": "Device, Safe, or subscription not found" - } - }, - "summary": "Delete Safe subscription", - "tags": [ - "notifications" - ] - } - }, - "/v2/notifications/subscriptions": { - "delete": { - "description": "Delete all subscriptions of a Safe on a device. This will delete all subscriptions of a Safe on a device for all chains passed in the request body.", - "operationId": "notificationsDeleteAllSubscriptionsV2", - "parameters": [], "requestBody": { "required": true, + "description": "Signature proving authorization to delete the delegate", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DeleteAllSubscriptionsDto" + "$ref": "#/components/schemas/DeleteDelegateDto" } } } }, "responses": { - "404": { - "description": "No subscription was found" + "204": { + "description": "Delegate deleted successfully" }, - "422": { - "description": "The request body is invalid" + "400": { + "description": "Invalid signature or unauthorized deletion attempt" } }, - "summary": "Delete all subscriptions of a device", + "summary": "Delete delegate (deprecated)", "tags": [ - "notifications" + "delegates" ] } }, - "/v2/chains/{chainId}/notifications/devices/{deviceUuid}": { + "/v1/chains/{chainId}/safes/{safeAddress}/delegates/{delegateAddress}": { "delete": { - "description": "Removes a device and all its notification subscriptions from the system.", - "operationId": "notificationsDeleteDeviceV2", + "deprecated": true, + "description": "Removes a delegate from a specific Safe. This endpoint is deprecated, please use the v3 version instead.", + "operationId": "delegatesDeleteSafeDelegateV1", "parameters": [ { "name": "chainId", "required": true, "in": "path", - "description": "Chain ID (kept for backward compatibility)", + "description": "Chain ID where the Safe is deployed", "schema": { "example": "1", "type": "string" } }, { - "name": "deviceUuid", + "name": "delegateAddress", "required": true, "in": "path", - "description": "Device UUID to delete", + "description": "Delegate address to remove (0x prefixed hex string)", + "schema": { + "type": "string" + } + }, + { + "name": "safeAddress", + "required": true, + "in": "path", + "description": "Safe contract address (0x prefixed hex string)", "schema": { - "example": "550e8400-e29b-41d4-a716-446655440000", "type": "string" } } ], + "requestBody": { + "required": true, + "description": "Signature proving authorization to remove the delegate", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeleteSafeDelegateDto" + } + } + } + }, "responses": { "204": { - "description": "Device deleted successfully" + "description": "Safe delegate removed successfully" + }, + "400": { + "description": "Invalid signature or unauthorized removal attempt" + } + }, + "summary": "Delete Safe delegate (deprecated)", + "tags": [ + "delegates" + ] + } + }, + "/v2/chains/{chainId}/delegates": { + "get": { + "deprecated": true, + "description": "Retrieves a paginated list of delegates for a specific chain with optional filtering by Safe, delegate, delegator, or label. This endpoint is deprecated, please use the v3 version instead.", + "operationId": "delegatesGetDelegatesV2", + "parameters": [ + { + "name": "chainId", + "required": true, + "in": "path", + "description": "Chain ID where delegates are registered", + "schema": { + "example": "1", + "type": "string" + } + }, + { + "name": "cursor", + "required": false, + "in": "query", + "description": "Pagination cursor for retrieving the next set of results", + "schema": { + "type": "string" + } + }, + { + "name": "label", + "required": false, + "in": "query", + "description": "Filter by delegate label or name", + "schema": { + "type": "string" + } + }, + { + "name": "delegator", + "required": false, + "in": "query", + "description": "Filter by delegator address (0x prefixed hex string)", + "schema": { + "type": "string" + } + }, + { + "name": "delegate", + "required": false, + "in": "query", + "description": "Filter by delegate address (0x prefixed hex string)", + "schema": { + "type": "string" + } + }, + { + "name": "safe", + "required": false, + "in": "query", + "description": "Filter by Safe address (0x prefixed hex string)", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Paginated list of delegates retrieved successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DelegatePage" + } + } + } + }, + "422": { + "description": "Invalid cursor" + } + }, + "summary": "Get delegates (deprecated)", + "tags": [ + "delegates" + ] + }, + "post": { + "deprecated": true, + "description": "Creates a new delegate relationship between a Safe and a delegate address. Requires proper authorization signature. This endpoint is deprecated, please use the v3 version instead.", + "operationId": "delegatesPostDelegateV2", + "parameters": [ + { + "name": "chainId", + "required": true, + "in": "path", + "description": "Chain ID where the delegate will be registered", + "schema": { + "example": "1", + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "description": "Delegate creation data including Safe address, delegate address, label, and authorization signature", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateDelegateDto" + } + } + } + }, + "responses": { + "204": { + "description": "Delegate created successfully" + }, + "400": { + "description": "Invalid delegate data, signature, or unauthorized creation attempt" + } + }, + "summary": "Create delegate (deprecated)", + "tags": [ + "delegates" + ] + } + }, + "/v2/chains/{chainId}/delegates/{delegateAddress}": { + "delete": { + "deprecated": true, + "description": "Removes a delegate relationship for a specific delegate address. Requires proper authorization signature. This endpoint is deprecated, please use the v3 version instead.", + "operationId": "delegatesDeleteDelegateV2", + "parameters": [ + { + "name": "chainId", + "required": true, + "in": "path", + "description": "Chain ID where the delegate is registered", + "schema": { + "example": "1", + "type": "string" + } + }, + { + "name": "delegateAddress", + "required": true, + "in": "path", + "description": "Delegate address to remove (0x prefixed hex string)", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "description": "Signature and data proving authorization to delete the delegate", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeleteDelegateV2Dto" + } + } + } + }, + "responses": { + "204": { + "description": "Delegate deleted successfully" + }, + "400": { + "description": "Invalid signature or unauthorized deletion attempt" + } + }, + "summary": "Delete delegate (deprecated)", + "tags": [ + "delegates" + ] + } + }, + "/v3/chains/{chainId}/delegates": { + "get": { + "description": "Retrieves a paginated list of delegates for a specific chain with optional filtering by Safe, delegate, delegator, or label.", + "operationId": "delegatesGetDelegatesV3", + "parameters": [ + { + "name": "chainId", + "required": true, + "in": "path", + "description": "Chain ID where delegates are registered", + "schema": { + "example": "1", + "type": "string" + } + }, + { + "name": "cursor", + "required": false, + "in": "query", + "description": "Pagination cursor for retrieving the next set of results", + "schema": { + "type": "string" + } + }, + { + "name": "label", + "required": false, + "in": "query", + "description": "Filter by delegate label or name", + "schema": { + "type": "string" + } + }, + { + "name": "delegator", + "required": false, + "in": "query", + "description": "Filter by delegator address (0x prefixed hex string)", + "schema": { + "type": "string" + } + }, + { + "name": "delegate", + "required": false, + "in": "query", + "description": "Filter by delegate address (0x prefixed hex string)", + "schema": { + "type": "string" + } + }, + { + "name": "safe", + "required": false, + "in": "query", + "description": "Filter by Safe address (0x prefixed hex string)", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Paginated list of delegates retrieved successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DelegatePage" + } + } + } + }, + "422": { + "description": "Invalid cursor" + } + }, + "summary": "Get delegates", + "tags": [ + "delegates" + ] + }, + "post": { + "description": "Creates a new delegate relationship between a Safe and a delegate address. Requires proper authorization signature.", + "operationId": "delegatesPostDelegateV3", + "parameters": [ + { + "name": "chainId", + "required": true, + "in": "path", + "description": "Chain ID where the delegate will be registered", + "schema": { + "example": "1", + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "description": "Delegate creation data including Safe address, delegate address, label, and authorization signature", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateDelegateDto" + } + } + } + }, + "responses": { + "204": { + "description": "Delegate created successfully" + }, + "400": { + "description": "Invalid delegate data, signature, or unauthorized creation attempt" + } + }, + "summary": "Create delegate", + "tags": [ + "delegates" + ] + }, + "patch": { + "description": "Updates an existing delegate relationship (e.g. the delegate label). Requires proper authorization signature. Depending on the backing service, a relationship that does not exist yet is either created or rejected.", + "operationId": "delegatesUpdateDelegateV3", + "parameters": [ + { + "name": "chainId", + "required": true, + "in": "path", + "description": "Chain ID where the delegate is registered", + "schema": { + "example": "1", + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "description": "Delegate update data including Safe address, delegate address, delegator, label, and authorization signature", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateDelegateV3Dto" + } + } + } + }, + "responses": { + "204": { + "description": "Delegate updated successfully" + }, + "400": { + "description": "Invalid delegate data, signature, or unauthorized update attempt" + } + }, + "summary": "Update delegate", + "tags": [ + "delegates" + ] + } + }, + "/v3/chains/{chainId}/delegates/{delegateAddress}": { + "delete": { + "description": "Removes a delegate relationship for a specific delegate address. Requires proper authorization signature.", + "operationId": "delegatesDeleteDelegateV3", + "parameters": [ + { + "name": "chainId", + "required": true, + "in": "path", + "description": "Chain ID where the delegate is registered", + "schema": { + "example": "1", + "type": "string" + } + }, + { + "name": "delegateAddress", + "required": true, + "in": "path", + "description": "Delegate address to remove (0x prefixed hex string)", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "description": "Signature and data proving authorization to delete the delegate", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeleteDelegateV3Dto" + } + } + } + }, + "responses": { + "204": { + "description": "Delegate deleted successfully" + }, + "400": { + "description": "Invalid signature or unauthorized deletion attempt" + } + }, + "summary": "Delete delegate", + "tags": [ + "delegates" + ] + } + }, + "/v1/chains/{chainId}/tokens/{address}": { + "get": { + "description": "Symbol, name, decimals, logo and trust flag of a token on the given chain, as known by the Transaction Service.", + "operationId": "tokensGetTokenV1", + "parameters": [ + { + "name": "chainId", + "required": true, + "in": "path", + "description": "Chain ID the token is deployed on", + "schema": { + "example": "1", + "type": "string" + } + }, + { + "name": "address", + "required": true, + "in": "path", + "description": "Token contract address (0x prefixed hex string)", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Token metadata", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "$ref": "#/components/schemas/NativeTokenMetadata" + }, + { + "$ref": "#/components/schemas/Erc20TokenMetadata" + }, + { + "$ref": "#/components/schemas/Erc721TokenMetadata" + } + ] + } + } + } + }, + "404": { + "description": "The Transaction Service does not know this token" + }, + "422": { + "description": "Invalid chain ID or address" + }, + "429": { + "description": "Rate limit exceeded" + } + }, + "summary": "Get token metadata", + "tags": [ + "tokens" + ] + } + }, + "/v1/chains/{chainId}/tokens": { + "get": { + "description": "Metadata for up to 20 tokens of one chain, in request order. Addresses the Transaction Service does not know are omitted.", + "operationId": "tokensGetTokensV1", + "parameters": [ + { + "name": "chainId", + "required": true, + "in": "path", + "description": "Chain ID the token is deployed on", + "schema": { + "example": "1", + "type": "string" + } + }, + { + "name": "addresses", + "required": true, + "in": "query", + "description": "Comma-separated token contract addresses, at most 20", + "schema": { + "example": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48,0xdAC17F958D2ee523a2206206994597C13D831ec7", + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Token metadata for the known addresses, in request order", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/NativeTokenMetadata" + }, + { + "$ref": "#/components/schemas/Erc20TokenMetadata" + }, + { + "$ref": "#/components/schemas/Erc721TokenMetadata" + } + ] + } + } + } + } + }, + "422": { + "description": "Invalid chain ID, malformed address, empty list or more than 20 addresses" + }, + "429": { + "description": "Rate limit exceeded" + } + }, + "summary": "Get metadata for several tokens", + "tags": [ + "tokens" + ] + } + }, + "/v1/register/notifications": { + "post": { + "deprecated": true, + "description": "Registers a device to receive push notifications for Safe events. This endpoint is deprecated, please use the v2 version instead.", + "operationId": "notificationsRegisterDeviceV1", + "parameters": [], + "requestBody": { + "required": true, + "description": "Device registration data including device token, UUID, and Safe registrations with signatures", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RegisterDeviceDto" + } + } + } + }, + "responses": { + "200": { + "description": "Device registered successfully for notifications" + }, + "400": { + "description": "Expired timestamp" + }, + "422": { + "description": "Invalid device data or malformed signature" + } + }, + "summary": "Register device for notifications (deprecated)", + "tags": [ + "notifications" + ] + } + }, + "/v1/chains/{chainId}/notifications/devices/{uuid}": { + "delete": { + "deprecated": true, + "description": "Removes a device from receiving notifications. This endpoint is deprecated, please use the v2 version instead.", + "operationId": "notificationsUnregisterDeviceV1", + "parameters": [ + { + "name": "chainId", + "required": true, + "in": "path", + "description": "Chain ID (kept for backward compatibility)", + "schema": { + "example": "1", + "type": "string" + } + }, + { + "name": "uuid", + "required": true, + "in": "path", + "description": "Device UUID to unregister", + "schema": { + "example": "550e8400-e29b-41d4-a716-446655440000", + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Device unregistered successfully" + } + }, + "summary": "Unregister device (deprecated)", + "tags": [ + "notifications" + ] + } + }, + "/v1/chains/{chainId}/notifications/devices/{uuid}/safes/{safeAddress}": { + "delete": { + "deprecated": true, + "description": "Removes a specific Safe from receiving notifications on a device. This endpoint is deprecated, please use the v2 version instead.", + "operationId": "notificationsUnregisterSafeV1", + "parameters": [ + { + "name": "chainId", + "required": true, + "in": "path", + "description": "Chain ID where the Safe is deployed", + "schema": { + "example": "1", + "type": "string" + } + }, + { + "name": "uuid", + "required": true, + "in": "path", + "description": "Device UUID", + "schema": { + "example": "550e8400-e29b-41d4-a716-446655440000", + "type": "string" + } + }, + { + "name": "safeAddress", + "required": true, + "in": "path", + "description": "Safe contract address (0x prefixed hex string)", + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Safe unregistered from device notifications successfully" + } + }, + "summary": "Unregister Safe from device (deprecated)", + "tags": [ + "notifications" + ] + } + }, + "/v2/register/notifications": { + "post": { + "description": "Registers or updates a device to receive push notifications for Safe events. Creates subscriptions for specified Safes and notification types.", + "operationId": "notificationsUpsertSubscriptionsV2", + "parameters": [], + "requestBody": { + "required": true, + "description": "Device and subscription data including device token, Safe addresses, and notification preferences", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpsertSubscriptionsDto" + } + } + } + }, + "responses": { + "201": { + "description": "Device registered successfully with returned device UUID", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "deviceUuid": { + "type": "string", + "format": "uuid", + "description": "Generated UUID for the registered device" + } + } + } + } + } + }, + "400": { + "description": "Invalid device data or subscription configuration" + } + }, + "summary": "Register device for notifications", + "tags": [ + "notifications" + ] + } + }, + "/v2/chains/{chainId}/notifications/devices/{deviceUuid}/safes/{safeAddress}": { + "get": { + "description": "Retrieves the notification types that a device is subscribed to for a specific Safe.", + "operationId": "notificationsGetSafeSubscriptionV2", + "parameters": [ + { + "name": "deviceUuid", + "required": true, + "in": "path", + "description": "Device UUID", + "schema": { + "example": "550e8400-e29b-41d4-a716-446655440000", + "type": "string" + } + }, + { + "name": "chainId", + "required": true, + "in": "path", + "description": "Chain ID where the Safe is deployed", + "schema": { + "example": "1", + "type": "string" + } + }, + { + "name": "safeAddress", + "required": true, + "in": "path", + "description": "Safe contract address (0x prefixed hex string)", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "List of notification types the device is subscribed to for this Safe", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/NotificationTypeResponseDto" + } + } + } + } + }, + "401": { + "description": "Authentication required - valid JWT token must be provided" + }, + "404": { + "description": "Device, Safe, or subscription not found" + } + }, + "summary": "Get Safe subscription", + "tags": [ + "notifications" + ] + }, + "delete": { + "description": "Removes all notification subscriptions for a specific Safe on a device.", + "operationId": "notificationsDeleteSubscriptionV2", + "parameters": [ + { + "name": "deviceUuid", + "required": true, + "in": "path", + "description": "Device UUID", + "schema": { + "example": "550e8400-e29b-41d4-a716-446655440000", + "type": "string" + } + }, + { + "name": "chainId", + "required": true, + "in": "path", + "description": "Chain ID where the Safe is deployed", + "schema": { + "example": "1", + "type": "string" + } + }, + { + "name": "safeAddress", + "required": true, + "in": "path", + "description": "Safe contract address (0x prefixed hex string)", + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Safe subscription deleted successfully" + }, + "404": { + "description": "Device, Safe, or subscription not found" + } + }, + "summary": "Delete Safe subscription", + "tags": [ + "notifications" + ] + } + }, + "/v2/notifications/subscriptions": { + "delete": { + "description": "Delete all subscriptions of a Safe on a device. This will delete all subscriptions of a Safe on a device for all chains passed in the request body.", + "operationId": "notificationsDeleteAllSubscriptionsV2", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeleteAllSubscriptionsDto" + } + } + } + }, + "responses": { + "404": { + "description": "No subscription was found" + }, + "422": { + "description": "The request body is invalid" + } + }, + "summary": "Delete all subscriptions of a device", + "tags": [ + "notifications" + ] + } + }, + "/v2/chains/{chainId}/notifications/devices/{deviceUuid}": { + "delete": { + "description": "Removes a device and all its notification subscriptions from the system.", + "operationId": "notificationsDeleteDeviceV2", + "parameters": [ + { + "name": "chainId", + "required": true, + "in": "path", + "description": "Chain ID (kept for backward compatibility)", + "schema": { + "example": "1", + "type": "string" + } + }, + { + "name": "deviceUuid", + "required": true, + "in": "path", + "description": "Device UUID to delete", + "schema": { + "example": "550e8400-e29b-41d4-a716-446655440000", + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Device deleted successfully" }, "404": { "description": "Device not found" } }, - "summary": "Delete device", - "tags": [ - "notifications" + "summary": "Delete device", + "tags": [ + "notifications" + ] + } + } + }, + "info": { + "title": "Safe Client Gateway", + "description": "", + "version": "main-4657207", + "contact": {} + }, + "tags": [], + "servers": [], + "components": { + "schemas": { + "About": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "version": { + "type": "string", + "nullable": true + }, + "buildNumber": { + "type": "string", + "nullable": true + } + }, + "required": [ + "name" + ] + }, + "UserSession": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "authMethod": { + "type": "string", + "enum": [ + "siwe", + "oidc" + ] + }, + "signerAddress": { + "type": "string", + "description": "Wallet signer address. Present only for SIWE-authenticated users." + }, + "email": { + "type": "string", + "description": "Verified email address. Present only for OIDC-authenticated users when stored." + } + }, + "required": [ + "id", + "authMethod" + ] + }, + "AuthNonce": { + "type": "object", + "properties": { + "nonce": { + "type": "string" + } + }, + "required": [ + "nonce" + ] + }, + "SiweDto": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "signature": { + "type": "string" + } + }, + "required": [ + "message", + "signature" + ] + }, + "LogoutDto": { + "type": "object", + "properties": { + "redirect_url": { + "type": "string", + "description": "Post-logout redirect URL (must be same-origin as pre-configured URL)" + } + } + }, + "Authenticator": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Auth0 authentication method identifier (e.g. totp|...)" + }, + "type": { + "type": "string", + "description": "Authentication method type (e.g. totp)" + }, + "name": { + "type": "string", + "description": "User-visible authenticator name" + }, + "createdAt": { + "type": "string", + "description": "ISO 8601 timestamp of when the method was enrolled" + } + }, + "required": [ + "id", + "type" + ] + }, + "NativeToken": { + "type": "object", + "properties": { + "address": { + "type": "string" + }, + "decimals": { + "type": "number" + }, + "logoUri": { + "type": "string" + }, + "name": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "NATIVE_TOKEN" + ] + } + }, + "required": [ + "address", + "decimals", + "logoUri", + "name", + "symbol", + "type" + ] + }, + "Erc20Token": { + "type": "object", + "properties": { + "address": { + "type": "string" + }, + "decimals": { + "type": "number" + }, + "logoUri": { + "type": "string" + }, + "name": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "ERC20" + ] + } + }, + "required": [ + "address", + "decimals", + "logoUri", + "name", + "symbol", + "type" + ] + }, + "Erc721Token": { + "type": "object", + "properties": { + "address": { + "type": "string" + }, + "decimals": { + "type": "number" + }, + "logoUri": { + "type": "string" + }, + "name": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "ERC721" + ] + } + }, + "required": [ + "address", + "decimals", + "logoUri", + "name", + "symbol", + "type" + ] + }, + "Balance": { + "type": "object", + "properties": { + "balance": { + "type": "string" + }, + "fiatBalance": { + "type": "string" + }, + "fiatConversion": { + "type": "string" + }, + "tokenInfo": { + "oneOf": [ + { + "$ref": "#/components/schemas/NativeToken" + }, + { + "$ref": "#/components/schemas/Erc20Token" + }, + { + "$ref": "#/components/schemas/Erc721Token" + } + ] + }, + "fiatBalance24hChange": { + "type": "string", + "nullable": true + } + }, + "required": [ + "balance", + "fiatBalance", + "fiatConversion", + "tokenInfo" + ] + }, + "Balances": { + "type": "object", + "properties": { + "fiatTotal": { + "type": "string" + }, + "items": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/Balance" + } + ] + } + } + }, + "required": [ + "fiatTotal", + "items" + ] + }, + "SubscriptionPlan": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string", + "nullable": true + }, + "description": { + "type": "string", + "nullable": true + }, + "currentPrice": { + "type": "number" + }, + "originalPrice": { + "type": "number", + "nullable": true + }, + "paymentMethod": { + "type": "string" + }, + "currency": { + "type": "string" + }, + "features": { + "type": "array", + "items": { + "type": "string" + } + }, + "billingCycle": { + "type": "string", + "nullable": true + }, + "type": { + "type": "string" + }, + "product": { + "type": "string", + "nullable": true + } + }, + "required": [ + "id", + "currentPrice", + "originalPrice", + "paymentMethod", + "currency", + "features", + "type", + "product" + ] + }, + "Subscription": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "customerId": { + "type": "string" + }, + "upstreamCustomerId": { + "type": "string" + }, + "plan": { + "$ref": "#/components/schemas/SubscriptionPlan" + }, + "status": { + "type": "string", + "enum": [ + "active", + "canceled", + "incomplete", + "incomplete_expired", + "past_due", + "paused", + "trialing", + "unpaid" + ] + }, + "createdAt": { + "type": "number" + }, + "startAt": { + "type": "number" + }, + "cancelledAt": { + "type": "number", + "nullable": true + }, + "cancelAt": { + "type": "number", + "nullable": true + }, + "currentPeriodStart": { + "type": "number", + "nullable": true + }, + "currentPeriodEnd": { + "type": "number", + "nullable": true + }, + "metadata": { + "type": "object", + "nullable": true + }, + "hasPaymentMethod": { + "type": "boolean", + "description": "Whether the subscription has a default payment method, or its customer does as a fallback" + } + }, + "required": [ + "id", + "customerId", + "upstreamCustomerId", + "plan", + "status", + "createdAt", + "startAt", + "cancelledAt", + "cancelAt" + ] + }, + "PaymentLink": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "active": { + "type": "boolean" + }, + "metadata": { + "type": "object" + }, + "customText": { + "type": "object" + }, + "afterCompletion": { + "type": "object" + }, + "lineItems": { + "type": "array", + "items": { + "type": "object" + } + }, + "trialPeriodDays": { + "type": "number", + "nullable": true + } + }, + "required": [ + "id", + "active", + "metadata" + ] + }, + "MarketingFeature": { + "type": "object", + "properties": { + "name": { + "type": "string" + } + }, + "required": [ + "name" + ] + }, + "Product": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "active": { + "type": "boolean" + }, + "description": { + "type": "string" + }, + "marketingFeatures": { + "type": "array", + "items": { + "$ref": "#/components/schemas/MarketingFeature" + } + }, + "metadata": { + "type": "object" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "active", + "description", + "marketingFeatures", + "metadata", + "name" + ] + }, + "Plan": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string", + "nullable": true + }, + "description": { + "type": "string", + "nullable": true + }, + "currentPrice": { + "type": "number" + }, + "originalPrice": { + "type": "number", + "nullable": true + }, + "paymentMethod": { + "type": "string" + }, + "currency": { + "type": "string" + }, + "features": { + "type": "array", + "items": { + "type": "string" + } + }, + "billingCycle": { + "type": "string", + "nullable": true + }, + "type": { + "type": "string" + }, + "product": { + "$ref": "#/components/schemas/Product" + } + }, + "required": [ + "id", + "currentPrice", + "originalPrice", + "paymentMethod", + "currency", + "features", + "type", + "product" + ] + }, + "UrlResponse": { + "type": "object", + "properties": { + "url": { + "type": "string" + } + }, + "required": [ + "url" + ] + }, + "CheckoutSessionResult": { + "type": "object", + "properties": { + "sessionId": { + "type": "string" + }, + "url": { + "type": "string" + } + }, + "required": [ + "sessionId", + "url" + ] + }, + "PreviewLineItem": { + "type": "object", + "properties": { + "description": { + "type": "string" + }, + "amount": { + "type": "number", + "description": "Signed amount in minor units; negative for credit on unused time" + }, + "currency": { + "type": "string" + } + }, + "required": [ + "description", + "amount", + "currency" + ] + }, + "SubscriptionUpdatePreview": { + "type": "object", + "properties": { + "amountDue": { + "type": "number" + }, + "currency": { + "type": "string" + }, + "nextBillingDate": { + "type": "number", + "description": "Unix timestamp in seconds" + }, + "lineItems": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PreviewLineItem" + } + } + }, + "required": [ + "amountDue", + "currency", + "nextBillingDate", + "lineItems" + ] + }, + "RemovedSafeDto": { + "type": "object", + "properties": { + "chainId": { + "type": "string" + }, + "address": { + "type": "string" + } + }, + "required": [ + "chainId", + "address" + ] + }, + "UpdateSubscriptionDto": { + "type": "object", + "properties": { + "planId": { + "type": "string", + "description": "The price id of the plan to move the subscription onto" + }, + "paymentLinkId": { + "type": "string", + "description": "Which offered payment link sells that plan. Only needed to disambiguate when several do" + }, + "removedSafes": { + "description": "Safes to remove from the workspace before the plan changes, so it fits the new plan. Safes the workspace does not hold are ignored", + "type": "array", + "items": { + "$ref": "#/components/schemas/RemovedSafeDto" + } + } + }, + "required": [ + "planId" + ] + }, + "UpdateSubscriptionResult": { + "type": "object", + "properties": { + "subscriptionId": { + "type": "string" + }, + "success": { + "type": "boolean" + } + }, + "required": [ + "subscriptionId", + "success" + ] + }, + "CheckoutSession": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "object": { + "type": "string" + }, + "amountSubtotal": { + "type": "number" + }, + "amountTotal": { + "type": "number" + }, + "cancelUrl": { + "type": "string" + }, + "clientReferenceId": { + "type": "object", + "nullable": true + }, + "created": { + "type": "number" + }, + "currency": { + "type": "string" + }, + "customer": { + "type": "object", + "nullable": true + }, + "expiresAt": { + "type": "number" + }, + "metadata": { + "type": "object" + }, + "mode": { + "type": "string" + }, + "paymentStatus": { + "type": "string" + }, + "status": { + "type": "string" + }, + "successUrl": { + "type": "string" + }, + "url": { + "type": "object", + "nullable": true + }, + "subscription": { + "type": "object", + "nullable": true + }, + "invoice": { + "type": "object", + "nullable": true + } + }, + "required": [ + "id", + "object", + "amountSubtotal", + "amountTotal", + "cancelUrl", + "created", + "currency", + "expiresAt", + "metadata", + "mode", + "paymentStatus", + "status", + "successUrl" + ] + }, + "Position": { + "type": "object", + "properties": { + "balance": { + "type": "string" + }, + "fiatBalance": { + "type": "string" + }, + "fiatConversion": { + "type": "string" + }, + "tokenInfo": { + "oneOf": [ + { + "$ref": "#/components/schemas/NativeToken" + }, + { + "$ref": "#/components/schemas/Erc20Token" + }, + { + "$ref": "#/components/schemas/Erc721Token" + } + ] + }, + "fiatBalance24hChange": { + "type": "string", + "nullable": true + }, + "position_type": { + "type": "string", + "enum": [ + "deposit", + "loan", + "locked", + "staked", + "reward", + "wallet", + "airdrop", + "margin", + "unknown" + ], + "nullable": true + } + }, + "required": [ + "balance", + "fiatBalance", + "fiatConversion", + "tokenInfo", + "fiatBalance24hChange", + "position_type" + ] + }, + "PositionGroup": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "items": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/Position" + } + ] + } + } + }, + "required": [ + "name", + "items" + ] + }, + "ProtocolIcon": { + "type": "object", + "properties": { + "url": { + "type": "string", + "nullable": true + } + }, + "required": [ + "url" + ] + }, + "ProtocolMetadata": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "icon": { + "$ref": "#/components/schemas/ProtocolIcon" + } + }, + "required": [ + "name", + "icon" + ] + }, + "Protocol": { + "type": "object", + "properties": { + "protocol": { + "type": "string" + }, + "protocol_metadata": { + "$ref": "#/components/schemas/ProtocolMetadata" + }, + "fiatTotal": { + "type": "string" + }, + "items": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/PositionGroup" + } + ] + } + } + }, + "required": [ + "protocol", + "protocol_metadata", + "fiatTotal", + "items" + ] + }, + "PortfolioNativeToken": { + "type": "object", + "properties": { + "address": { + "type": "string" + }, + "decimals": { + "type": "number" + }, + "logoUri": { + "type": "string" + }, + "name": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "NATIVE_TOKEN" + ] + }, + "chainId": { + "type": "string", + "description": "The chain ID" + }, + "trusted": { + "type": "boolean", + "description": "Whether the token is trusted (spam filter)" + } + }, + "required": [ + "address", + "decimals", + "logoUri", + "name", + "symbol", + "type", + "chainId", + "trusted" + ] + }, + "PortfolioErc20Token": { + "type": "object", + "properties": { + "address": { + "type": "string" + }, + "decimals": { + "type": "number" + }, + "logoUri": { + "type": "string" + }, + "name": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "ERC20" + ] + }, + "chainId": { + "type": "string", + "description": "The chain ID" + }, + "trusted": { + "type": "boolean", + "description": "Whether the token is trusted (spam filter)" + } + }, + "required": [ + "address", + "decimals", + "logoUri", + "name", + "symbol", + "type", + "chainId", + "trusted" + ] + }, + "PortfolioErc721Token": { + "type": "object", + "properties": { + "address": { + "type": "string" + }, + "decimals": { + "type": "number" + }, + "logoUri": { + "type": "string" + }, + "name": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "ERC721" + ] + }, + "chainId": { + "type": "string", + "description": "The chain ID" + }, + "trusted": { + "type": "boolean", + "description": "Whether the token is trusted (spam filter)" + } + }, + "required": [ + "address", + "decimals", + "logoUri", + "name", + "symbol", + "type", + "chainId", + "trusted" + ] + }, + "TokenBalance": { + "type": "object", + "properties": { + "tokenInfo": { + "description": "Token information", + "oneOf": [ + { + "$ref": "#/components/schemas/PortfolioNativeToken" + }, + { + "$ref": "#/components/schemas/PortfolioErc20Token" + }, + { + "$ref": "#/components/schemas/PortfolioErc721Token" + } + ] + }, + "balance": { + "type": "string", + "description": "Balance in smallest unit as string integer. Use decimals to convert." + }, + "balanceFiat": { + "type": "string", + "description": "Balance in requested fiat currency. Decimal string without exponent notation or thousand separators.", + "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$", + "example": "4801.653401839" + }, + "price": { + "type": "string", + "description": "Token price in requested fiat currency. Decimal string without exponent notation or thousand separators.", + "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$", + "example": "3890.12" + }, + "priceChangePercentage1d": { + "type": "string", + "description": "Price change as decimal (e.g., \"-0.0431\" for -4.31%). Decimal string without exponent notation.", + "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$", + "example": "-0.0431" + } + }, + "required": [ + "tokenInfo", + "balance" + ] + }, + "AppPosition": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Unique position key" + }, + "type": { + "type": "string", + "description": "Position type (e.g., staked, lending, liquidity)" + }, + "name": { + "type": "string", + "description": "Position name" + }, + "groupId": { + "type": "string", + "description": "Group ID for grouping related positions together" + }, + "tokenInfo": { + "description": "Token information", + "oneOf": [ + { + "$ref": "#/components/schemas/PortfolioNativeToken" + }, + { + "$ref": "#/components/schemas/PortfolioErc20Token" + }, + { + "$ref": "#/components/schemas/PortfolioErc721Token" + } + ] + }, + "receiptTokenAddress": { + "type": "string", + "description": "Receipt token address (pool address) representing this position. This is the contract address for the position token (LP token, staking receipt, etc.), not the underlying token." + }, + "balance": { + "type": "string", + "description": "Balance in smallest unit as string integer. Use decimals to convert." + }, + "balanceFiat": { + "type": "string", + "description": "Balance in requested fiat currency. Decimal string without exponent notation or thousand separators.", + "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$", + "example": "18638914.125656575" + }, + "priceChangePercentage1d": { + "type": "string", + "description": "Price change as decimal (e.g., \"-0.0431\" for -4.31%). Decimal string without exponent notation.", + "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$", + "example": "-0.0431" + } + }, + "required": [ + "key", + "type", + "name", + "tokenInfo", + "balance" + ] + }, + "AppPositionGroup": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Group name (e.g., \"Protocol A Vesting\")" + }, + "items": { + "type": "array", + "description": "Positions in this group", + "items": { + "$ref": "#/components/schemas/AppPosition" + } + } + }, + "required": [ + "name", + "items" + ] + }, + "AppBalanceAppInfo": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Application name" + }, + "logoUrl": { + "type": "string", + "format": "uri", + "description": "Application logo URL (HTTPS)" + }, + "url": { + "type": "string", + "format": "uri", + "description": "Application URL (HTTPS)" + } + }, + "required": [ + "name" + ] + }, + "AppBalance": { + "type": "object", + "properties": { + "appInfo": { + "description": "Application information", + "allOf": [ + { + "$ref": "#/components/schemas/AppBalanceAppInfo" + } + ] + }, + "balanceFiat": { + "type": "string", + "description": "Total balance in fiat currency across all position groups. Decimal string without exponent notation or thousand separators.", + "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$", + "example": "18638914.125656575" + }, + "groups": { + "type": "array", + "description": "Position groups in this app, grouped by position name", + "items": { + "$ref": "#/components/schemas/AppPositionGroup" + } + } + }, + "required": [ + "appInfo", + "balanceFiat", + "groups" + ] + }, + "Portfolio": { + "type": "object", + "properties": { + "totalBalanceFiat": { + "type": "string", + "description": "Total balance in fiat currency across all tokens and positions. Decimal string without exponent notation or thousand separators.", + "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$", + "example": "954181237.094243" + }, + "totalTokenBalanceFiat": { + "type": "string", + "description": "Total balance in fiat currency for all token holdings. Decimal string without exponent notation or thousand separators.", + "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$", + "example": "935542322.9685864" + }, + "totalPositionsBalanceFiat": { + "type": "string", + "description": "Total balance in fiat currency for all app positions. Decimal string without exponent notation or thousand separators.", + "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$", + "example": "18638914.125656575" + }, + "tokenBalances": { + "description": "List of token balances", + "type": "array", + "items": { + "$ref": "#/components/schemas/TokenBalance" + } + }, + "positionBalances": { + "description": "List of app balances", + "type": "array", + "items": { + "$ref": "#/components/schemas/AppBalance" + } + } + }, + "required": [ + "totalBalanceFiat", + "totalTokenBalanceFiat", + "totalPositionsBalanceFiat", + "tokenBalances", + "positionBalances" + ] + }, + "PortfolioSummarySnapshot": { + "type": "object", + "properties": { + "fiatTotal": { + "type": "string", + "description": "Total across every chain of this address in this environment (mainnets or testnets). Decimal string." + }, + "fiatTotalByChain": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Total per chain, keyed by chainId. Adds up to fiatTotal. Decimal strings." + }, + "fiatTotalByType": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Total per Zerion position type (wallet, deposit, loan, staked, locked, reward, ...) across every chain of this address in this environment. Loans are negative. Adds up to fiatTotal. Decimal strings." + }, + "updatedAt": { + "format": "date-time", + "type": "string", + "description": "When the snapshot was fetched from Zerion." + }, + "expiresAt": { + "format": "date-time", + "type": "string", + "description": "Approximately when the cached snapshot expires: the cache adds jitter to its lifetime, and a transaction or a manual refresh can clear it earlier." + } + }, + "required": [ + "fiatTotal", + "fiatTotalByChain", + "fiatTotalByType", + "updatedAt", + "expiresAt" + ] + }, + "PortfolioSummary": { + "type": "object", + "properties": { + "chainId": { + "type": "string" + }, + "address": { + "type": "string" + }, + "fiatTotal": { + "type": "string", + "description": "Value of this Safe on this chain. Decimal string." + }, + "source": { + "type": "string", + "enum": [ + "zerion", + "tx_service" + ], + "description": "zerion: summed from the Zerion snapshot the Assets page reads. tx_service: the chain is not on Zerion, or the snapshot is unavailable." + }, + "snapshot": { + "nullable": true, + "description": "The Zerion snapshot the value was summed from, null for tx_service.", + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/PortfolioSummarySnapshot" + } + ] + } + }, + "required": [ + "chainId", + "address", + "fiatTotal", + "source", + "snapshot" + ] + }, + "GasPriceOracle": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "oracle" + ] + }, + "gasParameter": { + "type": "string" + }, + "gweiFactor": { + "type": "string" + }, + "uri": { + "type": "string" + } + }, + "required": [ + "type", + "gasParameter", + "gweiFactor", + "uri" + ] + }, + "GasPriceFixed": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "fixed" + ] + }, + "weiValue": { + "type": "string" + } + }, + "required": [ + "type", + "weiValue" + ] + }, + "GasPriceFixedEIP1559": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "fixed1559" + ] + }, + "maxFeePerGas": { + "type": "string" + }, + "maxPriorityFeePerGas": { + "type": "string" + } + }, + "required": [ + "type", + "maxFeePerGas", + "maxPriorityFeePerGas" + ] + }, + "NativeCurrency": { + "type": "object", + "properties": { + "decimals": { + "type": "number" + }, + "logoUri": { + "type": "string" + }, + "name": { + "type": "string" + }, + "symbol": { + "type": "string" + } + }, + "required": [ + "decimals", + "logoUri", + "name", + "symbol" + ] + }, + "BlockExplorerUriTemplate": { + "type": "object", + "properties": { + "address": { + "type": "string" + }, + "api": { + "type": "string" + }, + "txHash": { + "type": "string" + } + }, + "required": [ + "address", + "api", + "txHash" + ] + }, + "BalancesProvider": { + "type": "object", + "properties": { + "chainName": { + "type": "string", + "nullable": true + }, + "enabled": { + "type": "boolean" + } + }, + "required": [ + "chainName", + "enabled" + ] + }, + "RpcUri": { + "type": "object", + "properties": { + "authentication": { + "type": "string", + "enum": [ + "API_KEY_PATH", + "NO_AUTHENTICATION", + "UNKNOWN" + ] + }, + "value": { + "type": "string" + } + }, + "required": [ + "authentication", + "value" + ] + }, + "Theme": { + "type": "object", + "properties": { + "backgroundColor": { + "type": "string" + }, + "textColor": { + "type": "string" + } + }, + "required": [ + "backgroundColor", + "textColor" + ] + }, + "Relayer": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "GTF", + "RELAY_FEE", + "DAILY_LIMIT", + "NO_FEE_CAMPAIGN" + ], + "nullable": true + }, + "safeCreationSponsored": { + "type": "boolean" + }, + "safeTransactionSponsored": { + "type": "boolean", + "deprecated": true, + "description": "Use gasPaymentOptions instead." + }, + "enableTenderlySimulationBeforeRelay": { + "type": "boolean" + }, + "gasPaymentOptions": { + "type": "array", + "description": "Who may pay for a relayed transaction on this chain.", + "items": { + "type": "string", + "enum": [ + "FREE_DAILY_LIMIT", + "SUBSCRIPTION", + "PAY_FROM_SAFE", + "NO_FEE_CAMPAIGN" + ] + } + } + }, + "required": [ + "type", + "safeCreationSponsored", + "safeTransactionSponsored", + "enableTenderlySimulationBeforeRelay", + "gasPaymentOptions" + ] + }, + "Chain": { + "type": "object", + "properties": { + "chainId": { + "type": "string" + }, + "chainName": { + "type": "string" + }, + "description": { + "type": "string" + }, + "chainLogoUri": { + "type": "string", + "nullable": true + }, + "l2": { + "type": "boolean" + }, + "isTestnet": { + "type": "boolean" + }, + "zk": { + "type": "boolean" + }, + "nativeCurrency": { + "$ref": "#/components/schemas/NativeCurrency" + }, + "transactionService": { + "type": "string" + }, + "blockExplorerUriTemplate": { + "$ref": "#/components/schemas/BlockExplorerUriTemplate" + }, + "beaconChainExplorerUriTemplate": { + "type": "object" + }, + "disabledWallets": { + "type": "array", + "items": { + "type": "string" + } + }, + "ensRegistryAddress": { + "type": "string", + "nullable": true + }, + "balancesProvider": { + "$ref": "#/components/schemas/BalancesProvider" + }, + "features": { + "type": "array", + "items": { + "type": "string" + } + }, + "gasPrice": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/GasPriceOracle" + }, + { + "$ref": "#/components/schemas/GasPriceFixed" + }, + { + "$ref": "#/components/schemas/GasPriceFixedEIP1559" + } + ] + } + }, + "publicRpcUri": { + "$ref": "#/components/schemas/RpcUri" + }, + "rpcUri": { + "$ref": "#/components/schemas/RpcUri" + }, + "safeAppsRpcUri": { + "$ref": "#/components/schemas/RpcUri" + }, + "shortName": { + "type": "string" + }, + "theme": { + "$ref": "#/components/schemas/Theme" + }, + "recommendedMasterCopyVersion": { + "type": "string", + "nullable": true + }, + "relayer": { + "nullable": true, + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/Relayer" + } + ] + } + }, + "required": [ + "chainId", + "chainName", + "description", + "l2", + "isTestnet", + "zk", + "nativeCurrency", + "transactionService", + "blockExplorerUriTemplate", + "beaconChainExplorerUriTemplate", + "disabledWallets", + "balancesProvider", + "features", + "gasPrice", + "publicRpcUri", + "rpcUri", + "safeAppsRpcUri", + "shortName", + "theme", + "relayer" + ] + }, + "ChainPage": { + "type": "object", + "properties": { + "count": { + "type": "number", + "nullable": true + }, + "next": { + "type": "string", + "nullable": true + }, + "previous": { + "type": "string", + "nullable": true + }, + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Chain" + } + } + }, + "required": [ + "results" + ] + }, + "AboutChain": { + "type": "object", + "properties": { + "transactionServiceBaseUri": { + "type": "string" + }, + "name": { + "type": "string" + }, + "version": { + "type": "string" + }, + "buildNumber": { + "type": "string" + } + }, + "required": [ + "transactionServiceBaseUri", + "name", + "version", + "buildNumber" + ] + }, + "Backbone": { + "type": "object", + "properties": { + "api_version": { + "type": "string" + }, + "headers": { + "type": "string", + "nullable": true + }, + "host": { + "type": "string" + }, + "name": { + "type": "string" + }, + "secure": { + "type": "boolean" + }, + "settings": { + "type": "object", + "nullable": true + }, + "version": { + "type": "string" + } + }, + "required": [ + "api_version", + "host", + "name", + "secure", + "settings", + "version" + ] + }, + "MasterCopy": { + "type": "object", + "properties": { + "address": { + "type": "string" + }, + "version": { + "type": "string" + } + }, + "required": [ + "address", + "version" ] - } - } - }, - "info": { - "title": "Safe Client Gateway", - "description": "", - "version": "main", - "contact": {} - }, - "tags": [], - "servers": [], - "components": { - "schemas": { - "About": { + }, + "IndexingStatus": { "type": "object", "properties": { - "name": { + "currentBlockNumber": { + "type": "number" + }, + "currentBlockTimestamp": { + "format": "date-time", "type": "string" }, - "version": { - "type": "string", - "nullable": true + "erc20BlockNumber": { + "type": "number" }, - "buildNumber": { - "type": "string", - "nullable": true + "erc20BlockTimestamp": { + "format": "date-time", + "type": "string" + }, + "erc20Synced": { + "type": "boolean" + }, + "masterCopiesBlockNumber": { + "type": "number" + }, + "masterCopiesBlockTimestamp": { + "format": "date-time", + "type": "string" + }, + "masterCopiesSynced": { + "type": "boolean" + }, + "synced": { + "type": "boolean" + }, + "lastSync": { + "type": "number" } }, "required": [ - "name" + "currentBlockNumber", + "currentBlockTimestamp", + "erc20BlockNumber", + "erc20BlockTimestamp", + "erc20Synced", + "masterCopiesBlockNumber", + "masterCopiesBlockTimestamp", + "masterCopiesSynced", + "synced", + "lastSync" ] }, - "UserSession": { + "GasPriceResult": { "type": "object", "properties": { - "id": { - "type": "string" + "LastBlock": { + "type": "string", + "description": "Last block number", + "example": "23467872" }, - "authMethod": { + "SafeGasPrice": { "type": "string", - "enum": [ - "siwe", - "oidc" - ] + "description": "Safe gas price recommendation (Gwei)", + "example": "0.496839934" }, - "signerAddress": { + "ProposeGasPrice": { "type": "string", - "description": "Wallet signer address. Present only for SIWE-authenticated users." + "description": "Proposed gas price (Gwei)", + "example": "0.496840168" }, - "email": { + "FastGasPrice": { "type": "string", - "description": "Verified email address. Present only for OIDC-authenticated users when stored." + "description": "Fast gas price recommendation (Gwei)", + "example": "0.55411917" + }, + "suggestBaseFee": { + "type": "string", + "description": "Base fee of the next pending block (Gwei)", + "example": "0.496839934" + }, + "gasUsedRatio": { + "type": "string", + "description": "Gas used ratio to estimate network congestion", + "example": "0.5,0.6,0.7" } }, "required": [ - "id", - "authMethod" + "LastBlock", + "SafeGasPrice", + "ProposeGasPrice", + "FastGasPrice", + "suggestBaseFee", + "gasUsedRatio" ] }, - "AuthNonce": { + "GasPriceResponse": { "type": "object", "properties": { - "nonce": { - "type": "string" + "status": { + "type": "string", + "description": "Status code (\"1\" = success)", + "example": "1" + }, + "message": { + "type": "string", + "description": "Response message", + "example": "OK" + }, + "result": { + "description": "Gas price data", + "allOf": [ + { + "$ref": "#/components/schemas/GasPriceResult" + } + ] } }, "required": [ - "nonce" + "status", + "message", + "result" ] }, - "SiweDto": { + "Collectible": { "type": "object", "properties": { - "message": { + "address": { "type": "string" }, - "signature": { + "tokenName": { + "type": "string" + }, + "tokenSymbol": { + "type": "string" + }, + "logoUri": { + "type": "string" + }, + "id": { "type": "string" + }, + "uri": { + "type": "string", + "nullable": true + }, + "name": { + "type": "string", + "nullable": true + }, + "description": { + "type": "string", + "nullable": true + }, + "imageUri": { + "type": "string", + "nullable": true + }, + "metadata": { + "type": "object", + "nullable": true } }, "required": [ - "message", - "signature" + "address", + "tokenName", + "tokenSymbol", + "logoUri", + "id" ] }, - "LogoutDto": { + "CollectiblePage": { "type": "object", "properties": { - "redirect_url": { + "count": { + "type": "number", + "nullable": true + }, + "next": { "type": "string", - "description": "Post-logout redirect URL (must be same-origin as pre-configured URL)" + "nullable": true + }, + "previous": { + "type": "string", + "nullable": true + }, + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Collectible" + } } - } + }, + "required": [ + "results" + ] }, - "Authenticator": { + "ActivityMetadata": { "type": "object", "properties": { - "id": { + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "maxPoints": { + "type": "number" + } + }, + "required": [ + "name", + "description", + "maxPoints" + ] + }, + "Campaign": { + "type": "object", + "properties": { + "resourceId": { + "type": "string" + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "startDate": { + "type": "string" + }, + "endDate": { + "type": "string" + }, + "lastUpdated": { + "type": "string", + "nullable": true + }, + "activitiesMetadata": { + "nullable": true, + "type": "array", + "items": { + "$ref": "#/components/schemas/ActivityMetadata" + } + }, + "rewardValue": { "type": "string", - "description": "Auth0 authentication method identifier (e.g. totp|...)" + "nullable": true }, - "type": { + "rewardText": { "type": "string", - "description": "Authentication method type (e.g. totp)" + "nullable": true }, - "name": { + "iconUrl": { "type": "string", - "description": "User-visible authenticator name" + "nullable": true }, - "createdAt": { + "safeAppUrl": { "type": "string", - "description": "ISO 8601 timestamp of when the method was enrolled" + "nullable": true + }, + "partnerUrl": { + "type": "string", + "nullable": true + }, + "isPromoted": { + "type": "boolean" } }, "required": [ - "id", - "type" + "resourceId", + "name", + "description", + "startDate", + "endDate", + "isPromoted" ] }, - "NativeToken": { + "CampaignPage": { "type": "object", "properties": { - "address": { - "type": "string" - }, - "decimals": { - "type": "number" - }, - "logoUri": { - "type": "string" - }, - "name": { - "type": "string" + "count": { + "type": "number", + "nullable": true }, - "symbol": { - "type": "string" + "next": { + "type": "string", + "nullable": true }, - "type": { + "previous": { "type": "string", - "enum": [ - "NATIVE_TOKEN" - ] + "nullable": true + }, + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Campaign" + } } }, "required": [ - "address", - "decimals", - "logoUri", - "name", - "symbol", - "type" + "results" ] }, - "Erc20Token": { + "CampaignRank": { "type": "object", "properties": { - "address": { + "holder": { "type": "string" }, - "decimals": { + "position": { "type": "number" }, - "logoUri": { - "type": "string" - }, - "name": { - "type": "string" + "boost": { + "type": "number" }, - "symbol": { - "type": "string" + "totalPoints": { + "type": "number" }, - "type": { - "type": "string", - "enum": [ - "ERC20" - ] + "totalBoostedPoints": { + "type": "number" } }, "required": [ - "address", - "decimals", - "logoUri", - "name", - "symbol", - "type" + "holder", + "position", + "boost", + "totalPoints", + "totalBoostedPoints" ] }, - "Erc721Token": { + "CampaignRankPage": { "type": "object", "properties": { - "address": { - "type": "string" - }, - "decimals": { - "type": "number" - }, - "logoUri": { - "type": "string" - }, - "name": { - "type": "string" + "count": { + "type": "number", + "nullable": true }, - "symbol": { - "type": "string" + "next": { + "type": "string", + "nullable": true }, - "type": { + "previous": { "type": "string", - "enum": [ - "ERC721" - ] + "nullable": true + }, + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CampaignRank" + } } }, "required": [ - "address", - "decimals", - "logoUri", - "name", - "symbol", - "type" + "results" ] }, - "Balance": { + "EligibilityRequest": { "type": "object", "properties": { - "balance": { - "type": "string" - }, - "fiatBalance": { + "requestId": { "type": "string" }, - "fiatConversion": { + "sealedData": { "type": "string" - }, - "tokenInfo": { - "oneOf": [ - { - "$ref": "#/components/schemas/NativeToken" - }, - { - "$ref": "#/components/schemas/Erc20Token" - }, - { - "$ref": "#/components/schemas/Erc721Token" - } - ] - }, - "fiatBalance24hChange": { - "type": "string", - "nullable": true } }, "required": [ - "balance", - "fiatBalance", - "fiatConversion", - "tokenInfo" + "requestId", + "sealedData" ] }, - "Balances": { + "Eligibility": { "type": "object", "properties": { - "fiatTotal": { + "requestId": { "type": "string" }, - "items": { - "type": "array", - "items": { - "oneOf": [ - { - "$ref": "#/components/schemas/Balance" - } - ] - } + "isAllowed": { + "type": "boolean" + }, + "isVpn": { + "type": "boolean" } }, "required": [ - "fiatTotal", - "items" + "requestId", + "isAllowed", + "isVpn" ] }, - "SubscriptionPlan": { + "LockingRank": { "type": "object", "properties": { - "id": { + "holder": { "type": "string" }, - "name": { - "type": "string", - "nullable": true - }, - "description": { - "type": "string", - "nullable": true - }, - "currentPrice": { + "position": { "type": "number" }, - "originalPrice": { - "type": "number", - "nullable": true - }, - "paymentMethod": { - "type": "string", - "enum": [ - "fiat" - ] - }, - "currency": { - "type": "string", - "enum": [ - "usd", - "eur" - ] + "lockedAmount": { + "type": "string" }, - "features": { - "type": "array", - "items": { - "type": "string" - } + "unlockedAmount": { + "type": "string" }, - "billingCycle": { - "type": "string", - "enum": [ - "month", - "year" - ], + "withdrawnAmount": { + "type": "string" + } + }, + "required": [ + "holder", + "position", + "lockedAmount", + "unlockedAmount", + "withdrawnAmount" + ] + }, + "LockingRankPage": { + "type": "object", + "properties": { + "count": { + "type": "number", "nullable": true }, - "type": { + "next": { "type": "string", - "enum": [ - "standard", - "premium", - "enterprise" - ] + "nullable": true }, - "product": { + "previous": { "type": "string", "nullable": true + }, + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/LockingRank" + } } }, "required": [ - "id", - "currentPrice", - "originalPrice", - "paymentMethod", - "currency", - "features", - "type", - "product" + "results" ] }, - "Subscription": { + "LockEventItem": { "type": "object", "properties": { - "id": { + "eventType": { + "type": "string", + "enum": [ + "LOCKED" + ] + }, + "executionDate": { "type": "string" }, - "customerId": { + "transactionHash": { "type": "string" }, - "upstreamCustomerId": { + "holder": { "type": "string" }, - "plan": { - "$ref": "#/components/schemas/SubscriptionPlan" + "amount": { + "type": "string" }, - "status": { + "logIndex": { + "type": "string" + } + }, + "required": [ + "eventType", + "executionDate", + "transactionHash", + "holder", + "amount", + "logIndex" + ] + }, + "UnlockEventItem": { + "type": "object", + "properties": { + "eventType": { "type": "string", "enum": [ - "active", - "canceled", - "incomplete", - "incomplete_expired", - "past_due", - "paused", - "trialing", - "unpaid" + "UNLOCKED" ] }, - "createdAt": { - "type": "number" - }, - "startAt": { - "type": "number" + "executionDate": { + "type": "string" }, - "cancelledAt": { - "type": "number", - "nullable": true + "transactionHash": { + "type": "string" }, - "cancelAt": { - "type": "number", - "nullable": true + "holder": { + "type": "string" }, - "currentPeriodStart": { - "type": "number", - "nullable": true + "amount": { + "type": "string" }, - "currentPeriodEnd": { - "type": "number", - "nullable": true + "logIndex": { + "type": "string" }, - "metadata": { - "type": "object", - "nullable": true - } - }, - "required": [ - "id", - "customerId", - "upstreamCustomerId", - "plan", - "status", - "createdAt", - "startAt", - "cancelledAt", - "cancelAt" - ] - }, - "MarketingFeature": { - "type": "object", - "properties": { - "name": { + "unlockIndex": { "type": "string" } }, "required": [ - "name" + "eventType", + "executionDate", + "transactionHash", + "holder", + "amount", + "logIndex", + "unlockIndex" ] }, - "Product": { + "WithdrawEventItem": { "type": "object", "properties": { - "id": { + "eventType": { + "type": "string", + "enum": [ + "WITHDRAWN" + ] + }, + "executionDate": { "type": "string" }, - "active": { - "type": "boolean" + "transactionHash": { + "type": "string" }, - "description": { + "holder": { "type": "string" }, - "marketingFeatures": { - "type": "array", - "items": { - "$ref": "#/components/schemas/MarketingFeature" - } + "amount": { + "type": "string" }, - "metadata": { - "type": "object" + "logIndex": { + "type": "string" }, - "name": { + "unlockIndex": { "type": "string" } }, "required": [ - "id", - "active", - "description", - "marketingFeatures", - "metadata", - "name" + "eventType", + "executionDate", + "transactionHash", + "holder", + "amount", + "logIndex", + "unlockIndex" ] }, - "Plan": { + "LockingEventPage": { "type": "object", "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string", - "nullable": true - }, - "description": { - "type": "string", - "nullable": true - }, - "currentPrice": { - "type": "number" - }, - "originalPrice": { + "count": { "type": "number", "nullable": true }, - "paymentMethod": { + "next": { "type": "string", - "enum": [ - "fiat" - ] + "nullable": true }, - "currency": { + "previous": { "type": "string", - "enum": [ - "usd", - "eur" - ] + "nullable": true }, - "features": { + "results": { "type": "array", "items": { - "type": "string" + "oneOf": [ + { + "$ref": "#/components/schemas/LockEventItem" + }, + { + "$ref": "#/components/schemas/UnlockEventItem" + }, + { + "$ref": "#/components/schemas/WithdrawEventItem" + } + ] } - }, - "billingCycle": { - "type": "string", - "enum": [ - "month", - "year" - ], - "nullable": true - }, - "type": { - "type": "string", - "enum": [ - "standard", - "premium", - "enterprise" - ] - }, - "product": { - "$ref": "#/components/schemas/Product" } }, "required": [ - "id", - "currentPrice", - "originalPrice", - "paymentMethod", - "currency", - "features", - "type", - "product" + "results" ] }, - "UrlResponse": { + "Contract": { "type": "object", "properties": { - "url": { + "address": { "type": "string" + }, + "name": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "logoUri": { + "type": "string" + }, + "contractAbi": { + "type": "object", + "nullable": true + }, + "trustedForDelegateCall": { + "type": "boolean" } }, "required": [ - "url" + "address", + "name", + "displayName", + "logoUri", + "trustedForDelegateCall" ] }, - "PaymentLink": { + "TransactionDataDto": { "type": "object", "properties": { - "id": { - "type": "string" - }, - "url": { - "type": "string" - }, - "active": { - "type": "boolean" - }, - "metadata": { - "type": "object" - }, - "customText": { - "type": "object" - }, - "afterCompletion": { - "type": "object" + "data": { + "type": "string", + "description": "Hexadecimal value" }, - "lineItems": { - "type": "array", - "items": { - "type": "object" - } + "to": { + "type": "string", + "description": "The target Ethereum address" } }, "required": [ - "id", - "url", - "active", - "metadata" + "data" ] }, - "CheckoutSessionResult": { + "Operation": { + "type": "number", + "enum": [ + 0, + 1 + ], + "description": "Operation type: 0 for CALL, 1 for DELEGATE" + }, + "BaseDataDecoded": { "type": "object", "properties": { - "sessionId": { + "method": { "type": "string" }, - "url": { - "type": "string" + "parameters": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DataDecodedParameter" + } } }, "required": [ - "sessionId", - "url" + "method" ] }, - "CheckoutSession": { + "MultiSend": { "type": "object", "properties": { - "id": { - "type": "string" - }, - "object": { - "type": "string" - }, - "amountSubtotal": { - "type": "number" - }, - "amountTotal": { - "type": "number" - }, - "cancelUrl": { - "type": "string" - }, - "clientReferenceId": { - "type": "object", - "nullable": true - }, - "created": { - "type": "number" - }, - "currency": { - "type": "string" - }, - "customer": { - "type": "object", - "nullable": true - }, - "expiresAt": { - "type": "number" - }, - "metadata": { - "type": "object" - }, - "mode": { - "type": "string" + "operation": { + "description": "Operation type: 0 for CALL, 1 for DELEGATE", + "allOf": [ + { + "$ref": "#/components/schemas/Operation" + } + ] }, - "paymentStatus": { + "value": { "type": "string" }, - "status": { - "type": "string" + "dataDecoded": { + "$ref": "#/components/schemas/BaseDataDecoded" }, - "successUrl": { + "to": { "type": "string" }, - "url": { - "type": "object", - "nullable": true - }, - "subscription": { - "type": "object", - "nullable": true - }, - "invoice": { - "type": "object", - "nullable": true + "data": { + "type": "string", + "nullable": true, + "description": "Hexadecimal encoded data", + "pattern": "^0x[0-9a-fA-F]*$" } }, "required": [ - "id", - "object", - "amountSubtotal", - "amountTotal", - "cancelUrl", - "created", - "currency", - "expiresAt", - "metadata", - "mode", - "paymentStatus", - "status", - "successUrl" + "operation", + "value", + "to", + "data" ] }, - "Position": { + "DataDecodedParameter": { "type": "object", "properties": { - "balance": { + "name": { "type": "string" }, - "fiatBalance": { + "type": { "type": "string" }, - "fiatConversion": { - "type": "string" + "value": { + "description": "Parameter value - typically a string, but may be an array of strings for array types (e.g., address[], uint256[])", + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] }, - "tokenInfo": { + "valueDecoded": { "oneOf": [ { - "$ref": "#/components/schemas/NativeToken" + "$ref": "#/components/schemas/BaseDataDecoded" }, { - "$ref": "#/components/schemas/Erc20Token" + "type": "array", + "items": { + "$ref": "#/components/schemas/MultiSend" + } }, { - "$ref": "#/components/schemas/Erc721Token" + "type": "null" } ] - }, - "fiatBalance24hChange": { - "type": "string", - "nullable": true - }, - "position_type": { - "type": "string", - "enum": [ - "deposit", - "loan", - "locked", - "staked", - "reward", - "wallet", - "airdrop", - "margin", - "unknown" - ], - "nullable": true } }, "required": [ - "balance", - "fiatBalance", - "fiatConversion", - "tokenInfo", - "fiatBalance24hChange", - "position_type" + "name", + "type", + "value" ] }, - "PositionGroup": { + "DataDecoded": { "type": "object", "properties": { - "name": { + "method": { "type": "string" }, - "items": { + "parameters": { + "nullable": true, "type": "array", "items": { - "oneOf": [ - { - "$ref": "#/components/schemas/Position" - } - ] + "$ref": "#/components/schemas/DataDecodedParameter" } - } - }, - "required": [ - "name", - "items" - ] - }, - "ProtocolIcon": { - "type": "object", - "properties": { - "url": { + }, + "accuracy": { "type": "string", - "nullable": true + "enum": [ + "FULL_MATCH", + "PARTIAL_MATCH", + "ONLY_FUNCTION_MATCH", + "NO_MATCH", + "UNKNOWN" + ], + "default": "UNKNOWN" } }, "required": [ - "url" + "method" ] }, - "ProtocolMetadata": { + "AddRecoveryModuleDto": { "type": "object", "properties": { - "name": { + "moduleAddress": { "type": "string" - }, - "icon": { - "$ref": "#/components/schemas/ProtocolIcon" } }, "required": [ - "name", - "icon" + "moduleAddress" ] }, - "Protocol": { + "GetEstimationDto": { "type": "object", "properties": { - "protocol": { + "to": { "type": "string" }, - "protocol_metadata": { - "$ref": "#/components/schemas/ProtocolMetadata" - }, - "fiatTotal": { + "value": { "type": "string" }, - "items": { - "type": "array", - "items": { - "oneOf": [ - { - "$ref": "#/components/schemas/PositionGroup" - } - ] - } + "data": { + "type": "string", + "nullable": true + }, + "operation": { + "description": "Operation type: 0 for CALL, 1 for DELEGATE", + "allOf": [ + { + "$ref": "#/components/schemas/Operation" + } + ] } }, "required": [ - "protocol", - "protocol_metadata", - "fiatTotal", - "items" + "to", + "value", + "operation" ] }, - "PortfolioNativeToken": { + "EstimationResponse": { "type": "object", "properties": { - "address": { - "type": "string" - }, - "decimals": { + "currentNonce": { "type": "number" }, - "logoUri": { - "type": "string" - }, - "name": { - "type": "string" + "recommendedNonce": { + "type": "number" }, - "symbol": { + "safeTxGas": { "type": "string" - }, - "type": { - "type": "string", - "enum": [ - "NATIVE_TOKEN" - ] - }, - "chainId": { - "type": "string", - "description": "The chain ID" - }, - "trusted": { - "type": "boolean", - "description": "Whether the token is trusted (spam filter)" } }, "required": [ - "address", - "decimals", - "logoUri", - "name", - "symbol", - "type", - "chainId", - "trusted" + "currentNonce", + "recommendedNonce", + "safeTxGas" ] }, - "PortfolioErc20Token": { + "GasToken": { "type": "object", "properties": { "address": { - "type": "string" - }, - "decimals": { - "type": "number" - }, - "logoUri": { - "type": "string" - }, - "name": { - "type": "string" - }, - "symbol": { - "type": "string" - }, - "type": { "type": "string", - "enum": [ - "ERC20" - ] + "description": "Gas token contract address", + "example": "0x0000000000000000000000000000000000000000" }, - "chainId": { + "symbol": { "type": "string", - "description": "The chain ID" - }, - "trusted": { - "type": "boolean", - "description": "Whether the token is trusted (spam filter)" + "description": "The token's ticker symbol", + "example": "USDC" } }, "required": [ "address", - "decimals", - "logoUri", - "name", - "symbol", - "type", - "chainId", - "trusted" + "symbol" ] }, - "PortfolioErc721Token": { + "GasTokenPage": { "type": "object", "properties": { - "address": { - "type": "string" - }, - "decimals": { - "type": "number" - }, - "logoUri": { - "type": "string" - }, - "name": { - "type": "string" - }, - "symbol": { - "type": "string" + "count": { + "type": "number", + "nullable": true }, - "type": { + "next": { "type": "string", - "enum": [ - "ERC721" - ] + "nullable": true }, - "chainId": { + "previous": { "type": "string", - "description": "The chain ID" + "nullable": true }, - "trusted": { - "type": "boolean", - "description": "Whether the token is trusted (spam filter)" + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/GasToken" + } } }, "required": [ - "address", - "decimals", - "logoUri", - "name", - "symbol", - "type", - "chainId", - "trusted" + "results" ] }, - "TokenBalance": { + "Origin": { + "type": "string", + "enum": [ + "SAFE_APP", + "WALLET_CONNECT", + "TX_BUILDER", + "NATIVE" + ], + "description": "Transaction origin. Defaults to NATIVE when omitted." + }, + "FeePreviewTransactionDto": { "type": "object", "properties": { - "tokenInfo": { - "description": "Token information", - "oneOf": [ - { - "$ref": "#/components/schemas/PortfolioNativeToken" - }, - { - "$ref": "#/components/schemas/PortfolioErc20Token" - }, + "to": { + "type": "string" + }, + "value": { + "type": "string" + }, + "data": { + "type": "string" + }, + "operation": { + "description": "Operation type: 0 for CALL, 1 for DELEGATE", + "allOf": [ { - "$ref": "#/components/schemas/PortfolioErc721Token" + "$ref": "#/components/schemas/Operation" } ] }, - "balance": { + "gasToken": { "type": "string", - "description": "Balance in smallest unit as string integer. Use decimals to convert." + "description": "Gas token address (0x0...0 for native token)", + "example": "0x0000000000000000000000000000000000000000" }, - "balanceFiat": { - "type": "string", - "description": "Balance in requested fiat currency. Decimal string without exponent notation or thousand separators.", - "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$", - "example": "4801.653401839" + "numberSignatures": { + "type": "number", + "description": "Number of signatures required for execution", + "example": 2, + "minimum": 1 }, - "price": { + "nonce": { "type": "string", - "description": "Token price in requested fiat currency. Decimal string without exponent notation or thousand separators.", - "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$", - "example": "3890.12" + "description": "Safe nonce the transaction will use (uint256 string)", + "example": "42" }, - "priceChangePercentage1d": { + "origin": { + "description": "Transaction origin. Defaults to NATIVE when omitted.", + "allOf": [ + { + "$ref": "#/components/schemas/Origin" + } + ] + }, + "fiatCode": { "type": "string", - "description": "Price change as decimal (e.g., \"-0.0431\" for -4.31%). Decimal string without exponent notation.", - "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$", - "example": "-0.0431" + "description": "Fiat currency code for relay cost conversion (e.g. EUR, GBP). Defaults to USD.", + "example": "EUR" } }, "required": [ - "tokenInfo", - "balance" + "to", + "value", + "data", + "operation", + "gasToken", + "numberSignatures", + "nonce" ] }, - "AppPosition": { + "FeePreviewTxData": { "type": "object", "properties": { - "key": { + "chainId": { "type": "string", - "description": "Unique position key" + "description": "Chain ID", + "example": "1" }, - "type": { + "safeAddress": { "type": "string", - "description": "Position type (e.g., staked, lending, liquidity)" + "description": "Safe address", + "example": "0x..." }, - "name": { + "safeTxGas": { "type": "string", - "description": "Position name" + "description": "Safe transaction gas", + "example": "150000" }, - "groupId": { + "baseGas": { "type": "string", - "description": "Group ID for grouping related positions together" - }, - "tokenInfo": { - "description": "Token information", - "oneOf": [ - { - "$ref": "#/components/schemas/PortfolioNativeToken" - }, - { - "$ref": "#/components/schemas/PortfolioErc20Token" - }, - { - "$ref": "#/components/schemas/PortfolioErc721Token" - } - ] + "description": "Base gas for relay overhead", + "example": "48564" }, - "receiptTokenAddress": { + "gasPrice": { "type": "string", - "description": "Receipt token address (pool address) representing this position. This is the contract address for the position token (LP token, staking receipt, etc.), not the underlying token." + "description": "Gas price per gas unit. Denominated in wei when `gasToken` is the native token (zero address), or in the ERC20 gas token atomic units per gas otherwise", + "example": "195000000000000" }, - "balance": { + "gasToken": { "type": "string", - "description": "Balance in smallest unit as string integer. Use decimals to convert." + "description": "Gas token address", + "example": "0x0000000000000000000000000000000000000000" }, - "balanceFiat": { + "refundReceiver": { "type": "string", - "description": "Balance in requested fiat currency. Decimal string without exponent notation or thousand separators.", - "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$", - "example": "18638914.125656575" + "description": "Refund receiver address", + "example": "0x0000000000000000000000000000000000000000" }, - "priceChangePercentage1d": { - "type": "string", - "description": "Price change as decimal (e.g., \"-0.0431\" for -4.31%). Decimal string without exponent notation.", - "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$", - "example": "-0.0431" + "numberSignatures": { + "type": "number", + "description": "Number of signatures", + "example": 2 } }, "required": [ - "key", - "type", - "name", - "tokenInfo", - "balance" + "chainId", + "safeAddress", + "safeTxGas", + "baseGas", + "gasPrice", + "gasToken", + "refundReceiver", + "numberSignatures" ] }, - "AppPositionGroup": { + "FeePreviewRelayCost": { "type": "object", "properties": { - "name": { + "fiatCode": { "type": "string", - "description": "Group name (e.g., \"Protocol A Vesting\")" + "description": "Fiat currency code", + "example": "USD" }, - "items": { - "type": "array", - "description": "Positions in this group", - "items": { - "$ref": "#/components/schemas/AppPosition" - } + "fiatValue": { + "type": "string", + "description": "Relay cost as a string", + "example": "0.0025" } }, "required": [ - "name", - "items" + "fiatCode", + "fiatValue" ] }, - "AppBalanceAppInfo": { + "FeePreviewValuationDetail": { "type": "object", "properties": { - "name": { + "tokenAddress": { "type": "string", - "description": "Application name" + "description": "Token contract address (absent for native transfers)" }, - "logoUrl": { + "symbol": { "type": "string", - "format": "uri", - "description": "Application logo URL (HTTPS)" + "description": "Token symbol", + "example": "USDC" }, - "url": { + "amount": { "type": "string", - "format": "uri", - "description": "Application URL (HTTPS)" + "description": "Token amount", + "example": "1000" + }, + "priceUsd": { + "type": "number", + "description": "Token price in USD" + }, + "valueUsd": { + "type": "number", + "description": "Token value in USD" } }, "required": [ - "name" + "symbol", + "amount" ] }, - "AppBalance": { + "FeePreviewFeeBreakdown": { "type": "object", "properties": { - "appInfo": { - "description": "Application information", + "txValueUsd": { + "type": "number", + "description": "Transaction value in USD", + "example": 1000 + }, + "trailingVolumeUsd": { + "type": "number", + "description": "Trailing volume in USD that fed tier selection", + "example": 0 + }, + "tierBps": { + "type": "number", + "description": "Tier fee in basis points", + "example": 5 + }, + "gtfFeeUsd": { + "type": "number", + "description": "GTF fee in USD", + "example": 0.5 + }, + "relayCostUsd": { + "type": "number", + "description": "Relay cost in USD", + "example": 38.22 + }, + "totalUsd": { + "type": "number", + "description": "Total fee in USD", + "example": 38.72 + }, + "numberSignatures": { + "type": "number", + "description": "Number of signatures", + "example": 2 + }, + "valuationDetails": { + "type": "array", + "items": { + "$ref": "#/components/schemas/FeePreviewValuationDetail" + } + } + }, + "required": [ + "txValueUsd", + "trailingVolumeUsd", + "tierBps", + "gtfFeeUsd", + "relayCostUsd", + "totalUsd", + "numberSignatures", + "valuationDetails" + ] + }, + "FeePreviewResponse": { + "type": "object", + "properties": { + "txData": { + "$ref": "#/components/schemas/FeePreviewTxData" + }, + "relayCost": { + "description": "Relay cost. Present when the relay fee flow applies.", "allOf": [ { - "$ref": "#/components/schemas/AppBalanceAppInfo" + "$ref": "#/components/schemas/FeePreviewRelayCost" } ] }, - "balanceFiat": { - "type": "string", - "description": "Total balance in fiat currency across all position groups. Decimal string without exponent notation or thousand separators.", - "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$", - "example": "18638914.125656575" + "feeBreakdown": { + "description": "GTF fee breakdown, as returned by the fee-engine service. Present when the GTF fee flow applies.", + "allOf": [ + { + "$ref": "#/components/schemas/FeePreviewFeeBreakdown" + } + ] }, - "groups": { - "type": "array", - "description": "Position groups in this app, grouped by position name", - "items": { - "$ref": "#/components/schemas/AppPositionGroup" - } + "maxFeeCapUsd": { + "type": "number", + "description": "Maximum fee cap in USD (buffered max fee). Present when the GTF fee flow applies." } }, "required": [ - "appInfo", - "balanceFiat", - "groups" + "txData" ] }, - "Portfolio": { + "TypedDataParameter": { "type": "object", "properties": { - "totalBalanceFiat": { - "type": "string", - "description": "Total balance in fiat currency across all tokens and positions. Decimal string without exponent notation or thousand separators.", - "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$", - "example": "954181237.094243" + "name": { + "type": "string" }, - "totalTokenBalanceFiat": { - "type": "string", - "description": "Total balance in fiat currency for all token holdings. Decimal string without exponent notation or thousand separators.", - "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$", - "example": "935542322.9685864" + "type": { + "type": "string" + } + }, + "required": [ + "name", + "type" + ] + }, + "TypedDataDomain": { + "type": "object", + "properties": { + "chainId": { + "type": "number" }, - "totalPositionsBalanceFiat": { - "type": "string", - "description": "Total balance in fiat currency for all app positions. Decimal string without exponent notation or thousand separators.", - "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$", - "example": "18638914.125656575" + "name": { + "type": "string" }, - "tokenBalances": { - "description": "List of token balances", - "type": "array", - "items": { - "$ref": "#/components/schemas/TokenBalance" - } + "salt": { + "type": "string" }, - "positionBalances": { - "description": "List of app balances", - "type": "array", - "items": { - "$ref": "#/components/schemas/AppBalance" - } + "verifyingContract": { + "type": "string" + }, + "version": { + "type": "string" + }, + "safe": { + "type": "string" } - }, - "required": [ - "totalBalanceFiat", - "totalTokenBalanceFiat", - "totalPositionsBalanceFiat", - "tokenBalances", - "positionBalances" - ] + } }, - "GasPriceOracle": { + "TypedData": { "type": "object", "properties": { - "type": { - "type": "string", - "enum": [ - "oracle" - ] + "domain": { + "$ref": "#/components/schemas/TypedDataDomain" }, - "gasParameter": { + "primaryType": { "type": "string" }, - "gweiFactor": { - "type": "string" + "types": { + "type": "object", + "additionalProperties": { + "items": { + "$ref": "#/components/schemas/TypedDataParameter" + }, + "type": "array" + } }, - "uri": { - "type": "string" + "message": { + "type": "object", + "additionalProperties": true } }, "required": [ - "type", - "gasParameter", - "gweiFactor", - "uri" + "domain", + "primaryType", + "types", + "message" ] }, - "GasPriceFixed": { + "AddressInfo": { "type": "object", "properties": { - "type": { + "value": { + "type": "string" + }, + "name": { "type": "string", - "enum": [ - "fixed" - ] + "nullable": true }, - "weiValue": { - "type": "string" + "logoUri": { + "type": "string", + "nullable": true } }, "required": [ - "type", - "weiValue" + "value" ] }, - "GasPriceFixedEIP1559": { + "MessageConfirmation": { "type": "object", "properties": { - "type": { - "type": "string", - "enum": [ - "fixed1559" - ] - }, - "maxFeePerGas": { - "type": "string" + "owner": { + "$ref": "#/components/schemas/AddressInfo" }, - "maxPriorityFeePerGas": { + "signature": { "type": "string" } }, "required": [ - "type", - "maxFeePerGas", - "maxPriorityFeePerGas" + "owner", + "signature" ] }, - "NativeCurrency": { + "SafeAppInfo": { "type": "object", "properties": { - "decimals": { + "id": { "type": "number" }, - "logoUri": { - "type": "string" - }, "name": { "type": "string" }, - "symbol": { + "url": { "type": "string" + }, + "logoUri": { + "type": "string", + "nullable": true } }, "required": [ - "decimals", - "logoUri", + "id", "name", - "symbol" + "url" ] }, - "BlockExplorerUriTemplate": { + "Message": { "type": "object", "properties": { - "address": { + "messageHash": { "type": "string" }, - "api": { - "type": "string" + "status": { + "type": "string", + "enum": [ + "NEEDS_CONFIRMATION", + "CONFIRMED" + ] }, - "txHash": { - "type": "string" + "logoUri": { + "type": "string", + "nullable": true, + "deprecated": true + }, + "name": { + "type": "string", + "nullable": true, + "deprecated": true + }, + "message": { + "oneOf": [ + { + "type": "string" + }, + { + "$ref": "#/components/schemas/TypedData" + } + ] + }, + "creationTimestamp": { + "type": "number" + }, + "modifiedTimestamp": { + "type": "number" + }, + "confirmationsSubmitted": { + "type": "number" + }, + "confirmationsRequired": { + "type": "number" + }, + "proposedBy": { + "nullable": true, + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/AddressInfo" + } + ] + }, + "confirmations": { + "type": "array", + "items": { + "$ref": "#/components/schemas/MessageConfirmation" + } + }, + "preparedSignature": { + "type": "string", + "nullable": true + }, + "origin": { + "type": "string", + "nullable": true + }, + "safeAppInfo": { + "nullable": true, + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/SafeAppInfo" + } + ] + }, + "safeAppId": { + "type": "number", + "nullable": true, + "deprecated": true } }, "required": [ - "address", - "api", - "txHash" + "messageHash", + "status", + "logoUri", + "name", + "message", + "creationTimestamp", + "modifiedTimestamp", + "confirmationsSubmitted", + "confirmationsRequired", + "proposedBy", + "confirmations", + "preparedSignature", + "origin", + "safeAppInfo", + "safeAppId" ] }, - "BalancesProvider": { + "MessageItem": { "type": "object", "properties": { - "chainName": { + "messageHash": { + "type": "string" + }, + "status": { + "type": "string", + "enum": [ + "NEEDS_CONFIRMATION", + "CONFIRMED" + ] + }, + "logoUri": { + "type": "string", + "nullable": true, + "deprecated": true + }, + "name": { + "type": "string", + "nullable": true, + "deprecated": true + }, + "message": { + "oneOf": [ + { + "type": "string" + }, + { + "$ref": "#/components/schemas/TypedData" + } + ] + }, + "creationTimestamp": { + "type": "number" + }, + "modifiedTimestamp": { + "type": "number" + }, + "confirmationsSubmitted": { + "type": "number" + }, + "confirmationsRequired": { + "type": "number" + }, + "proposedBy": { + "nullable": true, + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/AddressInfo" + } + ] + }, + "confirmations": { + "type": "array", + "items": { + "$ref": "#/components/schemas/MessageConfirmation" + } + }, + "preparedSignature": { "type": "string", "nullable": true }, - "enabled": { - "type": "boolean" - } - }, - "required": [ - "chainName", - "enabled" - ] - }, - "RpcUri": { - "type": "object", - "properties": { - "authentication": { + "origin": { "type": "string", - "enum": [ - "API_KEY_PATH", - "NO_AUTHENTICATION", - "UNKNOWN" + "nullable": true + }, + "safeAppInfo": { + "nullable": true, + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/SafeAppInfo" + } ] }, - "value": { - "type": "string" - } - }, - "required": [ - "authentication", - "value" - ] - }, - "Theme": { - "type": "object", - "properties": { - "backgroundColor": { - "type": "string" + "safeAppId": { + "type": "number", + "nullable": true, + "deprecated": true }, - "textColor": { - "type": "string" + "type": { + "type": "string", + "enum": [ + "MESSAGE" + ] } }, "required": [ - "backgroundColor", - "textColor" + "messageHash", + "status", + "logoUri", + "name", + "message", + "creationTimestamp", + "modifiedTimestamp", + "confirmationsSubmitted", + "confirmationsRequired", + "proposedBy", + "confirmations", + "preparedSignature", + "origin", + "safeAppInfo", + "safeAppId", + "type" ] }, - "Relayer": { + "DateLabel": { "type": "object", "properties": { "type": { "type": "string", "enum": [ - "GTF", - "RELAY_FEE", - "DAILY_LIMIT", - "NO_FEE_CAMPAIGN" - ], - "nullable": true - }, - "safeCreationSponsored": { - "type": "boolean" - }, - "safeTransactionSponsored": { - "type": "boolean" + "DATE_LABEL" + ] }, - "enableTenderlySimulationBeforeRelay": { - "type": "boolean" + "timestamp": { + "type": "number" } }, "required": [ "type", - "safeCreationSponsored", - "safeTransactionSponsored", - "enableTenderlySimulationBeforeRelay" + "timestamp" ] }, - "Chain": { + "MessagePage": { "type": "object", "properties": { - "chainId": { - "type": "string" - }, - "chainName": { - "type": "string" - }, - "description": { - "type": "string" + "count": { + "type": "number", + "nullable": true }, - "chainLogoUri": { + "next": { "type": "string", "nullable": true }, - "l2": { - "type": "boolean" - }, - "isTestnet": { - "type": "boolean" - }, - "zk": { - "type": "boolean" - }, - "nativeCurrency": { - "$ref": "#/components/schemas/NativeCurrency" - }, - "transactionService": { - "type": "string" - }, - "blockExplorerUriTemplate": { - "$ref": "#/components/schemas/BlockExplorerUriTemplate" - }, - "beaconChainExplorerUriTemplate": { - "type": "object" - }, - "disabledWallets": { - "type": "array", - "items": { - "type": "string" - } - }, - "ensRegistryAddress": { + "previous": { "type": "string", "nullable": true }, - "balancesProvider": { - "$ref": "#/components/schemas/BalancesProvider" - }, - "features": { - "type": "array", - "items": { - "type": "string" - } - }, - "gasPrice": { + "results": { "type": "array", "items": { "oneOf": [ { - "$ref": "#/components/schemas/GasPriceOracle" - }, - { - "$ref": "#/components/schemas/GasPriceFixed" + "$ref": "#/components/schemas/MessageItem" }, { - "$ref": "#/components/schemas/GasPriceFixedEIP1559" + "$ref": "#/components/schemas/DateLabel" } ] } + } + }, + "required": [ + "results" + ] + }, + "DeclaredAttributionDto": { + "type": "object", + "properties": { + "channel": { + "type": "string", + "nullable": true, + "description": "Where the user started the request. Known values: NATIVE_TRANSFER, NATIVE_BATCH, SAFE_APP, WALLET_CONNECT, WIDGET, DIRECT, MCP, CLI. Truncated to 64 characters." }, - "publicRpcUri": { - "$ref": "#/components/schemas/RpcUri" + "appName": { + "type": "string", + "nullable": true, + "description": "App name. Truncated to 256 characters." }, - "rpcUri": { - "$ref": "#/components/schemas/RpcUri" + "appUrl": { + "type": "string", + "nullable": true, + "description": "App origin and path. Truncated to 2048 characters." }, - "safeAppsRpcUri": { - "$ref": "#/components/schemas/RpcUri" + "appId": { + "type": "number", + "nullable": true, + "description": "ID of a listed Safe App." + } + } + }, + "CreateMessageDto": { + "type": "object", + "properties": { + "message": { + "oneOf": [ + { + "type": "string" + }, + { + "$ref": "#/components/schemas/TypedData" + } + ] }, - "shortName": { - "type": "string" + "safeAppId": { + "type": "number", + "nullable": true, + "deprecated": true }, - "theme": { - "$ref": "#/components/schemas/Theme" + "signature": { + "type": "string" }, - "recommendedMasterCopyVersion": { + "origin": { "type": "string", "nullable": true }, - "relayer": { + "declared": { "nullable": true, + "description": "Where the request came from, as reported by the client.", "type": "object", "allOf": [ { - "$ref": "#/components/schemas/Relayer" + "$ref": "#/components/schemas/DeclaredAttributionDto" } ] } }, "required": [ - "chainId", - "chainName", - "description", - "l2", - "isTestnet", - "zk", - "nativeCurrency", - "transactionService", - "blockExplorerUriTemplate", - "beaconChainExplorerUriTemplate", - "disabledWallets", - "balancesProvider", - "features", - "gasPrice", - "publicRpcUri", - "rpcUri", - "safeAppsRpcUri", - "shortName", - "theme", - "relayer" + "message", + "signature" ] }, - "ChainPage": { + "UpdateMessageSignatureDto": { "type": "object", "properties": { - "count": { - "type": "number", - "nullable": true - }, - "next": { - "type": "string", - "nullable": true - }, - "previous": { - "type": "string", - "nullable": true + "signature": { + "type": "string" + } + }, + "required": [ + "signature" + ] + }, + "UserWallet": { + "type": "object", + "properties": { + "id": { + "type": "number" }, - "results": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Chain" - } + "address": { + "type": "string" } }, "required": [ - "results" + "id", + "address" ] }, - "AboutChain": { + "UserWithWallets": { "type": "object", "properties": { - "transactionServiceBaseUri": { - "type": "string" - }, - "name": { - "type": "string" + "id": { + "type": "number" }, - "version": { - "type": "string" + "status": { + "type": "number", + "enum": [ + 0, + 1 + ] }, - "buildNumber": { - "type": "string" + "wallets": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UserWallet" + } } }, "required": [ - "transactionServiceBaseUri", - "name", - "version", - "buildNumber" + "id", + "status", + "wallets" ] }, - "Backbone": { + "CreatedUserWithWallet": { "type": "object", "properties": { - "api_version": { - "type": "string" - }, - "headers": { - "type": "string", - "nullable": true - }, - "host": { - "type": "string" - }, - "name": { - "type": "string" - }, - "secure": { - "type": "boolean" - }, - "settings": { - "type": "object", - "nullable": true - }, - "version": { - "type": "string" + "id": { + "type": "number" } }, "required": [ - "api_version", - "host", - "name", - "secure", - "settings", - "version" + "id" ] }, - "MasterCopy": { + "WalletAddedToUser": { "type": "object", "properties": { - "address": { - "type": "string" - }, - "version": { - "type": "string" + "id": { + "type": "number" } }, "required": [ - "address", - "version" + "id" ] }, - "IndexingStatus": { + "SpaceAddressBookItemDto": { "type": "object", "properties": { - "currentBlockNumber": { - "type": "number" + "name": { + "type": "string" }, - "currentBlockTimestamp": { - "format": "date-time", + "address": { "type": "string" }, - "erc20BlockNumber": { - "type": "number" + "chainIds": { + "type": "array", + "items": { + "type": "string" + } }, - "erc20BlockTimestamp": { - "format": "date-time", - "type": "string" + "tagIds": { + "description": "IDs of the workspace tags assigned to the contact", + "type": "array", + "items": { + "type": "number" + } }, - "erc20Synced": { - "type": "boolean" + "createdBy": { + "type": "string", + "description": "Email or wallet address of the creator, \"Unknown user\" if the user has no display identity, or \"Deleted user\"" }, - "masterCopiesBlockNumber": { - "type": "number" + "createdByUserId": { + "type": "number", + "description": "User ID of the creator" }, - "masterCopiesBlockTimestamp": { - "format": "date-time", - "type": "string" + "lastUpdatedBy": { + "type": "string", + "description": "Email or wallet address of the last editor, \"Unknown user\" if the user has no display identity, or \"Deleted user\"" }, - "masterCopiesSynced": { - "type": "boolean" + "lastUpdatedByUserId": { + "type": "number", + "description": "User ID of the last editor" }, - "synced": { - "type": "boolean" + "createdAt": { + "format": "date-time", + "type": "string" }, - "lastSync": { - "type": "number" + "updatedAt": { + "format": "date-time", + "type": "string" } }, "required": [ - "currentBlockNumber", - "currentBlockTimestamp", - "erc20BlockNumber", - "erc20BlockTimestamp", - "erc20Synced", - "masterCopiesBlockNumber", - "masterCopiesBlockTimestamp", - "masterCopiesSynced", - "synced", - "lastSync" + "name", + "address", + "chainIds", + "tagIds", + "createdBy", + "createdByUserId", + "lastUpdatedBy", + "lastUpdatedByUserId", + "createdAt", + "updatedAt" ] }, - "GasPriceResult": { + "SpaceAddressBookTagDto": { "type": "object", "properties": { - "LastBlock": { - "type": "string", - "description": "Last block number", - "example": "23467872" + "id": { + "type": "number" }, - "SafeGasPrice": { - "type": "string", - "description": "Safe gas price recommendation (Gwei)", - "example": "0.496839934" + "name": { + "type": "string" }, - "ProposeGasPrice": { + "color": { "type": "string", - "description": "Proposed gas price (Gwei)", - "example": "0.496840168" + "enum": [ + "slate", + "clay", + "rose", + "lilac", + "iris", + "cobalt", + "sky", + "lagoon" + ] }, - "FastGasPrice": { + "contactCount": { + "type": "number", + "description": "Number of contacts that have this tag" + } + }, + "required": [ + "id", + "name", + "color", + "contactCount" + ] + }, + "SpaceAddressBookDto": { + "type": "object", + "properties": { + "spaceUuid": { "type": "string", - "description": "Fast gas price recommendation (Gwei)", - "example": "0.55411917" + "description": "Space UUID" }, - "suggestBaseFee": { - "type": "string", - "description": "Base fee of the next pending block (Gwei)", - "example": "0.496839934" + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SpaceAddressBookItemDto" + } }, - "gasUsedRatio": { - "type": "string", - "description": "Gas used ratio to estimate network congestion", - "example": "0.5,0.6,0.7" + "tags": { + "description": "All tags defined in the workspace address book", + "type": "array", + "items": { + "$ref": "#/components/schemas/SpaceAddressBookTagDto" + } } }, "required": [ - "LastBlock", - "SafeGasPrice", - "ProposeGasPrice", - "FastGasPrice", - "suggestBaseFee", - "gasUsedRatio" + "spaceUuid", + "data", + "tags" ] }, - "GasPriceResponse": { + "UpsertAddressBookItem": { "type": "object", "properties": { - "status": { - "type": "string", - "description": "Status code (\"1\" = success)", - "example": "1" + "name": { + "type": "string" }, - "message": { - "type": "string", - "description": "Response message", - "example": "OK" + "address": { + "type": "string" }, - "result": { - "description": "Gas price data", - "allOf": [ - { - "$ref": "#/components/schemas/GasPriceResult" - } - ] + "chainIds": { + "type": "array", + "items": { + "type": "string" + } + }, + "tags": { + "maxItems": 3, + "description": "Tag names of the contact (replaces the current tags when provided; omit to leave them unchanged)", + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "name", + "address", + "chainIds" + ] + }, + "UpsertAddressBookItemsDto": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UpsertAddressBookItem" + } } }, "required": [ - "status", - "message", - "result" + "items" ] }, - "Collectible": { + "SetContactTagsItem": { "type": "object", "properties": { "address": { "type": "string" }, - "tokenName": { - "type": "string" - }, - "tokenSymbol": { - "type": "string" - }, - "logoUri": { - "type": "string" - }, - "id": { - "type": "string" - }, - "uri": { - "type": "string", - "nullable": true - }, - "name": { - "type": "string", - "nullable": true - }, - "description": { - "type": "string", - "nullable": true - }, - "imageUri": { - "type": "string", - "nullable": true - }, - "metadata": { - "type": "object", - "nullable": true + "tags": { + "maxItems": 3, + "description": "The full set of tag names for the contact. 'Workspace Safe' and 'Signer' aren't allowed, in any case", + "type": "array", + "items": { + "type": "string" + } } }, "required": [ "address", - "tokenName", - "tokenSymbol", - "logoUri", - "id" + "tags" ] }, - "CollectiblePage": { + "SetContactTagsDto": { "type": "object", "properties": { - "count": { - "type": "number", - "nullable": true - }, - "next": { - "type": "string", - "nullable": true - }, - "previous": { - "type": "string", - "nullable": true - }, - "results": { + "items": { "type": "array", "items": { - "$ref": "#/components/schemas/Collectible" - } + "$ref": "#/components/schemas/SetContactTagsItem" + }, + "minItems": 1, + "description": "At most as many entries as the address book can hold, each address at most once" } }, "required": [ - "results" + "items" ] }, - "ActivityMetadata": { + "CreateTagDto": { "type": "object", "properties": { "name": { - "type": "string" - }, - "description": { - "type": "string" - }, - "maxPoints": { - "type": "number" + "type": "string", + "maxLength": 32, + "description": "'Workspace Safe' and 'Signer' aren't allowed, in any case" } }, "required": [ - "name", - "description", - "maxPoints" + "name" ] }, - "Campaign": { + "RenameTagDto": { "type": "object", "properties": { - "resourceId": { - "type": "string" - }, "name": { - "type": "string" - }, - "description": { - "type": "string" + "type": "string", + "maxLength": 32, + "description": "'Workspace Safe' and 'Signer' aren't allowed, in any case" + } + }, + "required": [ + "name" + ] + }, + "AddressBookRequestItemDto": { + "type": "object", + "properties": { + "id": { + "type": "number" }, - "startDate": { + "name": { "type": "string" }, - "endDate": { + "address": { "type": "string" }, - "lastUpdated": { - "type": "string", - "nullable": true - }, - "activitiesMetadata": { - "nullable": true, + "chainIds": { "type": "array", "items": { - "$ref": "#/components/schemas/ActivityMetadata" + "type": "string" } }, - "rewardValue": { + "requestedBy": { "type": "string", - "nullable": true + "description": "Email or wallet address of the requester, \"Unknown user\" if the user has no display identity, or \"Deleted user\"" }, - "rewardText": { - "type": "string", - "nullable": true + "requestedByUserId": { + "type": "number", + "description": "User ID of the requester" }, - "iconUrl": { + "reviewedBy": { "type": "string", - "nullable": true + "nullable": true, + "description": "Email or wallet address of the reviewing admin, \"Unknown user\", \"Deleted user\", or null when still PENDING" }, - "safeAppUrl": { - "type": "string", - "nullable": true + "reviewedByUserId": { + "type": "number", + "nullable": true, + "description": "User ID of the reviewing admin, null when still PENDING" }, - "partnerUrl": { + "status": { "type": "string", - "nullable": true + "enum": [ + "PENDING", + "APPROVED", + "REJECTED" + ] }, - "isPromoted": { - "type": "boolean" + "createdAt": { + "format": "date-time", + "type": "string" + }, + "updatedAt": { + "format": "date-time", + "type": "string" } }, "required": [ - "resourceId", + "id", "name", - "description", - "startDate", - "endDate", - "isPromoted" + "address", + "chainIds", + "requestedBy", + "requestedByUserId", + "reviewedBy", + "reviewedByUserId", + "status", + "createdAt", + "updatedAt" ] }, - "CampaignPage": { + "AddressBookRequestsDto": { "type": "object", "properties": { - "count": { - "type": "number", - "nullable": true - }, - "next": { - "type": "string", - "nullable": true - }, - "previous": { + "spaceUuid": { "type": "string", - "nullable": true + "description": "Space UUID" }, - "results": { + "data": { "type": "array", "items": { - "$ref": "#/components/schemas/Campaign" + "$ref": "#/components/schemas/AddressBookRequestItemDto" } } }, "required": [ - "results" - ] - }, - "CampaignRank": { - "type": "object", - "properties": { - "holder": { - "type": "string" - }, - "position": { - "type": "number" - }, - "boost": { - "type": "number" - }, - "totalPoints": { - "type": "number" - }, - "totalBoostedPoints": { - "type": "number" - } - }, - "required": [ - "holder", - "position", - "boost", - "totalPoints", - "totalBoostedPoints" + "spaceUuid", + "data" ] }, - "CampaignRankPage": { + "CreateAddressBookRequestDto": { "type": "object", "properties": { - "count": { - "type": "number", - "nullable": true - }, - "next": { + "name": { "type": "string", - "nullable": true + "maxLength": 50, + "description": "Name of the proposed contact" }, - "previous": { + "address": { "type": "string", - "nullable": true + "description": "Address of the contact to propose for the space address book" }, - "results": { + "chainIds": { + "description": "Chain ids the contact applies to (at least one, duplicates are removed)", "type": "array", "items": { - "$ref": "#/components/schemas/CampaignRank" + "type": "string" } } }, "required": [ - "results" + "name", + "address", + "chainIds" ] }, - "EligibilityRequest": { + "CreateSpaceDto": { "type": "object", "properties": { - "requestId": { - "type": "string" - }, - "sealedData": { + "name": { "type": "string" } }, "required": [ - "requestId", - "sealedData" + "name" ] }, - "Eligibility": { + "CreateSpaceResponse": { "type": "object", "properties": { - "requestId": { + "name": { "type": "string" }, - "isAllowed": { - "type": "boolean" - }, - "isVpn": { - "type": "boolean" + "uuid": { + "type": "string", + "description": "Space UUID" } }, "required": [ - "requestId", - "isAllowed", - "isVpn" + "name", + "uuid" ] }, - "LockingRank": { + "WalletInviteUserDto": { "type": "object", "properties": { - "holder": { - "type": "string" - }, - "position": { - "type": "number" + "type": { + "type": "string", + "enum": [ + "wallet" + ] }, - "lockedAmount": { + "address": { "type": "string" }, - "unlockedAmount": { - "type": "string" + "role": { + "type": "string", + "enum": [ + "ADMIN", + "MEMBER" + ] }, - "withdrawnAmount": { - "type": "string" + "name": { + "type": "string", + "maxLength": 255 } }, "required": [ - "holder", - "position", - "lockedAmount", - "unlockedAmount", - "withdrawnAmount" + "type", + "address", + "role", + "name" ] }, - "LockingRankPage": { + "EmailInviteUserDto": { "type": "object", "properties": { - "count": { - "type": "number", - "nullable": true + "type": { + "type": "string", + "enum": [ + "email" + ] }, - "next": { + "email": { "type": "string", - "nullable": true + "format": "email", + "maxLength": 255 }, - "previous": { + "role": { "type": "string", - "nullable": true + "enum": [ + "ADMIN", + "MEMBER" + ] }, - "results": { - "type": "array", - "items": { - "$ref": "#/components/schemas/LockingRank" - } + "name": { + "type": "string", + "maxLength": 255 } }, "required": [ - "results" + "type", + "email", + "role", + "name" ] }, - "LockEventItem": { + "SpaceSafeDto": { "type": "object", "properties": { - "eventType": { - "type": "string", - "enum": [ - "LOCKED" - ] - }, - "executionDate": { - "type": "string" - }, - "transactionHash": { - "type": "string" - }, - "holder": { - "type": "string" - }, - "amount": { + "chainId": { "type": "string" }, - "logIndex": { + "address": { "type": "string" } }, "required": [ - "eventType", - "executionDate", - "transactionHash", - "holder", - "amount", - "logIndex" + "chainId", + "address" ] }, - "UnlockEventItem": { + "AddressBookItem": { "type": "object", "properties": { - "eventType": { - "type": "string", - "enum": [ - "UNLOCKED" - ] - }, - "executionDate": { - "type": "string" - }, - "transactionHash": { - "type": "string" - }, - "holder": { - "type": "string" - }, - "amount": { + "name": { "type": "string" }, - "logIndex": { + "address": { "type": "string" }, - "unlockIndex": { - "type": "string" + "chainIds": { + "type": "array", + "items": { + "type": "string" + } } }, "required": [ - "eventType", - "executionDate", - "transactionHash", - "holder", - "amount", - "logIndex", - "unlockIndex" + "name", + "address", + "chainIds" ] }, - "WithdrawEventItem": { + "SpaceSetupSurveyDto": { "type": "object", "properties": { - "eventType": { + "slug": { "type": "string", - "enum": [ - "WITHDRAWN" - ] - }, - "executionDate": { - "type": "string" - }, - "transactionHash": { - "type": "string" - }, - "holder": { - "type": "string" - }, - "amount": { - "type": "string" - }, - "logIndex": { - "type": "string" + "example": "onboarding" }, - "unlockIndex": { - "type": "string" + "selections": { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + }, + "description": "Map from page id to selected option keys" } }, "required": [ - "eventType", - "executionDate", - "transactionHash", - "holder", - "amount", - "logIndex", - "unlockIndex" + "slug", + "selections" ] }, - "LockingEventPage": { + "CreateSpaceSetupDto": { "type": "object", "properties": { - "count": { - "type": "number", - "nullable": true + "name": { + "type": "string" }, - "next": { + "paymentLinkId": { "type": "string", - "nullable": true + "nullable": true, + "description": "The picked trial plan; its checkout starts the trial. Null applies the setup at once, which is refused once billing is enforced." }, - "previous": { - "type": "string", - "nullable": true + "safes": { + "description": "Safes to add when the trial starts. One seat per address, however many chains.", + "type": "array", + "items": { + "$ref": "#/components/schemas/SpaceSafeDto" + } }, - "results": { + "addressBookItems": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AddressBookItem" + } + }, + "invites": { "type": "array", "items": { "oneOf": [ { - "$ref": "#/components/schemas/LockEventItem" - }, - { - "$ref": "#/components/schemas/UnlockEventItem" + "$ref": "#/components/schemas/WalletInviteUserDto" }, { - "$ref": "#/components/schemas/WithdrawEventItem" + "$ref": "#/components/schemas/EmailInviteUserDto" } ] } - } - }, - "required": [ - "results" - ] - }, - "Contract": { - "type": "object", - "properties": { - "address": { - "type": "string" - }, - "name": { - "type": "string" - }, - "displayName": { - "type": "string" - }, - "logoUri": { - "type": "string" }, - "contractAbi": { + "survey": { + "nullable": true, "type": "object", - "nullable": true - }, - "trustedForDelegateCall": { - "type": "boolean" + "allOf": [ + { + "$ref": "#/components/schemas/SpaceSetupSurveyDto" + } + ] + }, + "returnUrl": { + "type": "string", + "description": "Where the checkout returns to. Must be on an allowed redirect domain." } }, "required": [ - "address", "name", - "displayName", - "logoUri", - "trustedForDelegateCall" + "paymentLinkId", + "safes", + "addressBookItems", + "invites", + "survey", + "returnUrl" ] }, - "TransactionDataDto": { + "SpaceSetupCheckoutDto": { "type": "object", "properties": { - "data": { + "spaceId": { "type": "string", - "description": "Hexadecimal value" + "description": "Space UUID" }, - "to": { + "checkoutUrl": { "type": "string", - "description": "The target Ethereum address" + "nullable": true, + "description": "The checkout to redirect to. Null when no plan was given: the setup is applied already." } }, "required": [ - "data" + "spaceId", + "checkoutUrl" ] }, - "Operation": { - "type": "number", - "enum": [ - 0, - 1 - ], - "description": "Operation type: 0 for CALL, 1 for DELEGATE" - }, - "BaseDataDecoded": { + "SpaceSetupDto": { "type": "object", "properties": { - "method": { - "type": "string" + "status": { + "type": "string", + "enum": [ + "pending", + "applied" + ] }, - "parameters": { + "paymentLinkId": { + "type": "string", + "nullable": true + }, + "safes": { "type": "array", "items": { - "$ref": "#/components/schemas/DataDecodedParameter" + "$ref": "#/components/schemas/SpaceSafeDto" + } + }, + "addressBookItems": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AddressBookItem" + } + }, + "invites": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/WalletInviteUserDto" + }, + { + "$ref": "#/components/schemas/EmailInviteUserDto" + } + ] } + }, + "survey": { + "nullable": true, + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/SpaceSetupSurveyDto" + } + ] } }, "required": [ - "method" + "status", + "paymentLinkId", + "safes", + "addressBookItems", + "invites", + "survey" ] }, - "MultiSend": { + "UserDto": { "type": "object", "properties": { - "operation": { - "description": "Operation type: 0 for CALL, 1 for DELEGATE", - "allOf": [ - { - "$ref": "#/components/schemas/Operation" - } - ] - }, - "value": { - "type": "string" - }, - "dataDecoded": { - "$ref": "#/components/schemas/BaseDataDecoded" - }, - "to": { - "type": "string" - }, - "data": { - "type": "string", - "nullable": true, - "description": "Hexadecimal encoded data", - "pattern": "^0x[0-9a-fA-F]*$" + "id": { + "type": "number" } }, "required": [ - "operation", - "value", - "to", - "data" + "id" ] }, - "DataDecodedParameter": { + "SpaceMemberDto": { "type": "object", "properties": { + "role": { + "type": "string", + "enum": [ + "ADMIN", + "MEMBER" + ] + }, "name": { "type": "string" }, - "type": { + "invitedBy": { + "type": "number", + "nullable": true + }, + "inviteExpiresAt": { + "format": "date-time", + "type": "string", + "nullable": true + }, + "invitedByName": { "type": "string" }, - "value": { - "description": "Parameter value - typically a string, but may be an array of strings for array types (e.g., address[], uint256[])", - "oneOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "type": "string" - } - } + "status": { + "type": "string", + "enum": [ + "INVITED", + "ACTIVE", + "DECLINED" ] }, - "valueDecoded": { - "oneOf": [ - { - "$ref": "#/components/schemas/BaseDataDecoded" - }, - { - "type": "array", - "items": { - "$ref": "#/components/schemas/MultiSend" - } - }, - { - "type": "null" - } - ] + "user": { + "$ref": "#/components/schemas/UserDto" } }, "required": [ + "role", "name", - "type", - "value" + "invitedBy", + "inviteExpiresAt", + "status", + "user" ] }, - "DataDecoded": { + "GetSpaceResponse": { "type": "object", "properties": { - "method": { + "uuid": { + "type": "string", + "description": "Space UUID" + }, + "name": { "type": "string" }, - "parameters": { - "nullable": true, + "members": { + "description": "Members of the space. A pending (INVITED) member only sees their own membership row here, not the other members.", "type": "array", "items": { - "$ref": "#/components/schemas/DataDecodedParameter" + "$ref": "#/components/schemas/SpaceMemberDto" } }, - "accuracy": { + "memberCount": { + "type": "number", + "description": "Total count of ACTIVE members in the space", + "example": 5 + }, + "safeCount": { + "type": "number", + "description": "Total count of Safes in the space", + "example": 5 + }, + "experimentalFeatures": { + "type": "array", + "description": "Experimental features this Workspace has opted into.", + "items": { + "type": "string", + "enum": [ + "POLICY_RECIPIENT_ALLOWLIST" + ] + } + }, + "setupStatus": { "type": "string", "enum": [ - "FULL_MATCH", - "PARTIAL_MATCH", - "ONLY_FUNCTION_MATCH", - "NO_MATCH", - "UNKNOWN" + "pending", + "applied" ], - "default": "UNKNOWN" - } - }, - "required": [ - "method" - ] - }, - "AddRecoveryModuleDto": { - "type": "object", - "properties": { - "moduleAddress": { - "type": "string" + "nullable": true, + "description": "Status of the onboarding setup, or null for a Workspace created without one. Pending until the trial starts and the setup is applied." } }, "required": [ - "moduleAddress" + "uuid", + "name", + "members", + "memberCount", + "safeCount", + "experimentalFeatures", + "setupStatus" ] }, - "GetEstimationDto": { + "UpdateSpaceDto": { "type": "object", "properties": { - "to": { - "type": "string" - }, - "value": { + "name": { "type": "string" }, - "data": { + "status": { "type": "string", - "nullable": true - }, - "operation": { - "description": "Operation type: 0 for CALL, 1 for DELEGATE", - "allOf": [ - { - "$ref": "#/components/schemas/Operation" - } + "enum": [ + "ACTIVE" ] + }, + "experimentalFeatures": { + "type": "array", + "description": "Replaces the stored set; [] opts out of all. Omit to leave it unchanged.", + "items": { + "type": "string", + "enum": [ + "POLICY_RECIPIENT_ALLOWLIST" + ] + } } - }, - "required": [ - "to", - "value", - "operation" - ] + } }, - "EstimationResponse": { + "UpdateSpaceResponse": { "type": "object", - "properties": { - "currentNonce": { - "type": "number" - }, - "recommendedNonce": { - "type": "number" - }, - "safeTxGas": { - "type": "string" + "properties": { + "uuid": { + "type": "string", + "description": "Space UUID" } }, "required": [ - "currentNonce", - "recommendedNonce", - "safeTxGas" + "uuid" ] }, - "GasToken": { + "SpaceAuditLogEntryDto": { "type": "object", "properties": { - "address": { + "id": { "type": "string", - "description": "Gas token contract address", - "example": "0x0000000000000000000000000000000000000000" + "description": "Monotonic entry id (bigint serialized as string)" }, - "symbol": { + "eventType": { "type": "string", - "description": "The token's ticker symbol", - "example": "USDC" + "enum": [ + "SPACE_CREATED", + "SPACE_UPDATED", + "SPACE_DELETED", + "MEMBER_INVITED", + "MEMBER_INVITE_ACCEPTED", + "MEMBER_INVITE_DECLINED", + "MEMBER_INVITE_RENEWED", + "MEMBER_ROLE_UPDATED", + "MEMBER_ALIAS_UPDATED", + "MEMBER_REMOVED", + "MEMBER_LEFT", + "SAFE_ADDED", + "SAFE_REMOVED", + "ADDRESS_BOOK_UPSERTED", + "ADDRESS_BOOK_DELETED", + "ADDRESS_BOOK_REQUEST_CREATED", + "ADDRESS_BOOK_REQUEST_REJECTED", + "ADDRESS_BOOK_TAGS_UPDATED", + "ADDRESS_BOOK_TAG_CREATED", + "ADDRESS_BOOK_TAG_RENAMED", + "ADDRESS_BOOK_TAG_DELETED" + ] + }, + "actorUserId": { + "type": "number" + }, + "actor": { + "type": "string", + "description": "Resolved (and masked) display string of the acting user." + }, + "targetUser": { + "type": "string", + "nullable": true, + "description": "Resolved (and masked) display string of the affected user, when the event has one." + }, + "payload": { + "type": "object", + "description": "Event-specific payload, allowlisted per event type. Clients must treat every field as optional." + }, + "createdAt": { + "format": "date-time", + "type": "string" } }, "required": [ - "address", - "symbol" + "id", + "eventType", + "actorUserId", + "actor", + "targetUser", + "payload", + "createdAt" ] }, - "GasTokenPage": { + "SpaceAuditLogPage": { "type": "object", "properties": { "count": { @@ -8813,7 +12695,7 @@ "results": { "type": "array", "items": { - "$ref": "#/components/schemas/GasToken" + "$ref": "#/components/schemas/SpaceAuditLogEntryDto" } } }, @@ -8821,4152 +12703,4708 @@ "results" ] }, - "Origin": { - "type": "string", - "enum": [ - "SAFE_APP", - "WALLET_CONNECT", - "TX_BUILDER", - "NATIVE" - ], - "description": "Transaction origin. Defaults to NATIVE when omitted." - }, - "FeePreviewTransactionDto": { + "SpaceAuditLogActorDto": { "type": "object", "properties": { - "to": { - "type": "string" - }, - "value": { - "type": "string" - }, - "data": { - "type": "string" - }, - "operation": { - "description": "Operation type: 0 for CALL, 1 for DELEGATE", - "allOf": [ - { - "$ref": "#/components/schemas/Operation" - } - ] - }, - "gasToken": { - "type": "string", - "description": "Gas token address (0x0...0 for native token)", - "example": "0x0000000000000000000000000000000000000000" - }, - "numberSignatures": { - "type": "number", - "description": "Number of signatures required for execution", - "example": 2, - "minimum": 1 - }, - "nonce": { - "type": "string", - "description": "Safe nonce the transaction will use (uint256 string)", - "example": "42" - }, - "origin": { - "description": "Transaction origin. Defaults to NATIVE when omitted.", - "allOf": [ - { - "$ref": "#/components/schemas/Origin" - } - ] + "actorUserId": { + "type": "number" }, - "fiatCode": { + "actor": { "type": "string", - "description": "Fiat currency code for relay cost conversion (e.g. EUR, GBP). Defaults to USD.", - "example": "EUR" + "description": "Resolved (and masked) display string of the actor." } }, "required": [ - "to", - "value", - "data", - "operation", - "gasToken", - "numberSignatures", - "nonce" + "actorUserId", + "actor" ] }, - "FeePreviewTxData": { + "CreateSpaceSafesDto": { "type": "object", "properties": { - "chainId": { - "type": "string", - "description": "Chain ID", - "example": "1" - }, - "safeAddress": { - "type": "string", - "description": "Safe address", - "example": "0x..." - }, - "safeTxGas": { - "type": "string", - "description": "Safe transaction gas", - "example": "150000" - }, - "baseGas": { - "type": "string", - "description": "Base gas for relay overhead", - "example": "48564" - }, - "gasPrice": { - "type": "string", - "description": "Gas price per gas unit. Denominated in wei when `gasToken` is the native token (zero address), or in the ERC20 gas token atomic units per gas otherwise", - "example": "195000000000000" - }, - "gasToken": { - "type": "string", - "description": "Gas token address", - "example": "0x0000000000000000000000000000000000000000" - }, - "refundReceiver": { - "type": "string", - "description": "Refund receiver address", - "example": "0x0000000000000000000000000000000000000000" + "safes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SpaceSafeDto" + } }, - "numberSignatures": { - "type": "number", - "description": "Number of signatures", - "example": 2 + "addressBookItems": { + "description": "Address book entries to upsert for the added Safes, in the same transaction: if either write fails, neither is kept.", + "type": "array", + "items": { + "$ref": "#/components/schemas/AddressBookItem" + } } }, "required": [ - "chainId", - "safeAddress", - "safeTxGas", - "baseGas", - "gasPrice", - "gasToken", - "refundReceiver", - "numberSignatures" + "safes" ] }, - "FeePreviewRelayCost": { + "GetSpacesSafesResponse": { "type": "object", "properties": { - "fiatCode": { - "type": "string", - "description": "Fiat currency code", - "example": "USD" + "safes": { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + }, + "example": { + "{chainId}": [ + "0x..." + ] + } }, - "fiatValue": { + "spaceUuid": { "type": "string", - "description": "Relay cost as a string", - "example": "0.0025" + "description": "Space UUID" } }, "required": [ - "fiatCode", - "fiatValue" + "safes", + "spaceUuid" ] }, - "FeePreviewValuationDetail": { + "GetSpaceSafeResponse": { "type": "object", "properties": { - "tokenAddress": { - "type": "string", - "description": "Token contract address (absent for native transfers)" - }, - "symbol": { - "type": "string", - "description": "Token symbol", - "example": "USDC" - }, - "amount": { - "type": "string", - "description": "Token amount", - "example": "1000" - }, - "priceUsd": { - "type": "number", - "description": "Token price in USD" - }, - "valueUsd": { - "type": "number", - "description": "Token value in USD" + "safes": { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + }, + "example": { + "{chainId}": [ + "0x..." + ] + } } }, "required": [ - "symbol", - "amount" + "safes" ] }, - "FeePreviewFeeBreakdown": { + "DeleteSpaceSafesDto": { "type": "object", "properties": { - "txValueUsd": { - "type": "number", - "description": "Transaction value in USD", - "example": 1000 - }, - "trailingVolumeUsd": { - "type": "number", - "description": "Trailing volume in USD that fed tier selection", - "example": 0 - }, - "tierBps": { - "type": "number", - "description": "Tier fee in basis points", - "example": 5 - }, - "gtfFeeUsd": { - "type": "number", - "description": "GTF fee in USD", - "example": 0.5 - }, - "relayCostUsd": { - "type": "number", - "description": "Relay cost in USD", - "example": 38.22 - }, - "totalUsd": { - "type": "number", - "description": "Total fee in USD", - "example": 38.72 - }, - "numberSignatures": { - "type": "number", - "description": "Number of signatures", - "example": 2 - }, - "valuationDetails": { + "safes": { "type": "array", "items": { - "$ref": "#/components/schemas/FeePreviewValuationDetail" + "$ref": "#/components/schemas/SpaceSafeDto" } } }, "required": [ - "txValueUsd", - "trailingVolumeUsd", - "tierBps", - "gtfFeeUsd", - "relayCostUsd", - "totalUsd", - "numberSignatures", - "valuationDetails" + "safes" ] }, - "FeePreviewResponse": { + "InviteUsersDto": { "type": "object", "properties": { - "txData": { - "$ref": "#/components/schemas/FeePreviewTxData" + "users": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/WalletInviteUserDto" + }, + { + "$ref": "#/components/schemas/EmailInviteUserDto" + } + ] + } + } + }, + "required": [ + "users" + ] + }, + "Invitation": { + "type": "object", + "properties": { + "userId": { + "type": "number" }, - "relayCost": { - "description": "Relay cost. Present when the relay fee flow applies.", - "allOf": [ - { - "$ref": "#/components/schemas/FeePreviewRelayCost" - } + "name": { + "type": "string" + }, + "spaceUuid": { + "type": "string", + "description": "Space UUID" + }, + "role": { + "type": "string", + "enum": [ + "ADMIN", + "MEMBER" ] }, - "feeBreakdown": { - "description": "GTF fee breakdown, as returned by the fee-engine service. Present when the GTF fee flow applies.", - "allOf": [ - { - "$ref": "#/components/schemas/FeePreviewFeeBreakdown" - } + "status": { + "type": "string", + "enum": [ + "INVITED", + "ACTIVE", + "DECLINED" ] }, - "maxFeeCapUsd": { + "invitedBy": { "type": "number", - "description": "Maximum fee cap in USD (buffered max fee). Present when the GTF fee flow applies." + "nullable": true } }, "required": [ - "txData" + "userId", + "name", + "spaceUuid", + "role", + "status", + "invitedBy" ] }, - "TypedDataParameter": { + "AcceptInviteDto": { "type": "object", "properties": { "name": { - "type": "string" + "type": "string", + "maxLength": 255 + } + }, + "required": [ + "name" + ] + }, + "MemberUser": { + "type": "object", + "properties": { + "id": { + "type": "number" }, - "type": { - "type": "string" + "status": { + "type": "string", + "enum": [ + "PENDING", + "ACTIVE" + ] + }, + "email": { + "type": "string", + "nullable": true + }, + "address": { + "type": "string", + "nullable": true } }, "required": [ - "name", - "type" + "id", + "status", + "email", + "address" ] }, - "TypedDataDomain": { + "MemberDto": { "type": "object", "properties": { - "chainId": { + "id": { "type": "number" }, + "role": { + "type": "string", + "enum": [ + "ADMIN", + "MEMBER" + ] + }, + "status": { + "type": "string", + "enum": [ + "INVITED", + "ACTIVE", + "DECLINED" + ] + }, "name": { "type": "string" }, - "salt": { - "type": "string" + "alias": { + "type": "string", + "nullable": true }, - "verifyingContract": { + "invitedBy": { + "type": "number", + "nullable": true + }, + "inviteExpiresAt": { + "format": "date-time", + "type": "string", + "nullable": true + }, + "createdAt": { + "format": "date-time", "type": "string" }, - "version": { + "updatedAt": { + "format": "date-time", "type": "string" + }, + "user": { + "$ref": "#/components/schemas/MemberUser" } - } + }, + "required": [ + "id", + "role", + "status", + "name", + "invitedBy", + "createdAt", + "updatedAt", + "user" + ] }, - "TypedData": { + "MembersDto": { "type": "object", "properties": { - "domain": { - "$ref": "#/components/schemas/TypedDataDomain" - }, - "primaryType": { - "type": "string" - }, - "types": { - "type": "object", - "additionalProperties": { - "items": { - "$ref": "#/components/schemas/TypedDataParameter" - }, - "type": "array" + "members": { + "type": "array", + "items": { + "$ref": "#/components/schemas/MemberDto" } - }, - "message": { - "type": "object", - "additionalProperties": true } }, "required": [ - "domain", - "primaryType", - "types", - "message" + "members" ] }, - "AddressInfo": { + "UpdateRoleDto": { "type": "object", "properties": { - "value": { - "type": "string" - }, - "name": { - "type": "string", - "nullable": true - }, - "logoUri": { + "role": { "type": "string", - "nullable": true + "enum": [ + "ADMIN", + "MEMBER" + ] } }, "required": [ - "value" + "role" ] }, - "MessageConfirmation": { + "UpdateMemberAliasDto": { "type": "object", "properties": { - "owner": { - "$ref": "#/components/schemas/AddressInfo" - }, - "signature": { - "type": "string" + "alias": { + "type": "string", + "description": "The new alias for the member" } }, "required": [ - "owner", - "signature" + "alias" ] }, - "Message": { + "CounterfactualSafeDto": { "type": "object", "properties": { - "messageHash": { + "chainId": { "type": "string" }, - "status": { - "type": "string", - "enum": [ - "NEEDS_CONFIRMATION", - "CONFIRMED" - ] - }, - "logoUri": { - "type": "string", - "nullable": true - }, - "name": { - "type": "string", - "nullable": true + "address": { + "type": "string" }, - "message": { - "oneOf": [ - { - "type": "string" - }, - { - "$ref": "#/components/schemas/TypedData" - } - ] + "factoryAddress": { + "type": "string" }, - "creationTimestamp": { - "type": "number" + "masterCopy": { + "type": "string" }, - "modifiedTimestamp": { - "type": "number" + "saltNonce": { + "type": "string" }, - "confirmationsSubmitted": { - "type": "number" + "safeVersion": { + "type": "string" }, - "confirmationsRequired": { + "threshold": { "type": "number" }, - "proposedBy": { - "$ref": "#/components/schemas/AddressInfo" - }, - "confirmations": { + "owners": { "type": "array", "items": { - "$ref": "#/components/schemas/MessageConfirmation" + "type": "string" } }, - "preparedSignature": { + "fallbackHandler": { "type": "string", "nullable": true }, - "origin": { + "to": { "type": "string", "nullable": true - } - }, - "required": [ - "messageHash", - "status", - "message", - "creationTimestamp", - "modifiedTimestamp", - "confirmationsSubmitted", - "confirmationsRequired", - "proposedBy", - "confirmations" - ] - }, - "MessageItem": { - "type": "object", - "properties": { - "messageHash": { - "type": "string" - }, - "status": { - "type": "string", - "enum": [ - "NEEDS_CONFIRMATION", - "CONFIRMED" - ] }, - "logoUri": { - "type": "string", - "nullable": true + "data": { + "type": "string" }, - "name": { + "paymentToken": { "type": "string", "nullable": true }, - "message": { - "oneOf": [ - { - "type": "string" - }, - { - "$ref": "#/components/schemas/TypedData" - } - ] - }, - "creationTimestamp": { - "type": "number" - }, - "modifiedTimestamp": { - "type": "number" - }, - "confirmationsSubmitted": { - "type": "number" - }, - "confirmationsRequired": { - "type": "number" - }, - "proposedBy": { - "$ref": "#/components/schemas/AddressInfo" - }, - "confirmations": { - "type": "array", - "items": { - "$ref": "#/components/schemas/MessageConfirmation" - } - }, - "preparedSignature": { + "payment": { "type": "string", "nullable": true }, - "origin": { + "paymentReceiver": { "type": "string", "nullable": true - }, - "type": { - "type": "string", - "enum": [ - "MESSAGE" - ] } }, "required": [ - "messageHash", - "status", - "message", - "creationTimestamp", - "modifiedTimestamp", - "confirmationsSubmitted", - "confirmationsRequired", - "proposedBy", - "confirmations", - "type" + "chainId", + "address", + "factoryAddress", + "masterCopy", + "saltNonce", + "safeVersion", + "threshold", + "owners", + "data" ] }, - "DateLabel": { + "CreateCounterfactualSafesDto": { "type": "object", "properties": { - "type": { - "type": "string", - "enum": [ - "DATE_LABEL" - ] - }, - "timestamp": { - "type": "number" + "safes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CounterfactualSafeDto" + } } }, "required": [ - "type", - "timestamp" + "safes" ] }, - "MessagePage": { + "GetCounterfactualSafeItem": { "type": "object", "properties": { - "count": { - "type": "number", - "nullable": true + "address": { + "type": "string" }, - "next": { - "type": "string", - "nullable": true + "factoryAddress": { + "type": "string" }, - "previous": { - "type": "string", - "nullable": true + "masterCopy": { + "type": "string" }, - "results": { + "saltNonce": { + "type": "string" + }, + "safeVersion": { + "type": "string" + }, + "threshold": { + "type": "number" + }, + "owners": { "type": "array", "items": { - "oneOf": [ - { - "$ref": "#/components/schemas/MessageItem" - }, - { - "$ref": "#/components/schemas/DateLabel" - } - ] + "type": "string" } - } - }, - "required": [ - "results" - ] - }, - "CreateMessageDto": { - "type": "object", - "properties": { - "message": { - "oneOf": [ - { - "type": "string" - }, - { - "$ref": "#/components/schemas/TypedData" - } - ] }, - "safeAppId": { - "type": "number", - "nullable": true, - "deprecated": true + "fallbackHandler": { + "type": "string", + "nullable": true }, - "signature": { + "to": { + "type": "string", + "nullable": true + }, + "data": { "type": "string" }, - "origin": { + "paymentToken": { + "type": "string", + "nullable": true + }, + "payment": { + "type": "string", + "nullable": true + }, + "paymentReceiver": { "type": "string", "nullable": true } }, "required": [ - "message", - "signature" + "address", + "factoryAddress", + "masterCopy", + "saltNonce", + "safeVersion", + "threshold", + "owners", + "fallbackHandler", + "to", + "data", + "paymentToken", + "payment", + "paymentReceiver" ] }, - "UpdateMessageSignatureDto": { + "GetCounterfactualSafesResponse": { "type": "object", "properties": { - "signature": { - "type": "string" + "safes": { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "$ref": "#/components/schemas/GetCounterfactualSafeItem" + } + }, + "example": { + "{chainId}": [ + { + "address": "0x...", + "factoryAddress": "0x...", + "masterCopy": "0x...", + "saltNonce": "1712000000000", + "safeVersion": "1.4.1", + "threshold": 1, + "owners": [ + "0x..." + ], + "fallbackHandler": "0x...", + "to": null, + "data": "0x...", + "paymentToken": null, + "payment": null, + "paymentReceiver": null + } + ] + } } }, "required": [ - "signature" + "safes" ] }, - "UserWallet": { + "DeleteCounterfactualSafeDto": { "type": "object", "properties": { - "id": { - "type": "number" + "chainId": { + "type": "string" }, "address": { "type": "string" } }, "required": [ - "id", + "chainId", "address" ] }, - "UserWithWallets": { + "DeleteCounterfactualSafesDto": { "type": "object", "properties": { - "id": { - "type": "number" - }, - "status": { - "type": "number", - "enum": [ - 0, - 1 - ] - }, - "wallets": { + "safes": { "type": "array", "items": { - "$ref": "#/components/schemas/UserWallet" + "$ref": "#/components/schemas/DeleteCounterfactualSafeDto" } } }, "required": [ - "id", - "status", - "wallets" + "safes" ] }, - "CreatedUserWithWallet": { + "SingleRecipientAnalysisResultDto": { "type": "object", "properties": { - "id": { - "type": "number" + "severity": { + "type": "string", + "description": "Severity level indicating the importance and risk", + "enum": [ + "OK", + "INFO", + "WARN", + "CRITICAL" + ] + }, + "type": { + "type": "string", + "description": "Recipient interaction status code", + "enum": [ + "NEW_RECIPIENT", + "RECURRING_RECIPIENT", + "LOW_ACTIVITY", + "FAILED" + ], + "example": "NEW_RECIPIENT" + }, + "title": { + "type": "string", + "description": "User-facing title of the finding" + }, + "description": { + "type": "string", + "description": "Detailed description explaining the finding and its implications" + }, + "error": { + "type": "string", + "description": "Error message for failed analysis" } }, "required": [ - "id" + "severity", + "type", + "title", + "description" ] }, - "WalletAddedToUser": { + "SingleRecipientAnalysisDto": { "type": "object", "properties": { - "id": { - "type": "number" + "RECIPIENT_INTERACTION": { + "description": "Analysis results related to recipient interaction history. Shows whether this is a new or recurring recipient.", + "example": [ + { + "severity": "INFO", + "type": "NEW_RECIPIENT", + "title": "New recipient", + "description": "This is the first time you are interacting with this recipient." + } + ], + "type": "array", + "items": { + "$ref": "#/components/schemas/SingleRecipientAnalysisResultDto" + } + }, + "RECIPIENT_ACTIVITY": { + "description": "Analysis results related to recipient activity. Shows whether this is a low activity recipient. (Available only for Safes)", + "example": [ + { + "severity": "WARN", + "type": "LOW_ACTIVITY", + "title": "Low activity recipient", + "description": "This address has few transactions." + } + ], + "type": "array", + "items": { + "$ref": "#/components/schemas/SingleRecipientAnalysisResultDto" + } + }, + "isSafe": { + "type": "boolean", + "description": "Indicates whether the analyzed recipient address is a Safe.", + "example": false } }, "required": [ - "id" + "RECIPIENT_INTERACTION", + "isSafe" ] }, - "SpaceAddressBookItemDto": { + "CounterpartyAnalysisRequestDto": { "type": "object", "properties": { - "name": { - "type": "string" - }, - "address": { - "type": "string" - }, - "chainIds": { - "type": "array", - "items": { - "type": "string" - } - }, - "createdBy": { + "to": { "type": "string", - "description": "Email or wallet address of the creator, \"Unknown user\" if the user has no display identity, or \"Deleted user\"" + "description": "Recipient address of the transaction." }, - "createdByUserId": { - "type": "number", - "description": "User ID of the creator" + "value": { + "type": "string", + "description": "Amount to send with the transaction." }, - "lastUpdatedBy": { + "data": { "type": "string", - "description": "Email or wallet address of the last editor, \"Unknown user\" if the user has no display identity, or \"Deleted user\"" + "description": "Hex-encoded data payload for the transaction." }, - "lastUpdatedByUserId": { + "operation": { "type": "number", - "description": "User ID of the last editor" - }, - "createdAt": { - "format": "date-time", - "type": "string" - }, - "updatedAt": { - "format": "date-time", - "type": "string" + "enum": [ + 0, + 1 + ], + "description": "Operation type: 0 for CALL, 1 for DELEGATECALL." } }, "required": [ - "name", - "address", - "chainIds", - "createdBy", - "createdByUserId", - "lastUpdatedBy", - "lastUpdatedByUserId", - "createdAt", - "updatedAt" + "to", + "value", + "data", + "operation" ] }, - "SpaceAddressBookDto": { + "RecipientResultDto": { "type": "object", "properties": { - "spaceUuid": { + "severity": { + "type": "string", + "description": "Severity level indicating the importance and risk", + "enum": [ + "OK", + "INFO", + "WARN", + "CRITICAL" + ] + }, + "type": { + "type": "string", + "description": "Bridge compatibility status code", + "enum": [ + "NEW_RECIPIENT", + "RECURRING_RECIPIENT", + "LOW_ACTIVITY", + "INCOMPATIBLE_SAFE", + "MISSING_OWNERSHIP", + "UNSUPPORTED_NETWORK", + "DIFFERENT_SAFE_SETUP", + "FAILED" + ], + "example": "MISSING_OWNERSHIP" + }, + "title": { + "type": "string", + "description": "User-facing title of the finding" + }, + "description": { + "type": "string", + "description": "Detailed description explaining the finding and its implications" + }, + "error": { "type": "string", - "description": "Space UUID" + "description": "Error message for failed analysis" }, - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SpaceAddressBookItemDto" - } + "targetChainId": { + "type": "string", + "description": "Target chain ID for bridge operations. Only present for BridgeStatus." } }, "required": [ - "spaceUuid", - "data" + "severity", + "type", + "title", + "description" ] }, - "AddressBookItem": { + "RecipientAnalysisDto": { "type": "object", "properties": { - "name": { - "type": "string" + "isSafe": { + "type": "boolean", + "description": "Indicates whether the analyzed recipient address is a Safe.", + "example": true }, - "address": { - "type": "string" + "RECIPIENT_INTERACTION": { + "description": "Analysis results related to recipient interaction history. Shows whether this is a new or recurring recipient.", + "example": [ + { + "severity": "INFO", + "type": "NEW_RECIPIENT", + "title": "New recipient", + "description": "This is the first time you are interacting with this recipient." + } + ], + "type": "array", + "items": { + "$ref": "#/components/schemas/RecipientResultDto" + } }, - "chainIds": { + "RECIPIENT_ACTIVITY": { + "description": "Analysis results related to recipient activity frequency. Shows whether this is a low activity recipient.", + "example": [ + { + "severity": "WARN", + "type": "LOW_ACTIVITY", + "title": "Low activity recipient", + "description": "This address has few transactions." + } + ], "type": "array", "items": { - "type": "string" + "$ref": "#/components/schemas/RecipientResultDto" + } + }, + "BRIDGE": { + "description": "Analysis results for cross-chain bridge operations. Identifies compatibility issues, ownership problems, or unsupported networks.", + "example": [ + { + "severity": "WARN", + "type": "MISSING_OWNERSHIP", + "title": "No ownership on target chain", + "description": "You do not have ownership of a Safe on the target chain.", + "targetChainId": "137" + } + ], + "type": "array", + "items": { + "$ref": "#/components/schemas/RecipientResultDto" } } }, "required": [ - "name", - "address", - "chainIds" + "isSafe" ] }, - "UpsertAddressBookItemsDto": { + "ContractAnalysisResultDto": { "type": "object", "properties": { - "items": { - "type": "array", - "items": { - "$ref": "#/components/schemas/AddressBookItem" - } + "severity": { + "type": "string", + "description": "Severity level indicating the importance and risk", + "enum": [ + "OK", + "INFO", + "WARN", + "CRITICAL" + ] + }, + "type": { + "type": "string", + "description": "Contract verification status code", + "enum": [ + "VERIFIED", + "NOT_VERIFIED", + "NOT_VERIFIED_BY_SAFE", + "VERIFICATION_UNAVAILABLE", + "NEW_CONTRACT", + "KNOWN_CONTRACT", + "UNEXPECTED_DELEGATECALL", + "UNOFFICIAL_FALLBACK_HANDLER", + "FAILED" + ], + "example": "VERIFIED" + }, + "title": { + "type": "string", + "description": "User-facing title of the finding" + }, + "description": { + "type": "string", + "description": "Detailed description explaining the finding and its implications" + }, + "error": { + "type": "string", + "description": "Error message for failed analysis" } }, "required": [ - "items" + "severity", + "type", + "title", + "description" ] }, - "AddressBookRequestItemDto": { + "FallbackHandlerInfoDto": { "type": "object", "properties": { - "id": { - "type": "number" - }, - "name": { - "type": "string" - }, "address": { - "type": "string" - }, - "chainIds": { - "type": "array", - "items": { - "type": "string" - } + "type": "string", + "description": "Address of the fallback handler contract" }, - "requestedBy": { + "name": { "type": "string", - "description": "Email or wallet address of the requester, \"Unknown user\" if the user has no display identity, or \"Deleted user\"" + "description": "Name of the fallback handler contract" }, - "requestedByUserId": { - "type": "number", - "description": "User ID of the requester" + "logoUrl": { + "type": "string", + "description": "Logo URL for the fallback handler contract" + } + }, + "required": [ + "address" + ] + }, + "FallbackHandlerAnalysisResultDto": { + "type": "object", + "properties": { + "severity": { + "type": "string", + "description": "Severity level indicating the importance and risk", + "enum": [ + "OK", + "INFO", + "WARN", + "CRITICAL" + ] }, - "reviewedBy": { + "type": { "type": "string", - "nullable": true, - "description": "Email or wallet address of the reviewing admin, \"Unknown user\", \"Deleted user\", or null when still PENDING" + "description": "Status code for unofficial fallback handler", + "enum": [ + "UNOFFICIAL_FALLBACK_HANDLER" + ], + "example": "VERIFIED" }, - "reviewedByUserId": { - "type": "number", - "nullable": true, - "description": "User ID of the reviewing admin, null when still PENDING" + "title": { + "type": "string", + "description": "User-facing title of the finding" }, - "status": { + "description": { "type": "string", - "enum": [ - "PENDING", - "APPROVED", - "REJECTED" - ] + "description": "Detailed description explaining the finding and its implications" }, - "createdAt": { - "format": "date-time", - "type": "string" + "error": { + "type": "string", + "description": "Error message for failed analysis" }, - "updatedAt": { - "format": "date-time", - "type": "string" + "fallbackHandler": { + "description": "Information about the fallback handler", + "allOf": [ + { + "$ref": "#/components/schemas/FallbackHandlerInfoDto" + } + ] } }, "required": [ - "id", - "name", - "address", - "chainIds", - "requestedBy", - "requestedByUserId", - "reviewedBy", - "reviewedByUserId", - "status", - "createdAt", - "updatedAt" + "severity", + "type", + "title", + "description" ] }, - "AddressBookRequestsDto": { + "ContractAnalysisDto": { "type": "object", "properties": { - "spaceUuid": { + "logoUrl": { "type": "string", - "description": "Space UUID" + "description": "Logo URL for the contract", + "example": "https://example.com/logo.png" }, - "data": { + "name": { + "type": "string", + "description": "Name of the contract", + "example": "Uniswap V3 Router" + }, + "CONTRACT_VERIFICATION": { + "description": "Analysis results for contract verification status. Shows whether contracts are verified and source code is available.", + "example": [ + { + "severity": "INFO", + "type": "VERIFIED", + "title": "Verified contract", + "description": "This contract has been verified and its source code is available" + } + ], + "type": "array", + "items": { + "$ref": "#/components/schemas/ContractAnalysisResultDto" + } + }, + "CONTRACT_INTERACTION": { + "description": "Analysis results related to contract interaction history. Shows whether this is a new or previously interacted contract.", + "example": [ + { + "severity": "INFO", + "type": "NEW_CONTRACT", + "title": "New contract", + "description": "This is the first time you are interacting with this contract" + } + ], "type": "array", "items": { - "$ref": "#/components/schemas/AddressBookRequestItemDto" + "$ref": "#/components/schemas/ContractAnalysisResultDto" } - } - }, - "required": [ - "spaceUuid", - "data" - ] - }, - "CreateAddressBookRequestDto": { - "type": "object", - "properties": { - "name": { - "type": "string", - "maxLength": 50, - "description": "Name of the proposed contact" }, - "address": { - "type": "string", - "description": "Address of the contact to propose for the space address book" + "DELEGATECALL": { + "description": "Analysis results for delegatecall operations. Identifies unexpected or potentially dangerous delegate calls.", + "example": [ + { + "severity": "CRITICAL", + "type": "UNEXPECTED_DELEGATECALL", + "title": "Unexpected delegatecall", + "description": "An unexpected delegatecall operation was detected that could be dangerous" + } + ], + "type": "array", + "items": { + "$ref": "#/components/schemas/ContractAnalysisResultDto" + } }, - "chainIds": { - "description": "Chain ids the contact applies to (at least one, duplicates are removed)", + "FALLBACK_HANDLER": { + "description": "Analysis results for setFallbackHandler operations. Identifies untrusted or unofficial fallback handlers in the transactions.", + "example": [ + { + "severity": "WARN", + "type": "UNOFFICIAL_FALLBACK_HANDLER", + "title": "Unofficial fallback handler", + "description": "Verify the fallback handler is trusted and secure before proceeding.", + "fallbackHandler": { + "address": "0x123", + "name": "CompatibilityFallbackHandler", + "logoUrl": "https://example.com/logo.png" + } + } + ], "type": "array", "items": { - "type": "string" + "$ref": "#/components/schemas/FallbackHandlerAnalysisResultDto" } } - }, - "required": [ - "name", - "address", - "chainIds" - ] - }, - "CreateSpaceDto": { - "type": "object", - "properties": { - "name": { - "type": "string" - } - }, - "required": [ - "name" - ] + } }, - "CreateSpaceResponse": { + "DeadlockAnalysisResultDto": { "type": "object", "properties": { - "name": { - "type": "string" + "severity": { + "type": "string", + "description": "Severity level indicating the importance and risk", + "enum": [ + "OK", + "INFO", + "WARN", + "CRITICAL" + ] }, - "uuid": { + "type": { "type": "string", - "description": "Space UUID" + "description": "Deadlock analysis status code", + "enum": [ + "DEADLOCK_DETECTED", + "NESTED_SAFE_WARNING", + "FAILED" + ], + "example": "DEADLOCK_DETECTED" + }, + "title": { + "type": "string", + "description": "User-facing title of the finding" + }, + "description": { + "type": "string", + "description": "Detailed description explaining the finding and its implications" + }, + "error": { + "type": "string", + "description": "Error message for failed analysis" } }, "required": [ - "name", - "uuid" + "severity", + "type", + "title", + "description" ] }, - "UserDto": { + "DeadlockAnalysisDto": { "type": "object", "properties": { - "id": { - "type": "number" + "DEADLOCK": { + "description": "Deadlock analysis findings. Identifies signing deadlock risks in nested Safe configurations.", + "example": [ + { + "severity": "CRITICAL", + "type": "DEADLOCK_DETECTED", + "title": "Signing deadlock risk detected", + "description": "This change may create a signing cycle between Safes and can permanently lock funds. You will not be allowed to proceed forward." + } + ], + "type": "array", + "items": { + "$ref": "#/components/schemas/DeadlockAnalysisResultDto" + } } - }, - "required": [ - "id" - ] + } }, - "SpaceMemberDto": { + "CounterpartyAnalysisDto": { "type": "object", "properties": { - "role": { - "type": "string", - "enum": [ - "ADMIN", - "MEMBER" - ] - }, - "name": { - "type": "string" - }, - "invitedBy": { - "type": "number", - "nullable": true - }, - "inviteExpiresAt": { - "format": "date-time", - "type": "string", - "nullable": true - }, - "invitedByName": { - "type": "string" + "recipient": { + "type": "object", + "description": "Recipient analysis results mapped by address. Contains recipient interaction history and bridge analysis.type: Record.", + "additionalProperties": { + "$ref": "#/components/schemas/RecipientAnalysisDto" + }, + "example": { + "0x0000000000000000000000000000000000000000": { + "isSafe": true, + "RECIPIENT_INTERACTION": [ + { + "severity": "INFO", + "type": "NEW_RECIPIENT", + "title": "New recipient", + "description": "This is the first time you are interacting with this recipient" + } + ] + } + } }, - "status": { - "type": "string", - "enum": [ - "INVITED", - "ACTIVE", - "DECLINED" - ] + "contract": { + "type": "object", + "description": "Contract analysis results mapped by address. Contains contract verification, interaction history, and delegatecall analysis.type: Record.", + "additionalProperties": { + "$ref": "#/components/schemas/ContractAnalysisDto" + }, + "example": { + "0x0000000000000000000000000000000000000000": { + "CONTRACT_VERIFICATION": [ + { + "severity": "INFO", + "type": "VERIFIED", + "title": "Verified contract", + "description": "This contract has been verified and its source code is available" + } + ] + } + } }, - "user": { - "$ref": "#/components/schemas/UserDto" + "deadlock": { + "type": "object", + "description": "Deadlock analysis results mapped by Safe address. Contains signing deadlock risk findings for owner/threshold management transactions.", + "additionalProperties": { + "$ref": "#/components/schemas/DeadlockAnalysisDto" + }, + "example": { + "0x0000000000000000000000000000000000000000": { + "DEADLOCK": [ + { + "severity": "CRITICAL", + "type": "DEADLOCK_DETECTED", + "title": "Signing deadlock risk detected", + "description": "This change may create a signing cycle between Safes and can permanently lock funds. You will not be allowed to proceed forward." + } + ] + } + } } }, "required": [ - "role", - "name", - "invitedBy", - "inviteExpiresAt", - "status", - "user" + "recipient", + "contract", + "deadlock" ] }, - "GetSpaceResponse": { + "ConflictHeaderQueuedItem": { "type": "object", "properties": { - "uuid": { + "type": { "type": "string", - "description": "Space UUID" - }, - "name": { - "type": "string" - }, - "members": { - "description": "Members of the space. A pending (INVITED) member only sees their own membership row here, not the other members.", - "type": "array", - "items": { - "$ref": "#/components/schemas/SpaceMemberDto" - } - }, - "memberCount": { - "type": "number", - "description": "Total count of ACTIVE members in the space", - "example": 5 + "enum": [ + "CONFLICT_HEADER" + ] }, - "safeCount": { - "type": "number", - "description": "Total count of Safes in the space", - "example": 5 + "nonce": { + "type": "number" } }, "required": [ - "uuid", - "name", - "members", - "memberCount", - "safeCount" + "type", + "nonce" ] }, - "UpdateSpaceDto": { + "LabelQueuedItem": { "type": "object", "properties": { - "name": { - "type": "string" - }, - "status": { + "type": { "type": "string", "enum": [ - "ACTIVE" + "LABEL" ] + }, + "label": { + "type": "string" } - } + }, + "required": [ + "type", + "label" + ] }, - "UpdateSpaceResponse": { + "TransactionInfo": { "type": "object", "properties": { - "uuid": { + "type": { "type": "string", - "description": "Space UUID" + "enum": [ + "Bridge", + "Creation", + "Custom", + "NativeStakingDeposit", + "NativeStakingValidatorsExit", + "NativeStakingWithdraw", + "SettingsChange", + "Swap", + "SwapAndBridge", + "SwapOrder", + "SwapTransfer", + "Transfer", + "TwapOrder", + "VaultDeposit", + "VaultRedeem" + ] + }, + "humanDescription": { + "type": "string", + "nullable": true } }, "required": [ - "uuid" + "type" ] }, - "SpaceAuditLogEntryDto": { + "CreationTransactionInfo": { "type": "object", "properties": { - "id": { - "type": "string", - "description": "Monotonic entry id (bigint serialized as string)" - }, - "eventType": { + "type": { "type": "string", "enum": [ - "SPACE_CREATED", - "SPACE_UPDATED", - "SPACE_DELETED", - "MEMBER_INVITED", - "MEMBER_INVITE_ACCEPTED", - "MEMBER_INVITE_DECLINED", - "MEMBER_INVITE_RENEWED", - "MEMBER_ROLE_UPDATED", - "MEMBER_ALIAS_UPDATED", - "MEMBER_REMOVED", - "MEMBER_LEFT", - "SAFE_ADDED", - "SAFE_REMOVED", - "ADDRESS_BOOK_UPSERTED", - "ADDRESS_BOOK_DELETED" + "Creation" ] }, - "actorUserId": { - "type": "number" - }, - "actor": { + "humanDescription": { "type": "string", - "description": "Resolved (and masked) display string of the acting user." + "nullable": true }, - "targetUser": { - "type": "string", - "nullable": true, - "description": "Resolved (and masked) display string of the affected user, when the event has one." + "creator": { + "$ref": "#/components/schemas/AddressInfo" }, - "payload": { + "transactionHash": { + "type": "string" + }, + "implementation": { + "nullable": true, "type": "object", - "description": "Event-specific payload, allowlisted per event type. Clients must treat every field as optional." + "allOf": [ + { + "$ref": "#/components/schemas/AddressInfo" + } + ] }, - "createdAt": { - "format": "date-time", - "type": "string" + "factory": { + "$ref": "#/components/schemas/AddressInfo" + }, + "saltNonce": { + "type": "string", + "nullable": true } }, "required": [ - "id", - "eventType", - "actorUserId", - "actor", - "targetUser", - "payload", - "createdAt" + "type", + "creator", + "transactionHash" ] }, - "SpaceAuditLogPage": { + "CustomTransactionInfo": { "type": "object", "properties": { - "count": { - "type": "number", - "nullable": true + "type": { + "type": "string", + "enum": [ + "Custom" + ] }, - "next": { + "humanDescription": { "type": "string", "nullable": true }, - "previous": { + "to": { + "$ref": "#/components/schemas/AddressInfo" + }, + "dataSize": { + "type": "string" + }, + "value": { "type": "string", "nullable": true }, - "results": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SpaceAuditLogEntryDto" - } - } - }, - "required": [ - "results" - ] - }, - "SpaceAuditLogActorDto": { - "type": "object", - "properties": { - "actorUserId": { - "type": "number" + "isCancellation": { + "type": "boolean" }, - "actor": { + "methodName": { "type": "string", - "description": "Resolved (and masked) display string of the actor." + "nullable": true } }, "required": [ - "actorUserId", - "actor" + "type", + "to", + "dataSize", + "isCancellation" ] }, - "SpaceSafeDto": { + "MultiSendTransactionInfo": { "type": "object", "properties": { - "chainId": { - "type": "string" + "type": { + "type": "string", + "enum": [ + "Custom" + ] }, - "address": { + "humanDescription": { + "type": "string", + "nullable": true + }, + "to": { + "$ref": "#/components/schemas/AddressInfo" + }, + "dataSize": { "type": "string" + }, + "value": { + "type": "string", + "nullable": true + }, + "isCancellation": { + "type": "boolean" + }, + "methodName": { + "type": "string", + "enum": [ + "multiSend" + ] + }, + "actionCount": { + "type": "number" } }, "required": [ - "chainId", - "address" - ] - }, - "CreateSpaceSafesDto": { - "type": "object", - "properties": { - "safes": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SpaceSafeDto" - } - } - }, - "required": [ - "safes" - ] - }, - "GetSpaceSafeResponse": { - "type": "object", - "properties": { - "safes": { - "type": "object", - "additionalProperties": { - "type": "array", - "items": { - "type": "string" - } - }, - "example": { - "{chainId}": [ - "0x..." - ] - } - } - }, - "required": [ - "safes" - ] - }, - "DeleteSpaceSafesDto": { - "type": "object", - "properties": { - "safes": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SpaceSafeDto" - } - } - }, - "required": [ - "safes" + "type", + "to", + "dataSize", + "isCancellation", + "methodName", + "actionCount" ] }, - "WalletInviteUserDto": { + "AddOwner": { "type": "object", "properties": { "type": { "type": "string", "enum": [ - "wallet" + "ADD_OWNER" ] }, - "address": { - "type": "string" - }, - "role": { - "type": "string", - "enum": [ - "ADMIN", - "MEMBER" - ] + "owner": { + "$ref": "#/components/schemas/AddressInfo" }, - "name": { - "type": "string", - "maxLength": 255 + "threshold": { + "type": "number" } }, "required": [ "type", - "address", - "role", - "name" + "owner", + "threshold" ] }, - "EmailInviteUserDto": { + "ChangeMasterCopy": { "type": "object", "properties": { "type": { "type": "string", "enum": [ - "email" + "CHANGE_MASTER_COPY" ] }, - "email": { - "type": "string", - "format": "email", - "maxLength": 255 - }, - "role": { + "implementation": { + "$ref": "#/components/schemas/AddressInfo" + } + }, + "required": [ + "type", + "implementation" + ] + }, + "ChangeThreshold": { + "type": "object", + "properties": { + "type": { "type": "string", "enum": [ - "ADMIN", - "MEMBER" + "CHANGE_THRESHOLD" ] }, - "name": { - "type": "string", - "maxLength": 255 + "threshold": { + "type": "number" } }, "required": [ "type", - "email", - "role", - "name" + "threshold" ] }, - "InviteUsersDto": { + "DeleteGuard": { "type": "object", "properties": { - "users": { - "type": "array", - "items": { - "oneOf": [ - { - "$ref": "#/components/schemas/WalletInviteUserDto" - }, - { - "$ref": "#/components/schemas/EmailInviteUserDto" - } - ] - } + "type": { + "type": "string", + "enum": [ + "DELETE_GUARD" + ] } }, "required": [ - "users" + "type" ] }, - "Invitation": { + "DeleteModuleGuard": { "type": "object", "properties": { - "userId": { - "type": "number" - }, - "name": { - "type": "string" - }, - "spaceUuid": { - "type": "string", - "description": "Space UUID" - }, - "role": { + "type": { "type": "string", "enum": [ - "ADMIN", - "MEMBER" + "DELETE_MODULE_GUARD" ] - }, - "status": { + } + }, + "required": [ + "type" + ] + }, + "DisableModule": { + "type": "object", + "properties": { + "type": { "type": "string", "enum": [ - "INVITED", - "ACTIVE", - "DECLINED" + "DISABLE_MODULE" ] }, - "invitedBy": { - "type": "number", - "nullable": true + "module": { + "$ref": "#/components/schemas/AddressInfo" } }, "required": [ - "userId", - "name", - "spaceUuid", - "role", - "status", - "invitedBy" + "type", + "module" ] }, - "AcceptInviteDto": { + "EnableModule": { "type": "object", "properties": { - "name": { + "type": { "type": "string", - "maxLength": 255 + "enum": [ + "ENABLE_MODULE" + ] + }, + "module": { + "$ref": "#/components/schemas/AddressInfo" } }, "required": [ - "name" + "type", + "module" ] }, - "MemberUser": { + "RemoveOwner": { "type": "object", "properties": { - "id": { - "type": "number" - }, - "status": { + "type": { "type": "string", "enum": [ - "PENDING", - "ACTIVE" + "REMOVE_OWNER" ] }, - "email": { - "type": "string", - "nullable": true + "owner": { + "$ref": "#/components/schemas/AddressInfo" + }, + "threshold": { + "type": "number" } }, "required": [ - "id", - "status", - "email" + "type", + "owner", + "threshold" ] }, - "MemberDto": { + "SetFallbackHandler": { "type": "object", "properties": { - "id": { - "type": "number" - }, - "role": { + "type": { "type": "string", "enum": [ - "ADMIN", - "MEMBER" + "SET_FALLBACK_HANDLER" ] }, - "status": { + "handler": { + "$ref": "#/components/schemas/AddressInfo" + } + }, + "required": [ + "type", + "handler" + ] + }, + "SetGuard": { + "type": "object", + "properties": { + "type": { "type": "string", "enum": [ - "INVITED", - "ACTIVE", - "DECLINED" + "SET_GUARD" ] }, - "name": { - "type": "string" - }, - "alias": { - "type": "string", - "nullable": true - }, - "invitedBy": { - "type": "number", - "nullable": true - }, - "inviteExpiresAt": { - "format": "date-time", - "type": "string", - "nullable": true - }, - "createdAt": { - "format": "date-time", - "type": "string" - }, - "updatedAt": { - "format": "date-time", - "type": "string" - }, - "user": { - "$ref": "#/components/schemas/MemberUser" + "guard": { + "$ref": "#/components/schemas/AddressInfo" } }, "required": [ - "id", - "role", - "status", - "name", - "invitedBy", - "createdAt", - "updatedAt", - "user" + "type", + "guard" ] }, - "MembersDto": { + "SetModuleGuard": { "type": "object", "properties": { - "members": { - "type": "array", - "items": { - "$ref": "#/components/schemas/MemberDto" - } + "type": { + "type": "string", + "enum": [ + "SET_MODULE_GUARD" + ] + }, + "moduleGuard": { + "$ref": "#/components/schemas/AddressInfo" } }, "required": [ - "members" + "type", + "moduleGuard" ] }, - "UpdateRoleDto": { + "SettingsChange": { "type": "object", "properties": { - "role": { + "type": { "type": "string", "enum": [ - "ADMIN", - "MEMBER" + "ADD_OWNER", + "CHANGE_MASTER_COPY", + "CHANGE_THRESHOLD", + "DELETE_GUARD", + "DELETE_MODULE_GUARD", + "DISABLE_MODULE", + "ENABLE_MODULE", + "REMOVE_OWNER", + "SET_FALLBACK_HANDLER", + "SET_GUARD", + "SET_MODULE_GUARD", + "SWAP_OWNER" ] } }, "required": [ - "role" + "type" ] }, - "UpdateMemberAliasDto": { + "SwapOwner": { "type": "object", "properties": { - "alias": { + "type": { "type": "string", - "description": "The new alias for the member" + "enum": [ + "SWAP_OWNER" + ] + }, + "oldOwner": { + "$ref": "#/components/schemas/AddressInfo" + }, + "newOwner": { + "$ref": "#/components/schemas/AddressInfo" } }, "required": [ - "alias" + "type", + "oldOwner", + "newOwner" ] }, - "CounterfactualSafeDto": { + "SettingsChangeTransaction": { "type": "object", "properties": { - "chainId": { - "type": "string" - }, - "address": { - "type": "string" - }, - "factoryAddress": { - "type": "string" - }, - "masterCopy": { - "type": "string" - }, - "saltNonce": { - "type": "string" - }, - "safeVersion": { - "type": "string" - }, - "threshold": { - "type": "number" - }, - "owners": { - "type": "array", - "items": { - "type": "string" - } - }, - "fallbackHandler": { - "type": "string", - "nullable": true - }, - "to": { + "type": { "type": "string", - "nullable": true - }, - "data": { - "type": "string" + "enum": [ + "SettingsChange" + ] }, - "paymentToken": { + "humanDescription": { "type": "string", "nullable": true }, - "payment": { - "type": "string", - "nullable": true + "dataDecoded": { + "$ref": "#/components/schemas/DataDecoded" }, - "paymentReceiver": { - "type": "string", - "nullable": true - } - }, - "required": [ - "chainId", - "address", - "factoryAddress", - "masterCopy", - "saltNonce", - "safeVersion", - "threshold", - "owners", - "data" - ] - }, - "CreateCounterfactualSafesDto": { - "type": "object", - "properties": { - "safes": { - "type": "array", - "items": { - "$ref": "#/components/schemas/CounterfactualSafeDto" - } + "settingsInfo": { + "oneOf": [ + { + "$ref": "#/components/schemas/AddOwner" + }, + { + "$ref": "#/components/schemas/ChangeMasterCopy" + }, + { + "$ref": "#/components/schemas/ChangeThreshold" + }, + { + "$ref": "#/components/schemas/DeleteGuard" + }, + { + "$ref": "#/components/schemas/DeleteModuleGuard" + }, + { + "$ref": "#/components/schemas/DisableModule" + }, + { + "$ref": "#/components/schemas/EnableModule" + }, + { + "$ref": "#/components/schemas/RemoveOwner" + }, + { + "$ref": "#/components/schemas/SetFallbackHandler" + }, + { + "$ref": "#/components/schemas/SetGuard" + }, + { + "$ref": "#/components/schemas/SetModuleGuard" + }, + { + "$ref": "#/components/schemas/SwapOwner" + } + ] } }, "required": [ - "safes" + "type", + "dataDecoded", + "settingsInfo" ] }, - "GetCounterfactualSafeItem": { + "Erc20Transfer": { "type": "object", "properties": { - "address": { - "type": "string" - }, - "factoryAddress": { - "type": "string" - }, - "masterCopy": { - "type": "string" + "type": { + "type": "string", + "enum": [ + "ERC20" + ] }, - "saltNonce": { + "tokenAddress": { "type": "string" }, - "safeVersion": { + "value": { "type": "string" }, - "threshold": { - "type": "number" - }, - "owners": { - "type": "array", - "items": { - "type": "string" - } - }, - "fallbackHandler": { + "tokenName": { "type": "string", "nullable": true }, - "to": { + "tokenSymbol": { "type": "string", "nullable": true }, - "data": { - "type": "string" - }, - "paymentToken": { + "logoUri": { "type": "string", "nullable": true }, - "payment": { - "type": "string", + "decimals": { + "type": "number", "nullable": true }, - "paymentReceiver": { - "type": "string", + "trusted": { + "type": "boolean", "nullable": true + }, + "imitation": { + "type": "boolean" } }, "required": [ - "address", - "factoryAddress", - "masterCopy", - "saltNonce", - "safeVersion", - "threshold", - "owners", - "fallbackHandler", - "to", - "data", - "paymentToken", - "payment", - "paymentReceiver" - ] - }, - "GetCounterfactualSafesResponse": { - "type": "object", - "properties": { - "safes": { - "type": "object", - "additionalProperties": { - "type": "array", - "items": { - "$ref": "#/components/schemas/GetCounterfactualSafeItem" - } - }, - "example": { - "{chainId}": [ - { - "address": "0x...", - "factoryAddress": "0x...", - "masterCopy": "0x...", - "saltNonce": "1712000000000", - "safeVersion": "1.4.1", - "threshold": 1, - "owners": [ - "0x..." - ], - "fallbackHandler": "0x...", - "to": null, - "data": "0x...", - "paymentToken": null, - "payment": null, - "paymentReceiver": null - } - ] - } - } - }, - "required": [ - "safes" + "type", + "tokenAddress", + "value", + "imitation" ] }, - "DeleteCounterfactualSafeDto": { + "Erc721Transfer": { "type": "object", "properties": { - "chainId": { + "type": { + "type": "string", + "enum": [ + "ERC721" + ] + }, + "tokenAddress": { "type": "string" }, - "address": { + "tokenId": { "type": "string" + }, + "tokenName": { + "type": "string", + "nullable": true + }, + "tokenSymbol": { + "type": "string", + "nullable": true + }, + "logoUri": { + "type": "string", + "nullable": true + }, + "trusted": { + "type": "boolean", + "nullable": true } }, "required": [ - "chainId", - "address" + "type", + "tokenAddress", + "tokenId" ] }, - "DeleteCounterfactualSafesDto": { + "NativeCoinTransfer": { "type": "object", "properties": { - "safes": { - "type": "array", - "items": { - "$ref": "#/components/schemas/DeleteCounterfactualSafeDto" - } + "type": { + "type": "string", + "enum": [ + "NATIVE_COIN" + ] + }, + "value": { + "type": "string", + "nullable": true } }, "required": [ - "safes" + "type" ] }, - "SurveyOptionDto": { + "Transfer": { "type": "object", "properties": { - "key": { - "type": "string" + "type": { + "type": "string", + "enum": [ + "NATIVE_COIN", + "ERC20", + "ERC721" + ] + } + }, + "required": [ + "type" + ] + }, + "TransferTransactionInfo": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "Transfer" + ] }, - "label": { - "type": "string" + "humanDescription": { + "type": "string", + "nullable": true }, - "description": { - "type": "string" + "sender": { + "$ref": "#/components/schemas/AddressInfo" }, - "icon": { - "type": "string" + "recipient": { + "$ref": "#/components/schemas/AddressInfo" + }, + "direction": { + "type": "string", + "enum": [ + "INCOMING", + "OUTGOING", + "UNKNOWN" + ] + }, + "transferInfo": { + "oneOf": [ + { + "$ref": "#/components/schemas/Erc20Transfer" + }, + { + "$ref": "#/components/schemas/Erc721Transfer" + }, + { + "$ref": "#/components/schemas/NativeCoinTransfer" + } + ], + "allOf": [ + { + "$ref": "#/components/schemas/Transfer" + } + ] } }, "required": [ - "key", - "label" + "type", + "sender", + "recipient", + "direction", + "transferInfo" ] }, - "SurveyPageDto": { + "BridgeFee": { "type": "object", "properties": { - "id": { + "tokenAddress": { "type": "string" }, - "title": { + "integratorFee": { "type": "string" }, - "subtitle": { - "type": "string", - "nullable": true - }, - "multiSelect": { - "type": "boolean" - }, - "options": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SurveyOptionDto" - } + "lifiFee": { + "type": "string" } }, "required": [ - "id", - "title", - "subtitle", - "multiSelect", - "options" + "tokenAddress", + "integratorFee", + "lifiFee" ] }, - "SurveyContentDto": { + "TokenInfo": { "type": "object", "properties": { - "pages": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SurveyPageDto" - } + "address": { + "type": "string", + "description": "The token address" + }, + "decimals": { + "type": "number", + "description": "The token decimals" + }, + "logoUri": { + "type": "string", + "nullable": true, + "description": "The logo URI for the token" + }, + "name": { + "type": "string", + "description": "The token name" + }, + "symbol": { + "type": "string", + "description": "The token symbol" + }, + "trusted": { + "type": "boolean", + "description": "The token trusted status" } }, "required": [ - "pages" + "address", + "decimals", + "name", + "symbol", + "trusted" ] }, - "SurveyDto": { + "BridgeAndSwapTransactionInfo": { "type": "object", "properties": { - "id": { - "type": "number" + "type": { + "type": "string", + "enum": [ + "SwapAndBridge" + ] + }, + "humanDescription": { + "type": "string", + "nullable": true + }, + "fromToken": { + "$ref": "#/components/schemas/TokenInfo" + }, + "recipient": { + "$ref": "#/components/schemas/AddressInfo" + }, + "explorerUrl": { + "type": "string", + "nullable": true + }, + "status": { + "type": "string", + "enum": [ + "NOT_FOUND", + "INVALID", + "PENDING", + "DONE", + "FAILED", + "UNKNOWN", + "AWAITING_EXECUTION" + ] + }, + "substatus": { + "type": "string", + "enum": [ + "WAIT_SOURCE_CONFIRMATIONS", + "WAIT_DESTINATION_TRANSACTION", + "BRIDGE_NOT_AVAILABLE", + "CHAIN_NOT_AVAILABLE", + "REFUND_IN_PROGRESS", + "UNKNOWN_ERROR", + "COMPLETED", + "PARTIAL", + "REFUNDED", + "INSUFFICIENT_ALLOWANCE", + "INSUFFICIENT_BALANCE", + "OUT_OF_GAS", + "EXPIRED", + "SLIPPAGE_EXCEEDED", + "UNKNOWN_FAILED_ERROR", + "UNKNOWN", + "AWAITING_EXECUTION" + ] + }, + "fees": { + "nullable": true, + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/BridgeFee" + } + ] }, - "slug": { + "fromAmount": { "type": "string" }, - "version": { - "type": "number" - }, - "title": { + "toChain": { "type": "string" }, - "subtitle": { + "toToken": { + "nullable": true, + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/TokenInfo" + } + ] + }, + "toAmount": { "type": "string", "nullable": true - }, - "surveyContent": { - "$ref": "#/components/schemas/SurveyContentDto" } }, "required": [ - "id", - "slug", - "version", - "title", - "subtitle", - "surveyContent" + "type", + "fromToken", + "recipient", + "explorerUrl", + "status", + "substatus", + "fees", + "fromAmount", + "toChain", + "toToken", + "toAmount" ] }, - "SpaceSurveyResponseDto": { + "SwapOrderTransactionInfo": { "type": "object", "properties": { - "surveyVersion": { - "type": "number" + "type": { + "type": "string", + "enum": [ + "SwapOrder" + ] }, - "selections": { - "type": "object", - "additionalProperties": { - "type": "array", - "items": { - "type": "string" - } - }, - "description": "Map from page id → selected option keys" + "humanDescription": { + "type": "string", + "nullable": true }, - "submittedAt": { - "format": "date-time", - "type": "string" + "uid": { + "type": "string", + "description": "The order UID" }, - "updatedAt": { - "format": "date-time", - "type": "string" + "status": { + "type": "string", + "enum": [ + "presignaturePending", + "open", + "fulfilled", + "cancelled", + "expired", + "unknown" + ] }, - "answeredByUserId": { + "kind": { + "type": "string", + "enum": [ + "buy", + "sell", + "unknown" + ] + }, + "orderClass": { + "type": "string", + "enum": [ + "market", + "limit", + "liquidity", + "unknown" + ] + }, + "validUntil": { "type": "number", - "nullable": true - } - }, - "required": [ - "surveyVersion", - "selections", - "submittedAt", - "updatedAt", - "answeredByUserId" - ] - }, - "SurveyStateDto": { - "type": "object", - "properties": { - "survey": { - "$ref": "#/components/schemas/SurveyDto" + "description": "The timestamp when the order expires" }, - "surveyResponse": { - "nullable": true, - "type": "object", + "sellAmount": { + "type": "string", + "description": "The sell token raw amount (no decimals)" + }, + "buyAmount": { + "type": "string", + "description": "The buy token raw amount (no decimals)" + }, + "executedSellAmount": { + "type": "string", + "description": "The executed sell token raw amount (no decimals)" + }, + "executedBuyAmount": { + "type": "string", + "description": "The executed buy token raw amount (no decimals)" + }, + "sellToken": { + "description": "The sell token of the order", "allOf": [ { - "$ref": "#/components/schemas/SpaceSurveyResponseDto" + "$ref": "#/components/schemas/TokenInfo" } ] - } - }, - "required": [ - "survey", - "surveyResponse" - ] - }, - "SubmitSurveyResponseDto": { - "type": "object", - "properties": { - "selections": { - "type": "object", - "additionalProperties": { - "type": "array", - "items": { - "type": "string" + }, + "buyToken": { + "description": "The buy token of the order", + "allOf": [ + { + "$ref": "#/components/schemas/TokenInfo" } - }, - "description": "Map from page id → selected option keys", - "example": { - "use_cases": [ - "run_payments", - "hold_assets" - ] - } - } - }, - "required": [ - "selections" - ] - }, - "SurveyResponseResultDto": { - "type": "object", - "properties": { - "id": { - "type": "number" + ] }, - "spaceUuid": { + "explorerUrl": { "type": "string", - "description": "Space UUID" - }, - "surveySlug": { - "type": "string" + "description": "The URL to the explorer page of the order" }, - "surveyVersion": { - "type": "number" + "executedFee": { + "type": "string", + "description": "The amount of fees paid for this order." }, - "selections": { - "type": "object", - "additionalProperties": { - "type": "array", - "items": { - "type": "string" + "executedFeeToken": { + "description": "The token in which the fee was paid, expressed by SURPLUS tokens (BUY tokens for SELL orders and SELL tokens for BUY orders).", + "allOf": [ + { + "$ref": "#/components/schemas/TokenInfo" } - } + ] }, - "submittedAt": { - "format": "date-time", - "type": "string" + "receiver": { + "type": "string", + "nullable": true, + "description": "The (optional) address to receive the proceeds of the trade" }, - "updatedAt": { - "format": "date-time", + "owner": { "type": "string" }, - "answeredByUserId": { - "type": "number", - "nullable": true + "fullAppData": { + "type": "object", + "nullable": true, + "description": "The App Data for this order" } }, "required": [ - "id", - "spaceUuid", - "surveySlug", - "surveyVersion", - "selections", - "submittedAt", - "updatedAt", - "answeredByUserId" + "type", + "uid", + "status", + "kind", + "orderClass", + "validUntil", + "sellAmount", + "buyAmount", + "executedSellAmount", + "executedBuyAmount", + "sellToken", + "buyToken", + "explorerUrl", + "executedFee", + "executedFeeToken", + "owner" ] }, - "FeatureKey": { - "type": "string", - "enum": [ - "safe_seats" - ], - "description": "Feature key from the entitlements catalog." - }, - "BinaryEntitlement": { + "SwapTransactionInfo": { "type": "object", "properties": { - "feature": { - "description": "Feature key from the entitlements catalog.", - "allOf": [ - { - "$ref": "#/components/schemas/FeatureKey" - } - ] - }, - "enabled": { - "type": "boolean", - "description": "Whether the plan grants the feature at all. A metered feature reports its quota and usage even when this is false." - }, "type": { "type": "string", "enum": [ - "binary" + "Swap" ] - } - }, - "required": [ - "feature", - "enabled", - "type" - ] - }, - "ValueEntitlement": { - "type": "object", - "properties": { - "feature": { - "description": "Feature key from the entitlements catalog.", + }, + "humanDescription": { + "type": "string", + "nullable": true + }, + "recipient": { + "$ref": "#/components/schemas/AddressInfo" + }, + "fees": { + "nullable": true, + "type": "object", "allOf": [ { - "$ref": "#/components/schemas/FeatureKey" + "$ref": "#/components/schemas/BridgeFee" } ] }, - "enabled": { - "type": "boolean", - "description": "Whether the plan grants the feature at all. A metered feature reports its quota and usage even when this is false." + "fromToken": { + "$ref": "#/components/schemas/TokenInfo" }, - "type": { - "type": "string", - "enum": [ - "value" - ] + "fromAmount": { + "type": "string" }, - "value": { + "toToken": { + "$ref": "#/components/schemas/TokenInfo" + }, + "toAmount": { + "type": "string" + }, + "lifiExplorerUrl": { "type": "string", "nullable": true } }, "required": [ - "feature", - "enabled", "type", - "value" + "recipient", + "fees", + "fromToken", + "fromAmount", + "toToken", + "toAmount", + "lifiExplorerUrl" ] }, - "MeteredEntitlement": { + "SwapTransferTransactionInfo": { "type": "object", "properties": { - "feature": { - "description": "Feature key from the entitlements catalog.", + "type": { + "type": "string", + "enum": [ + "SwapTransfer" + ] + }, + "humanDescription": { + "type": "string", + "nullable": true + }, + "sender": { + "$ref": "#/components/schemas/AddressInfo" + }, + "recipient": { + "$ref": "#/components/schemas/AddressInfo" + }, + "direction": { + "type": "string" + }, + "transferInfo": { + "oneOf": [ + { + "$ref": "#/components/schemas/Erc20Transfer" + }, + { + "$ref": "#/components/schemas/Erc721Transfer" + }, + { + "$ref": "#/components/schemas/NativeCoinTransfer" + } + ], "allOf": [ { - "$ref": "#/components/schemas/FeatureKey" + "$ref": "#/components/schemas/Transfer" } ] }, - "enabled": { - "type": "boolean", - "description": "Whether the plan grants the feature at all. A metered feature reports its quota and usage even when this is false." + "uid": { + "type": "string", + "description": "The order UID" }, - "type": { + "status": { "type": "string", "enum": [ - "metered" + "presignaturePending", + "open", + "fulfilled", + "cancelled", + "expired", + "unknown" ] }, - "quota": { - "type": "number", - "nullable": true, - "description": "The plan's quota, never inflated to match usage; null means unlimited." + "kind": { + "type": "string", + "enum": [ + "buy", + "sell", + "unknown" + ] }, - "used": { + "orderClass": { + "type": "string", + "enum": [ + "market", + "limit", + "liquidity", + "unknown" + ] + }, + "validUntil": { "type": "number", - "description": "May legally exceed `quota`." + "description": "The timestamp when the order expires" }, - "resetsAt": { - "format": "date-time", + "sellAmount": { "type": "string", - "nullable": true, - "description": "Null for stock-type features (seats) that have no reset window." - } - }, - "required": [ - "feature", - "enabled", - "type", - "quota", - "used", - "resetsAt" - ] - }, - "EntitlementsPlan": { - "type": "object", - "properties": { - "id": { + "description": "The sell token raw amount (no decimals)" + }, + "buyAmount": { "type": "string", - "description": "Plan identifier in the billing service" + "description": "The buy token raw amount (no decimals)" }, - "name": { + "executedSellAmount": { "type": "string", - "nullable": true + "description": "The executed sell token raw amount (no decimals)" }, - "cycleEndsAt": { - "format": "date-time", + "executedBuyAmount": { "type": "string", - "nullable": true, - "description": "End of the current billing cycle" - } - }, - "required": [ - "id", - "name", - "cycleEndsAt" - ] - }, - "EntitlementsResponse": { - "type": "object", - "properties": { - "plan": { - "nullable": true, - "description": "Null when the workspace has no active subscription.", - "type": "object", + "description": "The executed buy token raw amount (no decimals)" + }, + "sellToken": { + "description": "The sell token of the order", "allOf": [ { - "$ref": "#/components/schemas/EntitlementsPlan" + "$ref": "#/components/schemas/TokenInfo" } ] }, - "entitlements": { - "type": "array", - "description": "One entry per catalog feature. Which fields an entry carries is decided by `type`: a metered one always carries quota, usage and its reset window, and the others never do.", - "items": { - "oneOf": [ - { - "$ref": "#/components/schemas/BinaryEntitlement" - }, - { - "$ref": "#/components/schemas/ValueEntitlement" - }, - { - "$ref": "#/components/schemas/MeteredEntitlement" - } - ], - "discriminator": { - "propertyName": "type", - "mapping": { - "binary": "#/components/schemas/BinaryEntitlement", - "value": "#/components/schemas/ValueEntitlement", - "metered": "#/components/schemas/MeteredEntitlement" - } + "buyToken": { + "description": "The buy token of the order", + "allOf": [ + { + "$ref": "#/components/schemas/TokenInfo" } - } - } - }, - "required": [ - "plan", - "entitlements" - ] - }, - "SafeList": { - "type": "object", - "properties": { - "safes": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "required": [ - "safes" - ] - }, - "RelayDto": { - "type": "object", - "properties": { - "version": { - "type": "string" + ] + }, + "explorerUrl": { + "type": "string", + "description": "The URL to the explorer page of the order" }, - "to": { - "type": "string" + "executedFee": { + "type": "string", + "description": "The amount of fees paid for this order." }, - "data": { - "type": "string" + "executedFeeToken": { + "description": "The token in which the fee was paid, expressed by SURPLUS tokens (BUY tokens for SELL orders and SELL tokens for BUY orders).", + "allOf": [ + { + "$ref": "#/components/schemas/TokenInfo" + } + ] }, - "gasLimit": { + "receiver": { "type": "string", "nullable": true, - "description": "Accepted for backward compatibility and validation; not forwarded to the relay provider." + "description": "The (optional) address to receive the proceeds of the trade" }, - "safeTxHash": { - "type": "string", - "description": "Safe transaction hash for relay-fee eligibility check" + "owner": { + "type": "string" }, - "acceptUnverifiedSimulation": { - "type": "boolean", - "description": "Set to true to proceed with the relay when a previous attempt returned INDETERMINATE_SIMULATION. The user has acknowledged the simulation could not be completed and accepts the risk." + "fullAppData": { + "type": "object", + "nullable": true, + "description": "The App Data for this order" } }, "required": [ - "version", - "to", - "data" + "type", + "sender", + "recipient", + "direction", + "transferInfo", + "uid", + "status", + "kind", + "orderClass", + "validUntil", + "sellAmount", + "buyAmount", + "executedSellAmount", + "executedBuyAmount", + "sellToken", + "buyToken", + "explorerUrl", + "executedFee", + "executedFeeToken", + "owner" ] }, - "Relay": { + "DurationAuto": { "type": "object", "properties": { - "taskId": { - "type": "string" + "durationType": { + "type": "string", + "enum": [ + "AUTO" + ] } }, "required": [ - "taskId" + "durationType" ] }, - "RelayErrorResponse": { + "DurationLimit": { "type": "object", "properties": { - "code": { + "durationType": { "type": "string", "enum": [ - "SIMULATION_FAILED", - "INDETERMINATE_SIMULATION" - ], - "description": "Stable identifier of the error condition. The frontend MUST branch on this value (not on `message`, which is informational and may change)." - }, - "message": { - "type": "string", - "description": "Human-readable description of the error. Informational only; do not parse." + "LIMIT_DURATION" + ] }, - "statusCode": { - "type": "number", - "example": 422 + "duration": { + "type": "string" } }, "required": [ - "code", - "message", - "statusCode" + "durationType", + "duration" ] }, - "RelayTaskStatusReceipt": { + "StartTimeAtMining": { "type": "object", "properties": { - "transactionHash": { + "startType": { "type": "string", - "example": "0x4e4bb4493b2183061c3a0106ea96604edcc84f83313dbc0ab718abb1523d1042" - } - }, - "required": [ - "transactionHash" - ] - }, - "RelayTaskStatus": { - "type": "object", - "properties": { - "status": { - "type": "number", - "description": "Relay task status code: 100=Pending, 110=Submitted, 200=Included, 400=Rejected, 500=Reverted", "enum": [ - 100, - 110, - 200, - 400, - 500 - ], - "example": 200 - }, - "receipt": { - "description": "On-chain receipt. Only present when status is 200 (Included) or 500 (Reverted)", - "allOf": [ - { - "$ref": "#/components/schemas/RelayTaskStatusReceipt" - } + "AT_MINING_TIME" ] } }, "required": [ - "status" + "startType" ] }, - "RelaysRemaining": { + "StartTimeAtEpoch": { "type": "object", "properties": { - "remaining": { - "type": "number" + "startType": { + "type": "string", + "enum": [ + "AT_EPOCH" + ] }, - "limit": { + "epoch": { "type": "number" } }, "required": [ - "remaining", - "limit" - ] - }, - "SafeAppProvider": { - "type": "object", - "properties": { - "url": { - "type": "string" - }, - "name": { - "type": "string" - } - }, - "required": [ - "url", - "name" + "startType", + "epoch" ] }, - "SafeAppAccessControl": { + "TwapOrderTransactionInfo": { "type": "object", "properties": { "type": { - "type": "string" + "type": "string", + "enum": [ + "TwapOrder" + ] }, - "value": { - "nullable": true, - "type": "array", - "items": { - "type": "string" - } - } - }, - "required": [ - "type" - ] - }, - "SafeAppSocialProfile": { - "type": "object", - "properties": { - "platform": { + "humanDescription": { + "type": "string", + "nullable": true + }, + "status": { "type": "string", + "description": "The TWAP status", "enum": [ - "DISCORD", - "GITHUB", - "TWITTER", - "TELEGRAM", - "UNKNOWN" + "presignaturePending", + "open", + "fulfilled", + "cancelled", + "expired", + "unknown" ] }, - "url": { - "type": "string" - } - }, - "required": [ - "platform", - "url" - ] - }, - "SafeApp": { - "type": "object", - "properties": { - "id": { - "type": "number" + "kind": { + "type": "string", + "enum": [ + "buy", + "sell", + "unknown" + ] }, - "url": { - "type": "string" + "class": { + "type": "string", + "enum": [ + "market", + "limit", + "liquidity", + "unknown" + ] }, - "name": { - "type": "string" + "activeOrderUid": { + "type": "string", + "nullable": true, + "description": "The order UID of the active order, or null if none is active" }, - "iconUrl": { + "validUntil": { + "type": "number", + "description": "The timestamp when the TWAP expires" + }, + "sellAmount": { + "type": "string", + "description": "The sell token raw amount (no decimals)" + }, + "buyAmount": { + "type": "string", + "description": "The buy token raw amount (no decimals)" + }, + "executedSellAmount": { + "type": "string", + "nullable": true, + "description": "The executed sell token raw amount (no decimals), or null if there are too many parts" + }, + "executedBuyAmount": { + "type": "string", + "nullable": true, + "description": "The executed buy token raw amount (no decimals), or null if there are too many parts" + }, + "executedFee": { "type": "string", - "nullable": true + "nullable": true, + "description": "The executed surplus fee raw amount (no decimals), or null if there are too many parts" }, - "description": { - "type": "string" + "executedFeeToken": { + "description": "The token in which the fee was paid, expressed by SURPLUS tokens (BUY tokens for SELL orders and SELL tokens for BUY orders).", + "allOf": [ + { + "$ref": "#/components/schemas/TokenInfo" + } + ] }, - "chainIds": { - "type": "array", - "items": { - "type": "string" - } + "sellToken": { + "description": "The sell token of the TWAP", + "allOf": [ + { + "$ref": "#/components/schemas/TokenInfo" + } + ] }, - "provider": { - "nullable": true, - "type": "object", + "buyToken": { + "description": "The buy token of the TWAP", "allOf": [ { - "$ref": "#/components/schemas/SafeAppProvider" + "$ref": "#/components/schemas/TokenInfo" } ] }, - "accessControl": { - "$ref": "#/components/schemas/SafeAppAccessControl" + "receiver": { + "type": "string", + "description": "The address to receive the proceeds of the trade" }, - "tags": { - "type": "array", - "items": { - "type": "string" - } + "owner": { + "type": "string" }, - "features": { - "type": "array", - "items": { - "type": "string" - } + "fullAppData": { + "type": "object", + "nullable": true, + "description": "The App Data for this TWAP" }, - "developerWebsite": { + "numberOfParts": { "type": "string", - "nullable": true + "description": "The number of parts in the TWAP" }, - "socialProfiles": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SafeAppSocialProfile" - } + "partSellAmount": { + "type": "string", + "description": "The amount of sellToken to sell in each part" }, - "featured": { - "type": "boolean" + "minPartLimit": { + "type": "string", + "description": "The amount of buyToken that must be bought in each part" + }, + "timeBetweenParts": { + "type": "number", + "description": "The duration of the TWAP interval" + }, + "durationOfPart": { + "description": "Whether the TWAP is valid for the entire interval or not", + "oneOf": [ + { + "$ref": "#/components/schemas/DurationAuto" + }, + { + "$ref": "#/components/schemas/DurationLimit" + } + ] + }, + "startTime": { + "description": "The start time of the TWAP", + "oneOf": [ + { + "$ref": "#/components/schemas/StartTimeAtMining" + }, + { + "$ref": "#/components/schemas/StartTimeAtEpoch" + } + ] } }, "required": [ - "id", - "url", - "name", - "description", - "chainIds", - "accessControl", - "tags", - "features", - "socialProfiles", - "featured" + "type", + "status", + "kind", + "validUntil", + "sellAmount", + "buyAmount", + "executedFeeToken", + "sellToken", + "buyToken", + "receiver", + "owner", + "numberOfParts", + "partSellAmount", + "minPartLimit", + "timeBetweenParts", + "durationOfPart", + "startTime" ] }, - "SafeState": { + "NativeStakingDepositTransactionInfo": { "type": "object", "properties": { - "address": { - "$ref": "#/components/schemas/AddressInfo" + "type": { + "type": "string", + "enum": [ + "NativeStakingDeposit" + ] }, - "chainId": { - "type": "string" + "humanDescription": { + "type": "string", + "nullable": true }, - "nonce": { + "status": { + "type": "string", + "enum": [ + "NOT_STAKED", + "ACTIVATING", + "DEPOSIT_IN_PROGRESS", + "ACTIVE", + "EXIT_REQUESTED", + "EXITING", + "EXITED", + "SLASHED" + ] + }, + "estimatedEntryTime": { "type": "number" }, - "threshold": { + "estimatedExitTime": { "type": "number" }, - "owners": { - "type": "array", - "items": { - "$ref": "#/components/schemas/AddressInfo" - } + "estimatedWithdrawalTime": { + "type": "number" }, - "implementation": { - "$ref": "#/components/schemas/AddressInfo" + "fee": { + "type": "number" }, - "modules": { - "nullable": true, - "type": "array", - "items": { - "$ref": "#/components/schemas/AddressInfo" - } + "monthlyNrr": { + "type": "number" }, - "fallbackHandler": { - "nullable": true, - "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/AddressInfo" - } - ] + "annualNrr": { + "type": "number" }, - "guard": { - "nullable": true, - "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/AddressInfo" - } - ] + "value": { + "type": "string" }, - "version": { - "type": "string", - "nullable": true + "numValidators": { + "type": "number" }, - "implementationVersionState": { - "type": "string", - "enum": [ - "UP_TO_DATE", - "OUTDATED", - "UNKNOWN" - ] + "expectedAnnualReward": { + "type": "string" }, - "collectiblesTag": { - "type": "string", - "nullable": true + "expectedMonthlyReward": { + "type": "string" }, - "txQueuedTag": { - "type": "string", - "nullable": true + "expectedFiatAnnualReward": { + "type": "number" }, - "txHistoryTag": { - "type": "string", - "nullable": true + "expectedFiatMonthlyReward": { + "type": "number" }, - "messagesTag": { - "type": "string", - "nullable": true + "tokenInfo": { + "$ref": "#/components/schemas/TokenInfo" + }, + "validators": { + "nullable": true, + "description": "Populated after transaction has been executed", + "type": "array", + "items": { + "type": "string" + } } }, "required": [ - "address", - "chainId", - "nonce", - "threshold", - "owners", - "implementation", - "implementationVersionState" + "type", + "status", + "estimatedEntryTime", + "estimatedExitTime", + "estimatedWithdrawalTime", + "fee", + "monthlyNrr", + "annualNrr", + "value", + "numValidators", + "expectedAnnualReward", + "expectedMonthlyReward", + "expectedFiatAnnualReward", + "expectedFiatMonthlyReward", + "tokenInfo" ] }, - "SafeNonces": { + "NativeStakingValidatorsExitTransactionInfo": { "type": "object", "properties": { - "currentNonce": { + "type": { + "type": "string", + "enum": [ + "NativeStakingValidatorsExit" + ] + }, + "humanDescription": { + "type": "string", + "nullable": true + }, + "status": { + "type": "string", + "enum": [ + "NOT_STAKED", + "ACTIVATING", + "DEPOSIT_IN_PROGRESS", + "ACTIVE", + "EXIT_REQUESTED", + "EXITING", + "EXITED", + "SLASHED" + ] + }, + "estimatedExitTime": { "type": "number" }, - "recommendedNonce": { + "estimatedWithdrawalTime": { "type": "number" - } - }, - "required": [ - "currentNonce", - "recommendedNonce" - ] - }, - "SafeOverview": { - "type": "object", - "properties": { - "address": { - "$ref": "#/components/schemas/AddressInfo" }, - "chainId": { + "value": { "type": "string" }, - "threshold": { + "numValidators": { "type": "number" }, - "owners": { + "tokenInfo": { + "$ref": "#/components/schemas/TokenInfo" + }, + "validators": { "type": "array", "items": { - "$ref": "#/components/schemas/AddressInfo" + "type": "string" } - }, - "fiatTotal": { - "type": "string" - }, - "queued": { - "type": "number" - }, - "awaitingConfirmation": { - "type": "number", - "nullable": true } }, "required": [ - "address", - "chainId", - "threshold", - "owners", - "fiatTotal", - "queued" + "type", + "status", + "estimatedExitTime", + "estimatedWithdrawalTime", + "value", + "numValidators", + "tokenInfo", + "validators" ] }, - "SingleRecipientAnalysisResultDto": { + "NativeStakingWithdrawTransactionInfo": { "type": "object", "properties": { - "severity": { + "type": { "type": "string", - "description": "Severity level indicating the importance and risk", "enum": [ - "OK", - "INFO", - "WARN", - "CRITICAL" + "NativeStakingWithdraw" ] }, - "type": { + "humanDescription": { "type": "string", - "description": "Recipient interaction status code", - "enum": [ - "NEW_RECIPIENT", - "RECURRING_RECIPIENT", - "LOW_ACTIVITY", - "FAILED" - ], - "example": "NEW_RECIPIENT" + "nullable": true }, - "title": { - "type": "string", - "description": "User-facing title of the finding" + "value": { + "type": "string" }, - "description": { - "type": "string", - "description": "Detailed description explaining the finding and its implications" + "tokenInfo": { + "$ref": "#/components/schemas/TokenInfo" }, - "error": { - "type": "string", - "description": "Error message for failed analysis" + "validators": { + "type": "array", + "items": { + "type": "string" + } } }, "required": [ - "severity", "type", - "title", - "description" + "value", + "tokenInfo", + "validators" ] }, - "SingleRecipientAnalysisDto": { + "VaultInfo": { "type": "object", "properties": { - "RECIPIENT_INTERACTION": { - "description": "Analysis results related to recipient interaction history. Shows whether this is a new or recurring recipient.", - "example": [ - { - "severity": "INFO", - "type": "NEW_RECIPIENT", - "title": "New recipient", - "description": "This is the first time you are interacting with this recipient." - } - ], - "type": "array", - "items": { - "$ref": "#/components/schemas/SingleRecipientAnalysisResultDto" - } + "address": { + "type": "string" }, - "RECIPIENT_ACTIVITY": { - "description": "Analysis results related to recipient activity. Shows whether this is a low activity recipient. (Available only for Safes)", - "example": [ - { - "severity": "WARN", - "type": "LOW_ACTIVITY", - "title": "Low activity recipient", - "description": "This address has few transactions." - } - ], - "type": "array", - "items": { - "$ref": "#/components/schemas/SingleRecipientAnalysisResultDto" - } + "name": { + "type": "string" }, - "isSafe": { - "type": "boolean", - "description": "Indicates whether the analyzed recipient address is a Safe.", - "example": false + "description": { + "type": "string" + }, + "dashboardUri": { + "type": "string", + "nullable": true + }, + "logoUri": { + "type": "string" } }, "required": [ - "RECIPIENT_INTERACTION", - "isSafe" + "address", + "name", + "description", + "logoUri" ] }, - "CounterpartyAnalysisRequestDto": { + "VaultExtraReward": { "type": "object", "properties": { - "to": { - "type": "string", - "description": "Recipient address of the transaction." + "tokenInfo": { + "$ref": "#/components/schemas/TokenInfo" }, - "value": { - "type": "string", - "description": "Amount to send with the transaction." + "nrr": { + "type": "number" }, - "data": { - "type": "string", - "description": "Hex-encoded data payload for the transaction." + "claimable": { + "type": "string" }, - "operation": { - "type": "number", - "enum": [ - 0, - 1 - ], - "description": "Operation type: 0 for CALL, 1 for DELEGATECALL." + "claimableNext": { + "type": "string" } }, "required": [ - "to", - "value", - "data", - "operation" + "tokenInfo", + "nrr", + "claimable", + "claimableNext" ] }, - "RecipientResultDto": { + "VaultDepositTransactionInfo": { "type": "object", "properties": { - "severity": { + "type": { "type": "string", - "description": "Severity level indicating the importance and risk", "enum": [ - "OK", - "INFO", - "WARN", - "CRITICAL" + "VaultDeposit" ] }, - "type": { + "humanDescription": { "type": "string", - "description": "Bridge compatibility status code", - "enum": [ - "NEW_RECIPIENT", - "RECURRING_RECIPIENT", - "LOW_ACTIVITY", - "INCOMPATIBLE_SAFE", - "MISSING_OWNERSHIP", - "UNSUPPORTED_NETWORK", - "DIFFERENT_SAFE_SETUP", - "FAILED" - ], - "example": "MISSING_OWNERSHIP" + "nullable": true }, - "title": { - "type": "string", - "description": "User-facing title of the finding" + "value": { + "type": "string" + }, + "baseNrr": { + "type": "number" + }, + "fee": { + "type": "number" + }, + "tokenInfo": { + "$ref": "#/components/schemas/TokenInfo" + }, + "vaultInfo": { + "$ref": "#/components/schemas/VaultInfo" + }, + "currentReward": { + "type": "string" + }, + "additionalRewardsNrr": { + "type": "number" }, - "description": { - "type": "string", - "description": "Detailed description explaining the finding and its implications" + "additionalRewards": { + "type": "array", + "items": { + "$ref": "#/components/schemas/VaultExtraReward" + } }, - "error": { - "type": "string", - "description": "Error message for failed analysis" + "expectedMonthlyReward": { + "type": "string" }, - "targetChainId": { - "type": "string", - "description": "Target chain ID for bridge operations. Only present for BridgeStatus." + "expectedAnnualReward": { + "type": "string" } }, "required": [ - "severity", "type", - "title", - "description" + "value", + "baseNrr", + "fee", + "tokenInfo", + "vaultInfo", + "currentReward", + "additionalRewardsNrr", + "additionalRewards", + "expectedMonthlyReward", + "expectedAnnualReward" ] }, - "RecipientAnalysisDto": { + "VaultRedeemTransactionInfo": { "type": "object", "properties": { - "isSafe": { - "type": "boolean", - "description": "Indicates whether the analyzed recipient address is a Safe.", - "example": true + "type": { + "type": "string", + "enum": [ + "VaultRedeem" + ] }, - "RECIPIENT_INTERACTION": { - "description": "Analysis results related to recipient interaction history. Shows whether this is a new or recurring recipient.", - "example": [ - { - "severity": "INFO", - "type": "NEW_RECIPIENT", - "title": "New recipient", - "description": "This is the first time you are interacting with this recipient." - } - ], - "type": "array", - "items": { - "$ref": "#/components/schemas/RecipientResultDto" - } + "humanDescription": { + "type": "string", + "nullable": true }, - "RECIPIENT_ACTIVITY": { - "description": "Analysis results related to recipient activity frequency. Shows whether this is a low activity recipient.", - "example": [ - { - "severity": "WARN", - "type": "LOW_ACTIVITY", - "title": "Low activity recipient", - "description": "This address has few transactions." - } - ], - "type": "array", - "items": { - "$ref": "#/components/schemas/RecipientResultDto" - } + "value": { + "type": "string" }, - "BRIDGE": { - "description": "Analysis results for cross-chain bridge operations. Identifies compatibility issues, ownership problems, or unsupported networks.", - "example": [ - { - "severity": "WARN", - "type": "MISSING_OWNERSHIP", - "title": "No ownership on target chain", - "description": "You do not have ownership of a Safe on the target chain.", - "targetChainId": "137" - } - ], + "baseNrr": { + "type": "number" + }, + "fee": { + "type": "number" + }, + "tokenInfo": { + "$ref": "#/components/schemas/TokenInfo" + }, + "vaultInfo": { + "$ref": "#/components/schemas/VaultInfo" + }, + "currentReward": { + "type": "string" + }, + "additionalRewardsNrr": { + "type": "number" + }, + "additionalRewards": { "type": "array", "items": { - "$ref": "#/components/schemas/RecipientResultDto" + "$ref": "#/components/schemas/VaultExtraReward" } } }, "required": [ - "isSafe" + "type", + "value", + "baseNrr", + "fee", + "tokenInfo", + "vaultInfo", + "currentReward", + "additionalRewardsNrr", + "additionalRewards" ] }, - "ContractAnalysisResultDto": { + "ModuleExecutionInfo": { "type": "object", "properties": { - "severity": { - "type": "string", - "description": "Severity level indicating the importance and risk", - "enum": [ - "OK", - "INFO", - "WARN", - "CRITICAL" - ] - }, "type": { "type": "string", - "description": "Contract verification status code", "enum": [ - "VERIFIED", - "NOT_VERIFIED", - "NOT_VERIFIED_BY_SAFE", - "VERIFICATION_UNAVAILABLE", - "NEW_CONTRACT", - "KNOWN_CONTRACT", - "UNEXPECTED_DELEGATECALL", - "UNOFFICIAL_FALLBACK_HANDLER", - "FAILED" - ], - "example": "VERIFIED" - }, - "title": { - "type": "string", - "description": "User-facing title of the finding" - }, - "description": { - "type": "string", - "description": "Detailed description explaining the finding and its implications" + "MODULE" + ] }, - "error": { - "type": "string", - "description": "Error message for failed analysis" + "address": { + "$ref": "#/components/schemas/AddressInfo" } }, "required": [ - "severity", "type", - "title", - "description" + "address" ] }, - "FallbackHandlerInfoDto": { + "MultisigExecutionInfo": { "type": "object", "properties": { - "address": { + "type": { "type": "string", - "description": "Address of the fallback handler contract" + "enum": [ + "MULTISIG" + ] }, - "name": { - "type": "string", - "description": "Name of the fallback handler contract" + "nonce": { + "type": "number" }, - "logoUrl": { - "type": "string", - "description": "Logo URL for the fallback handler contract" + "confirmationsRequired": { + "type": "number" + }, + "confirmationsSubmitted": { + "type": "number" + }, + "missingSigners": { + "nullable": true, + "type": "array", + "items": { + "$ref": "#/components/schemas/AddressInfo" + } } }, "required": [ - "address" + "type", + "nonce", + "confirmationsRequired", + "confirmationsSubmitted" ] }, - "FallbackHandlerAnalysisResultDto": { + "Transaction": { "type": "object", "properties": { - "severity": { - "type": "string", - "description": "Severity level indicating the importance and risk", - "enum": [ - "OK", - "INFO", - "WARN", - "CRITICAL" - ] - }, - "type": { - "type": "string", - "description": "Status code for unofficial fallback handler", - "enum": [ - "UNOFFICIAL_FALLBACK_HANDLER" + "txInfo": { + "oneOf": [ + { + "$ref": "#/components/schemas/CreationTransactionInfo" + }, + { + "$ref": "#/components/schemas/CustomTransactionInfo" + }, + { + "$ref": "#/components/schemas/MultiSendTransactionInfo" + }, + { + "$ref": "#/components/schemas/SettingsChangeTransaction" + }, + { + "$ref": "#/components/schemas/TransferTransactionInfo" + }, + { + "$ref": "#/components/schemas/SwapOrderTransactionInfo" + }, + { + "$ref": "#/components/schemas/BridgeAndSwapTransactionInfo" + }, + { + "$ref": "#/components/schemas/SwapTransactionInfo" + }, + { + "$ref": "#/components/schemas/SwapTransferTransactionInfo" + }, + { + "$ref": "#/components/schemas/TwapOrderTransactionInfo" + }, + { + "$ref": "#/components/schemas/NativeStakingDepositTransactionInfo" + }, + { + "$ref": "#/components/schemas/NativeStakingValidatorsExitTransactionInfo" + }, + { + "$ref": "#/components/schemas/NativeStakingWithdrawTransactionInfo" + }, + { + "$ref": "#/components/schemas/VaultDepositTransactionInfo" + }, + { + "$ref": "#/components/schemas/VaultRedeemTransactionInfo" + } ], - "example": "VERIFIED" - }, - "title": { - "type": "string", - "description": "User-facing title of the finding" - }, - "description": { - "type": "string", - "description": "Detailed description explaining the finding and its implications" - }, - "error": { - "type": "string", - "description": "Error message for failed analysis" - }, - "fallbackHandler": { - "description": "Information about the fallback handler", "allOf": [ { - "$ref": "#/components/schemas/FallbackHandlerInfoDto" + "$ref": "#/components/schemas/TransactionInfo" } ] - } - }, - "required": [ - "severity", - "type", - "title", - "description" - ] - }, - "ContractAnalysisDto": { - "type": "object", - "properties": { - "logoUrl": { + }, + "id": { + "type": "string" + }, + "txHash": { "type": "string", - "description": "Logo URL for the contract", - "example": "https://example.com/logo.png" + "nullable": true }, - "name": { + "timestamp": { + "type": "number" + }, + "txStatus": { "type": "string", - "description": "Name of the contract", - "example": "Uniswap V3 Router" + "enum": [ + "SUCCESS", + "FAILED", + "CANCELLED", + "AWAITING_CONFIRMATIONS", + "AWAITING_EXECUTION" + ] }, - "CONTRACT_VERIFICATION": { - "description": "Analysis results for contract verification status. Shows whether contracts are verified and source code is available.", - "example": [ + "executionInfo": { + "oneOf": [ { - "severity": "INFO", - "type": "VERIFIED", - "title": "Verified contract", - "description": "This contract has been verified and its source code is available" - } - ], - "type": "array", - "items": { - "$ref": "#/components/schemas/ContractAnalysisResultDto" - } - }, - "CONTRACT_INTERACTION": { - "description": "Analysis results related to contract interaction history. Shows whether this is a new or previously interacted contract.", - "example": [ + "$ref": "#/components/schemas/MultisigExecutionInfo" + }, { - "severity": "INFO", - "type": "NEW_CONTRACT", - "title": "New contract", - "description": "This is the first time you are interacting with this contract" + "$ref": "#/components/schemas/ModuleExecutionInfo" } ], - "type": "array", - "items": { - "$ref": "#/components/schemas/ContractAnalysisResultDto" - } + "nullable": true }, - "DELEGATECALL": { - "description": "Analysis results for delegatecall operations. Identifies unexpected or potentially dangerous delegate calls.", - "example": [ + "safeAppInfo": { + "nullable": true, + "type": "object", + "allOf": [ { - "severity": "CRITICAL", - "type": "UNEXPECTED_DELEGATECALL", - "title": "Unexpected delegatecall", - "description": "An unexpected delegatecall operation was detected that could be dangerous" + "$ref": "#/components/schemas/SafeAppInfo" } - ], - "type": "array", - "items": { - "$ref": "#/components/schemas/ContractAnalysisResultDto" - } + ] }, - "FALLBACK_HANDLER": { - "description": "Analysis results for setFallbackHandler operations. Identifies untrusted or unofficial fallback handlers in the transactions.", - "example": [ - { - "severity": "WARN", - "type": "UNOFFICIAL_FALLBACK_HANDLER", - "title": "Unofficial fallback handler", - "description": "Verify the fallback handler is trusted and secure before proceeding.", - "fallbackHandler": { - "address": "0x123", - "name": "CompatibilityFallbackHandler", - "logoUrl": "https://example.com/logo.png" - } - } - ], - "type": "array", - "items": { - "$ref": "#/components/schemas/FallbackHandlerAnalysisResultDto" - } + "note": { + "type": "string", + "nullable": true } - } + }, + "required": [ + "txInfo", + "id", + "timestamp", + "txStatus" + ] }, - "DeadlockAnalysisResultDto": { + "TransactionQueuedItem": { "type": "object", "properties": { - "severity": { - "type": "string", - "description": "Severity level indicating the importance and risk", - "enum": [ - "OK", - "INFO", - "WARN", - "CRITICAL" - ] - }, "type": { "type": "string", - "description": "Deadlock analysis status code", "enum": [ - "DEADLOCK_DETECTED", - "NESTED_SAFE_WARNING", - "FAILED" - ], - "example": "DEADLOCK_DETECTED" - }, - "title": { - "type": "string", - "description": "User-facing title of the finding" + "TRANSACTION" + ] }, - "description": { - "type": "string", - "description": "Detailed description explaining the finding and its implications" + "transaction": { + "$ref": "#/components/schemas/Transaction" }, - "error": { + "conflictType": { "type": "string", - "description": "Error message for failed analysis" + "enum": [ + "None", + "HasNext", + "End" + ] } }, "required": [ - "severity", "type", - "title", - "description" - ] - }, - "DeadlockAnalysisDto": { - "type": "object", - "properties": { - "DEADLOCK": { - "description": "Deadlock analysis findings. Identifies signing deadlock risks in nested Safe configurations.", - "example": [ - { - "severity": "CRITICAL", - "type": "DEADLOCK_DETECTED", - "title": "Signing deadlock risk detected", - "description": "This change may create a signing cycle between Safes and can permanently lock funds. You will not be allowed to proceed forward." - } - ], - "type": "array", - "items": { - "$ref": "#/components/schemas/DeadlockAnalysisResultDto" - } - } - } - }, - "CounterpartyAnalysisDto": { - "type": "object", - "properties": { - "recipient": { - "type": "object", - "description": "Recipient analysis results mapped by address. Contains recipient interaction history and bridge analysis.type: Record.", - "additionalProperties": { - "$ref": "#/components/schemas/RecipientAnalysisDto" - }, - "example": { - "0x0000000000000000000000000000000000000000": { - "isSafe": true, - "RECIPIENT_INTERACTION": [ - { - "severity": "INFO", - "type": "NEW_RECIPIENT", - "title": "New recipient", - "description": "This is the first time you are interacting with this recipient" - } - ] - } - } - }, - "contract": { - "type": "object", - "description": "Contract analysis results mapped by address. Contains contract verification, interaction history, and delegatecall analysis.type: Record.", - "additionalProperties": { - "$ref": "#/components/schemas/ContractAnalysisDto" - }, - "example": { - "0x0000000000000000000000000000000000000000": { - "CONTRACT_VERIFICATION": [ - { - "severity": "INFO", - "type": "VERIFIED", - "title": "Verified contract", - "description": "This contract has been verified and its source code is available" - } - ] - } - } - }, - "deadlock": { - "type": "object", - "description": "Deadlock analysis results mapped by Safe address. Contains signing deadlock risk findings for owner/threshold management transactions.", - "additionalProperties": { - "$ref": "#/components/schemas/DeadlockAnalysisDto" - }, - "example": { - "0x0000000000000000000000000000000000000000": { - "DEADLOCK": [ - { - "severity": "CRITICAL", - "type": "DEADLOCK_DETECTED", - "title": "Signing deadlock risk detected", - "description": "This change may create a signing cycle between Safes and can permanently lock funds. You will not be allowed to proceed forward." - } - ] - } - } + "transaction", + "conflictType" + ] + }, + "SpaceQueueSafe": { + "type": "object", + "properties": { + "chainId": { + "type": "string" + }, + "safeAddress": { + "type": "string" } }, "required": [ - "recipient", - "contract", - "deadlock" + "chainId", + "safeAddress" ] }, - "ThreatAnalysisRequestDto": { + "SpaceQueueSafeCount": { "type": "object", "properties": { - "data": { - "description": "EIP-712 typed data to analyze for security threats. Contains domain, primaryType, types, and message fields following the EIP-712 standard for structured data signing.", - "allOf": [ - { - "$ref": "#/components/schemas/TypedData" - } - ] + "chainId": { + "type": "string" }, - "walletAddress": { - "type": "string", - "description": "Address of the transaction signer/wallet" + "safeAddress": { + "type": "string" }, - "origin": { - "type": "string", - "description": "Optional origin identifier for the request" + "count": { + "type": "number", + "description": "Transactions of this Safe on this chain that match every filter but `safes`" } }, "required": [ - "data", - "walletAddress" + "chainId", + "safeAddress", + "count" ] }, - "ThreatAnalysisResultDto": { + "SpaceQueueChainCount": { "type": "object", "properties": { - "severity": { - "type": "string", - "description": "Severity level indicating the importance and risk", - "enum": [ - "OK", - "INFO", - "WARN", - "CRITICAL" - ] - }, - "type": { - "type": "string", - "description": "Threat status code", - "enum": [ - "NO_THREAT", - "OWNERSHIP_CHANGE", - "MODULE_CHANGE" - ] - }, - "title": { - "type": "string", - "description": "User-facing title of the finding" + "chainId": { + "type": "string" }, - "description": { - "type": "string", - "description": "Detailed description explaining the finding and its implications" + "count": { + "type": "number", + "description": "Transactions on this chain that match every filter but `chainIds`" + } + }, + "required": [ + "chainId", + "count" + ] + }, + "SpaceQueueSignerCount": { + "type": "object", + "properties": { + "address": { + "type": "string" }, - "error": { - "type": "string", - "description": "Error message for failed analysis" + "count": { + "type": "number", + "description": "Transactions still awaiting this signer that match every filter but `signers`" } }, "required": [ - "severity", - "type", - "title", - "description" + "address", + "count" ] }, - "MasterCopyChangeThreatAnalysisResultDto": { + "SpaceQueueCounts": { "type": "object", "properties": { - "severity": { - "type": "string", - "description": "Severity level indicating the importance and risk", - "enum": [ - "OK", - "INFO", - "WARN", - "CRITICAL" - ] + "total": { + "type": "number", + "description": "Transactions that match every filter but the status ones, the sum of execute, sign, blocked and waiting" }, - "type": { - "type": "string", - "description": "Threat status code", - "enum": [ - "MASTERCOPY_CHANGE" - ] + "execute": { + "type": "number", + "description": "Fully signed and next in line on their Safe and chain" }, - "title": { - "type": "string", - "description": "User-facing title of the finding" + "sign": { + "type": "number", + "description": "Awaiting a signature from one of the caller wallets" }, - "description": { - "type": "string", - "description": "Detailed description explaining the finding and its implications" + "blocked": { + "type": "number", + "description": "Fully signed but behind an earlier nonce" }, - "error": { - "type": "string", - "description": "Error message for failed analysis" + "waiting": { + "type": "number", + "description": "Awaiting signatures from other owners only" }, - "before": { - "type": "string", - "description": "Address of the old master copy/implementation contract" + "conflicting": { + "type": "number", + "description": "Sharing their nonce with another transaction" }, - "after": { - "type": "string", - "description": "Address of the new master copy/implementation contract" + "stale": { + "type": "number", + "description": "Proposed more than 7 days ago" + }, + "safes": { + "description": "Every Safe and chain of the queue read, with how many of its transactions match every filter but `safes`", + "type": "array", + "items": { + "$ref": "#/components/schemas/SpaceQueueSafeCount" + } + }, + "chains": { + "description": "Every chain of the queue read, with how many of its transactions match every filter but `chainIds`", + "type": "array", + "items": { + "$ref": "#/components/schemas/SpaceQueueChainCount" + } + }, + "signers": { + "description": "Every signer a transaction of the queue read still awaits, with how many of those transactions match every filter but `signers`", + "type": "array", + "items": { + "$ref": "#/components/schemas/SpaceQueueSignerCount" + } } }, "required": [ - "severity", - "type", - "title", - "description", - "before", - "after" + "total", + "execute", + "sign", + "blocked", + "waiting", + "conflicting", + "stale", + "safes", + "chains", + "signers" ] }, - "ThreatIssueDto": { + "SpaceQueuedItemPage": { "type": "object", "properties": { - "address": { + "count": { + "type": "number", + "nullable": true, + "description": "Size of the whole queue, which can exceed the items returned when the queue is longer than the pages read" + }, + "next": { "type": "string", - "description": "Address involved in the issue, if applicable" + "nullable": true, + "description": "Always null: the queue is returned in one response" }, - "description": { + "previous": { "type": "string", - "description": "Issue description" + "nullable": true, + "description": "Always null: the queue is returned in one response" + }, + "results": { + "type": "object", + "additionalProperties": { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/ConflictHeaderQueuedItem" + }, + { + "$ref": "#/components/schemas/LabelQueuedItem" + }, + { + "$ref": "#/components/schemas/TransactionQueuedItem" + } + ] + } + } + }, + "example": { + "{safeAddress}": { + "{chainId}": [] + } + }, + "description": "Queued items, keyed by Safe address and then by chain ID, each list in nonce order." + }, + "unavailableSafes": { + "description": "Space Safes whose queue is missing from this response because their Safe information could not be loaded or the Space exceeds the Safes one request can cover.", + "type": "array", + "items": { + "$ref": "#/components/schemas/SpaceQueueSafe" + } + }, + "counts": { + "description": "Faceted counts of the queue read: each applies every filter but its own. The status counts skip the status filters (`status`, `conflicting`, `stale`); `safes`, `chains` and `signers` skip `safes`, `chainIds` and `signers`. The search narrows every count.", + "allOf": [ + { + "$ref": "#/components/schemas/SpaceQueueCounts" + } + ] } }, "required": [ - "description" + "count", + "next", + "previous", + "results", + "unavailableSafes", + "counts" ] }, - "MaliciousOrModerateThreatAnalysisResultDto": { + "PolicyConfigurationDto": { "type": "object", "properties": { - "severity": { + "target": { "type": "string", - "description": "Severity level indicating the importance and risk", - "enum": [ - "OK", - "INFO", - "WARN", - "CRITICAL" - ] + "description": "Contract the guarded call targets" }, - "type": { + "selector": { "type": "string", - "description": "Threat status code", + "description": "4-byte function selector", + "example": "0xa9059cbb" + }, + "operation": { + "type": "number", "enum": [ - "MALICIOUS", - "MODERATE" - ] + 0, + 1 + ], + "description": "0 = CALL, 1 = DELEGATECALL" }, - "title": { + "policy": { "type": "string", - "description": "User-facing title of the finding" + "description": "Policy contract to bind. The zero address removes the policy of this access." }, - "description": { + "data": { "type": "string", - "description": "Detailed description explaining the finding and its implications" - }, - "error": { + "description": "Policy payload, abi-encoded as passed to the guard. At most 64 KiB (65,536 bytes)." + } + }, + "required": [ + "target", + "selector", + "operation", + "policy", + "data" + ] + }, + "CreatePolicyConfigurationRequestDto": { + "type": "object", + "properties": { + "root": { "type": "string", - "description": "Error message for failed analysis" + "description": "keccak256(abi.encode(Configuration[])), as requested on-chain" }, - "issues": { - "type": "object", - "description": "A partial record of specific issues identified during threat analysis, grouped by severity.Record - keys should be one of the Severity enum (OK | INFO | WARN | CRITICAL)", - "additionalProperties": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ThreatIssueDto" - } - }, - "example": { - "CRITICAL": [ - { - "description": "Malicious contract interaction detected", - "address": "0x0000000000000000000000000000000000000000" - } - ], - "WARN": [ - { - "description": "High gas price detected" - } - ] + "configurations": { + "minItems": 1, + "maxItems": 100, + "type": "array", + "items": { + "$ref": "#/components/schemas/PolicyConfigurationDto" } } }, "required": [ - "severity", - "type", - "title", - "description" + "root", + "configurations" + ] + }, + "CreatePolicyConfigurationRequestResponse": { + "type": "object", + "properties": { + "root": { + "type": "string", + "description": "The stored configuration root" + } + }, + "required": [ + "root" ] }, - "FailedThreatAnalysisResultDto": { + "ModuleEnforcementDto": { "type": "object", "properties": { - "severity": { - "type": "string", - "description": "Severity level indicating the importance and risk", - "enum": [ - "OK", - "INFO", - "WARN", - "CRITICAL" - ] - }, - "type": { + "via": { "type": "string", - "description": "Threat status code", "enum": [ - "FAILED" + "module" ] }, - "title": { + "moduleAddress": { "type": "string", - "description": "User-facing title of the finding" - }, - "description": { + "description": "The module enforcing the policy" + } + }, + "required": [ + "via", + "moduleAddress" + ] + }, + "PolicyContractsDto": { + "type": "object", + "properties": { + "policyContract": { "type": "string", - "description": "Detailed description explaining the finding and its implications" + "description": "The policy implementation the guard delegates to" }, - "error": { + "safePolicyGuard": { "type": "string", - "description": "Error message for failed analysis" + "description": "The SafePolicyGuard deployment" } }, "required": [ - "severity", - "type", - "title", - "description" + "policyContract", + "safePolicyGuard" ] }, - "NativeAssetDetailsDto": { + "GuardSlotsDto": { "type": "object", "properties": { - "symbol": { + "transactionGuard": { + "$ref": "#/components/schemas/PolicyContractsDto" + }, + "moduleGuard": { + "$ref": "#/components/schemas/PolicyContractsDto" + } + } + }, + "PolicyAccessDto": { + "type": "object", + "properties": { + "target": { "type": "string", - "description": "Token symbol (if available)" + "description": "The contract the governed calls target" }, - "logo_url": { + "selector": { "type": "string", - "description": "URL to asset logo (if available)", - "example": "https://example.com/logo.png" + "description": "The 4-byte function selector of the governed calls" }, - "type": { + "operation": { "type": "string", - "description": "Asset type", "enum": [ - "NATIVE" + "CALL", + "DELEGATECALL" ] } }, "required": [ - "type" + "target", + "selector", + "operation" ] }, - "TokenAssetDetailsDto": { + "GuardEnforcementDto": { "type": "object", "properties": { - "symbol": { + "via": { "type": "string", - "description": "Token symbol (if available)" + "enum": [ + "guard" + ] }, - "logo_url": { - "type": "string", - "description": "URL to asset logo (if available)", - "example": "https://example.com/logo.png" + "guards": { + "$ref": "#/components/schemas/GuardSlotsDto" }, - "type": { + "access": { + "description": "The calls the guard applies the policy to", + "allOf": [ + { + "$ref": "#/components/schemas/PolicyAccessDto" + } + ] + } + }, + "required": [ + "via", + "guards", + "access" + ] + }, + "OffChainEnforcementDto": { + "type": "object", + "properties": { + "via": { "type": "string", - "description": "Asset type", "enum": [ - "ERC20", - "ERC721", - "ERC1155", - "NONERC" - ] + "offchain" + ], + "description": "Nothing on chain enforces the policy, so it is access rather than an audited restriction" }, - "address": { + "source": { "type": "string", - "description": "Token contract address" + "enum": [ + "delegates" + ], + "description": "Where the grant is held" } }, "required": [ - "type", - "address" + "via", + "source" ] }, - "FungibleDiffDto": { + "NativeTokenMetadataDto": { "type": "object", "properties": { - "value": { + "address": { + "type": "string" + }, + "decimals": { + "type": "number" + }, + "logoUri": { + "type": "string" + }, + "name": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "trusted": { + "type": "boolean", + "description": "Whether the Transaction Service lists the token in one of its imported token lists" + }, + "type": { "type": "string", - "description": "Value change for fungible tokens", - "example": "1000000" + "enum": [ + "NATIVE_TOKEN" + ] } - } + }, + "required": [ + "address", + "decimals", + "logoUri", + "name", + "symbol", + "trusted", + "type" + ] }, - "NFTDiffDto": { + "Erc20TokenMetadataDto": { "type": "object", "properties": { - "token_id": { - "type": "number", - "description": "Token ID for NFTs", - "example": 42 + "address": { + "type": "string" + }, + "decimals": { + "type": "number" + }, + "logoUri": { + "type": "string" + }, + "name": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "trusted": { + "type": "boolean", + "description": "Whether the Transaction Service lists the token in one of its imported token lists" + }, + "type": { + "type": "string", + "enum": [ + "ERC20" + ] } }, "required": [ - "token_id" + "address", + "decimals", + "logoUri", + "name", + "symbol", + "trusted", + "type" ] }, - "BalanceChangeDto": { + "SpendingLimitAllowanceDto": { "type": "object", "properties": { - "asset": { - "description": "Asset details", + "tokenAddress": { + "type": "string", + "description": "The token the limit applies to; zero address for native" + }, + "tokenMetadata": { "oneOf": [ { - "$ref": "#/components/schemas/NativeAssetDetailsDto" + "$ref": "#/components/schemas/NativeTokenMetadataDto" }, { - "$ref": "#/components/schemas/TokenAssetDetailsDto" + "$ref": "#/components/schemas/Erc20TokenMetadataDto" } - ] + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "NATIVE_TOKEN": "#/components/schemas/NativeTokenMetadataDto", + "ERC20": "#/components/schemas/Erc20TokenMetadataDto" + } + }, + "nullable": true, + "description": "Metadata of `tokenAddress`; null when it could not be resolved" }, - "in": { + "amount": { + "type": "string", + "description": "Per-window ceiling, in base units" + }, + "spent": { + "type": "string", + "description": "Spent in the current window, in base units" + }, + "resetPeriodMinutes": { + "type": "number", + "description": "Window length in minutes; 0 never resets" + }, + "resetsAtMinute": { + "type": "number", + "nullable": true, + "description": "Minutes since the epoch of the next reset, the unit the module counts windows in; null when it never resets" + }, + "resetBoundaryIsExact": { + "type": "boolean", + "description": "False when the reset boundary could not be recovered exactly, so `resetsAtMinute` may be up to one period out. `amount` is unaffected." + }, + "isDelegateActive": { + "type": "boolean", + "description": "False when the spender's delegate registration was removed: nothing is spendable now, but the allowance returns to effect if the delegate is re-added" + }, + "createdAt": { + "type": "number", + "description": "Unix seconds this allowance was (re-)established" + }, + "updatedAt": { + "type": "number", + "description": "Unix seconds of the last event that changed this allowance" + } + }, + "required": [ + "tokenAddress", + "tokenMetadata", + "amount", + "spent", + "resetPeriodMinutes", + "resetsAtMinute", + "resetBoundaryIsExact", + "isDelegateActive", + "createdAt", + "updatedAt" + ] + }, + "SpendingLimitSpenderDto": { + "type": "object", + "properties": { + "spender": { + "type": "string", + "description": "Name resolved by the client, never carried here" + }, + "isActive": { + "type": "boolean", + "description": "False when the spender is deregistered: nothing is spendable now, but the allowances survive and return if it is re-added" + }, + "allowances": { "type": "array", - "description": "Incoming asset changes", "items": { - "oneOf": [ - { - "$ref": "#/components/schemas/FungibleDiffDto" - }, - { - "$ref": "#/components/schemas/NFTDiffDto" - } - ] - }, - "example": [ - { - "value": "1000000" - } - ] + "$ref": "#/components/schemas/SpendingLimitAllowanceDto" + } + } + }, + "required": [ + "spender", + "isActive", + "allowances" + ] + }, + "SpendingLimitPolicyDataDto": { + "type": "object", + "properties": { + "module": { + "type": "string", + "description": "The allowance module holding this state" }, - "out": { + "spenders": { "type": "array", - "description": "Outgoing asset changes", "items": { - "oneOf": [ - { - "$ref": "#/components/schemas/FungibleDiffDto" - }, - { - "$ref": "#/components/schemas/NFTDiffDto" - } - ] - }, - "example": [ - { - "value": "500000" - } - ] + "$ref": "#/components/schemas/SpendingLimitSpenderDto" + } + } + }, + "required": [ + "module", + "spenders" + ] + }, + "ProposerGrantDto": { + "type": "object", + "properties": { + "delegator": { + "type": "string", + "description": "The owner that granted the proposer" + }, + "label": { + "type": "string", + "description": "The label this owner gave the proposer; empty when unlabelled" } }, "required": [ - "asset", - "in", - "out" + "delegator", + "label" ] }, - "ThreatAnalysisResponseDto": { + "ProposerDto": { "type": "object", "properties": { - "THREAT": { - "description": "Array of threat analysis results. Results are sorted by severity (CRITICAL first). May include malicious patterns, ownership changes, module changes, or master copy upgrades.", - "example": [ - { - "severity": "OK", - "type": "NO_THREAT", - "title": "No threats detected", - "description": "Transaction analysis found no security threats" - } - ], + "proposer": { + "type": "string", + "description": "The address allowed to propose transactions" + }, + "delegatedBy": { + "description": "The owners that granted it, each with the label they gave. The label is stored per grant, so two owners can label the same proposer differently", "type": "array", "items": { - "oneOf": [ - { - "$ref": "#/components/schemas/ThreatAnalysisResultDto" - }, - { - "$ref": "#/components/schemas/MasterCopyChangeThreatAnalysisResultDto" - }, - { - "$ref": "#/components/schemas/MaliciousOrModerateThreatAnalysisResultDto" - }, - { - "$ref": "#/components/schemas/FailedThreatAnalysisResultDto" - } - ] + "$ref": "#/components/schemas/ProposerGrantDto" } - }, - "BALANCE_CHANGE": { - "description": "Balance changes resulting from the transaction. Shows incoming and outgoing transfers for various asset types.", - "example": [ - { - "asset": { - "type": "ERC20", - "symbol": "USDC", - "address": "0x0000000000000000000000000000000000000000", - "logo_url": "https://example.com/usdc-logo.png" - }, - "in": [ - { - "value": "1000000" - } - ], - "out": [ - { - "value": "500000" - } - ] - } - ], + } + }, + "required": [ + "proposer", + "delegatedBy" + ] + }, + "ProposerPolicyDataDto": { + "type": "object", + "properties": { + "proposers": { "type": "array", "items": { - "$ref": "#/components/schemas/BalanceChangeDto" + "$ref": "#/components/schemas/ProposerDto" } + } + }, + "required": [ + "proposers" + ] + }, + "Erc20TransferRecipientDto": { + "type": "object", + "properties": { + "account": { + "type": "string", + "description": "An address the Safe can send this token to" }, - "request_id": { + "permission": { "type": "string", - "description": "Blockaid request ID from x-request-id header. Used for reporting false positives/negatives via the report endpoint.", - "example": "11111111-1111-1111-1111-111111111111" + "enum": [ + "ONCE", + "ALWAYS" + ] } - } + }, + "required": [ + "account", + "permission" + ] }, - "ReportFalseResultRequestDto": { + "Erc20TransferPolicyDataDto": { "type": "object", "properties": { - "event": { + "tokenAddress": { "type": "string", - "enum": [ - "FALSE_POSITIVE", - "FALSE_NEGATIVE" - ], - "description": "Type of report: FALSE_POSITIVE if flagged incorrectly, FALSE_NEGATIVE if should have been flagged" + "description": "The ERC20 token the allowlist applies to" }, - "request_id": { - "type": "string", - "description": "The request_id from the original Blockaid scan response", - "example": "11111111-1111-1111-1111-111111111111" + "tokenMetadata": { + "oneOf": [ + { + "$ref": "#/components/schemas/NativeTokenMetadataDto" + }, + { + "$ref": "#/components/schemas/Erc20TokenMetadataDto" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "NATIVE_TOKEN": "#/components/schemas/NativeTokenMetadataDto", + "ERC20": "#/components/schemas/Erc20TokenMetadataDto" + } + }, + "nullable": true, + "description": "Metadata of `tokenAddress`; null when it could not be resolved" }, - "details": { - "type": "string", - "description": "Details about why this is a false result", - "maxLength": 1000, - "example": "This transaction was incorrectly flagged as malicious" + "recipients": { + "description": "The recipients of the token transfers the policy permits", + "type": "array", + "items": { + "$ref": "#/components/schemas/Erc20TransferRecipientDto" + } } }, "required": [ - "event", - "request_id", - "details" + "tokenAddress", + "tokenMetadata", + "recipients" ] }, - "ReportFalseResultResponseDto": { + "CosignerPolicyDataDto": { "type": "object", "properties": { - "success": { - "type": "boolean", - "description": "Whether the report was submitted successfully", - "example": true + "cosignerAddress": { + "type": "string", + "description": "The cosigner the policy enforces." } }, "required": [ - "success" + "cosignerAddress" ] }, - "TargetedSafe": { + "StatelessPolicyDataDto": { + "type": "object", + "properties": {} + }, + "SafeRefDto": { "type": "object", "properties": { - "outreachId": { - "type": "number" + "chainId": { + "type": "string" }, "address": { "type": "string" } }, "required": [ - "outreachId", + "chainId", "address" ] }, - "Submission": { + "ActivePolicyDto": { "type": "object", "properties": { - "outreachId": { - "type": "number" + "type": { + "type": "string", + "enum": [ + "spending-limit", + "recovery", + "proposer", + "erc20-transfer", + "cosigner", + "allow", + "native-transfer", + "deny", + "multisend" + ] }, - "targetedSafeId": { - "type": "number" + "enforcement": { + "oneOf": [ + { + "$ref": "#/components/schemas/ModuleEnforcementDto" + }, + { + "$ref": "#/components/schemas/GuardEnforcementDto" + }, + { + "$ref": "#/components/schemas/OffChainEnforcementDto" + } + ], + "discriminator": { + "propertyName": "via", + "mapping": { + "module": "#/components/schemas/ModuleEnforcementDto", + "guard": "#/components/schemas/GuardEnforcementDto", + "offchain": "#/components/schemas/OffChainEnforcementDto" + } + } }, - "signerAddress": { - "type": "string" + "enabled": { + "type": "boolean", + "description": "False when the policy is configured but not enforced" }, - "completionDate": { - "format": "date-time", + "data": { + "oneOf": [ + { + "$ref": "#/components/schemas/SpendingLimitPolicyDataDto" + }, + { + "$ref": "#/components/schemas/ProposerPolicyDataDto" + }, + { + "$ref": "#/components/schemas/Erc20TransferPolicyDataDto" + }, + { + "$ref": "#/components/schemas/CosignerPolicyDataDto" + }, + { + "$ref": "#/components/schemas/StatelessPolicyDataDto" + } + ] + }, + "safe": { + "description": "The Safe the policy is in effect on", + "allOf": [ + { + "$ref": "#/components/schemas/SafeRefDto" + } + ] + } + }, + "required": [ + "type", + "enforcement", + "enabled", + "data", + "safe" + ] + }, + "EnableModuleChangeDto": { + "type": "object", + "properties": { + "kind": { "type": "string", - "nullable": true + "enum": [ + "enable-module" + ] } }, "required": [ - "outreachId", - "targetedSafeId", - "signerAddress" + "kind" ] }, - "CreateSubmissionDto": { + "AddDelegateChangeDto": { "type": "object", "properties": { - "completed": { - "type": "boolean" + "kind": { + "type": "string", + "enum": [ + "add-delegate" + ] + }, + "delegate": { + "type": "string", + "description": "The address being added as a delegate in AllowanceModule contract" } }, "required": [ - "completed" + "kind", + "delegate" ] }, - "TransactionInfo": { + "RemoveDelegateChangeDto": { "type": "object", "properties": { - "type": { + "kind": { "type": "string", "enum": [ - "Bridge", - "Creation", - "Custom", - "NativeStakingDeposit", - "NativeStakingValidatorsExit", - "NativeStakingWithdraw", - "SettingsChange", - "Swap", - "SwapAndBridge", - "SwapOrder", - "SwapTransfer", - "Transfer", - "TwapOrder", - "VaultDeposit", - "VaultRedeem" + "remove-delegate" + ] + }, + "delegate": { + "type": "string", + "description": "The delegate being removed" + }, + "removeAllowances": { + "type": "boolean", + "description": "Whether the delegate's allowances are deleted along with it" + } + }, + "required": [ + "kind", + "delegate", + "removeAllowances" + ] + }, + "SetAllowanceChangeDto": { + "type": "object", + "properties": { + "kind": { + "type": "string", + "enum": [ + "set-allowance" ] }, - "humanDescription": { + "delegate": { + "type": "string" + }, + "token": { + "type": "string", + "description": "The token the limit applies to; zero address for native" + }, + "tokenMetadata": { + "oneOf": [ + { + "$ref": "#/components/schemas/NativeTokenMetadataDto" + }, + { + "$ref": "#/components/schemas/Erc20TokenMetadataDto" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "NATIVE_TOKEN": "#/components/schemas/NativeTokenMetadataDto", + "ERC20": "#/components/schemas/Erc20TokenMetadataDto" + } + }, + "nullable": true, + "description": "Metadata of `token`; null when it could not be resolved" + }, + "amount": { "type": "string", - "nullable": true + "description": "Per-window ceiling, in base units" + }, + "resetPeriodMinutes": { + "type": "number", + "description": "Window length in minutes; 0 never resets" } }, "required": [ - "type" + "kind", + "delegate", + "token", + "tokenMetadata", + "amount", + "resetPeriodMinutes" ] }, - "CreationTransactionInfo": { + "ResetAllowanceChangeDto": { "type": "object", "properties": { - "type": { + "kind": { "type": "string", "enum": [ - "Creation" + "reset-allowance" ] }, - "humanDescription": { - "type": "string", - "nullable": true - }, - "creator": { - "$ref": "#/components/schemas/AddressInfo" + "delegate": { + "type": "string" }, - "transactionHash": { + "token": { "type": "string" }, - "implementation": { - "nullable": true, - "type": "object", - "allOf": [ + "tokenMetadata": { + "oneOf": [ { - "$ref": "#/components/schemas/AddressInfo" + "$ref": "#/components/schemas/NativeTokenMetadataDto" + }, + { + "$ref": "#/components/schemas/Erc20TokenMetadataDto" } - ] - }, - "factory": { - "$ref": "#/components/schemas/AddressInfo" - }, - "saltNonce": { - "type": "string", - "nullable": true + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "NATIVE_TOKEN": "#/components/schemas/NativeTokenMetadataDto", + "ERC20": "#/components/schemas/Erc20TokenMetadataDto" + } + }, + "nullable": true, + "description": "Metadata of `token`; null when it could not be resolved" } }, "required": [ - "type", - "creator", - "transactionHash" + "kind", + "delegate", + "token", + "tokenMetadata" ] }, - "CustomTransactionInfo": { + "DeleteAllowanceChangeDto": { "type": "object", "properties": { - "type": { + "kind": { "type": "string", "enum": [ - "Custom" + "delete-allowance" ] }, - "humanDescription": { - "type": "string", - "nullable": true - }, - "to": { - "$ref": "#/components/schemas/AddressInfo" + "delegate": { + "type": "string" }, - "dataSize": { + "token": { "type": "string" }, - "value": { + "tokenMetadata": { + "oneOf": [ + { + "$ref": "#/components/schemas/NativeTokenMetadataDto" + }, + { + "$ref": "#/components/schemas/Erc20TokenMetadataDto" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "NATIVE_TOKEN": "#/components/schemas/NativeTokenMetadataDto", + "ERC20": "#/components/schemas/Erc20TokenMetadataDto" + } + }, + "nullable": true, + "description": "Metadata of `token`; null when it could not be resolved" + } + }, + "required": [ + "kind", + "delegate", + "token", + "tokenMetadata" + ] + }, + "PendingSpendingLimitDataDto": { + "type": "object", + "properties": { + "module": { "type": "string", - "nullable": true + "description": "The AllowanceModule deployment holding this state" }, - "isCancellation": { - "type": "boolean" - }, - "methodName": { - "type": "string", - "nullable": true + "changes": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/EnableModuleChangeDto" + }, + { + "$ref": "#/components/schemas/AddDelegateChangeDto" + }, + { + "$ref": "#/components/schemas/RemoveDelegateChangeDto" + }, + { + "$ref": "#/components/schemas/SetAllowanceChangeDto" + }, + { + "$ref": "#/components/schemas/ResetAllowanceChangeDto" + }, + { + "$ref": "#/components/schemas/DeleteAllowanceChangeDto" + } + ], + "discriminator": { + "propertyName": "kind", + "mapping": { + "enable-module": "#/components/schemas/EnableModuleChangeDto", + "add-delegate": "#/components/schemas/AddDelegateChangeDto", + "remove-delegate": "#/components/schemas/RemoveDelegateChangeDto", + "set-allowance": "#/components/schemas/SetAllowanceChangeDto", + "reset-allowance": "#/components/schemas/ResetAllowanceChangeDto", + "delete-allowance": "#/components/schemas/DeleteAllowanceChangeDto" + } + } + }, + "description": "The AllowanceModule calls this transaction decodes to" } }, "required": [ - "type", - "to", - "dataSize", - "isCancellation" + "module", + "changes" ] }, - "MultiSendTransactionInfo": { + "PendingPolicyDto": { "type": "object", "properties": { + "kind": { + "type": "string", + "enum": [ + "queued-transaction" + ] + }, "type": { "type": "string", "enum": [ - "Custom" + "spending-limit" ] }, - "humanDescription": { + "enforcement": { + "$ref": "#/components/schemas/ModuleEnforcementDto" + }, + "safeTxHash": { "type": "string", - "nullable": true + "description": "The queued transaction this change was found in" }, - "to": { - "$ref": "#/components/schemas/AddressInfo" + "nonce": { + "type": "number" }, - "dataSize": { - "type": "string" + "confirmations": { + "type": "number" }, - "value": { - "type": "string", - "nullable": true + "confirmationsRequired": { + "type": "number" }, - "isCancellation": { - "type": "boolean" + "proposedAt": { + "type": "number", + "description": "Unix seconds the transaction was proposed at" }, - "methodName": { + "proposer": { "type": "string", - "enum": [ - "multiSend" - ] + "nullable": true, + "description": "The owner or delegate who proposed the transaction, if known" }, - "actionCount": { - "type": "number" + "data": { + "$ref": "#/components/schemas/PendingSpendingLimitDataDto" + }, + "safe": { + "description": "The Safe the change is queued on", + "allOf": [ + { + "$ref": "#/components/schemas/SafeRefDto" + } + ] } }, "required": [ + "kind", "type", - "to", - "dataSize", - "isCancellation", - "methodName", - "actionCount" + "enforcement", + "safeTxHash", + "nonce", + "confirmations", + "confirmationsRequired", + "proposedAt", + "proposer", + "data", + "safe" ] }, - "AddOwner": { + "SetGuardChangeDto": { "type": "object", "properties": { - "type": { + "kind": { "type": "string", "enum": [ - "ADD_OWNER" + "set-guard" ] }, - "owner": { - "$ref": "#/components/schemas/AddressInfo" + "from": { + "type": "string", + "nullable": true, + "description": "The transaction guard before this call; null for none" }, - "threshold": { - "type": "number" + "to": { + "type": "string", + "nullable": true, + "description": "The transaction guard after this call; null removes it" } }, "required": [ - "type", - "owner", - "threshold" + "kind", + "from", + "to" ] }, - "ChangeMasterCopy": { + "SetModuleGuardChangeDto": { "type": "object", "properties": { - "type": { + "kind": { "type": "string", "enum": [ - "CHANGE_MASTER_COPY" + "set-module-guard" ] }, - "implementation": { - "$ref": "#/components/schemas/AddressInfo" + "from": { + "type": "string", + "nullable": true, + "description": "The module guard before this call; null for none" + }, + "to": { + "type": "string", + "nullable": true, + "description": "The module guard after this call; null removes it" } }, "required": [ - "type", - "implementation" + "kind", + "from", + "to" ] }, - "ChangeThreshold": { + "PendingTransactionDto": { "type": "object", "properties": { - "type": { - "type": "string", - "enum": [ - "CHANGE_THRESHOLD" - ] + "safeTxHash": { + "type": "string" }, - "threshold": { + "nonce": { + "type": "number" + }, + "confirmations": { + "type": "number" + }, + "confirmationsRequired": { "type": "number" + }, + "proposedAt": { + "type": "number", + "description": "Unix seconds the transaction was proposed at" + }, + "proposer": { + "type": "string", + "nullable": true, + "description": "The owner or delegate who proposed the transaction, if known" } }, "required": [ - "type", - "threshold" + "safeTxHash", + "nonce", + "confirmations", + "confirmationsRequired", + "proposedAt", + "proposer" ] }, - "DeleteGuard": { + "PendingGuardInstallationDto": { "type": "object", "properties": { - "type": { + "kind": { "type": "string", "enum": [ - "DELETE_GUARD" + "guard-installation" + ] + }, + "status": { + "type": "string", + "enum": [ + "in-signing", + "ready" + ] + }, + "safe": { + "description": "The Safe the transaction is queued on", + "allOf": [ + { + "$ref": "#/components/schemas/SafeRefDto" + } ] + }, + "changes": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/SetGuardChangeDto" + }, + { + "$ref": "#/components/schemas/SetModuleGuardChangeDto" + } + ], + "discriminator": { + "propertyName": "kind", + "mapping": { + "set-guard": "#/components/schemas/SetGuardChangeDto", + "set-module-guard": "#/components/schemas/SetModuleGuardChangeDto" + } + } + }, + "description": "The guard installation calls of the transaction, in calldata order" + }, + "transaction": { + "$ref": "#/components/schemas/PendingTransactionDto" } }, "required": [ - "type" + "kind", + "status", + "safe", + "changes", + "transaction" ] }, - "DeleteModuleGuard": { + "PendingImmediateGuardPoliciesDto": { "type": "object", "properties": { - "type": { + "kind": { "type": "string", "enum": [ - "DELETE_MODULE_GUARD" + "immediate-guard-policies" ] - } - }, - "required": [ - "type" - ] - }, - "DisableModule": { - "type": "object", - "properties": { - "type": { + }, + "status": { "type": "string", "enum": [ - "DISABLE_MODULE" + "in-signing", + "ready" ] }, - "module": { - "$ref": "#/components/schemas/AddressInfo" + "safe": { + "description": "The Safe the transaction is queued on", + "allOf": [ + { + "$ref": "#/components/schemas/SafeRefDto" + } + ] + }, + "guard": { + "type": "string", + "description": "The SafePolicyGuard the policies are bound on" + }, + "configurations": { + "description": "The configurations configureImmediately binds", + "type": "array", + "items": { + "$ref": "#/components/schemas/PolicyConfigurationDto" + } + }, + "transaction": { + "$ref": "#/components/schemas/PendingTransactionDto" } }, "required": [ - "type", - "module" + "kind", + "status", + "safe", + "guard", + "configurations", + "transaction" ] }, - "EnableModule": { + "PendingDelayedGuardPoliciesDto": { "type": "object", "properties": { - "type": { + "kind": { "type": "string", "enum": [ - "ENABLE_MODULE" + "delayed-guard-policies" ] }, - "module": { - "$ref": "#/components/schemas/AddressInfo" - } - }, - "required": [ - "type", - "module" - ] - }, - "RemoveOwner": { - "type": "object", - "properties": { - "type": { + "status": { "type": "string", "enum": [ - "REMOVE_OWNER" + "draft", + "configuration-in-signing", + "pending-application", + "application-in-signing", + "application-ready", + "expired" + ], + "description": "draft: stored in CGW, no transaction in signing yet. configuration-in-signing: requestConfiguration is queued. pending-application: requested, waiting for or past readyAt. application-in-signing: applyConfiguration is queued and collecting signatures. application-ready: applyConfiguration is signed and can execute. expired: the application window has closed." + }, + "safe": { + "description": "The Safe the configuration belongs to", + "allOf": [ + { + "$ref": "#/components/schemas/SafeRefDto" + } ] }, - "owner": { - "$ref": "#/components/schemas/AddressInfo" + "guard": { + "type": "string", + "nullable": true, + "description": "The SafePolicyGuard of the root; null for a draft" }, - "threshold": { - "type": "number" + "root": { + "type": "string", + "description": "keccak256(abi.encode(Configuration[]))" + }, + "configurations": { + "nullable": true, + "description": "The configurations behind the root; null when CGW does not know them", + "type": "array", + "items": { + "$ref": "#/components/schemas/PolicyConfigurationDto" + } + }, + "readyAt": { + "type": "number", + "nullable": true, + "description": "Unix seconds applyConfiguration is valid from; null until the root is requested on-chain" + }, + "expiresAt": { + "type": "number", + "nullable": true, + "description": "Unix seconds the application window closes; null until the root is requested on-chain" + }, + "transaction": { + "nullable": true, + "description": "The queued request or apply transaction, if any", + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/PendingTransactionDto" + } + ] + }, + "createdAt": { + "type": "number", + "nullable": true, + "description": "Unix seconds the change was first seen: when CGW stored its configurations, else when its queued transaction was proposed. Null for a root requested outside the wallet." } }, "required": [ - "type", - "owner", - "threshold" + "kind", + "status", + "safe", + "guard", + "root", + "configurations", + "readyAt", + "expiresAt", + "transaction", + "createdAt" ] }, - "SetFallbackHandler": { + "SurveyOptionDto": { "type": "object", "properties": { - "type": { - "type": "string", - "enum": [ - "SET_FALLBACK_HANDLER" - ] + "key": { + "type": "string" }, - "handler": { - "$ref": "#/components/schemas/AddressInfo" + "label": { + "type": "string" + }, + "description": { + "type": "string" + }, + "icon": { + "type": "string" } }, "required": [ - "type", - "handler" + "key", + "label" ] }, - "SetGuard": { + "SurveyPageDto": { "type": "object", "properties": { - "type": { + "id": { + "type": "string" + }, + "title": { + "type": "string" + }, + "subtitle": { "type": "string", - "enum": [ - "SET_GUARD" - ] + "nullable": true }, - "guard": { - "$ref": "#/components/schemas/AddressInfo" + "multiSelect": { + "type": "boolean" + }, + "options": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SurveyOptionDto" + } } }, "required": [ - "type", - "guard" + "id", + "title", + "subtitle", + "multiSelect", + "options" ] }, - "SetModuleGuard": { + "SurveyContentDto": { "type": "object", "properties": { - "type": { - "type": "string", - "enum": [ - "SET_MODULE_GUARD" - ] - }, - "moduleGuard": { - "$ref": "#/components/schemas/AddressInfo" + "pages": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SurveyPageDto" + } } }, "required": [ - "type", - "moduleGuard" + "pages" ] }, - "SettingsChange": { + "SurveyDto": { "type": "object", "properties": { - "type": { + "id": { + "type": "number" + }, + "slug": { + "type": "string" + }, + "version": { + "type": "number" + }, + "title": { + "type": "string" + }, + "subtitle": { "type": "string", - "enum": [ - "ADD_OWNER", - "CHANGE_MASTER_COPY", - "CHANGE_THRESHOLD", - "DELETE_GUARD", - "DELETE_MODULE_GUARD", - "DISABLE_MODULE", - "ENABLE_MODULE", - "REMOVE_OWNER", - "SET_FALLBACK_HANDLER", - "SET_GUARD", - "SET_MODULE_GUARD", - "SWAP_OWNER" - ] + "nullable": true + }, + "surveyContent": { + "$ref": "#/components/schemas/SurveyContentDto" } }, "required": [ - "type" + "id", + "slug", + "version", + "title", + "subtitle", + "surveyContent" ] }, - "SwapOwner": { + "SpaceSurveyResponseDto": { "type": "object", "properties": { - "type": { - "type": "string", - "enum": [ - "SWAP_OWNER" - ] + "surveyVersion": { + "type": "number" }, - "oldOwner": { - "$ref": "#/components/schemas/AddressInfo" + "selections": { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + }, + "description": "Map from page id → selected option keys" }, - "newOwner": { - "$ref": "#/components/schemas/AddressInfo" + "submittedAt": { + "format": "date-time", + "type": "string" + }, + "updatedAt": { + "format": "date-time", + "type": "string" + }, + "answeredByUserId": { + "type": "number", + "nullable": true } }, "required": [ - "type", - "oldOwner", - "newOwner" + "surveyVersion", + "selections", + "submittedAt", + "updatedAt", + "answeredByUserId" ] }, - "SettingsChangeTransaction": { + "SurveyStateDto": { "type": "object", "properties": { - "type": { - "type": "string", - "enum": [ - "SettingsChange" - ] - }, - "humanDescription": { - "type": "string", - "nullable": true - }, - "dataDecoded": { - "$ref": "#/components/schemas/DataDecoded" + "survey": { + "$ref": "#/components/schemas/SurveyDto" }, - "settingsInfo": { - "oneOf": [ - { - "$ref": "#/components/schemas/AddOwner" - }, - { - "$ref": "#/components/schemas/ChangeMasterCopy" - }, - { - "$ref": "#/components/schemas/ChangeThreshold" - }, - { - "$ref": "#/components/schemas/DeleteGuard" - }, - { - "$ref": "#/components/schemas/DeleteModuleGuard" - }, - { - "$ref": "#/components/schemas/DisableModule" - }, - { - "$ref": "#/components/schemas/EnableModule" - }, - { - "$ref": "#/components/schemas/RemoveOwner" - }, - { - "$ref": "#/components/schemas/SetFallbackHandler" - }, - { - "$ref": "#/components/schemas/SetGuard" - }, - { - "$ref": "#/components/schemas/SetModuleGuard" - }, + "surveyResponse": { + "nullable": true, + "type": "object", + "allOf": [ { - "$ref": "#/components/schemas/SwapOwner" + "$ref": "#/components/schemas/SpaceSurveyResponseDto" } ] } }, "required": [ - "type", - "dataDecoded", - "settingsInfo" + "survey", + "surveyResponse" ] }, - "Erc20Transfer": { + "SubmitSurveyResponseDto": { "type": "object", "properties": { - "type": { + "selections": { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + }, + "description": "Map from page id → selected option keys", + "example": { + "use_cases": [ + "run_payments", + "hold_assets" + ] + } + } + }, + "required": [ + "selections" + ] + }, + "SurveyResponseResultDto": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "spaceUuid": { "type": "string", - "enum": [ - "ERC20" - ] + "description": "Space UUID" }, - "tokenAddress": { + "surveySlug": { "type": "string" }, - "value": { - "type": "string" + "surveyVersion": { + "type": "number" }, - "tokenName": { - "type": "string", - "nullable": true + "selections": { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + } }, - "tokenSymbol": { - "type": "string", - "nullable": true + "submittedAt": { + "format": "date-time", + "type": "string" }, - "logoUri": { - "type": "string", - "nullable": true + "updatedAt": { + "format": "date-time", + "type": "string" }, - "decimals": { + "answeredByUserId": { "type": "number", "nullable": true - }, - "trusted": { - "type": "boolean", - "nullable": true - }, - "imitation": { - "type": "boolean" } }, "required": [ - "type", - "tokenAddress", - "value", - "imitation" + "id", + "spaceUuid", + "surveySlug", + "surveyVersion", + "selections", + "submittedAt", + "updatedAt", + "answeredByUserId" ] }, - "Erc721Transfer": { + "FeatureKey": { + "type": "string", + "enum": [ + "safe_seats", + "copilot_scans", + "sponsored_transactions", + "policies", + "safenet_checks" + ], + "description": "Feature key from the entitlements catalog." + }, + "BinaryEntitlement": { "type": "object", "properties": { - "type": { - "type": "string", - "enum": [ - "ERC721" + "feature": { + "description": "Feature key from the entitlements catalog.", + "allOf": [ + { + "$ref": "#/components/schemas/FeatureKey" + } ] }, - "tokenAddress": { - "type": "string" - }, - "tokenId": { - "type": "string" - }, - "tokenName": { - "type": "string", - "nullable": true - }, - "tokenSymbol": { - "type": "string", - "nullable": true + "enabled": { + "type": "boolean", + "description": "Whether the plan grants the feature at all. A metered feature reports its quota and usage even when this is false." }, - "logoUri": { + "type": { "type": "string", - "nullable": true - }, - "trusted": { - "type": "boolean", - "nullable": true + "enum": [ + "binary" + ] } }, "required": [ - "type", - "tokenAddress", - "tokenId" + "feature", + "enabled", + "type" ] }, - "NativeCoinTransfer": { + "ValueEntitlement": { "type": "object", "properties": { + "feature": { + "description": "Feature key from the entitlements catalog.", + "allOf": [ + { + "$ref": "#/components/schemas/FeatureKey" + } + ] + }, + "enabled": { + "type": "boolean", + "description": "Whether the plan grants the feature at all. A metered feature reports its quota and usage even when this is false." + }, "type": { "type": "string", "enum": [ - "NATIVE_COIN" + "value" ] }, "value": { @@ -12975,1158 +17413,1182 @@ } }, "required": [ - "type" + "feature", + "enabled", + "type", + "value" ] }, - "Transfer": { + "MeteredEntitlement": { "type": "object", "properties": { + "feature": { + "description": "Feature key from the entitlements catalog.", + "allOf": [ + { + "$ref": "#/components/schemas/FeatureKey" + } + ] + }, + "enabled": { + "type": "boolean", + "description": "Whether the plan grants the feature at all. A metered feature reports its quota and usage even when this is false." + }, "type": { "type": "string", - "enum": [ - "NATIVE_COIN", - "ERC20", - "ERC721" - ] + "enum": [ + "metered" + ] + }, + "quota": { + "type": "number", + "nullable": true, + "description": "The plan's quota, never inflated to match usage; null means unlimited." + }, + "used": { + "type": "number", + "description": "May legally exceed `quota`." + }, + "resetsAt": { + "format": "date-time", + "type": "string", + "nullable": true, + "description": "Null for stock-type features (seats) that have no reset window." } }, "required": [ - "type" + "feature", + "enabled", + "type", + "quota", + "used", + "resetsAt" ] }, - "TransferTransactionInfo": { + "EntitlementsPlanStatus": { + "type": "string", + "enum": [ + "active", + "trialing" + ], + "description": "Status of the subscription the plan comes from" + }, + "EntitlementsPlan": { "type": "object", "properties": { - "type": { + "id": { "type": "string", - "enum": [ - "Transfer" - ] + "description": "Plan identifier in the billing service" }, - "humanDescription": { + "name": { "type": "string", "nullable": true }, - "sender": { - "$ref": "#/components/schemas/AddressInfo" - }, - "recipient": { - "$ref": "#/components/schemas/AddressInfo" - }, - "direction": { + "cycleEndsAt": { + "format": "date-time", "type": "string", - "enum": [ - "INCOMING", - "OUTGOING", - "UNKNOWN" - ] + "nullable": true, + "description": "End of the current billing cycle" }, - "transferInfo": { - "oneOf": [ - { - "$ref": "#/components/schemas/Erc20Transfer" - }, - { - "$ref": "#/components/schemas/Erc721Transfer" - }, - { - "$ref": "#/components/schemas/NativeCoinTransfer" - } - ], + "status": { + "description": "Status of the subscription the plan comes from", "allOf": [ { - "$ref": "#/components/schemas/Transfer" + "$ref": "#/components/schemas/EntitlementsPlanStatus" } ] } }, "required": [ - "type", - "sender", - "recipient", - "direction", - "transferInfo" + "id", + "name", + "cycleEndsAt", + "status" ] }, - "BridgeFee": { + "EntitlementsResponse": { "type": "object", "properties": { - "tokenAddress": { - "type": "string" - }, - "integratorFee": { - "type": "string" + "plan": { + "nullable": true, + "description": "Null when the workspace has no active subscription.", + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/EntitlementsPlan" + } + ] }, - "lifiFee": { - "type": "string" + "entitlements": { + "type": "array", + "description": "One entry per catalog feature. Which fields an entry carries is decided by `type`: a metered one always carries quota, usage and its reset window, and the others never do.", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/BinaryEntitlement" + }, + { + "$ref": "#/components/schemas/ValueEntitlement" + }, + { + "$ref": "#/components/schemas/MeteredEntitlement" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "binary": "#/components/schemas/BinaryEntitlement", + "value": "#/components/schemas/ValueEntitlement", + "metered": "#/components/schemas/MeteredEntitlement" + } + } + } } }, "required": [ - "tokenAddress", - "integratorFee", - "lifiFee" + "plan", + "entitlements" ] }, - "TokenInfo": { + "SpaceRelayDto": { "type": "object", "properties": { - "address": { - "type": "string", - "description": "The token address" - }, - "decimals": { - "type": "number", - "description": "The token decimals" + "version": { + "type": "string" }, - "logoUri": { - "type": "string", - "nullable": true, - "description": "The logo URI for the token" + "to": { + "type": "string" }, - "name": { - "type": "string", - "description": "The token name" + "data": { + "type": "string" }, - "symbol": { + "safeTxHash": { "type": "string", - "description": "The token symbol" + "description": "Safe transaction hash, forwarded to the relay provider for traceability. Not verified against the calldata on this route." }, - "trusted": { + "acceptUnverifiedSimulation": { "type": "boolean", - "description": "The token trusted status" + "description": "Set to true to proceed with the relay when a previous attempt returned INDETERMINATE_SIMULATION. The user has acknowledged the simulation could not be completed and accepts the risk." } }, "required": [ - "address", - "decimals", - "name", - "symbol", - "trusted" + "version", + "to", + "data" ] }, - "BridgeAndSwapTransactionInfo": { + "Relay": { "type": "object", "properties": { - "type": { + "taskId": { + "type": "string" + } + }, + "required": [ + "taskId" + ] + }, + "GasPaymentOptionUnavailableResponse": { + "type": "object", + "properties": { + "code": { "type": "string", "enum": [ - "SwapAndBridge" + "GAS_PAYMENT_OPTION_UNAVAILABLE" ] }, - "humanDescription": { + "message": { "type": "string", - "nullable": true - }, - "fromToken": { - "$ref": "#/components/schemas/TokenInfo" - }, - "recipient": { - "$ref": "#/components/schemas/AddressInfo" + "description": "Human-readable description of the error. Informational only; do not parse." }, - "explorerUrl": { - "type": "string", - "nullable": true + "statusCode": { + "type": "number", + "example": 409 }, - "status": { + "requested": { "type": "string", "enum": [ - "NOT_FOUND", - "INVALID", - "PENDING", - "DONE", - "FAILED", - "UNKNOWN", - "AWAITING_EXECUTION" - ] + "FREE_DAILY_LIMIT", + "SUBSCRIPTION", + "PAY_FROM_SAFE", + "NO_FEE_CAMPAIGN" + ], + "description": "The gas payment option the request needed." }, - "substatus": { + "reason": { "type": "string", "enum": [ - "WAIT_SOURCE_CONFIRMATIONS", - "WAIT_DESTINATION_TRANSACTION", - "BRIDGE_NOT_AVAILABLE", - "CHAIN_NOT_AVAILABLE", - "REFUND_IN_PROGRESS", - "UNKNOWN_ERROR", - "COMPLETED", - "PARTIAL", - "REFUNDED", - "INSUFFICIENT_ALLOWANCE", - "INSUFFICIENT_BALANCE", - "OUT_OF_GAS", - "EXPIRED", - "SLIPPAGE_EXCEEDED", - "UNKNOWN_FAILED_ERROR", - "UNKNOWN", - "AWAITING_EXECUTION" - ] + "NOT_LISTED", + "NO_RELAYER", + "NOT_A_WORKSPACE_SAFE", + "REFUNDING_TRANSACTION" + ], + "description": "NOT_LISTED: the chain does not list the option. NO_RELAYER: the chain has no relayer. NOT_A_WORKSPACE_SAFE: the Safe is not one the workspace holds. REFUNDING_TRANSACTION: the transaction would refund gas (`gasPrice` > 0)." }, - "fees": { - "nullable": true, - "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/BridgeFee" - } - ] + "available": { + "type": "array", + "description": "The options the chain lists; empty without a relayer.", + "items": { + "type": "string", + "enum": [ + "FREE_DAILY_LIMIT", + "SUBSCRIPTION", + "PAY_FROM_SAFE", + "NO_FEE_CAMPAIGN" + ] + } + } + }, + "required": [ + "code", + "message", + "statusCode", + "requested", + "reason", + "available" + ] + }, + "CreateSafenetCheckDto": { + "type": "object", + "properties": { + "safeTxHash": { + "type": "string", + "description": "Safe transaction hash" + } + }, + "required": [ + "safeTxHash" + ] + }, + "SafeList": { + "type": "object", + "properties": { + "safes": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "safes" + ] + }, + "RelayDto": { + "type": "object", + "properties": { + "version": { + "type": "string" }, - "fromAmount": { + "to": { "type": "string" }, - "toChain": { + "data": { "type": "string" }, - "toToken": { + "gasLimit": { + "type": "string", "nullable": true, - "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/TokenInfo" - } - ] + "description": "Accepted for backward compatibility and validation; not forwarded to the relay provider." }, - "toAmount": { + "safeTxHash": { "type": "string", - "nullable": true + "description": "Safe transaction hash for relay-fee eligibility check" + }, + "acceptUnverifiedSimulation": { + "type": "boolean", + "description": "Set to true to proceed with the relay when a previous attempt returned INDETERMINATE_SIMULATION. The user has acknowledged the simulation could not be completed and accepts the risk." } }, "required": [ - "type", - "fromToken", - "recipient", - "explorerUrl", - "status", - "substatus", - "fees", - "fromAmount", - "toChain", - "toToken", - "toAmount" + "version", + "to", + "data" ] }, - "SwapOrderTransactionInfo": { + "RelayErrorResponse": { "type": "object", "properties": { - "type": { + "code": { "type": "string", "enum": [ - "SwapOrder" - ] + "SIMULATION_FAILED", + "INDETERMINATE_SIMULATION" + ], + "description": "Stable identifier of the error condition. The frontend MUST branch on this value (not on `message`, which is informational and may change)." }, - "humanDescription": { + "message": { "type": "string", - "nullable": true + "description": "Human-readable description of the error. Informational only; do not parse." }, - "uid": { + "statusCode": { + "type": "number", + "example": 422 + } + }, + "required": [ + "code", + "message", + "statusCode" + ] + }, + "RelayTaskStatusReceipt": { + "type": "object", + "properties": { + "transactionHash": { "type": "string", - "description": "The order UID" - }, + "example": "0x4e4bb4493b2183061c3a0106ea96604edcc84f83313dbc0ab718abb1523d1042" + } + }, + "required": [ + "transactionHash" + ] + }, + "RelayTaskStatus": { + "type": "object", + "properties": { "status": { - "type": "string", - "enum": [ - "presignaturePending", - "open", - "fulfilled", - "cancelled", - "expired", - "unknown" - ] - }, - "kind": { - "type": "string", - "enum": [ - "buy", - "sell", - "unknown" - ] - }, - "orderClass": { - "type": "string", - "enum": [ - "market", - "limit", - "liquidity", - "unknown" - ] - }, - "validUntil": { "type": "number", - "description": "The timestamp when the order expires" - }, - "sellAmount": { - "type": "string", - "description": "The sell token raw amount (no decimals)" - }, - "buyAmount": { - "type": "string", - "description": "The buy token raw amount (no decimals)" - }, - "executedSellAmount": { - "type": "string", - "description": "The executed sell token raw amount (no decimals)" - }, - "executedBuyAmount": { - "type": "string", - "description": "The executed buy token raw amount (no decimals)" - }, - "sellToken": { - "description": "The sell token of the order", - "allOf": [ - { - "$ref": "#/components/schemas/TokenInfo" - } - ] - }, - "buyToken": { - "description": "The buy token of the order", - "allOf": [ - { - "$ref": "#/components/schemas/TokenInfo" - } - ] - }, - "explorerUrl": { - "type": "string", - "description": "The URL to the explorer page of the order" - }, - "executedFee": { - "type": "string", - "description": "The amount of fees paid for this order." + "description": "Relay task status code: 100=Pending, 110=Submitted, 200=Included, 400=Rejected, 500=Reverted", + "enum": [ + 100, + 110, + 200, + 400, + 500 + ], + "example": 200 }, - "executedFeeToken": { - "description": "The token in which the fee was paid, expressed by SURPLUS tokens (BUY tokens for SELL orders and SELL tokens for BUY orders).", + "receipt": { + "description": "On-chain receipt. Only present when status is 200 (Included) or 500 (Reverted)", "allOf": [ { - "$ref": "#/components/schemas/TokenInfo" + "$ref": "#/components/schemas/RelayTaskStatusReceipt" } ] + } + }, + "required": [ + "status" + ] + }, + "RelaysRemaining": { + "type": "object", + "properties": { + "remaining": { + "type": "number" }, - "receiver": { - "type": "string", - "nullable": true, - "description": "The (optional) address to receive the proceeds of the trade" + "limit": { + "type": "number" + } + }, + "required": [ + "remaining", + "limit" + ] + }, + "SafeAppProvider": { + "type": "object", + "properties": { + "url": { + "type": "string" }, - "owner": { + "name": { + "type": "string" + } + }, + "required": [ + "url", + "name" + ] + }, + "SafeAppAccessControl": { + "type": "object", + "properties": { + "type": { "type": "string" }, - "fullAppData": { - "type": "object", + "value": { "nullable": true, - "description": "The App Data for this order" + "type": "array", + "items": { + "type": "string" + } } }, "required": [ - "type", - "uid", - "status", - "kind", - "orderClass", - "validUntil", - "sellAmount", - "buyAmount", - "executedSellAmount", - "executedBuyAmount", - "sellToken", - "buyToken", - "explorerUrl", - "executedFee", - "executedFeeToken", - "owner" + "type" ] }, - "SwapTransactionInfo": { + "SafeAppSocialProfile": { "type": "object", "properties": { - "type": { + "platform": { "type": "string", "enum": [ - "Swap" + "DISCORD", + "GITHUB", + "TWITTER", + "TELEGRAM", + "UNKNOWN" ] }, - "humanDescription": { + "url": { + "type": "string" + } + }, + "required": [ + "platform", + "url" + ] + }, + "SafeApp": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "url": { + "type": "string" + }, + "name": { + "type": "string" + }, + "iconUrl": { "type": "string", "nullable": true }, - "recipient": { - "$ref": "#/components/schemas/AddressInfo" + "description": { + "type": "string" }, - "fees": { + "chainIds": { + "type": "array", + "items": { + "type": "string" + } + }, + "provider": { "nullable": true, "type": "object", "allOf": [ { - "$ref": "#/components/schemas/BridgeFee" + "$ref": "#/components/schemas/SafeAppProvider" } ] }, - "fromToken": { - "$ref": "#/components/schemas/TokenInfo" - }, - "fromAmount": { - "type": "string" + "accessControl": { + "$ref": "#/components/schemas/SafeAppAccessControl" }, - "toToken": { - "$ref": "#/components/schemas/TokenInfo" + "tags": { + "type": "array", + "items": { + "type": "string" + } }, - "toAmount": { - "type": "string" + "features": { + "type": "array", + "items": { + "type": "string" + } }, - "lifiExplorerUrl": { + "developerWebsite": { "type": "string", "nullable": true + }, + "socialProfiles": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SafeAppSocialProfile" + } + }, + "featured": { + "type": "boolean" } }, "required": [ - "type", - "recipient", - "fees", - "fromToken", - "fromAmount", - "toToken", - "toAmount", - "lifiExplorerUrl" + "id", + "url", + "name", + "description", + "chainIds", + "accessControl", + "tags", + "features", + "socialProfiles", + "featured" ] }, - "SwapTransferTransactionInfo": { + "SafeState": { "type": "object", "properties": { - "type": { - "type": "string", - "enum": [ - "SwapTransfer" - ] - }, - "humanDescription": { - "type": "string", - "nullable": true - }, - "sender": { - "$ref": "#/components/schemas/AddressInfo" - }, - "recipient": { + "address": { "$ref": "#/components/schemas/AddressInfo" }, - "direction": { + "chainId": { "type": "string" }, - "transferInfo": { - "oneOf": [ - { - "$ref": "#/components/schemas/Erc20Transfer" - }, - { - "$ref": "#/components/schemas/Erc721Transfer" - }, - { - "$ref": "#/components/schemas/NativeCoinTransfer" - } - ], - "allOf": [ - { - "$ref": "#/components/schemas/Transfer" - } - ] - }, - "uid": { - "type": "string", - "description": "The order UID" - }, - "status": { - "type": "string", - "enum": [ - "presignaturePending", - "open", - "fulfilled", - "cancelled", - "expired", - "unknown" - ] - }, - "kind": { - "type": "string", - "enum": [ - "buy", - "sell", - "unknown" - ] - }, - "orderClass": { - "type": "string", - "enum": [ - "market", - "limit", - "liquidity", - "unknown" - ] - }, - "validUntil": { - "type": "number", - "description": "The timestamp when the order expires" + "nonce": { + "type": "number" }, - "sellAmount": { - "type": "string", - "description": "The sell token raw amount (no decimals)" + "threshold": { + "type": "number" }, - "buyAmount": { - "type": "string", - "description": "The buy token raw amount (no decimals)" + "owners": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AddressInfo" + } }, - "executedSellAmount": { - "type": "string", - "description": "The executed sell token raw amount (no decimals)" + "implementation": { + "$ref": "#/components/schemas/AddressInfo" }, - "executedBuyAmount": { - "type": "string", - "description": "The executed buy token raw amount (no decimals)" + "modules": { + "nullable": true, + "type": "array", + "items": { + "$ref": "#/components/schemas/AddressInfo" + } }, - "sellToken": { - "description": "The sell token of the order", + "fallbackHandler": { + "nullable": true, + "type": "object", "allOf": [ { - "$ref": "#/components/schemas/TokenInfo" + "$ref": "#/components/schemas/AddressInfo" } ] }, - "buyToken": { - "description": "The buy token of the order", + "guard": { + "nullable": true, + "type": "object", "allOf": [ { - "$ref": "#/components/schemas/TokenInfo" + "$ref": "#/components/schemas/AddressInfo" } ] }, - "explorerUrl": { + "version": { "type": "string", - "description": "The URL to the explorer page of the order" + "nullable": true }, - "executedFee": { + "implementationVersionState": { "type": "string", - "description": "The amount of fees paid for this order." - }, - "executedFeeToken": { - "description": "The token in which the fee was paid, expressed by SURPLUS tokens (BUY tokens for SELL orders and SELL tokens for BUY orders).", - "allOf": [ - { - "$ref": "#/components/schemas/TokenInfo" - } + "enum": [ + "UP_TO_DATE", + "OUTDATED", + "UNKNOWN" ] }, - "receiver": { + "collectiblesTag": { "type": "string", - "nullable": true, - "description": "The (optional) address to receive the proceeds of the trade" + "nullable": true }, - "owner": { - "type": "string" + "txQueuedTag": { + "type": "string", + "nullable": true }, - "fullAppData": { - "type": "object", - "nullable": true, - "description": "The App Data for this order" - } - }, - "required": [ - "type", - "sender", - "recipient", - "direction", - "transferInfo", - "uid", - "status", - "kind", - "orderClass", - "validUntil", - "sellAmount", - "buyAmount", - "executedSellAmount", - "executedBuyAmount", - "sellToken", - "buyToken", - "explorerUrl", - "executedFee", - "executedFeeToken", - "owner" - ] - }, - "DurationAuto": { - "type": "object", - "properties": { - "durationType": { + "txHistoryTag": { + "type": "string", + "nullable": true + }, + "messagesTag": { "type": "string", - "enum": [ - "AUTO" - ] + "nullable": true } }, "required": [ - "durationType" + "address", + "chainId", + "nonce", + "threshold", + "owners", + "implementation", + "implementationVersionState" ] }, - "DurationLimit": { + "SafeNonces": { "type": "object", "properties": { - "durationType": { - "type": "string", - "enum": [ - "LIMIT_DURATION" - ] + "currentNonce": { + "type": "number" }, - "duration": { - "type": "string" + "recommendedNonce": { + "type": "number" } }, "required": [ - "durationType", - "duration" + "currentNonce", + "recommendedNonce" ] }, - "StartTimeAtMining": { + "SafeOverview": { "type": "object", "properties": { - "startType": { - "type": "string", - "enum": [ - "AT_MINING_TIME" - ] + "address": { + "$ref": "#/components/schemas/AddressInfo" + }, + "chainId": { + "type": "string" + }, + "threshold": { + "type": "number" + }, + "owners": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AddressInfo" + } + }, + "fiatTotal": { + "type": "string" + }, + "queued": { + "type": "number" + }, + "awaitingConfirmation": { + "type": "number", + "nullable": true } }, "required": [ - "startType" + "address", + "chainId", + "threshold", + "owners", + "fiatTotal", + "queued" ] }, - "StartTimeAtEpoch": { + "ThreatAnalysisRequestDto": { "type": "object", "properties": { - "startType": { - "type": "string", - "enum": [ - "AT_EPOCH" + "data": { + "description": "EIP-712 typed data to analyze for security threats. Contains domain, primaryType, types, and message fields following the EIP-712 standard for structured data signing.", + "allOf": [ + { + "$ref": "#/components/schemas/TypedData" + } ] }, - "epoch": { - "type": "number" + "walletAddress": { + "type": "string", + "description": "Address of the transaction signer/wallet" + }, + "origin": { + "type": "string", + "description": "Optional origin identifier for the request" } }, "required": [ - "startType", - "epoch" + "data", + "walletAddress" ] }, - "TwapOrderTransactionInfo": { + "ThreatAnalysisResultDto": { "type": "object", "properties": { + "severity": { + "type": "string", + "description": "Severity level indicating the importance and risk", + "enum": [ + "OK", + "INFO", + "WARN", + "CRITICAL" + ] + }, "type": { "type": "string", + "description": "Threat status code", "enum": [ - "TwapOrder" + "NO_THREAT", + "OWNERSHIP_CHANGE", + "MODULE_CHANGE" ] }, - "humanDescription": { + "title": { "type": "string", - "nullable": true + "description": "User-facing title of the finding" }, - "status": { + "description": { "type": "string", - "description": "The TWAP status", - "enum": [ - "presignaturePending", - "open", - "fulfilled", - "cancelled", - "expired", - "unknown" - ] + "description": "Detailed description explaining the finding and its implications" }, - "kind": { + "error": { + "type": "string", + "description": "Error message for failed analysis" + } + }, + "required": [ + "severity", + "type", + "title", + "description" + ] + }, + "MasterCopyChangeThreatAnalysisResultDto": { + "type": "object", + "properties": { + "severity": { "type": "string", + "description": "Severity level indicating the importance and risk", "enum": [ - "buy", - "sell", - "unknown" + "OK", + "INFO", + "WARN", + "CRITICAL" ] }, - "class": { + "type": { "type": "string", + "description": "Threat status code", "enum": [ - "market", - "limit", - "liquidity", - "unknown" + "MASTERCOPY_CHANGE" ] }, - "activeOrderUid": { + "title": { "type": "string", - "nullable": true, - "description": "The order UID of the active order, or null if none is active" - }, - "validUntil": { - "type": "number", - "description": "The timestamp when the TWAP expires" + "description": "User-facing title of the finding" }, - "sellAmount": { + "description": { "type": "string", - "description": "The sell token raw amount (no decimals)" + "description": "Detailed description explaining the finding and its implications" }, - "buyAmount": { + "error": { "type": "string", - "description": "The buy token raw amount (no decimals)" + "description": "Error message for failed analysis" }, - "executedSellAmount": { + "before": { "type": "string", - "nullable": true, - "description": "The executed sell token raw amount (no decimals), or null if there are too many parts" + "description": "Address of the old master copy/implementation contract" }, - "executedBuyAmount": { + "after": { "type": "string", - "nullable": true, - "description": "The executed buy token raw amount (no decimals), or null if there are too many parts" - }, - "executedFee": { + "description": "Address of the new master copy/implementation contract" + } + }, + "required": [ + "severity", + "type", + "title", + "description", + "before", + "after" + ] + }, + "ThreatIssueDto": { + "type": "object", + "properties": { + "address": { "type": "string", - "nullable": true, - "description": "The executed surplus fee raw amount (no decimals), or null if there are too many parts" - }, - "executedFeeToken": { - "description": "The token in which the fee was paid, expressed by SURPLUS tokens (BUY tokens for SELL orders and SELL tokens for BUY orders).", - "allOf": [ - { - "$ref": "#/components/schemas/TokenInfo" - } - ] - }, - "sellToken": { - "description": "The sell token of the TWAP", - "allOf": [ - { - "$ref": "#/components/schemas/TokenInfo" - } - ] - }, - "buyToken": { - "description": "The buy token of the TWAP", - "allOf": [ - { - "$ref": "#/components/schemas/TokenInfo" - } - ] + "description": "Address involved in the issue, if applicable" }, - "receiver": { + "description": { "type": "string", - "description": "The address to receive the proceeds of the trade" - }, - "owner": { - "type": "string" - }, - "fullAppData": { - "type": "object", - "nullable": true, - "description": "The App Data for this TWAP" + "description": "Issue description" + } + }, + "required": [ + "description" + ] + }, + "MaliciousOrModerateThreatAnalysisResultDto": { + "type": "object", + "properties": { + "severity": { + "type": "string", + "description": "Severity level indicating the importance and risk", + "enum": [ + "OK", + "INFO", + "WARN", + "CRITICAL" + ] }, - "numberOfParts": { + "type": { "type": "string", - "description": "The number of parts in the TWAP" + "description": "Threat status code", + "enum": [ + "MALICIOUS", + "MODERATE" + ] }, - "partSellAmount": { + "title": { "type": "string", - "description": "The amount of sellToken to sell in each part" + "description": "User-facing title of the finding" }, - "minPartLimit": { + "description": { "type": "string", - "description": "The amount of buyToken that must be bought in each part" - }, - "timeBetweenParts": { - "type": "number", - "description": "The duration of the TWAP interval" + "description": "Detailed description explaining the finding and its implications" }, - "durationOfPart": { - "description": "Whether the TWAP is valid for the entire interval or not", - "oneOf": [ - { - "$ref": "#/components/schemas/DurationAuto" - }, - { - "$ref": "#/components/schemas/DurationLimit" - } - ] + "error": { + "type": "string", + "description": "Error message for failed analysis" }, - "startTime": { - "description": "The start time of the TWAP", - "oneOf": [ - { - "$ref": "#/components/schemas/StartTimeAtMining" - }, - { - "$ref": "#/components/schemas/StartTimeAtEpoch" + "issues": { + "type": "object", + "description": "A partial record of specific issues identified during threat analysis, grouped by severity.Record - keys should be one of the Severity enum (OK | INFO | WARN | CRITICAL)", + "additionalProperties": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ThreatIssueDto" } - ] + }, + "example": { + "CRITICAL": [ + { + "description": "Malicious contract interaction detected", + "address": "0x0000000000000000000000000000000000000000" + } + ], + "WARN": [ + { + "description": "High gas price detected" + } + ] + } } }, "required": [ + "severity", "type", - "status", - "kind", - "validUntil", - "sellAmount", - "buyAmount", - "executedFeeToken", - "sellToken", - "buyToken", - "receiver", - "owner", - "numberOfParts", - "partSellAmount", - "minPartLimit", - "timeBetweenParts", - "durationOfPart", - "startTime" + "title", + "description" ] }, - "NativeStakingDepositTransactionInfo": { + "FailedThreatAnalysisResultDto": { "type": "object", "properties": { - "type": { + "severity": { "type": "string", + "description": "Severity level indicating the importance and risk", "enum": [ - "NativeStakingDeposit" + "OK", + "INFO", + "WARN", + "CRITICAL" ] }, - "humanDescription": { - "type": "string", - "nullable": true - }, - "status": { + "type": { "type": "string", + "description": "Threat status code", "enum": [ - "NOT_STAKED", - "ACTIVATING", - "DEPOSIT_IN_PROGRESS", - "ACTIVE", - "EXIT_REQUESTED", - "EXITING", - "EXITED", - "SLASHED" + "FAILED" ] }, - "estimatedEntryTime": { - "type": "number" - }, - "estimatedExitTime": { - "type": "number" - }, - "estimatedWithdrawalTime": { - "type": "number" - }, - "fee": { - "type": "number" - }, - "monthlyNrr": { - "type": "number" - }, - "annualNrr": { - "type": "number" - }, - "value": { - "type": "string" - }, - "numValidators": { - "type": "number" - }, - "expectedAnnualReward": { - "type": "string" - }, - "expectedMonthlyReward": { - "type": "string" - }, - "expectedFiatAnnualReward": { - "type": "number" - }, - "expectedFiatMonthlyReward": { - "type": "number" + "title": { + "type": "string", + "description": "User-facing title of the finding" }, - "tokenInfo": { - "$ref": "#/components/schemas/TokenInfo" + "description": { + "type": "string", + "description": "Detailed description explaining the finding and its implications" }, - "validators": { - "nullable": true, - "description": "Populated after transaction has been executed", - "type": "array", - "items": { - "type": "string" - } + "error": { + "type": "string", + "description": "Error message for failed analysis" } }, "required": [ + "severity", "type", - "status", - "estimatedEntryTime", - "estimatedExitTime", - "estimatedWithdrawalTime", - "fee", - "monthlyNrr", - "annualNrr", - "value", - "numValidators", - "expectedAnnualReward", - "expectedMonthlyReward", - "expectedFiatAnnualReward", - "expectedFiatMonthlyReward", - "tokenInfo" + "title", + "description" ] }, - "NativeStakingValidatorsExitTransactionInfo": { + "NativeAssetDetailsDto": { "type": "object", "properties": { + "symbol": { + "type": "string", + "description": "Token symbol (if available)" + }, + "logo_url": { + "type": "string", + "description": "URL to asset logo (if available)", + "example": "https://example.com/logo.png" + }, "type": { "type": "string", + "description": "Asset type", "enum": [ - "NativeStakingValidatorsExit" + "NATIVE" ] + } + }, + "required": [ + "type" + ] + }, + "TokenAssetDetailsDto": { + "type": "object", + "properties": { + "symbol": { + "type": "string", + "description": "Token symbol (if available)" }, - "humanDescription": { + "logo_url": { "type": "string", - "nullable": true + "description": "URL to asset logo (if available)", + "example": "https://example.com/logo.png" }, - "status": { + "type": { "type": "string", + "description": "Asset type", "enum": [ - "NOT_STAKED", - "ACTIVATING", - "DEPOSIT_IN_PROGRESS", - "ACTIVE", - "EXIT_REQUESTED", - "EXITING", - "EXITED", - "SLASHED" + "ERC20", + "ERC721", + "ERC1155", + "NONERC" ] }, - "estimatedExitTime": { - "type": "number" - }, - "estimatedWithdrawalTime": { - "type": "number" - }, - "value": { - "type": "string" - }, - "numValidators": { - "type": "number" - }, - "tokenInfo": { - "$ref": "#/components/schemas/TokenInfo" - }, - "validators": { - "type": "array", - "items": { - "type": "string" - } + "address": { + "type": "string", + "description": "Token contract address" + } + }, + "required": [ + "type", + "address" + ] + }, + "FungibleDiffDto": { + "type": "object", + "properties": { + "value": { + "type": "string", + "description": "Value change for fungible tokens", + "example": "1000000" + } + } + }, + "NFTDiffDto": { + "type": "object", + "properties": { + "token_id": { + "type": "number", + "description": "Token ID for NFTs", + "example": 42 } }, "required": [ - "type", - "status", - "estimatedExitTime", - "estimatedWithdrawalTime", - "value", - "numValidators", - "tokenInfo", - "validators" + "token_id" ] }, - "NativeStakingWithdrawTransactionInfo": { + "BalanceChangeDto": { "type": "object", "properties": { - "type": { - "type": "string", - "enum": [ - "NativeStakingWithdraw" + "asset": { + "description": "Asset details", + "oneOf": [ + { + "$ref": "#/components/schemas/NativeAssetDetailsDto" + }, + { + "$ref": "#/components/schemas/TokenAssetDetailsDto" + } ] }, - "humanDescription": { - "type": "string", - "nullable": true - }, - "value": { - "type": "string" - }, - "tokenInfo": { - "$ref": "#/components/schemas/TokenInfo" + "in": { + "type": "array", + "description": "Incoming asset changes", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/FungibleDiffDto" + }, + { + "$ref": "#/components/schemas/NFTDiffDto" + } + ] + }, + "example": [ + { + "value": "1000000" + } + ] }, - "validators": { + "out": { "type": "array", + "description": "Outgoing asset changes", "items": { - "type": "string" - } + "oneOf": [ + { + "$ref": "#/components/schemas/FungibleDiffDto" + }, + { + "$ref": "#/components/schemas/NFTDiffDto" + } + ] + }, + "example": [ + { + "value": "500000" + } + ] } }, "required": [ - "type", - "value", - "tokenInfo", - "validators" + "asset", + "in", + "out" ] }, - "VaultInfo": { + "ThreatAnalysisResponseDto": { "type": "object", "properties": { - "address": { - "type": "string" + "THREAT": { + "description": "Array of threat analysis results. Results are sorted by severity (CRITICAL first). May include malicious patterns, ownership changes, module changes, or master copy upgrades.", + "example": [ + { + "severity": "OK", + "type": "NO_THREAT", + "title": "No threats detected", + "description": "Transaction analysis found no security threats" + } + ], + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/ThreatAnalysisResultDto" + }, + { + "$ref": "#/components/schemas/MasterCopyChangeThreatAnalysisResultDto" + }, + { + "$ref": "#/components/schemas/MaliciousOrModerateThreatAnalysisResultDto" + }, + { + "$ref": "#/components/schemas/FailedThreatAnalysisResultDto" + } + ] + } }, - "name": { - "type": "string" + "BALANCE_CHANGE": { + "description": "Balance changes resulting from the transaction. Shows incoming and outgoing transfers for various asset types.", + "example": [ + { + "asset": { + "type": "ERC20", + "symbol": "USDC", + "address": "0x0000000000000000000000000000000000000000", + "logo_url": "https://example.com/usdc-logo.png" + }, + "in": [ + { + "value": "1000000" + } + ], + "out": [ + { + "value": "500000" + } + ] + } + ], + "type": "array", + "items": { + "$ref": "#/components/schemas/BalanceChangeDto" + } }, - "description": { - "type": "string" + "request_id": { + "type": "string", + "description": "Blockaid request ID from x-request-id header. Used for reporting false positives/negatives via the report endpoint.", + "example": "11111111-1111-1111-1111-111111111111" + } + } + }, + "ReportFalseResultRequestDto": { + "type": "object", + "properties": { + "event": { + "type": "string", + "enum": [ + "FALSE_POSITIVE", + "FALSE_NEGATIVE" + ], + "description": "Type of report: FALSE_POSITIVE if flagged incorrectly, FALSE_NEGATIVE if should have been flagged" }, - "dashboardUri": { + "request_id": { "type": "string", - "nullable": true + "description": "The request_id from the original Blockaid scan response", + "example": "11111111-1111-1111-1111-111111111111" }, - "logoUri": { - "type": "string" + "details": { + "type": "string", + "description": "Details about why this is a false result", + "maxLength": 1000, + "example": "This transaction was incorrectly flagged as malicious" } }, "required": [ - "address", - "name", - "description", - "logoUri" + "event", + "request_id", + "details" ] }, - "VaultExtraReward": { + "ReportFalseResultResponseDto": { "type": "object", "properties": { - "tokenInfo": { - "$ref": "#/components/schemas/TokenInfo" - }, - "nrr": { - "type": "number" - }, - "claimable": { - "type": "string" - }, - "claimableNext": { - "type": "string" + "success": { + "type": "boolean", + "description": "Whether the report was submitted successfully", + "example": true } }, "required": [ - "tokenInfo", - "nrr", - "claimable", - "claimableNext" + "success" ] }, - "VaultDepositTransactionInfo": { + "TargetedSafe": { "type": "object", "properties": { - "type": { - "type": "string", - "enum": [ - "VaultDeposit" - ] - }, - "humanDescription": { - "type": "string", - "nullable": true - }, - "value": { - "type": "string" - }, - "baseNrr": { - "type": "number" - }, - "fee": { - "type": "number" - }, - "tokenInfo": { - "$ref": "#/components/schemas/TokenInfo" - }, - "vaultInfo": { - "$ref": "#/components/schemas/VaultInfo" - }, - "currentReward": { - "type": "string" - }, - "additionalRewardsNrr": { + "outreachId": { "type": "number" }, - "additionalRewards": { - "type": "array", - "items": { - "$ref": "#/components/schemas/VaultExtraReward" - } - }, - "expectedMonthlyReward": { - "type": "string" - }, - "expectedAnnualReward": { + "address": { "type": "string" } }, "required": [ - "type", - "value", - "baseNrr", - "fee", - "tokenInfo", - "vaultInfo", - "currentReward", - "additionalRewardsNrr", - "additionalRewards", - "expectedMonthlyReward", - "expectedAnnualReward" + "outreachId", + "address" ] }, - "VaultRedeemTransactionInfo": { + "Submission": { "type": "object", "properties": { - "type": { - "type": "string", - "enum": [ - "VaultRedeem" - ] - }, - "humanDescription": { - "type": "string", - "nullable": true - }, - "value": { - "type": "string" - }, - "baseNrr": { + "outreachId": { "type": "number" }, - "fee": { + "targetedSafeId": { "type": "number" }, - "tokenInfo": { - "$ref": "#/components/schemas/TokenInfo" - }, - "vaultInfo": { - "$ref": "#/components/schemas/VaultInfo" - }, - "currentReward": { + "signerAddress": { "type": "string" }, - "additionalRewardsNrr": { - "type": "number" - }, - "additionalRewards": { - "type": "array", - "items": { - "$ref": "#/components/schemas/VaultExtraReward" - } + "completionDate": { + "format": "date-time", + "type": "string", + "nullable": true } }, "required": [ - "type", - "value", - "baseNrr", - "fee", - "tokenInfo", - "vaultInfo", - "currentReward", - "additionalRewardsNrr", - "additionalRewards" + "outreachId", + "targetedSafeId", + "signerAddress" + ] + }, + "CreateSubmissionDto": { + "type": "object", + "properties": { + "completed": { + "type": "boolean" + } + }, + "required": [ + "completed" ] }, "TransactionData": { @@ -14270,233 +18732,75 @@ "confirmationsRequired": { "type": "number" }, - "confirmations": { - "type": "array", - "items": { - "$ref": "#/components/schemas/MultisigConfirmationDetails" - } - }, - "rejectors": { - "type": "array", - "items": { - "$ref": "#/components/schemas/AddressInfo" - } - }, - "gasTokenInfo": { - "oneOf": [ - { - "$ref": "#/components/schemas/NativeToken" - }, - { - "$ref": "#/components/schemas/Erc20Token" - }, - { - "$ref": "#/components/schemas/Erc721Token" - } - ], - "nullable": true - }, - "trusted": { - "type": "boolean" - }, - "proposer": { - "nullable": true, - "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/AddressInfo" - } - ] - }, - "proposedByDelegate": { - "nullable": true, - "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/AddressInfo" - } - ] - } - }, - "required": [ - "type", - "submittedAt", - "nonce", - "safeTxGas", - "baseGas", - "gasPrice", - "gasToken", - "fee", - "payment", - "refundReceiver", - "safeTxHash", - "signers", - "confirmationsRequired", - "confirmations", - "rejectors", - "trusted" - ] - }, - "ModuleExecutionDetails": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "MODULE" - ] - }, - "address": { - "$ref": "#/components/schemas/AddressInfo" - } - }, - "required": [ - "type", - "address" - ] - }, - "SafeAppInfo": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "url": { - "type": "string" - }, - "logoUri": { - "type": "string", - "nullable": true - } - }, - "required": [ - "name", - "url" - ] - }, - "TransactionDetails": { - "type": "object", - "properties": { - "txInfo": { - "oneOf": [ - { - "$ref": "#/components/schemas/CreationTransactionInfo" - }, - { - "$ref": "#/components/schemas/CustomTransactionInfo" - }, - { - "$ref": "#/components/schemas/MultiSendTransactionInfo" - }, - { - "$ref": "#/components/schemas/SettingsChangeTransaction" - }, - { - "$ref": "#/components/schemas/TransferTransactionInfo" - }, - { - "$ref": "#/components/schemas/SwapOrderTransactionInfo" - }, - { - "$ref": "#/components/schemas/BridgeAndSwapTransactionInfo" - }, - { - "$ref": "#/components/schemas/SwapTransactionInfo" - }, - { - "$ref": "#/components/schemas/SwapTransferTransactionInfo" - }, - { - "$ref": "#/components/schemas/TwapOrderTransactionInfo" - }, - { - "$ref": "#/components/schemas/NativeStakingDepositTransactionInfo" - }, - { - "$ref": "#/components/schemas/NativeStakingValidatorsExitTransactionInfo" - }, - { - "$ref": "#/components/schemas/NativeStakingWithdrawTransactionInfo" - }, - { - "$ref": "#/components/schemas/VaultDepositTransactionInfo" - }, - { - "$ref": "#/components/schemas/VaultRedeemTransactionInfo" - } - ], - "allOf": [ - { - "$ref": "#/components/schemas/TransactionInfo" - } - ] - }, - "safeAddress": { - "type": "string" - }, - "txId": { - "type": "string" - }, - "executedAt": { - "type": "number", - "nullable": true - }, - "txStatus": { - "type": "string", - "enum": [ - "SUCCESS", - "FAILED", - "CANCELLED", - "AWAITING_CONFIRMATIONS", - "AWAITING_EXECUTION" - ] + "confirmations": { + "type": "array", + "items": { + "$ref": "#/components/schemas/MultisigConfirmationDetails" + } }, - "txData": { - "nullable": true, - "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/TransactionData" - } - ] + "rejectors": { + "deprecated": true, + "type": "array", + "items": { + "$ref": "#/components/schemas/AddressInfo" + } }, - "detailedExecutionInfo": { + "gasTokenInfo": { "oneOf": [ { - "$ref": "#/components/schemas/MultisigExecutionDetails" + "$ref": "#/components/schemas/NativeToken" }, { - "$ref": "#/components/schemas/ModuleExecutionDetails" + "$ref": "#/components/schemas/Erc20Token" + }, + { + "$ref": "#/components/schemas/Erc721Token" } ], "nullable": true }, - "txHash": { - "type": "string", - "nullable": true + "trusted": { + "type": "boolean" }, - "safeAppInfo": { + "proposer": { "nullable": true, "type": "object", "allOf": [ { - "$ref": "#/components/schemas/SafeAppInfo" + "$ref": "#/components/schemas/AddressInfo" } ] }, - "note": { - "type": "string", - "nullable": true + "proposedByDelegate": { + "nullable": true, + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/AddressInfo" + } + ] } }, "required": [ - "txInfo", - "safeAddress", - "txId", - "txStatus" + "type", + "submittedAt", + "nonce", + "safeTxGas", + "baseGas", + "gasPrice", + "gasToken", + "fee", + "payment", + "refundReceiver", + "safeTxHash", + "signers", + "confirmationsRequired", + "confirmations", + "rejectors", + "trusted" ] }, - "ModuleExecutionInfo": { + "ModuleExecutionDetails": { "type": "object", "properties": { "type": { @@ -14514,40 +18818,7 @@ "address" ] }, - "MultisigExecutionInfo": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "MULTISIG" - ] - }, - "nonce": { - "type": "number" - }, - "confirmationsRequired": { - "type": "number" - }, - "confirmationsSubmitted": { - "type": "number" - }, - "missingSigners": { - "nullable": true, - "type": "array", - "items": { - "$ref": "#/components/schemas/AddressInfo" - } - } - }, - "required": [ - "type", - "nonce", - "confirmationsRequired", - "confirmationsSubmitted" - ] - }, - "Transaction": { + "TransactionDetails": { "type": "object", "properties": { "txInfo": { @@ -14604,15 +18875,15 @@ } ] }, - "id": { + "safeAddress": { "type": "string" }, - "txHash": { - "type": "string", - "nullable": true + "txId": { + "type": "string" }, - "timestamp": { - "type": "number" + "executedAt": { + "type": "number", + "nullable": true }, "txStatus": { "type": "string", @@ -14624,17 +18895,30 @@ "AWAITING_EXECUTION" ] }, - "executionInfo": { + "txData": { + "nullable": true, + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/TransactionData" + } + ] + }, + "detailedExecutionInfo": { "oneOf": [ { - "$ref": "#/components/schemas/MultisigExecutionInfo" + "$ref": "#/components/schemas/MultisigExecutionDetails" }, { - "$ref": "#/components/schemas/ModuleExecutionInfo" + "$ref": "#/components/schemas/ModuleExecutionDetails" } ], "nullable": true }, + "txHash": { + "type": "string", + "nullable": true + }, "safeAppInfo": { "nullable": true, "type": "object", @@ -14651,8 +18935,8 @@ }, "required": [ "txInfo", - "id", - "timestamp", + "safeAddress", + "txId", "txStatus" ] }, @@ -14833,6 +19117,57 @@ "results" ] }, + "TransactionItem": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "TRANSACTION" + ] + }, + "transaction": { + "$ref": "#/components/schemas/Transaction" + }, + "conflictType": { + "type": "string", + "enum": [ + "None" + ] + } + }, + "required": [ + "type", + "transaction", + "conflictType" + ] + }, + "TransferTransactionItemPage": { + "type": "object", + "properties": { + "count": { + "type": "number", + "nullable": true + }, + "next": { + "type": "string", + "nullable": true + }, + "previous": { + "type": "string", + "nullable": true + }, + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TransactionItem" + } + } + }, + "required": [ + "results" + ] + }, "PreviewTransactionDto": { "type": "object", "properties": { @@ -14914,80 +19249,17 @@ ], "allOf": [ { - "$ref": "#/components/schemas/TransactionInfo" - } - ] - }, - "txData": { - "$ref": "#/components/schemas/TransactionData" - } - }, - "required": [ - "txInfo", - "txData" - ] - }, - "ConflictHeaderQueuedItem": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "CONFLICT_HEADER" - ] - }, - "nonce": { - "type": "number" - } - }, - "required": [ - "type", - "nonce" - ] - }, - "LabelQueuedItem": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "LABEL" - ] - }, - "label": { - "type": "string" - } - }, - "required": [ - "type", - "label" - ] - }, - "TransactionQueuedItem": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "TRANSACTION" - ] - }, - "transaction": { - "$ref": "#/components/schemas/Transaction" - }, - "conflictType": { - "type": "string", - "enum": [ - "None", - "HasNext", - "End" + "$ref": "#/components/schemas/TransactionInfo" + } ] + }, + "txData": { + "$ref": "#/components/schemas/TransactionData" } }, "required": [ - "type", - "transaction", - "conflictType" + "txInfo", + "txData" ] }, "QueuedItemPage": { @@ -15026,31 +19298,6 @@ "results" ] }, - "TransactionItem": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "TRANSACTION" - ] - }, - "transaction": { - "$ref": "#/components/schemas/Transaction" - }, - "conflictType": { - "type": "string", - "enum": [ - "None" - ] - } - }, - "required": [ - "type", - "transaction", - "conflictType" - ] - }, "TransactionItemPage": { "type": "object", "properties": { @@ -15084,6 +19331,64 @@ "results" ] }, + "NestedTransactionDto": { + "type": "object", + "properties": { + "to": { + "type": "string", + "nullable": true + }, + "value": { + "type": "string" + }, + "data": { + "type": "string", + "nullable": true + }, + "operation": { + "description": "Operation type: 0 for CALL, 1 for DELEGATE", + "allOf": [ + { + "$ref": "#/components/schemas/Operation" + } + ] + }, + "safeTxGas": { + "type": "string" + }, + "baseGas": { + "type": "string" + }, + "gasPrice": { + "type": "string" + }, + "gasToken": { + "type": "string", + "nullable": true + }, + "refundReceiver": { + "type": "string", + "nullable": true + }, + "nonce": { + "type": "string", + "description": "The nested Safe's nonce" + }, + "notes": { + "type": "string", + "nullable": true, + "maxLength": 200 + } + }, + "required": [ + "value", + "operation", + "safeTxGas", + "baseGas", + "gasPrice", + "nonce" + ] + }, "ProposeTransactionDto": { "type": "object", "properties": { @@ -15137,6 +19442,26 @@ "origin": { "type": "string", "nullable": true + }, + "nestedTransaction": { + "nullable": true, + "description": "A child transaction for a second Safe, authorised by the parent transaction being an `approveHash` call committing to its hash. Unknown keys are rejected.", + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/NestedTransactionDto" + } + ] + }, + "declared": { + "nullable": true, + "description": "Where the request came from, as reported by the client.", + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/DeclaredAttributionDto" + } + ] } }, "required": [ @@ -15435,6 +19760,169 @@ "signature" ] }, + "UpdateDelegateV3Dto": { + "type": "object", + "properties": { + "safe": { + "type": "string", + "nullable": true + }, + "delegate": { + "type": "string" + }, + "delegator": { + "type": "string" + }, + "signature": { + "type": "string" + }, + "label": { + "type": "string" + } + }, + "required": [ + "delegate", + "delegator", + "signature", + "label" + ] + }, + "DeleteDelegateV3Dto": { + "type": "object", + "properties": { + "delegator": { + "type": "string", + "nullable": true + }, + "safe": { + "type": "string", + "nullable": true + }, + "signature": { + "type": "string" + } + }, + "required": [ + "signature" + ] + }, + "NativeTokenMetadata": { + "type": "object", + "properties": { + "address": { + "type": "string" + }, + "decimals": { + "type": "number" + }, + "logoUri": { + "type": "string" + }, + "name": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "trusted": { + "type": "boolean", + "description": "Whether the Transaction Service lists the token in one of its imported token lists" + }, + "type": { + "type": "string", + "enum": [ + "NATIVE_TOKEN" + ] + } + }, + "required": [ + "address", + "decimals", + "logoUri", + "name", + "symbol", + "trusted", + "type" + ] + }, + "Erc20TokenMetadata": { + "type": "object", + "properties": { + "address": { + "type": "string" + }, + "decimals": { + "type": "number" + }, + "logoUri": { + "type": "string" + }, + "name": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "trusted": { + "type": "boolean", + "description": "Whether the Transaction Service lists the token in one of its imported token lists" + }, + "type": { + "type": "string", + "enum": [ + "ERC20" + ] + } + }, + "required": [ + "address", + "decimals", + "logoUri", + "name", + "symbol", + "trusted", + "type" + ] + }, + "Erc721TokenMetadata": { + "type": "object", + "properties": { + "address": { + "type": "string" + }, + "decimals": { + "type": "number" + }, + "logoUri": { + "type": "string" + }, + "name": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "trusted": { + "type": "boolean", + "description": "Whether the Transaction Service lists the token in one of its imported token lists" + }, + "type": { + "type": "string", + "enum": [ + "ERC721" + ] + } + }, + "required": [ + "address", + "decimals", + "logoUri", + "name", + "symbol", + "trusted", + "type" + ] + }, "SafeRegistration": { "type": "object", "properties": { @@ -15495,10 +19983,7 @@ }, "required": [ "cloudMessagingToken", - "buildNumber", - "bundle", "deviceType", - "version", "safeRegistrations" ] }, diff --git a/packages/store/src/gateway/AUTO_GENERATED/.schema-hash b/packages/store/src/gateway/AUTO_GENERATED/.schema-hash index 3de9ddc2277..d6c06adde80 100644 --- a/packages/store/src/gateway/AUTO_GENERATED/.schema-hash +++ b/packages/store/src/gateway/AUTO_GENERATED/.schema-hash @@ -1 +1 @@ -e9984df7d8acc32efa5370bd62918903c1a9aedda334828d00ef55ff0e922556 +1badd5bdcc85c0cb9e2022403b768017fcacca480fdb192acba5a002e4f4dd51 diff --git a/packages/store/src/gateway/AUTO_GENERATED/chains.ts b/packages/store/src/gateway/AUTO_GENERATED/chains.ts index c072860f9cf..a46c104237e 100644 --- a/packages/store/src/gateway/AUTO_GENERATED/chains.ts +++ b/packages/store/src/gateway/AUTO_GENERATED/chains.ts @@ -154,8 +154,11 @@ export type Theme = { export type Relayer = { type: ('GTF' | 'RELAY_FEE' | 'DAILY_LIMIT' | 'NO_FEE_CAMPAIGN') | null safeCreationSponsored: boolean + /** Use gasPaymentOptions instead. */ safeTransactionSponsored: boolean enableTenderlySimulationBeforeRelay: boolean + /** Who may pay for a relayed transaction on this chain. */ + gasPaymentOptions: ('FREE_DAILY_LIMIT' | 'SUBSCRIPTION' | 'PAY_FROM_SAFE' | 'NO_FEE_CAMPAIGN')[] } export type Chain = { chainId: string diff --git a/packages/store/src/gateway/AUTO_GENERATED/collectibles.ts b/packages/store/src/gateway/AUTO_GENERATED/collectibles.ts index 577e70251aa..1aff117657c 100644 --- a/packages/store/src/gateway/AUTO_GENERATED/collectibles.ts +++ b/packages/store/src/gateway/AUTO_GENERATED/collectibles.ts @@ -13,9 +13,9 @@ const injectedRtkApi = api query: (queryArg) => ({ url: `/v2/chains/${queryArg.chainId}/safes/${queryArg.safeAddress}/collectibles`, params: { + cursor: queryArg.cursor, trusted: queryArg.trusted, exclude_spam: queryArg.excludeSpam, - cursor: queryArg.cursor, }, }), providesTags: ['collectibles'], @@ -28,9 +28,9 @@ export type CollectiblesGetCollectiblesV2ApiResponse = /** status 200 */ Collec export type CollectiblesGetCollectiblesV2ApiArg = { chainId: string safeAddress: string + cursor?: string trusted?: boolean excludeSpam?: boolean - cursor?: string } export type Collectible = { address: string diff --git a/packages/store/src/gateway/AUTO_GENERATED/community.ts b/packages/store/src/gateway/AUTO_GENERATED/community.ts index db9750dae17..0eba3c4c4f6 100644 --- a/packages/store/src/gateway/AUTO_GENERATED/community.ts +++ b/packages/store/src/gateway/AUTO_GENERATED/community.ts @@ -26,8 +26,8 @@ const injectedRtkApi = api query: (queryArg) => ({ url: `/v1/community/campaigns/${queryArg.resourceId}/activities`, params: { - holder: queryArg.holder, cursor: queryArg.cursor, + holder: queryArg.holder, }, }), providesTags: ['community'], @@ -97,8 +97,8 @@ export type CommunityGetCampaignByIdV1ApiArg = { export type CommunityGetCampaignActivitiesV1ApiResponse = unknown export type CommunityGetCampaignActivitiesV1ApiArg = { resourceId: string - holder?: string cursor?: string + holder?: string } export type CommunityGetCampaignLeaderboardV1ApiResponse = /** status 200 */ CampaignRankPage export type CommunityGetCampaignLeaderboardV1ApiArg = { diff --git a/packages/store/src/gateway/AUTO_GENERATED/delegates.ts b/packages/store/src/gateway/AUTO_GENERATED/delegates.ts index 1cee45c5104..4f7910b2ef1 100644 --- a/packages/store/src/gateway/AUTO_GENERATED/delegates.ts +++ b/packages/store/src/gateway/AUTO_GENERATED/delegates.ts @@ -64,6 +64,43 @@ const injectedRtkApi = api }), invalidatesTags: ['delegates'], }), + delegatesGetDelegatesV3: build.query({ + query: (queryArg) => ({ + url: `/v3/chains/${queryArg.chainId}/delegates`, + params: { + cursor: queryArg.cursor, + label: queryArg.label, + delegator: queryArg.delegator, + delegate: queryArg.delegate, + safe: queryArg.safe, + }, + }), + providesTags: ['delegates'], + }), + delegatesPostDelegateV3: build.mutation({ + query: (queryArg) => ({ + url: `/v3/chains/${queryArg.chainId}/delegates`, + method: 'POST', + body: queryArg.createDelegateDto, + }), + invalidatesTags: ['delegates'], + }), + delegatesUpdateDelegateV3: build.mutation({ + query: (queryArg) => ({ + url: `/v3/chains/${queryArg.chainId}/delegates`, + method: 'PATCH', + body: queryArg.updateDelegateV3Dto, + }), + invalidatesTags: ['delegates'], + }), + delegatesDeleteDelegateV3: build.mutation({ + query: (queryArg) => ({ + url: `/v3/chains/${queryArg.chainId}/delegates/${queryArg.delegateAddress}`, + method: 'DELETE', + body: queryArg.deleteDelegateV3Dto, + }), + invalidatesTags: ['delegates'], + }), }), overrideExisting: false, }) @@ -132,6 +169,45 @@ export type DelegatesDeleteDelegateV2ApiArg = { /** Signature and data proving authorization to delete the delegate */ deleteDelegateV2Dto: DeleteDelegateV2Dto } +export type DelegatesGetDelegatesV3ApiResponse = + /** status 200 Paginated list of delegates retrieved successfully */ DelegatePage +export type DelegatesGetDelegatesV3ApiArg = { + /** Chain ID where delegates are registered */ + chainId: string + /** Pagination cursor for retrieving the next set of results */ + cursor?: string + /** Filter by delegate label or name */ + label?: string + /** Filter by delegator address (0x prefixed hex string) */ + delegator?: string + /** Filter by delegate address (0x prefixed hex string) */ + delegate?: string + /** Filter by Safe address (0x prefixed hex string) */ + safe?: string +} +export type DelegatesPostDelegateV3ApiResponse = unknown +export type DelegatesPostDelegateV3ApiArg = { + /** Chain ID where the delegate will be registered */ + chainId: string + /** Delegate creation data including Safe address, delegate address, label, and authorization signature */ + createDelegateDto: CreateDelegateDto +} +export type DelegatesUpdateDelegateV3ApiResponse = unknown +export type DelegatesUpdateDelegateV3ApiArg = { + /** Chain ID where the delegate is registered */ + chainId: string + /** Delegate update data including Safe address, delegate address, delegator, label, and authorization signature */ + updateDelegateV3Dto: UpdateDelegateV3Dto +} +export type DelegatesDeleteDelegateV3ApiResponse = unknown +export type DelegatesDeleteDelegateV3ApiArg = { + /** Chain ID where the delegate is registered */ + chainId: string + /** Delegate address to remove (0x prefixed hex string) */ + delegateAddress: string + /** Signature and data proving authorization to delete the delegate */ + deleteDelegateV3Dto: DeleteDelegateV3Dto +} export type Delegate = { safe?: string | null delegate: string @@ -161,6 +237,18 @@ export type DeleteDelegateV2Dto = { safe?: string | null signature: string } +export type UpdateDelegateV3Dto = { + safe?: string | null + delegate: string + delegator: string + signature: string + label: string +} +export type DeleteDelegateV3Dto = { + delegator?: string | null + safe?: string | null + signature: string +} export const { useDelegatesGetDelegatesV1Query, useLazyDelegatesGetDelegatesV1Query, @@ -170,4 +258,9 @@ export const { useLazyDelegatesGetDelegatesV2Query, useDelegatesPostDelegateV2Mutation, useDelegatesDeleteDelegateV2Mutation, + useDelegatesGetDelegatesV3Query, + useLazyDelegatesGetDelegatesV3Query, + useDelegatesPostDelegateV3Mutation, + useDelegatesUpdateDelegateV3Mutation, + useDelegatesDeleteDelegateV3Mutation, } = injectedRtkApi diff --git a/packages/store/src/gateway/AUTO_GENERATED/messages.ts b/packages/store/src/gateway/AUTO_GENERATED/messages.ts index d552d041f7e..ca86622e801 100644 --- a/packages/store/src/gateway/AUTO_GENERATED/messages.ts +++ b/packages/store/src/gateway/AUTO_GENERATED/messages.ts @@ -86,6 +86,7 @@ export type TypedDataDomain = { salt?: string verifyingContract?: string version?: string + safe?: string } export type TypedDataParameter = { name: string @@ -110,35 +111,45 @@ export type MessageConfirmation = { owner: AddressInfo signature: string } +export type SafeAppInfo = { + id: number + name: string + url: string + logoUri?: string | null +} export type Message = { messageHash: string status: 'NEEDS_CONFIRMATION' | 'CONFIRMED' - logoUri?: string | null - name?: string | null + logoUri: string | null + name: string | null message: string | TypedData creationTimestamp: number modifiedTimestamp: number confirmationsSubmitted: number confirmationsRequired: number - proposedBy: AddressInfo + proposedBy: AddressInfo | null confirmations: MessageConfirmation[] - preparedSignature?: string | null - origin?: string | null + preparedSignature: string | null + origin: string | null + safeAppInfo: SafeAppInfo | null + safeAppId: number | null } export type MessageItem = { messageHash: string status: 'NEEDS_CONFIRMATION' | 'CONFIRMED' - logoUri?: string | null - name?: string | null + logoUri: string | null + name: string | null message: string | TypedData creationTimestamp: number modifiedTimestamp: number confirmationsSubmitted: number confirmationsRequired: number - proposedBy: AddressInfo + proposedBy: AddressInfo | null confirmations: MessageConfirmation[] - preparedSignature?: string | null - origin?: string | null + preparedSignature: string | null + origin: string | null + safeAppInfo: SafeAppInfo | null + safeAppId: number | null type: 'MESSAGE' } export type DateLabel = { @@ -151,11 +162,23 @@ export type MessagePage = { previous?: string | null results: (MessageItem | DateLabel)[] } +export type DeclaredAttributionDto = { + /** Where the user started the request. Known values: NATIVE_TRANSFER, NATIVE_BATCH, SAFE_APP, WALLET_CONNECT, WIDGET, DIRECT, MCP, CLI. Truncated to 64 characters. */ + channel?: string | null + /** App name. Truncated to 256 characters. */ + appName?: string | null + /** App origin and path. Truncated to 2048 characters. */ + appUrl?: string | null + /** ID of a listed Safe App. */ + appId?: number | null +} export type CreateMessageDto = { message: string | TypedData safeAppId?: number | null signature: string origin?: string | null + /** Where the request came from, as reported by the client. */ + declared?: DeclaredAttributionDto | null } export type UpdateMessageSignatureDto = { signature: string diff --git a/packages/store/src/gateway/AUTO_GENERATED/notifications.ts b/packages/store/src/gateway/AUTO_GENERATED/notifications.ts index 44769d06764..83d6a0b204d 100644 --- a/packages/store/src/gateway/AUTO_GENERATED/notifications.ts +++ b/packages/store/src/gateway/AUTO_GENERATED/notifications.ts @@ -156,10 +156,10 @@ export type SafeRegistration = { export type RegisterDeviceDto = { uuid?: string | null cloudMessagingToken: string - buildNumber: string - bundle: string + buildNumber?: string + bundle?: string deviceType: string - version: string + version?: string timestamp?: string | null safeRegistrations: SafeRegistration[] } diff --git a/packages/store/src/gateway/AUTO_GENERATED/portfolios.ts b/packages/store/src/gateway/AUTO_GENERATED/portfolios.ts index e772709fbf4..420e15ab5ef 100644 --- a/packages/store/src/gateway/AUTO_GENERATED/portfolios.ts +++ b/packages/store/src/gateway/AUTO_GENERATED/portfolios.ts @@ -20,9 +20,29 @@ const injectedRtkApi = api providesTags: ['portfolio'], }), portfolioClearPortfolioV1: build.mutation({ - query: (queryArg) => ({ url: `/v1/portfolio/${queryArg.address}`, method: 'DELETE' }), + query: (queryArg) => ({ + url: `/v1/portfolio/${queryArg.address}`, + method: 'DELETE', + params: { + chainId: queryArg.chainId, + }, + }), invalidatesTags: ['portfolio'], }), + portfolioSummariesGetSummariesV2: build.query< + PortfolioSummariesGetSummariesV2ApiResponse, + PortfolioSummariesGetSummariesV2ApiArg + >({ + query: (queryArg) => ({ + url: `/v2/portfolio/summaries`, + params: { + safes: queryArg.safes, + currency: queryArg.currency, + trusted: queryArg.trusted, + }, + }), + providesTags: ['portfolio'], + }), }), overrideExisting: false, }) @@ -44,8 +64,19 @@ export type PortfolioGetPortfolioV1ApiArg = { } export type PortfolioClearPortfolioV1ApiResponse = unknown export type PortfolioClearPortfolioV1ApiArg = { - /** Wallet address (0x prefixed hex string) */ + /** Safe address (0x prefixed hex string) */ address: string + /** A chain on which the address is a Safe */ + chainId: string +} +export type PortfolioSummariesGetSummariesV2ApiResponse = /** status 200 */ PortfolioSummary[] +export type PortfolioSummariesGetSummariesV2ApiArg = { + /** Comma-separated list of Safe addresses in chainId:address format. Only the first MAX_SAFE_OVERVIEWS distinct entries are used. */ + safes: string + /** Fiat currency code, any case (e.g. USD, eur) */ + currency: string + /** If true, only trusted tokens count. Defaults to true, like GET /v1/portfolio, so the totals match the Assets page. */ + trusted?: boolean } export type PortfolioNativeToken = { address: string @@ -149,8 +180,36 @@ export type Portfolio = { /** List of app balances */ positionBalances: AppBalance[] } +export type PortfolioSummarySnapshot = { + /** Total across every chain of this address in this environment (mainnets or testnets). Decimal string. */ + fiatTotal: string + /** Total per chain, keyed by chainId. Adds up to fiatTotal. Decimal strings. */ + fiatTotalByChain: { + [key: string]: string + } + /** Total per Zerion position type (wallet, deposit, loan, staked, locked, reward, ...) across every chain of this address in this environment. Loans are negative. Adds up to fiatTotal. Decimal strings. */ + fiatTotalByType: { + [key: string]: string + } + /** When the snapshot was fetched from Zerion. */ + updatedAt: string + /** Approximately when the cached snapshot expires: the cache adds jitter to its lifetime, and a transaction or a manual refresh can clear it earlier. */ + expiresAt: string +} +export type PortfolioSummary = { + chainId: string + address: string + /** Value of this Safe on this chain. Decimal string. */ + fiatTotal: string + /** zerion: summed from the Zerion snapshot the Assets page reads. tx_service: the chain is not on Zerion, or the snapshot is unavailable. */ + source: 'zerion' | 'tx_service' + /** The Zerion snapshot the value was summed from, null for tx_service. */ + snapshot: PortfolioSummarySnapshot | null +} export const { usePortfolioGetPortfolioV1Query, useLazyPortfolioGetPortfolioV1Query, usePortfolioClearPortfolioV1Mutation, + usePortfolioSummariesGetSummariesV2Query, + useLazyPortfolioSummariesGetSummariesV2Query, } = injectedRtkApi diff --git a/packages/store/src/gateway/AUTO_GENERATED/relay.ts b/packages/store/src/gateway/AUTO_GENERATED/relay.ts index 31f3cb79ac5..c90764d973b 100644 --- a/packages/store/src/gateway/AUTO_GENERATED/relay.ts +++ b/packages/store/src/gateway/AUTO_GENERATED/relay.ts @@ -48,12 +48,24 @@ export type RelayGetRelaysRemainingV1ApiArg = { chainId: string /** Safe contract address (0x prefixed hex string) */ safeAddress: string - /** Safe transaction hash (0x prefixed hex string). Required on relay-fee chains to check per-transaction eligibility with the fee service. Optional on daily-limit and no-fee-campaign chains. */ + /** Safe transaction hash (0x prefixed hex string). Ignored; kept so existing clients do not break. */ safeTxHash?: string } export type Relay = { taskId: string } +export type GasPaymentOptionUnavailableResponse = { + code: 'GAS_PAYMENT_OPTION_UNAVAILABLE' + /** Human-readable description of the error. Informational only; do not parse. */ + message: string + statusCode: number + /** The gas payment option the request needed. */ + requested: 'FREE_DAILY_LIMIT' | 'SUBSCRIPTION' | 'PAY_FROM_SAFE' | 'NO_FEE_CAMPAIGN' + /** NOT_LISTED: the chain does not list the option. NO_RELAYER: the chain has no relayer. NOT_A_WORKSPACE_SAFE: the Safe is not one the workspace holds. REFUNDING_TRANSACTION: the transaction would refund gas (`gasPrice` > 0). */ + reason: 'NOT_LISTED' | 'NO_RELAYER' | 'NOT_A_WORKSPACE_SAFE' | 'REFUNDING_TRANSACTION' + /** The options the chain lists; empty without a relayer. */ + available: ('FREE_DAILY_LIMIT' | 'SUBSCRIPTION' | 'PAY_FROM_SAFE' | 'NO_FEE_CAMPAIGN')[] +} export type RelayErrorResponse = { /** Stable identifier of the error condition. The frontend MUST branch on this value (not on `message`, which is informational and may change). */ code: 'SIMULATION_FAILED' | 'INDETERMINATE_SIMULATION' diff --git a/packages/store/src/gateway/AUTO_GENERATED/safe-shield.ts b/packages/store/src/gateway/AUTO_GENERATED/safe-shield.ts index dbb130c49d1..1bd34f982c3 100644 --- a/packages/store/src/gateway/AUTO_GENERATED/safe-shield.ts +++ b/packages/store/src/gateway/AUTO_GENERATED/safe-shield.ts @@ -353,6 +353,7 @@ export type TypedDataDomain = { salt?: string verifyingContract?: string version?: string + safe?: string } export type TypedDataParameter = { name: string diff --git a/packages/store/src/gateway/AUTO_GENERATED/spaces.ts b/packages/store/src/gateway/AUTO_GENERATED/spaces.ts index b9cb1d8fa20..d0497977c93 100644 --- a/packages/store/src/gateway/AUTO_GENERATED/spaces.ts +++ b/packages/store/src/gateway/AUTO_GENERATED/spaces.ts @@ -24,6 +24,40 @@ const injectedRtkApi = api }), invalidatesTags: ['spaces'], }), + addressBooksSetContactTagsV1: build.mutation< + AddressBooksSetContactTagsV1ApiResponse, + AddressBooksSetContactTagsV1ApiArg + >({ + query: (queryArg) => ({ + url: `/v1/spaces/${queryArg.spaceId}/address-book/tags`, + method: 'PUT', + body: queryArg.setContactTagsDto, + }), + invalidatesTags: ['spaces'], + }), + addressBooksCreateTagV1: build.mutation({ + query: (queryArg) => ({ + url: `/v1/spaces/${queryArg.spaceId}/address-book/tags`, + method: 'POST', + body: queryArg.createTagDto, + }), + invalidatesTags: ['spaces'], + }), + addressBooksRenameTagV1: build.mutation({ + query: (queryArg) => ({ + url: `/v1/spaces/${queryArg.spaceId}/address-book/tags/${queryArg.tagId}`, + method: 'PATCH', + body: queryArg.renameTagDto, + }), + invalidatesTags: ['spaces'], + }), + addressBooksDeleteTagV1: build.mutation({ + query: (queryArg) => ({ + url: `/v1/spaces/${queryArg.spaceId}/address-book/tags/${queryArg.tagId}`, + method: 'DELETE', + }), + invalidatesTags: ['spaces'], + }), addressBooksDeleteByAddressV1: build.mutation< AddressBooksDeleteByAddressV1ApiResponse, AddressBooksDeleteByAddressV1ApiArg @@ -80,6 +114,22 @@ const injectedRtkApi = api query: () => ({ url: `/v1/spaces` }), providesTags: ['spaces'], }), + spacesCreateSetupV1: build.mutation({ + query: (queryArg) => ({ url: `/v1/spaces/setup`, method: 'POST', body: queryArg.createSpaceSetupDto }), + invalidatesTags: ['spaces'], + }), + spacesGetSetupV1: build.query({ + query: (queryArg) => ({ url: `/v1/spaces/${queryArg.id}/setup` }), + providesTags: ['spaces'], + }), + spacesUpdateSetupV1: build.mutation({ + query: (queryArg) => ({ + url: `/v1/spaces/${queryArg.id}/setup`, + method: 'PUT', + body: queryArg.createSpaceSetupDto, + }), + invalidatesTags: ['spaces'], + }), spacesGetOneV1: build.query({ query: (queryArg) => ({ url: `/v1/spaces/${queryArg.id}` }), providesTags: ['spaces'], @@ -96,12 +146,12 @@ const injectedRtkApi = api query: (queryArg) => ({ url: `/v1/spaces/${queryArg.spaceId}/audit-log`, params: { + cursor: queryArg.cursor, event_type: queryArg.eventType, actor_user_id: queryArg.actorUserId, created_at__gte: queryArg.createdAtGte, created_at__lte: queryArg.createdAtLte, sort_direction: queryArg.sortDirection, - cursor: queryArg.cursor, }, }), providesTags: ['spaces'], @@ -133,6 +183,10 @@ const injectedRtkApi = api }), invalidatesTags: ['spaces'], }), + spaceSafesGetAllV1: build.query({ + query: () => ({ url: `/v1/spaces/safes` }), + providesTags: ['spaces'], + }), membersInviteUserV1: build.mutation({ query: (queryArg) => ({ url: `/v1/spaces/${queryArg.spaceId}/members/invite`, @@ -199,6 +253,13 @@ const injectedRtkApi = api query: (queryArg) => ({ url: `/v1/spaces/${queryArg.spaceId}/counterfactual-safes` }), providesTags: ['spaces'], }), + entitlementsGetAllEntitlementsV1: build.query< + EntitlementsGetAllEntitlementsV1ApiResponse, + EntitlementsGetAllEntitlementsV1ApiArg + >({ + query: () => ({ url: `/v1/spaces/entitlements` }), + providesTags: ['entitlements'], + }), entitlementsGetEntitlementsV1: build.query< EntitlementsGetEntitlementsV1ApiResponse, EntitlementsGetEntitlementsV1ApiArg @@ -224,6 +285,36 @@ export type AddressBooksUpsertAddressBookItemsV1ApiArg = { /** Address book items to create or update, including addresses and their labels */ upsertAddressBookItemsDto: UpsertAddressBookItemsDto } +export type AddressBooksSetContactTagsV1ApiResponse = /** status 200 Tags set successfully */ SpaceAddressBookDto +export type AddressBooksSetContactTagsV1ApiArg = { + /** Space UUID containing the address book */ + spaceId: string + /** The entries to tag, each with its full set of tag names */ + setContactTagsDto: SetContactTagsDto +} +export type AddressBooksCreateTagV1ApiResponse = /** status 201 Tag created successfully */ SpaceAddressBookDto +export type AddressBooksCreateTagV1ApiArg = { + /** Space UUID containing the address book */ + spaceId: string + /** The tag name */ + createTagDto: CreateTagDto +} +export type AddressBooksRenameTagV1ApiResponse = /** status 200 Tag renamed successfully */ SpaceAddressBookDto +export type AddressBooksRenameTagV1ApiArg = { + /** Space UUID containing the address book */ + spaceId: string + /** ID of the tag to rename */ + tagId: number + /** The new tag name */ + renameTagDto: RenameTagDto +} +export type AddressBooksDeleteTagV1ApiResponse = unknown +export type AddressBooksDeleteTagV1ApiArg = { + /** Space UUID containing the address book */ + spaceId: string + /** ID of the tag to delete */ + tagId: number +} export type AddressBooksDeleteByAddressV1ApiResponse = unknown export type AddressBooksDeleteByAddressV1ApiArg = { /** Space UUID containing the address book */ @@ -266,6 +357,21 @@ export type SpacesCreateV1ApiArg = { } export type SpacesGetV1ApiResponse = /** status 200 User spaces retrieved successfully */ GetSpaceResponse[] export type SpacesGetV1ApiArg = void +export type SpacesCreateSetupV1ApiResponse = /** status 201 */ SpaceSetupCheckoutDto +export type SpacesCreateSetupV1ApiArg = { + createSpaceSetupDto: CreateSpaceSetupDto +} +export type SpacesGetSetupV1ApiResponse = /** status 200 */ SpaceSetupDto +export type SpacesGetSetupV1ApiArg = { + /** Space UUID */ + id: string +} +export type SpacesUpdateSetupV1ApiResponse = /** status 200 */ SpaceSetupCheckoutDto +export type SpacesUpdateSetupV1ApiArg = { + /** Space UUID */ + id: string + createSpaceSetupDto: CreateSpaceSetupDto +} export type SpacesGetOneV1ApiResponse = /** status 200 Space information retrieved successfully */ GetSpaceResponse export type SpacesGetOneV1ApiArg = { /** Space UUID */ @@ -287,6 +393,8 @@ export type SpaceAuditGetAuditLogV1ApiResponse = /** status 200 Paginated audit export type SpaceAuditGetAuditLogV1ApiArg = { /** Space UUID */ spaceId: string + /** Pagination cursor for retrieving the next set of results */ + cursor?: string /** Comma-separated list of event types to filter by */ eventType?: string /** Filter by acting user id */ @@ -297,8 +405,6 @@ export type SpaceAuditGetAuditLogV1ApiArg = { createdAtLte?: string /** Sort direction over (created_at, id). Defaults to desc. */ sortDirection?: 'asc' | 'desc' - /** Pagination cursor for retrieving the next set of results */ - cursor?: string } export type SpaceAuditGetAuditLogActorsV1ApiResponse = /** status 200 Distinct audit log actors */ SpaceAuditLogActorDto[] @@ -325,6 +431,9 @@ export type SpaceSafesDeleteV1ApiArg = { /** List of Safe addresses and their chain information to remove from the space */ deleteSpaceSafesDto: DeleteSpaceSafesDto } +export type SpaceSafesGetAllV1ApiResponse = + /** status 200 Safes of all spaces retrieved successfully */ GetSpacesSafesResponse[] +export type SpaceSafesGetAllV1ApiArg = void export type MembersInviteUserV1ApiResponse = /** status 200 Users invited successfully */ Invitation[] export type MembersInviteUserV1ApiArg = { /** Space UUID to invite users to */ @@ -394,6 +503,10 @@ export type SpaceCounterfactualSafesGetV1ApiArg = { /** Space UUID */ spaceId: string } +export type EntitlementsGetAllEntitlementsV1ApiResponse = /** status 200 */ { + [key: string]: EntitlementsResponse +} +export type EntitlementsGetAllEntitlementsV1ApiArg = void export type EntitlementsGetEntitlementsV1ApiResponse = /** status 200 */ EntitlementsResponse export type EntitlementsGetEntitlementsV1ApiArg = { /** Space UUID */ @@ -403,6 +516,8 @@ export type SpaceAddressBookItemDto = { name: string address: string chainIds: string[] + /** IDs of the workspace tags assigned to the contact */ + tagIds: number[] /** Email or wallet address of the creator, "Unknown user" if the user has no display identity, or "Deleted user" */ createdBy: string /** User ID of the creator */ @@ -414,18 +529,46 @@ export type SpaceAddressBookItemDto = { createdAt: string updatedAt: string } +export type SpaceAddressBookTagDto = { + id: number + name: string + color: 'slate' | 'clay' | 'rose' | 'lilac' | 'iris' | 'cobalt' | 'sky' | 'lagoon' + /** Number of contacts that have this tag */ + contactCount: number +} export type SpaceAddressBookDto = { /** Space UUID */ spaceUuid: string data: SpaceAddressBookItemDto[] + /** All tags defined in the workspace address book */ + tags: SpaceAddressBookTagDto[] } -export type AddressBookItem = { +export type UpsertAddressBookItem = { name: string address: string chainIds: string[] + /** Tag names of the contact (replaces the current tags when provided; omit to leave them unchanged) */ + tags?: string[] } export type UpsertAddressBookItemsDto = { - items: AddressBookItem[] + items: UpsertAddressBookItem[] +} +export type SetContactTagsItem = { + address: string + /** The full set of tag names for the contact. 'Workspace Safe' and 'Signer' aren't allowed, in any case */ + tags: string[] +} +export type SetContactTagsDto = { + /** At most as many entries as the address book can hold, each address at most once */ + items: SetContactTagsItem[] +} +export type CreateTagDto = { + /** 'Workspace Safe' and 'Signer' aren't allowed, in any case */ + name: string +} +export type RenameTagDto = { + /** 'Workspace Safe' and 'Signer' aren't allowed, in any case */ + name: string } export type AddressBookRequestItemDto = { id: number @@ -487,6 +630,64 @@ export type GetSpaceResponse = { memberCount: number /** Total count of Safes in the space */ safeCount: number + /** Experimental features this Workspace has opted into. */ + experimentalFeatures: 'POLICY_RECIPIENT_ALLOWLIST'[] + /** Status of the onboarding setup, or null for a Workspace created without one. Pending until the trial starts and the setup is applied. */ + setupStatus: ('pending' | 'applied') | null +} +export type SpaceSetupCheckoutDto = { + /** Space UUID */ + spaceId: string + /** The checkout to redirect to. Null when no plan was given: the setup is applied already. */ + checkoutUrl: string | null +} +export type SpaceSafeDto = { + chainId: string + address: string +} +export type AddressBookItem = { + name: string + address: string + chainIds: string[] +} +export type WalletInviteUserDto = { + type: 'wallet' + address: string + role: 'ADMIN' | 'MEMBER' + name: string +} +export type EmailInviteUserDto = { + type: 'email' + email: string + role: 'ADMIN' | 'MEMBER' + name: string +} +export type SpaceSetupSurveyDto = { + slug: string + /** Map from page id to selected option keys */ + selections: { + [key: string]: string[] + } +} +export type CreateSpaceSetupDto = { + name: string + /** The picked trial plan; its checkout starts the trial. Null applies the setup at once, which is refused once billing is enforced. */ + paymentLinkId: string | null + /** Safes to add when the trial starts. One seat per address, however many chains. */ + safes: SpaceSafeDto[] + addressBookItems: AddressBookItem[] + invites: (WalletInviteUserDto | EmailInviteUserDto)[] + survey: SpaceSetupSurveyDto | null + /** Where the checkout returns to. Must be on an allowed redirect domain. */ + returnUrl: string +} +export type SpaceSetupDto = { + status: 'pending' | 'applied' + paymentLinkId: string | null + safes: SpaceSafeDto[] + addressBookItems: AddressBookItem[] + invites: (WalletInviteUserDto | EmailInviteUserDto)[] + survey: SpaceSetupSurveyDto | null } export type UpdateSpaceResponse = { /** Space UUID */ @@ -495,6 +696,8 @@ export type UpdateSpaceResponse = { export type UpdateSpaceDto = { name?: string status?: 'ACTIVE' + /** Replaces the stored set; [] opts out of all. Omit to leave it unchanged. */ + experimentalFeatures?: 'POLICY_RECIPIENT_ALLOWLIST'[] } export type SpaceAuditLogEntryDto = { /** Monotonic entry id (bigint serialized as string) */ @@ -515,6 +718,12 @@ export type SpaceAuditLogEntryDto = { | 'SAFE_REMOVED' | 'ADDRESS_BOOK_UPSERTED' | 'ADDRESS_BOOK_DELETED' + | 'ADDRESS_BOOK_REQUEST_CREATED' + | 'ADDRESS_BOOK_REQUEST_REJECTED' + | 'ADDRESS_BOOK_TAGS_UPDATED' + | 'ADDRESS_BOOK_TAG_CREATED' + | 'ADDRESS_BOOK_TAG_RENAMED' + | 'ADDRESS_BOOK_TAG_DELETED' actorUserId: number /** Resolved (and masked) display string of the acting user. */ actor: string @@ -535,12 +744,10 @@ export type SpaceAuditLogActorDto = { /** Resolved (and masked) display string of the actor. */ actor: string } -export type SpaceSafeDto = { - chainId: string - address: string -} export type CreateSpaceSafesDto = { safes: SpaceSafeDto[] + /** Address book entries to upsert for the added Safes, in the same transaction: if either write fails, neither is kept. */ + addressBookItems?: AddressBookItem[] } export type GetSpaceSafeResponse = { safes: { @@ -550,6 +757,13 @@ export type GetSpaceSafeResponse = { export type DeleteSpaceSafesDto = { safes: SpaceSafeDto[] } +export type GetSpacesSafesResponse = { + safes: { + [key: string]: string[] + } + /** Space UUID */ + spaceUuid: string +} export type Invitation = { userId: number name: string @@ -559,18 +773,6 @@ export type Invitation = { status: 'INVITED' | 'ACTIVE' | 'DECLINED' invitedBy: number | null } -export type WalletInviteUserDto = { - type: 'wallet' - address: string - role: 'ADMIN' | 'MEMBER' - name: string -} -export type EmailInviteUserDto = { - type: 'email' - email: string - role: 'ADMIN' | 'MEMBER' - name: string -} export type InviteUsersDto = { users: (WalletInviteUserDto | EmailInviteUserDto)[] } @@ -581,6 +783,7 @@ export type MemberUser = { id: number status: 'PENDING' | 'ACTIVE' email: string | null + address: string | null } export type MemberDto = { id: number @@ -624,14 +827,17 @@ export type GetCounterfactualSafesResponse = { [key: string]: GetCounterfactualSafeItem[] } } +export type EntitlementsPlanStatus = 'active' | 'trialing' export type EntitlementsPlan = { /** Plan identifier in the billing service */ id: string name: string | null /** End of the current billing cycle */ cycleEndsAt: string | null + /** Status of the subscription the plan comes from */ + status: EntitlementsPlanStatus } -export type FeatureKey = 'safe_seats' +export type FeatureKey = 'safe_seats' | 'copilot_scans' | 'sponsored_transactions' | 'policies' | 'safenet_checks' export type BinaryEntitlement = { /** Feature key from the entitlements catalog. */ feature: FeatureKey @@ -680,6 +886,10 @@ export const { useAddressBooksGetAddressBookItemsV1Query, useLazyAddressBooksGetAddressBookItemsV1Query, useAddressBooksUpsertAddressBookItemsV1Mutation, + useAddressBooksSetContactTagsV1Mutation, + useAddressBooksCreateTagV1Mutation, + useAddressBooksRenameTagV1Mutation, + useAddressBooksDeleteTagV1Mutation, useAddressBooksDeleteByAddressV1Mutation, useAddressBookRequestsGetPendingRequestsV1Query, useLazyAddressBookRequestsGetPendingRequestsV1Query, @@ -689,6 +899,10 @@ export const { useSpacesCreateV1Mutation, useSpacesGetV1Query, useLazySpacesGetV1Query, + useSpacesCreateSetupV1Mutation, + useSpacesGetSetupV1Query, + useLazySpacesGetSetupV1Query, + useSpacesUpdateSetupV1Mutation, useSpacesGetOneV1Query, useLazySpacesGetOneV1Query, useSpacesUpdateV1Mutation, @@ -701,6 +915,8 @@ export const { useSpaceSafesGetV1Query, useLazySpaceSafesGetV1Query, useSpaceSafesDeleteV1Mutation, + useSpaceSafesGetAllV1Query, + useLazySpaceSafesGetAllV1Query, useMembersInviteUserV1Mutation, useMembersAcceptInviteV1Mutation, useMembersDeclineInviteV1Mutation, @@ -715,6 +931,8 @@ export const { useMembersRemoveUserV1Mutation, useSpaceCounterfactualSafesGetV1Query, useLazySpaceCounterfactualSafesGetV1Query, + useEntitlementsGetAllEntitlementsV1Query, + useLazyEntitlementsGetAllEntitlementsV1Query, useEntitlementsGetEntitlementsV1Query, useLazyEntitlementsGetEntitlementsV1Query, } = injectedRtkApi diff --git a/packages/store/src/gateway/AUTO_GENERATED/surveys.ts b/packages/store/src/gateway/AUTO_GENERATED/surveys.ts index 91fcab930ad..6ac32178209 100644 --- a/packages/store/src/gateway/AUTO_GENERATED/surveys.ts +++ b/packages/store/src/gateway/AUTO_GENERATED/surveys.ts @@ -6,6 +6,10 @@ const injectedRtkApi = api }) .injectEndpoints({ endpoints: (build) => ({ + surveysGetActiveSurveyV1: build.query({ + query: (queryArg) => ({ url: `/v1/surveys/${queryArg.slug}` }), + providesTags: ['surveys'], + }), surveysGetStateV1: build.query({ query: (queryArg) => ({ url: `/v1/spaces/${queryArg.spaceId}/surveys/${queryArg.slug}/state` }), providesTags: ['surveys'], @@ -22,6 +26,10 @@ const injectedRtkApi = api overrideExisting: false, }) export { injectedRtkApi as cgwApi } +export type SurveysGetActiveSurveyV1ApiResponse = /** status 200 */ SurveyDto +export type SurveysGetActiveSurveyV1ApiArg = { + slug: string +} export type SurveysGetStateV1ApiResponse = /** status 200 */ SurveyStateDto export type SurveysGetStateV1ApiArg = { /** Space UUID to get survey state for */ @@ -92,5 +100,10 @@ export type SubmitSurveyResponseDto = { [key: string]: string[] } } -export const { useSurveysGetStateV1Query, useLazySurveysGetStateV1Query, useSurveysSubmitResponseV1Mutation } = - injectedRtkApi +export const { + useSurveysGetActiveSurveyV1Query, + useLazySurveysGetActiveSurveyV1Query, + useSurveysGetStateV1Query, + useLazySurveysGetStateV1Query, + useSurveysSubmitResponseV1Mutation, +} = injectedRtkApi diff --git a/packages/store/src/gateway/AUTO_GENERATED/transactions.ts b/packages/store/src/gateway/AUTO_GENERATED/transactions.ts index 95702cf601f..935bc114ed3 100644 --- a/packages/store/src/gateway/AUTO_GENERATED/transactions.ts +++ b/packages/store/src/gateway/AUTO_GENERATED/transactions.ts @@ -20,13 +20,13 @@ const injectedRtkApi = api query: (queryArg) => ({ url: `/v1/chains/${queryArg.chainId}/safes/${queryArg.safeAddress}/multisig-transactions`, params: { + cursor: queryArg.cursor, execution_date__gte: queryArg.executionDateGte, execution_date__lte: queryArg.executionDateLte, to: queryArg.to, value: queryArg.value, nonce: queryArg.nonce, executed: queryArg.executed, - cursor: queryArg.cursor, }, }), providesTags: ['transactions'], @@ -49,10 +49,10 @@ const injectedRtkApi = api query: (queryArg) => ({ url: `/v1/chains/${queryArg.chainId}/safes/${queryArg.safeAddress}/module-transactions`, params: { + cursor: queryArg.cursor, to: queryArg.to, module: queryArg['module'], transaction_hash: queryArg.transactionHash, - cursor: queryArg.cursor, }, }), providesTags: ['transactions'], @@ -75,13 +75,30 @@ const injectedRtkApi = api query: (queryArg) => ({ url: `/v1/chains/${queryArg.chainId}/safes/${queryArg.safeAddress}/incoming-transfers`, params: { + cursor: queryArg.cursor, trusted: queryArg.trusted, execution_date__gte: queryArg.executionDateGte, execution_date__lte: queryArg.executionDateLte, to: queryArg.to, value: queryArg.value, token_address: queryArg.tokenAddress, + }, + }), + providesTags: ['transactions'], + }), + transactionsGetOutgoingTransfersV1: build.query< + TransactionsGetOutgoingTransfersV1ApiResponse, + TransactionsGetOutgoingTransfersV1ApiArg + >({ + query: (queryArg) => ({ + url: `/v1/chains/${queryArg.chainId}/safes/${queryArg.safeAddress}/outgoing-transfers`, + params: { cursor: queryArg.cursor, + trusted: queryArg.trusted, + execution_date__gte: queryArg.executionDateGte, + execution_date__lte: queryArg.executionDateLte, + to: queryArg.to, + token_address: queryArg.tokenAddress, }, }), providesTags: ['transactions'], @@ -104,8 +121,8 @@ const injectedRtkApi = api query: (queryArg) => ({ url: `/v1/chains/${queryArg.chainId}/safes/${queryArg.safeAddress}/transactions/queued`, params: { - trusted: queryArg.trusted, cursor: queryArg.cursor, + trusted: queryArg.trusted, }, }), providesTags: ['transactions'], @@ -117,11 +134,11 @@ const injectedRtkApi = api query: (queryArg) => ({ url: `/v1/chains/${queryArg.chainId}/safes/${queryArg.safeAddress}/transactions/history`, params: { + cursor: queryArg.cursor, timezone_offset: queryArg.timezoneOffset, trusted: queryArg.trusted, imitation: queryArg.imitation, timezone: queryArg.timezone, - cursor: queryArg.cursor, }, }), providesTags: ['transactions'], @@ -163,6 +180,8 @@ export type TransactionsGetMultisigTransactionsV1ApiResponse = export type TransactionsGetMultisigTransactionsV1ApiArg = { /** Chain ID where the Safe is deployed */ chainId: string + /** Pagination cursor for retrieving the next set of results */ + cursor?: string /** Safe contract address (0x prefixed hex string) */ safeAddress: string /** Filter by execution date greater than or equal to (ISO 8601 format) */ @@ -177,8 +196,6 @@ export type TransactionsGetMultisigTransactionsV1ApiArg = { nonce?: string /** Filter by execution status (true for executed, false for pending) */ executed?: boolean - /** Pagination cursor for retrieving the next set of results */ - cursor?: string } export type TransactionsDeleteTransactionV1ApiResponse = unknown export type TransactionsDeleteTransactionV1ApiArg = { @@ -194,6 +211,8 @@ export type TransactionsGetModuleTransactionsV1ApiResponse = export type TransactionsGetModuleTransactionsV1ApiArg = { /** Chain ID where the Safe is deployed */ chainId: string + /** Pagination cursor for retrieving the next set of results */ + cursor?: string /** Safe contract address (0x prefixed hex string) */ safeAddress: string /** Filter by recipient address (0x prefixed hex string) */ @@ -202,11 +221,9 @@ export type TransactionsGetModuleTransactionsV1ApiArg = { module?: string /** Filter by specific transaction hash */ transactionHash?: string - /** Pagination cursor for retrieving the next set of results */ - cursor?: string } export type TransactionsAddConfirmationV1ApiResponse = - /** status 200 Transaction details with updated confirmation status */ Transaction + /** status 200 Transaction details with updated confirmation status */ TransactionDetails export type TransactionsAddConfirmationV1ApiArg = { /** Chain ID where the Safe is deployed */ chainId: string @@ -222,6 +239,8 @@ export type TransactionsGetIncomingTransfersV1ApiArg = { chainId: string /** Safe contract address (0x prefixed hex string) */ safeAddress: string + /** Pagination cursor for retrieving the next set of results */ + cursor?: string /** Filter by trust status (true for trusted tokens, false for untrusted) */ trusted?: boolean /** Filter by execution date greater than or equal to (ISO 8601 format) */ @@ -234,8 +253,26 @@ export type TransactionsGetIncomingTransfersV1ApiArg = { value?: string /** Filter by token contract address (0x prefixed hex string for ERC-20 tokens) */ tokenAddress?: string +} +export type TransactionsGetOutgoingTransfersV1ApiResponse = + /** status 200 Paginated list of outgoing transfers */ TransferTransactionItemPage +export type TransactionsGetOutgoingTransfersV1ApiArg = { + /** Chain ID where the Safe is deployed */ + chainId: string + /** Safe contract address (0x prefixed hex string) */ + safeAddress: string /** Pagination cursor for retrieving the next set of results */ cursor?: string + /** When true (default), ERC-20 transfers of untrusted tokens are omitted, since any token contract can emit a transfer the Safe never made. ERC-721 and native transfers are not filtered. ERC-20 transfers without value are always omitted. */ + trusted?: boolean + /** Filter by execution date greater than or equal to (ISO 8601 UTC, e.g. 2024-01-01T00:00:00Z) */ + executionDateGte?: string + /** Filter by execution date less than or equal to (ISO 8601 UTC, e.g. 2024-01-01T00:00:00Z) */ + executionDateLte?: string + /** Filter by transfer recipient address (0x prefixed hex string) */ + to?: string + /** Filter by token contract address (0x prefixed hex string) */ + tokenAddress?: string } export type TransactionsPreviewTransactionV1ApiResponse = /** status 200 Transaction preview with simulation results, gas estimates, and potential effects */ TransactionPreview @@ -254,10 +291,10 @@ export type TransactionsGetTransactionQueueV1ApiArg = { chainId: string /** Safe contract address (0x prefixed hex string) */ safeAddress: string - /** Filter by trust status (true for trusted transactions, false for untrusted) */ - trusted?: boolean /** Pagination cursor for retrieving the next set of results */ cursor?: string + /** Filter by trust status (true for trusted transactions, false for untrusted) */ + trusted?: boolean } export type TransactionsGetTransactionsHistoryV1ApiResponse = /** status 200 Paginated list of historical transactions */ TransactionItemPage @@ -266,6 +303,8 @@ export type TransactionsGetTransactionsHistoryV1ApiArg = { chainId: string /** Safe contract address (0x prefixed hex string) */ safeAddress: string + /** Pagination cursor for retrieving the next set of results */ + cursor?: string /** Deprecated: Timezone offset in milliseconds for date formatting (use timezone parameter instead) */ timezoneOffset?: string /** Filter by trust status (default: true, set to false to include untrusted transactions) */ @@ -274,8 +313,6 @@ export type TransactionsGetTransactionsHistoryV1ApiArg = { imitation?: boolean /** IANA timezone identifier for date formatting (e.g., "America/New_York") */ timezone?: string - /** Pagination cursor for retrieving the next set of results */ - cursor?: string } export type TransactionsProposeTransactionV1ApiResponse = /** status 200 Transaction proposed successfully */ TransactionDetails @@ -809,6 +846,7 @@ export type ModuleExecutionDetails = { address: AddressInfo } export type SafeAppInfo = { + id: number name: string url: string logoUri?: string | null @@ -915,6 +953,17 @@ export type IncomingTransferPage = { previous?: string | null results: IncomingTransfer[] } +export type TransactionItem = { + type: 'TRANSACTION' + transaction: Transaction + conflictType: 'None' +} +export type TransferTransactionItemPage = { + count?: number | null + next?: string | null + previous?: string | null + results: TransactionItem[] +} export type TransactionPreview = { txInfo: | CreationTransactionInfo @@ -960,11 +1009,6 @@ export type QueuedItemPage = { previous?: string | null results: (ConflictHeaderQueuedItem | LabelQueuedItem | TransactionQueuedItem)[] } -export type TransactionItem = { - type: 'TRANSACTION' - transaction: Transaction - conflictType: 'None' -} export type DateLabel = { type: 'DATE_LABEL' timestamp: number @@ -975,6 +1019,31 @@ export type TransactionItemPage = { previous?: string | null results: (TransactionItem | DateLabel)[] } +export type NestedTransactionDto = { + to?: string | null + value: string + data?: string | null + /** Operation type: 0 for CALL, 1 for DELEGATE */ + operation: Operation + safeTxGas: string + baseGas: string + gasPrice: string + gasToken?: string | null + refundReceiver?: string | null + /** The nested Safe's nonce */ + nonce: string + notes?: string | null +} +export type DeclaredAttributionDto = { + /** Where the user started the request. Known values: NATIVE_TRANSFER, NATIVE_BATCH, SAFE_APP, WALLET_CONNECT, WIDGET, DIRECT, MCP, CLI. Truncated to 64 characters. */ + channel?: string | null + /** App name. Truncated to 256 characters. */ + appName?: string | null + /** App origin and path. Truncated to 2048 characters. */ + appUrl?: string | null + /** ID of a listed Safe App. */ + appId?: number | null +} export type ProposeTransactionDto = { to: string value: string @@ -991,6 +1060,10 @@ export type ProposeTransactionDto = { sender: string signature?: string | null origin?: string | null + /** A child transaction for a second Safe, authorised by the parent transaction being an `approveHash` call committing to its hash. Unknown keys are rejected. */ + nestedTransaction?: NestedTransactionDto | null + /** Where the request came from, as reported by the client. */ + declared?: DeclaredAttributionDto | null } export type CreationTransaction = { created: string @@ -1013,6 +1086,8 @@ export const { useTransactionsAddConfirmationV1Mutation, useTransactionsGetIncomingTransfersV1Query, useLazyTransactionsGetIncomingTransfersV1Query, + useTransactionsGetOutgoingTransfersV1Query, + useLazyTransactionsGetOutgoingTransfersV1Query, useTransactionsPreviewTransactionV1Mutation, useTransactionsGetTransactionQueueV1Query, useLazyTransactionsGetTransactionQueueV1Query,