{ "openapi": "3.0.0", "components": { "examples": {}, "headers": {}, "parameters": {}, "requestBodies": {}, "responses": {}, "schemas": { "JsonRpcSuccessResponse_any_": { "description": "JSON-RPC 2.0 Success Response", "properties": { "jsonrpc": { "type": "string", "enum": [ "2.0" ], "nullable": false }, "result": {}, "id": { "anyOf": [ { "type": "string" }, { "type": "number", "format": "double" } ], "nullable": true } }, "required": [ "jsonrpc", "result", "id" ], "type": "object", "additionalProperties": false }, "JsonRpcError": { "description": "JSON-RPC 2.0 Error Object", "properties": { "code": { "type": "number", "format": "double" }, "message": { "type": "string" }, "data": {} }, "required": [ "code", "message" ], "type": "object", "additionalProperties": false }, "JsonRpcErrorResponse": { "description": "JSON-RPC 2.0 Error Response", "properties": { "jsonrpc": { "type": "string", "enum": [ "2.0" ], "nullable": false }, "error": { "$ref": "#/components/schemas/JsonRpcError" }, "id": { "anyOf": [ { "type": "string" }, { "type": "number", "format": "double" } ], "nullable": true } }, "required": [ "jsonrpc", "error", "id" ], "type": "object", "additionalProperties": false }, "JsonRpcResponse": { "anyOf": [ { "$ref": "#/components/schemas/JsonRpcSuccessResponse_any_" }, { "$ref": "#/components/schemas/JsonRpcErrorResponse" } ], "description": "JSON-RPC 2.0 Response (either success or error)" }, "JsonRpcRequest": { "description": "JSON-RPC 2.0 Request", "properties": { "jsonrpc": { "type": "string", "enum": [ "2.0" ], "nullable": false }, "method": { "type": "string" }, "params": {}, "id": { "anyOf": [ { "type": "string" }, { "type": "number", "format": "double" } ], "nullable": true } }, "required": [ "jsonrpc", "method" ], "type": "object", "additionalProperties": false }, "CheckoutResponse": { "properties": { "url": { "type": "string" } }, "required": [ "url" ], "type": "object", "additionalProperties": false }, "Currency": { "enum": [ "usd" ], "type": "string" }, "CheckoutRequest": { "properties": { "amount": { "type": "integer", "format": "int64", "description": "Amount in cents", "minimum": 1 }, "currency": { "$ref": "#/components/schemas/Currency" }, "cancelUrl": { "type": "string" }, "successUrl": { "type": "string" } }, "required": [ "amount", "currency" ], "type": "object", "additionalProperties": false }, "CheckoutSubscriptionRequest": { "properties": { "plan": { "type": "string" }, "cancelUrl": { "type": "string" }, "successUrl": { "type": "string" } }, "required": [ "plan" ], "type": "object", "additionalProperties": false }, "Money": { "properties": { "amount": { "type": "integer", "format": "int64", "description": "Amount in cents", "minimum": 1 }, "currency": { "$ref": "#/components/schemas/Currency" } }, "required": [ "amount", "currency" ], "type": "object", "additionalProperties": false }, "BalanceResponse": { "properties": { "balance": { "$ref": "#/components/schemas/Money" }, "expenses": { "$ref": "#/components/schemas/Money" }, "payments": { "$ref": "#/components/schemas/Money" } }, "required": [ "balance", "expenses", "payments" ], "type": "object", "additionalProperties": false }, "ResponseType.LIST": { "enum": [ "list" ], "type": "string" }, "EntityIdResponse": { "properties": { "id": { "type": "string" } }, "required": [ "id" ], "type": "object", "additionalProperties": false }, "SponsorSchema.PAY_FOR_USER": { "enum": [ "pay_for_user" ], "type": "string" }, "SponsorSchema": { "enum": [ "pay_for_user", "charge_custom_tokens", "fixed_rate" ], "type": "string" }, "PayForUserPolicyStrategy": { "properties": { "sponsorSchema": { "$ref": "#/components/schemas/SponsorSchema.PAY_FOR_USER" }, "depositor": { "type": "string", "nullable": true } }, "required": [ "sponsorSchema" ], "type": "object", "additionalProperties": false }, "SponsorSchema.CHARGE_CUSTOM_TOKENS": { "enum": [ "charge_custom_tokens" ], "type": "string" }, "ChargeCustomTokenPolicyStrategy": { "properties": { "sponsorSchema": { "$ref": "#/components/schemas/SponsorSchema.CHARGE_CUSTOM_TOKENS" }, "depositor": { "type": "string", "nullable": true }, "tokenContract": { "type": "string" }, "tokenContractAmount": { "type": "string" } }, "required": [ "sponsorSchema", "tokenContract", "tokenContractAmount" ], "type": "object", "additionalProperties": false }, "SponsorSchema.FIXED_RATE": { "enum": [ "fixed_rate" ], "type": "string" }, "FixedRateTokenPolicyStrategy": { "properties": { "sponsorSchema": { "$ref": "#/components/schemas/SponsorSchema.FIXED_RATE" }, "depositor": { "type": "string", "nullable": true }, "tokenContract": { "type": "string" }, "tokenContractAmount": { "type": "string" } }, "required": [ "sponsorSchema", "tokenContract", "tokenContractAmount" ], "type": "object", "additionalProperties": false }, "PolicyStrategy": { "anyOf": [ { "$ref": "#/components/schemas/PayForUserPolicyStrategy" }, { "$ref": "#/components/schemas/ChargeCustomTokenPolicyStrategy" }, { "$ref": "#/components/schemas/FixedRateTokenPolicyStrategy" } ] }, "EntityType.POLICY": { "enum": [ "policy" ], "type": "string" }, "Policy": { "properties": { "id": { "type": "string" }, "object": { "$ref": "#/components/schemas/EntityType.POLICY" }, "createdAt": { "type": "integer", "format": "int32" }, "name": { "type": "string", "nullable": true }, "deleted": { "type": "boolean" }, "enabled": { "type": "boolean" }, "chainId": { "type": "integer", "format": "int32", "description": "The chain ID." }, "paymaster": { "$ref": "#/components/schemas/EntityIdResponse" }, "forwarderContract": { "$ref": "#/components/schemas/EntityIdResponse" }, "strategy": { "$ref": "#/components/schemas/PolicyStrategy" }, "transactionIntents": { "items": { "$ref": "#/components/schemas/EntityIdResponse" }, "type": "array" }, "policyRules": { "items": { "$ref": "#/components/schemas/EntityIdResponse" }, "type": "array" } }, "required": [ "id", "object", "createdAt", "name", "deleted", "enabled", "chainId", "strategy", "transactionIntents", "policyRules" ], "type": "object", "additionalProperties": false }, "PlayerMetadata": { "properties": {}, "type": "object", "additionalProperties": { "anyOf": [ { "type": "string" }, { "type": "number", "format": "double" } ] } }, "EntityType.PLAYER": { "enum": [ "player" ], "type": "string" }, "Player": { "properties": { "id": { "type": "string" }, "object": { "$ref": "#/components/schemas/EntityType.PLAYER" }, "createdAt": { "type": "integer", "format": "int32" }, "name": { "type": "string" }, "description": { "type": "string" }, "metadata": { "$ref": "#/components/schemas/PlayerMetadata" }, "transactionIntents": { "items": { "$ref": "#/components/schemas/EntityIdResponse" }, "type": "array" }, "accounts": { "items": { "$ref": "#/components/schemas/EntityIdResponse" }, "type": "array" } }, "required": [ "id", "object", "createdAt", "name" ], "type": "object", "additionalProperties": false }, "EntityType.ACCOUNT": { "enum": [ "account" ], "type": "string" }, "Account": { "properties": { "id": { "type": "string" }, "object": { "$ref": "#/components/schemas/EntityType.ACCOUNT" }, "createdAt": { "type": "integer", "format": "int32" }, "address": { "type": "string" }, "ownerAddress": { "type": "string" }, "deployed": { "type": "boolean" }, "custodial": { "type": "boolean" }, "embeddedSigner": { "type": "boolean" }, "chainId": { "type": "integer", "format": "int32", "description": "The chain ID." }, "accountType": { "type": "string" }, "pendingOwnerAddress": { "type": "string" }, "transactionIntents": { "items": { "$ref": "#/components/schemas/EntityIdResponse" }, "type": "array" }, "player": { "$ref": "#/components/schemas/EntityIdResponse" } }, "required": [ "id", "object", "createdAt", "address", "ownerAddress", "deployed", "custodial", "embeddedSigner", "chainId", "accountType", "player" ], "type": "object", "additionalProperties": false }, "EntityType.DEVELOPER_ACCOUNT": { "enum": [ "developerAccount" ], "type": "string" }, "DeveloperAccount": { "properties": { "id": { "type": "string" }, "object": { "$ref": "#/components/schemas/EntityType.DEVELOPER_ACCOUNT" }, "createdAt": { "type": "number", "format": "double" }, "address": { "type": "string" }, "custodial": { "type": "boolean" }, "name": { "type": "string" }, "transactionIntents": { "items": { "$ref": "#/components/schemas/EntityIdResponse" }, "type": "array" } }, "required": [ "id", "object", "createdAt", "address", "custodial" ], "type": "object", "additionalProperties": false }, "TransactionAbstractionType": { "enum": [ "accountAbstractionV6", "accountAbstractionV8", "accountAbstractionV9", "zkSync", "standard" ], "type": "string" }, "TransactionStatus": { "enum": [ "none", "new", "sent", "dropped", "indexed", "confirmed", "reverted", "notfound", "replaced", "expired" ], "type": "string" }, "Transition": { "description": "A transition represents a change in the status of a transaction intent.", "properties": { "fromStatus": { "$ref": "#/components/schemas/TransactionStatus" }, "toStatus": { "$ref": "#/components/schemas/TransactionStatus" }, "at": { "type": "number", "format": "double" } }, "required": [ "fromStatus", "toStatus", "at" ], "type": "object", "additionalProperties": false }, "ZKSyncDetails": { "properties": { "from": { "type": "string", "description": "The transaction sender.", "example": "0x8ab66318aCC6b29A27e74e534bfe3ecf81C50387" }, "to": { "type": "string", "description": "The transaction recipient or contract address." }, "data": { "type": "string", "description": "A contract hashed method call with encoded args.", "example": "0x8c5a..." }, "nonce": { "type": "string", "description": "Unique number identifying this transaction.", "example": "0" }, "gas": { "type": "string", "description": "The gas limit for the transaction.", "example": "21000" }, "maxFeePerGas": { "type": "string", "description": "Total fee per gas (in wei), inclusive of `maxPriorityFeePerGas`. Only applies to EIP-1559 Transactions.", "example": "1000000000" }, "maxPriorityFeePerGas": { "type": "string", "description": "Max priority fee per gas (in wei). Only applies to EIP-1559 Transactions.", "example": "1000000000" }, "paymaster": { "type": "string", "description": "Address of the paymaster account that will pay the fees.", "example": "0x8ab66318aCC6b29A27e74e534bfe3ecf81C50387" }, "paymasterInput": { "type": "string", "description": "Input data to the paymaster", "example": "0x8c5a..." }, "value": { "type": "string", "description": "Value in wei sent with this transaction.", "example": "1000000000000000000" } }, "required": [ "from", "to", "nonce", "gas", "maxFeePerGas", "maxPriorityFeePerGas" ], "type": "object", "additionalProperties": false }, "UserOperationV6": { "properties": { "callData": { "type": "string", "description": "The data to pass to the `sender` during the main execution call." }, "callGasLimit": { "type": "string", "description": "The amount of gas to allocate the main execution call" }, "initCode": { "type": "string", "description": "Account init code. Only for new accounts." }, "maxFeePerGas": { "type": "string", "description": "Maximum fee per gas." }, "maxPriorityFeePerGas": { "type": "string", "description": "Maximum priority fee per gas." }, "nonce": { "type": "string", "description": "Anti-replay parameter." }, "paymasterAndData": { "type": "string", "description": "Paymaster address with calldata." }, "preVerificationGas": { "type": "string", "description": "Extra gas to pay the bundler." }, "sender": { "type": "string", "description": "The account making the operation." }, "signature": { "type": "string", "description": "Data passed into the account to verify authorization." }, "verificationGasLimit": { "type": "string", "description": "The amount of gas to allocate for the verification step." } }, "required": [ "callData", "callGasLimit", "maxFeePerGas", "maxPriorityFeePerGas", "nonce", "preVerificationGas", "sender", "signature", "verificationGasLimit" ], "type": "object", "additionalProperties": false }, "AccountAbstractionV6Details": { "properties": { "userOperation": { "$ref": "#/components/schemas/UserOperationV6" }, "userOperationHash": { "type": "string", "description": "A User Operation hash." } }, "required": [ "userOperation", "userOperationHash" ], "type": "object", "additionalProperties": false }, "UserOperationV8": { "properties": { "callData": { "type": "string", "description": "The data to pass to the `sender` during the main execution call." }, "callGasLimit": { "type": "string", "description": "The amount of gas to allocate the main execution call" }, "factory": { "type": "string", "description": "Account init code. Only for new accounts." }, "factoryData": { "type": "string", "description": "Factory data for account creation." }, "maxFeePerGas": { "type": "string", "description": "Maximum fee per gas." }, "maxPriorityFeePerGas": { "type": "string", "description": "Maximum priority fee per gas." }, "nonce": { "type": "string", "description": "Anti-replay parameter." }, "paymaster": { "type": "string", "description": "Paymaster address." }, "paymasterVerificationGasLimit": { "type": "string", "description": "Paymaster verification gas limit." }, "paymasterPostOpGasLimit": { "type": "string", "description": "Paymaster post-operation gas limit." }, "paymasterData": { "type": "string", "description": "Paymaster data." }, "preVerificationGas": { "type": "string", "description": "Extra gas to pay the bundler." }, "sender": { "type": "string", "description": "The account making the operation." }, "signature": { "type": "string", "description": "Data passed into the account to verify authorization." }, "verificationGasLimit": { "type": "string", "description": "The amount of gas to allocate for the verification step." } }, "required": [ "callData", "callGasLimit", "maxFeePerGas", "maxPriorityFeePerGas", "nonce", "preVerificationGas", "sender", "signature", "verificationGasLimit" ], "type": "object", "additionalProperties": false }, "AccountAbstractionV8Details": { "properties": { "userOperation": { "$ref": "#/components/schemas/UserOperationV8" }, "userOperationHash": { "type": "string", "description": "A User Operation hash." } }, "required": [ "userOperation", "userOperationHash" ], "type": "object", "additionalProperties": false }, "UserOperationV9": { "description": "V9 UserOperation extends V8 with paymasterSignature field.\npaymasterSignature enables parallelizable Paymaster signing -\ndata can be passed to the Paymaster after the UserOperation is signed by the wallet.", "properties": { "callData": { "type": "string", "description": "The data to pass to the `sender` during the main execution call." }, "callGasLimit": { "type": "string", "description": "The amount of gas to allocate the main execution call" }, "factory": { "type": "string", "description": "Account init code. Only for new accounts." }, "factoryData": { "type": "string", "description": "Factory data for account creation." }, "maxFeePerGas": { "type": "string", "description": "Maximum fee per gas." }, "maxPriorityFeePerGas": { "type": "string", "description": "Maximum priority fee per gas." }, "nonce": { "type": "string", "description": "Anti-replay parameter." }, "paymaster": { "type": "string", "description": "Paymaster address." }, "paymasterVerificationGasLimit": { "type": "string", "description": "Paymaster verification gas limit." }, "paymasterPostOpGasLimit": { "type": "string", "description": "Paymaster post-operation gas limit." }, "paymasterData": { "type": "string", "description": "Paymaster data." }, "preVerificationGas": { "type": "string", "description": "Extra gas to pay the bundler." }, "sender": { "type": "string", "description": "The account making the operation." }, "signature": { "type": "string", "description": "Data passed into the account to verify authorization." }, "verificationGasLimit": { "type": "string", "description": "The amount of gas to allocate for the verification step." }, "paymasterSignature": { "type": "string", "description": "Paymaster signature - enables parallelizable signing.\nThis field does not affect the UserOperation hash, allowing\nthe sender and paymaster to sign in parallel." } }, "required": [ "callData", "callGasLimit", "maxFeePerGas", "maxPriorityFeePerGas", "nonce", "preVerificationGas", "sender", "signature", "verificationGasLimit" ], "type": "object", "additionalProperties": false }, "AccountAbstractionV9Details": { "description": "V9 details - extends V8 with paymasterSignature for parallelizable signing", "properties": { "userOperation": { "$ref": "#/components/schemas/UserOperationV9" }, "userOperationHash": { "type": "string", "description": "A User Operation hash." } }, "required": [ "userOperation", "userOperationHash" ], "type": "object", "additionalProperties": false }, "StandardDetails": { "properties": { "from": { "type": "string", "description": "The transaction sender.", "example": "0x8ab66318aCC6b29A27e74e534bfe3ecf81C50387" }, "to": { "type": "string", "description": "The transaction recipient or contract address." }, "data": { "type": "string", "description": "A contract hashed method call with encoded args.", "example": "0x8c5a..." }, "nonce": { "type": "string", "description": "Unique number identifying this transaction.", "example": "0" }, "gas": { "type": "string", "description": "The gas limit for the transaction.", "example": "21000" }, "maxFeePerGas": { "type": "string", "description": "Total fee per gas (in wei), inclusive of `maxPriorityFeePerGas`. Only applies to EIP-1559 Transactions.", "example": "1000000000" }, "maxPriorityFeePerGas": { "type": "string", "description": "Max priority fee per gas (in wei). Only applies to EIP-1559 Transactions.", "example": "1000000000" }, "value": { "type": "string", "description": "Value in wei sent with this transaction.", "example": "0x8ab66318aCC6b29A27e74e534bfe3ecf81C50387" } }, "required": [ "from", "to", "nonce", "gas", "maxFeePerGas", "maxPriorityFeePerGas" ], "type": "object", "additionalProperties": false }, "TransactionResponseLog": { "properties": { "blockNumber": { "type": "number", "format": "double" }, "blockHash": { "type": "string" }, "transactionIndex": { "type": "number", "format": "double" }, "removed": { "type": "boolean" }, "address": { "type": "string" }, "data": { "type": "string" }, "topics": { "items": { "type": "string" }, "type": "array" }, "transactionHash": { "type": "string" }, "logIndex": { "type": "number", "format": "double" }, "orphaned": { "type": "boolean" } }, "required": [ "blockNumber", "blockHash", "transactionIndex", "removed", "address", "data", "topics", "transactionHash", "logIndex" ], "type": "object", "additionalProperties": false }, "ResponseResponse": { "properties": { "createdAt": { "type": "integer", "format": "int32", "description": "The unix timestamp in seconds when the transactionIntent was created." }, "blockNumber": { "type": "integer", "format": "int32", "description": "The block height (number) of the block including the transaction of this log." }, "transactionHash": { "type": "string", "description": "The transaction hash of the transaction of this log." }, "l1GasUsed": { "type": "string", "description": "The l1 gas used by the transaction of this log." }, "gasUsed": { "type": "string", "description": "The gas used by the transaction of this log." }, "gasFee": { "type": "string", "description": "The gas fee by the transaction of this log." }, "l1GasFee": { "type": "string", "description": "The l1 gas fee by the transaction of this log." }, "status": { "type": "integer", "format": "int32", "description": "The status of the transaction of this log." }, "logs": { "items": { "$ref": "#/components/schemas/TransactionResponseLog" }, "type": "array", "description": "The logs of the transaction of this log." }, "to": { "type": "string", "description": "The address of the contract of this log." }, "error": { "description": "The error of the transaction of this log." } }, "required": [ "createdAt" ], "type": "object", "additionalProperties": false }, "Interaction": { "properties": { "to": { "type": "string", "description": "The address of the recipient of native tokens. Use *only* to transfer native tokens. If you provide one of a `pla_...`, or `acc_...` it will be converted to the corresponding address." }, "value": { "type": "string", "description": "The value intended to be sent with the transaction. Should be a stringified number in WEI (i.e. factor 10^18).\n*", "example": "1000000000000000000" }, "contract": { "type": "string", "description": "The contract ID you want to interact with. Must have been added to Openfort first, starts with `con_`.", "example": "con_0cddb398-1dc6-4e6f-8726-9ec7cea85f35" }, "functionName": { "type": "string", "description": "The function name of the contract. Accepts a a function signature as well (e.g. mint(address)).", "example": "mint" }, "functionArgs": { "items": {}, "type": "array", "description": "The function arguments of the contract, in string format. If you provide one of a `pla_...`, `con_...` or `acc_...` it will be converted to the corresponding address.", "example": [ "0x662D24Bf7Ea2dD6a7D0935F680a6056b94fE934d" ] }, "dataSuffix": { "type": "string", "description": "Data to append to the end of the calldata. Useful for [adding a \"domain\" tag](https://opensea.notion.site/opensea/Seaport-Order-Attributions-ec2d69bf455041a5baa490941aad307f)" }, "data": { "type": "string", "description": "The encoded calldata of the contract." } }, "type": "object", "additionalProperties": false }, "NextActionType": { "enum": [ "sign_with_wallet" ], "type": "string" }, "NextActionPayload": { "properties": { "userOp": { "description": "The userOperation.", "deprecated": true }, "userOpHash": { "type": "string", "description": "The hashed userOperation.", "deprecated": true }, "userOperation": { "description": "The userOperation.", "deprecated": true }, "userOperationHash": { "type": "string", "description": "The hashed userOperation.", "deprecated": true }, "signableHash": { "type": "string", "description": "chain-agnostic hash to sign." } }, "type": "object", "additionalProperties": false }, "NextActionResponse": { "properties": { "type": { "$ref": "#/components/schemas/NextActionType" }, "payload": { "$ref": "#/components/schemas/NextActionPayload" } }, "required": [ "type", "payload" ], "type": "object", "additionalProperties": false }, "EntityType.TRANSACTION_INTENT": { "enum": [ "transactionIntent" ], "type": "string" }, "TransactionIntentResponse": { "properties": { "id": { "type": "string" }, "object": { "$ref": "#/components/schemas/EntityType.TRANSACTION_INTENT" }, "createdAt": { "type": "integer", "format": "int32" }, "updatedAt": { "type": "integer", "format": "int32", "description": "The unix timestamp in seconds when the transactionIntent was created." }, "chainId": { "type": "integer", "format": "int32", "description": "The chain ID.", "example": 5 }, "abstractionType": { "$ref": "#/components/schemas/TransactionAbstractionType", "description": "The transaction abstraction type", "example": "accountAbstractionV6" }, "transitions": { "items": { "$ref": "#/components/schemas/Transition" }, "type": "array", "description": "Transition of statuses the transaction has gone through." }, "details": { "anyOf": [ { "$ref": "#/components/schemas/ZKSyncDetails" }, { "$ref": "#/components/schemas/AccountAbstractionV6Details" }, { "$ref": "#/components/schemas/AccountAbstractionV8Details" }, { "$ref": "#/components/schemas/AccountAbstractionV9Details" }, { "$ref": "#/components/schemas/StandardDetails" } ], "description": "Specific transaction details based on its type" }, "userOperationHash": { "type": "string", "deprecated": true }, "userOperation": { "deprecated": true }, "response": { "$ref": "#/components/schemas/ResponseResponse" }, "interactions": { "items": { "$ref": "#/components/schemas/Interaction" }, "type": "array" }, "nextAction": { "$ref": "#/components/schemas/NextActionResponse" }, "policy": { "anyOf": [ { "$ref": "#/components/schemas/Policy" }, { "$ref": "#/components/schemas/EntityIdResponse" } ], "description": "The policy ID (starts with pol_).", "example": "pol_..." }, "player": { "anyOf": [ { "$ref": "#/components/schemas/Player" }, { "$ref": "#/components/schemas/EntityIdResponse" } ], "description": "The player ID (starts with pla_).", "example": "pla_..." }, "account": { "anyOf": [ { "$ref": "#/components/schemas/Account" }, { "$ref": "#/components/schemas/EntityIdResponse" }, { "$ref": "#/components/schemas/DeveloperAccount" } ], "description": "The account ID (starts with acc_).", "example": "acc_..." } }, "required": [ "id", "object", "createdAt", "updatedAt", "chainId", "abstractionType", "account" ], "type": "object", "additionalProperties": false }, "TransactionIntentListResponse": { "properties": { "object": { "$ref": "#/components/schemas/ResponseType.LIST" }, "url": { "type": "string" }, "data": { "items": { "$ref": "#/components/schemas/TransactionIntentResponse" }, "type": "array" }, "start": { "type": "integer", "format": "int32" }, "end": { "type": "integer", "format": "int32" }, "total": { "type": "integer", "format": "int32" } }, "required": [ "object", "url", "data", "start", "end", "total" ], "type": "object", "additionalProperties": false }, "ErrorType.INVALID_REQUEST_ERROR": { "enum": [ "invalid_request_error" ], "type": "string" }, "FieldErrors": { "properties": {}, "type": "object", "additionalProperties": { "properties": { "value": {}, "message": { "type": "string" } }, "required": [ "message" ], "type": "object" } }, "InvalidRequestError": { "properties": { "type": { "$ref": "#/components/schemas/ErrorType.INVALID_REQUEST_ERROR" }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/FieldErrors" } }, "required": [ "type", "message" ], "type": "object", "additionalProperties": false }, "InvalidRequestErrorResponse": { "properties": { "error": { "$ref": "#/components/schemas/InvalidRequestError" } }, "required": [ "error" ], "type": "object", "additionalProperties": false }, "TransactionIntentResponseExpandable": { "type": "string", "enum": [ "policy", "player", "account" ], "nullable": false }, "Prisma.SortOrder": { "type": "string", "enum": [ "asc", "desc" ] }, "TransactionIntentListQueries": { "properties": { "limit": { "type": "integer", "format": "int32", "description": "Specifies the maximum number of records to return.", "minimum": 1 }, "skip": { "type": "integer", "format": "int32", "description": "Specifies the offset for the first records to return.", "minimum": 0 }, "order": { "$ref": "#/components/schemas/Prisma.SortOrder", "description": "Specifies the order in which to sort the results." }, "expand": { "items": { "$ref": "#/components/schemas/TransactionIntentResponseExpandable" }, "type": "array", "description": "Specifies the fields to expand in the response." }, "chainId": { "type": "integer", "format": "int32", "description": "The chain ID. Must be a [supported chain](/development/chains).", "example": 80002 }, "account": { "items": { "type": "string" }, "type": "array", "description": "Filter by account ID or developer account (starts with acc_ or dac_ respectively).", "example": [ "acc_dc981458-a653-4539-b120-a321915b2896" ] }, "player": { "items": { "type": "string" }, "type": "array", "description": "Filter by player ID (starts with pla_).", "example": [ "pla_556166c9-77ad-4a39-aaf8-c432defa8a0f" ] }, "status": { "type": "number", "format": "double", "description": "Filter by successful (1) or failed (0) transaction intents.", "example": 1 }, "policy": { "items": { "type": "string" }, "type": "array", "description": "Filter by policy ID (starts with pol_).", "example": [ "pol_7e07ae30-2a4d-48fa-803f-361da94905dd" ] } }, "type": "object", "additionalProperties": false }, "CreateTransactionIntentRequest": { "properties": { "chainId": { "type": "integer", "format": "int32", "description": "The chain ID. Must be a [supported chain](/development/chains).", "example": 80002 }, "player": { "type": "string", "description": "ID of the Player this TransactionIntent belongs to, if one exists (starts with `pla_`).\n\nIf you omit this parameter a new Player will be created.", "example": "pla_e0b84653-1741-4a3d-9e91-2b0fd2942f60" }, "account": { "type": "string", "description": "ID of the Account this TransactionIntent is executed with, if one exists (starts with `acc_` or `dac_`).\n\nWhen providing a Player and ChainID, you can omit this parameter.", "example": "acc_e1b24353-1741-4a3d-9e91-2b0fd2942f60" }, "policy": { "type": "string", "description": "ID of the Policy that defines the gas sponsorship strategy (starts with `pol_`). If no Policy is provided, the own Account native token funds will be used to pay for gas.", "example": "pol_7e07ae30-2a4d-48fa-803f-361da94905dd" }, "externalOwnerAddress": { "type": "string", "description": "Use this parameter to create a new Account for Player with the provided owner address.\n\nIf you omit this parameter and no Account exists for the Player, a custodial Account will be created.", "example": "0x1234567890abcdef1234567890abcdef12345678" }, "optimistic": { "type": "boolean", "description": "Set to `true` to indicate that the transactionIntent request should be resolved as soon as possible, after the transactionIntent is created and simulated and before it arrives on chain.", "example": true }, "signedAuthorization": { "type": "string", "description": "Signed authorization for delegated accounts. This signature is used to authorize the user operation for AccountAbstractionV8.\nThe signature should be in the format \"0x...\" and will be parsed to extract r, s, and yParity values.", "example": "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1c" }, "interactions": { "items": { "$ref": "#/components/schemas/Interaction" }, "type": "array" } }, "required": [ "chainId", "interactions" ], "type": "object", "additionalProperties": false }, "EstimateTransactionIntentGasResult": { "description": "return value from estimateTransactionIntentCost", "properties": { "estimatedTXGas": { "type": "string", "description": "estimated TX gas cost" }, "estimatedTXGasFee": { "type": "string", "description": "estimated TX gas cost in the chain native token (WEI)" }, "estimatedTXGasFeeUSD": { "type": "string", "description": "estimated TX gas cost in USD" }, "estimatedTXGasFeeToken": { "type": "string", "description": "when using a policy, the estimated TX gas cost in the ERC-20 token defined in the strategy (WEI)" }, "gasPrice": { "type": "string", "description": "gas price used for the estimation" } }, "required": [ "estimatedTXGas", "estimatedTXGasFee", "estimatedTXGasFeeUSD", "gasPrice" ], "type": "object", "additionalProperties": false }, "SignatureRequest": { "properties": { "signature": { "type": "string", "description": "signed userOperationHash by the owner or valid session key", "example": "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef" }, "optimistic": { "type": "boolean", "description": "Set to `true` to indicate that the transactionIntent request should be resolved as soon as possible, after the transactionIntent is created and simulated and before it arrives on chain.", "example": true } }, "required": [ "signature" ], "type": "object", "additionalProperties": false }, "APITopic": { "enum": [ "transaction_intent.broadcast", "transaction_intent.successful", "transaction_intent.cancelled", "transaction_intent.failed", "balance.project", "balance.contract", "balance.dev_account", "test" ], "type": "string" }, "APITriggerType": { "enum": [ "webhook", "email" ], "type": "string" }, "EntityType.TRIGGER": { "enum": [ "trigger" ], "type": "string" }, "TriggerResponse": { "properties": { "id": { "type": "string" }, "object": { "$ref": "#/components/schemas/EntityType.TRIGGER" }, "createdAt": { "type": "integer", "format": "int32" }, "target": { "type": "string" }, "type": { "$ref": "#/components/schemas/APITriggerType" }, "subscription": { "type": "string" }, "updatedAt": { "type": "number", "format": "double" } }, "required": [ "id", "object", "createdAt", "target", "type", "subscription" ], "type": "object", "additionalProperties": false }, "EntityType.SUBSCRIPTION": { "enum": [ "subscription" ], "type": "string" }, "SubscriptionResponse": { "properties": { "id": { "type": "string" }, "object": { "$ref": "#/components/schemas/EntityType.SUBSCRIPTION" }, "createdAt": { "type": "integer", "format": "int32" }, "topic": { "$ref": "#/components/schemas/APITopic" }, "triggers": { "items": { "$ref": "#/components/schemas/TriggerResponse" }, "type": "array" }, "updatedAt": { "type": "number", "format": "double" } }, "required": [ "id", "object", "createdAt", "topic", "triggers" ], "type": "object", "additionalProperties": false }, "SubscriptionListResponse": { "properties": { "object": { "$ref": "#/components/schemas/ResponseType.LIST" }, "url": { "type": "string" }, "data": { "items": { "$ref": "#/components/schemas/SubscriptionResponse" }, "type": "array" }, "start": { "type": "integer", "format": "int32" }, "end": { "type": "integer", "format": "int32" }, "total": { "type": "integer", "format": "int32" } }, "required": [ "object", "url", "data", "start", "end", "total" ], "type": "object", "additionalProperties": false }, "Status": { "enum": [ "success", "failed" ], "type": "string" }, "EntityType.LOG": { "enum": [ "log" ], "type": "string" }, "LogResponse": { "properties": { "id": { "type": "string" }, "object": { "$ref": "#/components/schemas/EntityType.LOG" }, "createdAt": { "type": "number", "format": "double" }, "topic": { "$ref": "#/components/schemas/APITopic" }, "status": { "$ref": "#/components/schemas/Status" }, "subscription": { "type": "string" }, "trigger": { "type": "string" }, "requestID": { "type": "string" } }, "required": [ "id", "object", "createdAt", "topic", "status", "subscription", "trigger", "requestID" ], "type": "object", "additionalProperties": false }, "BaseEntityListResponse_LogResponse_": { "properties": { "object": { "$ref": "#/components/schemas/ResponseType.LIST" }, "url": { "type": "string" }, "data": { "items": { "$ref": "#/components/schemas/LogResponse" }, "type": "array" }, "start": { "type": "integer", "format": "int32" }, "end": { "type": "integer", "format": "int32" }, "total": { "type": "integer", "format": "int32" } }, "required": [ "object", "url", "data", "start", "end", "total" ], "type": "object", "additionalProperties": false }, "SubscriptionLogsResponse": { "$ref": "#/components/schemas/BaseEntityListResponse_LogResponse_" }, "ListSubscriptionLogsRequest": { "properties": { "limit": { "type": "integer", "format": "int32", "description": "Specifies the maximum number of records to return.", "minimum": 1 }, "skip": { "type": "integer", "format": "int32", "description": "Specifies the offset for the first records to return.", "minimum": 0 }, "order": { "$ref": "#/components/schemas/Prisma.SortOrder", "description": "Specifies the order in which to sort the results." }, "topic": { "$ref": "#/components/schemas/APITopic", "description": "Specifies the topic of the subscription logs", "example": "transaction.broadcast" }, "status": { "$ref": "#/components/schemas/Status", "description": "Specifies the status of the subscription logs", "example": "success" }, "object": { "type": "string", "description": "Specifies the object ID of the object related to triggered notification", "example": "obj_6f6c9067-89fa-4fc8-ac72-c242a268c584" }, "subscription": { "type": "string", "description": "Specifies the subscription ID", "example": "sub_6f6c9067-89fa-4fc8-ac72-c242a268c584" }, "trigger": { "type": "string", "description": "Specifies the trigger ID", "example": "tri_6f6c9067-89fa-4fc8-ac72-c242a268c584" }, "requestID": { "type": "string", "description": "Specifies the request ID", "example": "89fac242a268c584" } }, "type": "object", "additionalProperties": false }, "GetSubscriptionResponse": { "$ref": "#/components/schemas/SubscriptionResponse" }, "CreateSubscriptionResponse": { "$ref": "#/components/schemas/SubscriptionResponse" }, "CreateTriggerRequest": { "properties": { "target": { "type": "string", "description": "Specifies the target of the trigger", "example": "https://example.com" }, "type": { "$ref": "#/components/schemas/APITriggerType", "description": "Specifies the type of the trigger", "example": "webhook" }, "subscription": { "type": "string", "description": "Specifies the subscription ID", "example": "sub_6f6c9067-89fa-4fc8-ac72-c242a268c584" } }, "required": [ "target", "type" ], "type": "object", "additionalProperties": false }, "CreateSubscriptionRequest": { "properties": { "topic": { "$ref": "#/components/schemas/APITopic", "description": "Specifies the topic of the subscription", "example": "transaction.broadcast" }, "triggers": { "items": { "$ref": "#/components/schemas/CreateTriggerRequest" }, "type": "array", "description": "Specifies the triggers of the subscription" } }, "required": [ "topic", "triggers" ], "type": "object", "additionalProperties": false }, "SubscriptionDeleteResponse": { "properties": { "id": { "type": "string" }, "object": { "$ref": "#/components/schemas/EntityType.SUBSCRIPTION" }, "deleted": { "type": "boolean" } }, "required": [ "id", "object", "deleted" ], "type": "object", "additionalProperties": false }, "BaseEntityListResponse_TriggerResponse_": { "properties": { "object": { "$ref": "#/components/schemas/ResponseType.LIST" }, "url": { "type": "string" }, "data": { "items": { "$ref": "#/components/schemas/TriggerResponse" }, "type": "array" }, "start": { "type": "integer", "format": "int32" }, "end": { "type": "integer", "format": "int32" }, "total": { "type": "integer", "format": "int32" } }, "required": [ "object", "url", "data", "start", "end", "total" ], "type": "object", "additionalProperties": false }, "TriggerListResponse": { "$ref": "#/components/schemas/BaseEntityListResponse_TriggerResponse_" }, "GetTriggerResponse": { "$ref": "#/components/schemas/TriggerResponse" }, "CreateTriggerResponse": { "$ref": "#/components/schemas/TriggerResponse" }, "TriggerDeleteResponse": { "properties": { "id": { "type": "string" }, "object": { "$ref": "#/components/schemas/EntityType.TRIGGER" }, "deleted": { "type": "boolean" } }, "required": [ "id", "object", "deleted" ], "type": "object", "additionalProperties": false }, "TransactionIntent": { "properties": { "id": { "type": "string" }, "object": { "$ref": "#/components/schemas/EntityType.TRANSACTION_INTENT" }, "createdAt": { "type": "integer", "format": "int32" }, "updatedAt": { "type": "integer", "format": "int32", "description": "The unix timestamp in seconds when the transactionIntent was created." }, "chainId": { "type": "integer", "format": "int32", "description": "The chain ID.", "example": 5 }, "abstractionType": { "$ref": "#/components/schemas/TransactionAbstractionType", "description": "The transaction abstraction type", "example": "accountAbstractionV6" }, "transitions": { "items": { "$ref": "#/components/schemas/Transition" }, "type": "array", "description": "Transition of statuses the transaction has gone through." }, "details": { "anyOf": [ { "$ref": "#/components/schemas/ZKSyncDetails" }, { "$ref": "#/components/schemas/AccountAbstractionV6Details" }, { "$ref": "#/components/schemas/AccountAbstractionV8Details" }, { "$ref": "#/components/schemas/AccountAbstractionV9Details" }, { "$ref": "#/components/schemas/StandardDetails" } ], "description": "Specific transaction details based on its type" }, "userOperationHash": { "type": "string", "deprecated": true }, "userOperation": { "deprecated": true }, "response": { "$ref": "#/components/schemas/ResponseResponse" }, "interactions": { "items": { "$ref": "#/components/schemas/Interaction" }, "type": "array" }, "nextAction": { "$ref": "#/components/schemas/NextActionResponse" }, "policy": { "$ref": "#/components/schemas/EntityIdResponse", "description": "The policy ID (starts with pol_).", "example": "pol_..." }, "player": { "$ref": "#/components/schemas/EntityIdResponse", "description": "The player ID (starts with pla_).", "example": "pla_..." }, "account": { "$ref": "#/components/schemas/EntityIdResponse", "description": "The account ID.", "example": "acc_..." } }, "required": [ "id", "object", "createdAt", "updatedAt", "chainId", "abstractionType", "account" ], "type": "object", "additionalProperties": false }, "DeveloperAccountResponse": { "properties": { "id": { "type": "string" }, "object": { "$ref": "#/components/schemas/EntityType.DEVELOPER_ACCOUNT" }, "createdAt": { "type": "number", "format": "double" }, "address": { "type": "string" }, "custodial": { "type": "boolean" }, "name": { "type": "string" }, "transactionIntents": { "items": { "anyOf": [ { "$ref": "#/components/schemas/TransactionIntent" }, { "$ref": "#/components/schemas/EntityIdResponse" } ] }, "type": "array" } }, "required": [ "id", "object", "createdAt", "address", "custodial" ], "type": "object", "additionalProperties": false }, "DeveloperAccountListResponse": { "properties": { "object": { "$ref": "#/components/schemas/ResponseType.LIST" }, "url": { "type": "string" }, "data": { "items": { "$ref": "#/components/schemas/DeveloperAccountResponse" }, "type": "array" }, "start": { "type": "integer", "format": "int32" }, "end": { "type": "integer", "format": "int32" }, "total": { "type": "integer", "format": "int32" } }, "required": [ "object", "url", "data", "start", "end", "total" ], "type": "object", "additionalProperties": false }, "DeveloperAccountResponseExpandable": { "type": "string", "enum": [ "transactionIntents" ], "nullable": false }, "DeveloperAccountListQueries": { "properties": { "limit": { "type": "integer", "format": "int32", "description": "Specifies the maximum number of records to return.", "minimum": 1 }, "skip": { "type": "integer", "format": "int32", "description": "Specifies the offset for the first records to return.", "minimum": 0 }, "order": { "$ref": "#/components/schemas/Prisma.SortOrder", "description": "Specifies the order in which to sort the results." }, "expand": { "items": { "$ref": "#/components/schemas/DeveloperAccountResponseExpandable" }, "type": "array", "description": "Specifies the fields to expand in the response.", "example": [ "transactionIntents" ] }, "deleted": { "type": "boolean", "description": "Specifies whether to include deleted dev accounts.", "example": false } }, "type": "object", "additionalProperties": false }, "CreateDeveloperAccountCreateRequest": { "properties": { "address": { "type": "string", "description": "The address of the wallet that has deposited funds in the paymaster.", "example": "0x662D24Bf7Ea2dD6a7D0935F680a6056b94fE934d" }, "signature": { "type": "string", "description": "Signature to verify the account ownership.", "example": "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef" }, "name": { "type": "string", "description": "The name of the account.", "example": "Escrow account" } }, "type": "object", "additionalProperties": false }, "EntityType.SIGNATURE": { "enum": [ "signature" ], "type": "string" }, "SignPayloadResponse": { "properties": { "object": { "$ref": "#/components/schemas/EntityType.SIGNATURE" }, "account": { "type": "string" }, "address": { "type": "string" }, "hash": { "type": "string" }, "signature": { "type": "string" } }, "required": [ "object", "account", "address", "hash", "signature" ], "type": "object", "additionalProperties": false }, "TypedDomainData": { "properties": { "chainId": { "type": "integer", "format": "int32", "description": "The chain ID.", "example": 80002 }, "name": { "type": "string", "description": "The user readable name of signing domain, i.e. the name of the DApp or the protocol..", "example": "Openfort" }, "version": { "type": "string", "description": "The current major version of the signing domain. Signatures from different versions are not compatible.", "example": "1" }, "verifyingContract": { "type": "string", "description": "The address of the contract that will verify the signature. The user-agent may do contract specific phishing prevention.", "example": "0x64452Dff1180b21dc50033e1680bB64CDd492582" }, "salt": { "type": "string", "description": "An disambiguating salt for the protocol. This can be used as a domain separator of last resort.", "example": "0xf2d857f4a3edcb9b78b4d503bfe733db1e3f6cdc2b7971ee739626c97e86a558" } }, "required": [ "chainId" ], "type": "object", "additionalProperties": false }, "TypedDataField": { "properties": { "name": { "type": "string" }, "type": { "type": "string" } }, "required": [ "name", "type" ], "type": "object", "additionalProperties": false }, "SignPayloadRequest": { "properties": { "domain": { "$ref": "#/components/schemas/TypedDomainData", "description": "Domain. Specific to the dApp." }, "types": { "properties": {}, "additionalProperties": { "items": { "$ref": "#/components/schemas/TypedDataField" }, "type": "array" }, "type": "object" }, "primaryType": { "type": "string", "example": "Mail" }, "value": { "properties": {}, "additionalProperties": {}, "type": "object" }, "hash": { "type": "string", "description": "Hash to verify and that will be signed", "example": "0x3d8c6cab96bc24c87162c529bed5ba88b4617a7ea8bef66489a541d043ac6e8b" } }, "required": [ "domain", "types", "primaryType", "value" ], "type": "object", "additionalProperties": false }, "UpdateDeveloperAccountCreateRequest": { "properties": { "name": { "type": "string", "description": "The name of the account.", "example": "Escrow account" } }, "type": "object", "additionalProperties": false }, "DeveloperAccountGetMessageResponse": { "properties": { "message": { "type": "string" }, "address": { "type": "string" } }, "required": [ "message", "address" ], "type": "object", "additionalProperties": false }, "DeveloperAccountDeleteResponse": { "properties": { "id": { "type": "string" }, "object": { "$ref": "#/components/schemas/EntityType.DEVELOPER_ACCOUNT" }, "deleted": { "type": "boolean" } }, "required": [ "id", "object", "deleted" ], "type": "object", "additionalProperties": false }, "EntityType.SESSION": { "enum": [ "session" ], "type": "string" }, "SessionResponse": { "properties": { "id": { "type": "string" }, "object": { "$ref": "#/components/schemas/EntityType.SESSION" }, "createdAt": { "type": "integer", "format": "int32" }, "updatedAt": { "type": "integer", "format": "int32" }, "isActive": { "type": "boolean" }, "address": { "type": "string" }, "validAfter": { "type": "string" }, "validUntil": { "type": "string" }, "account": { "$ref": "#/components/schemas/EntityIdResponse", "description": "The account ID.", "example": "acc_..." }, "whitelist": { "items": { "type": "string" }, "type": "array" }, "limit": { "type": "integer", "format": "int32" }, "nextAction": { "$ref": "#/components/schemas/NextActionResponse" }, "transactionIntents": { "items": { "anyOf": [ { "$ref": "#/components/schemas/TransactionIntent" }, { "$ref": "#/components/schemas/EntityIdResponse" } ] }, "type": "array" } }, "required": [ "id", "object", "createdAt", "updatedAt", "isActive", "address", "validAfter", "validUntil", "account", "whitelist", "limit" ], "type": "object", "additionalProperties": false }, "SessionListResponse": { "properties": { "object": { "$ref": "#/components/schemas/ResponseType.LIST" }, "url": { "type": "string" }, "data": { "items": { "$ref": "#/components/schemas/SessionResponse" }, "type": "array" }, "start": { "type": "integer", "format": "int32" }, "end": { "type": "integer", "format": "int32" }, "total": { "type": "integer", "format": "int32" } }, "required": [ "object", "url", "data", "start", "end", "total" ], "type": "object", "additionalProperties": false }, "SessionResponseExpandable": { "type": "string", "enum": [ "transactionIntents" ], "nullable": false, "description": "Contains list of the expandable fields for the session response" }, "SessionListQueries": { "properties": { "limit": { "type": "integer", "format": "int32", "description": "Specifies the maximum number of records to return.", "minimum": 1 }, "skip": { "type": "integer", "format": "int32", "description": "Specifies the offset for the first records to return.", "minimum": 0 }, "order": { "$ref": "#/components/schemas/Prisma.SortOrder", "description": "Specifies the order in which to sort the results." }, "player": { "type": "string", "description": "The player ID (starts with pla_)", "example": "pla_48eeba57-2cd5-4159-a2cb-057a23a35e65" }, "expand": { "items": { "$ref": "#/components/schemas/SessionResponseExpandable" }, "type": "array", "description": "Specifies the fields to expand in the response." } }, "required": [ "player" ], "type": "object", "additionalProperties": false }, "CreateSessionRequest": { "properties": { "address": { "type": "string", "description": "The address of the session key.", "example": "0x1234567890abcdef1234567890abcdef12345678" }, "chainId": { "type": "integer", "format": "int32", "description": "The chain ID. Must be a [supported chain](/development/chains).", "example": 80002 }, "externalOwnerAddress": { "type": "string", "description": "If no account exists for a given player, create one with this address.", "example": "0x1234567890abcdef1234567890abcdef12345678" }, "limit": { "type": "integer", "format": "int32", "description": "Maximum number of times the session key can be used.", "example": 1000, "minimum": 1 }, "optimistic": { "type": "boolean", "description": "Set to `true` to indicate that the transactionIntent request should be resolved as soon as possible, after the transactionIntent is created and simulated and before it arrives on chain.", "example": true }, "policy": { "type": "string", "description": "ID of the Policy that defines the gas sponsorship strategy (starts with `pol_`). If no Policy is provided, the own Account native token funds will be used to pay for gas.", "example": "pol_7e07ae30-2a4d-48fa-803f-361da94905dd" }, "validAfter": { "type": "integer", "format": "int32", "description": "The unix timestamp in seconds when the session key becomes valid.", "example": 10 }, "validUntil": { "type": "integer", "format": "int32", "description": "The unix timestamp in seconds when the session key expires.", "example": 123512123 }, "whitelist": { "items": { "type": "string" }, "type": "array", "description": "The list of whitelisted addresses (contracts the session key can interact with).", "example": [ "0x1234567890abcdef1234567890abcdef12345678" ] }, "player": { "type": "string", "description": "The player ID (starts with pla_).", "example": "pla_e0b84653-1741-4a3d-9e91-2b0fd2942f60" }, "account": { "type": "string", "description": "ID of the Account this TransactionIntent is executed with, if one exists (starts with `acc_` or `dac_`).\n\nWhen providing a Player and ChainID, you can omit this parameter.", "example": "acc_e1b24353-1741-4a3d-9e91-2b0fd2942f60" } }, "required": [ "address", "chainId", "validAfter", "validUntil" ], "type": "object", "additionalProperties": false }, "RevokeSessionRequest": { "properties": { "address": { "type": "string", "description": "The address of the session key to revoke.", "example": "0x1234567890abcdef1234567890abcdef12345678" }, "policy": { "type": "string", "description": "ID of the Policy that defines the gas sponsorship strategy (starts with `pol_`). If no Policy is provided, the own Account native token funds will be used to pay for gas.", "example": "pol_7e07ae30-2a4d-48fa-803f-361da94905dd" }, "optimistic": { "type": "boolean", "description": "Whether the transactionIntent is optimistic (resolve before it arrives on chain) or not.", "example": true }, "chainId": { "type": "integer", "format": "int32", "description": "The chain ID. Must be a [supported chain](/development/chains).", "example": 80002 }, "player": { "type": "string", "description": "The player ID (starts with pla_).", "example": "pla_e0b84653-1741-4a3d-9e91-2b0fd2942f60" }, "account": { "type": "string", "description": "ID of the Account this TransactionIntent is executed with, if one exists (starts with `acc_` or `dac_`).\n\nWhen providing a Player and ChainID, you can omit this parameter.", "example": "acc_e1b24353-1741-4a3d-9e91-2b0fd2942f60" } }, "required": [ "address", "chainId" ], "type": "object", "additionalProperties": false }, "PolicyRuleType.CONTRACT": { "enum": [ "contract_functions" ], "type": "string" }, "PolicyRuleType": { "enum": [ "contract_functions", "account_functions", "rate_limit" ], "type": "string" }, "EntityType.POLICY_RULE": { "enum": [ "policyRule" ], "type": "string" }, "AbiType": { "properties": { "name": { "type": "string" }, "type": { "type": "string" }, "indexed": { "type": "boolean" }, "internalType": {}, "components": { "items": { "$ref": "#/components/schemas/AbiType" }, "type": "array" } }, "type": "object", "additionalProperties": false }, "Pick_JsonFragmentType.Exclude_keyofJsonFragmentType.components__": { "properties": { "name": { "type": "string" }, "type": { "type": "string" }, "indexed": { "type": "boolean" }, "internalType": {} }, "type": "object", "description": "From T, pick a set of properties whose keys are in the union K" }, "Pick_JsonFragment.Exclude_keyofJsonFragment.inputs-or-outputs__": { "properties": { "name": { "type": "string" }, "type": { "type": "string" }, "anonymous": { "type": "boolean" }, "payable": { "type": "boolean" }, "constant": { "type": "boolean" }, "stateMutability": { "type": "string" }, "gas": { "type": "string" } }, "type": "object", "description": "From T, pick a set of properties whose keys are in the union K" }, "Abi": { "properties": { "name": { "type": "string" }, "type": { "type": "string" }, "anonymous": { "type": "boolean" }, "payable": { "type": "boolean" }, "constant": { "type": "boolean" }, "stateMutability": { "type": "string" }, "gas": { "type": "string" }, "inputs": { "items": { "$ref": "#/components/schemas/AbiType" }, "type": "array" }, "outputs": { "items": { "$ref": "#/components/schemas/AbiType" }, "type": "array" } }, "type": "object", "additionalProperties": false }, "EntityType.CONTRACT": { "enum": [ "contract" ], "type": "string" }, "ContractResponse": { "properties": { "id": { "type": "string" }, "object": { "$ref": "#/components/schemas/EntityType.CONTRACT" }, "createdAt": { "type": "integer", "format": "int32" }, "name": { "type": "string", "nullable": true }, "chainId": { "type": "integer", "format": "int32", "description": "The chain ID." }, "address": { "type": "string" }, "deleted": { "type": "boolean" }, "abi": { "items": { "$ref": "#/components/schemas/Abi" }, "type": "array" }, "publicVerification": { "type": "boolean" } }, "required": [ "id", "object", "createdAt", "name", "chainId", "address", "deleted", "abi", "publicVerification" ], "type": "object", "additionalProperties": false }, "Pick_ContractResponse.id_": { "properties": { "id": { "type": "string" } }, "required": [ "id" ], "type": "object", "description": "From T, pick a set of properties whose keys are in the union K" }, "ContractPolicyRuleResponse": { "properties": { "id": { "type": "string" }, "object": { "$ref": "#/components/schemas/EntityType.POLICY_RULE" }, "createdAt": { "type": "integer", "format": "int32" }, "type": { "$ref": "#/components/schemas/PolicyRuleType.CONTRACT" }, "contract": { "anyOf": [ { "$ref": "#/components/schemas/ContractResponse" }, { "$ref": "#/components/schemas/Pick_ContractResponse.id_" } ] }, "functionName": { "type": "string" }, "wildcard": { "type": "boolean" } }, "required": [ "id", "object", "createdAt", "type", "wildcard" ], "type": "object", "additionalProperties": false }, "PolicyRuleType.ACCOUNT": { "enum": [ "account_functions" ], "type": "string" }, "AccountPolicyRuleResponse": { "properties": { "id": { "type": "string" }, "object": { "$ref": "#/components/schemas/EntityType.POLICY_RULE" }, "createdAt": { "type": "integer", "format": "int32" }, "type": { "$ref": "#/components/schemas/PolicyRuleType.ACCOUNT" } }, "required": [ "id", "object", "createdAt", "type" ], "type": "object", "additionalProperties": false }, "PolicyRateLimit.GAS_PER_TRANSACTION": { "enum": [ "gas_per_transaction" ], "type": "string" }, "PolicyRuleType.RATE_LIMIT": { "enum": [ "rate_limit" ], "type": "string" }, "PolicyRateLimit": { "enum": [ "gas_per_transaction", "gas_per_interval", "count_per_interval" ], "type": "string" }, "GasPerTransactionLimitPolicyRuleResponse": { "properties": { "id": { "type": "string" }, "object": { "$ref": "#/components/schemas/EntityType.POLICY_RULE" }, "createdAt": { "type": "integer", "format": "int32" }, "type": { "$ref": "#/components/schemas/PolicyRuleType.RATE_LIMIT" }, "functionName": { "$ref": "#/components/schemas/PolicyRateLimit.GAS_PER_TRANSACTION" }, "gasLimit": { "type": "string" } }, "required": [ "id", "object", "createdAt", "type", "functionName", "gasLimit" ], "type": "object", "additionalProperties": false }, "PolicyRateLimit.GAS_PER_INTERVAL": { "enum": [ "gas_per_interval" ], "type": "string" }, "TimeIntervalType": { "enum": [ "minute", "hour", "day", "week", "month" ], "type": "string" }, "GasPerIntervalLimitPolicyRuleResponse": { "properties": { "id": { "type": "string" }, "object": { "$ref": "#/components/schemas/EntityType.POLICY_RULE" }, "createdAt": { "type": "integer", "format": "int32" }, "type": { "$ref": "#/components/schemas/PolicyRuleType.RATE_LIMIT" }, "functionName": { "$ref": "#/components/schemas/PolicyRateLimit.GAS_PER_INTERVAL" }, "gasLimit": { "type": "string" }, "timeIntervalType": { "$ref": "#/components/schemas/TimeIntervalType" }, "timeIntervalValue": { "type": "integer", "format": "int32" } }, "required": [ "id", "object", "createdAt", "type", "functionName", "gasLimit", "timeIntervalType", "timeIntervalValue" ], "type": "object", "additionalProperties": false }, "PolicyRateLimit.COUNT_PER_INTERVAL": { "enum": [ "count_per_interval" ], "type": "string" }, "CountPerIntervalLimitPolicyRuleResponse": { "properties": { "id": { "type": "string" }, "object": { "$ref": "#/components/schemas/EntityType.POLICY_RULE" }, "createdAt": { "type": "integer", "format": "int32" }, "type": { "$ref": "#/components/schemas/PolicyRuleType.RATE_LIMIT" }, "functionName": { "$ref": "#/components/schemas/PolicyRateLimit.COUNT_PER_INTERVAL" }, "countLimit": { "type": "integer", "format": "int32" }, "timeIntervalType": { "$ref": "#/components/schemas/TimeIntervalType" }, "timeIntervalValue": { "type": "integer", "format": "int32" } }, "required": [ "id", "object", "createdAt", "type", "functionName", "countLimit", "timeIntervalType", "timeIntervalValue" ], "type": "object", "additionalProperties": false }, "PolicyRuleResponse": { "anyOf": [ { "$ref": "#/components/schemas/ContractPolicyRuleResponse" }, { "$ref": "#/components/schemas/AccountPolicyRuleResponse" }, { "$ref": "#/components/schemas/GasPerTransactionLimitPolicyRuleResponse" }, { "$ref": "#/components/schemas/GasPerIntervalLimitPolicyRuleResponse" }, { "$ref": "#/components/schemas/CountPerIntervalLimitPolicyRuleResponse" } ] }, "PolicyRuleListResponse": { "properties": { "object": { "$ref": "#/components/schemas/ResponseType.LIST" }, "url": { "type": "string" }, "data": { "items": { "$ref": "#/components/schemas/PolicyRuleResponse" }, "type": "array" }, "start": { "type": "integer", "format": "int32" }, "end": { "type": "integer", "format": "int32" }, "total": { "type": "integer", "format": "int32" } }, "required": [ "object", "url", "data", "start", "end", "total" ], "type": "object", "additionalProperties": false }, "PolicyRuleListQueries": { "properties": { "limit": { "type": "integer", "format": "int32", "description": "Specifies the maximum number of records to return.", "minimum": 1 }, "skip": { "type": "integer", "format": "int32", "description": "Specifies the offset for the first records to return.", "minimum": 0 }, "order": { "$ref": "#/components/schemas/Prisma.SortOrder", "description": "Specifies the order in which to sort the results." }, "expand": { "items": { "type": "string", "enum": [ "contract" ], "nullable": false }, "type": "array", "description": "Specifies the fields to expand in the response." }, "policy": { "type": "string", "description": "Specifies the unique policy ID (starts with pol_).", "example": "pol_48eeba57-2cd5-4159-a2cb-057a23a35e65" } }, "required": [ "policy" ], "type": "object", "additionalProperties": false }, "CreatePolicyRuleRequest": { "properties": { "type": { "$ref": "#/components/schemas/PolicyRuleType", "description": "The type of rule to add.", "example": "account_functions" }, "functionName": { "type": "string", "description": "Name of the function in the contract to allow. If you want to allow all functions, use the wildcard 'All functions'.", "example": "All functions" }, "contract": { "type": "string", "description": "The contract ID you want to interact with. Must have been added to Openfort first, starts with `con_`.", "example": "con_0cddb398-1dc6-4e6f-8726-9ec7cea85f35" }, "wildcard": { "type": "boolean", "description": "When using `contract_functions` type, set this to `true` to allow all contracts.", "example": true }, "gasLimit": { "type": "string", "description": "Gas limit in WEI (i.e. factor 10^18).", "example": "1000000000000000000" }, "countLimit": { "type": "integer", "format": "int32", "description": "Number of times the function will be sponsored.", "example": 1 }, "timeIntervalType": { "$ref": "#/components/schemas/TimeIntervalType", "description": "Time interval between sponsorships." }, "timeIntervalValue": { "type": "integer", "format": "int32", "description": "Time interval value.", "example": 1 }, "policy": { "type": "string", "description": "The unique Policy ID to add the rule to (starts with pol_).", "example": "pol_7e07ae30-2a4d-48fa-803f-361da94905dd" } }, "required": [ "type", "policy" ], "type": "object", "additionalProperties": false }, "UpdatePolicyRuleRequest": { "properties": { "type": { "$ref": "#/components/schemas/PolicyRuleType", "description": "The type of rule to add.", "example": "account_functions" }, "functionName": { "type": "string", "description": "Name of the function in the contract to allow. If you want to allow all functions, use the wildcard 'All functions'.", "example": "All functions" }, "contract": { "type": "string", "description": "The contract ID you want to interact with. Must have been added to Openfort first, starts with `con_`.", "example": "con_0cddb398-1dc6-4e6f-8726-9ec7cea85f35" }, "wildcard": { "type": "boolean", "description": "When using `contract_functions` type, set this to `true` to allow all contracts.", "example": true }, "gasLimit": { "type": "string", "description": "Gas limit in WEI (i.e. factor 10^18).", "example": "1000000000000000000" }, "countLimit": { "type": "integer", "format": "int32", "description": "Number of times the function will be sponsored.", "example": 1 }, "timeIntervalType": { "$ref": "#/components/schemas/TimeIntervalType", "description": "Time interval between sponsorships." }, "timeIntervalValue": { "type": "integer", "format": "int32", "description": "Time interval value.", "example": 1 } }, "required": [ "type" ], "type": "object", "additionalProperties": false }, "PolicyRuleDeleteResponse": { "properties": { "id": { "type": "string" }, "object": { "$ref": "#/components/schemas/EntityType.POLICY_RULE" }, "deleted": { "type": "boolean" } }, "required": [ "id", "object", "deleted" ], "type": "object", "additionalProperties": false }, "PolicyResponse": { "properties": { "id": { "type": "string" }, "object": { "$ref": "#/components/schemas/EntityType.POLICY" }, "createdAt": { "type": "integer", "format": "int32" }, "name": { "type": "string", "nullable": true }, "deleted": { "type": "boolean" }, "enabled": { "type": "boolean" }, "chainId": { "type": "integer", "format": "int32", "description": "The chain ID." }, "paymaster": { "$ref": "#/components/schemas/EntityIdResponse" }, "forwarderContract": { "$ref": "#/components/schemas/EntityIdResponse" }, "strategy": { "$ref": "#/components/schemas/PolicyStrategy" }, "transactionIntents": { "items": { "anyOf": [ { "$ref": "#/components/schemas/TransactionIntent" }, { "$ref": "#/components/schemas/EntityIdResponse" } ] }, "type": "array" }, "policyRules": { "items": { "anyOf": [ { "$ref": "#/components/schemas/PolicyRuleResponse" }, { "$ref": "#/components/schemas/EntityIdResponse" } ] }, "type": "array" } }, "required": [ "id", "object", "createdAt", "name", "deleted", "enabled", "chainId", "strategy", "transactionIntents", "policyRules" ], "type": "object", "additionalProperties": false }, "PolicyListResponse": { "properties": { "object": { "$ref": "#/components/schemas/ResponseType.LIST" }, "url": { "type": "string" }, "data": { "items": { "$ref": "#/components/schemas/PolicyResponse" }, "type": "array" }, "start": { "type": "integer", "format": "int32" }, "end": { "type": "integer", "format": "int32" }, "total": { "type": "integer", "format": "int32" } }, "required": [ "object", "url", "data", "start", "end", "total" ], "type": "object", "additionalProperties": false }, "PolicyResponseExpandable": { "type": "string", "enum": [ "transactionIntents", "policyRules" ], "nullable": false }, "PolicyListQueries": { "properties": { "limit": { "type": "integer", "format": "int32", "description": "Specifies the maximum number of records to return.", "minimum": 1 }, "skip": { "type": "integer", "format": "int32", "description": "Specifies the offset for the first records to return.", "minimum": 0 }, "order": { "$ref": "#/components/schemas/Prisma.SortOrder", "description": "Specifies the order in which to sort the results." }, "expand": { "items": { "$ref": "#/components/schemas/PolicyResponseExpandable" }, "type": "array", "description": "Specifies the fields to expand in the response." }, "name": { "type": "string", "description": "Specifies the name of the policy.", "example": "MyPolicy" }, "deleted": { "type": "boolean", "description": "Specifies whether to include deleted policies.", "example": true }, "chainId": { "type": "integer", "format": "int32", "description": "The chain ID of the policy.", "example": 80002 }, "enabled": { "type": "boolean", "description": "Specifies whether to include enabled policies.", "example": true } }, "type": "object", "additionalProperties": false }, "PolicyStrategyRequest": { "properties": { "sponsorSchema": { "$ref": "#/components/schemas/SponsorSchema", "description": "The sponsor schema of the policy.", "example": "fixed_rate" }, "tokenContract": { "type": "string", "description": "If the user pays in custom tokens, the contract ID (starts with con_) of the token contract.", "example": "con_0cddb398-1dc6-4e6f-8726-9ec7cea85f35" }, "tokenContractAmount": { "type": "string", "description": "If the user pays in ERC20 tokens, this reflects either the exchange rate or the amount in WEI.", "example": "1000000000000000000" }, "depositor": { "type": "string", "description": "If the you want to use your own native tokens to pay for gas, specify the developer account ID (starts with dac_)" } }, "required": [ "sponsorSchema" ], "type": "object", "additionalProperties": false }, "CreatePolicyRequest": { "properties": { "name": { "type": "string", "description": "Specifies the name of the policy.", "example": "My Policy" }, "chainId": { "type": "integer", "format": "int32", "description": "The chain ID. Must be a [supported chain](/development/chains).", "example": 80002 }, "strategy": { "$ref": "#/components/schemas/PolicyStrategyRequest", "description": "The sponsor schema of the policy." }, "paymaster": { "type": "string", "description": "The ID of the paymaster.", "example": "pay_6f6c9067-89fa-4fc8-ac72-c242a268c584" }, "forwarderContract": { "type": "string", "description": "The ID of the forwarder contract.", "example": "cfo_f0f89cf2-c185-40f4-beef-2a250d7a472b" } }, "required": [ "name", "chainId", "strategy" ], "type": "object", "additionalProperties": false }, "UpdatePolicyRequest": { "properties": { "name": { "type": "string", "description": "Specifies the name of the policy.", "example": "My Policy" }, "chainId": { "type": "integer", "format": "int32", "description": "The chain ID. Must be a [supported chain](/development/chains).", "example": 80002 }, "strategy": { "$ref": "#/components/schemas/PolicyStrategyRequest", "description": "The sponsor schema of the policy." }, "paymaster": { "type": "string", "description": "The ID of the paymaster.", "example": "pay_6f6c9067-89fa-4fc8-ac72-c242a268c584" }, "forwarderContract": { "type": "string", "description": "The ID of the forwarder contract.", "example": "cfo_f0f89cf2-c185-40f4-beef-2a250d7a472b" }, "deleted": { "type": "boolean", "description": "Specifies whether to delete the policy.", "example": false } }, "type": "object", "additionalProperties": false }, "PolicyDeleteResponse": { "properties": { "id": { "type": "string" }, "object": { "$ref": "#/components/schemas/EntityType.POLICY" }, "deleted": { "type": "boolean" } }, "required": [ "id", "object", "deleted" ], "type": "object", "additionalProperties": false }, "MonthRange": { "properties": { "start": { "type": "number", "format": "double" }, "end": { "type": "number", "format": "double" } }, "required": [ "start", "end" ], "type": "object", "additionalProperties": false }, "GasReportTransactionIntents": { "properties": { "id": { "type": "string" }, "gasFee": { "type": "string" }, "gasPrice": { "type": "string" }, "gasUsed": { "type": "string" }, "gasFeeInUSD": { "type": "string" } }, "required": [ "id", "gasFee", "gasPrice", "gasUsed", "gasFeeInUSD" ], "type": "object", "additionalProperties": false }, "GasReport": { "properties": { "period": { "$ref": "#/components/schemas/MonthRange" }, "averageTransactionFee": { "type": "string" }, "totalTransactionFeeInCustomTokens": { "type": "string" }, "totalTransactionFee": { "type": "string" }, "totalTransactionFeeInUSD": { "type": "string" }, "transactionIntents": { "items": { "$ref": "#/components/schemas/GasReportTransactionIntents" }, "type": "array", "deprecated": true } }, "required": [ "period", "averageTransactionFee", "totalTransactionFeeInCustomTokens", "totalTransactionFee", "totalTransactionFeeInUSD", "transactionIntents" ], "type": "object", "additionalProperties": false }, "GasReportListResponse": { "properties": { "object": { "$ref": "#/components/schemas/ResponseType.LIST" }, "url": { "type": "string" }, "data": { "items": { "$ref": "#/components/schemas/GasReport" }, "type": "array" }, "start": { "type": "integer", "format": "int32" }, "end": { "type": "integer", "format": "int32" }, "total": { "type": "integer", "format": "int32" } }, "required": [ "object", "url", "data", "start", "end", "total" ], "type": "object", "additionalProperties": false }, "PolicyReportQueries": { "properties": { "limit": { "type": "integer", "format": "int32", "description": "Specifies the maximum number of records to return.", "minimum": 1 }, "skip": { "type": "integer", "format": "int32", "description": "Specifies the offset for the first records to return.", "minimum": 0 }, "order": { "$ref": "#/components/schemas/Prisma.SortOrder", "description": "Specifies the order in which to sort the results." } }, "type": "object", "additionalProperties": false }, "GasReportTransactionIntentsListResponse": { "properties": { "object": { "$ref": "#/components/schemas/ResponseType.LIST" }, "url": { "type": "string" }, "data": { "items": { "$ref": "#/components/schemas/GasReportTransactionIntents" }, "type": "array" }, "start": { "type": "integer", "format": "int32" }, "end": { "type": "integer", "format": "int32" }, "total": { "type": "integer", "format": "int32" } }, "required": [ "object", "url", "data", "start", "end", "total" ], "type": "object", "additionalProperties": false }, "PolicyReportTransactionIntentsQueries": { "properties": { "to": { "type": "number", "format": "double", "description": "The start date of the period in unix timestamp.", "example": 1612137600 }, "from": { "type": "number", "format": "double", "description": "The end date of the period in unix timestamp.", "example": 1612137600 } }, "required": [ "to", "from" ], "type": "object", "additionalProperties": false }, "PolicyBalanceWithdrawResponse": { "properties": { "policy": { "type": "string" }, "balance": { "type": "string" }, "contract": { "type": "string" } }, "required": [ "policy", "balance", "contract" ], "type": "object", "additionalProperties": false }, "WithdrawalPolicyRequest": { "properties": { "account": { "type": "string", "description": "ID of the Dev Account this TransactionIntent will send the specified amount of tokens to (starts with `dac_`).", "example": "dac_e1b24353-1741-4a3d-9e91-2b0fd2942f60" }, "amount": { "type": "string", "description": "Amount in WEI to withdraw (i.e. factor 10^18)..", "example": "300000" } }, "required": [ "account", "amount" ], "type": "object", "additionalProperties": false }, "PlayerResponse": { "properties": { "id": { "type": "string" }, "object": { "$ref": "#/components/schemas/EntityType.PLAYER" }, "createdAt": { "type": "integer", "format": "int32" }, "name": { "type": "string" }, "description": { "type": "string" }, "metadata": { "$ref": "#/components/schemas/PlayerMetadata" }, "transactionIntents": { "items": { "anyOf": [ { "$ref": "#/components/schemas/TransactionIntent" }, { "$ref": "#/components/schemas/EntityIdResponse" } ] }, "type": "array" }, "accounts": { "items": { "anyOf": [ { "$ref": "#/components/schemas/Account" }, { "$ref": "#/components/schemas/EntityIdResponse" } ] }, "type": "array" } }, "required": [ "id", "object", "createdAt", "name" ], "type": "object", "additionalProperties": false }, "PlayerListResponse": { "properties": { "object": { "$ref": "#/components/schemas/ResponseType.LIST" }, "url": { "type": "string" }, "data": { "items": { "$ref": "#/components/schemas/PlayerResponse" }, "type": "array" }, "start": { "type": "integer", "format": "int32" }, "end": { "type": "integer", "format": "int32" }, "total": { "type": "integer", "format": "int32" } }, "required": [ "object", "url", "data", "start", "end", "total" ], "type": "object", "additionalProperties": false }, "PlayerResponseExpandable": { "type": "string", "enum": [ "transactionIntents", "accounts" ], "nullable": false }, "PlayerListQueries": { "properties": { "limit": { "type": "integer", "format": "int32", "description": "Specifies the maximum number of records to return.", "minimum": 1 }, "skip": { "type": "integer", "format": "int32", "description": "Specifies the offset for the first records to return.", "minimum": 0 }, "order": { "$ref": "#/components/schemas/Prisma.SortOrder", "description": "Specifies the order in which to sort the results." }, "expand": { "items": { "$ref": "#/components/schemas/PlayerResponseExpandable" }, "type": "array", "description": "Specifies the fields to expand in the response." }, "name": { "type": "string", "description": "Filter by player name.", "example": "John" } }, "type": "object", "additionalProperties": false }, "PlayerCreateRequest": { "properties": { "name": { "type": "string", "description": "Specifies the player name.", "example": "John", "minLength": 1, "maxLength": 256 }, "description": { "type": "string", "description": "Specifies the player description.", "example": "a useful description" }, "metadata": { "$ref": "#/components/schemas/PlayerMetadata", "description": "Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to metadata." } }, "type": "object", "additionalProperties": false }, "PlayerUpdateRequest": { "properties": { "name": { "type": "string", "description": "Specifies the player name.", "example": "John", "minLength": 1, "maxLength": 256 }, "description": { "type": "string", "description": "Specifies the player description.", "example": "a useful description" }, "metadata": { "$ref": "#/components/schemas/PlayerMetadata", "description": "Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to metadata." } }, "type": "object", "additionalProperties": false }, "PlayerDeleteResponse": { "properties": { "id": { "type": "string" }, "object": { "$ref": "#/components/schemas/EntityType.PLAYER" }, "deleted": { "type": "boolean" } }, "required": [ "id", "object", "deleted" ], "type": "object", "additionalProperties": false }, "PlayerTransferOwnershipRequest": { "properties": { "policy": { "type": "string", "description": "ID of the Policy that defines the gas sponsorship strategy (starts with `pol_`). A policy must be provided.", "example": "pol_7e07ae30-2a4d-48fa-803f-361da94905dd" }, "chainId": { "type": "integer", "format": "int32", "description": "The chain ID. Must be a [supported chain](/development/chains).", "example": 80002 }, "newOwnerAddress": { "type": "string", "description": "The address of the new owner", "example": "0x1234567890abcdef1234567890abcdef12345678" }, "player": { "type": "string", "description": "ID of the Player that has the Account you want to transfer ownership from (starts with `pla_`).", "example": "pla_e0b84653-1741-4a3d-9e91-2b0fd2942f60" } }, "required": [ "policy", "chainId", "newOwnerAddress" ], "type": "object", "additionalProperties": false }, "PlayerCancelTransferOwnershipRequest": { "properties": { "policy": { "type": "string", "description": "ID of the Policy that defines the gas sponsorship strategy (starts with `pol_`). A policy must be provided.", "example": "pol_7e07ae30-2a4d-48fa-803f-361da94905dd" }, "chainId": { "type": "integer", "format": "int32", "description": "The chain ID. Must be a [supported chain](/development/chains).", "example": 80002 } }, "required": [ "policy", "chainId" ], "type": "object", "additionalProperties": false }, "EntityType.PAYMASTER": { "enum": [ "paymaster" ], "type": "string" }, "PaymasterResponse": { "properties": { "id": { "type": "string" }, "object": { "$ref": "#/components/schemas/EntityType.PAYMASTER" }, "createdAt": { "type": "integer", "format": "int32" }, "address": { "type": "string" }, "url": { "type": "string" }, "context": { "additionalProperties": false, "type": "object" } }, "required": [ "id", "object", "createdAt", "address" ], "type": "object", "additionalProperties": false }, "CreatePaymasterResponse": { "$ref": "#/components/schemas/PaymasterResponse" }, "CreatePaymasterRequest": { "properties": { "address": { "type": "string", "description": "Specifies the address of the paymaster", "example": "0x7d526b7e99fbf52850a183..." }, "url": { "type": "string", "description": "Specifies the paymaster URL", "example": "https://rpc.mypaymaster.xyz" }, "context": { "additionalProperties": false, "type": "object", "description": "Specifies the context, that is, the arbitrary repositories that the specific paymaster may require", "example": { "key": "value" } }, "name": { "type": "string", "description": "Specifies the name of the paymaster" } }, "required": [ "address" ], "type": "object", "additionalProperties": false }, "PagingQueries": { "properties": { "limit": { "type": "integer", "format": "int32", "description": "Specifies the maximum number of records to return.", "minimum": 1 }, "skip": { "type": "integer", "format": "int32", "description": "Specifies the offset for the first records to return.", "minimum": 0 }, "order": { "$ref": "#/components/schemas/Prisma.SortOrder", "description": "Specifies the order in which to sort the results." } }, "type": "object", "additionalProperties": false }, "PaymasterDeleteResponse": { "properties": { "id": { "type": "string" }, "object": { "$ref": "#/components/schemas/EntityType.PAYMASTER" }, "deleted": { "type": "boolean" } }, "required": [ "id", "object", "deleted" ], "type": "object", "additionalProperties": false }, "OnrampProvider": { "enum": [ "coinbase", "stripe" ], "type": "string" }, "OnrampFee": { "description": "Common fee structure for onramp operations", "properties": { "type": { "type": "string" }, "amount": { "type": "string" }, "currency": { "type": "string" } }, "required": [ "type", "amount", "currency" ], "type": "object", "additionalProperties": false }, "OnrampSessionResponse": { "description": "Common unified response format for creating an onramp session.\nThis format is provider-agnostic.", "properties": { "provider": { "$ref": "#/components/schemas/OnrampProvider" }, "sessionId": { "type": "string" }, "clientSecret": { "type": "string" }, "status": { "type": "string" }, "onrampUrl": { "type": "string" }, "redirectUrl": { "type": "string" }, "quote": { "properties": { "exchangeRate": { "type": "string" }, "fees": { "items": { "$ref": "#/components/schemas/OnrampFee" }, "type": "array" }, "destinationNetwork": { "type": "string" }, "destinationCurrency": { "type": "string" }, "destinationAmount": { "type": "string" }, "sourceCurrency": { "type": "string" }, "sourceAmount": { "type": "string" } }, "type": "object" } }, "required": [ "provider", "onrampUrl" ], "type": "object", "additionalProperties": false }, "OnrampSessionRequest": { "description": "Common unified request format for creating an onramp session.\nThis format is provider-agnostic and will be adapted by each provider service.", "properties": { "provider": { "$ref": "#/components/schemas/OnrampProvider" }, "destinationCurrency": { "type": "string" }, "destinationNetwork": { "type": "string" }, "destinationAddress": { "type": "string" }, "sourceAmount": { "type": "string" }, "sourceCurrency": { "type": "string" }, "redirectUrl": { "type": "string" }, "country": { "type": "string" }, "subdivision": { "type": "string" }, "paymentMethod": { "type": "string" }, "clientIp": { "type": "string" } }, "required": [ "provider", "destinationCurrency", "destinationNetwork", "destinationAddress" ], "type": "object", "additionalProperties": false }, "OnrampQuoteResponse": { "description": "Common unified response format for getting an onramp quote.\nThis format is provider-agnostic.", "properties": { "provider": { "$ref": "#/components/schemas/OnrampProvider" }, "sourceAmount": { "type": "string" }, "sourceCurrency": { "type": "string" }, "destinationAmount": { "type": "string" }, "destinationCurrency": { "type": "string" }, "destinationNetwork": { "type": "string" }, "fees": { "items": { "$ref": "#/components/schemas/OnrampFee" }, "type": "array" }, "exchangeRate": { "type": "string" } }, "required": [ "provider", "sourceAmount", "sourceCurrency", "destinationAmount", "destinationCurrency", "destinationNetwork", "fees", "exchangeRate" ], "type": "object", "additionalProperties": false }, "OnrampQuotesResponse": { "anyOf": [ { "$ref": "#/components/schemas/OnrampQuoteResponse" }, { "items": { "$ref": "#/components/schemas/OnrampQuoteResponse" }, "type": "array" } ], "description": "Response type for quote requests that can return either a single quote or multiple quotes.\n- Returns OnrampQuoteResponse when provider is specified\n- Returns OnrampQuoteResponse[] when provider is not specified" }, "OnrampQuoteRequest": { "description": "Common unified request format for getting an onramp quote.\nThis format is provider-agnostic and will be adapted by each provider service.\nIf provider is specified, returns a single quote for that provider.\nIf provider is not specified, returns quotes from all available providers.", "properties": { "provider": { "$ref": "#/components/schemas/OnrampProvider" }, "sourceCurrency": { "type": "string" }, "destinationCurrency": { "type": "string" }, "destinationNetwork": { "type": "string" }, "sourceAmount": { "type": "string" }, "paymentMethod": { "type": "string" }, "country": { "type": "string" }, "subdivision": { "type": "string" } }, "required": [ "sourceCurrency", "destinationCurrency", "destinationNetwork", "sourceAmount" ], "type": "object", "additionalProperties": false }, "Log": { "properties": { "id": { "type": "string" }, "timestamp": { "type": "string" }, "event": { "type": "string" }, "request_body": {}, "status": { "type": "integer", "format": "int32" }, "response_time": { "type": "integer", "format": "int32" }, "response_data": {} }, "required": [ "id", "timestamp", "event", "request_body", "status", "response_time", "response_data" ], "type": "object", "additionalProperties": false }, "ProjectLogs": { "properties": { "object": { "$ref": "#/components/schemas/ResponseType.LIST" }, "url": { "type": "string" }, "data": { "items": { "$ref": "#/components/schemas/Log" }, "type": "array" }, "start": { "type": "integer", "format": "int32" }, "end": { "type": "integer", "format": "int32" }, "total": { "type": "integer", "format": "int32" } }, "required": [ "object", "url", "data", "start", "end", "total" ], "type": "object", "additionalProperties": false }, "EntityType.FORWARDER_CONTRACT": { "enum": [ "forwarderContract" ], "type": "string" }, "ForwarderContractResponse": { "properties": { "id": { "type": "string" }, "object": { "$ref": "#/components/schemas/EntityType.FORWARDER_CONTRACT" }, "createdAt": { "type": "integer", "format": "int32" }, "address": { "type": "string" }, "chainId": { "type": "number", "format": "double" }, "name": { "type": "string" } }, "required": [ "id", "object", "createdAt", "address", "chainId" ], "type": "object", "additionalProperties": false }, "CreateForwarderContractResponse": { "$ref": "#/components/schemas/ForwarderContractResponse" }, "CreateForwarderContractRequest": { "properties": { "address": { "type": "string", "description": "Specifies the address of the paymaster", "example": "0x7d526b7e99fbf52850a183..." }, "chainId": { "type": "integer", "format": "int32", "description": "The chain ID. Must be a [supported chain](/development/chains).", "example": 80002 }, "name": { "type": "string", "description": "Specifies the name of the paymaster" } }, "required": [ "address", "chainId" ], "type": "object", "additionalProperties": false }, "ForwarderContractDeleteResponse": { "properties": { "id": { "type": "string" }, "object": { "$ref": "#/components/schemas/EntityType.FORWARDER_CONTRACT" }, "deleted": { "type": "boolean" } }, "required": [ "id", "object", "deleted" ], "type": "object", "additionalProperties": false }, "TradeType": { "enum": [ "EXACT_INPUT", "EXACT_OUTPUT" ], "type": "string" }, "CreateExchangeRequest": { "properties": { "chainId": { "type": "integer", "format": "int32", "description": "The chain ID. Must be a [supported chain](/development/chains).", "example": 80002 }, "fromAddress": { "type": "string", "description": "The public address that will sign and submit the transaction. If you provide one of a `pla_...` or `acc_...` it will be converted to the corresponding address.", "example": "0x680d2719F09B23F644c136Ab7336D42b6a76AdcC" }, "tokenInAddress": { "type": "string", "description": "Token address or 'native' to sell", "example": "0x008518e76FAD03f592Bbb7E394C762d5FD54cb97" }, "tokenOutAddress": { "type": "string", "description": "Token address or 'native' to buy", "example": "0xF65B6f9c94187276C7d91F4F74134751d248bFeA" }, "amount": { "type": "string", "description": "Amount in the smallest unit of the token", "example": "100000" }, "tradeType": { "$ref": "#/components/schemas/TradeType", "description": "The type of trade, exact input or exact output", "example": "EXACT_INPUT" }, "slippagePercent": { "type": "number", "format": "double", "description": "The percentage of slippage tolerance. Default = 0.1. Max = 50. Min = 0", "example": 20 }, "maxHops": { "type": "number", "format": "double", "description": "Maximum hops allowed in optimal route. Default is 2", "example": 2 }, "deadline": { "type": "number", "format": "double", "description": "Latest time swap can execute. Default is 15 minutes", "example": 15 }, "policy": { "type": "string", "description": "ID of the Policy that defines the gas sponsorship strategy (starts with `pol_`). If no Policy is provided, the own Account native token funds will be used to pay for gas.", "example": "pol_7e07ae30-2a4d-48fa-803f-361da94905dd" }, "optimistic": { "type": "boolean", "description": "Set to `true` to indicate that the transactionIntent request should be resolved as soon as possible, after the transactionIntent is created and simulated and before it arrives on chain.", "example": true } }, "required": [ "chainId", "fromAddress", "tokenInAddress", "tokenOutAddress", "amount", "tradeType" ], "type": "object", "additionalProperties": false }, "Token": { "properties": { "name": { "type": "string" }, "symbol": { "type": "string" }, "decimals": { "type": "number", "format": "double" }, "address": { "type": "string" }, "chainId": { "type": "number", "format": "double" } }, "required": [ "decimals", "address", "chainId" ], "type": "object", "description": "Type representing a token" }, "Amount": { "properties": { "value": { "type": "string" }, "token": { "$ref": "#/components/schemas/Token" } }, "required": [ "value", "token" ], "type": "object", "description": "Interface representing a token amount" }, "Fee": { "properties": { "amount": { "$ref": "#/components/schemas/Amount" }, "basisPoints": { "type": "number", "format": "double" }, "recipient": { "type": "string" } }, "required": [ "amount", "basisPoints", "recipient" ], "type": "object", "description": "Type representing the fees returned in the quote" }, "QuoteExchangeResult": { "properties": { "amount": { "$ref": "#/components/schemas/Amount" }, "amountWithMaxSlippage": { "$ref": "#/components/schemas/Amount" }, "slippage": { "type": "number", "format": "double" }, "fees": { "items": { "$ref": "#/components/schemas/Fee" }, "type": "array" }, "estimatedTXGasFee": { "type": "string" }, "estimatedTXGasFeeUSD": { "type": "string" }, "estimatedTXGasFeeToken": { "type": "string" } }, "required": [ "amount", "amountWithMaxSlippage", "slippage", "fees", "estimatedTXGasFee", "estimatedTXGasFeeUSD" ], "type": "object", "additionalProperties": false }, "APITopic.BALANCE_CONTRACT": { "enum": [ "balance.contract" ], "type": "string" }, "EntityType.EVENT": { "enum": [ "event" ], "type": "string" }, "ContractEventResponse": { "properties": { "id": { "type": "string" }, "object": { "$ref": "#/components/schemas/EntityType.EVENT" }, "createdAt": { "type": "integer", "format": "int32" }, "topic": { "$ref": "#/components/schemas/APITopic.BALANCE_CONTRACT" }, "threshold": { "type": "string" }, "contract": { "$ref": "#/components/schemas/EntityIdResponse" }, "functionName": { "type": "string" }, "functionArgs": { "items": { "type": "string" }, "type": "array" } }, "required": [ "id", "object", "createdAt", "topic", "threshold", "contract", "functionName", "functionArgs" ], "type": "object", "additionalProperties": false }, "APITopic.BALANCE_DEV_ACCOUNT": { "enum": [ "balance.dev_account" ], "type": "string" }, "AccountEventResponse": { "properties": { "id": { "type": "string" }, "object": { "$ref": "#/components/schemas/EntityType.EVENT" }, "createdAt": { "type": "integer", "format": "int32" }, "topic": { "$ref": "#/components/schemas/APITopic.BALANCE_DEV_ACCOUNT" }, "threshold": { "type": "string" }, "developerAccount": { "$ref": "#/components/schemas/EntityIdResponse" }, "chainId": { "type": "number", "format": "double" } }, "required": [ "id", "object", "createdAt", "topic", "threshold", "developerAccount", "chainId" ], "type": "object", "additionalProperties": false }, "APITopic.BALANCE_PROJECT": { "enum": [ "balance.project" ], "type": "string" }, "BalanceEventResponse": { "properties": { "id": { "type": "string" }, "object": { "$ref": "#/components/schemas/EntityType.EVENT" }, "createdAt": { "type": "integer", "format": "int32" }, "topic": { "$ref": "#/components/schemas/APITopic.BALANCE_PROJECT" }, "threshold": { "type": "string" } }, "required": [ "id", "object", "createdAt", "topic", "threshold" ], "type": "object", "additionalProperties": false }, "APITopic.TRANSACTION_SUCCESSFUL": { "enum": [ "transaction_intent.successful" ], "type": "string" }, "TransactionConfirmedEventResponse": { "properties": { "id": { "type": "string" }, "object": { "$ref": "#/components/schemas/EntityType.EVENT" }, "createdAt": { "type": "integer", "format": "int32" }, "topic": { "$ref": "#/components/schemas/APITopic.TRANSACTION_SUCCESSFUL" }, "numberOfBlocks": { "type": "number", "format": "double" } }, "required": [ "id", "object", "createdAt", "topic", "numberOfBlocks" ], "type": "object", "additionalProperties": false }, "EventResponse": { "anyOf": [ { "$ref": "#/components/schemas/ContractEventResponse" }, { "$ref": "#/components/schemas/AccountEventResponse" }, { "$ref": "#/components/schemas/BalanceEventResponse" }, { "$ref": "#/components/schemas/TransactionConfirmedEventResponse" } ] }, "EventListResponse": { "properties": { "object": { "$ref": "#/components/schemas/ResponseType.LIST" }, "url": { "type": "string" }, "data": { "items": { "$ref": "#/components/schemas/EventResponse" }, "type": "array" }, "start": { "type": "integer", "format": "int32" }, "end": { "type": "integer", "format": "int32" }, "total": { "type": "integer", "format": "int32" } }, "required": [ "object", "url", "data", "start", "end", "total" ], "type": "object", "additionalProperties": false }, "EventListQueries": { "properties": { "limit": { "type": "integer", "format": "int32", "description": "Specifies the maximum number of records to return.", "minimum": 1 }, "skip": { "type": "integer", "format": "int32", "description": "Specifies the offset for the first records to return.", "minimum": 0 }, "order": { "$ref": "#/components/schemas/Prisma.SortOrder", "description": "Specifies the order in which to sort the results." }, "name": { "type": "string", "description": "Specifies the name of the event", "example": "Event Name" }, "deleted": { "type": "boolean", "description": "Specifies if display deleted events", "example": false } }, "type": "object", "additionalProperties": false }, "GetEventResponse": { "$ref": "#/components/schemas/EventResponse" }, "CreateEventResponse": { "$ref": "#/components/schemas/EventResponse" }, "CreateEventRequest": { "properties": { "name": { "type": "string", "description": "Specifies the name of the event", "example": "Event Name" }, "topic": { "$ref": "#/components/schemas/APITopic", "description": "Specifies the type of the event (transaction_intent.successful, balance.project, balance.contract, balance.dev_account)", "example": "balance.project" }, "contract": { "type": "string", "description": "Specifies the contract id (if the event is a contract event)", "example": "con_6f6c9067-89fa-4fc8-ac72-c242a268c584" }, "functionArgs": { "items": { "type": "string" }, "type": "array", "description": "Specifies the function arguments (if the event is a contract event)", "example": [ "arg1", "arg2" ] }, "functionName": { "type": "string", "description": "Specifies the function name (if the event is a contract event)", "example": "functionName" }, "developerAccount": { "type": "string", "description": "Specifies the developer account id (if the event is a developer account event)", "example": "dev_6f6c9067-89fa-4fc8-ac72-c242a268c584" }, "chainId": { "type": "number", "format": "double", "description": "Specifies the chain id (if the event is a developer account event)", "example": 80001 }, "threshold": { "type": "string", "description": "Threshold for the event (if the event is a contract, dev account or project event)" }, "numberOfBlocks": { "type": "number", "format": "double", "description": "Specifies the number of confirmations required for the event to trigger", "example": 10, "default": 5 } }, "required": [ "name", "topic" ], "type": "object", "additionalProperties": false }, "EventDeleteResponse": { "properties": { "id": { "type": "string" }, "object": { "$ref": "#/components/schemas/EntityType.EVENT" }, "deleted": { "type": "boolean" } }, "required": [ "id", "object", "deleted" ], "type": "object", "additionalProperties": false }, "EmbeddedResponse": { "properties": { "share": { "type": "string" }, "accountType": { "type": "string" }, "address": { "type": "string" }, "chainId": { "type": "number", "format": "double" }, "deviceId": { "type": "string" } }, "required": [ "share", "accountType", "address", "chainId" ], "type": "object", "additionalProperties": false }, "EmbeddedNextActionResponse": { "properties": { "nextAction": { "type": "string", "enum": [ "RECOVER", "REGISTER" ] }, "player": { "type": "string" }, "embedded": { "$ref": "#/components/schemas/EmbeddedResponse" } }, "required": [ "nextAction", "player" ], "type": "object", "additionalProperties": false }, "InitEmbeddedRequest": { "properties": { "chainId": { "type": "number", "format": "double" } }, "required": [ "chainId" ], "type": "object", "additionalProperties": false }, "EmbeddedV2Response": { "properties": { "share": { "type": "string" }, "accountType": { "type": "string" }, "implementationType": { "type": "string" }, "implementationAddress": { "type": "string" }, "factoryAddress": { "type": "string" }, "salt": { "type": "string" }, "address": { "type": "string" }, "ownerAddress": { "type": "string" }, "chainType": { "type": "string" }, "chainId": { "type": "number", "format": "double" }, "device": { "type": "string" }, "account": { "type": "string" }, "signer": { "type": "string" } }, "required": [ "accountType", "address", "ownerAddress", "chainType", "account", "signer" ], "type": "object", "additionalProperties": false }, "RegisterEmbeddedRequest": { "properties": { "chainId": { "type": "number", "format": "double" }, "address": { "type": "string" }, "share": { "type": "string" }, "signerUuid": { "type": "string" } }, "required": [ "chainId", "address", "share" ], "type": "object", "additionalProperties": false }, "SwitchChainRequest": { "properties": { "chainId": { "type": "number", "format": "double" }, "deviceId": { "type": "string" } }, "required": [ "chainId", "deviceId" ], "type": "object", "additionalProperties": false }, "ExportedEmbeddedRequest": { "properties": { "address": { "type": "string" } }, "required": [ "address" ], "type": "object", "additionalProperties": false }, "EntityType.DEVICE": { "enum": [ "device" ], "type": "string" }, "DeviceResponse": { "properties": { "id": { "type": "string" }, "object": { "$ref": "#/components/schemas/EntityType.DEVICE" }, "createdAt": { "type": "integer", "format": "int32" }, "account": { "type": "string" }, "share": { "type": "string" }, "isPrimary": { "type": "boolean" } }, "required": [ "id", "object", "createdAt", "account", "share", "isPrimary" ], "type": "object", "additionalProperties": false }, "BaseEntityListResponse_DeviceResponse_": { "properties": { "object": { "$ref": "#/components/schemas/ResponseType.LIST" }, "url": { "type": "string" }, "data": { "items": { "$ref": "#/components/schemas/DeviceResponse" }, "type": "array" }, "start": { "type": "integer", "format": "int32" }, "end": { "type": "integer", "format": "int32" }, "total": { "type": "integer", "format": "int32" } }, "required": [ "object", "url", "data", "start", "end", "total" ], "type": "object", "additionalProperties": false }, "DeviceListResponse": { "$ref": "#/components/schemas/BaseEntityListResponse_DeviceResponse_" }, "DeviceListQueries": { "properties": { "limit": { "type": "integer", "format": "int32", "description": "Specifies the maximum number of records to return.", "minimum": 1 }, "skip": { "type": "integer", "format": "int32", "description": "Specifies the offset for the first records to return.", "minimum": 0 }, "order": { "$ref": "#/components/schemas/Prisma.SortOrder", "description": "Specifies the order in which to sort the results." }, "account": { "type": "string", "description": "Specifies the unique account ID (starts with acc_)", "example": "acc_6f6c9067-89fa-4fc8-ac72-c242a268c584" } }, "required": [ "account" ], "type": "object", "additionalProperties": false }, "GetDeviceResponse": { "$ref": "#/components/schemas/DeviceResponse" }, "CreateDeviceResponse": { "$ref": "#/components/schemas/DeviceResponse" }, "CreateDeviceRequest": { "properties": { "account": { "type": "string", "description": "Specifies the unique account ID (starts with acc_)", "example": "acc_6f6c9067-89fa-4fc8-ac72-c242a268c584" }, "share": { "type": "string", "description": "Specifies the share repositories", "example": "7d526b7e99fbf52850a183..." } }, "required": [ "account", "share" ], "type": "object", "additionalProperties": false }, "ContractListResponse": { "properties": { "object": { "$ref": "#/components/schemas/ResponseType.LIST" }, "url": { "type": "string" }, "data": { "items": { "$ref": "#/components/schemas/ContractResponse" }, "type": "array" }, "start": { "type": "integer", "format": "int32" }, "end": { "type": "integer", "format": "int32" }, "total": { "type": "integer", "format": "int32" } }, "required": [ "object", "url", "data", "start", "end", "total" ], "type": "object", "additionalProperties": false }, "ContractListQueries": { "properties": { "limit": { "type": "integer", "format": "int32", "description": "Specifies the maximum number of records to return.", "minimum": 1 }, "skip": { "type": "integer", "format": "int32", "description": "Specifies the offset for the first records to return.", "minimum": 0 }, "order": { "$ref": "#/components/schemas/Prisma.SortOrder", "description": "Specifies the order in which to sort the results." }, "name": { "type": "string", "description": "Specifies the name of the contract.", "example": "NFT Contract" }, "deleted": { "type": "boolean", "description": "Specifies whether to include deleted contracts.", "example": false }, "chainId": { "type": "integer", "format": "int32", "description": "The chain ID of the contract.", "example": 80002 }, "address": { "type": "string", "description": "Specifies the address of the contract.", "example": "0x742e6e61d760164d56f44801054bcf40fa821d97" } }, "type": "object", "additionalProperties": false }, "CreateContractRequest": { "properties": { "name": { "type": "string", "description": "Specifies the name of the contract (Only for display purposes).", "example": "NFT Contract" }, "chainId": { "type": "integer", "format": "int32", "description": "Specifies the chain ID of the contract. Must be a [supported chain](/development/chains).", "example": 80002 }, "address": { "type": "string", "description": "Specifies the address of the contract.", "example": "0x742e6e61d760164d56f44801054bcf40fa821d97" }, "abi": { "items": { "$ref": "#/components/schemas/Abi" }, "type": "array", "description": "Specifies the ABI of the contract.", "example": [ { "inputs": [ { "internalType": "address", "name": "_owner", "type": "address" } ], "stateMutability": "nonpayable", "type": "constructor" }, { "inputs": [], "name": "owner", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" } ] }, "publicVerification": { "type": "boolean", "description": "Specifies whether to verify the contract publicly.", "example": false } }, "required": [ "name", "chainId", "address" ], "type": "object", "additionalProperties": false }, "UpdateContractRequest": { "properties": { "name": { "type": "string", "description": "Specifies the name of the contract (Only for display purposes).", "example": "NFT Contract" }, "chainId": { "type": "integer", "format": "int32", "description": "Specifies the chain ID of the contract. Must be a [supported chain](/development/chains).", "example": 80002 }, "deleted": { "type": "boolean", "description": "Specifies whether to delete the contract.", "example": false }, "address": { "type": "string", "description": "Specifies the address of the contract.", "example": "0x1234567890abcdef1234567890abcdef12345678" }, "abi": { "items": { "$ref": "#/components/schemas/Abi" }, "type": "array", "description": "Specifies the ABI of the contract.", "example": [ { "inputs": [ { "internalType": "address", "name": "_owner", "type": "address" } ], "stateMutability": "nonpayable", "type": "constructor" }, { "inputs": [], "name": "owner", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" } ] }, "publicVerification": { "type": "boolean", "description": "Specifies whether to verify the contract publicly.", "example": false } }, "type": "object", "additionalProperties": false }, "EntityType.READCONTRACT": { "enum": [ "readContract" ], "type": "string" }, "ContractReadResponse": { "properties": { "id": { "type": "string" }, "object": { "$ref": "#/components/schemas/EntityType.READCONTRACT" }, "createdAt": { "type": "integer", "format": "int32" }, "functionName": { "type": "string" }, "result": {} }, "required": [ "id", "object", "createdAt", "functionName", "result" ], "type": "object", "additionalProperties": false }, "ContractReadQueries": { "properties": { "functionName": { "type": "string", "description": "The function name of the contract.", "example": "mint" }, "functionArgs": { "items": {}, "type": "array", "description": "The function arguments of the contract, in string format. Accepts pla_, con_ and acc_ IDs.", "example": [ "0x662D24Bf7Ea2dD6a7D0935F680a6056b94fE934d" ] } }, "required": [ "functionName" ], "type": "object", "additionalProperties": false }, "ContractDeleteResponse": { "properties": { "id": { "type": "string" }, "object": { "$ref": "#/components/schemas/EntityType.CONTRACT" }, "deleted": { "type": "boolean" } }, "required": [ "id", "object", "deleted" ], "type": "object", "additionalProperties": false }, "AccountResponse": { "properties": { "id": { "type": "string" }, "object": { "$ref": "#/components/schemas/EntityType.ACCOUNT" }, "createdAt": { "type": "integer", "format": "int32" }, "address": { "type": "string" }, "ownerAddress": { "type": "string" }, "deployed": { "type": "boolean" }, "custodial": { "type": "boolean" }, "embeddedSigner": { "type": "boolean" }, "chainId": { "type": "integer", "format": "int32", "description": "The chain ID." }, "accountType": { "type": "string" }, "pendingOwnerAddress": { "type": "string" }, "transactionIntents": { "items": { "anyOf": [ { "$ref": "#/components/schemas/TransactionIntent" }, { "$ref": "#/components/schemas/EntityIdResponse" } ] }, "type": "array" }, "player": { "anyOf": [ { "$ref": "#/components/schemas/EntityIdResponse" }, { "$ref": "#/components/schemas/Player" } ] } }, "required": [ "id", "object", "createdAt", "address", "ownerAddress", "deployed", "custodial", "embeddedSigner", "chainId", "accountType", "player" ], "type": "object", "additionalProperties": false }, "AccountListResponse": { "properties": { "object": { "$ref": "#/components/schemas/ResponseType.LIST" }, "url": { "type": "string" }, "data": { "items": { "$ref": "#/components/schemas/AccountResponse" }, "type": "array" }, "start": { "type": "integer", "format": "int32" }, "end": { "type": "integer", "format": "int32" }, "total": { "type": "integer", "format": "int32" } }, "required": [ "object", "url", "data", "start", "end", "total" ], "type": "object", "additionalProperties": false }, "AccountResponseExpandable": { "type": "string", "enum": [ "player", "transactionIntents" ], "nullable": false }, "AccountListQueries": { "properties": { "limit": { "type": "integer", "format": "int32", "description": "Specifies the maximum number of records to return.", "minimum": 1 }, "skip": { "type": "integer", "format": "int32", "description": "Specifies the offset for the first records to return.", "minimum": 0 }, "order": { "$ref": "#/components/schemas/Prisma.SortOrder", "description": "Specifies the order in which to sort the results." }, "chainId": { "type": "integer", "format": "int32", "description": "The chain ID. Must be a [supported chain](/development/chains).", "example": 80002 }, "player": { "type": "string", "description": "Specifies the unique player ID (starts with pla_)", "example": "pla_6f6c9067-89fa-4fc8-ac72-c242a268c584" }, "address": { "type": "string", "description": "Specifies the address of the account", "example": "0x9590Ed0C18190a310f4e93CAccc4CC17270bED40" }, "expand": { "items": { "$ref": "#/components/schemas/AccountResponseExpandable" }, "type": "array", "description": "Specifies the fields to expand in the response.", "example": [ "transactionIntents" ] } }, "type": "object", "additionalProperties": false }, "CreateAccountRequest": { "properties": { "chainId": { "type": "integer", "format": "int32", "description": "The chain ID. Must be a [supported chain](/development/chains).", "example": 80002 }, "externalOwnerAddress": { "type": "string", "description": "Use this parameter to create a new Account for Player with the provided owner address.", "example": "0x662D24Bf7Ea2dD6a7D0935F680a6056b94fE934d" }, "accountType": { "type": "string", "description": "The type of smart account that will be created (e.g. UpgradeableV6, UpgradeableV5, ZKSyncUpgradeableV2). Defaults to UpgradeableV6.", "example": "UpgradeableV6" }, "defaultGuardian": { "type": "boolean", "description": "For account types that support social recovery, wether to enable Openfort as guardian or not. Defaults to false.", "example": "true" }, "player": { "type": "string", "description": "ID of the player this account belongs to (starts with `pla_`). If none is provided, a new player will be created.", "example": "pla_e0b84653-1741-4a3d-9e91-2b0fd2942f60" } }, "required": [ "chainId" ], "type": "object", "additionalProperties": false }, "TransferOwnershipRequest": { "properties": { "newOwnerAddress": { "type": "string", "description": "The address of the new owner", "example": "0x1234567890abcdef1234567890abcdef12345678" }, "policy": { "type": "string", "description": "ID of the Policy that defines the gas sponsorship strategy (starts with `pol_`). A policy must be provided.", "example": "pol_7e07ae30-2a4d-48fa-803f-361da94905dd" } }, "required": [ "newOwnerAddress", "policy" ], "type": "object", "additionalProperties": false }, "CancelTransferOwnershipRequest": { "properties": { "policy": { "type": "string", "description": "ID of the Policy that defines the gas sponsorship strategy (starts with `pol_`). A policy must be provided.", "example": "pol_7e07ae30-2a4d-48fa-803f-361da94905dd" } }, "required": [ "policy" ], "type": "object", "additionalProperties": false }, "DeployRequest": { "properties": { "policy": { "type": "string", "description": "The policy ID (starts with pol_)", "example": "pol_7e07ae30-2a4d-48fa-803f-361da94905dd" } }, "required": [ "policy" ], "type": "object", "additionalProperties": false }, "StartRecoveryRequest": { "properties": { "newOwnerAddress": { "type": "string", "description": "Address of the new owner", "example": "0x662D24Bf7Ea2dD6a7D0935F680a6056b94fE934d" }, "policy": { "type": "string", "description": "The policy ID (starts with pol_)", "example": "pol_7e07ae30-2a4d-48fa-803f-361da94905dd" } }, "required": [ "newOwnerAddress", "policy" ], "type": "object", "additionalProperties": false }, "CompleteRecoveryRequest": { "properties": { "newOwnerAddress": { "type": "string", "description": "Address of the new owner", "example": "0x662D24Bf7Ea2dD6a7D0935F680a6056b94fE934d" }, "signatures": { "items": { "type": "string" }, "type": "array", "description": "Signatures by the guardians", "example": [ "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef", "0x1223567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef" ] }, "policy": { "type": "string", "description": "The policy ID (starts with pol_)", "example": "pol_7e07ae30-2a4d-48fa-803f-361da94905dd" } }, "required": [ "newOwnerAddress", "policy" ], "type": "object", "additionalProperties": false }, "AuthProviderResponseV2": { "type": "string", "enum": [ "credential", "email", "wallet", "google", "apple", "twitter", "discord", "facebook", "custom", "oidc", "siwe" ] }, "LinkedAccountResponseV2": { "properties": { "provider": { "$ref": "#/components/schemas/AuthProviderResponseV2" }, "createdAt": { "type": "number", "format": "double" }, "updatedAt": { "type": "number", "format": "double" }, "accountId": { "type": "string" }, "chainType": { "type": "string" }, "connectorType": { "type": "string" }, "walletClientType": { "type": "string" } }, "required": [ "provider", "createdAt", "updatedAt" ], "type": "object", "additionalProperties": false }, "AuthUserResponse": { "properties": { "id": { "type": "string" }, "createdAt": { "type": "number", "format": "double" }, "name": { "type": "string" }, "email": { "type": "string", "nullable": true }, "emailVerified": { "type": "boolean" }, "phoneNumber": { "type": "string", "nullable": true }, "phoneNumberVerified": { "type": "boolean" }, "isAnonymous": { "type": "boolean" }, "linkedAccounts": { "items": { "$ref": "#/components/schemas/LinkedAccountResponseV2" }, "type": "array" } }, "required": [ "id", "createdAt", "name", "email", "emailVerified", "phoneNumber", "phoneNumberVerified", "linkedAccounts" ], "type": "object", "additionalProperties": false }, "BaseEntityListResponse_AuthUserResponse_": { "properties": { "object": { "$ref": "#/components/schemas/ResponseType.LIST" }, "url": { "type": "string" }, "data": { "items": { "$ref": "#/components/schemas/AuthUserResponse" }, "type": "array" }, "start": { "type": "integer", "format": "int32" }, "end": { "type": "integer", "format": "int32" }, "total": { "type": "integer", "format": "int32" } }, "required": [ "object", "url", "data", "start", "end", "total" ], "type": "object", "additionalProperties": false }, "UserListResponse": { "$ref": "#/components/schemas/BaseEntityListResponse_AuthUserResponse_" }, "UserListQueries": { "properties": { "limit": { "type": "integer", "format": "int32", "description": "Specifies the maximum number of records to return.", "minimum": 1 }, "skip": { "type": "integer", "format": "int32", "description": "Specifies the offset for the first records to return.", "minimum": 0 }, "order": { "$ref": "#/components/schemas/Prisma.SortOrder", "description": "Specifies the order in which to sort the results." }, "name": { "type": "string", "description": "Filter by user name.", "example": "John" }, "externalUserId": { "type": "string", "description": "Filter by external user ID.", "example": "123454456687897" } }, "type": "object", "additionalProperties": false }, "BaseDeleteEntityResponse_EntityType.PLAYER_": { "properties": { "id": { "type": "string" }, "object": { "$ref": "#/components/schemas/EntityType.PLAYER" }, "deleted": { "type": "boolean" } }, "required": [ "id", "object", "deleted" ], "type": "object", "additionalProperties": false }, "UserDeleteResponse": { "$ref": "#/components/schemas/BaseDeleteEntityResponse_EntityType.PLAYER_" }, "SmartAccountData": { "properties": { "implementationType": { "type": "string" }, "factoryAddress": { "type": "string" }, "implementationAddress": { "type": "string" }, "salt": { "type": "string" }, "deployedTx": { "type": "string" }, "deployedAt": { "type": "number", "format": "double" }, "active": { "type": "boolean" } }, "required": [ "implementationType", "implementationAddress", "active" ], "type": "object", "additionalProperties": false }, "PasskeyEnv": { "properties": { "name": { "type": "string" }, "os": { "type": "string" }, "osVersion": { "type": "string" }, "device": { "type": "string" } }, "type": "object", "additionalProperties": false }, "RecoveryMethodDetails": { "properties": { "passkeyId": { "type": "string" }, "passkeyEnv": { "$ref": "#/components/schemas/PasskeyEnv" } }, "type": "object", "additionalProperties": false }, "PregenerateAccountResponse": { "properties": { "id": { "type": "string" }, "user": { "type": "string" }, "accountType": { "type": "string" }, "address": { "type": "string" }, "ownerAddress": { "type": "string" }, "chainType": { "type": "string" }, "chainId": { "type": "number", "format": "double" }, "createdAt": { "type": "number", "format": "double" }, "updatedAt": { "type": "number", "format": "double" }, "smartAccount": { "$ref": "#/components/schemas/SmartAccountData" }, "recoveryMethod": { "type": "string" }, "recoveryMethodDetails": { "$ref": "#/components/schemas/RecoveryMethodDetails" }, "recoveryShare": { "type": "string", "description": "The recovery share for the user's embedded signer.\nThis should be stored securely and provided to the user for account recovery." } }, "required": [ "id", "user", "accountType", "address", "chainType", "createdAt", "updatedAt", "recoveryShare" ], "type": "object", "additionalProperties": false }, "ThirdPartyOAuthProvider": { "description": "Enum of the supporting third party auth providers.", "enum": [ "accelbyte", "firebase", "lootlocker", "playfab", "supabase", "custom", "oidc", "better-auth" ], "type": "string" }, "PregenerateUserRequestV2": { "properties": { "email": { "type": "string", "description": "The email address of the user to pregenerate.\nRequired if thirdPartyUserId is not provided.", "example": "user@example.com" }, "thirdPartyUserId": { "type": "string", "description": "The third-party user ID from an external auth provider (Firebase, Supabase, etc.).\nRequired if email is not provided.", "example": "firebase_uid_abc123" }, "thirdPartyProvider": { "$ref": "#/components/schemas/ThirdPartyOAuthProvider", "description": "The third-party auth provider. Required when thirdPartyUserId is provided.", "example": "firebase" }, "accountType": { "type": "string", "enum": [ "Externally Owned Account", "Smart Account", "Delegated Account" ], "description": "The type of account to pregenerate. \"Externally Owned Account\", \"Smart Account\" or \"Delegated Account\".\nDefaults to \"Smart Account\".", "example": "Smart Account" }, "chainType": { "type": "string", "enum": [ "EVM", "SVM" ], "description": "The chain type. \"EVM\" or \"SVM\". Defaults to \"EVM\".", "example": "EVM" }, "chainId": { "type": "integer", "format": "int32", "description": "The chain ID. Required for Smart Account and Delegated Account types.\nMust be a [supported chain](/development/chains).", "example": 137 }, "implementationType": { "type": "string", "description": "The implementation type for Smart Account or Delegated Account (e.g. Calibur, UpgradeableV6).\nRequired for Smart Account and Delegated Account types.", "example": "Calibur" } }, "type": "object", "additionalProperties": false }, "RecoverV2Response": { "properties": { "id": { "type": "string" }, "account": { "type": "string" }, "signerAddress": { "type": "string" }, "signer": { "type": "string" }, "share": { "type": "string" }, "isPrimary": { "type": "boolean" }, "createdAt": { "type": "string", "format": "date-time" }, "user": { "type": "string" } }, "required": [ "id", "account", "signerAddress", "signer", "share", "isPrimary", "createdAt", "user" ], "type": "object", "additionalProperties": false }, "RecoverV2EmbeddedRequest": { "properties": { "account": { "type": "string" } }, "required": [ "account" ], "type": "object", "additionalProperties": false }, "RegisterEmbeddedV2Request": { "properties": { "account": { "type": "string" }, "share": { "type": "string" } }, "required": [ "account", "share" ], "type": "object", "additionalProperties": false }, "CreateEmbeddedRequest": { "properties": { "accountType": { "type": "string", "enum": [ "Externally Owned Account", "Smart Account", "Delegated Account" ], "description": "The type of smart account that will be created. \"Externally Owned Account\", \"Smart Account\" or \"Delegated Account\".", "example": "Externally Owned Account" }, "chainType": { "type": "string", "enum": [ "EVM", "SVM" ], "description": "The chain type. \"EVM\" or \"SVM\".", "example": "EVM" }, "address": { "type": "string", "description": "The wallet address. For EOA: the EOA address. For Smart Account: the owner address (EOA will be created with this address). For Delegated Account: the address for both EOA and Delegated Account.", "example": "0x662D24Bf7Ea2dD6a7D0935F680a6056b94fE934d" }, "chainId": { "type": "integer", "format": "int32", "description": "The chain ID. Must be a [supported chain](/development/chains). Required for Smart Account and Delegated Account types.", "example": 80002 }, "share": { "type": "string", "description": "Specifies the share repositories. Required for creating embedded accounts.", "example": "7d526b7e99fbf52850a183..." }, "signerUuid": { "type": "string" }, "implementationType": { "type": "string", "description": "The type of smart account that will be created (e.g. UpgradeableV6, UpgradeableV5, Calibur, Simple). Defaults to UpgradeableV6 in mainnets. Must support EIP-7702 for Delegated Accounts.", "example": "UpgradeableV6" } }, "required": [ "accountType", "chainType", "address" ], "type": "object", "additionalProperties": false }, "BackendWalletResponse": { "description": "Backend wallet details response.", "properties": { "object": { "type": "string", "enum": [ "backendWallet" ], "nullable": false, "description": "The type of object." }, "id": { "type": "string", "description": "The wallet ID (starts with `acc_`).", "example": "acc_e0b84653-1741-4a3d-9e91-2b0fd2942f60" }, "address": { "type": "string", "description": "The wallet address.", "example": "0x742d35Cc6634C0532925a3b844Bc454e4438f44e" }, "chainType": { "type": "string", "enum": [ "EVM", "SVM" ], "description": "The chain type the wallet is associated with.", "example": "EVM" }, "name": { "type": "string", "description": "Optional name for the wallet.", "example": "Treasury Wallet" }, "createdAt": { "type": "integer", "format": "int32", "description": "Creation timestamp (Unix epoch seconds)." }, "updatedAt": { "type": "integer", "format": "int32", "description": "Last updated timestamp (Unix epoch seconds)." } }, "required": [ "object", "id", "address", "chainType", "createdAt", "updatedAt" ], "type": "object", "additionalProperties": false }, "BackendWalletListResponse": { "description": "List of backend wallets response.", "properties": { "object": { "type": "string", "enum": [ "list" ], "nullable": false, "description": "The type of object." }, "url": { "type": "string", "description": "API endpoint URL." }, "data": { "items": { "$ref": "#/components/schemas/BackendWalletResponse" }, "type": "array", "description": "List of backend wallets." }, "start": { "type": "integer", "format": "int32", "description": "Starting index." }, "end": { "type": "integer", "format": "int32", "description": "Ending index." }, "total": { "type": "integer", "format": "int32", "description": "Total number of wallets." } }, "required": [ "object", "url", "data", "start", "end", "total" ], "type": "object", "additionalProperties": false }, "BackendWalletListQueries": { "description": "Query parameters for listing backend wallets.", "properties": { "limit": { "type": "integer", "format": "int32", "description": "Number of wallets to return (default: 10, max: 100).", "example": 10 }, "skip": { "type": "integer", "format": "int32", "description": "Number of wallets to skip (for pagination).", "example": 0 }, "chainType": { "type": "string", "enum": [ "EVM", "SVM" ], "description": "Filter by chain type.", "example": "EVM" }, "address": { "type": "string", "description": "Filter by wallet address.", "example": "0x742d35Cc6634C0532925a3b844Bc454e4438f44e" }, "name": { "type": "string", "description": "Filter by wallet name.", "example": "Treasury Wallet" }, "wallet": { "type": "string", "description": "Filter by associated wallet ID (starts with `pla_`).", "example": "pla_e0b84653-1741-4a3d-9e91-2b0fd2942f60" } }, "type": "object", "additionalProperties": false }, "CreateBackendWalletResponse": { "description": "Response from creating a new backend wallet account.", "properties": { "object": { "type": "string", "enum": [ "account" ], "nullable": false, "description": "The type of object." }, "id": { "type": "string", "description": "The created account ID (starts with `acc_`).", "example": "acc_e0b84653-1741-4a3d-9e91-2b0fd2942f60" }, "address": { "type": "string", "description": "The wallet address generated for this account.", "example": "0x742d35Cc6634C0532925a3b844Bc454e4438f44e" }, "chainType": { "type": "string", "enum": [ "EVM", "SVM" ], "description": "The chain type the wallet is associated with.", "example": "EVM" }, "createdAt": { "type": "integer", "format": "int32", "description": "Creation timestamp (Unix epoch seconds)." } }, "required": [ "object", "id", "address", "chainType", "createdAt" ], "type": "object", "additionalProperties": false }, "CreateBackendWalletRequest": { "description": "Request to create a new backend wallet account.", "properties": { "chainType": { "type": "string", "enum": [ "EVM", "SVM" ], "description": "The chain type for the new wallet.", "example": "EVM" }, "wallet": { "type": "string", "description": "The wallet ID to associate with this wallet (starts with `pla_`).", "example": "pla_e0b84653-1741-4a3d-9e91-2b0fd2942f60" }, "name": { "type": "string", "description": "Optional name for the wallet.", "example": "Treasury Wallet" } }, "required": [ "chainType" ], "type": "object", "additionalProperties": false }, "DeleteBackendWalletResponse": { "description": "Response from deleting a backend wallet.", "properties": { "object": { "type": "string", "enum": [ "backendWallet" ], "nullable": false, "description": "The type of object." }, "id": { "type": "string", "description": "The deleted wallet ID.", "example": "acc_e0b84653-1741-4a3d-9e91-2b0fd2942f60" }, "deleted": { "type": "boolean", "description": "Whether the wallet was deleted." } }, "required": [ "object", "id", "deleted" ], "type": "object", "additionalProperties": false }, "SignResponse": { "description": "Response from signing data via backend wallet.", "properties": { "object": { "type": "string", "enum": [ "signature" ], "nullable": false, "description": "The type of object." }, "account": { "type": "string", "description": "The account ID that signed the data (starts with `acc_`).", "example": "acc_e0b84653-1741-4a3d-9e91-2b0fd2942f60" }, "signature": { "type": "string", "description": "The signature bytes (hex-encoded).", "example": "0x1234567890abcdef..." } }, "required": [ "object", "account", "signature" ], "type": "object", "additionalProperties": false }, "SignRequest": { "description": "Request to sign data via backend wallet.", "properties": { "data": { "type": "string", "description": "The data to sign (hex-encoded transaction data or message hash).", "example": "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef" } }, "required": [ "data" ], "type": "object", "additionalProperties": false }, "ExportPrivateKeyResponse": { "description": "Response from exporting a private key with E2E encryption.", "properties": { "object": { "type": "string", "enum": [ "exportedKey" ], "nullable": false, "description": "The type of object." }, "encryptedPrivateKey": { "type": "string", "description": "The private key encrypted with RSA-OAEP SHA-256 using your ephemeral public key (base64-encoded).\nDecrypt using your ephemeral RSA private key.", "example": "base64_encrypted_data..." } }, "required": [ "object", "encryptedPrivateKey" ], "type": "object", "additionalProperties": false }, "ExportPrivateKeyRequest": { "description": "Request to export private key with E2E encryption.", "properties": { "encryptionKey": { "type": "string", "description": "Client's ephemeral RSA-4096 public key for end-to-end encryption (base64 SPKI DER format).\nThe backend wallet will encrypt the private key using RSA-OAEP SHA-256.", "example": "MIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEA..." } }, "required": [ "encryptionKey" ], "type": "object", "additionalProperties": false }, "ImportPrivateKeyResponse": { "description": "Response from importing a private key with E2E encryption.", "properties": { "object": { "type": "string", "enum": [ "account" ], "nullable": false, "description": "The type of object." }, "id": { "type": "string", "description": "The created account ID (starts with `acc_`).", "example": "acc_e0b84653-1741-4a3d-9e91-2b0fd2942f60" }, "address": { "type": "string", "description": "The wallet address derived from the imported private key.", "example": "0x742d35Cc6634C0532925a3b844Bc454e4438f44e" }, "chainType": { "type": "string", "enum": [ "EVM", "SVM" ], "description": "The chain type the wallet is associated with.", "example": "EVM" }, "createdAt": { "type": "integer", "format": "int32", "description": "Creation timestamp (Unix epoch seconds)." } }, "required": [ "object", "id", "address", "createdAt" ], "type": "object", "additionalProperties": false }, "ImportPrivateKeyRequest": { "description": "Request to import private key with E2E encryption.", "properties": { "encryptedPrivateKey": { "type": "string", "description": "The private key encrypted with RSA-OAEP SHA-256 using the server's static import public key.\nObtain the server's import public key out-of-band (e.g., from SDK or documentation).", "example": "base64_encrypted_data..." }, "chainType": { "type": "string", "enum": [ "EVM", "SVM" ], "description": "The chain type for the imported wallet.", "example": "EVM" }, "wallet": { "type": "string", "description": "The wallet ID to associate with this wallet (starts with `pla_`).", "example": "pla_e0b84653-1741-4a3d-9e91-2b0fd2942f60" }, "name": { "type": "string", "description": "Optional name for the imported wallet.", "example": "Treasury Wallet" } }, "required": [ "encryptedPrivateKey" ], "type": "object", "additionalProperties": false }, "RegisterWalletSecretResponse": { "description": "Response from registering a new wallet secret.", "properties": { "object": { "type": "string", "enum": [ "walletSecret" ], "nullable": false, "description": "The type of object." }, "keyId": { "type": "string", "description": "The key ID for the registered secret.", "example": "ws_1234567890" }, "registeredAt": { "type": "integer", "format": "int32", "description": "Timestamp when the secret was registered (Unix epoch seconds)." } }, "required": [ "object", "keyId", "registeredAt" ], "type": "object", "additionalProperties": false }, "RegisterWalletSecretRequest": { "description": "Request to register a new wallet secret (authentication key).", "properties": { "publicKey": { "type": "string", "description": "ECDSA P-256 public key for wallet authentication (PEM or raw hex format).\nThis will be used to verify X-Wallet-Auth JWT signatures.", "example": "-----BEGIN PUBLIC KEY-----\nMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE..." }, "keyId": { "type": "string", "description": "Key identifier for the secret.\nUsed to identify this key in X-Wallet-Auth JWT headers.", "example": "ws_1234567890" } }, "required": [ "publicKey" ], "type": "object", "additionalProperties": false }, "RevokeWalletSecretResponse": { "description": "Response from revoking a wallet secret.", "properties": { "object": { "type": "string", "enum": [ "walletSecretRevocation" ], "nullable": false, "description": "The type of object." }, "keyId": { "type": "string", "description": "The key ID of the revoked secret.", "example": "ws_1234567890" }, "revoked": { "type": "boolean", "description": "Whether the secret was successfully revoked." }, "revokedAt": { "type": "integer", "format": "int32", "description": "Timestamp when the secret was revoked (Unix epoch seconds)." } }, "required": [ "object", "keyId", "revoked", "revokedAt" ], "type": "object", "additionalProperties": false }, "RevokeWalletSecretRequest": { "description": "Request to revoke a wallet secret (authentication key).", "properties": { "keyId": { "type": "string", "description": "Key identifier of the secret to revoke.", "example": "ws_1234567890" } }, "required": [ "keyId" ], "type": "object", "additionalProperties": false }, "RotateWalletSecretResponse": { "description": "Response from rotating a wallet secret.", "properties": { "object": { "type": "string", "enum": [ "walletSecretRotation" ], "nullable": false, "description": "The type of object." }, "success": { "type": "boolean", "description": "Whether the rotation was successful." }, "rotatedAt": { "type": "integer", "format": "int32", "description": "Timestamp when the rotation occurred (Unix epoch seconds)." } }, "required": [ "object", "success", "rotatedAt" ], "type": "object", "additionalProperties": false }, "RotateWalletSecretRequest": { "description": "Request to rotate wallet secret (authentication key).", "properties": { "newSecretPublicKey": { "type": "string", "description": "New ECDSA P-256 public key for wallet authentication.\nThis will replace the current wallet secret used for X-Wallet-Auth JWT signing.", "example": "04abc123def456..." }, "newKeyId": { "type": "string", "description": "Key identifier for the new secret.\nUsed to identify this key in X-Wallet-Auth JWT headers.", "example": "ws_1234567890" } }, "required": [ "newSecretPublicKey" ], "type": "object", "additionalProperties": false }, "AccountV2Response": { "properties": { "id": { "type": "string" }, "user": { "type": "string" }, "accountType": { "type": "string" }, "address": { "type": "string" }, "ownerAddress": { "type": "string" }, "chainType": { "type": "string" }, "chainId": { "type": "number", "format": "double" }, "createdAt": { "type": "number", "format": "double" }, "updatedAt": { "type": "number", "format": "double" }, "smartAccount": { "$ref": "#/components/schemas/SmartAccountData" }, "recoveryMethod": { "type": "string" }, "recoveryMethodDetails": { "$ref": "#/components/schemas/RecoveryMethodDetails" } }, "required": [ "id", "user", "accountType", "address", "chainType", "createdAt", "updatedAt" ], "type": "object", "additionalProperties": false }, "BaseEntityListResponse_AccountV2Response_": { "properties": { "object": { "$ref": "#/components/schemas/ResponseType.LIST" }, "url": { "type": "string" }, "data": { "items": { "$ref": "#/components/schemas/AccountV2Response" }, "type": "array" }, "start": { "type": "integer", "format": "int32" }, "end": { "type": "integer", "format": "int32" }, "total": { "type": "integer", "format": "int32" } }, "required": [ "object", "url", "data", "start", "end", "total" ], "type": "object", "additionalProperties": false }, "AccountListV2Response": { "$ref": "#/components/schemas/BaseEntityListResponse_AccountV2Response_" }, "AccountListQueriesV2": { "properties": { "limit": { "type": "integer", "format": "int32", "description": "Specifies the maximum number of records to return.", "minimum": 1 }, "skip": { "type": "integer", "format": "int32", "description": "Specifies the offset for the first records to return.", "minimum": 0 }, "order": { "$ref": "#/components/schemas/Prisma.SortOrder", "description": "Specifies the order in which to sort the results." }, "chainId": { "type": "integer", "format": "int32", "description": "The chain ID. Must be a [supported chain](/development/chains).", "example": 80002 }, "user": { "type": "string", "description": "Specifies the unique user ID (starts with pla_)", "example": "pla_6f6c9067-89fa-4fc8-ac72-c242a268c584" }, "chainType": { "type": "string", "enum": [ "EVM", "SVM" ], "description": "The chain type. Must be either \"EVM\" or \"SVM\".", "example": "EVM" }, "accountType": { "type": "string", "enum": [ "Externally Owned Account", "Smart Account", "Delegated Account" ], "description": "Specifies the type of account. Must be either \"Smart Account\" or \"Externally Owned Account\".", "example": "Smart Account" }, "address": { "type": "string", "description": "Specifies the account address", "example": "0xf7b4c54cca21cccf42796502bf94e2838fbd44c4" } }, "type": "object", "additionalProperties": false }, "SignerIdResponse": { "properties": { "id": { "type": "string" } }, "required": [ "id" ], "type": "object", "additionalProperties": false }, "SwitchChainQueriesV2": { "properties": { "account": { "type": "string", "description": "The account ID (starts with acc_)" }, "chainId": { "type": "integer", "format": "int32", "description": "The target chain ID. Must be a [supported chain](/development/chains).", "example": 80002 } }, "required": [ "account", "chainId" ], "type": "object", "additionalProperties": false }, "CreateAccountRequestV2": { "properties": { "accountType": { "type": "string", "enum": [ "Externally Owned Account", "Smart Account", "Delegated Account" ], "description": "The type of smart account that will be created. \"Externally Owned Account\", \"Smart Account\" or \"Delegated Account\".", "example": "Externally Owned Account" }, "chainType": { "type": "string", "enum": [ "EVM", "SVM" ], "description": "The chain type. \"EVM\" or \"SVM\".", "example": "EVM" }, "address": { "type": "string" }, "implementationType": { "type": "string", "description": "The type of smart account that will be created (e.g. UpgradeableV6, UpgradeableV5, Calibur). Defaults to UpgradeableV6 in mainnets.", "example": "UpgradeableV6" }, "chainId": { "type": "integer", "format": "int32", "description": "The chain ID. Must be a [supported chain](/development/chains).", "example": 80002 }, "user": { "type": "string", "description": "ID of the user this account belongs to (starts with `pla_`). If none is provided, a new user will be created.", "example": "pla_e0b84653-1741-4a3d-9e91-2b0fd2942f60" }, "account": { "type": "string", "description": "ID of the account (starts with `acc_`) to be linked with. Required for accountType \"Smart Account\".", "example": "acc_e0b84653-1741-4a3d-9e91-2b0fd2942f60" } }, "required": [ "accountType", "chainType", "user" ], "type": "object", "additionalProperties": false }, "DeleteAccountResponse": { "properties": { "id": { "type": "string" }, "object": { "$ref": "#/components/schemas/EntityType.ACCOUNT" }, "deleted": { "type": "boolean" } }, "required": [ "id", "object", "deleted" ], "type": "object", "additionalProperties": false }, "UserProjectRole": { "enum": [ "OWNER", "ADMIN", "MEMBER" ], "type": "string" }, "EntityType.USER": { "enum": [ "user" ], "type": "string" }, "UserProjectResponse": { "properties": { "id": { "type": "string" }, "object": { "$ref": "#/components/schemas/EntityType.USER" }, "createdAt": { "type": "integer", "format": "int32" }, "updatedAt": { "type": "integer", "format": "int32" }, "firstName": { "type": "string" }, "lastName": { "type": "string" }, "role": { "$ref": "#/components/schemas/UserProjectRole" }, "email": { "type": "string" } }, "required": [ "id", "object", "createdAt", "updatedAt", "firstName", "lastName", "role", "email" ], "type": "object", "additionalProperties": false }, "UserProjectListResponse": { "properties": { "object": { "$ref": "#/components/schemas/ResponseType.LIST" }, "url": { "type": "string" }, "data": { "items": { "$ref": "#/components/schemas/UserProjectResponse" }, "type": "array" }, "start": { "type": "integer", "format": "int32" }, "end": { "type": "integer", "format": "int32" }, "total": { "type": "integer", "format": "int32" } }, "required": [ "object", "url", "data", "start", "end", "total" ], "type": "object", "additionalProperties": false }, "UserProjectRole.ADMIN": { "enum": [ "ADMIN" ], "type": "string" }, "UserProjectRole.MEMBER": { "enum": [ "MEMBER" ], "type": "string" }, "UserProjectCreateRequest": { "properties": { "role": { "anyOf": [ { "$ref": "#/components/schemas/UserProjectRole.ADMIN" }, { "$ref": "#/components/schemas/UserProjectRole.MEMBER" } ], "description": "The role of the user.", "example": "MEMBER" }, "email": { "type": "string", "description": "The email of the user to add.", "example": "name@company.com" } }, "required": [ "email" ], "type": "object", "additionalProperties": false }, "UserProjectUpdateRequest": { "properties": { "role": { "anyOf": [ { "$ref": "#/components/schemas/UserProjectRole.MEMBER" }, { "$ref": "#/components/schemas/UserProjectRole.ADMIN" } ], "description": "The role of the user.", "example": "MEMBER" } }, "required": [ "role" ], "type": "object", "additionalProperties": false }, "UserProjectDeleteResponse": { "properties": { "id": { "type": "string" }, "object": { "$ref": "#/components/schemas/EntityType.USER" }, "deleted": { "type": "boolean" } }, "required": [ "id", "object", "deleted" ], "type": "object", "additionalProperties": false }, "ApiKeyResponse": { "properties": { "id": { "type": "integer", "format": "int32" }, "createdAt": { "type": "integer", "format": "int32" }, "token": { "type": "string" }, "name": { "type": "string" }, "livemode": { "type": "boolean" } }, "required": [ "id", "createdAt", "token", "name", "livemode" ], "type": "object", "additionalProperties": false }, "WebhookResponse": { "properties": { "webhook": { "type": "string", "nullable": true }, "livemode": { "type": "boolean" } }, "required": [ "webhook", "livemode" ], "type": "object", "additionalProperties": false }, "EntityType.PROJECT": { "enum": [ "project" ], "type": "string" }, "ChildProjectResponse": { "properties": { "id": { "type": "string" }, "object": { "$ref": "#/components/schemas/EntityType.PROJECT" }, "createdAt": { "type": "integer", "format": "int32" }, "name": { "type": "string" } }, "required": [ "id", "object", "createdAt", "name" ], "type": "object", "additionalProperties": false }, "ChildProjectListResponse": { "properties": { "object": { "$ref": "#/components/schemas/ResponseType.LIST" }, "url": { "type": "string" }, "data": { "items": { "$ref": "#/components/schemas/ChildProjectResponse" }, "type": "array" }, "start": { "type": "integer", "format": "int32" }, "end": { "type": "integer", "format": "int32" }, "total": { "type": "integer", "format": "int32" } }, "required": [ "object", "url", "data", "start", "end", "total" ], "type": "object", "additionalProperties": false }, "ProjectResponse": { "properties": { "id": { "type": "string" }, "object": { "$ref": "#/components/schemas/EntityType.PROJECT" }, "createdAt": { "type": "integer", "format": "int32" }, "updatedAt": { "type": "integer", "format": "int32" }, "name": { "type": "string" }, "apikeys": { "items": { "$ref": "#/components/schemas/ApiKeyResponse" }, "type": "array" }, "webhook": { "items": { "$ref": "#/components/schemas/WebhookResponse" }, "type": "array" }, "parentProject": { "type": "string" }, "childProjects": { "$ref": "#/components/schemas/ChildProjectListResponse" }, "isV2": { "type": "boolean" } }, "required": [ "id", "object", "createdAt", "updatedAt", "name", "isV2" ], "type": "object", "additionalProperties": false }, "ProjectListResponse": { "properties": { "object": { "$ref": "#/components/schemas/ResponseType.LIST" }, "url": { "type": "string" }, "data": { "items": { "$ref": "#/components/schemas/ProjectResponse" }, "type": "array" }, "start": { "type": "integer", "format": "int32" }, "end": { "type": "integer", "format": "int32" }, "total": { "type": "integer", "format": "int32" } }, "required": [ "object", "url", "data", "start", "end", "total" ], "type": "object", "additionalProperties": false }, "TransactionStat": { "properties": { "timestamp": { "type": "string" }, "total": { "type": "integer", "format": "int32" }, "successful": { "type": "number", "format": "double" }, "gasUsed": { "type": "string" } }, "required": [ "timestamp", "total", "successful", "gasUsed" ], "type": "object", "additionalProperties": false }, "Stat": { "properties": { "timestamp": { "type": "string" }, "total": { "type": "integer", "format": "int32" } }, "required": [ "timestamp", "total" ], "type": "object", "additionalProperties": false }, "DeviceStat": { "$ref": "#/components/schemas/Stat" }, "ProjectStatsResponse": { "properties": { "transactionIntents": { "items": { "$ref": "#/components/schemas/TransactionStat" }, "type": "array" }, "devices": { "items": { "$ref": "#/components/schemas/DeviceStat" }, "type": "array" } }, "required": [ "transactionIntents", "devices" ], "type": "object", "additionalProperties": false }, "ProjectStatsRequest": { "properties": { "timeFrame": { "type": "string", "enum": [ "day", "week", "month", "all" ] } }, "required": [ "timeFrame" ], "type": "object", "additionalProperties": false }, "Plan": { "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "price": { "type": "number", "format": "double" }, "is_current": { "type": "boolean" }, "change_type": { "type": "string", "enum": [ "upgrade", "downgrade", "none" ] }, "legacy": { "type": "boolean" } }, "required": [ "id", "name", "price", "is_current", "change_type" ], "type": "object", "additionalProperties": false }, "PlansResponse": { "properties": { "plans": { "items": { "$ref": "#/components/schemas/Plan" }, "type": "array" } }, "required": [ "plans" ], "type": "object", "additionalProperties": false }, "BillingSubscriptionResponse": { "properties": { "currentPeriodEnd": { "type": "string", "format": "date-time" }, "currentPeriodStart": { "type": "string", "format": "date-time" }, "canceledAt": { "type": "string", "format": "date-time" }, "plan": { "properties": { "price": { "type": "number", "format": "double" }, "name": { "type": "string" }, "id": { "type": "string" } }, "required": [ "price", "name", "id" ], "type": "object" } }, "required": [ "plan" ], "type": "object", "additionalProperties": false }, "PrivateKeyPolicy": { "enum": [ "INDIVIDUAL", "PROJECT" ], "type": "string" }, "CreateProjectRequest": { "properties": { "name": { "type": "string", "description": "Name of the project.", "example": "My Project", "minLength": 1, "maxLength": 256 }, "pkPolicy": { "$ref": "#/components/schemas/PrivateKeyPolicy", "description": "The private key policyfor the project.", "example": "PROJECT" } }, "required": [ "name" ], "type": "object", "additionalProperties": false }, "UpdateProjectRequest": { "properties": { "name": { "type": "string", "description": "Name of the project.", "example": "My Project", "minLength": 1, "maxLength": 256 } }, "required": [ "name" ], "type": "object", "additionalProperties": false }, "AllowedOriginsResponse": { "properties": { "allowedOrigins": { "items": { "type": "string" }, "type": "array" } }, "required": [ "allowedOrigins" ], "type": "object", "additionalProperties": false }, "AllowedOriginsRequest": { "properties": { "allowedOrigins": { "items": { "type": "string" }, "type": "array" } }, "required": [ "allowedOrigins" ], "type": "object", "additionalProperties": false }, "EntityType.SMTP_CONFIG": { "enum": [ "smtpConfig" ], "type": "string" }, "SMTPConfigResponse": { "properties": { "user": { "type": "string" }, "pass": { "type": "string" }, "host": { "type": "string" }, "port": { "type": "number", "format": "double" }, "from": { "type": "string" }, "useSSL": { "type": "boolean" }, "object": { "$ref": "#/components/schemas/EntityType.SMTP_CONFIG" } }, "required": [ "user", "pass", "host", "port", "from", "useSSL", "object" ], "type": "object", "additionalProperties": false }, "CreateSMTPConfigResponse": { "$ref": "#/components/schemas/SMTPConfigResponse" }, "UpsertSMTPConfigRequest": { "properties": { "user": { "type": "string", "description": "Specifies the user name", "example": "user" }, "pass": { "type": "string", "description": "Specifies the password", "example": "pass" }, "host": { "type": "string", "description": "Specifies the host", "example": "host" }, "from": { "type": "string", "description": "Specifies the from", "example": "from" }, "port": { "type": "number", "format": "double", "description": "Specifies the port", "example": 0 }, "useSSL": { "type": "boolean", "description": "Specifies the use SSL", "example": true } }, "type": "object", "additionalProperties": false }, "GetSMTPConfigResponse": { "$ref": "#/components/schemas/SMTPConfigResponse" }, "DeleteSMTPConfigResponse": { "properties": { "deleted": { "type": "boolean" }, "object": { "$ref": "#/components/schemas/EntityType.SMTP_CONFIG" } }, "required": [ "deleted", "object" ], "type": "object", "additionalProperties": false }, "EmailTypeResponse": { "enum": [ "emailVerification", "passwordReset" ], "type": "string" }, "EntityType.EMAIL_SAMPLE": { "enum": [ "emailSample" ], "type": "string" }, "EmailSampleResponse": { "properties": { "id": { "type": "string" }, "object": { "$ref": "#/components/schemas/EntityType.EMAIL_SAMPLE" }, "createdAt": { "type": "integer", "format": "int32" }, "name": { "type": "string" }, "subject": { "type": "string" }, "body": { "type": "string" }, "type": { "$ref": "#/components/schemas/EmailTypeResponse" } }, "required": [ "id", "object", "createdAt", "name", "subject", "body", "type" ], "type": "object", "additionalProperties": false }, "CreateEmailSampleResponse": { "$ref": "#/components/schemas/EmailSampleResponse" }, "EmailTypeRequest": { "enum": [ "emailVerification", "passwordReset" ], "type": "string" }, "CreateEmailSampleRequest": { "properties": { "name": { "type": "string", "description": "Specifies the name", "example": "name" }, "subject": { "type": "string", "description": "Specifies the subject", "example": "subject" }, "body": { "type": "string", "description": "Specifies the body", "example": "body" }, "type": { "$ref": "#/components/schemas/EmailTypeRequest", "description": "Specifies the type", "example": "emailVerification" } }, "required": [ "name", "subject", "body", "type" ], "type": "object", "additionalProperties": false }, "GetEmailSampleResponse": { "$ref": "#/components/schemas/EmailSampleResponse" }, "BaseEntityListResponse_EmailSampleResponse_": { "properties": { "object": { "$ref": "#/components/schemas/ResponseType.LIST" }, "url": { "type": "string" }, "data": { "items": { "$ref": "#/components/schemas/EmailSampleResponse" }, "type": "array" }, "start": { "type": "integer", "format": "int32" }, "end": { "type": "integer", "format": "int32" }, "total": { "type": "integer", "format": "int32" } }, "required": [ "object", "url", "data", "start", "end", "total" ], "type": "object", "additionalProperties": false }, "EmailSampleListResponse": { "$ref": "#/components/schemas/BaseEntityListResponse_EmailSampleResponse_" }, "EmailSampleDeleteResponse": { "properties": { "deleted": { "type": "boolean" }, "id": { "type": "string" }, "object": { "$ref": "#/components/schemas/EntityType.EMAIL_SAMPLE" } }, "required": [ "deleted", "id", "object" ], "type": "object", "additionalProperties": false }, "UpdateEmailSampleResponse": { "$ref": "#/components/schemas/EmailSampleResponse" }, "UpdateEmailSampleRequest": { "properties": { "name": { "type": "string", "description": "Specifies the name", "example": "name" }, "subject": { "type": "string", "description": "Specifies the subject", "example": "subject" }, "body": { "type": "string", "description": "Specifies the body", "example": "body" }, "type": { "$ref": "#/components/schemas/EmailTypeRequest", "description": "Specifies the type", "example": "emailVerification" } }, "type": "object", "additionalProperties": false }, "EcosystemMetadata": { "properties": {}, "type": "object", "additionalProperties": { "anyOf": [ { "type": "string" }, { "type": "number", "format": "double" } ] } }, "EcosystemConfigurationResponse": { "properties": { "customDomain": { "type": "string", "description": "Subdomain of the ecosystem." }, "primaryColor": { "type": "string", "description": "Primary color of the ecosystem." }, "primaryColorForeground": { "type": "string", "description": "Primary color foreground of the ecosystem." }, "radius": { "type": "string", "description": "Radius of the ecosystem." }, "logoUrl": { "type": "string", "description": "Logo URL of the ecosystem." }, "ecosystemWalletDomains": { "items": { "type": "string" }, "type": "array", "description": "Whitelisted frontend domains of the ecosystem." }, "termsOfServiceUrl": { "type": "string", "description": "Terms of service URL", "example": "https://example.com/terms" }, "privacyPolicyUrl": { "type": "string", "description": "Privacy policy URL", "example": "https://example.com/privacy" }, "faviconUrl": { "type": "string", "description": "Favicon URL", "example": "https://example.com/favicon.ico" }, "dashboardExamples": { "items": { "$ref": "#/components/schemas/EcosystemMetadata" }, "type": "array", "description": "Examples of the ecosystem.", "example": [] }, "dashboardSDKs": { "items": { "$ref": "#/components/schemas/EcosystemMetadata" }, "type": "array", "description": "SDKs of the ecosystem.", "example": [] }, "supportEmail": { "type": "string", "description": "Support email of the ecosystem.", "example": "support@openfort.xyz" }, "documentationUrl": { "type": "string", "description": "Documentation URL of the ecosystem.", "example": "https://www.openfort.io/docs" } }, "required": [ "customDomain", "primaryColor", "primaryColorForeground", "radius", "logoUrl", "ecosystemWalletDomains" ], "type": "object", "additionalProperties": false }, "CreateEcosystemConfigurationRequest": { "properties": { "customDomain": { "type": "string", "description": "Custom domain of the ecosystem." }, "primaryColor": { "type": "string", "description": "Primary color of the ecosystem." }, "primaryColorForeground": { "type": "string", "description": "Primary color foreground of the ecosystem." }, "radius": { "type": "string", "description": "Radius of the ecosystem." }, "logoUrl": { "type": "string", "description": "Logo URL of the ecosystem." }, "ecosystemWalletDomains": { "items": { "type": "string" }, "type": "array", "description": "URLs where the ecosystem wallet is hosted." }, "termsOfServiceUrl": { "type": "string", "description": "Terms of service URL", "example": "https://example.com/terms" }, "privacyPolicyUrl": { "type": "string", "description": "Privacy policy URL", "example": "https://example.com/privacy" }, "faviconUrl": { "type": "string", "description": "Favicon URL", "example": "https://example.com/favicon.ico" }, "dashboardExamples": { "items": { "$ref": "#/components/schemas/EcosystemMetadata" }, "type": "array", "description": "Examples of the ecosystem.", "example": [] }, "dashboardSDKs": { "items": { "$ref": "#/components/schemas/EcosystemMetadata" }, "type": "array", "description": "SDKs of the ecosystem.", "example": [] }, "supportEmail": { "type": "string", "description": "Support email of the ecosystem.", "example": "support@openfort.xyz" }, "documentationUrl": { "type": "string", "description": "Documentation URL of the ecosystem.", "example": "https://www.openfort.io/docs" } }, "required": [ "customDomain", "primaryColor", "primaryColorForeground", "radius", "logoUrl" ], "type": "object", "additionalProperties": false }, "MyEcosystemResponse": { "properties": { "publishableKey": { "type": "string" }, "name": { "type": "string" }, "configuration": { "$ref": "#/components/schemas/EcosystemConfigurationResponse" } }, "required": [ "publishableKey", "name" ], "type": "object", "additionalProperties": false }, "ApiKeyType": { "enum": [ "pk", "sk", "pk_shield", "sk_shield" ], "type": "string" }, "CreateProjectApiKeyRequest": { "properties": { "type": { "$ref": "#/components/schemas/ApiKeyType", "description": "The type of the API key.", "example": "sk" } }, "required": [ "type" ], "type": "object", "additionalProperties": false }, "UpdateProjectApiKeyRequest": { "properties": { "type": { "$ref": "#/components/schemas/ApiKeyType", "description": "The type of the API key.", "example": "sk" }, "uuid": { "type": "string", "description": "The API key to update.", "example": "1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef" }, "use_for_webhooks": { "type": "boolean", "description": "Whether key to use to sign webhooks.", "example": true } }, "required": [ "type", "uuid" ], "type": "object", "additionalProperties": false }, "AuthorizedOriginsResponse": { "properties": { "origins": { "items": { "type": "string" }, "type": "array" } }, "required": [ "origins" ], "type": "object", "additionalProperties": false }, "UpdateAuthorizedOriginsRequest": { "properties": { "origins": { "items": { "type": "string" }, "type": "array" } }, "required": [ "origins" ], "type": "object", "additionalProperties": false }, "AuthorizedNetworksResponse": { "properties": { "authorizedNetworks": { "items": { "properties": { "network": { "type": "string" }, "name": { "type": "string" } }, "required": [ "network", "name" ], "type": "object" }, "type": "array" } }, "required": [ "authorizedNetworks" ], "type": "object", "additionalProperties": false }, "AuthorizedNetwork": { "properties": { "name": { "type": "string" }, "network": { "type": "string" } }, "required": [ "name", "network" ], "type": "object", "additionalProperties": false }, "UpdateAuthorizedNetworksRequest": { "properties": { "authorizedNetworks": { "items": { "$ref": "#/components/schemas/AuthorizedNetwork" }, "type": "array" } }, "required": [ "authorizedNetworks" ], "type": "object", "additionalProperties": false }, "AuthorizedAppsResponse": { "properties": { "authorizedApps": { "items": { "properties": { "appUrlScheme": { "type": "string" }, "appIdentifier": { "type": "string" }, "name": { "type": "string" } }, "required": [ "appIdentifier", "name" ], "type": "object" }, "type": "array" } }, "required": [ "authorizedApps" ], "type": "object", "additionalProperties": false }, "AuthorizedApp": { "properties": { "name": { "type": "string" }, "appIdentifier": { "type": "string" }, "appUrlScheme": { "type": "string" } }, "required": [ "name", "appIdentifier" ], "type": "object", "additionalProperties": false }, "UpdateAuthorizedAppsRequest": { "properties": { "authorizedApps": { "items": { "$ref": "#/components/schemas/AuthorizedApp" }, "type": "array" } }, "required": [ "authorizedApps" ], "type": "object", "additionalProperties": false }, "AuthProviderResponse": { "type": "string", "enum": [ "email", "wallet", "google", "apple", "twitter", "discord", "epic_games", "facebook", "accelbyte", "firebase", "lootlocker", "playfab", "supabase", "custom", "oidc" ] }, "LinkedAccountResponse": { "properties": { "provider": { "$ref": "#/components/schemas/AuthProviderResponse" }, "email": { "type": "string" }, "externalUserId": { "type": "string" }, "connectorType": { "type": "string" }, "walletClientType": { "type": "string" }, "disabled": { "type": "boolean" }, "verified": { "type": "boolean" }, "updatedAt": { "type": "number", "format": "double" }, "address": { "type": "string" }, "metadata": { "$ref": "#/components/schemas/PlayerMetadata" } }, "required": [ "provider", "disabled" ], "type": "object", "additionalProperties": false }, "Pick_PlayerResponse.id_": { "properties": { "id": { "type": "string" } }, "required": [ "id" ], "type": "object", "description": "From T, pick a set of properties whose keys are in the union K" }, "AuthPlayerResponse": { "properties": { "player": { "anyOf": [ { "$ref": "#/components/schemas/PlayerResponse" }, { "$ref": "#/components/schemas/Pick_PlayerResponse.id_" } ] }, "id": { "type": "string" }, "object": { "$ref": "#/components/schemas/EntityType.PLAYER" }, "createdAt": { "type": "integer", "format": "int32" }, "linkedAccounts": { "items": { "$ref": "#/components/schemas/LinkedAccountResponse" }, "type": "array" } }, "required": [ "id", "object", "createdAt", "linkedAccounts" ], "type": "object", "additionalProperties": false }, "AuthResponse": { "properties": { "player": { "$ref": "#/components/schemas/AuthPlayerResponse", "description": "Player's identifier." }, "token": { "type": "string", "description": "JWT access token." }, "refreshToken": { "type": "string", "description": "Refresh token." } }, "required": [ "player", "token", "refreshToken" ], "type": "object", "additionalProperties": false }, "RefreshTokenRequest": { "properties": { "refreshToken": { "type": "string", "description": "Specifies the session refresh token." }, "forceRefresh": { "type": "boolean", "description": "Specifies whether to force refresh the session.", "example": false } }, "required": [ "refreshToken" ], "type": "object", "additionalProperties": false }, "LogoutRequest": { "properties": { "refreshToken": { "type": "string", "description": "Specifies the refresh token." } }, "required": [ "refreshToken" ], "type": "object", "additionalProperties": false }, "SIWEInitResponse": { "properties": { "address": { "type": "string", "description": "The address of the player.", "example": "0x8C5cedA46A26214A52A9D7BF036Ad2F6255BdBE" }, "nonce": { "type": "string" }, "expiresAt": { "type": "number", "format": "double" } }, "required": [ "address", "nonce", "expiresAt" ], "type": "object", "additionalProperties": false }, "SIWERequest": { "properties": { "address": { "type": "string", "description": "The address of the user.", "example": "0x8C5cedA46A26214A52A9D7BF036Ad2F6255BdBEa" } }, "required": [ "address" ], "type": "object", "additionalProperties": false }, "SIWEAuthenticateRequest": { "properties": { "signature": { "type": "string", "description": "Signature of the EIP-712 message with the user's wallet.", "example": "0x1773ca2e6514a795bc9549ffbdf73909b2cd0ba8eafe52a1751c3ee8d644458701debd502ee5b5a8fca24606eee42a2cc756a04958c7c189913184d46c48783e1b" }, "message": { "type": "string", "description": "The EIP-712 message to sign.", "example": "demo.openfort.io wants you to sign in with your Ethereum account:" }, "walletClientType": { "type": "string", "description": "The wallet client of the user", "example": "metamask" }, "connectorType": { "type": "string", "description": "The connector type of the user", "example": "injected" } }, "required": [ "signature", "message", "walletClientType", "connectorType" ], "type": "object", "additionalProperties": false }, "Actions": { "enum": [ "verify_email" ], "type": "string" }, "ActionRequiredResponse": { "properties": { "action": { "$ref": "#/components/schemas/Actions" } }, "required": [ "action" ], "type": "object", "additionalProperties": false }, "SignupRequest": { "properties": { "email": { "type": "string", "description": "The email address of the player.", "example": "user@email.com" }, "password": { "type": "string", "description": "The password of the player.", "example": "password" }, "name": { "type": "string", "description": "The name of the player.", "example": "John Doe" }, "description": { "type": "string", "description": "The description of the player.", "example": "I'm a developer." } }, "required": [ "email", "password" ], "type": "object", "additionalProperties": false }, "LoginRequest": { "properties": { "email": { "type": "string", "description": "The email address of the user.", "example": "user@email.com" }, "password": { "type": "string", "description": "The password of the user.", "example": "password" } }, "required": [ "email", "password" ], "type": "object", "additionalProperties": false }, "CodeChallenge": { "properties": { "codeChallenge": { "type": "string", "description": "The code challenge.", "example": "code" }, "method": { "type": "string", "enum": [ "plain", "S256" ], "description": "The code verifier.", "example": "S256" } }, "required": [ "codeChallenge", "method" ], "type": "object", "additionalProperties": false }, "RequestVerifyEmailRequest": { "properties": { "email": { "type": "string", "description": "The email address of the user.", "example": "user@email.com" }, "redirectUrl": { "type": "string", "description": "The URL sent to the user by email to reset the password. At the end of the URL, we will add the token in the format `?token=token`.", "example": "https://openfort.io/reset-password" }, "challenge": { "$ref": "#/components/schemas/CodeChallenge", "description": "The Code Challenge if you want to use PKCE." } }, "required": [ "email", "redirectUrl" ], "type": "object", "additionalProperties": false }, "CodeChallengeVerify": { "properties": { "codeVerifier": { "type": "string", "description": "The code verifier.", "example": "verifier" } }, "required": [ "codeVerifier" ], "type": "object", "additionalProperties": false }, "VerifyEmailRequest": { "properties": { "email": { "type": "string", "description": "The email address of the user.", "example": "user@email.com" }, "token": { "type": "string", "description": "Unique value to identify the request. Obtained from the email.", "example": "515151" }, "challenge": { "$ref": "#/components/schemas/CodeChallengeVerify", "description": "The Code Challenge to verify the PKCE if you used it in the request." } }, "required": [ "email", "token" ], "type": "object", "additionalProperties": false }, "RequestResetPasswordRequest": { "properties": { "email": { "type": "string", "description": "The email address of the user.", "example": "user@email.com" }, "redirectUrl": { "type": "string", "description": "The URL sent to the user by email to reset the password. At the end of the URL, we will add the token in the format `?token=token`.", "example": "https://openfort.io/reset-password" }, "challenge": { "$ref": "#/components/schemas/CodeChallenge", "description": "The Code Challenge if you want to use PKCE." } }, "required": [ "email", "redirectUrl" ], "type": "object", "additionalProperties": false }, "ResetPasswordRequest": { "properties": { "email": { "type": "string", "description": "The email address of the user.", "example": "user@email.com" }, "password": { "type": "string", "description": "The new password of the user.", "example": "password" }, "state": { "type": "string", "description": "Unique value to identify the request. It's used to mitigate CSRF attacks." }, "challenge": { "$ref": "#/components/schemas/CodeChallengeVerify", "description": "The Code Challenge to verify the PKCE if you used it in the request." } }, "required": [ "email", "password" ], "type": "object", "additionalProperties": false }, "UnlinkEmailRequest": { "properties": { "email": { "type": "string", "description": "The email address of the user.", "example": "user@email.com" } }, "required": [ "email" ], "type": "object", "additionalProperties": false }, "LoginOIDCRequest": { "properties": { "identityToken": { "type": "string", "description": "The identity token of the user.", "example": "token" } }, "required": [ "identityToken" ], "type": "object", "additionalProperties": false }, "OAuthResponse": { "properties": { "url": { "type": "string" }, "key": { "type": "string" } }, "required": [ "url", "key" ], "type": "object", "additionalProperties": false }, "OAuthProvider": { "description": "Enum of the supporting OAuth providers.", "enum": [ "google", "twitter", "facebook", "discord", "epic_games", "line", "apple" ], "type": "string" }, "OAuthInitRequest": { "properties": { "options": { "properties": { "callbackTo": { "type": "string", "description": "A URL to custom handle the provider callback" }, "queryParams": { "properties": {}, "additionalProperties": { "type": "string" }, "type": "object", "description": "An object of query params" }, "redirectTo": { "type": "string", "description": "A URL to send the user to after they are confirmed." } }, "type": "object" }, "usePooling": { "type": "boolean", "description": "Use Pooling for the OAuth flow\n\nThis option is for the flow that requires the user can't be redirected from the authorization page to the application.\nThe client should poll the server to check if the user has authorized the application." }, "provider": { "$ref": "#/components/schemas/OAuthProvider", "description": "One of the providers supported by Openfort" } }, "required": [ "provider" ], "type": "object", "additionalProperties": false }, "ThirdPartyLinkRequest": { "properties": { "provider": { "$ref": "#/components/schemas/ThirdPartyOAuthProvider" }, "token": { "type": "string" }, "tokenType": { "type": "string" } }, "required": [ "provider", "token", "tokenType" ], "type": "object", "additionalProperties": false }, "LoginWithIdTokenRequest": { "properties": { "provider": { "$ref": "#/components/schemas/OAuthProvider", "description": "OAuth provider", "example": "firebase" }, "token": { "type": "string", "description": "Token to be verified", "example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9" } }, "required": [ "provider", "token" ], "type": "object", "additionalProperties": false }, "TokenType": { "description": "Enum of the supporting OAuth providers.", "enum": [ "idToken", "customToken" ], "type": "string" }, "ThirdPartyOAuthRequest": { "properties": { "provider": { "$ref": "#/components/schemas/ThirdPartyOAuthProvider", "description": "OAuth provider", "example": "firebase" }, "token": { "type": "string", "description": "Token to be verified", "example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9" }, "tokenType": { "$ref": "#/components/schemas/TokenType" } }, "required": [ "provider", "token" ], "type": "object", "additionalProperties": false }, "AuthenticateOAuthRequest": { "properties": { "provider": { "anyOf": [ { "$ref": "#/components/schemas/OAuthProvider" }, { "$ref": "#/components/schemas/ThirdPartyOAuthProvider" } ], "description": "OAuth provider", "example": "firebase" }, "token": { "type": "string", "description": "Token to be verified", "example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9" }, "tokenType": { "$ref": "#/components/schemas/TokenType", "description": "Type of the token.", "example": "idToken" }, "expand": { "items": { "$ref": "#/components/schemas/PlayerResponseExpandable" }, "type": "array", "description": "Specifies the fields to expand in the response.", "example": [ "transactionIntents" ] } }, "required": [ "provider", "token", "tokenType" ], "type": "object", "additionalProperties": false }, "UnlinkOAuthRequest": { "description": "The request to verify access token", "properties": { "provider": { "$ref": "#/components/schemas/OAuthProvider", "description": "The provider type being linked", "example": "Google" } }, "required": [ "provider" ], "type": "object", "additionalProperties": false }, "BasicAuthProvider.EMAIL": { "enum": [ "email" ], "type": "string" }, "BasicAuthProvider": { "description": "Enum of the supporting Basic Auth providers.", "enum": [ "email", "wallet", "guest", "web3", "phone" ], "type": "string" }, "AuthProvider": { "anyOf": [ { "$ref": "#/components/schemas/OAuthProvider" }, { "$ref": "#/components/schemas/ThirdPartyOAuthProvider" }, { "$ref": "#/components/schemas/BasicAuthProvider" } ], "description": "Enum of the supporting Auth providers." }, "EmailAuthConfig": { "description": "Email auth configuration", "properties": { "enabled": { "type": "boolean", "description": "Enable OAuth provider." }, "provider": { "$ref": "#/components/schemas/BasicAuthProvider.EMAIL", "description": "Auth provider type" }, "allowUnverified": { "type": "boolean", "description": "Allow unverified emails: Users will be able to sign in with unverified emails" }, "otpLength": { "type": "number", "format": "double", "description": "Length of the OTP code (default: 6)" }, "passwordRequirements": { "properties": { "requireSpecialChar": { "type": "boolean", "description": "Require at least one special character (default: false)" }, "requireNumber": { "type": "boolean", "description": "Require at least one number (default: false)" }, "requireLowercase": { "type": "boolean", "description": "Require at least one lowercase letter (default: false)" }, "requireUppercase": { "type": "boolean", "description": "Require at least one uppercase letter (default: false)" }, "minLength": { "type": "number", "format": "double", "description": "Minimum password length (default: 6)" } }, "required": [ "minLength" ], "type": "object", "description": "Password requirements configuration" } }, "required": [ "enabled", "provider", "allowUnverified", "otpLength", "passwordRequirements" ], "type": "object", "additionalProperties": false }, "BasicAuthProvider.GUEST": { "enum": [ "guest" ], "type": "string" }, "GuestAuthConfig": { "properties": { "enabled": { "type": "boolean", "description": "Enable OAuth provider." }, "provider": { "$ref": "#/components/schemas/BasicAuthProvider.GUEST", "description": "Auth provider type" } }, "required": [ "enabled", "provider" ], "type": "object", "additionalProperties": false }, "BasicAuthProvider.WEB3": { "enum": [ "web3" ], "type": "string" }, "Web3AuthConfig": { "properties": { "enabled": { "type": "boolean", "description": "Enable OAuth provider." }, "provider": { "$ref": "#/components/schemas/BasicAuthProvider.WEB3", "description": "Auth provider type" } }, "required": [ "enabled", "provider" ], "type": "object", "additionalProperties": false }, "BasicAuthProvider.PHONE": { "enum": [ "phone" ], "type": "string" }, "SmsProvider.TWILIO": { "enum": [ "twilio" ], "type": "string" }, "TwilioSmsProviderConfig": { "description": "Twilio SMS provider configuration", "properties": { "provider": { "$ref": "#/components/schemas/SmsProvider.TWILIO" }, "accountSid": { "type": "string", "description": "Twilio Account SID" }, "authToken": { "type": "string", "description": "Twilio Auth Token" }, "phoneNumber": { "type": "string", "description": "Twilio phone number (from)" } }, "required": [ "provider", "accountSid", "authToken", "phoneNumber" ], "type": "object", "additionalProperties": false }, "SmsProvider.MESSAGEBIRD": { "enum": [ "messagebird" ], "type": "string" }, "MessageBirdSmsProviderConfig": { "description": "MessageBird SMS provider configuration", "properties": { "provider": { "$ref": "#/components/schemas/SmsProvider.MESSAGEBIRD" }, "accessKey": { "type": "string", "description": "MessageBird Access Key" }, "originator": { "type": "string", "description": "Sender name or number" } }, "required": [ "provider", "accessKey", "originator" ], "type": "object", "additionalProperties": false }, "SmsProvider.TXTLOCAL": { "enum": [ "txtlocal" ], "type": "string" }, "TxtLocalSmsProviderConfig": { "description": "TxtLocal SMS provider configuration", "properties": { "provider": { "$ref": "#/components/schemas/SmsProvider.TXTLOCAL" }, "apiKey": { "type": "string", "description": "TxtLocal API Key" }, "sender": { "type": "string", "description": "Sender name" } }, "required": [ "provider", "apiKey", "sender" ], "type": "object", "additionalProperties": false }, "SmsProvider.VONAGE": { "enum": [ "vonage" ], "type": "string" }, "VonageSmsProviderConfig": { "description": "Vonage SMS provider configuration", "properties": { "provider": { "$ref": "#/components/schemas/SmsProvider.VONAGE" }, "apiKey": { "type": "string", "description": "Vonage API Key" }, "apiSecret": { "type": "string", "description": "Vonage API Secret" }, "from": { "type": "string", "description": "Sender ID or phone number" } }, "required": [ "provider", "apiKey", "apiSecret", "from" ], "type": "object", "additionalProperties": false }, "SmsProvider.SMS_API": { "enum": [ "sms_api" ], "type": "string" }, "SmsApiProviderConfig": { "description": "SMS API provider configuration", "properties": { "provider": { "$ref": "#/components/schemas/SmsProvider.SMS_API" }, "from": { "type": "string", "description": "Sender name" }, "token": { "type": "string", "description": "SMSAPI OAuth token" } }, "required": [ "provider", "from", "token" ], "type": "object", "additionalProperties": false }, "PhoneAuthConfig": { "description": "Phone auth configuration", "properties": { "enabled": { "type": "boolean", "description": "Enable OAuth provider." }, "provider": { "$ref": "#/components/schemas/BasicAuthProvider.PHONE", "description": "Auth provider type" }, "smsProviderConfig": { "anyOf": [ { "$ref": "#/components/schemas/TwilioSmsProviderConfig" }, { "$ref": "#/components/schemas/MessageBirdSmsProviderConfig" }, { "$ref": "#/components/schemas/TxtLocalSmsProviderConfig" }, { "$ref": "#/components/schemas/VonageSmsProviderConfig" }, { "$ref": "#/components/schemas/SmsApiProviderConfig" } ], "description": "SMS provider configuration" }, "smsTemplate": { "type": "string", "description": "SMS message template. Use {{ .Code }} to format the OTP code (default: \"Your code is {{ .Code }}\")" } }, "required": [ "enabled", "provider", "smsProviderConfig", "smsTemplate" ], "type": "object", "additionalProperties": false }, "ThirdPartyOAuthProvider.SUPABASE": { "enum": [ "supabase" ], "type": "string" }, "SupabaseAuthConfig": { "description": "Supabase oauth configuration", "properties": { "enabled": { "type": "boolean", "description": "Enable OAuth provider." }, "provider": { "$ref": "#/components/schemas/ThirdPartyOAuthProvider.SUPABASE", "description": "OAuth provider type" }, "url": { "type": "string", "description": "The unique Supabase URL which is supplied when you create a new project in your project dashboard." }, "key": { "type": "string", "description": "The unique Supabase Key which is supplied when you create a new project in your project dashboard." } }, "required": [ "enabled", "provider", "url", "key" ], "type": "object", "additionalProperties": false }, "ThirdPartyOAuthProvider.OIDC": { "enum": [ "oidc" ], "type": "string" }, "OIDCAuthConfig": { "properties": { "enabled": { "type": "boolean", "description": "Enable OAuth provider." }, "provider": { "$ref": "#/components/schemas/ThirdPartyOAuthProvider.OIDC", "description": "OAuth provider type" }, "publicVerificationKey": { "type": "string", "description": "PEM encoded public key to verify the JWT token" }, "aud": { "type": "string", "description": "Audience of the JWT token" }, "jwksUrl": { "type": "string", "description": "JWKS URL to fetch the public key" } }, "required": [ "enabled", "provider", "aud" ], "type": "object", "additionalProperties": false }, "ThirdPartyOAuthProvider.ACCELBYTE": { "enum": [ "accelbyte" ], "type": "string" }, "AccelbyteOAuthConfig": { "description": "Accelbyte oauth configuration", "properties": { "enabled": { "type": "boolean", "description": "Enable OAuth provider." }, "provider": { "$ref": "#/components/schemas/ThirdPartyOAuthProvider.ACCELBYTE", "description": "OAuth provider type" }, "baseUrl": { "type": "string", "description": "Base URI of your accelbyte gaming service environment. E.g. https://mygame.dev.gamingservices.accelbyte.io/" }, "clientId": { "type": "string", "description": "Client ID of your accelbyte gaming service environment." }, "clientSecret": { "type": "string", "description": "Secret of your confidential IAM client." } }, "required": [ "enabled", "provider", "baseUrl", "clientId", "clientSecret" ], "type": "object", "additionalProperties": false }, "OAuthProvider.GOOGLE": { "enum": [ "google" ], "type": "string" }, "GoogleOAuthConfig": { "description": "Google oauth configuration", "properties": { "enabled": { "type": "boolean", "description": "Enable OAuth provider." }, "provider": { "$ref": "#/components/schemas/OAuthProvider.GOOGLE", "description": "OAuth provider type" }, "clientId": { "type": "string", "description": "Google API client ID." }, "clientSecret": { "type": "string", "description": "Google API client secret." } }, "required": [ "enabled", "provider", "clientId" ], "type": "object", "additionalProperties": false }, "OAuthProvider.TWITTER": { "enum": [ "twitter" ], "type": "string" }, "TwitterOAuthConfig": { "description": "Twitter oauth configuration", "properties": { "enabled": { "type": "boolean", "description": "Enable OAuth provider." }, "provider": { "$ref": "#/components/schemas/OAuthProvider.TWITTER", "description": "OAuth provider type" }, "clientId": { "type": "string", "description": "Twitter API consumer key." }, "clientSecret": { "type": "string", "description": "Twitter API consumer secret." } }, "required": [ "enabled", "provider", "clientId", "clientSecret" ], "type": "object", "additionalProperties": false }, "OAuthProvider.FACEBOOK": { "enum": [ "facebook" ], "type": "string" }, "FacebookOAuthConfig": { "properties": { "enabled": { "type": "boolean", "description": "Enable OAuth provider." }, "provider": { "$ref": "#/components/schemas/OAuthProvider.FACEBOOK", "description": "OAuth provider type" }, "clientId": { "type": "string", "description": "Facebook API client ID." }, "clientSecret": { "type": "string", "description": "Facebook API client secret." } }, "required": [ "enabled", "provider", "clientId", "clientSecret" ], "type": "object", "additionalProperties": false }, "OAuthProvider.APPLE": { "enum": [ "apple" ], "type": "string" }, "AppleOAuthConfig": { "properties": { "enabled": { "type": "boolean", "description": "Enable OAuth provider." }, "provider": { "$ref": "#/components/schemas/OAuthProvider.APPLE", "description": "OAuth provider type" }, "clientId": { "type": "string", "description": "Apple API client ID (Service ID)." }, "clientSecret": { "type": "string", "description": "Pre-generated client secret JWT" } }, "required": [ "enabled", "provider", "clientId" ], "type": "object", "additionalProperties": false }, "OAuthProvider.LINE": { "enum": [ "line" ], "type": "string" }, "LineOAuthConfig": { "properties": { "enabled": { "type": "boolean", "description": "Enable OAuth provider." }, "provider": { "$ref": "#/components/schemas/OAuthProvider.LINE", "description": "OAuth provider type" }, "channelId": { "type": "string", "description": "Line Channel ID." }, "channelSecret": { "type": "string", "description": "Line Channel secret." } }, "required": [ "enabled", "provider", "channelId", "channelSecret" ], "type": "object", "additionalProperties": false }, "OAuthProvider.DISCORD": { "enum": [ "discord" ], "type": "string" }, "DiscordOAuthConfig": { "properties": { "enabled": { "type": "boolean", "description": "Enable OAuth provider." }, "provider": { "$ref": "#/components/schemas/OAuthProvider.DISCORD", "description": "OAuth provider type" }, "clientId": { "type": "string", "description": "Discord API client ID." }, "clientSecret": { "type": "string", "description": "Discord API client secret." } }, "required": [ "enabled", "provider", "clientId", "clientSecret" ], "type": "object", "additionalProperties": false }, "OAuthProvider.EPIC_GAMES": { "enum": [ "epic_games" ], "type": "string" }, "EpicGamesOAuthConfig": { "properties": { "enabled": { "type": "boolean", "description": "Enable OAuth provider." }, "provider": { "$ref": "#/components/schemas/OAuthProvider.EPIC_GAMES", "description": "OAuth provider type" }, "clientId": { "type": "string", "description": "Epic Games API client ID." }, "clientSecret": { "type": "string", "description": "Epic Games API client secret." } }, "required": [ "enabled", "provider", "clientId", "clientSecret" ], "type": "object", "additionalProperties": false }, "ThirdPartyOAuthProvider.PLAYFAB": { "enum": [ "playfab" ], "type": "string" }, "PlayFabOAuthConfig": { "description": "PlayFab oauth configuration", "properties": { "enabled": { "type": "boolean", "description": "Enable OAuth provider." }, "provider": { "$ref": "#/components/schemas/ThirdPartyOAuthProvider.PLAYFAB", "description": "OAuth provider type" }, "titleId": { "type": "string", "description": "Title ID of your Play Fab gaming service environment." } }, "required": [ "enabled", "provider", "titleId" ], "type": "object", "additionalProperties": false }, "ThirdPartyOAuthProvider.FIREBASE": { "enum": [ "firebase" ], "type": "string" }, "FirebaseOAuthConfig": { "description": "Firebase configuration", "properties": { "enabled": { "type": "boolean", "description": "Enable OAuth provider." }, "provider": { "$ref": "#/components/schemas/ThirdPartyOAuthProvider.FIREBASE", "description": "OAuth provider type" }, "projectId": { "type": "string", "description": "Project ID of your Firebase service environment." } }, "required": [ "enabled", "provider", "projectId" ], "type": "object", "additionalProperties": false }, "ThirdPartyOAuthProvider.CUSTOM": { "enum": [ "custom" ], "type": "string" }, "CustomAuthConfig": { "properties": { "enabled": { "type": "boolean", "description": "Enable OAuth provider." }, "provider": { "$ref": "#/components/schemas/ThirdPartyOAuthProvider.CUSTOM", "description": "OAuth provider type" }, "headers": { "type": "string", "description": "Headers to send with the request" }, "authenticationUrl": { "type": "string", "description": "URL to send the request to to verify the payload" } }, "required": [ "enabled", "provider", "authenticationUrl" ], "type": "object", "additionalProperties": false }, "ThirdPartyOAuthProvider.LOOTLOCKER": { "enum": [ "lootlocker" ], "type": "string" }, "LootLockerOAuthConfig": { "description": "LootLocker oauth configuration", "properties": { "enabled": { "type": "boolean", "description": "Enable OAuth provider." }, "provider": { "$ref": "#/components/schemas/ThirdPartyOAuthProvider.LOOTLOCKER", "description": "OAuth provider type" } }, "required": [ "enabled", "provider" ], "type": "object", "additionalProperties": false }, "ThirdPartyOAuthProvider.BETTER_AUTH": { "enum": [ "better-auth" ], "type": "string" }, "BetterAuthConfig": { "description": "Better Auth configuration", "properties": { "enabled": { "type": "boolean", "description": "Enable OAuth provider." }, "provider": { "$ref": "#/components/schemas/ThirdPartyOAuthProvider.BETTER_AUTH", "description": "OAuth provider type" }, "baseUrl": { "type": "string", "description": "Base URL of the Better Auth instance. E.g. https://your-app.com/api/auth" } }, "required": [ "enabled", "provider", "baseUrl" ], "type": "object", "additionalProperties": false }, "AuthConfig": { "anyOf": [ { "$ref": "#/components/schemas/EmailAuthConfig" }, { "$ref": "#/components/schemas/GuestAuthConfig" }, { "$ref": "#/components/schemas/Web3AuthConfig" }, { "$ref": "#/components/schemas/PhoneAuthConfig" }, { "$ref": "#/components/schemas/SupabaseAuthConfig" }, { "$ref": "#/components/schemas/OIDCAuthConfig" }, { "$ref": "#/components/schemas/AccelbyteOAuthConfig" }, { "$ref": "#/components/schemas/GoogleOAuthConfig" }, { "$ref": "#/components/schemas/TwitterOAuthConfig" }, { "$ref": "#/components/schemas/FacebookOAuthConfig" }, { "$ref": "#/components/schemas/AppleOAuthConfig" }, { "$ref": "#/components/schemas/LineOAuthConfig" }, { "$ref": "#/components/schemas/DiscordOAuthConfig" }, { "$ref": "#/components/schemas/EpicGamesOAuthConfig" }, { "$ref": "#/components/schemas/PlayFabOAuthConfig" }, { "$ref": "#/components/schemas/FirebaseOAuthConfig" }, { "$ref": "#/components/schemas/CustomAuthConfig" }, { "$ref": "#/components/schemas/LootLockerOAuthConfig" }, { "$ref": "#/components/schemas/BetterAuthConfig" } ] }, "OAuthConfigListResponse": { "description": "Response for the OAuth config list method.", "properties": { "data": { "items": { "$ref": "#/components/schemas/AuthConfig" }, "type": "array", "description": "List of the OAuth providers configurations" } }, "required": [ "data" ], "type": "object", "additionalProperties": false }, "GrantOAuthResponse": { "properties": { "authorizationCode": { "type": "string" }, "accessToken": { "type": "string" }, "refreshToken": { "type": "string" }, "playerId": { "type": "string" } }, "type": "object", "additionalProperties": false }, "GrantCallbackRequest": { "properties": { "code": { "type": "string" }, "state": { "type": "string" } }, "required": [ "code", "state" ], "type": "object", "additionalProperties": false }, "OAuthConfigResponse": { "$ref": "#/components/schemas/AuthConfig", "description": "OAuth provider specific configuration." }, "OAuthConfigRequest": { "$ref": "#/components/schemas/AuthConfig", "description": "Request for the configuration endpoints for the OAuth providers" }, "AuthMigrationStatus": { "enum": [ "created", "running", "paused", "completed", "failed", "canceled" ], "type": "string" }, "MappingStrategy": { "description": "Mapping strategy for the migration. This is used to transform the ids between the source and destination providers.\nFor the transformation, the order of the operations is:\n1. Trim the prefix and suffix from the destination id.\n2. Add the prefix and suffix to the destination id.\nWhen a user is authenticated in the destination provider, the id is transformed using the mapping strategy to find if exists in the source provider.\nIf the id is not found, the user is created in the destination provider.\nIf the id is found, the user in the destination provider is linked to the source provider.", "properties": { "trimPrefix": { "type": "string", "description": "Prefix to trim from the destination id." }, "trimSuffix": { "type": "string", "description": "Suffix to trim from the destination id." }, "addPrefix": { "type": "string", "description": "Prefix to add to the destination id." }, "addSuffix": { "type": "string", "description": "Suffix to add to the destination id." } }, "type": "object", "additionalProperties": false }, "AuthMigrationResponse": { "description": "Auth Migration Response.", "properties": { "id": { "type": "string", "description": "Unique identifier for the migration." }, "sourceProvider": { "$ref": "#/components/schemas/AuthProvider", "description": "The source provider for the migration." }, "destinationProvider": { "$ref": "#/components/schemas/AuthProvider", "description": "The destination provider for the migration." }, "status": { "$ref": "#/components/schemas/AuthMigrationStatus", "description": "The status of the migration." }, "createdAt": { "type": "string", "format": "date-time", "description": "The created date of the migration." }, "finishedAt": { "type": "string", "format": "date-time", "description": "If the migration is finished, this will be the date it was finished." }, "mappingStrategy": { "$ref": "#/components/schemas/MappingStrategy", "description": "The mapping strategy used for the migration.\nIf not provided, the direct mapping will be used." } }, "required": [ "id", "sourceProvider", "destinationProvider", "status", "createdAt" ], "type": "object", "additionalProperties": false }, "CreateMigrationRequest": { "properties": { "mappingStrategy": { "$ref": "#/components/schemas/MappingStrategy", "description": "The mapping strategy used for the migration.\nIf not provided, the direct mapping will be used." }, "destinationProvider": { "$ref": "#/components/schemas/AuthProvider", "description": "Destination provider" }, "sourceProvider": { "$ref": "#/components/schemas/AuthProvider", "description": "Source provider" } }, "required": [ "destinationProvider", "sourceProvider" ], "type": "object", "description": "Request for migrating authentication from one provider to another" }, "AuthMigrationListResponse": { "properties": { "object": { "$ref": "#/components/schemas/ResponseType.LIST" }, "url": { "type": "string" }, "data": { "items": { "$ref": "#/components/schemas/AuthMigrationResponse" }, "type": "array" }, "start": { "type": "integer", "format": "int32" }, "end": { "type": "integer", "format": "int32" }, "total": { "type": "integer", "format": "int32" } }, "required": [ "object", "url", "data", "start", "end", "total" ], "type": "object", "additionalProperties": false }, "ListMigrationsRequest": { "description": "Request for listing Migrations", "properties": { "limit": { "type": "integer", "format": "int32", "description": "Specifies the maximum number of records to return.", "minimum": 1 }, "skip": { "type": "integer", "format": "int32", "description": "Specifies the offset for the first records to return.", "minimum": 0 }, "order": { "$ref": "#/components/schemas/Prisma.SortOrder", "description": "Specifies the order in which to sort the results." }, "sourceProvider": { "$ref": "#/components/schemas/AuthProvider", "description": "Source provider" }, "destinationProvider": { "$ref": "#/components/schemas/AuthProvider", "description": "Destination provider" }, "status": { "items": { "$ref": "#/components/schemas/AuthMigrationStatus" }, "type": "array", "description": "Status of the migration" } }, "type": "object", "additionalProperties": false }, "UpdateMigrationRequest": { "properties": { "mappingStrategy": { "$ref": "#/components/schemas/MappingStrategy", "description": "The mapping strategy used for the migration.\nIf not provided, the direct mapping will be used." }, "status": { "$ref": "#/components/schemas/AuthMigrationStatus", "description": "Status of the migration" } }, "required": [ "status" ], "type": "object", "description": "Request for update the status of a migration" }, "AuthenticationType": { "enum": [ "oauth", "basic", "third_party" ], "type": "string" }, "AuthProviderWithTypeResponse": { "properties": { "type": { "$ref": "#/components/schemas/AuthenticationType" }, "provider": { "$ref": "#/components/schemas/AuthProvider" } }, "required": [ "type", "provider" ], "type": "object" }, "AuthProviderListResponse": { "properties": { "data": { "items": { "$ref": "#/components/schemas/AuthProviderWithTypeResponse" }, "type": "array" } }, "required": [ "data" ], "type": "object", "additionalProperties": false }, "ListConfigRequest": { "properties": { "enabled": { "type": "boolean" } }, "type": "object", "additionalProperties": false }, "AuthPlayerResponseWithRecoveryShare": { "properties": { "player": { "anyOf": [ { "$ref": "#/components/schemas/PlayerResponse" }, { "$ref": "#/components/schemas/Pick_PlayerResponse.id_" } ] }, "id": { "type": "string" }, "object": { "$ref": "#/components/schemas/EntityType.PLAYER" }, "createdAt": { "type": "integer", "format": "int32" }, "linkedAccounts": { "items": { "$ref": "#/components/schemas/LinkedAccountResponse" }, "type": "array" }, "recoveryShare": { "type": "string" } }, "required": [ "id", "object", "createdAt", "linkedAccounts" ], "type": "object", "additionalProperties": false }, "CreateAuthPlayerRequest": { "properties": { "thirdPartyUserId": { "type": "string", "description": "The third party user id.", "example": "dsajkl23r43l1234jl" }, "thirdPartyProvider": { "$ref": "#/components/schemas/ThirdPartyOAuthProvider", "description": "The third party provider.", "example": "firebase" }, "preGenerateEmbeddedAccount": { "type": "boolean", "description": "Pre generate embedded account.", "example": true }, "chainId": { "type": "integer", "format": "int32", "description": "The chain ID. Must be a [supported chain](/development/chains).", "example": 80002 }, "metadata": { "$ref": "#/components/schemas/PlayerMetadata", "description": "Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to metadata." } }, "required": [ "thirdPartyUserId", "thirdPartyProvider", "preGenerateEmbeddedAccount" ], "type": "object", "additionalProperties": false }, "AuthPlayerListResponse": { "properties": { "object": { "$ref": "#/components/schemas/ResponseType.LIST" }, "url": { "type": "string" }, "data": { "items": { "$ref": "#/components/schemas/AuthPlayerResponse" }, "type": "array" }, "start": { "type": "integer", "format": "int32" }, "end": { "type": "integer", "format": "int32" }, "total": { "type": "integer", "format": "int32" } }, "required": [ "object", "url", "data", "start", "end", "total" ], "type": "object", "additionalProperties": false }, "AuthPlayerListQueries": { "properties": { "limit": { "type": "integer", "format": "int32", "description": "Specifies the maximum number of records to return.", "minimum": 1 }, "skip": { "type": "integer", "format": "int32", "description": "Specifies the offset for the first records to return.", "minimum": 0 }, "order": { "$ref": "#/components/schemas/Prisma.SortOrder", "description": "Specifies the order in which to sort the results." }, "email": { "type": "string", "description": "Specifies the email address of the user.", "example": "user@email.com" }, "externalUserId": { "type": "string", "description": "Specifies the external user ID.", "example": "externalUserId" } }, "type": "object", "additionalProperties": false }, "AuthSessionResponse": { "properties": { "livemode": { "type": "boolean" }, "projectId": { "type": "string" }, "playerId": { "type": "string" }, "issuer": { "type": "string" }, "issuedAt": { "type": "number", "format": "double" }, "expiration": { "type": "number", "format": "double" }, "sessionId": { "type": "string" } }, "required": [ "livemode", "projectId", "playerId", "issuer", "issuedAt", "expiration", "sessionId" ], "type": "object", "additionalProperties": false }, "JwtKey": { "properties": { "kty": { "type": "string" }, "x": { "type": "string" }, "y": { "type": "string" }, "crv": { "type": "string" }, "kid": { "type": "string" }, "use": { "type": "string" }, "alg": { "type": "string" } }, "required": [ "kty", "x", "y", "crv", "kid", "use", "alg" ], "type": "object", "additionalProperties": false }, "JwtKeyResponse": { "properties": { "keys": { "items": { "$ref": "#/components/schemas/JwtKey" }, "type": "array" } }, "required": [ "keys" ], "type": "object", "additionalProperties": false }, "AuthenticatedPlayerResponse": { "properties": { "player": { "$ref": "#/components/schemas/AuthPlayerResponse", "description": "Player's identifier." } }, "required": [ "player" ], "type": "object", "additionalProperties": false }, "AuthorizePlayerRequest": { "properties": { "authorizationCode": { "type": "string", "description": "The authorization code received from the api to authorize the project to use the Ecosystem player.", "example": "d9e215f74e715853" } }, "required": [ "authorizationCode" ], "type": "object", "additionalProperties": false } }, "securitySchemes": { "pk": { "type": "http", "scheme": "bearer" }, "sk": { "type": "http", "scheme": "bearer" } } }, "info": { "title": "Openfort API", "version": "1.0.0", "description": "Complete Openfort API references and guides can be found at: https://www.openfort.io/docs", "termsOfService": "https://www.openfort.io", "contact": { "name": "Openfort Team", "email": "founders@openfort.xyz", "url": "https://www.openfort.io" } }, "paths": { "/rpc": { "post": { "operationId": "HandleRpcRequest", "responses": { "200": { "description": "JSON-RPC response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/JsonRpcResponse" } } } } }, "description": "Execute JSON-RPC 2.0 wallet methods\n\nThis endpoint handles wallet-namespace JSON-RPC 2.0 requests following the specification at https://www.jsonrpc.org/specification.\nIt supports EIP-7811 wallet methods that operate across multiple chains.\n\n**Supported methods:**\n- `wallet_getAssets`: Retrieve wallet assets across multiple chains with optional filtering\n\n**Authentication:**\nSupports multiple authentication methods including public key access tokens and third-party tokens", "summary": "Execute wallet JSON-RPC methods", "tags": [ "RPC" ], "security": [ { "pk_access_token": [] }, { "pk_third_party": [] }, { "better_auth": [] } ], "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/JsonRpcRequest" } } } } } }, "/rpc/{chainId}": { "post": { "operationId": "HandleChainRpcRequest", "responses": { "200": { "description": "JSON-RPC response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/JsonRpcResponse" } } } } }, "description": "Execute chain-specific JSON-RPC 2.0 methods (bundler & paymaster)\n\nThis endpoint handles chain-specific JSON-RPC 2.0 requests for ERC-4337 bundler operations and ERC-7677 paymaster operations.\nThe chainId is specified in the URL path following the standard pattern.\n\n**Supported namespaces:**\n- `eth_*`: ERC-4337 bundler methods (sendUserOperation, estimateUserOperationGas, getUserOperationReceipt, getUserOperationByHash, supportedEntryPoints)\n- `openfort_*`: Openfort bundler extensions (getUserOperationGasPrice, getUserOperationStatus)\n- `pm_*`: ERC-7677 paymaster methods (getPaymasterStubData, getPaymasterData)\n- `wallet_*`: EIP-7811 wallet methods (can also be called here with chainId context)", "summary": "Execute chain-specific bundler and paymaster JSON-RPC methods", "tags": [ "RPC" ], "security": [ { "pk": [] } ], "parameters": [ { "in": "path", "name": "chainId", "required": true, "schema": { "format": "double", "type": "number" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/JsonRpcRequest" } } } } } }, "/v1/transaction_intents": { "get": { "operationId": "GetTransactionIntents", "responses": { "200": { "description": "Successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TransactionIntentListResponse" }, "examples": { "Example 1": { "value": { "object": "list", "url": "/v1/transaction_intents", "start": 0, "end": 1, "total": 1, "data": [ { "id": "tin_c502d628-5bb3-42f2-b8f5-62ba4d71df3a", "createdAt": 1689869074, "object": "transactionIntent", "details": { "userOperationHash": "0x25d3...005c", "userOperation": { "sender": "0x48930Cd730652bf0B18Ef8c80cD0Fa1Cc72A233E", "nonce": "0x2", "initCode": "0x", "callData": "0xb61d...0000", "callGasLimit": "0x27863", "verificationGasLimit": "0x16001", "preVerificationGas": "0xb818", "maxFeePerGas": "0x62590091", "maxPriorityFeePerGas": "0x62590091", "paymasterAndData": "0x3210...b51c", "signature": "0x6202...3d1b" } }, "chainId": 80002, "abstractionType": "accountAbstractionV6", "updatedAt": 1689869074, "policy": { "id": "pol_..." }, "player": { "id": "pla_..." }, "account": { "id": "acc_..." }, "response": { "createdAt": 1689869074, "logs": [ { "removed": false, "transactionIndex": 0, "blockNumber": 44904492, "transactionHash": "0x25d3...005c", "address": "0x5FF1...2789", "topics": [ "0xbb47...f972" ], "data": "0x", "logIndex": 0, "blockHash": "0x8a69...6d59" } ], "blockNumber": 8789286, "transactionHash": "0x25d3...005c", "to": "0x0576...1B57", "gasUsed": "336730", "status": 1 }, "interactions": [ { "functionName": "mint", "contract": "con_...", "functionArgs": [ "0x63B7...484f" ] } ], "transitions": [ { "fromStatus": "none", "toStatus": "new", "at": 1750154762 }, { "fromStatus": "new", "toStatus": "sent", "at": 1750154762 }, { "fromStatus": "sent", "toStatus": "indexed", "at": 1750154762 } ] } ] } } } } } }, "401": { "description": "Error response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestErrorResponse" } } } } }, "description": "Returns a list of TransactionIntents.", "summary": "List transaction intents.", "tags": [ "TransactionIntents" ], "security": [ { "sk": [] }, { "user_project": [] } ], "parameters": [ { "description": "Specifies the maximum number of records to return.", "in": "query", "name": "limit", "required": false, "schema": { "format": "int32", "type": "integer", "minimum": 1 } }, { "description": "Specifies the offset for the first records to return.", "in": "query", "name": "skip", "required": false, "schema": { "format": "int32", "type": "integer", "minimum": 0 } }, { "description": "Specifies the order in which to sort the results.", "in": "query", "name": "order", "required": false, "schema": { "$ref": "#/components/schemas/Prisma.SortOrder" } }, { "description": "Specifies the fields to expand in the response.", "in": "query", "name": "expand", "required": false, "schema": { "type": "array", "items": { "$ref": "#/components/schemas/TransactionIntentResponseExpandable" } } }, { "description": "The chain ID. Must be a [supported chain](/development/chains).", "in": "query", "name": "chainId", "required": false, "schema": { "format": "int32", "type": "integer" }, "example": 80002 }, { "description": "Filter by account ID or developer account (starts with acc_ or dac_ respectively).", "in": "query", "name": "account", "required": false, "schema": { "type": "array", "items": { "type": "string" } }, "example": [ "acc_dc981458-a653-4539-b120-a321915b2896" ] }, { "description": "Filter by player ID (starts with pla_).", "in": "query", "name": "player", "required": false, "schema": { "type": "array", "items": { "type": "string" } }, "example": [ "pla_556166c9-77ad-4a39-aaf8-c432defa8a0f" ] }, { "description": "Filter by successful (1) or failed (0) transaction intents.", "in": "query", "name": "status", "required": false, "schema": { "format": "double", "type": "number" }, "example": 1 }, { "description": "Filter by policy ID (starts with pol_).", "in": "query", "name": "policy", "required": false, "schema": { "type": "array", "items": { "type": "string" } }, "example": [ "pol_7e07ae30-2a4d-48fa-803f-361da94905dd" ] } ] }, "post": { "operationId": "CreateTransactionIntent", "responses": { "200": { "description": "Successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TransactionIntentResponse" }, "examples": { "Transaction for custodial account": { "value": { "id": "tin_c502d628-5bb3-42f2-b8f5-62ba4d71df3a", "createdAt": 1689869074, "object": "transactionIntent", "details": { "userOperationHash": "0x25d3...005c", "userOperation": { "sender": "0x48930Cd730652bf0B18Ef8c80cD0Fa1Cc72A233E", "nonce": "0x2", "initCode": "0x", "callData": "0xb61d...0000", "callGasLimit": "0x27863", "verificationGasLimit": "0x16001", "preVerificationGas": "0xb818", "maxFeePerGas": "0x62590091", "maxPriorityFeePerGas": "0x62590091", "paymasterAndData": "0x3210...b51c", "signature": "0x6202...3d1b" } }, "chainId": 80002, "abstractionType": "accountAbstractionV6", "updatedAt": 1689869074, "policy": { "id": "pol_..." }, "player": { "id": "pla_..." }, "account": { "id": "acc_..." }, "response": { "createdAt": 1689869074, "logs": [ { "removed": false, "transactionIndex": 0, "blockNumber": 44904492, "transactionHash": "0x25d3...005c", "address": "0x5FF1...2789", "topics": [ "0xbb47...f972" ], "data": "0x", "logIndex": 0, "blockHash": "0x8a69...6d59" } ], "blockNumber": 8789286, "transactionHash": "0x25d3...005c", "to": "0x0576...1B57", "gasUsed": "336730", "status": 1 }, "interactions": [ { "functionName": "mint", "contract": "con_...", "functionArgs": [ "0x63B7...484f" ] } ], "transitions": [ { "fromStatus": "none", "toStatus": "new", "at": 1750154762 }, { "fromStatus": "new", "toStatus": "sent", "at": 1750154762 }, { "fromStatus": "sent", "toStatus": "indexed", "at": 1750154762 } ] } }, "Transaction for non-custodial account": { "value": { "id": "tin_c502d628-5bb3-42f2-b8f5-62ba4d71df3a", "createdAt": 1689869074, "object": "transactionIntent", "details": { "userOperationHash": "0x25d3...005c", "userOperation": { "sender": "0x814A...FB72", "nonce": "0x0", "initCode": "0x", "callData": "0xb61d27f6000000000000000", "callGasLimit": "0x2e84d", "verificationGasLimit": "0x1bcef", "maxFeePerGas": "0x62590091", "maxPriorityFeePerGas": "0x62590091", "paymasterAndData": "0x3210...391b", "signature": "", "preVerificationGas": "0xb80c" } }, "chainId": 80002, "abstractionType": "accountAbstractionV6", "updatedAt": 1689869074, "policy": { "id": "pol_..." }, "player": { "id": "pla_..." }, "account": { "id": "acc_..." }, "nextAction": { "type": "sign_with_wallet", "payload": { "signableHash": "0x25d3...005c" } }, "interactions": [ { "functionName": "mint", "value": "100000000000000", "contract": "0x0576...1B57", "functionArgs": [ "0x63B7...484f" ] } ] } }, "Optimistic Transaction for custodial account": { "value": { "id": "tin_c502d628-5bb3-42f2-b8f5-62ba4d71df3a", "createdAt": 1689869074, "object": "transactionIntent", "userOperationHash": "0x25d3...005c", "details": { "from": "0x70997970c51812dc3a010c7d01b50e0d17dc79c8", "to": "0x3c44cdddb6a900fa2b585dd299e03d12fa4293bc", "gas": "0x5208", "maxFeePerGas": "0x3b9aca00", "maxPriorityFeePerGas": "0x3b9aca00", "nonce": "0x0", "data": "0x3c44...", "paymaster": "0x3c44cdddb6a900fa2b585dd299e03d12fa4293bc", "paymasterInput": "0x3c44..." }, "chainId": 300, "abstractionType": "zkSync", "updatedAt": 1689869074, "policy": { "id": "pol_..." }, "player": { "id": "pla_..." }, "account": { "id": "acc_..." }, "interactions": [ { "functionName": "mint", "contract": "con_...", "functionArgs": [ "0x63B7...484f" ] } ] } } } } } }, "400": { "description": "Request has invalid parameters.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestErrorResponse" } } } }, "401": { "description": "Error response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestErrorResponse" } } } }, "409": { "description": "Error response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestErrorResponse" } } } } }, "description": "Creates a TransactionIntent.\n\nA pending TransactionIntent has the `response` attribute as undefined.\n\nAfter the TransactionIntent is created and broadcasted to the blockchain, `response` will be populated with the transaction hash and a status (1 success, 0 fail).\n\nWhen using a non-custodial account, a `nextAction` attribute is returned with the `userOperationHash` that must be signed by the owner of the account.", "summary": "Create a transaction intent object.", "tags": [ "TransactionIntents" ], "security": [ { "sk": [] }, { "pk_third_party": [] }, { "pk_access_token": [] }, { "pk_identity_token": [] }, { "better_auth": [] } ], "parameters": [ { "in": "header", "name": "X-Behalf-Of-Project", "required": false, "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateTransactionIntentRequest" } } } } } }, "/v1/transaction_intents/{id}": { "get": { "operationId": "GetTransactionIntent", "responses": { "200": { "description": "Successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TransactionIntentResponse" }, "examples": { "Example 1": { "value": { "id": "tin_c502d628-5bb3-42f2-b8f5-62ba4d71df3a", "createdAt": 1689869074, "object": "transactionIntent", "details": { "userOperationHash": "0x25d3...005c", "userOperation": { "sender": "0x48930Cd730652bf0B18Ef8c80cD0Fa1Cc72A233E", "nonce": "0x2", "initCode": "0x", "callData": "0xb61d...0000", "callGasLimit": "0x27863", "verificationGasLimit": "0x16001", "preVerificationGas": "0xb818", "maxFeePerGas": "0x62590091", "maxPriorityFeePerGas": "0x62590091", "paymasterAndData": "0x3210...b51c", "signature": "0x6202...3d1b" } }, "chainId": 80002, "abstractionType": "accountAbstractionV6", "updatedAt": 1689869074, "policy": { "id": "pol_..." }, "player": { "id": "pla_..." }, "account": { "id": "acc_..." }, "response": { "createdAt": 1689869074, "logs": [ { "removed": false, "transactionIndex": 0, "blockNumber": 44904492, "transactionHash": "0x25d3...005c", "address": "0x5FF1...2789", "topics": [ "0xbb47...f972" ], "data": "0x", "logIndex": 0, "blockHash": "0x8a69...6d59" } ], "blockNumber": 8789286, "transactionHash": "0x25d3...005c", "to": "0x0576...1B57", "gasUsed": "336730", "status": 1 }, "interactions": [ { "functionName": "mint", "contract": "con_...", "functionArgs": [ "0x63B7...484f" ] } ], "transitions": [ { "fromStatus": "none", "toStatus": "new", "at": 1750154762 }, { "fromStatus": "new", "toStatus": "sent", "at": 1750154762 }, { "fromStatus": "sent", "toStatus": "indexed", "at": 1750154762 } ] } } } } } }, "401": { "description": "Error response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestErrorResponse" } } } } }, "description": "Retrieves the details of a TransactionIntent that has previously been created.", "summary": "Get a transaction intent object.", "tags": [ "TransactionIntents" ], "security": [ { "sk": [] }, { "user_project": [] }, { "pk_third_party": [] }, { "pk_access_token": [] }, { "pk_identity_token": [] }, { "better_auth": [] } ], "parameters": [ { "description": "Specifies the unique transaction intent ID (starts with tin_).", "in": "path", "name": "id", "required": true, "schema": { "type": "string" }, "example": "tin_48eeba57-2cd5-4159-a2cb-057a23a35e65" }, { "description": "Specifies the expandable fields.", "in": "query", "name": "expand", "required": false, "schema": { "default": [], "type": "array", "items": { "$ref": "#/components/schemas/TransactionIntentResponseExpandable" } }, "example": [ "players" ] } ] } }, "/v1/transaction_intents/estimate_gas_cost": { "post": { "operationId": "EstimateTransactionIntentCost", "responses": { "200": { "description": "Successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EstimateTransactionIntentGasResult" }, "examples": { "Gas estimation": { "value": { "estimatedTXGas": "444793", "estimatedTXGasFee": "1162163748854053", "estimatedTXGasFeeUSD": "0.01", "gasPrice": "2612819331" } }, "Gas estimation with token policy": { "value": { "estimatedTXGas": "444793", "estimatedTXGasFee": "1162163748854053", "estimatedTXGasFeeUSD": "0.01", "gasPrice": "2612819331", "estimatedTXGasFeeToken": "200" } } } } } }, "400": { "description": "Request has invalid parameters.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestErrorResponse" } } } }, "401": { "description": "Error response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestErrorResponse" } } } }, "409": { "description": "Error response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestErrorResponse" } } } } }, "description": "Estimate the gas cost of broadcasting a TransactionIntent.\n\nThis is a simulation, it does not send the transaction on-chain.\n\nIf a Policy ID is used that includes payment of gas in ERC-20 tokens, an extra field `estimatedTXGasFeeToken` is returned with the estimated amount of tokens that will be used.", "summary": "Estimate gas cost of creating a transaction", "tags": [ "TransactionIntents" ], "security": [ { "sk": [] }, { "pk_third_party": [] }, { "pk_access_token": [] }, { "pk_identity_token": [] }, { "better_auth": [] } ], "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateTransactionIntentRequest" } } } } } }, "/v1/transaction_intents/{id}/signature": { "post": { "operationId": "Signature", "responses": { "200": { "description": "Successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TransactionIntentResponse" }, "examples": { "Example 1": { "value": { "id": "tin_c502d628-5bb3-42f2-b8f5-62ba4d71df3a", "createdAt": 1689869074, "object": "transactionIntent", "details": { "userOperationHash": "0x25d3...005c", "userOperation": { "sender": "0x48930Cd730652bf0B18Ef8c80cD0Fa1Cc72A233E", "nonce": "0x2", "initCode": "0x", "callData": "0xb61d...0000", "callGasLimit": "0x27863", "verificationGasLimit": "0x16001", "preVerificationGas": "0xb818", "maxFeePerGas": "0x62590091", "maxPriorityFeePerGas": "0x62590091", "paymasterAndData": "0x3210...b51c", "signature": "0x6202...3d1b" } }, "chainId": 80002, "abstractionType": "accountAbstractionV6", "updatedAt": 1689869074, "policy": { "id": "pol_..." }, "player": { "id": "pla_..." }, "account": { "id": "acc_..." }, "response": { "createdAt": 1689869074, "logs": [ { "removed": false, "transactionIndex": 0, "blockNumber": 44904492, "transactionHash": "0x25d3...005c", "address": "0x5FF1...2789", "topics": [ "0xbb47...f972" ], "data": "0x", "logIndex": 0, "blockHash": "0x8a69...6d59" } ], "blockNumber": 8789286, "transactionHash": "0x25d3...005c", "to": "0x0576...1B57", "gasUsed": "336730", "status": 1 }, "interactions": [ { "functionName": "mint", "contract": "con_...", "functionArgs": [ "0x63B7...484f" ] } ], "transitions": [ { "fromStatus": "none", "toStatus": "new", "at": 1750154762 }, { "fromStatus": "new", "toStatus": "sent", "at": 1750154762 }, { "fromStatus": "sent", "toStatus": "indexed", "at": 1750154762 } ] } } } } } }, "401": { "description": "Error response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestErrorResponse" } } } }, "409": { "description": "Error response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestErrorResponse" } } } } }, "description": "Broadcasts a signed TransactionIntent to the blockchain.\n\nUse this endpoint to send the signed `signableHash`. Openfort will then put it on-chain.", "summary": "Send a signed transaction signableHash.", "tags": [ "TransactionIntents" ], "security": [ { "pk": [] }, { "sk": [] }, { "pk_identity_token": [] } ], "parameters": [ { "description": "Specifies the unique transaction intent ID (starts with tin_).", "in": "path", "name": "id", "required": true, "schema": { "type": "string" }, "example": "tin_48eeba57-2cd5-4159-a2cb-057a23a35e65" } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SignatureRequest" } } } } } }, "/v1/subscriptions": { "get": { "operationId": "GetSubscriptions", "responses": { "200": { "description": "Successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SubscriptionListResponse" }, "examples": { "Example 1": { "value": { "object": "list", "url": "/v1/subscriptions", "start": 0, "end": 1, "total": 1, "data": [ { "id": "sub_7b9f89cf2-c185-40f4-beef-2a250d7a472b", "object": "subscription", "topic": "transaction_intent.broadcast", "triggers": [ { "id": "tri_7b9f89cf2-c185-40f4-beef-2a250d7a472b", "object": "trigger", "target": "https://webhook.site/7b9f89cf2-c185-40f4-beef-2a250d7a472b", "type": "webhook", "createdAt": 1617226800, "subscription": "sub_7b9f89cf2-c185-40f4-beef-2a250d7a472b", "updatedAt": 1617226800 } ], "createdAt": 1617226800, "updatedAt": 1617226800 } ] } } } } } }, "401": { "description": "Error response." } }, "description": "Returns a list of subscriptions for the given project.\n\nThis object represents the subscriptions where the project owner has subscribed to.\n\nSubscriptions are returned sorted by creation date, with the most recently created subscriptions appearing first.\n\nBy default, a maximum of 10 subscriptions are shown per page.", "summary": "List subscriptions of project.", "tags": [ "Subscriptions" ], "security": [ { "sk": [] }, { "user_project": [] } ], "parameters": [] }, "post": { "operationId": "CreateSubscription", "responses": { "201": { "description": "Successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateSubscriptionResponse" }, "examples": { "Example 1": { "value": { "id": "sub_7b9f89cf2-c185-40f4-beef-2a250d7a472b", "object": "subscription", "topic": "transaction_intent.broadcast", "triggers": [ { "id": "tri_7b9f89cf2-c185-40f4-beef-2a250d7a472b", "object": "trigger", "target": "https://webhook.site/7b9f89cf2-c185-40f4-beef-2a250d7a472b", "type": "webhook", "createdAt": 1617226800, "subscription": "sub_7b9f89cf2-c185-40f4-beef-2a250d7a472b", "updatedAt": 1617226800 } ], "createdAt": 1617226800, "updatedAt": 1617226800 } } } } } }, "401": { "description": "Error response." } }, "description": "Creates a subscription for the given project.\n\nThis object represents the subscription where the project owner has subscribed to.", "summary": "Create subscription for project.", "tags": [ "Subscriptions" ], "security": [ { "sk": [] }, { "user_project": [] } ], "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateSubscriptionRequest" } } } } } }, "/v1/subscriptions/logs": { "get": { "operationId": "ListSubscriptionLogs", "responses": { "200": { "description": "Successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SubscriptionLogsResponse" }, "examples": { "Example 1": { "value": { "object": "list", "url": "/v1/subscriptions/logs", "start": 0, "end": 1, "total": 1, "data": [ { "id": "eve_7b9f89cf2-c185-40f4-beef-2a250d7a472b", "object": "log", "topic": "transaction_intent.broadcast", "status": "success", "createdAt": 1617226800, "subscription": "sub_7b9f89cf2-c185-40f4-beef-2a250d7a472b", "trigger": "tri_7b9f89cf2-c185-40f4-beef-2a250d7a472b", "requestID": "c1852a250d7a472b" } ] } } } } } }, "401": { "description": "Error response." } }, "description": "Lists logs of the triggered subscriptions for the given project.\n\nThis object represents the logs of the triggered subscriptions where the project owner has subscribed to.", "summary": "List logs of triggered subscriptions.", "tags": [ "Subscriptions" ], "security": [ { "sk": [] }, { "user_project": [] } ], "parameters": [ { "description": "Specifies the maximum number of records to return.", "in": "query", "name": "limit", "required": false, "schema": { "format": "int32", "type": "integer", "minimum": 1 } }, { "description": "Specifies the offset for the first records to return.", "in": "query", "name": "skip", "required": false, "schema": { "format": "int32", "type": "integer", "minimum": 0 } }, { "description": "Specifies the order in which to sort the results.", "in": "query", "name": "order", "required": false, "schema": { "$ref": "#/components/schemas/Prisma.SortOrder" } }, { "description": "Specifies the topic of the subscription logs", "in": "query", "name": "topic", "required": false, "schema": { "$ref": "#/components/schemas/APITopic" } }, { "description": "Specifies the status of the subscription logs", "in": "query", "name": "status", "required": false, "schema": { "$ref": "#/components/schemas/Status" } }, { "description": "Specifies the object ID of the object related to triggered notification", "in": "query", "name": "object", "required": false, "schema": { "type": "string" }, "example": "obj_6f6c9067-89fa-4fc8-ac72-c242a268c584" }, { "description": "Specifies the subscription ID", "in": "query", "name": "subscription", "required": false, "schema": { "type": "string" }, "example": "sub_6f6c9067-89fa-4fc8-ac72-c242a268c584" }, { "description": "Specifies the trigger ID", "in": "query", "name": "trigger", "required": false, "schema": { "type": "string" }, "example": "tri_6f6c9067-89fa-4fc8-ac72-c242a268c584" }, { "description": "Specifies the request ID", "in": "query", "name": "requestID", "required": false, "schema": { "type": "string" }, "example": "89fac242a268c584" } ] } }, "/v1/subscriptions/{id}": { "get": { "operationId": "GetSubscription", "responses": { "200": { "description": "Successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GetSubscriptionResponse" }, "examples": { "Example 1": { "value": { "id": "sub_7b9f89cf2-c185-40f4-beef-2a250d7a472b", "object": "subscription", "topic": "transaction_intent.broadcast", "triggers": [ { "id": "tri_7b9f89cf2-c185-40f4-beef-2a250d7a472b", "object": "trigger", "target": "https://webhook.site/7b9f89cf2-c185-40f4-beef-2a250d7a472b", "type": "webhook", "createdAt": 1617226800, "subscription": "sub_7b9f89cf2-c185-40f4-beef-2a250d7a472b", "updatedAt": 1617226800 } ], "createdAt": 1617226800, "updatedAt": 1617226800 } } } } } }, "401": { "description": "Error response." }, "404": { "description": "Subscription not found." } }, "description": "Returns a subscription for the given project.\n\nThis object represents the subscription where the project owner has subscribed to.", "summary": "Get subscription of project.", "tags": [ "Subscriptions" ], "security": [ { "sk": [] }, { "user_project": [] } ], "parameters": [ { "description": "Specifies the unique subscription ID (starts with sub_).", "in": "path", "name": "id", "required": true, "schema": { "type": "string" }, "example": "sub_4194ad24-c818-4e5c-b003-9cc2aa7df53b" } ] }, "delete": { "operationId": "DeleteSubscription", "responses": { "201": { "description": "Successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SubscriptionDeleteResponse" }, "examples": { "Example 1": { "value": { "deleted": true, "id": "sub_7b9f89cf2-c185-40f4-beef-2a250d7a472b", "object": "subscription" } } } } } }, "401": { "description": "Error response." }, "404": { "description": "Subscription not found." } }, "description": "Deletes a subscription for the given project.\n\nThis object represents the subscription where the project owner has subscribed to.", "summary": "Delete subscription of project.", "tags": [ "Subscriptions" ], "security": [ { "sk": [] }, { "user_project": [] } ], "parameters": [ { "description": "Specifies the unique subscription ID (starts with sub_).", "in": "path", "name": "id", "required": true, "schema": { "type": "string" }, "example": "sub_4194ad24-c818-4e5c-b003-9cc2aa7df53b" } ] } }, "/v1/subscriptions/{id}/triggers": { "get": { "operationId": "GetTriggers", "responses": { "200": { "description": "Successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TriggerListResponse" }, "examples": { "Example 1": { "value": { "object": "list", "url": "v1/triggers", "start": 0, "end": 1, "total": 1, "data": [ { "id": "tri_7b9f89cf2-c185-40f4-beef-2a250d7a472b", "object": "trigger", "target": "https://webhook.site/7b9f89cf2-c185-40f4-beef-2a250d7a472b", "type": "webhook", "createdAt": 1617226800, "subscription": "sub_7b9f89cf2-c185-40f4-beef-2a250d7a472b", "updatedAt": 1617226800 } ] } } } } } }, "401": { "description": "Error response." }, "404": { "description": "Subscription not found." } }, "description": "Returns a list of triggers for the given subscription.\n\nThis object represents the triggers where the subscription owner has subscribed to.\n\nTriggers are returned sorted by creation date, with the most recently created triggers appearing first.\n\nBy default, a maximum of 10 triggers are shown per page.", "summary": "List triggers of subscription.", "tags": [ "Subscriptions" ], "security": [ { "sk": [] }, { "user_project": [] } ], "parameters": [ { "description": "Specifies the unique subscription ID (starts with sub_).", "in": "path", "name": "id", "required": true, "schema": { "type": "string" }, "example": "sub_4194ad24-c818-4e5c-b003-9cc2aa7df53b" } ] }, "post": { "operationId": "CreateTrigger", "responses": { "201": { "description": "Successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateTriggerResponse" }, "examples": { "Example 1": { "value": { "id": "tri_7b9f89cf2-c185-40f4-beef-2a250d7a472b", "object": "trigger", "target": "https://webhook.site/7b9f89cf2-c185-40f4-beef-2a250d7a472b", "type": "webhook", "createdAt": 1617226800, "subscription": "sub_7b9f89cf2-c185-40f4-beef-2a250d7a472b", "updatedAt": 1617226800 } } } } } }, "401": { "description": "Error response." }, "404": { "description": "Subscription not found." } }, "description": "Creates a trigger for the given subscription.\n\nThis object represents the trigger where the subscription owner has subscribed to.", "summary": "Create trigger for subscription.", "tags": [ "Subscriptions" ], "security": [ { "sk": [] }, { "user_project": [] } ], "parameters": [ { "description": "Specifies the unique subscription ID (starts with sub_).", "in": "path", "name": "id", "required": true, "schema": { "type": "string" }, "example": "sub_4194ad24-c818-4e5c-b003-9cc2aa7df53b" } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateTriggerRequest" } } } } } }, "/v1/subscriptions/{id}/triggers/{triggerId}": { "get": { "operationId": "GetTrigger", "responses": { "200": { "description": "Successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GetTriggerResponse" }, "examples": { "Example 1": { "value": { "id": "tri_7b9f89cf2-c185-40f4-beef-2a250d7a472b", "object": "trigger", "target": "https://webhook.site/7b9f89cf2-c185-40f4-beef-2a250d7a472b", "type": "webhook", "createdAt": 1617226800, "subscription": "sub_7b9f89cf2-c185-40f4-beef-2a250d7a472b", "updatedAt": 1617226800 } } } } } }, "401": { "description": "Error response." }, "404": { "description": "Trigger not found." } }, "description": "Returns a trigger for the given id.\n\nThis object represents the trigger where the subscription owner has subscribed to.", "summary": "Get trigger by id.", "tags": [ "Subscriptions" ], "security": [ { "sk": [] }, { "user_project": [] } ], "parameters": [ { "description": "Specifies the unique subscription ID (starts with sub_).", "in": "path", "name": "id", "required": true, "schema": { "type": "string" }, "example": "sub_4194ad24-c818-4e5c-b003-9cc2aa7df53b" }, { "description": "Specifies the unique subscription ID (starts with sub_).", "in": "path", "name": "triggerId", "required": true, "schema": { "type": "string" }, "example": "tri_6194ad12-a213-1e5c-b003-8040fa3c9c48" } ] }, "delete": { "operationId": "DeleteTrigger", "responses": { "201": { "description": "Successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TriggerDeleteResponse" }, "examples": { "Example 1": { "value": { "deleted": true, "id": "tri_7b9f89cf2-c185-40f4-beef-2a250d7a472b", "object": "trigger" } } } } } }, "401": { "description": "Error response." }, "404": { "description": "Trigger not found." } }, "description": "Deletes a trigger for the given subscription.\n\nThis object represents the trigger where the subscription owner has subscribed to.", "summary": "Delete trigger of subscription.", "tags": [ "Subscriptions" ], "security": [ { "sk": [] }, { "user_project": [] } ], "parameters": [ { "description": "Specifies the unique subscription ID (starts with sub_).", "in": "path", "name": "id", "required": true, "schema": { "type": "string" }, "example": "sub_4194ad24-c818-4e5c-b003-9cc2aa7df53b" }, { "description": "Specifies the unique subscription ID (starts with sub_).", "in": "path", "name": "triggerId", "required": true, "schema": { "type": "string" }, "example": "tri_6194ad12-a213-1e5c-b003-8040fa3c9c48" } ] } }, "/v1/subscriptions/test": { "post": { "operationId": "TestTrigger", "responses": { "200": { "description": "Successful response.", "content": { "application/json": { "schema": { "properties": { "sent": { "type": "boolean" } }, "required": [ "sent" ], "type": "object" } } } }, "401": { "description": "Error response." }, "404": { "description": "Trigger not found." } }, "description": "Test a trigger\n\nReturns a trigger for the given id.", "summary": "Test trigger by id.", "tags": [ "Subscriptions" ], "security": [ { "sk": [] }, { "user_project": [] } ], "parameters": [] } }, "/v1/settings/developer_accounts": { "get": { "operationId": "GetDeveloperAccounts", "responses": { "200": { "description": "Successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DeveloperAccountListResponse" }, "examples": { "Example 1": { "value": { "url": "/v1/settings/developer_accounts", "object": "list", "data": [ { "id": "dac_00000000-0000-0000-0000-000000000000", "address": "0x0000000000000000000000000000000000000000", "name": "Escrow Account", "custodial": true, "createdAt": 1609459200, "object": "developerAccount", "transactionIntents": [ { "id": "tin_c502d628-5bb3-42f2-b8f5-62ba4d71df3a" } ] }, { "id": "dac_88888888-8888-8888-8888-888888888888", "address": "0x8888888888888888888888888888888888888888", "name": "Escrow Account 2", "custodial": true, "createdAt": 1609459200, "object": "developerAccount" } ], "start": 0, "end": 2, "total": 2 } } } } } }, "401": { "description": "Error response." }, "409": { "description": "Error response." } }, "description": "Retrieve the list of the developer accounts for the current project.\n\nReturns the latest 10 transaction intents that were created with each developer account.\n\nBy default, a maximum of 10 accounts are shown per page.", "summary": "List of developer accounts.", "tags": [ "Settings" ], "security": [ { "sk": [] }, { "user_project": [] } ], "parameters": [ { "description": "Specifies the maximum number of records to return.", "in": "query", "name": "limit", "required": false, "schema": { "format": "int32", "type": "integer", "minimum": 1 } }, { "description": "Specifies the offset for the first records to return.", "in": "query", "name": "skip", "required": false, "schema": { "format": "int32", "type": "integer", "minimum": 0 } }, { "description": "Specifies the order in which to sort the results.", "in": "query", "name": "order", "required": false, "schema": { "$ref": "#/components/schemas/Prisma.SortOrder" } }, { "description": "Specifies the fields to expand in the response.", "in": "query", "name": "expand", "required": false, "schema": { "type": "array", "items": { "$ref": "#/components/schemas/DeveloperAccountResponseExpandable" } }, "example": [ "transactionIntents" ] }, { "description": "Specifies whether to include deleted dev accounts.", "in": "query", "name": "deleted", "required": false, "schema": { "type": "boolean" }, "example": false } ] }, "post": { "operationId": "CreateDeveloperAccount", "responses": { "200": { "description": "Successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DeveloperAccountResponse" }, "examples": { "Example 1": { "value": { "id": "dac_00000000-0000-0000-0000-000000000000", "address": "0x0000000000000000000000000000000000000000", "name": "Escrow Account", "custodial": true, "createdAt": 1609459200, "object": "developerAccount", "transactionIntents": [ { "id": "tin_c502d628-5bb3-42f2-b8f5-62ba4d71df3a" } ] } } } } } }, "401": { "description": "Error response." }, "409": { "description": "Error response." } }, "description": "Create or add a developer account.\nTo add your own external account, add a signature and the address of the account. This verified account can then be used as a verified depositor", "summary": "Create a developer account.", "tags": [ "Settings" ], "security": [ { "sk": [] }, { "user_project": [] } ], "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateDeveloperAccountCreateRequest" } } } } } }, "/v1/settings/developer_accounts/{id}/sign_payload": { "post": { "operationId": "SignPayloadDeveloperAccount", "responses": { "200": { "description": "Successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SignPayloadResponse" } } } }, "401": { "description": "Error response." }, "409": { "description": "Error response." } }, "description": "Signs the typed repositories value with types repositories structure for domain using the [EIP-712](https://eips.ethereum.org/EIPS/eip-712) specification.", "summary": "Sign a given payload", "tags": [ "Settings" ], "security": [ { "sk": [] } ], "parameters": [ { "description": "Specifies the unique developer account ID (starts with dac_).", "in": "path", "name": "id", "required": true, "schema": { "type": "string" }, "example": "dac_4194ad24-c818-4e5c-b003-9cc2aa7df53b" } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SignPayloadRequest" } } } } } }, "/v1/settings/developer_accounts/{id}": { "post": { "operationId": "UpdateDeveloperAccount", "responses": { "200": { "description": "Successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DeveloperAccountResponse" }, "examples": { "Example 1": { "value": { "id": "dac_00000000-0000-0000-0000-000000000000", "address": "0x0000000000000000000000000000000000000000", "name": "Escrow Account", "custodial": true, "createdAt": 1609459200, "object": "developerAccount", "transactionIntents": [ { "id": "tin_c502d628-5bb3-42f2-b8f5-62ba4d71df3a" } ] } } } } } }, "401": { "description": "Error response." }, "409": { "description": "Error response." } }, "description": "Update a developer account.", "summary": "Update a developer account.", "tags": [ "Settings" ], "security": [ { "sk": [] }, { "user_project": [] } ], "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateDeveloperAccountCreateRequest" } } } } }, "get": { "operationId": "GetDeveloperAccount", "responses": { "200": { "description": "Successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DeveloperAccountResponse" }, "examples": { "Example 1": { "value": { "id": "dac_00000000-0000-0000-0000-000000000000", "address": "0x0000000000000000000000000000000000000000", "name": "Escrow Account", "custodial": true, "createdAt": 1609459200, "object": "developerAccount", "transactionIntents": [ { "id": "tin_c502d628-5bb3-42f2-b8f5-62ba4d71df3a" } ] } } } } } }, "401": { "description": "Error response." }, "409": { "description": "Error response." } }, "description": "Retrieve a developer account.\n\nReturns the latest 10 transaction intents that were created with each developer account.", "summary": "Get existing developer account.", "tags": [ "Settings" ], "security": [ { "sk": [] }, { "user_project": [] } ], "parameters": [ { "description": "Specifies the unique developer account ID (starts with dac_).", "in": "path", "name": "id", "required": true, "schema": { "type": "string" }, "example": "dac_4194ad24-c818-4e5c-b003-9cc2aa7df53b" }, { "in": "query", "name": "expand", "required": false, "schema": { "default": [], "type": "array", "items": { "$ref": "#/components/schemas/DeveloperAccountResponseExpandable" } } } ] }, "delete": { "operationId": "DeleteDeveloperAccount", "responses": { "200": { "description": "Successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DeveloperAccountDeleteResponse" }, "examples": { "Example 1": { "value": { "id": "dac_00000000-0000-0000-0000-000000000000", "object": "developerAccount", "deleted": true } } } } } }, "401": { "description": "Error response." }, "409": { "description": "Error response." } }, "description": "Delete a developer account from the current project.", "summary": "Delete a developer account.", "tags": [ "Settings" ], "security": [ { "sk": [] }, { "user_project": [] } ], "parameters": [ { "description": "Specifies a unique developer account (starts with dac_).", "in": "path", "name": "id", "required": true, "schema": { "type": "string" }, "example": "dac_0cddb398-1dc6-4e6f-8726-9ec7cea85f35" } ] } }, "/v1/settings/developer_accounts/message_to_sign": { "get": { "operationId": "GetVerificationPayload", "responses": { "200": { "description": "Successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DeveloperAccountGetMessageResponse" }, "examples": { "Example 1": { "value": { "message": "I want to register 0x0000000000000000000000000000000000000000 to the project 33333333-3333-3333-3333-333333333333 for mainnets on 20231231", "address": "0x0000000000000000000000000000000000000000" } } } } } }, "401": { "description": "Error response." }, "409": { "description": "Error response." } }, "description": "Generate message, which should be signed by the account your want to add as a developer account.", "summary": "Generate message to sign", "tags": [ "Settings" ], "security": [ { "sk": [] }, { "user_project": [] } ], "parameters": [ { "description": "Specifies the address", "in": "query", "name": "address", "required": true, "schema": { "type": "string" }, "example": "0x662D24Bf7Ea2dD6a7D0935F680a6056b94fE934d" } ] } }, "/v1/sessions": { "get": { "operationId": "GetPlayerSessions", "responses": { "200": { "description": "Successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SessionListResponse" }, "examples": { "Example 1": { "value": { "object": "list", "url": "/v1/sessions", "start": 0, "end": 1, "total": 1, "data": [ { "id": "ses_...", "createdAt": 1689869074, "address": "0x8C5cedA46A26214A52A9D7BF036Ad2F6255BdBEa", "updatedAt": 1689869074, "account": { "id": "acc_..." }, "isActive": true, "validAfter": "1650000000", "validUntil": "1700000000", "whitelist": [], "limit": 100, "nextAction": { "type": "sign_with_wallet", "payload": { "signableHash": "0x25d3...005c" } }, "transactionIntents": [ { "id": "tin_..." } ], "object": "session" } ] } } } } } }, "401": { "description": "Error response." } }, "description": "Returns a list of Sessions.\n\nReturns the latest 10 transaction intents for each session.", "summary": "List session keys of a player.", "tags": [ "Sessions" ], "security": [ { "sk": [] }, { "user_project": [] } ], "parameters": [ { "description": "Specifies the maximum number of records to return.", "in": "query", "name": "limit", "required": false, "schema": { "format": "int32", "type": "integer", "minimum": 1 } }, { "description": "Specifies the offset for the first records to return.", "in": "query", "name": "skip", "required": false, "schema": { "format": "int32", "type": "integer", "minimum": 0 } }, { "description": "Specifies the order in which to sort the results.", "in": "query", "name": "order", "required": false, "schema": { "$ref": "#/components/schemas/Prisma.SortOrder" } }, { "description": "The player ID (starts with pla_)", "in": "query", "name": "player", "required": true, "schema": { "type": "string" }, "example": "pla_48eeba57-2cd5-4159-a2cb-057a23a35e65" }, { "description": "Specifies the fields to expand in the response.", "in": "query", "name": "expand", "required": false, "schema": { "type": "array", "items": { "$ref": "#/components/schemas/SessionResponseExpandable" } } } ] }, "post": { "operationId": "CreateSession", "responses": { "200": { "description": "Successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SessionResponse" }, "examples": { "Example 1": { "value": { "id": "ses_...", "createdAt": 1689869074, "address": "0x8C5cedA46A26214A52A9D7BF036Ad2F6255BdBEa", "updatedAt": 1689869074, "account": { "id": "acc_..." }, "isActive": true, "validAfter": "1650000000", "validUntil": "1700000000", "whitelist": [], "limit": 100, "nextAction": { "type": "sign_with_wallet", "payload": { "signableHash": "0x25d3...005c" } }, "transactionIntents": [ { "id": "tin_..." } ], "object": "session" } } } } } }, "401": { "description": "Error response." }, "409": { "description": "Error response." } }, "description": "Creates a Session.", "summary": "Create a session key.", "tags": [ "Sessions" ], "security": [ { "sk": [] }, { "pk_third_party": [] }, { "pk_access_token": [] }, { "pk_identity_token": [] }, { "better_auth": [] } ], "parameters": [ { "in": "header", "name": "X-Behalf-Of-Project", "required": false, "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateSessionRequest" } } } } } }, "/v1/sessions/revoke": { "post": { "operationId": "RevokeSession", "responses": { "200": { "description": "Successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SessionResponse" }, "examples": { "Example 1": { "value": { "id": "ses_...", "createdAt": 1689869074, "address": "0x8C5cedA46A26214A52A9D7BF036Ad2F6255BdBEa", "updatedAt": 1689869074, "account": { "id": "acc_..." }, "isActive": true, "validAfter": "1650000000", "validUntil": "1700000000", "whitelist": [], "limit": 100, "nextAction": { "type": "sign_with_wallet", "payload": { "signableHash": "0x25d3...005c" } }, "transactionIntents": [ { "id": "tin_..." } ], "object": "session" } } } } } }, "401": { "description": "Error response." }, "409": { "description": "Error response." } }, "summary": "Revoke the session session key.", "tags": [ "Sessions" ], "security": [ { "sk": [] }, { "pk_third_party": [] }, { "pk_access_token": [] }, { "pk_identity_token": [] }, { "better_auth": [] } ], "parameters": [ { "in": "header", "name": "X-Behalf-Of-Project", "required": false, "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RevokeSessionRequest" } } } } } }, "/v1/sessions/{id}/signature": { "post": { "operationId": "SignatureSession", "responses": { "200": { "description": "Successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SessionResponse" }, "examples": { "Example 1": { "value": { "id": "ses_...", "createdAt": 1689869074, "address": "0x8C5cedA46A26214A52A9D7BF036Ad2F6255BdBEa", "updatedAt": 1689869074, "account": { "id": "acc_..." }, "isActive": true, "validAfter": "1650000000", "validUntil": "1700000000", "whitelist": [], "limit": 100, "nextAction": { "type": "sign_with_wallet", "payload": { "signableHash": "0x25d3...005c" } }, "transactionIntents": [ { "id": "tin_..." } ], "object": "session" } } } } } }, "401": { "description": "Error response." }, "409": { "description": "Error response." } }, "summary": "Send signed userOperationHash to create session.", "tags": [ "Sessions" ], "security": [ { "pk": [] }, { "sk": [] }, { "pk_identity_token": [] }, { "better_auth": [] } ], "parameters": [ { "description": "Specifies the unique session ID (starts with ses_).", "in": "path", "name": "id", "required": true, "schema": { "type": "string" }, "example": "ses_4194ad24-c818-4e5c-b003-9cc2aa7df53b" } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SignatureRequest" } } } } } }, "/v1/sessions/{id}": { "get": { "operationId": "GetSession", "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SessionResponse" }, "examples": { "Example 1": { "value": { "id": "ses_...", "createdAt": 1689869074, "address": "0x8C5cedA46A26214A52A9D7BF036Ad2F6255BdBEa", "updatedAt": 1689869074, "account": { "id": "acc_..." }, "isActive": true, "validAfter": "1650000000", "validUntil": "1700000000", "whitelist": [], "limit": 100, "nextAction": { "type": "sign_with_wallet", "payload": { "signableHash": "0x25d3...005c" } }, "transactionIntents": [ { "id": "tin_..." } ], "object": "session" } } } } } }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Session not found" } }, "description": "Retrieves the details of a Session that has previously been created.\n\nReturns the latest 10 transaction intents that used this session.", "summary": "Returns a player session by session id", "tags": [ "Sessions" ], "security": [ { "sk": [] }, { "user_project": [] } ], "parameters": [ { "description": "Specifies the unique session ID (starts with ses_).", "in": "path", "name": "id", "required": true, "schema": { "type": "string" }, "example": "ses_4194ad24-c818-4e5c-b003-9cc2aa7df53b" }, { "description": "Specifies the fields to expand.", "in": "query", "name": "expand", "required": false, "schema": { "default": [], "type": "array", "items": { "$ref": "#/components/schemas/SessionResponseExpandable" } }, "example": [ "transactionIntents" ] } ] } }, "/v1/policy_rules": { "get": { "operationId": "GetPolicyRules", "responses": { "200": { "description": "Successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PolicyRuleListResponse" }, "examples": { "Example 1": { "value": { "object": "list", "url": "/v1/policy_rules", "start": 0, "end": 1, "total": 1, "data": [ { "createdAt": 1689869074, "id": "afu_...", "wildcard": false, "object": "policyRule", "type": "contract_functions", "contract": { "id": "con_..." }, "functionName": "mint" } ] } } } } } }, "401": { "description": "Error response." } }, "description": "Returns a list of policy rules of a policy.\n\nThe policy rules are returned sorted by creation date, with the most recently created policy rules appearing first.\n\nBy default, a maximum of 10 policy rules are shown per page.", "summary": "List policy rules of a policy.", "tags": [ "PolicyRules" ], "security": [ { "sk": [] }, { "user_project": [] } ], "parameters": [ { "description": "Specifies the maximum number of records to return.", "in": "query", "name": "limit", "required": false, "schema": { "format": "int32", "type": "integer", "minimum": 1 } }, { "description": "Specifies the offset for the first records to return.", "in": "query", "name": "skip", "required": false, "schema": { "format": "int32", "type": "integer", "minimum": 0 } }, { "description": "Specifies the order in which to sort the results.", "in": "query", "name": "order", "required": false, "schema": { "$ref": "#/components/schemas/Prisma.SortOrder" } }, { "description": "Specifies the fields to expand in the response.", "in": "query", "name": "expand", "required": false, "schema": { "type": "array", "items": { "type": "string", "enum": [ "contract" ], "nullable": false } } }, { "description": "Specifies the unique policy ID (starts with pol_).", "in": "query", "name": "policy", "required": true, "schema": { "type": "string" }, "example": "pol_48eeba57-2cd5-4159-a2cb-057a23a35e65" } ] }, "post": { "operationId": "CreatePolicyRule", "responses": { "200": { "description": "Successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PolicyRuleResponse" }, "examples": { "Limit contract sponsorship": { "value": { "createdAt": 1689869074, "id": "afu_...", "wildcard": false, "object": "policyRule", "type": "contract_functions", "contract": { "id": "con_..." }, "functionName": "mint" } }, "Limit number of sponsored txns": { "value": { "createdAt": 1689869074, "id": "afu_...", "object": "policyRule", "type": "rate_limit", "functionName": "count_per_interval", "countLimit": 100, "timeIntervalType": "day", "timeIntervalValue": 1 } }, "Limit gas sponsored in interval": { "value": { "createdAt": 1689869074, "id": "afu_...", "object": "policyRule", "type": "rate_limit", "functionName": "gas_per_interval", "gasLimit": "1000000000000000000", "timeIntervalType": "day", "timeIntervalValue": 1 } }, "Limit gas spent per txn": { "value": { "createdAt": 1689869074, "id": "afu_...", "object": "policyRule", "type": "rate_limit", "functionName": "gas_per_transaction", "gasLimit": "1000000000000000000" } }, "Allow self account sponsorship": { "value": { "createdAt": 1689869074, "id": "afu_...", "object": "policyRule", "type": "account_functions" } } } } } }, "401": { "description": "Error response." }, "409": { "description": "Error response." } }, "summary": "Create a policy rule object.", "tags": [ "PolicyRules" ], "security": [ { "sk": [] }, { "user_project": [] } ], "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreatePolicyRuleRequest" } } } } } }, "/v1/policy_rules/{id}": { "post": { "operationId": "UpdatePolicyRule", "responses": { "200": { "description": "Successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PolicyRuleResponse" }, "examples": { "Example 1": { "value": { "createdAt": 1689869074, "id": "afu_...", "object": "policyRule", "type": "rate_limit", "functionName": "count_per_interval", "countLimit": 100, "timeIntervalType": "day", "timeIntervalValue": 1 } } } } } }, "401": { "description": "Error response." }, "409": { "description": "Error response." } }, "summary": "Update a policy rule object.", "tags": [ "PolicyRules" ], "security": [ { "sk": [] }, { "user_project": [] } ], "parameters": [ { "description": "Specifies the unique policy rule ID (starts with afu_).", "in": "path", "name": "id", "required": true, "schema": { "type": "string" }, "example": "afu_4194ad24-c818-4e5c-b003-9cc2aa7df53b" } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdatePolicyRuleRequest" } } } } }, "delete": { "operationId": "DeletePolicyRule", "responses": { "200": { "description": "Successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PolicyRuleDeleteResponse" }, "examples": { "Example 1": { "value": { "id": "afu_...", "object": "policyRule", "deleted": true } } } } } }, "401": { "description": "Error response." }, "409": { "description": "Error response." } }, "summary": "Deletes a policy rule object.", "tags": [ "PolicyRules" ], "security": [ { "sk": [] }, { "user_project": [] } ], "parameters": [ { "description": "Specifies the unique policy rule ID (starts with afu_).", "in": "path", "name": "id", "required": true, "schema": { "type": "string" }, "example": "afu_4194ad24-c818-4e5c-b003-9cc2aa7df53b" } ] } }, "/v1/policies": { "get": { "operationId": "GetPolicies", "responses": { "200": { "description": "Successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PolicyListResponse" }, "examples": { "Example 1": { "value": { "object": "list", "url": "/v1/policies", "start": 0, "end": 1, "total": 1, "data": [ { "id": "pol_...", "createdAt": 1689869074, "name": "TEST", "chainId": 80002, "strategy": { "sponsorSchema": "pay_for_user" }, "deleted": false, "enabled": true, "object": "policy", "transactionIntents": [ { "id": "tin_..." } ], "policyRules": [ { "createdAt": 1689869074, "id": "afu_...", "functionName": "mint" } ] } ] } } } } } }, "401": { "description": "Error response." } }, "description": "Returns a list of Policies.\n\nReturns the latest 10 transaction intents for each policy.", "summary": "List policies.", "tags": [ "Policies" ], "security": [ { "sk": [] }, { "user_project": [] } ], "parameters": [ { "description": "Specifies the maximum number of records to return.", "in": "query", "name": "limit", "required": false, "schema": { "format": "int32", "type": "integer", "minimum": 1 } }, { "description": "Specifies the offset for the first records to return.", "in": "query", "name": "skip", "required": false, "schema": { "format": "int32", "type": "integer", "minimum": 0 } }, { "description": "Specifies the order in which to sort the results.", "in": "query", "name": "order", "required": false, "schema": { "$ref": "#/components/schemas/Prisma.SortOrder" } }, { "description": "Specifies the fields to expand in the response.", "in": "query", "name": "expand", "required": false, "schema": { "type": "array", "items": { "$ref": "#/components/schemas/PolicyResponseExpandable" } } }, { "description": "Specifies the name of the policy.", "in": "query", "name": "name", "required": false, "schema": { "type": "string" }, "example": "MyPolicy" }, { "description": "Specifies whether to include deleted policies.", "in": "query", "name": "deleted", "required": false, "schema": { "type": "boolean" }, "example": true }, { "description": "The chain ID of the policy.", "in": "query", "name": "chainId", "required": false, "schema": { "format": "int32", "type": "integer" }, "example": 80002 }, { "description": "Specifies whether to include enabled policies.", "in": "query", "name": "enabled", "required": false, "schema": { "type": "boolean" }, "example": true } ] }, "post": { "operationId": "CreatePolicy", "responses": { "200": { "description": "Successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PolicyResponse" }, "examples": { "Example 1": { "value": { "id": "pol_...", "createdAt": 1689869074, "name": "TEST", "chainId": 80002, "strategy": { "sponsorSchema": "pay_for_user" }, "deleted": false, "enabled": true, "object": "policy", "transactionIntents": [ { "id": "tin_..." } ], "policyRules": [ { "createdAt": 1689869074, "id": "afu_...", "functionName": "mint" } ] } } } } } }, "401": { "description": "Error response." }, "409": { "description": "Error response." } }, "summary": "Create a policy object.", "tags": [ "Policies" ], "security": [ { "sk": [] }, { "user_project": [] } ], "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreatePolicyRequest" } } } } } }, "/v1/policies/{id}": { "get": { "operationId": "GetPolicy", "responses": { "200": { "description": "Successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PolicyResponse" }, "examples": { "Example 1": { "value": { "id": "pol_...", "createdAt": 1689869074, "name": "TEST", "chainId": 80002, "strategy": { "sponsorSchema": "pay_for_user" }, "deleted": false, "enabled": true, "object": "policy", "transactionIntents": [ { "id": "tin_..." } ], "policyRules": [ { "createdAt": 1689869074, "id": "afu_...", "functionName": "mint" } ] } } } } } }, "401": { "description": "Error response." } }, "description": "Retrieves the details of a Policy that has previously been created.\n\nReturns the latest 10 transaction intents that used this policy.", "summary": "Get a policy object.", "tags": [ "Policies" ], "security": [ { "sk": [] }, { "user_project": [] } ], "parameters": [ { "description": "Specifies the unique policy ID (starts with pol_).", "in": "path", "name": "id", "required": true, "schema": { "type": "string" }, "example": "pol_48eeba57-2cd5-4159-a2cb-057a23a35e65" }, { "description": "Specifies the fields to expand.", "in": "query", "name": "expand", "required": false, "schema": { "default": [], "type": "array", "items": { "$ref": "#/components/schemas/PolicyResponseExpandable" } }, "example": [ "transactionIntents" ] } ] }, "post": { "operationId": "UpdatePolicy", "responses": { "200": { "description": "Successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PolicyResponse" }, "examples": { "Example 1": { "value": { "id": "pol_...", "createdAt": 1689869074, "name": "TEST", "chainId": 80002, "strategy": { "sponsorSchema": "pay_for_user" }, "deleted": false, "enabled": true, "object": "policy", "transactionIntents": [ { "id": "tin_..." } ], "policyRules": [ { "createdAt": 1689869074, "id": "afu_...", "functionName": "mint" } ] } } } } } }, "401": { "description": "Error response." }, "409": { "description": "Error response." } }, "summary": "Update a policy object.", "tags": [ "Policies" ], "security": [ { "sk": [] }, { "user_project": [] } ], "parameters": [ { "description": "Specifies the unique policy ID (starts with pol_).", "in": "path", "name": "id", "required": true, "schema": { "type": "string" }, "example": "pol_48eeba57-2cd5-4159-a2cb-057a23a35e65" } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdatePolicyRequest" } } } } }, "delete": { "operationId": "DeletePolicy", "responses": { "200": { "description": "Successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PolicyDeleteResponse" }, "examples": { "Example 1": { "value": { "id": "pol_...", "deleted": true, "object": "policy" } } } } } }, "401": { "description": "Error response." }, "409": { "description": "Error response." } }, "summary": "Delete a policy object.", "tags": [ "Policies" ], "security": [ { "sk": [] }, { "user_project": [] } ], "parameters": [ { "description": "Specifies the unique policy ID (starts with pol_).", "in": "path", "name": "id", "required": true, "schema": { "type": "string" }, "example": "pol_48eeba57-2cd5-4159-a2cb-057a23a35e65" } ] } }, "/v1/policies/{id}/disable": { "put": { "operationId": "DisablePolicy", "responses": { "200": { "description": "Successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PolicyResponse" }, "examples": { "Example 1": { "value": { "id": "pol_...", "createdAt": 1689869074, "name": "TEST", "chainId": 80002, "strategy": { "sponsorSchema": "pay_for_user" }, "deleted": false, "enabled": true, "object": "policy", "transactionIntents": [ { "id": "tin_..." } ], "policyRules": [ { "createdAt": 1689869074, "id": "afu_...", "functionName": "mint" } ] } } } } } }, "401": { "description": "Error response." }, "409": { "description": "Error response." } }, "summary": "Disable a policy object.", "tags": [ "Policies" ], "security": [ { "sk": [] }, { "user_project": [] } ], "parameters": [ { "description": "Specifies the unique policy ID (starts with pol_).", "in": "path", "name": "id", "required": true, "schema": { "type": "string" }, "example": "pol_48eeba57-2cd5-4159-a2cb-057a23a35e65" } ] } }, "/v1/policies/{id}/enable": { "put": { "operationId": "EnablePolicy", "responses": { "200": { "description": "Successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PolicyResponse" }, "examples": { "Example 1": { "value": { "id": "pol_...", "createdAt": 1689869074, "name": "TEST", "chainId": 80002, "strategy": { "sponsorSchema": "pay_for_user" }, "deleted": false, "enabled": true, "object": "policy", "transactionIntents": [ { "id": "tin_..." } ], "policyRules": [ { "createdAt": 1689869074, "id": "afu_...", "functionName": "mint" } ] } } } } } }, "401": { "description": "Error response." }, "409": { "description": "Error response." } }, "summary": "Enable a policy object.", "tags": [ "Policies" ], "security": [ { "sk": [] }, { "user_project": [] } ], "parameters": [ { "description": "Specifies the unique policy ID (starts with pol_).", "in": "path", "name": "id", "required": true, "schema": { "type": "string" }, "example": "pol_48eeba57-2cd5-4159-a2cb-057a23a35e65" } ] } }, "/v1/policies/{id}/reports": { "get": { "operationId": "GetPolicyTotalGasUsage", "responses": { "200": { "description": "Successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GasReportListResponse" }, "examples": { "Example 1": { "value": { "data": [ { "period": { "start": 1690848000, "end": 1693526399 }, "averageTransactionFee": "0.002721745", "totalTransactionFee": "0.00544349", "totalTransactionFeeInUSD": "0.00191", "totalTransactionFeeInCustomTokens": "0.00122705", "transactionIntents": [ { "id": "tin_47eed6b7-...-ce4a602c5f17", "gasFee": "0.00421644", "gasPrice": "0.34918179665034244", "gasUsed": "0.000000000000421644", "gasFeeInUSD": "0.00148" }, { "id": "tin_6d3b4a95-...-f63927018815", "gasFee": "0.00122705", "gasPrice": "0.34918179665034244", "gasUsed": "0.000000000000122705", "gasFeeInUSD": "0.00043" } ] } ], "start": 0, "end": 1, "total": 1, "url": "/v1/policies/pol_48eeba57-2cd5-4159-a2cb-057a23a35e65/reports", "object": "list" } } } } } }, "400": { "description": "" }, "404": { "description": "" } }, "summary": "List all gas reports of a policy.", "tags": [ "Policies" ], "security": [ { "sk": [] }, { "user_project": [] } ], "parameters": [ { "description": "Specifies the unique policy ID (starts with pol_).", "in": "path", "name": "id", "required": true, "schema": { "type": "string" }, "example": "pol_48eeba57-2cd5-4159-a2cb-057a23a35e65" }, { "description": "Specifies the maximum number of records to return.", "in": "query", "name": "limit", "required": false, "schema": { "format": "int32", "type": "integer", "minimum": 1 } }, { "description": "Specifies the offset for the first records to return.", "in": "query", "name": "skip", "required": false, "schema": { "format": "int32", "type": "integer", "minimum": 0 } }, { "description": "Specifies the order in which to sort the results.", "in": "query", "name": "order", "required": false, "schema": { "$ref": "#/components/schemas/Prisma.SortOrder" } } ] } }, "/v1/policies/{id}/reports/transaction_intents": { "get": { "operationId": "GetPolicyReportTransactionIntents", "responses": { "200": { "description": "Successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GasReportTransactionIntentsListResponse" }, "examples": { "Example 1": { "value": { "data": [ { "id": "tin_47eed6b7-...-ce4a602c5f17", "gasFee": "0.00421644", "gasPrice": "0.34918179665034244", "gasUsed": "0.000000000000421644", "gasFeeInUSD": "0.00148" }, { "id": "tin_6d3b4a95-...-f63927018815", "gasFee": "0.00122705", "gasPrice": "0.34918179665034244", "gasUsed": "0.000000000000122705", "gasFeeInUSD": "0.00043" } ], "start": 0, "end": 1, "total": 1, "url": "/v1/policies/pol_48eeba57-2cd5-4159-a2cb-057a23a35e65/reports", "object": "list" } } } } } }, "400": { "description": "" }, "404": { "description": "" } }, "summary": "List transaction intents of a policy report.", "tags": [ "Policies" ], "security": [ { "sk": [] }, { "user_project": [] } ], "parameters": [ { "description": "Specifies the unique policy ID (starts with pol_).", "in": "path", "name": "id", "required": true, "schema": { "type": "string" }, "example": "pol_48eeba57-2cd5-4159-a2cb-057a23a35e65" }, { "description": "The start date of the period in unix timestamp.", "in": "query", "name": "to", "required": true, "schema": { "format": "double", "type": "number" }, "example": 1612137600 }, { "description": "The end date of the period in unix timestamp.", "in": "query", "name": "from", "required": true, "schema": { "format": "double", "type": "number" }, "example": 1612137600 } ] } }, "/v1/policies/{id}/withdraw": { "get": { "operationId": "GetPolicyBalance", "responses": { "200": { "description": "Successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PolicyBalanceWithdrawResponse" }, "examples": { "Example 1": { "value": { "data": [ { "period": { "start": 1690848000, "end": 1693526399 }, "averageTransactionFee": "0.002721745", "totalTransactionFee": "0.00544349", "totalTransactionFeeInUSD": "0.00191", "totalTransactionFeeInCustomTokens": "0.00122705", "transactionIntents": [ { "id": "tin_47eed6b7-...-ce4a602c5f17", "gasFee": "0.00421644", "gasPrice": "0.34918179665034244", "gasUsed": "0.000000000000421644", "gasFeeInUSD": "0.00148" }, { "id": "tin_6d3b4a95-...-f63927018815", "gasFee": "0.00122705", "gasPrice": "0.34918179665034244", "gasUsed": "0.000000000000122705", "gasFeeInUSD": "0.00043" } ] } ], "start": 0, "end": 1, "total": 1, "url": "/v1/policies/pol_48eeba57-2cd5-4159-a2cb-057a23a35e65/reports", "object": "list" } } } } } }, "400": { "description": "" }, "404": { "description": "" } }, "description": "Get the amount of ERC-20 tokens collected by policy.\n\nWhen using a policy that includes payment of gas in ERC-20 tokens, this endpoint returns the amount of tokens paid for gas.\nThis is specific to a policy that doesn't use your own deposited tokens in the paymaster.", "summary": "Get amount of tokens paid for gas policy.", "tags": [ "Policies" ], "security": [ { "sk": [] }, { "user_project": [] } ], "parameters": [ { "description": "Specifies the unique policy ID (starts with pol_).", "in": "path", "name": "id", "required": true, "schema": { "type": "string" }, "example": "pol_48eeba57-2cd5-4159-a2cb-057a23a35e65" } ] }, "post": { "operationId": "CreatePolicyWithdrawal", "responses": { "200": { "description": "Successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TransactionIntentResponse" }, "examples": { "Example 1": { "value": { "id": "tin_c502d628-5bb3-42f2-b8f5-62ba4d71df3a", "createdAt": 1689869074, "object": "transactionIntent", "details": { "userOperationHash": "0x25d3...005c", "userOperation": { "sender": "0x48930Cd730652bf0B18Ef8c80cD0Fa1Cc72A233E", "nonce": "0x2", "initCode": "0x", "callData": "0xb61d...0000", "callGasLimit": "0x27863", "verificationGasLimit": "0x16001", "preVerificationGas": "0xb818", "maxFeePerGas": "0x62590091", "maxPriorityFeePerGas": "0x62590091", "paymasterAndData": "0x3210...b51c", "signature": "0x6202...3d1b" } }, "chainId": 80002, "abstractionType": "accountAbstractionV6", "updatedAt": 1689869074, "policy": { "id": "pol_..." }, "player": { "id": "pla_..." }, "account": { "id": "acc_..." }, "response": { "createdAt": 1689869074, "logs": [ { "removed": false, "transactionIndex": 0, "blockNumber": 44904492, "transactionHash": "0x25d3...005c", "address": "0x5FF1...2789", "topics": [ "0xbb47...f972" ], "data": "0x", "logIndex": 0, "blockHash": "0x8a69...6d59" } ], "blockNumber": 8789286, "transactionHash": "0x25d3...005c", "to": "0x0576...1B57", "gasUsed": "336730", "status": 1 }, "interactions": [ { "functionName": "mint", "contract": "con_...", "functionArgs": [ "0x63B7...484f" ] } ], "transitions": [ { "fromStatus": "none", "toStatus": "new", "at": 1750154762 }, { "fromStatus": "new", "toStatus": "sent", "at": 1750154762 }, { "fromStatus": "sent", "toStatus": "indexed", "at": 1750154762 } ] } } } } } }, "400": { "description": "" }, "404": { "description": "" } }, "description": "Transfer ERC-20 tokens collected by policy.\n\nWhen using a policy that includes payment of gas in ERC-20 tokens, this endpoint returns the amount of tokens paid for gas.\nThis is specific to a policy that doesn't use your own deposited tokens in the paymaster.", "summary": "Withdraw tokens collected by policy.", "tags": [ "Policies" ], "security": [ { "sk": [] }, { "user_project": [] } ], "parameters": [ { "description": "Specifies the unique policy ID (starts with pol_).", "in": "path", "name": "id", "required": true, "schema": { "type": "string" }, "example": "pol_48eeba57-2cd5-4159-a2cb-057a23a35e65" } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WithdrawalPolicyRequest" } } } } } }, "/v1/players": { "get": { "operationId": "GetPlayers", "responses": { "200": { "description": "Successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlayerListResponse" }, "examples": { "Example 1": { "value": { "object": "list", "url": "/v1/players", "start": 0, "end": 1, "total": 1, "data": [ { "id": "pla_00000000-0000-0000-0000-000000000000", "createdAt": 1689869074, "object": "player", "description": "John Smith", "metadata": { "firstName": "John", "lastName": "Smith" }, "name": "My Player", "accounts": [ { "id": "acc_8888888888-8888-8888-8888-888888888888" } ], "transactionIntents": [ { "id": "tin_AAAAAAAA-AAAA-AAAA-AAAA-AAAAAAAAAAAA" } ] } ] } } } } } }, "401": { "description": "Error response." } }, "description": "By default, a maximum of 10 players are shown.\n\nReturns the latest 10 transaction intents that were created with each player.", "summary": "List players.", "tags": [ "Players" ], "security": [ { "sk": [] }, { "user_project": [] } ], "parameters": [ { "description": "Specifies the maximum number of records to return.", "in": "query", "name": "limit", "required": false, "schema": { "format": "int32", "type": "integer", "minimum": 1 } }, { "description": "Specifies the offset for the first records to return.", "in": "query", "name": "skip", "required": false, "schema": { "format": "int32", "type": "integer", "minimum": 0 } }, { "description": "Specifies the order in which to sort the results.", "in": "query", "name": "order", "required": false, "schema": { "$ref": "#/components/schemas/Prisma.SortOrder" } }, { "description": "Specifies the fields to expand in the response.", "in": "query", "name": "expand", "required": false, "schema": { "type": "array", "items": { "$ref": "#/components/schemas/PlayerResponseExpandable" } } }, { "description": "Filter by player name.", "in": "query", "name": "name", "required": false, "schema": { "type": "string" }, "example": "John" } ] }, "post": { "operationId": "CreatePlayer", "responses": { "200": { "description": "Successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlayerResponse" }, "examples": { "Example 1": { "value": { "id": "pla_00000000-0000-0000-0000-000000000000", "createdAt": 1689869074, "object": "player", "description": "John Smith", "metadata": { "firstName": "John", "lastName": "Smith" }, "name": "My Player", "accounts": [ { "id": "acc_8888888888-8888-8888-8888-888888888888" } ], "transactionIntents": [ { "id": "tin_AAAAAAAA-AAAA-AAAA-AAAA-AAAAAAAAAAAA" } ] } } } } } }, "401": { "description": "Error response." }, "409": { "description": "Error response." } }, "description": "Creates a player.", "summary": "Create a player object.", "tags": [ "Players" ], "security": [ { "sk": [] }, { "user_project": [] } ], "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlayerCreateRequest" } } } } } }, "/v1/players/{id}": { "get": { "operationId": "GetPlayer", "responses": { "200": { "description": "Successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlayerResponse" }, "examples": { "Example 1": { "value": { "id": "pla_00000000-0000-0000-0000-000000000000", "createdAt": 1689869074, "object": "player", "description": "John Smith", "metadata": { "firstName": "John", "lastName": "Smith" }, "name": "My Player", "accounts": [ { "id": "acc_8888888888-8888-8888-8888-888888888888" } ], "transactionIntents": [ { "id": "tin_AAAAAAAA-AAAA-AAAA-AAAA-AAAAAAAAAAAA" } ] } } } } } }, "401": { "description": "Error response." } }, "description": "Retrieves the details of a player that has previously been created.\n\nReturns the latest 10 transaction intents that were created with this player.", "summary": "Retrieves the details of an existing player.", "tags": [ "Players" ], "security": [ { "sk": [] }, { "user_project": [] } ], "parameters": [ { "description": "Specifies the unique player ID (starts with pla_).", "in": "path", "name": "id", "required": true, "schema": { "type": "string" }, "example": "pla_48eeba57-2cd5-4159-a2cb-057a23a35e65" }, { "description": "Specifies the expandable fields.", "in": "query", "name": "expand", "required": false, "schema": { "default": [], "type": "array", "items": { "$ref": "#/components/schemas/PlayerResponseExpandable" } }, "example": [ "accounts" ] } ] }, "post": { "operationId": "UpdatePlayer", "responses": { "200": { "description": "Successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlayerResponse" }, "examples": { "Example 1": { "value": { "id": "pla_00000000-0000-0000-0000-000000000000", "createdAt": 1689869074, "object": "player", "description": "John Smith", "metadata": { "firstName": "John", "lastName": "Smith" }, "name": "My Player", "accounts": [ { "id": "acc_8888888888-8888-8888-8888-888888888888" } ], "transactionIntents": [ { "id": "tin_AAAAAAAA-AAAA-AAAA-AAAA-AAAAAAAAAAAA" } ] } } } } } }, "401": { "description": "Error response." }, "409": { "description": "Error response." } }, "description": "Updates the specified player by setting the values of the parameters passed.", "summary": "Updates a player object.", "tags": [ "Players" ], "security": [ { "sk": [] } ], "parameters": [ { "description": "Specifies the unique player ID (starts with pla_).", "in": "path", "name": "id", "required": true, "schema": { "type": "string" }, "example": "pla_48eeba57-2cd5-4159-a2cb-057a23a35e65" } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlayerUpdateRequest" } } } } }, "delete": { "operationId": "DeletePlayer", "responses": { "200": { "description": "Successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlayerDeleteResponse" }, "examples": { "Example 1": { "value": { "id": "pla_00000000-0000-0000-0000-000000000000", "object": "player", "deleted": true } } } } } }, "401": { "description": "Error response." }, "409": { "description": "Error response." } }, "description": "It will delete all linked accounts the player is authenticated with.\nIf the player has a linked embedded signer, it will be deleted as well.", "summary": "Deletes a player object.", "tags": [ "Players" ], "security": [ { "sk": [] }, { "user_project": [] } ], "parameters": [ { "description": "Specifies the unique player ID (starts with pla_).", "in": "path", "name": "id", "required": true, "schema": { "type": "string" }, "example": "pla_48eeba57-2cd5-4159-a2cb-057a23a35e65" } ] } }, "/v1/players/{id}/request_transfer_ownership": { "post": { "operationId": "RequestTransferAccountOwnership", "responses": { "200": { "description": "Successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TransactionIntentResponse" }, "examples": { "Example 1": { "value": { "id": "tin_c502d628-5bb3-42f2-b8f5-62ba4d71df3a", "createdAt": 1689869074, "object": "transactionIntent", "details": { "userOperationHash": "0x25d3...005c", "userOperation": { "sender": "0x48930Cd730652bf0B18Ef8c80cD0Fa1Cc72A233E", "nonce": "0x2", "initCode": "0x", "callData": "0xb61d...0000", "callGasLimit": "0x27863", "verificationGasLimit": "0x16001", "preVerificationGas": "0xb818", "maxFeePerGas": "0x62590091", "maxPriorityFeePerGas": "0x62590091", "paymasterAndData": "0x3210...b51c", "signature": "0x6202...3d1b" } }, "chainId": 80002, "abstractionType": "accountAbstractionV6", "updatedAt": 1689869074, "policy": { "id": "pol_..." }, "player": { "id": "pla_..." }, "account": { "id": "acc_..." }, "response": { "createdAt": 1689869074, "logs": [ { "removed": false, "transactionIndex": 0, "blockNumber": 44904492, "transactionHash": "0x25d3...005c", "address": "0x5FF1...2789", "topics": [ "0xbb47...f972" ], "data": "0x", "logIndex": 0, "blockHash": "0x8a69...6d59" } ], "blockNumber": 8789286, "transactionHash": "0x25d3...005c", "to": "0x0576...1B57", "gasUsed": "336730", "status": 1 }, "interactions": [ { "functionName": "mint", "contract": "con_...", "functionArgs": [ "0x63B7...484f" ] } ], "transitions": [ { "fromStatus": "none", "toStatus": "new", "at": 1750154762 }, { "fromStatus": "new", "toStatus": "sent", "at": 1750154762 }, { "fromStatus": "sent", "toStatus": "indexed", "at": 1750154762 } ] } } } } } }, "401": { "description": "Error response." }, "409": { "description": "Error response." } }, "description": "This endpoint allows you to perform a request to change the owner of an account.\nTo perform an update on the owner of an account, first you must provide a new owner address.\nOnce requested, the owner must accept to take ownership by calling `acceptOwnership()` in the smart contract account.", "summary": "Request transfer ownership of a player.", "tags": [ "Players" ], "security": [ { "sk": [] } ], "parameters": [ { "description": "Specifies the unique player ID (starts with pla_).", "in": "path", "name": "id", "required": true, "schema": { "type": "string" }, "example": "pla_48eeba57-2cd5-4159-a2cb-057a23a35e65" } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlayerTransferOwnershipRequest" } } } } } }, "/v1/players/{id}/cancel_transfer_ownership": { "post": { "operationId": "CancelTransferAccountOwnership", "responses": { "200": { "description": "Successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TransactionIntentResponse" }, "examples": { "Example 1": { "value": { "id": "tin_c502d628-5bb3-42f2-b8f5-62ba4d71df3a", "createdAt": 1689869074, "object": "transactionIntent", "details": { "userOperationHash": "0x25d3...005c", "userOperation": { "sender": "0x48930Cd730652bf0B18Ef8c80cD0Fa1Cc72A233E", "nonce": "0x2", "initCode": "0x", "callData": "0xb61d...0000", "callGasLimit": "0x27863", "verificationGasLimit": "0x16001", "preVerificationGas": "0xb818", "maxFeePerGas": "0x62590091", "maxPriorityFeePerGas": "0x62590091", "paymasterAndData": "0x3210...b51c", "signature": "0x6202...3d1b" } }, "chainId": 80002, "abstractionType": "accountAbstractionV6", "updatedAt": 1689869074, "policy": { "id": "pol_..." }, "player": { "id": "pla_..." }, "account": { "id": "acc_..." }, "response": { "createdAt": 1689869074, "logs": [ { "removed": false, "transactionIndex": 0, "blockNumber": 44904492, "transactionHash": "0x25d3...005c", "address": "0x5FF1...2789", "topics": [ "0xbb47...f972" ], "data": "0x", "logIndex": 0, "blockHash": "0x8a69...6d59" } ], "blockNumber": 8789286, "transactionHash": "0x25d3...005c", "to": "0x0576...1B57", "gasUsed": "336730", "status": 1 }, "interactions": [ { "functionName": "mint", "contract": "con_...", "functionArgs": [ "0x63B7...484f" ] } ], "transitions": [ { "fromStatus": "none", "toStatus": "new", "at": 1750154762 }, { "fromStatus": "new", "toStatus": "sent", "at": 1750154762 }, { "fromStatus": "sent", "toStatus": "indexed", "at": 1750154762 } ] } } } } } }, "401": { "description": "Error response." }, "409": { "description": "Error response." } }, "description": "This endpoint allows you to cancel a pending transfer of ownership.", "summary": "Cancel request to transfer ownership of a player.", "tags": [ "Players" ], "security": [ { "sk": [] } ], "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlayerCancelTransferOwnershipRequest" } } } } } }, "/v1/paymasters": { "post": { "operationId": "CreatePaymaster", "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreatePaymasterResponse" }, "examples": { "Example 1": { "value": { "id": "pay_f0f89cf2-c185-40f4-beef-2a250d7a472b", "object": "paymaster", "address": "0x7b9f89cf2c18540f4beef2a250d7a472b", "url": "https://rpc.mypaymaster.xyz", "context": { "key": "value" }, "createdAt": 1617226800 } } } } } }, "401": { "description": "Error response." }, "409": { "description": "Error response." } }, "description": "Create a new paymaster.\n\nThis object represents the paymaster that will be used to pay the gas fees of the transactions.", "summary": "Create a new paymaster.", "tags": [ "Paymaster" ], "security": [ { "user_project": [] }, { "sk": [] } ], "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreatePaymasterRequest" } } } } }, "get": { "operationId": "ListPaymasters", "responses": { "200": { "description": "Successful response.", "content": { "application/json": { "schema": { "items": { "$ref": "#/components/schemas/CreatePaymasterResponse" }, "type": "array" } } } }, "401": { "description": "Error response." } }, "description": "Returns a list of paymasters.\n\nThis object represents the paymasters that will be used to pay the gas fees for the transactions.\n\nBy default, a maximum of 10 paymasters are shown per page.", "summary": "List paymasters.", "tags": [ "Paymaster" ], "security": [ { "user_project": [] }, { "sk": [] } ], "parameters": [ { "description": "Specifies the maximum number of records to return.", "in": "query", "name": "limit", "required": false, "schema": { "format": "int32", "type": "integer", "minimum": 1 } }, { "description": "Specifies the offset for the first records to return.", "in": "query", "name": "skip", "required": false, "schema": { "format": "int32", "type": "integer", "minimum": 0 } }, { "description": "Specifies the order in which to sort the results.", "in": "query", "name": "order", "required": false, "schema": { "$ref": "#/components/schemas/Prisma.SortOrder" } } ] } }, "/v1/paymasters/{id}": { "post": { "operationId": "UpdatePaymaster", "responses": { "201": { "description": "Updated", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreatePaymasterResponse" }, "examples": { "Example 1": { "value": { "id": "pay_f0f89cf2-c185-40f4-beef-2a250d7a472b", "object": "paymaster", "address": "0x7b9f89cf2c18540f4beef2a250d7a472b", "url": "https://rpc.mypaymaster.xyz", "context": { "key": "value" }, "createdAt": 1617226800 } } } } } }, "401": { "description": "Error response." }, "409": { "description": "Error response." } }, "description": "Update a paymaster.\n\nThis object represents the paymaster that will be used to pay the gas fees of the transactions.", "summary": "Update a paymaster.", "tags": [ "Paymaster" ], "security": [ { "user_project": [] }, { "sk": [] } ], "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreatePaymasterRequest" } } } } }, "get": { "operationId": "GetPaymaster", "responses": { "200": { "description": "Successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreatePaymasterResponse" }, "examples": { "Example 1": { "value": { "id": "pay_f0f89cf2-c185-40f4-beef-2a250d7a472b", "object": "paymaster", "address": "0x7b9f89cf2c18540f4beef2a250d7a472b", "url": "https://rpc.mypaymaster.xyz", "context": { "key": "value" }, "createdAt": 1617226800 } } } } } }, "401": { "description": "Error response." }, "404": { "description": "Error response." } }, "description": "Returns the paymaster with the given id.\n\nThis object represents the paymaster that will be used to pay the gas fees for the transactions.", "summary": "Get paymaster by id.", "tags": [ "Paymaster" ], "security": [ { "user_project": [] }, { "sk": [] } ], "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ] }, "delete": { "operationId": "DeletePaymaster", "responses": { "204": { "description": "Deleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PaymasterDeleteResponse" } } } }, "401": { "description": "Error response." }, "404": { "description": "Error response." } }, "description": "Delete the paymaster with the given id.\n\nThis object represents the paymaster that will be used to pay the gas fees for the transactions.", "summary": "Delete paymaster by id.", "tags": [ "Paymaster" ], "security": [ { "user_project": [] }, { "sk": [] } ], "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ] } }, "/v1/onramp/sessions": { "post": { "operationId": "createOnrampSession", "responses": { "200": { "description": "Onramp session created successfully.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OnrampSessionResponse" } } } }, "400": { "description": "Bad request - missing required fields or invalid parameters." }, "500": { "description": "Internal server error." } }, "description": "Creates an onramp session for the selected provider.\n\nThe provider is selected via the `provider` field. All request and response formats are unified\nand provider-agnostic. The service layer handles translation between the common format and\nprovider-specific APIs.", "summary": "Create onramp session", "tags": [ "Onramp" ], "security": [ { "pk": [] } ], "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OnrampSessionRequest" } } } } } }, "/v1/onramp/quotes": { "post": { "operationId": "getOnrampQuote", "responses": { "200": { "description": "Onramp quote(s) retrieved successfully.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OnrampQuotesResponse" } } } }, "400": { "description": "Bad request - missing required fields or invalid parameters." }, "500": { "description": "Internal server error." } }, "description": "Retrieves onramp quote(s) without creating an actual transaction.\n\nIf provider is specified, returns a single quote for that provider.\nIf provider is not specified, returns quotes from all available providers.\n\nAll request and response formats are unified and provider-agnostic.", "summary": "Get onramp quote(s)", "tags": [ "Onramp" ], "security": [ { "pk": [] } ], "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OnrampQuoteRequest" } } } } } }, "/v1/graphql": { "post": { "operationId": "Query", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": {} } } } }, "tags": [ "GraphQL" ], "security": [ { "user": [] } ], "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": {} } } } } }, "/v1/forwarder_contracts": { "post": { "operationId": "CreateForwarderContract", "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateForwarderContractResponse" }, "examples": { "Example 1": { "value": { "id": "cfo_f0f89cf2-c185-40f4-beef-2a250d7a472b", "object": "forwarderContract", "address": "0x7b9f89cf2c18540f4beef2a250d7a472b", "name": "Forwarder Contract", "chainId": 80002, "createdAt": 1617226800 } } } } } }, "401": { "description": "Error response." }, "409": { "description": "Error response." } }, "description": "Create a new forwarder contract.\n\nThis object represents the forwarder contract that will be used to pay the gas fees of the transactions.", "summary": "Create a new forwarder contract.", "tags": [ "ForwarderContract" ], "security": [ { "user_project": [] }, { "sk": [] } ], "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateForwarderContractRequest" } } } } }, "get": { "operationId": "ListForwarderContracts", "responses": { "200": { "description": "Successful response.", "content": { "application/json": { "schema": { "items": { "$ref": "#/components/schemas/CreateForwarderContractResponse" }, "type": "array" } } } }, "401": { "description": "Error response." } }, "description": "Returns a list of forwarder contract.\n\nThis object represents the forwarder contract that will be used to pay the gas fees for the transactions.\n\nBy default, a maximum of 10 forwarder contract are shown per page.", "summary": "List forwarder contract.", "tags": [ "ForwarderContract" ], "security": [ { "user_project": [] }, { "sk": [] } ], "parameters": [ { "description": "Specifies the maximum number of records to return.", "in": "query", "name": "limit", "required": false, "schema": { "format": "int32", "type": "integer", "minimum": 1 } }, { "description": "Specifies the offset for the first records to return.", "in": "query", "name": "skip", "required": false, "schema": { "format": "int32", "type": "integer", "minimum": 0 } }, { "description": "Specifies the order in which to sort the results.", "in": "query", "name": "order", "required": false, "schema": { "$ref": "#/components/schemas/Prisma.SortOrder" } } ] } }, "/v1/forwarder_contracts/{id}": { "post": { "operationId": "UpdateForwarderContract", "responses": { "201": { "description": "Updated", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateForwarderContractResponse" }, "examples": { "Example 1": { "value": { "id": "cfo_f0f89cf2-c185-40f4-beef-2a250d7a472b", "object": "forwarderContract", "address": "0x7b9f89cf2c18540f4beef2a250d7a472b", "name": "Forwarder Contract", "chainId": 80002, "createdAt": 1617226800 } } } } } }, "401": { "description": "Error response." }, "409": { "description": "Error response." } }, "description": "Update a forwarder contract.\n\nThis object represents the forwarder contract that will be used to pay the gas fees of the transactions.", "summary": "Update a forwarder contract.", "tags": [ "ForwarderContract" ], "security": [ { "user_project": [] }, { "sk": [] } ], "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateForwarderContractRequest" } } } } }, "get": { "operationId": "GetForwarderContract", "responses": { "200": { "description": "Successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateForwarderContractResponse" }, "examples": { "Example 1": { "value": { "id": "cfo_f0f89cf2-c185-40f4-beef-2a250d7a472b", "object": "forwarderContract", "address": "0x7b9f89cf2c18540f4beef2a250d7a472b", "name": "Forwarder Contract", "chainId": 80002, "createdAt": 1617226800 } } } } } }, "401": { "description": "Error response." }, "404": { "description": "Error response." } }, "description": "Returns the forwarder contract with the given id.\n\nThis object represents the forwarder contract that will be used to pay the gas fees for the transactions.", "summary": "Get forwarder contract by id.", "tags": [ "ForwarderContract" ], "security": [ { "user_project": [] }, { "sk": [] } ], "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ] }, "delete": { "operationId": "DeleteForwarderContract", "responses": { "204": { "description": "Deleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForwarderContractDeleteResponse" } } } }, "401": { "description": "Error response." }, "404": { "description": "Error response." } }, "description": "Delete the forwarder contract with the given id.\n\nThis object represents the forwarder contract that will be used to pay the gas fees for the transactions.", "summary": "Delete forwarder contract by id.", "tags": [ "ForwarderContract" ], "security": [ { "user_project": [] }, { "sk": [] } ], "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ] } }, "/v1/exchange": { "post": { "operationId": "CreateSwap", "responses": { "200": { "description": "OK.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TransactionIntentResponse" }, "examples": { "Example 1": { "value": { "id": "tin_c502d628-5bb3-42f2-b8f5-62ba4d71df3a", "createdAt": 1689869074, "object": "transactionIntent", "details": { "userOperationHash": "0x25d3...005c", "userOperation": { "sender": "0x48930Cd730652bf0B18Ef8c80cD0Fa1Cc72A233E", "nonce": "0x2", "initCode": "0x", "callData": "0xb61d...0000", "callGasLimit": "0x27863", "verificationGasLimit": "0x16001", "preVerificationGas": "0xb818", "maxFeePerGas": "0x62590091", "maxPriorityFeePerGas": "0x62590091", "paymasterAndData": "0x3210...b51c", "signature": "0x6202...3d1b" } }, "chainId": 80002, "abstractionType": "accountAbstractionV6", "updatedAt": 1689869074, "policy": { "id": "pol_..." }, "player": { "id": "pla_..." }, "account": { "id": "acc_..." }, "response": { "createdAt": 1689869074, "logs": [ { "removed": false, "transactionIndex": 0, "blockNumber": 44904492, "transactionHash": "0x25d3...005c", "address": "0x5FF1...2789", "topics": [ "0xbb47...f972" ], "data": "0x", "logIndex": 0, "blockHash": "0x8a69...6d59" } ], "blockNumber": 8789286, "transactionHash": "0x25d3...005c", "to": "0x0576...1B57", "gasUsed": "336730", "status": 1 }, "interactions": [ { "functionName": "mint", "contract": "con_...", "functionArgs": [ "0x63B7...484f" ] } ], "transitions": [ { "fromStatus": "none", "toStatus": "new", "at": 1750154762 }, { "fromStatus": "new", "toStatus": "sent", "at": 1750154762 }, { "fromStatus": "sent", "toStatus": "indexed", "at": 1750154762 } ] } } } } } }, "400": { "description": "Bad Request.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestErrorResponse" } } } } }, "description": "Creates token swap.", "summary": "Create token swap.", "tags": [ "Exchange" ], "security": [ { "sk": [] } ], "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateExchangeRequest" } } } } } }, "/v1/exchange/quote": { "post": { "operationId": "QuoteSwap", "responses": { "200": { "description": "OK.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/QuoteExchangeResult" }, "examples": { "Example 1": { "value": { "amount": { "token": { "address": "0x008518e76FAD03f592Bbb7E394C762d5FD54cb97", "chainId": 4337, "decimals": 18, "name": "TOKEN", "symbol": "TKN" }, "value": "1000000000000000000" }, "slippage": 0.5, "fees": [ { "recipient": "0x008518e76FAD03f592Bbb7E394C762d5FD54cb97", "basisPoints": 100, "amount": { "token": { "address": "0x008518e76FAD03f592Bbb7E394C762d5FD54cb97", "chainId": 4337, "decimals": 18, "name": "TOKEN", "symbol": "TKN" }, "value": "1000000000000000000" } } ], "amountWithMaxSlippage": { "token": { "address": "0x008518e76FAD03f592Bbb7E394C762d5FD54cb97", "chainId": 4337, "decimals": 18, "name": "TOKEN", "symbol": "TKN" }, "value": "1000000000000000000" }, "estimatedTXGasFee": "1000000000000000000", "estimatedTXGasFeeToken": "12000", "estimatedTXGasFeeUSD": "1" } } } } } }, "400": { "description": "Bad Request.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvalidRequestErrorResponse" } } } } }, "description": "Quote token swap.", "summary": "Quote token swap.", "tags": [ "Exchange" ], "security": [ { "sk": [] } ], "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateExchangeRequest" } } } } } }, "/v1/events": { "get": { "operationId": "GetEvents", "responses": { "200": { "description": "Successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EventListResponse" }, "examples": { "Example 1": { "value": { "object": "list", "url": "/v1/events", "start": 0, "end": 1, "total": 1, "data": [ { "id": "eve_f0f89cf2-c185-40f4-beef-2a250d7a472b", "object": "event", "topic": "balance.project", "threshold": "100", "createdAt": 1617226800 } ] } } } } } }, "401": { "description": "Error response." } }, "description": "Returns a list of events.\n\nBy default, a maximum of 10 events are shown per page.", "summary": "List events.", "tags": [ "Events" ], "security": [ { "user_project": [] }, { "sk": [] } ], "parameters": [ { "description": "Specifies the maximum number of records to return.", "in": "query", "name": "limit", "required": false, "schema": { "format": "int32", "type": "integer", "minimum": 1 } }, { "description": "Specifies the offset for the first records to return.", "in": "query", "name": "skip", "required": false, "schema": { "format": "int32", "type": "integer", "minimum": 0 } }, { "description": "Specifies the order in which to sort the results.", "in": "query", "name": "order", "required": false, "schema": { "$ref": "#/components/schemas/Prisma.SortOrder" } }, { "description": "Specifies the name of the event", "in": "query", "name": "name", "required": false, "schema": { "type": "string" }, "example": "Event Name" }, { "description": "Specifies if display deleted events", "in": "query", "name": "deleted", "required": false, "schema": { "type": "boolean" }, "example": false } ] }, "post": { "operationId": "CreateEvent", "responses": { "201": { "description": "Event created.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateEventResponse" }, "examples": { "Example 1": { "value": { "id": "eve_f0f89cf2-c185-40f4-beef-2a250d7a472b", "object": "event", "topic": "balance.project", "threshold": "100", "createdAt": 1617226800 } } } } } }, "401": { "description": "Error response." } }, "description": "Create a new event.", "summary": "Create a new event.", "tags": [ "Events" ], "security": [ { "user_project": [] }, { "sk": [] } ], "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateEventRequest" } } } } } }, "/v1/events/{id}": { "get": { "operationId": "GetEvent", "responses": { "200": { "description": "Successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GetEventResponse" }, "examples": { "Example 1": { "value": { "id": "eve_f0f89cf2-c185-40f4-beef-2a250d7a472b", "object": "event", "topic": "balance.project", "threshold": "100", "createdAt": 1617226800 } } } } } }, "401": { "description": "Error response." }, "404": { "description": "Event not found." } }, "description": "Get a single event.", "summary": "Get a single event.", "tags": [ "Events" ], "security": [ { "user_project": [] }, { "sk": [] } ], "parameters": [ { "description": "Specifies the unique event ID (starts with eve_).", "in": "path", "name": "id", "required": true, "schema": { "type": "string" }, "example": "eve_4194ad24-c818-4e5c-b003-9cc2aa7df53b" } ] }, "delete": { "operationId": "DeleteEvent", "responses": { "204": { "description": "Event deleted.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EventDeleteResponse" }, "examples": { "Example 1": { "value": { "id": "eve_c502d628-5bb3-42f2-b8d5-62ba46717f3a", "deleted": true, "object": "event" } } } } } }, "401": { "description": "Error response." }, "404": { "description": "Event not found." } }, "description": "Delete an event.", "summary": "Delete an event.", "tags": [ "Events" ], "security": [ { "user_project": [] }, { "sk": [] } ], "parameters": [ { "description": "Specifies the unique event ID (starts with eve_).", "in": "path", "name": "id", "required": true, "schema": { "type": "string" }, "example": "eve_4194ad24-c818-4e5c-b003-9cc2aa7df53b" } ] } }, "/v1/contracts": { "get": { "operationId": "GetContracts", "responses": { "200": { "description": "Successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ContractListResponse" }, "examples": { "Example 1": { "value": { "object": "list", "url": "/v1/contracts", "start": 0, "end": 1, "total": 1, "data": [ { "id": "con_c502d628-5bb3-42f2-b8d5-62ba46717f3a", "createdAt": 1689869074, "object": "contract", "address": "0x8C5cedA46A26214A52A9D7BF036Ad2F6255BdBEa", "chainId": 80002, "deleted": false, "name": "MyContract", "publicVerification": true, "abi": [ { "constant": false, "inputs": [ { "name": "addr", "type": "address" } ] } ] } ] } } } } } }, "401": { "description": "Error response." } }, "description": "List of all contracts per project.\nBy default, a maximum of ten contracts are shown.", "summary": "List contracts.", "tags": [ "Contracts" ], "security": [ { "sk": [] }, { "user_project": [] } ], "parameters": [ { "description": "Specifies the maximum number of records to return.", "in": "query", "name": "limit", "required": false, "schema": { "format": "int32", "type": "integer", "minimum": 1 } }, { "description": "Specifies the offset for the first records to return.", "in": "query", "name": "skip", "required": false, "schema": { "format": "int32", "type": "integer", "minimum": 0 } }, { "description": "Specifies the order in which to sort the results.", "in": "query", "name": "order", "required": false, "schema": { "$ref": "#/components/schemas/Prisma.SortOrder" } }, { "description": "Specifies the name of the contract.", "in": "query", "name": "name", "required": false, "schema": { "type": "string" }, "example": "NFT Contract" }, { "description": "Specifies whether to include deleted contracts.", "in": "query", "name": "deleted", "required": false, "schema": { "type": "boolean" }, "example": false }, { "description": "The chain ID of the contract.", "in": "query", "name": "chainId", "required": false, "schema": { "format": "int32", "type": "integer" }, "example": 80002 }, { "description": "Specifies the address of the contract.", "in": "query", "name": "address", "required": false, "schema": { "type": "string" }, "example": "0x742e6e61d760164d56f44801054bcf40fa821d97" } ] }, "post": { "operationId": "CreateContract", "responses": { "200": { "description": "Successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ContractResponse" }, "examples": { "Example 1": { "value": { "id": "con_c502d628-5bb3-42f2-b8d5-62ba46717f3a", "createdAt": 1689869074, "object": "contract", "address": "0x8C5cedA46A26214A52A9D7BF036Ad2F6255BdBEa", "chainId": 80002, "deleted": false, "name": "MyContract", "publicVerification": true, "abi": [ { "constant": false, "inputs": [ { "name": "addr", "type": "address" } ] } ] } } } } } }, "401": { "description": "Error response." }, "409": { "description": "Error response." } }, "description": "Add a new contract to your project in Openfort", "summary": "Create contract object.", "tags": [ "Contracts" ], "security": [ { "sk": [] }, { "user_project": [] } ], "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateContractRequest" } } } } } }, "/v1/contracts/{id}": { "get": { "operationId": "GetContract", "responses": { "200": { "description": "Successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ContractResponse" }, "examples": { "Example 1": { "value": { "id": "con_c502d628-5bb3-42f2-b8d5-62ba46717f3a", "createdAt": 1689869074, "object": "contract", "address": "0x8C5cedA46A26214A52A9D7BF036Ad2F6255BdBEa", "chainId": 80002, "deleted": false, "name": "MyContract", "publicVerification": true, "abi": [ { "constant": false, "inputs": [ { "name": "addr", "type": "address" } ] } ] } } } } } }, "401": { "description": "Error response." } }, "description": "Retrieve a contract by providing their contract id.", "summary": "Get a contract.", "tags": [ "Contracts" ], "security": [ { "sk": [] }, { "user_project": [] } ], "parameters": [ { "description": "Specifies the unique contract ID (starts with con_).", "in": "path", "name": "id", "required": true, "schema": { "type": "string" }, "example": "con_0cddb398-1dc6-4e6f-8726-9ec7cea85f35" } ] }, "post": { "operationId": "UpdateContract", "responses": { "200": { "description": "Successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ContractResponse" }, "examples": { "Example 1": { "value": { "id": "con_c502d628-5bb3-42f2-b8d5-62ba46717f3a", "createdAt": 1689869074, "object": "contract", "address": "0x8C5cedA46A26214A52A9D7BF036Ad2F6255BdBEa", "chainId": 80002, "deleted": false, "name": "MyContract", "publicVerification": true, "abi": [ { "constant": false, "inputs": [ { "name": "addr", "type": "address" } ] } ] } } } } } }, "401": { "description": "Error response." }, "409": { "description": "Error response." } }, "summary": "Updates a contract object.", "tags": [ "Contracts" ], "security": [ { "sk": [] }, { "user_project": [] } ], "parameters": [ { "description": "Specifies the unique contract ID (starts with con_).", "in": "path", "name": "id", "required": true, "schema": { "type": "string" }, "example": "con_0cddb398-1dc6-4e6f-8726-9ec7cea85f35" } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateContractRequest" } } } } }, "delete": { "operationId": "DeleteContract", "responses": { "200": { "description": "Successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ContractDeleteResponse" }, "examples": { "Example 1": { "value": { "id": "con_c502d628-5bb3-42f2-b8d5-62ba46717f3a", "deleted": true, "object": "contract" } } } } } }, "401": { "description": "Error response." }, "409": { "description": "Error response." } }, "description": "Delete a contract from the project by providing its contract id.", "summary": "Deletes a contract object.", "tags": [ "Contracts" ], "security": [ { "sk": [] }, { "user_project": [] } ], "parameters": [ { "description": "Specifies the unique contract ID (starts with con_).", "in": "path", "name": "id", "required": true, "schema": { "type": "string" }, "example": "con_0cddb398-1dc6-4e6f-8726-9ec7cea85f35" } ] } }, "/v1/contracts/{id}/read": { "get": { "operationId": "ReadContract", "responses": { "200": { "description": "Successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ContractReadResponse" }, "examples": { "Example 1": { "value": { "id": "con_c502d628-5bb3-42f2-b8d5-62ba46717f3a", "createdAt": 1689869074, "object": "readContract", "functionName": "balanceOf", "result": { "type": "BigNumber", "hex": "0x00" } } } } } } }, "401": { "description": "Error response." }, "409": { "description": "Error response." } }, "description": "Using this endpoint, you can get the repositories returned by any readable\nfunction listed in a contracts ABI. This could be things like querying\nthe totalSupply of a currency contract, the number of owners of an items\ncontract, and more.", "summary": "Read on chain contract repositories.", "tags": [ "Contracts" ], "security": [ { "sk": [] }, { "user_project": [] } ], "parameters": [ { "description": "Specifies the unique contract ID (starts with con_).", "in": "path", "name": "id", "required": true, "schema": { "type": "string" }, "example": "con_0cddb398-1dc6-4e6f-8726-9ec7cea85f35" }, { "description": "The function name of the contract.", "in": "query", "name": "functionName", "required": true, "schema": { "type": "string" }, "example": "mint" }, { "description": "The function arguments of the contract, in string format. Accepts pla_, con_ and acc_ IDs.", "in": "query", "name": "functionArgs", "required": false, "schema": { "type": "array", "items": {} }, "example": [ "0x662D24Bf7Ea2dD6a7D0935F680a6056b94fE934d" ] } ] } }, "/v1/accounts": { "get": { "operationId": "GetAccounts", "responses": { "200": { "description": "Successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AccountListResponse" }, "examples": { "Example 1": { "value": { "object": "list", "url": "/v1/accounts", "start": 0, "end": 1, "total": 1, "data": [ { "id": "acc_c502d628-5bb3-42f2-b8d5-62ba46717f3a", "createdAt": 1689869074, "address": "0x8C5cedA46A26214A52A9D7BF036Ad2F6255BdBEa", "chainId": 80002, "deployed": true, "custodial": false, "embeddedSigner": false, "object": "account", "accountType": "Upgradeable_v06", "ownerAddress": "0x8C5cedA46A26214A52A9D7BF036Ad2F6255BdBEa", "player": { "id": "pla_c502d628-5bb3-42f2-b8d5-62ba46717f3a" }, "transactionIntents": [ { "id": "tin_c502d628-5bb3-42f2-b8f5-62ba4d71df3a" } ] } ] } } } } } }, "401": { "description": "Error response." } }, "description": "Returns a list of accounts for the given player.\n\nThis object represents a player's account, which is a blockchain smart account that can be used to interact with the blockchain.\n\nThe accounts are returned sorted by creation date, with the most recently created accounts appearing first.\n\nReturns the latest 10 transaction intents for each account.\n\nBy default, a maximum of 10 accounts are shown per page.", "summary": "List accounts of a player.", "tags": [ "Accounts" ], "security": [ { "pk_access_token": [] }, { "pk_third_party": [] }, { "sk": [] }, { "user_project": [] }, { "better_auth": [] } ], "parameters": [ { "description": "Specifies the maximum number of records to return.", "in": "query", "name": "limit", "required": false, "schema": { "format": "int32", "type": "integer", "minimum": 1 } }, { "description": "Specifies the offset for the first records to return.", "in": "query", "name": "skip", "required": false, "schema": { "format": "int32", "type": "integer", "minimum": 0 } }, { "description": "Specifies the order in which to sort the results.", "in": "query", "name": "order", "required": false, "schema": { "$ref": "#/components/schemas/Prisma.SortOrder" } }, { "description": "The chain ID. Must be a [supported chain](/development/chains).", "in": "query", "name": "chainId", "required": false, "schema": { "format": "int32", "type": "integer" }, "example": 80002 }, { "description": "Specifies the unique player ID (starts with pla_)", "in": "query", "name": "player", "required": false, "schema": { "type": "string" }, "example": "pla_6f6c9067-89fa-4fc8-ac72-c242a268c584" }, { "description": "Specifies the address of the account", "in": "query", "name": "address", "required": false, "schema": { "type": "string" }, "example": "0x9590Ed0C18190a310f4e93CAccc4CC17270bED40" }, { "description": "Specifies the fields to expand in the response.", "in": "query", "name": "expand", "required": false, "schema": { "type": "array", "items": { "$ref": "#/components/schemas/AccountResponseExpandable" } }, "example": [ "transactionIntents" ] } ] }, "post": { "operationId": "CreateAccount", "responses": { "200": { "description": "Successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AccountResponse" }, "examples": { "Example 1": { "value": { "id": "acc_c502d628-5bb3-42f2-b8d5-62ba46717f3a", "createdAt": 1689869074, "address": "0x8C5cedA46A26214A52A9D7BF036Ad2F6255BdBEa", "chainId": 80002, "deployed": true, "custodial": false, "embeddedSigner": false, "object": "account", "accountType": "Upgradeable_v06", "ownerAddress": "0x8C5cedA46A26214A52A9D7BF036Ad2F6255BdBEa", "player": { "id": "pla_c502d628-5bb3-42f2-b8d5-62ba46717f3a" }, "transactionIntents": [ { "id": "tin_c502d628-5bb3-42f2-b8f5-62ba4d71df3a" } ] } } } } } }, "401": { "description": "Error response." }, "409": { "description": "Error response." } }, "description": "Creates a new blockchain account for the provided player. If not player is provided, a new one will be created.\n\nAccount creation does not consume any gas. All accounts of a player will use the same address across blockchains.\n\nEach player can only have one account per chain.", "summary": "Create an account object.", "tags": [ "Accounts" ], "security": [ { "pk_access_token": [] }, { "pk_third_party": [] }, { "sk": [] }, { "user_project": [] }, { "better_auth": [] } ], "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateAccountRequest" } } } } } }, "/v1/accounts/{id}": { "get": { "operationId": "GetAccount", "responses": { "200": { "description": "Successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AccountResponse" }, "examples": { "Example 1": { "value": { "id": "acc_c502d628-5bb3-42f2-b8d5-62ba46717f3a", "createdAt": 1689869074, "address": "0x8C5cedA46A26214A52A9D7BF036Ad2F6255BdBEa", "chainId": 80002, "deployed": true, "custodial": false, "embeddedSigner": false, "object": "account", "accountType": "Upgradeable_v06", "ownerAddress": "0x8C5cedA46A26214A52A9D7BF036Ad2F6255BdBEa", "player": { "id": "pla_c502d628-5bb3-42f2-b8d5-62ba46717f3a" }, "transactionIntents": [ { "id": "tin_c502d628-5bb3-42f2-b8f5-62ba4d71df3a" } ] } } } } } }, "401": { "description": "Error response." } }, "description": "Retrieves the details of an existing account.\n\nSupply the unique account ID from either a account creation request or the account list, and Openfort will return the corresponding account information.\n\nReturns the latest 10 transaction intents created by this account.", "summary": "Get existing account.", "tags": [ "Accounts" ], "security": [ { "sk": [] }, { "user_project": [] } ], "parameters": [ { "description": "Specifies the unique account ID (starts with acc_).", "in": "path", "name": "id", "required": true, "schema": { "type": "string" }, "example": "acc_4194ad24-c818-4e5c-b003-9cc2aa7df53b" }, { "in": "query", "name": "expand", "required": false, "schema": { "default": [], "type": "array", "items": { "$ref": "#/components/schemas/AccountResponseExpandable" } } } ] } }, "/v1/accounts/{id}/disable": { "post": { "operationId": "DisableAccount", "responses": { "204": { "description": "Successful response." }, "401": { "description": "Error response." }, "409": { "description": "Error response." } }, "tags": [ "Accounts" ], "security": [ { "pk_access_token": [] }, { "pk_third_party": [] }, { "sk": [] }, { "user_project": [] }, { "better_auth": [] } ], "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ] } }, "/v1/accounts/{id}/request_transfer_ownership": { "post": { "operationId": "RequestTransferOwnership", "responses": { "200": { "description": "Successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TransactionIntentResponse" }, "examples": { "Example 1": { "value": { "id": "tin_c502d628-5bb3-42f2-b8f5-62ba4d71df3a", "createdAt": 1689869074, "object": "transactionIntent", "userOperation": null, "chainId": 80002, "abstractionType": "standard", "details": { "from": "0x70997970c51812dc3a010c7d01b50e0d17dc79c8", "to": "0x3c44cdddb6a900fa2b585dd299e03d12fa4293bc", "gas": "0x5208", "maxFeePerGas": "0x3b9aca00", "maxPriorityFeePerGas": "0x3b9aca00", "nonce": "0x0", "data": "0x3c44..." }, "updatedAt": 1689869074, "policy": { "id": "pol_..." }, "player": { "id": "pla_..." }, "account": { "id": "acc_..." }, "response": { "createdAt": 1689869074, "logs": [ { "removed": false, "transactionIndex": 0, "blockNumber": 44904492, "transactionHash": "0x25d3...005c", "address": "0x5FF1...2789", "topics": [ "0xbb47...f972" ], "data": "0x", "logIndex": 0, "blockHash": "0x8a69...6d59" } ], "blockNumber": 8789286, "transactionHash": "0x25d3...005c", "to": "0x0576...1B57", "gasUsed": "336730", "status": 1 }, "interactions": [ { "functionName": "mint", "contract": "con_...", "functionArgs": [ "0x63B7...484f" ] } ] } } } } } }, "401": { "description": "Error response." }, "409": { "description": "Error response." } }, "description": "Perform a request to change the owner of an account.\n\nTo perform an update on the owner of an account, first you must provide a new owner address.\nOnce requested, the owner must accept to take ownership by calling `acceptOwnership()` in the smart contract account.", "summary": "Request transfer ownership of account.", "tags": [ "Accounts" ], "security": [ { "sk": [] } ], "parameters": [ { "description": "Specifies the unique account ID (starts with acc_).", "in": "path", "name": "id", "required": true, "schema": { "type": "string" }, "example": "acc_4194ad24-c818-4e5c-b003-9cc2aa7df53b" } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TransferOwnershipRequest" } } } } } }, "/v1/accounts/{id}/cancel_transfer_ownership": { "post": { "operationId": "CancelTransferOwnership", "responses": { "200": { "description": "Successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TransactionIntentResponse" }, "examples": { "Example 1": { "value": { "id": "tin_c502d628-5bb3-42f2-b8f5-62ba4d71df3a", "createdAt": 1689869074, "object": "transactionIntent", "userOperation": null, "chainId": 80002, "abstractionType": "standard", "details": { "from": "0x70997970c51812dc3a010c7d01b50e0d17dc79c8", "to": "0x3c44cdddb6a900fa2b585dd299e03d12fa4293bc", "gas": "0x5208", "maxFeePerGas": "0x3b9aca00", "maxPriorityFeePerGas": "0x3b9aca00", "nonce": "0x0", "data": "0x3c44..." }, "updatedAt": 1689869074, "policy": { "id": "pol_..." }, "player": { "id": "pla_..." }, "account": { "id": "acc_..." }, "response": { "createdAt": 1689869074, "logs": [ { "removed": false, "transactionIndex": 0, "blockNumber": 44904492, "transactionHash": "0x25d3...005c", "address": "0x5FF1...2789", "topics": [ "0xbb47...f972" ], "data": "0x", "logIndex": 0, "blockHash": "0x8a69...6d59" } ], "blockNumber": 8789286, "transactionHash": "0x25d3...005c", "to": "0x0576...1B57", "gasUsed": "336730", "status": 1 }, "interactions": [ { "functionName": "mint", "contract": "con_...", "functionArgs": [ "0x63B7...484f" ] } ] } } } } } }, "401": { "description": "Error response." }, "409": { "description": "Error response." } }, "description": "Cancel a pending transfer of ownership.", "summary": "Cancel request to transfer ownership of an account.", "tags": [ "Accounts" ], "security": [ { "sk": [] } ], "parameters": [ { "description": "Specifies the unique account ID (starts with acc_).", "in": "path", "name": "id", "required": true, "schema": { "type": "string" }, "example": "acc_4194ad24-c818-4e5c-b003-9cc2aa7df53b" } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CancelTransferOwnershipRequest" } } } } } }, "/v1/accounts/{id}/sign_payload": { "post": { "operationId": "SignPayload", "responses": { "200": { "description": "Successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SignPayloadResponse" }, "examples": { "Example 1": { "value": { "account": "acc_...", "hash": "0x25d3...005c", "object": "signature", "signature": "0x25d3...005c", "address": "0x8C5cedA46A2...36Ad2F6255BdBEa" } } } } } }, "401": { "description": "Error response." }, "409": { "description": "Error response." } }, "description": "**Custodial Accounts only** - Signs the typed repositories value with types repositories structure for domain using the [EIP-712](https://eips.ethereum.org/EIPS/eip-712) specification.", "summary": "Sign a given payload", "tags": [ "Accounts" ], "security": [ { "sk": [] } ], "parameters": [ { "description": "Specifies the unique account ID (starts with acc_).", "in": "path", "name": "id", "required": true, "schema": { "type": "string" }, "example": "acc_4194ad24-c818-4e5c-b003-9cc2aa7df53b" } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SignPayloadRequest" } } } } } }, "/v1/accounts/{id}/sync": { "post": { "operationId": "SyncAccount", "responses": { "200": { "description": "Successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AccountResponse" }, "examples": { "Example 1": { "value": { "id": "acc_c502d628-5bb3-42f2-b8d5-62ba46717f3a", "createdAt": 1689869074, "address": "0x8C5cedA46A26214A52A9D7BF036Ad2F6255BdBEa", "chainId": 80002, "deployed": true, "custodial": false, "embeddedSigner": false, "object": "account", "accountType": "Upgradeable_v06", "ownerAddress": "0x8C5cedA46A26214A52A9D7BF036Ad2F6255BdBEa", "player": { "id": "pla_c502d628-5bb3-42f2-b8d5-62ba46717f3a" }, "transactionIntents": [ { "id": "tin_c502d628-5bb3-42f2-b8f5-62ba4d71df3a" } ] } } } } } }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Account not found" } }, "description": "Synchronize the account state with the blockchain.\nSpecifically, it updates the account owner and whether its deployed or not.", "summary": "Sync account state with the blockchain", "tags": [ "Accounts" ], "security": [ { "sk": [] } ], "parameters": [ { "description": "Specifies the unique account ID (starts with acc_).", "in": "path", "name": "id", "required": true, "schema": { "type": "string" }, "example": "acc_4194ad24-c818-4e5c-b003-9cc2aa7df53b" } ] } }, "/v1/accounts/{id}/deploy": { "post": { "operationId": "DeployAccount", "responses": { "200": { "description": "Successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AccountResponse" }, "examples": { "Example 1": { "value": { "id": "acc_c502d628-5bb3-42f2-b8d5-62ba46717f3a", "createdAt": 1689869074, "address": "0x8C5cedA46A26214A52A9D7BF036Ad2F6255BdBEa", "chainId": 80002, "deployed": true, "custodial": false, "embeddedSigner": false, "object": "account", "accountType": "Upgradeable_v06", "ownerAddress": "0x8C5cedA46A26214A52A9D7BF036Ad2F6255BdBEa", "player": { "id": "pla_c502d628-5bb3-42f2-b8d5-62ba46717f3a" }, "transactionIntents": [ { "id": "tin_c502d628-5bb3-42f2-b8f5-62ba4d71df3a" } ] } } } } } }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Account not found" } }, "description": "This endpoint can be used to deploy a smart contract account that was counterfactually generated.", "summary": "Deploy an account.", "tags": [ "Accounts" ], "security": [ { "sk": [] }, { "user_project": [] } ], "parameters": [ { "description": "Specifies the unique account ID (starts with acc_).", "in": "path", "name": "id", "required": true, "schema": { "type": "string" }, "example": "acc_4194ad24-c818-4e5c-b003-9cc2aa7df53b" } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DeployRequest" } } } } } }, "/v1/accounts/{id}/start_recovery": { "post": { "operationId": "StartRecovery", "responses": { "200": { "description": "Successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TransactionIntentResponse" }, "examples": { "Example 1": { "value": { "id": "tin_c502d628-5bb3-42f2-b8f5-62ba4d71df3a", "createdAt": 1689869074, "object": "transactionIntent", "userOperation": null, "chainId": 80002, "abstractionType": "standard", "details": { "from": "0x70997970c51812dc3a010c7d01b50e0d17dc79c8", "to": "0x3c44cdddb6a900fa2b585dd299e03d12fa4293bc", "gas": "0x5208", "maxFeePerGas": "0x3b9aca00", "maxPriorityFeePerGas": "0x3b9aca00", "nonce": "0x0", "data": "0x3c44..." }, "updatedAt": 1689869074, "policy": { "id": "pol_..." }, "player": { "id": "pla_..." }, "account": { "id": "acc_..." }, "response": { "createdAt": 1689869074, "logs": [ { "removed": false, "transactionIndex": 0, "blockNumber": 44904492, "transactionHash": "0x25d3...005c", "address": "0x5FF1...2789", "topics": [ "0xbb47...f972" ], "data": "0x", "logIndex": 0, "blockHash": "0x8a69...6d59" } ], "blockNumber": 8789286, "transactionHash": "0x25d3...005c", "to": "0x0576...1B57", "gasUsed": "336730", "status": 1 }, "interactions": [ { "functionName": "mint", "contract": "con_...", "functionArgs": [ "0x63B7...484f" ] } ] } } } } } }, "401": { "description": "Error response." }, "409": { "description": "Error response." } }, "summary": "Start a recovery process of a recoverable account.", "tags": [ "Accounts" ], "security": [ { "sk": [] } ], "parameters": [ { "description": "Specifies the unique account ID (starts with acc_).", "in": "path", "name": "id", "required": true, "schema": { "type": "string" }, "example": "acc_4194ad24-c818-4e5c-b003-9cc2aa7df53b" } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StartRecoveryRequest" } } } } } }, "/v1/accounts/{id}/complete_recovery": { "post": { "operationId": "CompleteRecovery", "responses": { "200": { "description": "Successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TransactionIntentResponse" }, "examples": { "Example 1": { "value": { "id": "tin_c502d628-5bb3-42f2-b8f5-62ba4d71df3a", "createdAt": 1689869074, "object": "transactionIntent", "userOperation": null, "chainId": 80002, "abstractionType": "standard", "details": { "from": "0x70997970c51812dc3a010c7d01b50e0d17dc79c8", "to": "0x3c44cdddb6a900fa2b585dd299e03d12fa4293bc", "gas": "0x5208", "maxFeePerGas": "0x3b9aca00", "maxPriorityFeePerGas": "0x3b9aca00", "nonce": "0x0", "data": "0x3c44..." }, "updatedAt": 1689869074, "policy": { "id": "pol_..." }, "player": { "id": "pla_..." }, "account": { "id": "acc_..." }, "response": { "createdAt": 1689869074, "logs": [ { "removed": false, "transactionIndex": 0, "blockNumber": 44904492, "transactionHash": "0x25d3...005c", "address": "0x5FF1...2789", "topics": [ "0xbb47...f972" ], "data": "0x", "logIndex": 0, "blockHash": "0x8a69...6d59" } ], "blockNumber": 8789286, "transactionHash": "0x25d3...005c", "to": "0x0576...1B57", "gasUsed": "336730", "status": 1 }, "interactions": [ { "functionName": "mint", "contract": "con_...", "functionArgs": [ "0x63B7...484f" ] } ] } } } } } }, "401": { "description": "Error response." }, "409": { "description": "Error response." } }, "summary": "Complete a recovery process of a recoverable account.", "tags": [ "Accounts" ], "security": [ { "sk": [] } ], "parameters": [ { "description": "Specifies the unique account ID (starts with acc_).", "in": "path", "name": "id", "required": true, "schema": { "type": "string" }, "example": "acc_4194ad24-c818-4e5c-b003-9cc2aa7df53b" } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CompleteRecoveryRequest" } } } } } }, "/v2/users": { "get": { "operationId": "GetAuthUsers", "responses": { "200": { "description": "Successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UserListResponse" }, "examples": { "Example 1": { "value": { "object": "list", "url": "http://localhost:3000", "data": [ { "id": "pla_***", "createdAt": 123456789, "name": "Satoshi", "email": "satoshi@openfort.io", "emailVerified": true, "phoneNumber": null, "phoneNumberVerified": false, "isAnonymous": false, "linkedAccounts": [ { "provider": "google", "createdAt": 12346789, "updatedAt": 12346789, "accountId": "123456789" } ] }, { "id": "pla_***", "createdAt": 123456789, "name": "Nakamoto", "email": "nakamoto@openfort.io", "emailVerified": true, "phoneNumber": null, "phoneNumberVerified": false, "isAnonymous": false, "linkedAccounts": [ { "provider": "google", "createdAt": 12346789, "updatedAt": 12346789, "accountId": "123456789" } ] } ], "start": 0, "end": 2, "total": 2 } } } } } }, "401": { "description": "Error response." } }, "description": "Retrieves an authenticated users.\n\nUsers have linked accounts and are authenticated with a provider.", "summary": "Authenticated user.", "tags": [ "Users" ], "security": [ { "sk": [] }, { "user_project": [] } ], "parameters": [ { "description": "Specifies the maximum number of records to return.", "in": "query", "name": "limit", "required": false, "schema": { "format": "int32", "type": "integer", "minimum": 1 } }, { "description": "Specifies the offset for the first records to return.", "in": "query", "name": "skip", "required": false, "schema": { "format": "int32", "type": "integer", "minimum": 0 } }, { "description": "Specifies the order in which to sort the results.", "in": "query", "name": "order", "required": false, "schema": { "$ref": "#/components/schemas/Prisma.SortOrder" } }, { "description": "Filter by user name.", "in": "query", "name": "name", "required": false, "schema": { "type": "string" }, "example": "John" }, { "description": "Filter by external user ID.", "in": "query", "name": "externalUserId", "required": false, "schema": { "type": "string" }, "example": "123454456687897" } ] } }, "/v2/users/{id}": { "get": { "operationId": "GetAuthUser", "responses": { "200": { "description": "Successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthUserResponse" }, "examples": { "Example 1": { "value": { "id": "pla_***", "createdAt": 123456789, "name": "Satoshi", "email": "satoshi@openfort.io", "emailVerified": true, "phoneNumber": null, "phoneNumberVerified": false, "isAnonymous": false, "linkedAccounts": [ { "provider": "google", "createdAt": 12346789, "updatedAt": 12346789, "accountId": "123456789" } ] } } } } } }, "401": { "description": "Error response." } }, "description": "Retrieves an authenticated user.\n\nUsers have linked accounts and are authenticated with a provider.", "summary": "Authenticated user.", "tags": [ "Users" ], "security": [ { "sk": [] }, { "user_project": [] } ], "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ] }, "delete": { "operationId": "DeleteUser", "responses": { "200": { "description": "Successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UserDeleteResponse" }, "examples": { "Example 1": { "value": { "id": "pla_00000000-0000-0000-0000-000000000000", "object": "player", "deleted": true } } } } } }, "401": { "description": "Error response." }, "409": { "description": "Error response." } }, "description": "It will delete all linked accounts the user is authenticated with.\nIf the user has a linked embedded signer, it will be deleted as well.", "summary": "Deletes a user object.", "tags": [ "Users" ], "security": [ { "sk": [] }, { "user_project": [] } ], "parameters": [ { "description": "Specifies the unique user ID (starts with pla_).", "in": "path", "name": "id", "required": true, "schema": { "type": "string" }, "example": "pla_48eeba57-2cd5-4159-a2cb-057a23a35e65" } ] } }, "/v2/users/pregenerate": { "post": { "operationId": "pregenerateUserV2", "responses": { "200": { "description": "User and account pre-generated successfully.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PregenerateAccountResponse" } } } }, "400": { "description": "Bad request - invalid parameters." }, "401": { "description": "Unauthorized - invalid API key." }, "409": { "description": "Conflict - user with this identifier already exists." } }, "description": "Pre-generate a user with an embedded account before they authenticate.\nCreates a user record and an embedded account using the provided SSS key shares.\nWhen the user later authenticates (via email, OAuth, third-party auth, etc.)\nwith the same identifier, they will be linked to this pre-generated account.\n\nYou can pregenerate using either:\n- `email`: User will be linked when they authenticate with the same email\n- `thirdPartyUserId` + `thirdPartyProvider`: User will be linked when they authenticate via the same third-party provider", "summary": "Pre-generate a user with an embedded account.", "tags": [ "Users" ], "security": [ { "sk": [] } ], "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PregenerateUserRequestV2" } } } } } }, "/v2/accounts/backend": { "get": { "operationId": "listBackendWallets", "responses": { "200": { "description": "Successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BackendWalletListResponse" } } } }, "401": { "description": "Unauthorized." } }, "description": "List backend wallets.\n\nReturns a paginated list of backend wallets for the project.", "summary": "List backend wallets.", "tags": [ "Backend Wallets" ], "security": [ { "sk": [] } ], "parameters": [ { "description": "Number of wallets to return (default: 10, max: 100).", "in": "query", "name": "limit", "required": false, "schema": { "format": "int32", "type": "integer" }, "example": 10 }, { "description": "Number of wallets to skip (for pagination).", "in": "query", "name": "skip", "required": false, "schema": { "format": "int32", "type": "integer" }, "example": 0 }, { "description": "Filter by chain type.", "in": "query", "name": "chainType", "required": false, "schema": { "type": "string", "enum": [ "EVM", "SVM" ] }, "example": "EVM" }, { "description": "Filter by wallet address.", "in": "query", "name": "address", "required": false, "schema": { "type": "string" }, "example": "0x742d35Cc6634C0532925a3b844Bc454e4438f44e" }, { "description": "Filter by wallet name.", "in": "query", "name": "name", "required": false, "schema": { "type": "string" }, "example": "Treasury Wallet" }, { "description": "Filter by associated wallet ID (starts with `pla_`).", "in": "query", "name": "wallet", "required": false, "schema": { "type": "string" }, "example": "pla_e0b84653-1741-4a3d-9e91-2b0fd2942f60" } ] }, "post": { "operationId": "createBackendWallet", "responses": { "200": { "description": "Successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateBackendWalletResponse" } } } }, "401": { "description": "Unauthorized." } }, "description": "Create a new backend wallet account.\n\nGenerates a new keypair securely in the backend wallet system.\nThe private key is stored encrypted and never exposed.", "summary": "Create backend wallet.", "tags": [ "Backend Wallets" ], "security": [ { "wallet_auth": [] } ], "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateBackendWalletRequest" } } } } } }, "/v2/accounts/backend/{id}": { "get": { "operationId": "getBackendWallet", "responses": { "200": { "description": "Successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BackendWalletResponse" } } } }, "401": { "description": "Unauthorized." }, "404": { "description": "Wallet not found." } }, "description": "Get backend wallet details.\n\nReturns details for a specific backend wallet.", "summary": "Get backend wallet.", "tags": [ "Backend Wallets" ], "security": [ { "sk": [] } ], "parameters": [ { "description": "The wallet ID (starts with acc_).", "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ] }, "delete": { "operationId": "deleteBackendWallet", "responses": { "200": { "description": "Successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DeleteBackendWalletResponse" } } } }, "401": { "description": "Unauthorized." }, "404": { "description": "Wallet not found." } }, "description": "Delete a backend wallet.\n\nPermanently deletes a backend wallet and its associated private key.", "summary": "Delete backend wallet.", "tags": [ "Backend Wallets" ], "security": [ { "wallet_auth": [] } ], "parameters": [ { "description": "The wallet ID (starts with acc_).", "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ] } }, "/v2/accounts/backend/{id}/sign": { "post": { "operationId": "sign", "responses": { "200": { "description": "Successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SignResponse" } } } }, "401": { "description": "Unauthorized." }, "404": { "description": "Account not found." } }, "description": "Sign data via backend wallet.\n\nSigns the provided data using the account's private key managed by the backend wallet.\nThe private key is securely stored and never exposed.", "summary": "Sign data via backend wallet.", "tags": [ "Backend Wallets" ], "security": [ { "wallet_auth": [] } ], "parameters": [ { "description": "The account ID (starts with acc_).", "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SignRequest" } } } } } }, "/v2/accounts/backend/{id}/export": { "post": { "operationId": "exportPrivateKey", "responses": { "200": { "description": "Successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ExportPrivateKeyResponse" } } } }, "401": { "description": "Unauthorized." }, "404": { "description": "Account not found." } }, "description": "Export private key with E2E encryption via backend wallet.\n\nExports the account's private key encrypted using RSA-4096 OAEP SHA-256.\nThe client must provide their ephemeral RSA-4096 public key (base64 SPKI DER format).\nThe response contains the encrypted private key that can be decrypted with the client's private key.", "summary": "Export private key (E2E encrypted).", "tags": [ "Backend Wallets" ], "security": [ { "wallet_auth": [] } ], "parameters": [ { "description": "The account ID (starts with acc_).", "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ExportPrivateKeyRequest" } } } } } }, "/v2/accounts/backend/import": { "post": { "operationId": "importPrivateKey", "responses": { "200": { "description": "Successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ImportPrivateKeyResponse" } } } }, "400": { "description": "Invalid key material." }, "401": { "description": "Unauthorized." } }, "description": "Import private key with E2E encryption via backend wallet.\n\nImports a private key into the backend wallet system.\nThe private key must be encrypted using RSA-4096 OAEP SHA-256 with the server's\nstatic import public key (obtain out-of-band from SDK or documentation).", "summary": "Import private key (E2E encrypted).", "tags": [ "Backend Wallets" ], "security": [ { "wallet_auth": [] } ], "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ImportPrivateKeyRequest" } } } } } }, "/v2/accounts/backend/register-secret": { "post": { "operationId": "registerWalletSecret", "responses": { "200": { "description": "Successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RegisterWalletSecretResponse" } } } }, "401": { "description": "Unauthorized." } }, "description": "Register a new wallet secret (authentication key).\n\nRegisters an ECDSA P-256 public key that will be used to verify\nX-Wallet-Auth JWT signatures. This is required before using WALLET_AUTH\nfor other backend wallet operations.", "summary": "Register wallet secret.", "tags": [ "Backend Wallets" ], "security": [ { "sk": [] } ], "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RegisterWalletSecretRequest" } } } } } }, "/v2/accounts/backend/revoke-secret": { "post": { "operationId": "revokeWalletSecret", "responses": { "200": { "description": "Successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RevokeWalletSecretResponse" } } } }, "401": { "description": "Unauthorized." }, "404": { "description": "Secret not found." } }, "description": "Revoke a wallet secret (authentication key).\n\nPermanently revokes a wallet secret so it can no longer be used\nfor X-Wallet-Auth JWT signing.", "summary": "Revoke wallet secret.", "tags": [ "Backend Wallets" ], "security": [ { "wallet_auth": [] } ], "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RevokeWalletSecretRequest" } } } } } }, "/v2/accounts/backend/rotate-secrets": { "post": { "operationId": "rotateWalletSecret", "responses": { "200": { "description": "Successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RotateWalletSecretResponse" } } } }, "401": { "description": "Unauthorized." } }, "description": "Rotate wallet secret (authentication key).\n\nReplaces the current wallet secret (ECDSA P-256 public key) used for\nX-Wallet-Auth JWT signing. The old secret will be revoked.", "summary": "Rotate wallet secret.", "tags": [ "Backend Wallets" ], "security": [ { "wallet_auth": [] } ], "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RotateWalletSecretRequest" } } } } } }, "/v2/accounts": { "get": { "operationId": "getAccountsV2", "responses": { "200": { "description": "Successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AccountListV2Response" } } } }, "401": { "description": "Error response." } }, "description": "Returns a list of accounts for the given user.\n\nThis object represents a user's account, which is a blockchain smart account that can be used to interact with the blockchain.\n\nThe accounts are returned sorted by creation date, with the most recently created accounts appearing first.\n\nReturns the latest 10 transaction intents for each account.\n\nBy default, a maximum of 10 accounts are shown per page.", "summary": "List accounts of a user.", "tags": [ "Accounts" ], "security": [ { "pk_access_token": [] }, { "pk_third_party": [] }, { "sk": [] }, { "user_project": [] }, { "better_auth": [] } ], "parameters": [ { "description": "Specifies the maximum number of records to return.", "in": "query", "name": "limit", "required": false, "schema": { "format": "int32", "type": "integer", "minimum": 1 } }, { "description": "Specifies the offset for the first records to return.", "in": "query", "name": "skip", "required": false, "schema": { "format": "int32", "type": "integer", "minimum": 0 } }, { "description": "Specifies the order in which to sort the results.", "in": "query", "name": "order", "required": false, "schema": { "$ref": "#/components/schemas/Prisma.SortOrder" } }, { "description": "The chain ID. Must be a [supported chain](/development/chains).", "in": "query", "name": "chainId", "required": false, "schema": { "format": "int32", "type": "integer" }, "example": 80002 }, { "description": "Specifies the unique user ID (starts with pla_)", "in": "query", "name": "user", "required": false, "schema": { "type": "string" }, "example": "pla_6f6c9067-89fa-4fc8-ac72-c242a268c584" }, { "description": "The chain type. Must be either \"EVM\" or \"SVM\".", "in": "query", "name": "chainType", "required": false, "schema": { "type": "string", "enum": [ "EVM", "SVM" ] }, "example": "EVM" }, { "description": "Specifies the type of account. Must be either \"Smart Account\" or \"Externally Owned Account\".", "in": "query", "name": "accountType", "required": false, "schema": { "type": "string", "enum": [ "Externally Owned Account", "Smart Account", "Delegated Account" ] }, "example": "Smart Account" }, { "description": "Specifies the account address", "in": "query", "name": "address", "required": false, "schema": { "type": "string" }, "example": "0xf7b4c54cca21cccf42796502bf94e2838fbd44c4" } ] }, "post": { "operationId": "createAccountV2", "responses": { "200": { "description": "Successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AccountV2Response" } } } }, "401": { "description": "Error response." } }, "tags": [ "Accounts" ], "security": [ { "sk": [] } ], "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateAccountRequestV2" } } } } } }, "/v2/accounts/signer": { "get": { "operationId": "GetSignerIdByAddress", "responses": { "200": { "description": "Successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SignerIdResponse" } } } }, "401": { "description": "Error response." } }, "tags": [ "Accounts" ], "security": [ { "pk_access_token": [] }, { "pk_third_party": [] }, { "sk": [] }, { "user_project": [] }, { "better_auth": [] } ], "parameters": [ { "in": "query", "name": "address", "required": true, "schema": { "type": "string" } } ] } }, "/v2/accounts/{id}": { "get": { "operationId": "getAccountV2", "responses": { "200": { "description": "Successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AccountV2Response" } } } }, "401": { "description": "Error response." } }, "tags": [ "Accounts" ], "security": [ { "pk_access_token": [] }, { "pk_third_party": [] }, { "sk": [] }, { "user_project": [] }, { "better_auth": [] } ], "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ] }, "delete": { "operationId": "RemoveAccount", "responses": { "200": { "description": "Successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DeleteAccountResponse" } } } }, "401": { "description": "Unauthorized." }, "404": { "description": "Account not found." } }, "description": "Removes an account from a project.", "tags": [ "Accounts" ], "security": [ { "user_project": [] }, { "sk": [] } ], "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ] } }, "/v2/accounts/switch-chain": { "post": { "operationId": "switchChainV2", "responses": { "200": { "description": "Successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AccountV2Response" } } } }, "401": { "description": "Error response." } }, "tags": [ "Accounts" ], "security": [ { "pk_access_token": [] }, { "pk_third_party": [] }, { "sk": [] }, { "better_auth": [] } ], "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SwitchChainQueriesV2" } } } } } }, "/iam/v1/sessions": { "post": { "operationId": "Refresh", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthResponse" }, "examples": { "Example 1": { "value": { "player": { "id": "pla_...", "object": "player", "createdAt": 1234567890, "linkedAccounts": [ { "provider": "email", "email": "jaume@openfort.xyz", "disabled": false } ] }, "token": "abcd....", "refreshToken": "efgh...." } } } } } }, "401": { "description": "" } }, "description": "Get or create a new session for the player based on the refresh token.", "summary": "Refresh or create auth session.", "tags": [ "Authentication" ], "security": [ { "pk": [] } ], "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RefreshTokenRequest" } } } } } }, "/iam/v1/sessions/logout": { "post": { "operationId": "Logout", "responses": { "204": { "description": "No content" }, "401": { "description": "Unauthorized - No active session or invalid token" } }, "description": "When using Openfort Auth, the endpoint logs out the player.", "summary": "Log out a player.", "tags": [ "Authentication" ], "security": [ { "pk_access_token": [] } ], "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LogoutRequest" } } } } } }, "/iam/v1/siwe/init": { "post": { "operationId": "InitSIWE", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SIWEInitResponse" }, "examples": { "Example 1": { "value": { "address": "0x1234567890abcdef1234567890abcdef12345678", "nonce": "1234567890", "expiresAt": 1234567890 } } } } } }, "401": { "description": "" } }, "description": "Create a challenge to link external wallet to the player.", "summary": "Initialize SIWE.", "tags": [ "Authentication" ], "security": [ { "pk": [] } ], "parameters": [ { "in": "header", "name": "x-game", "required": false, "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SIWERequest" } } } } } }, "/iam/v1/siwe/authenticate": { "post": { "operationId": "AuthenticateSIWE", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthResponse" }, "examples": { "Example 1": { "value": { "player": { "id": "pla_...", "object": "player", "createdAt": 1234567890, "linkedAccounts": [ { "provider": "email", "email": "jaume@openfort.xyz", "disabled": false } ] }, "token": "abcd....", "refreshToken": "efgh...." } } } } } }, "204": { "description": "Successfully logged out" }, "401": { "description": "Unauthorized - No active session or invalid token" } }, "summary": "Authenticate player with SIWE", "tags": [ "Authentication" ], "security": [ { "pk": [] } ], "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SIWEAuthenticateRequest" } } } } } }, "/iam/v1/siwe/unlink": { "post": { "operationId": "UnlinkSIWE", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthPlayerResponse" } } } }, "204": { "description": "Successfully logged out" }, "401": { "description": "Unauthorized - No active session or invalid token" } }, "summary": "Unlink external wallet.", "tags": [ "Authentication" ], "security": [ { "pk_access_token": [] }, { "pk_third_party": [] } ], "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SIWERequest" } } } } } }, "/iam/v1/siwe/link": { "post": { "operationId": "LinkSIWE", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthPlayerResponse" } } } }, "204": { "description": "Successfully logged out" }, "401": { "description": "Unauthorized - No active session or invalid token" } }, "summary": "Link external wallet.", "tags": [ "Authentication" ], "security": [ { "pk_access_token": [] }, { "pk_third_party": [] } ], "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SIWEAuthenticateRequest" } } } } } }, "/iam/v1/password/signup": { "post": { "operationId": "SignupEmailPassword", "responses": { "201": { "description": "Success response", "content": { "application/json": { "schema": { "anyOf": [ { "$ref": "#/components/schemas/AuthResponse" }, { "$ref": "#/components/schemas/ActionRequiredResponse" } ] }, "examples": { "Example 1": { "value": { "player": { "id": "pla_...", "object": "player", "createdAt": 1234567890, "linkedAccounts": [ { "provider": "email", "email": "jaume@openfort.xyz", "disabled": false } ] }, "token": "abcd....", "refreshToken": "efgh...." } } } } } }, "401": { "description": "Api key is not valid" }, "409": { "description": "User already exists" } }, "description": "Create and authenticate a player based on email and password.", "summary": "Email and password signup.", "tags": [ "Authentication" ], "security": [ { "pk": [] } ], "parameters": [ { "in": "header", "name": "x-game", "required": false, "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SignupRequest" } } } } } }, "/iam/v1/password/login": { "post": { "operationId": "LoginEmailPassword", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { "anyOf": [ { "$ref": "#/components/schemas/AuthResponse" }, { "$ref": "#/components/schemas/ActionRequiredResponse" } ] }, "examples": { "Example 1": { "value": { "player": { "id": "pla_...", "object": "player", "createdAt": 1234567890, "linkedAccounts": [ { "provider": "email", "email": "jaume@openfort.xyz", "disabled": false } ] }, "token": "abcd....", "refreshToken": "efgh...." } } } } } }, "401": { "description": "" } }, "description": "Authenticate a player based on email and password.", "summary": "Email and password login.", "tags": [ "Authentication" ], "security": [ { "pk": [] } ], "parameters": [ { "in": "header", "name": "x-game", "required": false, "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LoginRequest" } } } } } }, "/iam/v1/password/request_email_verification": { "post": { "operationId": "RequestEmailVerification", "responses": { "204": { "description": "No content" }, "401": { "description": "" } }, "description": "Start the Email Verification process for a player.", "summary": "Request an Email Verification.", "tags": [ "Authentication" ], "security": [ { "pk": [] } ], "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RequestVerifyEmailRequest" } } } } } }, "/iam/v1/password/verify_email": { "post": { "operationId": "VerifyEmail", "responses": { "204": { "description": "No content" }, "401": { "description": "" } }, "description": "Verify a player's email address.", "summary": "Verify an email.", "tags": [ "Authentication" ], "security": [ { "pk": [] } ], "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/VerifyEmailRequest" } } } } } }, "/iam/v1/password/request_reset": { "post": { "operationId": "RequestResetPassword", "responses": { "204": { "description": "No content" }, "401": { "description": "" } }, "description": "Start the Reset process for a player's password.", "summary": "Request a Reset password.", "tags": [ "Authentication" ], "security": [ { "pk": [] } ], "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RequestResetPasswordRequest" } } } } } }, "/iam/v1/password/reset": { "post": { "operationId": "ResetPassword", "responses": { "204": { "description": "No content" }, "401": { "description": "" } }, "description": "Reset a player's password.", "summary": "Reset a password.", "tags": [ "Authentication" ], "security": [ { "pk": [] } ], "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ResetPasswordRequest" } } } } } }, "/iam/v1/password/link": { "post": { "operationId": "LinkEmail", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { "anyOf": [ { "$ref": "#/components/schemas/AuthPlayerResponse" }, { "$ref": "#/components/schemas/ActionRequiredResponse" } ] } } } }, "401": { "description": "" } }, "tags": [ "Authentication" ], "security": [ { "pk_access_token": [] }, { "pk_third_party": [] } ], "parameters": [ { "in": "header", "name": "x-game", "required": false, "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LoginRequest" } } } } } }, "/iam/v1/password/unlink": { "post": { "operationId": "UnlinkEmail", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthPlayerResponse" } } } }, "401": { "description": "" } }, "tags": [ "Authentication" ], "security": [ { "pk_access_token": [] }, { "pk_third_party": [] } ], "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnlinkEmailRequest" } } } } } }, "/iam/v1/oidc/login": { "post": { "operationId": "LoginOIDC", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthResponse" }, "examples": { "Example 1": { "value": { "player": { "id": "pla_...", "object": "player", "createdAt": 1234567890, "linkedAccounts": [ { "provider": "email", "email": "jaume@openfort.xyz", "disabled": false } ] }, "token": "abcd....", "refreshToken": "efgh...." } } } } } }, "401": { "description": "" } }, "description": "Authenticate a player from an identity token.", "summary": "OIDC Identity token.", "tags": [ "Authentication" ], "security": [ { "pk": [] } ], "parameters": [ { "in": "header", "name": "x-game", "required": false, "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LoginOIDCRequest" } } } } } }, "/iam/v1/oauth/init": { "post": { "operationId": "InitOAuth", "responses": { "201": { "description": "Success response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OAuthResponse" } } } }, "401": { "description": "Api key is not valid" } }, "summary": "Initialize OAuth.", "tags": [ "Authentication" ], "security": [ { "pk": [] } ], "parameters": [ { "in": "header", "name": "x-game", "required": false, "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OAuthInitRequest" } } } } } }, "/iam/v1/oauth/init_link": { "post": { "operationId": "LinkOAuth", "responses": { "201": { "description": "Success response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OAuthResponse" } } } }, "401": { "description": "Api key is not valid" } }, "summary": "Initialize Link OAuth.", "tags": [ "Authentication" ], "security": [ { "pk_access_token": [] }, { "pk_third_party": [] } ], "parameters": [ { "in": "header", "name": "x-game", "required": false, "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OAuthInitRequest" } } } } } }, "/iam/v1/oauth/link": { "post": { "operationId": "LinkThirdParty", "responses": { "201": { "description": "Success response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthPlayerResponse" } } } }, "401": { "description": "Api key is not valid" } }, "summary": "Initialize Link OAuth.", "tags": [ "Authentication" ], "security": [ { "pk_access_token": [] }, { "pk_third_party": [] } ], "parameters": [ { "in": "header", "name": "x-game", "required": false, "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ThirdPartyLinkRequest" } } } } } }, "/iam/v1/oauth/pool": { "post": { "operationId": "PoolOAuth", "responses": { "200": { "description": "Success response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthResponse" } } } }, "401": { "description": "Api key is not valid" } }, "summary": "Initialize OAuth.", "tags": [ "Authentication" ], "security": [ { "pk": [] } ], "parameters": [ { "in": "query", "name": "key", "required": true, "schema": { "type": "string" } } ] } }, "/iam/v1/oauth/login_id_token": { "post": { "operationId": "LoginWithIdToken", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthResponse" }, "examples": { "Example 1": { "value": { "player": { "id": "pla_...", "object": "player", "createdAt": 1234567890, "linkedAccounts": [ { "provider": "email", "email": "jaume@openfort.xyz", "disabled": false } ] }, "token": "abcd....", "refreshToken": "efgh...." } } } } } }, "401": { "description": "" } }, "summary": "Authenticate player with oauth token.", "tags": [ "Authentication" ], "security": [ { "pk": [] }, { "pk_third_party": [] } ], "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LoginWithIdTokenRequest" } } } } } }, "/iam/v1/oauth/third_party": { "post": { "operationId": "ThirdParty", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthPlayerResponse" }, "examples": { "Example 1": { "value": { "player": { "id": "pla_...", "object": "player", "createdAt": 1234567890, "linkedAccounts": [ { "provider": "email", "email": "jaume@openfort.xyz", "disabled": false } ] }, "token": "abcd....", "refreshToken": "efgh...." } } } } } }, "401": { "description": "" } }, "summary": "Verify oauth token of a third party auth provider.", "tags": [ "Authentication" ], "security": [ { "pk": [] }, { "pk_third_party": [] } ], "parameters": [ { "in": "header", "name": "x-game", "required": false, "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ThirdPartyOAuthRequest" } } } } } }, "/iam/v1/oauth/verify": { "post": { "operationId": "VerifyOAuthToken", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlayerResponse" }, "examples": { "Example 1": { "value": { "id": "pla_00000000-0000-0000-0000-000000000000", "createdAt": 1689869074, "object": "player", "description": "John Smith", "metadata": { "firstName": "John", "lastName": "Smith" }, "name": "My Player", "accounts": [ { "id": "acc_8888888888-8888-8888-8888-888888888888" } ], "transactionIntents": [ { "id": "tin_AAAAAAAA-AAAA-AAAA-AAAA-AAAAAAAAAAAA" } ] } } } } } }, "401": { "description": "" } }, "description": "The endpoint verifies the token generated by OAuth provider and retrieves a corresponding player.\n\nReturns the latest 10 transaction intents for the player.", "summary": "Retrieve player by oauth token.", "tags": [ "AdminAuthentication", "Authentication" ], "security": [ { "sk": [] } ], "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthenticateOAuthRequest" } } } } } }, "/iam/v1/oauth/unlink": { "post": { "operationId": "UnlinkOAuth", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthPlayerResponse" }, "examples": { "Example 1": { "value": { "id": "pla_...", "object": "player", "createdAt": 1234567890, "linkedAccounts": [ { "provider": "email", "email": "jaume@openfort.xyz", "disabled": false } ] } } } } } }, "401": { "description": "" } }, "summary": "Unlink OAuth account", "tags": [ "Authentication" ], "security": [ { "pk_access_token": [] }, { "pk_third_party": [] } ], "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnlinkOAuthRequest" } } } } } }, "/iam/v1/oauth": { "get": { "operationId": "ListOAuthConfig", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OAuthConfigListResponse" }, "examples": { "Example 1": { "value": { "data": [ { "enabled": true, "baseUrl": "https://mygame.dev.gamingservices.accelbyte.io/", "clientId": "1234567890abcdef1234567890abcdef", "clientSecret": "abcdef1234567890abcdef1234567890", "provider": "accelbyte" } ] } } } } } }, "401": { "description": "" } }, "description": "List configured OAuth methods for the current project environment.", "summary": "List of oauth configurations.", "tags": [ "AdminAuthentication" ], "deprecated": true, "security": [ { "sk": [] }, { "user_project": [] } ], "parameters": [] }, "post": { "operationId": "CreateOAuthConfig", "responses": { "200": { "description": "Successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OAuthConfigResponse" }, "examples": { "Example 1": { "value": { "enabled": true, "baseUrl": "https://mygame.dev.gamingservices.accelbyte.io/", "clientId": "1234567890abcdef1234567890abcdef", "clientSecret": "abcdef1234567890abcdef1234567890", "provider": "accelbyte" } } } } } }, "401": { "description": "Error response." } }, "description": "The endpoint creates oauth configuration for the current project environment.", "summary": "Create oauth configuration.", "tags": [ "AdminAuthentication" ], "deprecated": true, "security": [ { "sk": [] }, { "user_project": [] } ], "parameters": [], "requestBody": { "description": "Specifies the oauth provider specific configuration.", "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OAuthConfigRequest", "description": "Specifies the oauth provider specific configuration." } } } } } }, "/iam/v1/oauth/{provider}": { "get": { "operationId": "GetOAuthConfig", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OAuthConfigResponse" }, "examples": { "Example 1": { "value": { "enabled": true, "baseUrl": "https://mygame.dev.gamingservices.accelbyte.io/", "clientId": "1234567890abcdef1234567890abcdef", "clientSecret": "abcdef1234567890abcdef1234567890", "provider": "accelbyte" } } } } } }, "401": { "description": "" } }, "description": "The endpoint retrieves oauth configuration for specified provider for the current project environment.", "summary": "Get oauth configuration.", "tags": [ "AdminAuthentication" ], "deprecated": true, "security": [ { "sk": [] }, { "user_project": [] } ], "parameters": [ { "description": "Specifies the oauth provider type.", "in": "path", "name": "provider", "required": true, "schema": { "$ref": "#/components/schemas/OAuthProvider" } } ] }, "delete": { "operationId": "DeleteOAuthConfig", "responses": { "204": { "description": "No content" }, "401": { "description": "" } }, "description": "The endpoint deletes oauth configuration for specified provider for the current project environment.", "summary": "Delete oauth configuration.", "tags": [ "AdminAuthentication" ], "deprecated": true, "security": [ { "sk": [] }, { "user_project": [] } ], "parameters": [ { "description": "Specifies the oauth provider type.", "in": "path", "name": "provider", "required": true, "schema": { "$ref": "#/components/schemas/OAuthProvider" } } ] } }, "/iam/v1/guest": { "post": { "operationId": "RegisterGuest", "responses": { "201": { "description": "Success response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthResponse" }, "examples": { "Example 1": { "value": { "player": { "id": "pla_...", "object": "player", "createdAt": 1234567890, "linkedAccounts": [ { "provider": "email", "email": "jaume@openfort.xyz", "disabled": false } ] }, "token": "abcd....", "refreshToken": "efgh...." } } } } } }, "401": { "description": "Api key is not valid" }, "409": { "description": "User already exists" } }, "description": "Create a guest player.", "summary": "Create a guest player.", "tags": [ "Authentication" ], "security": [ { "pk": [] } ], "parameters": [ { "in": "header", "name": "x-game", "required": false, "schema": { "type": "string" } } ] } }, "/iam/v1/config": { "get": { "operationId": "List", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthProviderListResponse" }, "examples": { "Example 1": { "value": { "data": [ { "provider": "firebase", "type": "third_party" } ] } } } } } }, "401": { "description": "" } }, "description": "List configured auth methods for the current project environment.", "summary": "List of auth configurations.", "tags": [ "AdminAuthentication" ], "security": [ { "pk": [] }, { "user_project": [] } ], "parameters": [ { "in": "query", "name": "enabled", "required": false, "schema": { "type": "boolean" } } ] }, "post": { "operationId": "Create", "responses": { "200": { "description": "Successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OAuthConfigResponse" }, "examples": { "Example 1": { "value": { "enabled": true, "baseUrl": "https://mygame.dev.gamingservices.accelbyte.io/", "clientId": "1234567890abcdef1234567890abcdef", "clientSecret": "abcdef1234567890abcdef1234567890", "provider": "accelbyte" } } } } } }, "401": { "description": "Error response." } }, "description": "The endpoint creates oauth configuration for the current project environment.", "summary": "Create oauth configuration.", "tags": [ "AdminAuthentication" ], "security": [ { "sk": [] }, { "user_project": [] } ], "parameters": [], "requestBody": { "description": "Specifies the oauth provider specific configuration.", "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OAuthConfigRequest", "description": "Specifies the oauth provider specific configuration." } } } } } }, "/iam/v1/players": { "post": { "operationId": "CreateAuthPlayer", "responses": { "200": { "description": "Successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthPlayerResponseWithRecoveryShare" }, "examples": { "Example 1": { "value": { "id": "pla_ff54b031-a878-4ca2-9cf5-ae190f921e9b", "object": "player", "createdAt": 1691658234, "linkedAccounts": [ { "email": "jaume@openfort.xyz", "disabled": false, "updatedAt": 1691658234 } ] } } } } } }, "401": { "description": "Error response." }, "409": { "description": "Error response." } }, "description": "Creates an authenticated player.\n\nThe player will be authenticated with the provider and an embedded account can be pre generated.", "summary": "Create an authenticated player.", "tags": [ "AdminAuthentication" ], "security": [ { "sk": [] }, { "user_project": [] } ], "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateAuthPlayerRequest" } } } } }, "get": { "operationId": "GetAuthPlayers", "responses": { "200": { "description": "Successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthPlayerListResponse" }, "examples": { "Example 1": { "value": { "object": "list", "url": "/iam/v1/players", "start": 0, "end": 1, "total": 1, "data": [ { "id": "pla_ff54b031-a878-4ca2-9cf5-ae190f921e9b", "object": "player", "createdAt": 1691658234, "linkedAccounts": [ { "email": "jaume@openfort.xyz", "disabled": false, "updatedAt": 1691658234 } ] } ] } } } } } }, "401": { "description": "Error response." } }, "description": "Retrieves a list of authenticated players.\n\nPlayers have linked accounts and are authenticated with a provider.", "summary": "List authenticated players.", "tags": [ "AdminAuthentication" ], "security": [ { "sk": [] }, { "user_project": [] } ], "parameters": [ { "description": "Specifies the maximum number of records to return.", "in": "query", "name": "limit", "required": false, "schema": { "format": "int32", "type": "integer", "minimum": 1 } }, { "description": "Specifies the offset for the first records to return.", "in": "query", "name": "skip", "required": false, "schema": { "format": "int32", "type": "integer", "minimum": 0 } }, { "description": "Specifies the order in which to sort the results.", "in": "query", "name": "order", "required": false, "schema": { "$ref": "#/components/schemas/Prisma.SortOrder" } }, { "description": "Specifies the email address of the user.", "in": "query", "name": "email", "required": false, "schema": { "type": "string" }, "example": "user@email.com" }, { "description": "Specifies the external user ID.", "in": "query", "name": "externalUserId", "required": false, "schema": { "type": "string" }, "example": "externalUserId" } ] } }, "/iam/v1/players/{id}": { "get": { "operationId": "GetAuthPlayer", "responses": { "200": { "description": "Successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthPlayerResponse" }, "examples": { "Example 1": { "value": { "id": "pla_ff54b031-a878-4ca2-9cf5-ae190f921e9b", "object": "player", "createdAt": 1691658234, "linkedAccounts": [ { "email": "jaume@openfort.xyz", "disabled": false, "updatedAt": 1691658234 } ] } } } } } }, "401": { "description": "Error response." } }, "description": "Retrieves an authenticated player.\n\nPlayers have linked accounts and are authenticated with a provider.", "summary": "Authenticated player.", "tags": [ "AdminAuthentication" ], "security": [ { "sk": [] }, { "user_project": [] } ], "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ] }, "delete": { "operationId": "DeleteAuthPlayer", "responses": { "200": { "description": "Successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthPlayerResponse" }, "examples": { "Example 1": { "value": { "id": "pla_ff54b031-a878-4ca2-9cf5-ae190f921e9b", "object": "player", "createdAt": 1691658234, "linkedAccounts": [ { "email": "jaume@openfort.xyz", "disabled": false, "updatedAt": 1691658234 } ] } } } } } }, "401": { "description": "Error response." }, "409": { "description": "Error response." } }, "description": "Deletes a player auth object.\n\nIt will delete all linked accounts the player is authenticated with.\nIf the player has a linked embedded signer, it will be deleted as well.", "summary": "Deletes a player auth object.", "tags": [ "AdminAuthentication" ], "security": [ { "sk": [] }, { "user_project": [] } ], "parameters": [ { "description": "Specifies the unique player ID (starts with pla_).", "in": "path", "name": "id", "required": true, "schema": { "type": "string" }, "example": "pla_48eeba57-2cd5-4159-a2cb-057a23a35e65" } ] } }, "/iam/v1/verify": { "get": { "operationId": "VerifyAuthToken", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthSessionResponse" }, "examples": { "Example 1": { "value": { "projectId": "pro_...", "expiration": 1234567890, "issuedAt": 1234567890, "issuer": "openfort.xyz", "sessionId": "...", "playerId": "pla_...", "livemode": true } } } } } }, "401": { "description": "" } }, "description": "Verifies the token generated by Openfort Auth.", "summary": "Verify auth token.", "tags": [ "AdminAuthentication" ], "security": [ { "sk": [] } ], "parameters": [ { "description": "Specifies the auth token.", "in": "query", "name": "token", "required": true, "schema": { "type": "string" }, "example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJwcm9qZWN0SWQiOiJwcm9qZWN0XzQ4ZWViYTU3LTJjZDUtNDE1OS1hMmNiLTA1N2EyM2EzNWU2NSIsInVzZXJJZCI6InVzZXJfNDhlZWI1Ny0yY2Q1LTQxNTktYTJjYi0wNTdhMjNhMzVlNjUiLCJpYXQiOjE2MjY0NjY0NzcsImV4cCI6MTYyN" } ] } }, "/iam/v1/{publishable_key}/jwks.json": { "get": { "operationId": "GetJwks", "responses": { "200": { "description": "Successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/JwtKeyResponse" }, "examples": { "Example 1": { "value": { "keys": [ { "kty": "EC", "x": "rUNYXnOcdImB6lRAMwq1lNaZ8wc5Giqa_jLeO0ChKac", "y": "vl9yeaTYJXCMY1283SRrOBHXwpvqLjrITGjvqF-cshQ", "crv": "P-256", "kid": "_VqPj1iUH1ij6gRNjYnY4uNc083QYdNxc4h-FlnhWqs", "use": "sig", "alg": "ES256" }, { "kty": "EC", "x": "RzfDvBCyE9UR_-0wiIMtSHiAlnBIfLvYhCMLxrAb4xo", "y": "h07rmvlyRsqhOGfapJqMy8NgqVyhwy6Iz2VlNbvpiOA", "crv": "P-256", "kid": "z6rhkcbjp_G2wAck3L_sKoQAWMofLsxVYnYIru17Ps4", "use": "sig", "alg": "ES256" } ] } } } } } } }, "description": "Get the jwks.json file.\n\nYou can use the jwks.json file to verify the signature of a JWT token issued by Openfort Auth.", "summary": "Get the jwks.json file.", "tags": [ "Authentication" ], "security": [], "parameters": [ { "description": "Specifies the project publishable key (starts with pk_).", "in": "path", "name": "publishable_key", "required": true, "schema": { "type": "string" }, "example": "pk_test_4194ad24-c818-4e5c-b003-9cc2aa7df53b" } ] } }, "/iam/v1/me": { "get": { "operationId": "Me", "responses": { "200": { "description": "Successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthPlayerResponse" }, "examples": { "Example 1": { "value": { "id": "pla_...", "object": "player", "createdAt": 1234567890, "linkedAccounts": [ { "provider": "email", "email": "jaume@openfort.xyz", "disabled": false } ] } } } } } }, "401": { "description": "Error response." } }, "tags": [ "Authentication" ], "security": [ { "pk_access_token": [] }, { "pk_third_party": [] } ], "parameters": [] } }, "/iam/v1/authorize": { "post": { "operationId": "Authorize", "responses": { "200": { "description": "Successful response.", "content": { "application/json": { "schema": { "anyOf": [ { "$ref": "#/components/schemas/AuthPlayerResponse" }, { "$ref": "#/components/schemas/AuthenticatedPlayerResponse" } ] }, "examples": { "Example 1": { "value": { "id": "pla_...", "object": "player", "createdAt": 1234567890, "linkedAccounts": [ { "provider": "email", "email": "jaume@openfort.xyz", "disabled": false } ] } } } } } }, "401": { "description": "Unauthorized." }, "404": { "description": "Player not found." } }, "tags": [ "AdminAuthentication" ], "security": [ { "sk": [] }, { "pk_guardian_gate": [] } ], "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthorizePlayerRequest" } } } } } }, "/iam/v2/me": { "get": { "operationId": "meV2", "responses": { "200": { "description": "Successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthUserResponse" }, "examples": { "Example 1": { "value": { "id": "pla_***", "createdAt": 123456789, "name": "Satoshi", "email": "satoshi@openfort.io", "emailVerified": true, "phoneNumber": null, "phoneNumberVerified": false, "isAnonymous": false, "linkedAccounts": [ { "provider": "google", "createdAt": 12346789, "updatedAt": 12346789, "accountId": "123456789" } ] } } } } } }, "401": { "description": "Error response." } }, "tags": [ "AuthenticationV2" ], "security": [ { "pk_third_party": [] }, { "better_auth": [] } ], "parameters": [] } }, "/iam/v2/user/third_party": { "post": { "operationId": "ThirdPartyV2", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthUserResponse" }, "examples": { "Example 1": { "value": { "id": "pla_***", "createdAt": 123456789, "name": "Satoshi", "email": "satoshi@openfort.io", "emailVerified": true, "phoneNumber": null, "phoneNumberVerified": false, "isAnonymous": false, "linkedAccounts": [ { "provider": "google", "createdAt": 12346789, "updatedAt": 12346789, "accountId": "123456789" } ] } } } } } }, "401": { "description": "" } }, "summary": "Verify oauth token of a third party auth provider.", "tags": [ "AuthenticationV2" ], "security": [ { "pk": [] }, { "pk_third_party": [] } ], "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ThirdPartyOAuthRequest" } } } } } } }, "servers": [ { "url": "https://api.openfort.io", "description": "Openfort API Server" } ] }