diff --git a/docs/custody-endpoints.md b/docs/custody-endpoints.md index b02ee1c..5ede02a 100644 --- a/docs/custody-endpoints.md +++ b/docs/custody-endpoints.md @@ -53,6 +53,8 @@ call them by method and path with `api.request`. | `GET /v1/domains/{domainId}/accounts/{accountId}/manifests` | `getManifests` | 1.15+ | cmpt | | `GET /v1/domains/{domainId}/accounts/{accountId}/manifests/{manifestId}` | `getManifest` | 1.15+ | cmpt | | `GET /v1/domains/{domainId}/accounts/{accountId}/parameters-compute/{computeId}` | `getParametersComputeStatus` | — | cmpt | +| `GET /v1/domains/{domainId}/accounts/{accountId}/sponsorship-movements` | `getAccountSponsorshipMovements` | — | cmpt | +| `GET /v1/domains/{domainId}/accounts/{accountId}/sponsorships` | `getAccountSponsorships` | — | cmpt | | `GET /v1/domains/{domainId}/channels` | `getAllChannels` | 1.19+ | cmpt | | `GET /v1/domains/{domainId}/channels/{channelId}` | `getChannel` | 1.19+ | cmpt | | `GET /v1/domains/{domainId}/channels/{channelId}/events` | `getAllChannelEvents` | 1.19+ | cmpt | @@ -203,6 +205,8 @@ call them by method and path with `api.request`. | `MPTokenIssuanceSet` | 1.32+ | cmpt | | `OfferCreate` | 1.15–1.22, 1.32+ | cmpt | | `Payment` | 1.15–1.22, 1.32+ | cmpt | +| `SponsorshipSetAsSponsee` | — | cmpt | +| `SponsorshipSetAsSponsor` | — | cmpt | | `TicketCreate` | — | cmpt | | `TrustSet` | 1.15–1.22, 1.32+ | cmpt | diff --git a/openapi/custody/devbox/cmpt/internal.json b/openapi/custody/devbox/cmpt/internal.json index 2299201..5b82007 100644 --- a/openapi/custody/devbox/cmpt/internal.json +++ b/openapi/custody/devbox/cmpt/internal.json @@ -1055,6 +1055,9 @@ "sequencing": { "$ref": "#/components/schemas/Internal_ParticipantSequencing" }, + "sponsorship": { + "$ref": "#/components/schemas/Internal_XrplSponsorshipParams" + }, "type": { "enum": [ "ParticipantOperation" @@ -1078,6 +1081,9 @@ "sequencing": { "$ref": "#/components/schemas/Internal_Sequencing" }, + "sponsorship": { + "$ref": "#/components/schemas/Internal_XrplSponsorshipParams" + }, "type": { "enum": [ "SubmitterOperation" @@ -1564,6 +1570,12 @@ "minimum": 0, "type": "integer" }, + "flags": { + "items": { + "$ref": "#/components/schemas/Internal_Xrpl_PaymentFlag" + }, + "type": "array" + }, "type": { "enum": [ "Payment" @@ -9847,6 +9859,9 @@ "minimum": 0, "type": "integer" }, + "sponsorship": { + "$ref": "#/components/schemas/Internal_XrplSponsorshipParams" + }, "type": { "enum": [ "XRPL" @@ -12273,6 +12288,8 @@ "MPTokenIssuanceSet": "#/components/schemas/Internal_XrplOperation_MPTokenIssuanceSet", "OfferCreate": "#/components/schemas/Internal_XrplOperation_OfferCreate", "Payment": "#/components/schemas/Internal_XrplOperation_Payment", + "SponsorshipSetAsSponsee": "#/components/schemas/Internal_XrplOperation_SponsorshipSetAsSponsee", + "SponsorshipSetAsSponsor": "#/components/schemas/Internal_XrplOperation_SponsorshipSetAsSponsor", "TicketCreate": "#/components/schemas/Internal_XrplOperation_TicketCreate", "TrustSet": "#/components/schemas/Internal_XrplOperation_TrustSet" }, @@ -12327,6 +12344,12 @@ { "$ref": "#/components/schemas/Internal_XrplOperation_Payment" }, + { + "$ref": "#/components/schemas/Internal_XrplOperation_SponsorshipSetAsSponsee" + }, + { + "$ref": "#/components/schemas/Internal_XrplOperation_SponsorshipSetAsSponsor" + }, { "$ref": "#/components/schemas/Internal_XrplOperation_TicketCreate" }, @@ -12802,6 +12825,12 @@ "minimum": 0, "type": "integer" }, + "flags": { + "items": { + "$ref": "#/components/schemas/Internal_Xrpl_PaymentFlag" + }, + "type": "array" + }, "type": { "enum": [ "Payment" @@ -12816,6 +12845,62 @@ ], "type": "object" }, + "Internal_XrplOperation_SponsorshipSetAsSponsee": { + "properties": { + "sponsor": { + "$ref": "#/components/schemas/Internal_TransactionDestination" + }, + "type": { + "enum": [ + "SponsorshipSetAsSponsee" + ], + "type": "string" + } + }, + "required": [ + "sponsor", + "type" + ], + "type": "object" + }, + "Internal_XrplOperation_SponsorshipSetAsSponsor": { + "properties": { + "feeAmountDelta": { + "description": "This field is a large integer and represented as a string because it may contain value that cannot be expressed with JSON number without a loss of precision.", + "type": "string" + }, + "flags": { + "items": { + "$ref": "#/components/schemas/Internal_Xrpl_SponsorshipSetFlag" + }, + "type": "array" + }, + "maxFee": { + "description": "This field is a large integer that can be positive or zero. It is represented as a string because it may contain value that cannot be expressed with JSON number without a loss of precision.", + "minimum": 0, + "type": "string" + }, + "remainingOwnerCountDelta": { + "format": "int32", + "type": "integer" + }, + "sponsee": { + "$ref": "#/components/schemas/Internal_TransactionDestination" + }, + "type": { + "enum": [ + "SponsorshipSetAsSponsor" + ], + "type": "string" + } + }, + "required": [ + "sponsee", + "flags", + "type" + ], + "type": "object" + }, "Internal_XrplOperation_TicketCreate": { "properties": { "ticketCount": { @@ -12952,6 +13037,24 @@ ], "type": "object" }, + "Internal_XrplSponsorshipParams": { + "properties": { + "flags": { + "items": { + "$ref": "#/components/schemas/Internal_Xrpl_SponsorFlag" + }, + "type": "array" + }, + "sponsor": { + "$ref": "#/components/schemas/Internal_TransactionDestination" + } + }, + "required": [ + "sponsor", + "flags" + ], + "type": "object" + }, "Internal_XrplTickerProperties": { "discriminator": { "mapping": { @@ -13207,6 +13310,30 @@ ], "type": "string" }, + "Internal_Xrpl_PaymentFlag": { + "enum": [ + "tfSponsorCreatedAccount" + ], + "type": "string" + }, + "Internal_Xrpl_SponsorFlag": { + "description": "spfSponsorFee sponsors the transaction fee, spfSponsorReserve the owner reserve. spfSponsorReserve is rejected on transaction types for which the ledger does not allow reserve sponsorship (e.g. OfferCreate, TicketCreate, ConfidentialMPT operations)", + "enum": [ + "spfSponsorFee", + "spfSponsorReserve" + ], + "type": "string" + }, + "Internal_Xrpl_SponsorshipSetFlag": { + "enum": [ + "tfRequireSignForFee", + "tfClearRequireSignForFee", + "tfRequireSignForReserve", + "tfClearRequireSignForReserve", + "tfDeleteObject" + ], + "type": "string" + }, "Internal_Xrpl_TrustSetFlag": { "enum": [ "tfSetFreeze", diff --git a/openapi/custody/devbox/cmpt/public.json b/openapi/custody/devbox/cmpt/public.json index b272e85..ffda7e7 100644 --- a/openapi/custody/devbox/cmpt/public.json +++ b/openapi/custody/devbox/cmpt/public.json @@ -3538,18 +3538,56 @@ ], "type": "object" }, + "Core_ApiBatchSignerSigningData": { + "properties": { + "account": { + "maxLength": 35, + "minLength": 25, + "type": "string" + }, + "participant": { + "$ref": "#/components/schemas/Core_Participant" + }, + "signingPayload": { + "description": "Hex encoded string.", + "pattern": "^[A-Fa-f0-9]*$", + "type": "string" + }, + "signingPayloadHash": { + "description": "Hex encoded string.", + "pattern": "^[A-Fa-f0-9]*$", + "type": "string" + } + }, + "required": [ + "participant", + "account", + "signingPayload", + "signingPayloadHash" + ], + "type": "object" + }, "Core_ApiBatchSigningData": { "properties": { "executionMode": { "$ref": "#/components/schemas/Core_Xrpl_BatchExecutionMode" }, + "signers": { + "description": "One entry per required BatchSigner, sorted by AccountID. Sign signingPayload and return the signature in batchSigners with the same participant.", + "items": { + "$ref": "#/components/schemas/Core_ApiBatchSignerSigningData" + }, + "type": "array" + }, "signingPayload": { - "description": "Hex encoded string.", + "deprecated": true, + "description": "Deprecated: not signable under Batch v1.1; use signers[].signingPayload", "pattern": "^[A-Fa-f0-9]*$", "type": "string" }, "signingPayloadHash": { - "description": "Hex encoded string.", + "deprecated": true, + "description": "Deprecated: not signable under Batch v1.1; use signers[].signingPayload", "pattern": "^[A-Fa-f0-9]*$", "type": "string" }, @@ -3565,7 +3603,8 @@ "signingPayload", "signingPayloadHash", "executionMode", - "transactions" + "transactions", + "signers" ], "type": "object" }, @@ -3591,6 +3630,7 @@ "InternalError", "InvalidAccountStateOnLedger", "InvalidAmount", + "InvalidBatchSignature", "InvalidContractParameters", "InvalidDestination", "InvalidUserPayload", @@ -3611,6 +3651,7 @@ "InternalError", "InvalidAccountStateOnLedger", "InvalidAmount", + "InvalidBatchSignature", "InvalidContractParameters", "InvalidDestination", "InvalidUserPayload", @@ -4895,6 +4936,9 @@ "sequencing": { "$ref": "#/components/schemas/Core_ParticipantSequencing" }, + "sponsorship": { + "$ref": "#/components/schemas/Core_XrplSponsorshipParams" + }, "type": { "enum": [ "ParticipantOperation" @@ -4918,6 +4962,9 @@ "sequencing": { "$ref": "#/components/schemas/Core_Sequencing" }, + "sponsorship": { + "$ref": "#/components/schemas/Core_XrplSponsorshipParams" + }, "type": { "enum": [ "SubmitterOperation" @@ -5404,6 +5451,12 @@ "minimum": 0, "type": "integer" }, + "flags": { + "items": { + "$ref": "#/components/schemas/Core_Xrpl_PaymentFlag" + }, + "type": "array" + }, "type": { "enum": [ "Payment" @@ -13217,6 +13270,187 @@ ], "type": "string" }, + "Core_Sponsorship": { + "properties": { + "active": { + "type": "boolean" + }, + "feeAmount": { + "description": "This field is a large integer that can be positive or zero. It is represented as a string because it may contain value that cannot be expressed with JSON number without a loss of precision.", + "minimum": 0, + "type": "string" + }, + "id": { + "format": "uuid", + "type": "string" + }, + "index": { + "type": "string" + }, + "lastUpdatedAt": { + "format": "date-time", + "type": "string" + }, + "ledgerId": { + "maxLength": 100, + "minLength": 1, + "type": "string" + }, + "maxFee": { + "description": "This field is a large integer that can be positive or zero. It is represented as a string because it may contain value that cannot be expressed with JSON number without a loss of precision.", + "minimum": 0, + "type": "string" + }, + "remainingOwnerCount": { + "format": "int32", + "type": "integer" + }, + "requireSignForFee": { + "type": "boolean" + }, + "requireSignForReserve": { + "type": "boolean" + }, + "role": { + "$ref": "#/components/schemas/Core_SponsorshipRole" + }, + "sponsee": { + "maxLength": 512, + "minLength": 1, + "type": "string" + }, + "sponsor": { + "maxLength": 512, + "minLength": 1, + "type": "string" + } + }, + "required": [ + "id", + "role", + "ledgerId", + "index", + "sponsor", + "sponsee", + "feeAmount", + "remainingOwnerCount", + "requireSignForFee", + "requireSignForReserve", + "active", + "lastUpdatedAt" + ], + "type": "object" + }, + "Core_SponsorshipMovement": { + "properties": { + "amount": { + "description": "This field is a large integer that can be positive or zero. It is represented as a string because it may contain value that cannot be expressed with JSON number without a loss of precision.", + "minimum": 0, + "type": "string" + }, + "id": { + "format": "uuid", + "type": "string" + }, + "movement": { + "$ref": "#/components/schemas/Core_Xrpl_SponsorshipMovement" + }, + "onLedgerTransactionId": { + "maxLength": 500, + "minLength": 1, + "type": "string" + }, + "registeredAt": { + "format": "date-time", + "type": "string" + }, + "sponsee": { + "maxLength": 512, + "minLength": 1, + "type": "string" + }, + "sponsor": { + "maxLength": 512, + "minLength": 1, + "type": "string" + }, + "sponsorshipIndex": { + "type": "string" + }, + "transactionId": { + "format": "uuid", + "type": "string" + } + }, + "required": [ + "id", + "movement", + "sponsorshipIndex", + "sponsor", + "sponsee", + "amount", + "onLedgerTransactionId", + "registeredAt" + ], + "type": "object" + }, + "Core_SponsorshipMovementsCollection": { + "properties": { + "count": { + "format": "int32", + "type": "integer" + }, + "currentStartingAfter": { + "type": "string" + }, + "items": { + "items": { + "$ref": "#/components/schemas/Core_SponsorshipMovement" + }, + "type": "array" + }, + "nextStartingAfter": { + "type": "string" + } + }, + "required": [ + "items", + "count" + ], + "type": "object" + }, + "Core_SponsorshipRole": { + "enum": [ + "Sponsor", + "Sponsee" + ], + "type": "string" + }, + "Core_SponsorshipsCollection": { + "properties": { + "count": { + "format": "int32", + "type": "integer" + }, + "currentStartingAfter": { + "type": "string" + }, + "items": { + "items": { + "$ref": "#/components/schemas/Core_Sponsorship" + }, + "type": "array" + }, + "nextStartingAfter": { + "type": "string" + } + }, + "required": [ + "items", + "count" + ], + "type": "object" + }, "Core_StateReviewAuthorityValue": { "properties": { "publicKey": { @@ -16369,6 +16603,9 @@ "minimum": 0, "type": "integer" }, + "sponsorship": { + "$ref": "#/components/schemas/Core_XrplSponsorshipParams" + }, "type": { "enum": [ "XRPL" @@ -18940,6 +19177,8 @@ "MPTokenIssuanceSet": "#/components/schemas/Core_XrplOperation_MPTokenIssuanceSet", "OfferCreate": "#/components/schemas/Core_XrplOperation_OfferCreate", "Payment": "#/components/schemas/Core_XrplOperation_Payment", + "SponsorshipSetAsSponsee": "#/components/schemas/Core_XrplOperation_SponsorshipSetAsSponsee", + "SponsorshipSetAsSponsor": "#/components/schemas/Core_XrplOperation_SponsorshipSetAsSponsor", "TicketCreate": "#/components/schemas/Core_XrplOperation_TicketCreate", "TrustSet": "#/components/schemas/Core_XrplOperation_TrustSet" }, @@ -18994,6 +19233,12 @@ { "$ref": "#/components/schemas/Core_XrplOperation_Payment" }, + { + "$ref": "#/components/schemas/Core_XrplOperation_SponsorshipSetAsSponsee" + }, + { + "$ref": "#/components/schemas/Core_XrplOperation_SponsorshipSetAsSponsor" + }, { "$ref": "#/components/schemas/Core_XrplOperation_TicketCreate" }, @@ -19469,6 +19714,12 @@ "minimum": 0, "type": "integer" }, + "flags": { + "items": { + "$ref": "#/components/schemas/Core_Xrpl_PaymentFlag" + }, + "type": "array" + }, "type": { "enum": [ "Payment" @@ -19483,6 +19734,62 @@ ], "type": "object" }, + "Core_XrplOperation_SponsorshipSetAsSponsee": { + "properties": { + "sponsor": { + "$ref": "#/components/schemas/Core_TransactionDestination" + }, + "type": { + "enum": [ + "SponsorshipSetAsSponsee" + ], + "type": "string" + } + }, + "required": [ + "sponsor", + "type" + ], + "type": "object" + }, + "Core_XrplOperation_SponsorshipSetAsSponsor": { + "properties": { + "feeAmountDelta": { + "description": "This field is a large integer and represented as a string because it may contain value that cannot be expressed with JSON number without a loss of precision.", + "type": "string" + }, + "flags": { + "items": { + "$ref": "#/components/schemas/Core_Xrpl_SponsorshipSetFlag" + }, + "type": "array" + }, + "maxFee": { + "description": "This field is a large integer that can be positive or zero. It is represented as a string because it may contain value that cannot be expressed with JSON number without a loss of precision.", + "minimum": 0, + "type": "string" + }, + "remainingOwnerCountDelta": { + "format": "int32", + "type": "integer" + }, + "sponsee": { + "$ref": "#/components/schemas/Core_TransactionDestination" + }, + "type": { + "enum": [ + "SponsorshipSetAsSponsor" + ], + "type": "string" + } + }, + "required": [ + "sponsee", + "flags", + "type" + ], + "type": "object" + }, "Core_XrplOperation_TicketCreate": { "properties": { "ticketCount": { @@ -19619,6 +19926,24 @@ ], "type": "object" }, + "Core_XrplSponsorshipParams": { + "properties": { + "flags": { + "items": { + "$ref": "#/components/schemas/Core_Xrpl_SponsorFlag" + }, + "type": "array" + }, + "sponsor": { + "$ref": "#/components/schemas/Core_TransactionDestination" + } + }, + "required": [ + "sponsor", + "flags" + ], + "type": "object" + }, "Core_XrplTickerProperties": { "discriminator": { "mapping": { @@ -19922,6 +20247,12 @@ ], "type": "string" }, + "Core_Xrpl_PaymentFlag": { + "enum": [ + "tfSponsorCreatedAccount" + ], + "type": "string" + }, "Core_Xrpl_ResolvedAssetQuantity": { "properties": { "amount": { @@ -20591,6 +20922,32 @@ ], "type": "object" }, + "Core_Xrpl_SponsorFlag": { + "description": "spfSponsorFee sponsors the transaction fee, spfSponsorReserve the owner reserve. spfSponsorReserve is rejected on transaction types for which the ledger does not allow reserve sponsorship (e.g. OfferCreate, TicketCreate, ConfidentialMPT operations)", + "enum": [ + "spfSponsorFee", + "spfSponsorReserve" + ], + "type": "string" + }, + "Core_Xrpl_SponsorshipMovement": { + "enum": [ + "Funded", + "Spent", + "Returned" + ], + "type": "string" + }, + "Core_Xrpl_SponsorshipSetFlag": { + "enum": [ + "tfRequireSignForFee", + "tfClearRequireSignForFee", + "tfRequireSignForReserve", + "tfClearRequireSignForReserve", + "tfDeleteObject" + ], + "type": "string" + }, "Core_Xrpl_TrustSetFlag": { "enum": [ "tfSetFreeze", @@ -26667,6 +27024,287 @@ ] } }, + "/v1/domains/{domainId}/accounts/{accountId}/sponsorship-movements": { + "get": { + "operationId": "getAccountSponsorshipMovements", + "parameters": [ + { + "description": "Unique identifier for the domain.", + "in": "path", + "name": "domainId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + }, + { + "in": "path", + "name": "accountId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + }, + { + "description": "Ledger the sponsorships live on.", + "in": "query", + "name": "ledgerId", + "required": true, + "schema": { + "minLength": 1, + "type": "string" + } + }, + { + "description": "Return movements produced by any of the given transactionIds.", + "example": [ + "90c4cf2f-ebe0-4bf7-91cd-4c45cd02277b", + "fdeeeb4b-f987-4ec4-9880-1eb280581d49" + ], + "in": "query", + "name": "transactionId", + "schema": { + "items": { + "format": "uuid", + "type": "string" + }, + "type": "array" + } + }, + { + "description": "Return movements matching any of the given kinds. Values: Funded, Spent, Returned.", + "example": [ + "Funded", + "Returned" + ], + "in": "query", + "name": "movement", + "schema": { + "items": { + "$ref": "#/components/schemas/Core_Xrpl_SponsorshipMovement" + }, + "type": "array" + } + }, + { + "description": "Return movements of the sponsorship with the given ledger index.", + "example": "DB8A3D1C5E7F24B6A09C8E1F3D5B7A9C2E4F6081B3D5F7092A4C6E8F0B2D4F61", + "in": "query", + "name": "sponsorshipIndex", + "schema": { + "type": "string" + } + }, + { + "description": "The number of entities to return.", + "in": "query", + "name": "limit", + "schema": { + "format": "int32", + "maximum": 100, + "minimum": 1, + "type": "integer" + } + }, + { + "description": "SponsorshipMovement id used to the determine beginning of query results.", + "in": "query", + "name": "startingAfter", + "schema": { + "format": "uuid", + "type": "string" + } + }, + { + "description": "Property name used to sort the query results.", + "in": "query", + "name": "sortBy", + "schema": { + "enum": [ + "registeredAt" + ], + "type": "string" + } + }, + { + "description": "Sort order applied to the query results.", + "in": "query", + "name": "sortOrder", + "schema": { + "$ref": "#/components/schemas/Core_SortOrder" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Core_SponsorshipMovementsCollection" + } + } + }, + "description": "" + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Core_ErrorMessage" + } + } + }, + "description": "One of: Domain locked (DomainLockedError); Requester locked (RequesterLockedError)" + }, + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Core_ErrorMessage" + } + } + }, + "description": "One of: Invalid JWT (InvalidJwtError); User not authorized (PermissionDeniedError)" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Core_ErrorMessage" + } + } + }, + "description": "Entity or Domain not found (EntityNotFoundError)" + } + }, + "security": [ + { + "httpAuth": [] + } + ], + "summary": "Get movements of the XRPL sponsorships the account is sponsor or sponsee of", + "tags": [ + "Accounts" + ] + } + }, + "/v1/domains/{domainId}/accounts/{accountId}/sponsorships": { + "get": { + "operationId": "getAccountSponsorships", + "parameters": [ + { + "description": "Unique identifier for the domain.", + "in": "path", + "name": "domainId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + }, + { + "in": "path", + "name": "accountId", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + } + }, + { + "description": "Ledger the sponsorships live on.", + "in": "query", + "name": "ledgerId", + "required": true, + "schema": { + "minLength": 1, + "type": "string" + } + }, + { + "description": "Also return sponsorships deleted on-ledger. Defaults to false.", + "in": "query", + "name": "includeInactive", + "schema": { + "type": "boolean" + } + }, + { + "description": "The number of entities to return.", + "in": "query", + "name": "limit", + "schema": { + "format": "int32", + "maximum": 100, + "minimum": 1, + "type": "integer" + } + }, + { + "description": "Sponsorship id used to the determine beginning of query results.", + "in": "query", + "name": "startingAfter", + "schema": { + "format": "uuid", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Core_SponsorshipsCollection" + } + } + }, + "description": "" + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Core_ErrorMessage" + } + } + }, + "description": "One of: Domain locked (DomainLockedError); Requester locked (RequesterLockedError)" + }, + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Core_ErrorMessage" + } + } + }, + "description": "One of: Invalid JWT (InvalidJwtError); User not authorized (PermissionDeniedError)" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Core_ErrorMessage" + } + } + }, + "description": "Entity or Domain not found (EntityNotFoundError)" + } + }, + "security": [ + { + "httpAuth": [] + } + ], + "summary": "Get XRPL sponsorships the account is sponsor or sponsee of", + "tags": [ + "Accounts" + ] + } + }, "/v1/domains/{domainId}/channels": { "get": { "operationId": "getAllChannels", diff --git a/src/generated/custody-availability.ts b/src/generated/custody-availability.ts index 28bbf8f..632bd77 100644 --- a/src/generated/custody-availability.ts +++ b/src/generated/custody-availability.ts @@ -154,6 +154,12 @@ export const CUSTODY_AVAILABILITY: { 'GET /v1/domains/{}/accounts/{}/parameters-compute/{}': { devbox: ['cmpt'], }, + 'GET /v1/domains/{}/accounts/{}/sponsorship-movements': { + devbox: ['cmpt'], + }, + 'GET /v1/domains/{}/accounts/{}/sponsorships': { + devbox: ['cmpt'], + }, 'GET /v1/domains/{}/channels': { official: '1.19+', devbox: ['cmpt'], @@ -696,6 +702,12 @@ export const CUSTODY_AVAILABILITY: { official: '1.15–1.22, 1.32+', devbox: ['cmpt'], }, + SponsorshipSetAsSponsee: { + devbox: ['cmpt'], + }, + SponsorshipSetAsSponsor: { + devbox: ['cmpt'], + }, TicketCreate: { devbox: ['cmpt'], }, diff --git a/src/generated/custody-internal.ts b/src/generated/custody-internal.ts index 6a6e0dc..cc3b20e 100644 --- a/src/generated/custody-internal.ts +++ b/src/generated/custody-internal.ts @@ -4438,6 +4438,7 @@ export interface components { * @enum {string} */ type: 'XRPL' + sponsorship?: components['schemas']['Internal_XrplSponsorshipParams'] } Internal_TransactionPending: { /** Format: uuid */ @@ -5430,6 +5431,8 @@ export interface components { | components['schemas']['Internal_XrplOperation_ConfidentialMPTConvertBack'] | components['schemas']['Internal_XrplOperation_ConfidentialMPTMergeInbox'] | components['schemas']['Internal_XrplOperation_ConfidentialMPTSend'] + | components['schemas']['Internal_XrplOperation_SponsorshipSetAsSponsee'] + | components['schemas']['Internal_XrplOperation_SponsorshipSetAsSponsor'] | components['schemas']['Internal_XrplOperation_TicketCreate'] Internal_XrplOperation_AccountSet: { clearFlag?: components['schemas']['Internal_Xrpl_AccountSetFlag'] @@ -5548,6 +5551,7 @@ export interface components { * @enum {string} */ type: 'Payment' + flags?: components['schemas']['Internal_Xrpl_PaymentFlag'][] } Internal_XrplOperation_TrustSet: { enableRippling?: boolean @@ -6459,6 +6463,7 @@ export interface components { operation: components['schemas']['Internal_BatchInnerOperation'] participant: components['schemas']['Internal_Participant'] sequencing: components['schemas']['Internal_ParticipantSequencing'] + sponsorship?: components['schemas']['Internal_XrplSponsorshipParams'] /** * @description discriminator enum property added by openapi-typescript * @enum {string} @@ -6468,6 +6473,7 @@ export interface components { Internal_BatchEntry_SubmitterOperation: { operation: components['schemas']['Internal_BatchInnerOperation'] sequencing: components['schemas']['Internal_Sequencing'] + sponsorship?: components['schemas']['Internal_XrplSponsorshipParams'] /** * @description discriminator enum property added by openapi-typescript * @enum {string} @@ -6647,6 +6653,7 @@ export interface components { destination: components['schemas']['Internal_TransactionDestination'] /** Format: int64 */ destinationTag?: number + flags?: components['schemas']['Internal_Xrpl_PaymentFlag'][] /** * @description discriminator enum property added by openapi-typescript * @enum {string} @@ -6972,6 +6979,29 @@ export interface components { */ type: 'ConfidentialMPTSend' } + Internal_XrplOperation_SponsorshipSetAsSponsee: { + sponsor: components['schemas']['Internal_TransactionDestination'] + /** + * @description discriminator enum property added by openapi-typescript + * @enum {string} + */ + type: 'SponsorshipSetAsSponsee' + } + Internal_XrplOperation_SponsorshipSetAsSponsor: { + /** @description This field is a large integer and represented as a string because it may contain value that cannot be expressed with JSON number without a loss of precision. */ + feeAmountDelta?: string + flags: components['schemas']['Internal_Xrpl_SponsorshipSetFlag'][] + /** @description This field is a large integer that can be positive or zero. It is represented as a string because it may contain value that cannot be expressed with JSON number without a loss of precision. */ + maxFee?: string + /** Format: int32 */ + remainingOwnerCountDelta?: number + sponsee: components['schemas']['Internal_TransactionDestination'] + /** + * @description discriminator enum property added by openapi-typescript + * @enum {string} + */ + type: 'SponsorshipSetAsSponsor' + } Internal_XrplOperation_TicketCreate: { /** * Format: int32 @@ -6984,6 +7014,10 @@ export interface components { */ type: 'TicketCreate' } + Internal_XrplSponsorshipParams: { + flags: components['schemas']['Internal_Xrpl_SponsorFlag'][] + sponsor: components['schemas']['Internal_TransactionDestination'] + } Internal_XrplTickerProperties_ConfidentialMultiPurposeToken: { /** @description XRPL MPToken Issuance ID (192-bit integer hex encoded) */ issuanceId: string @@ -6998,6 +7032,20 @@ export interface components { 'AllOrNothing' | 'OnlyOne' | 'UntilFailure' | 'Independent' /** @enum {string} */ Internal_Xrpl_MPTokenIssuanceMutableFlag: 'MPTSetCanConfidentialAmount' + /** @enum {string} */ + Internal_Xrpl_PaymentFlag: 'tfSponsorCreatedAccount' + /** + * @description spfSponsorFee sponsors the transaction fee, spfSponsorReserve the owner reserve. spfSponsorReserve is rejected on transaction types for which the ledger does not allow reserve sponsorship (e.g. OfferCreate, TicketCreate, ConfidentialMPT operations) + * @enum {string} + */ + Internal_Xrpl_SponsorFlag: 'spfSponsorFee' | 'spfSponsorReserve' + /** @enum {string} */ + Internal_Xrpl_SponsorshipSetFlag: + | 'tfRequireSignForFee' + | 'tfClearRequireSignForFee' + | 'tfRequireSignForReserve' + | 'tfClearRequireSignForReserve' + | 'tfDeleteObject' Internal_v0_ProvisionElGamalKeyPair: { /** Format: uuid */ accountId: string diff --git a/src/generated/custody-routes.ts b/src/generated/custody-routes.ts index d5dd9bf..ca20ff7 100644 --- a/src/generated/custody-routes.ts +++ b/src/generated/custody-routes.ts @@ -114,6 +114,14 @@ export const CUSTODY_ROUTES = { path: '/v1/domains/{domainId}/accounts/{accountId}/confirmed-balance/{tickerId}', }, getAccounts: { method: 'GET', path: '/v1/domains/{domainId}/accounts' }, + getAccountSponsorshipMovements: { + method: 'GET', + path: '/v1/domains/{domainId}/accounts/{accountId}/sponsorship-movements', + }, + getAccountSponsorships: { + method: 'GET', + path: '/v1/domains/{domainId}/accounts/{accountId}/sponsorships', + }, getAddresses: { method: 'GET', path: '/v1/domains/{domainId}/accounts/{accountId}/addresses', diff --git a/src/generated/custody.ts b/src/generated/custody.ts index 6dd522c..5f7ab4d 100644 --- a/src/generated/custody.ts +++ b/src/generated/custody.ts @@ -3206,6 +3206,40 @@ export interface paths { patch?: never trace?: never } + '/v1/domains/{domainId}/accounts/{accountId}/sponsorship-movements': { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + /** Get movements of the XRPL sponsorships the account is sponsor or sponsee of */ + get: operations['getAccountSponsorshipMovements'] + put?: never + post?: never + delete?: never + options?: never + head?: never + patch?: never + trace?: never + } + '/v1/domains/{domainId}/accounts/{accountId}/sponsorships': { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + /** Get XRPL sponsorships the account is sponsor or sponsee of */ + get: operations['getAccountSponsorships'] + put?: never + post?: never + delete?: never + options?: never + head?: never + patch?: never + trace?: never + } } export type webhooks = Record export interface components { @@ -3706,6 +3740,7 @@ export interface components { | 'TransactionNotEligibleForReplacement' | 'TransactionRejected' | 'TransientIssue' + | 'InvalidBatchSignature' /** @enum {string} */ Core_ApiFailedTransactionProcessingHint: | 'AccountAlreadyActivatedOnLedger' @@ -3722,6 +3757,7 @@ export interface components { | 'TransactionNotEligibleForReplacement' | 'TransactionRejected' | 'TransientIssue' + | 'InvalidBatchSignature' /** @enum {string} */ Core_ApiInterruptedTransactionCause: 'Cancellation' | 'Internal' | 'Replacement' @@ -7988,6 +8024,7 @@ export interface components { * @enum {string} */ type: 'XRPL' + sponsorship?: components['schemas']['Core_XrplSponsorshipParams'] } Core_TransactionOrderReference: { /** Format: uuid */ @@ -9012,6 +9049,8 @@ export interface components { | components['schemas']['Core_XrplOperation_ConfidentialMPTConvertBack'] | components['schemas']['Core_XrplOperation_ConfidentialMPTMergeInbox'] | components['schemas']['Core_XrplOperation_ConfidentialMPTSend'] + | components['schemas']['Core_XrplOperation_SponsorshipSetAsSponsee'] + | components['schemas']['Core_XrplOperation_SponsorshipSetAsSponsor'] | components['schemas']['Core_XrplOperation_TicketCreate'] Core_XrplOperation_AccountSet: { setFlag?: components['schemas']['Core_Xrpl_AccountSetFlag'] @@ -9130,6 +9169,7 @@ export interface components { * @enum {string} */ type: 'Payment' + flags?: components['schemas']['Core_Xrpl_PaymentFlag'][] } Core_XrplOperation_TrustSet: { flags: components['schemas']['Core_Xrpl_TrustSetFlag'][] @@ -12222,12 +12262,28 @@ export interface components { */ format: 'CSV' | 'JSON' } - Core_ApiBatchSigningData: { - executionMode: components['schemas']['Core_Xrpl_BatchExecutionMode'] + Core_ApiBatchSignerSigningData: { + account: string + participant: components['schemas']['Core_Participant'] /** @description Hex encoded string. */ signingPayload: string /** @description Hex encoded string. */ signingPayloadHash: string + } + Core_ApiBatchSigningData: { + executionMode: components['schemas']['Core_Xrpl_BatchExecutionMode'] + /** @description One entry per required BatchSigner, sorted by AccountID. Sign signingPayload and return the signature in batchSigners with the same participant. */ + signers: components['schemas']['Core_ApiBatchSignerSigningData'][] + /** + * @deprecated + * @description Deprecated: not signable under Batch v1.1; use signers[].signingPayload + */ + signingPayload: string + /** + * @deprecated + * @description Deprecated: not signable under Batch v1.1; use signers[].signingPayload + */ + signingPayloadHash: string transactions: components['schemas']['Core_ApiInnerTransactionData'][] } Core_ApiInitiateParametersComputeRequest: components['schemas']['Core_ApiInitiateParametersComputeRequest_CmptSend'] @@ -12320,6 +12376,7 @@ export interface components { operation: components['schemas']['Core_BatchInnerOperation'] participant: components['schemas']['Core_Participant'] sequencing: components['schemas']['Core_ParticipantSequencing'] + sponsorship?: components['schemas']['Core_XrplSponsorshipParams'] /** * @description discriminator enum property added by openapi-typescript * @enum {string} @@ -12329,6 +12386,7 @@ export interface components { Core_BatchEntry_SubmitterOperation: { operation: components['schemas']['Core_BatchInnerOperation'] sequencing: components['schemas']['Core_Sequencing'] + sponsorship?: components['schemas']['Core_XrplSponsorshipParams'] /** * @description discriminator enum property added by openapi-typescript * @enum {string} @@ -12508,6 +12566,7 @@ export interface components { destination: components['schemas']['Core_TransactionDestination'] /** Format: int64 */ destinationTag?: number + flags?: components['schemas']['Core_Xrpl_PaymentFlag'][] /** * @description discriminator enum property added by openapi-typescript * @enum {string} @@ -12756,6 +12815,57 @@ export interface components { /** Format: int64 */ value: number } + Core_Sponsorship: { + active: boolean + /** @description This field is a large integer that can be positive or zero. It is represented as a string because it may contain value that cannot be expressed with JSON number without a loss of precision. */ + feeAmount: string + /** Format: uuid */ + id: string + index: string + /** Format: date-time */ + lastUpdatedAt: string + ledgerId: string + /** @description This field is a large integer that can be positive or zero. It is represented as a string because it may contain value that cannot be expressed with JSON number without a loss of precision. */ + maxFee?: string + /** Format: int32 */ + remainingOwnerCount: number + requireSignForFee: boolean + requireSignForReserve: boolean + role: components['schemas']['Core_SponsorshipRole'] + sponsee: string + sponsor: string + } + Core_SponsorshipMovement: { + /** @description This field is a large integer that can be positive or zero. It is represented as a string because it may contain value that cannot be expressed with JSON number without a loss of precision. */ + amount: string + /** Format: uuid */ + id: string + movement: components['schemas']['Core_Xrpl_SponsorshipMovement'] + onLedgerTransactionId: string + /** Format: date-time */ + registeredAt: string + sponsee: string + sponsor: string + sponsorshipIndex: string + /** Format: uuid */ + transactionId?: string + } + Core_SponsorshipMovementsCollection: { + /** Format: int32 */ + count: number + currentStartingAfter?: string + items: components['schemas']['Core_SponsorshipMovement'][] + nextStartingAfter?: string + } + /** @enum {string} */ + Core_SponsorshipRole: 'Sponsor' | 'Sponsee' + Core_SponsorshipsCollection: { + /** Format: int32 */ + count: number + currentStartingAfter?: string + items: components['schemas']['Core_Sponsorship'][] + nextStartingAfter?: string + } Core_XrplOperation_Batch: { batchSigners: components['schemas']['Core_BatchSigner'][] entries: components['schemas']['Core_BatchEntry'][] @@ -12823,6 +12933,29 @@ export interface components { */ type: 'ConfidentialMPTSend' } + Core_XrplOperation_SponsorshipSetAsSponsee: { + sponsor: components['schemas']['Core_TransactionDestination'] + /** + * @description discriminator enum property added by openapi-typescript + * @enum {string} + */ + type: 'SponsorshipSetAsSponsee' + } + Core_XrplOperation_SponsorshipSetAsSponsor: { + /** @description This field is a large integer and represented as a string because it may contain value that cannot be expressed with JSON number without a loss of precision. */ + feeAmountDelta?: string + flags: components['schemas']['Core_Xrpl_SponsorshipSetFlag'][] + /** @description This field is a large integer that can be positive or zero. It is represented as a string because it may contain value that cannot be expressed with JSON number without a loss of precision. */ + maxFee?: string + /** Format: int32 */ + remainingOwnerCountDelta?: number + sponsee: components['schemas']['Core_TransactionDestination'] + /** + * @description discriminator enum property added by openapi-typescript + * @enum {string} + */ + type: 'SponsorshipSetAsSponsor' + } Core_XrplOperation_TicketCreate: { /** * Format: int32 @@ -12835,6 +12968,10 @@ export interface components { */ type: 'TicketCreate' } + Core_XrplSponsorshipParams: { + flags: components['schemas']['Core_Xrpl_SponsorFlag'][] + sponsor: components['schemas']['Core_TransactionDestination'] + } Core_XrplTickerProperties_ConfidentialMultiPurposeToken: { /** @description XRPL MPToken Issuance ID (192-bit integer hex encoded) */ issuanceId: string @@ -12865,6 +13002,8 @@ export interface components { } /** @enum {string} */ Core_Xrpl_MPTokenIssuanceMutableFlag: 'MPTSetCanConfidentialAmount' + /** @enum {string} */ + Core_Xrpl_PaymentFlag: 'tfSponsorCreatedAccount' Core_Xrpl_ResolvedAssetQuantity: { /** @description This field is a large integer that can be positive or zero. It is represented as a string because it may contain value that cannot be expressed with JSON number without a loss of precision. */ amount: string @@ -13095,6 +13234,20 @@ export interface components { */ type: 'MultiPurposeToken' } + /** + * @description spfSponsorFee sponsors the transaction fee, spfSponsorReserve the owner reserve. spfSponsorReserve is rejected on transaction types for which the ledger does not allow reserve sponsorship (e.g. OfferCreate, TicketCreate, ConfidentialMPT operations) + * @enum {string} + */ + Core_Xrpl_SponsorFlag: 'spfSponsorFee' | 'spfSponsorReserve' + /** @enum {string} */ + Core_Xrpl_SponsorshipMovement: 'Funded' | 'Spent' | 'Returned' + /** @enum {string} */ + Core_Xrpl_SponsorshipSetFlag: + | 'tfRequireSignForFee' + | 'tfClearRequireSignForFee' + | 'tfRequireSignForReserve' + | 'tfClearRequireSignForReserve' + | 'tfDeleteObject' Core_v0_ProvisionElGamalKeyPair: { /** Format: uuid */ accountId: string @@ -21082,6 +21235,147 @@ export interface operations { } } } + getAccountSponsorshipMovements: { + parameters: { + query: { + /** @description Ledger the sponsorships live on. */ + ledgerId: string + /** + * @description Return movements produced by any of the given transactionIds. + * @example [ + * "90c4cf2f-ebe0-4bf7-91cd-4c45cd02277b", + * "fdeeeb4b-f987-4ec4-9880-1eb280581d49" + * ] + */ + transactionId?: string[] + /** + * @description Return movements matching any of the given kinds. Values: Funded, Spent, Returned. + * @example [ + * "Funded", + * "Returned" + * ] + */ + movement?: components['schemas']['Core_Xrpl_SponsorshipMovement'][] + /** + * @description Return movements of the sponsorship with the given ledger index. + * @example DB8A3D1C5E7F24B6A09C8E1F3D5B7A9C2E4F6081B3D5F7092A4C6E8F0B2D4F61 + */ + sponsorshipIndex?: string + /** @description The number of entities to return. */ + limit?: number + /** @description SponsorshipMovement id used to the determine beginning of query results. */ + startingAfter?: string + /** @description Property name used to sort the query results. */ + sortBy?: 'registeredAt' + /** @description Sort order applied to the query results. */ + sortOrder?: components['schemas']['Core_SortOrder'] + } + header?: never + path: { + /** @description Unique identifier for the domain. */ + domainId: string + accountId: string + } + cookie?: never + } + requestBody?: never + responses: { + 200: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['Core_SponsorshipMovementsCollection'] + } + } + /** @description One of: Domain locked (DomainLockedError); Requester locked (RequesterLockedError) */ + 400: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['Core_ErrorMessage'] + } + } + /** @description One of: Invalid JWT (InvalidJwtError); User not authorized (PermissionDeniedError) */ + 401: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['Core_ErrorMessage'] + } + } + /** @description Entity or Domain not found (EntityNotFoundError) */ + 404: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['Core_ErrorMessage'] + } + } + } + } + getAccountSponsorships: { + parameters: { + query: { + /** @description Ledger the sponsorships live on. */ + ledgerId: string + /** @description Also return sponsorships deleted on-ledger. Defaults to false. */ + includeInactive?: boolean + /** @description The number of entities to return. */ + limit?: number + /** @description Sponsorship id used to the determine beginning of query results. */ + startingAfter?: string + } + header?: never + path: { + /** @description Unique identifier for the domain. */ + domainId: string + accountId: string + } + cookie?: never + } + requestBody?: never + responses: { + 200: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['Core_SponsorshipsCollection'] + } + } + /** @description One of: Domain locked (DomainLockedError); Requester locked (RequesterLockedError) */ + 400: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['Core_ErrorMessage'] + } + } + /** @description One of: Invalid JWT (InvalidJwtError); User not authorized (PermissionDeniedError) */ + 401: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['Core_ErrorMessage'] + } + } + /** @description Entity or Domain not found (EntityNotFoundError) */ + 404: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['Core_ErrorMessage'] + } + } + } + } } type WithRequired = T & { [P in K]-?: T[P]