diff --git a/examples/apps/auth-sample/src/pages/login.tsx b/examples/apps/auth-sample/src/pages/login.tsx index dbfc746e..11567c7a 100644 --- a/examples/apps/auth-sample/src/pages/login.tsx +++ b/examples/apps/auth-sample/src/pages/login.tsx @@ -8,7 +8,11 @@ import {TextField} from '../components/Fields'; import {StatusType, Toast} from '../components/Toasts'; import openfort from '../utils/openfortConfig'; import {getURL} from '../utils/getUrl'; -import {AuthPlayerResponse, OAuthProvider} from '@openfort/openfort-js'; +import { + AuthPlayerResponse, + OAuthProvider, + ThirdPartyOAuthProvider, +} from '@openfort/openfort-js'; function LoginPage() { const router = useRouter(); diff --git a/examples/apps/auth-sample/src/utils/openfortAdminConfig.ts b/examples/apps/auth-sample/src/utils/openfortAdminConfig.ts index cf18edb1..36cff112 100644 --- a/examples/apps/auth-sample/src/utils/openfortAdminConfig.ts +++ b/examples/apps/auth-sample/src/utils/openfortAdminConfig.ts @@ -4,7 +4,7 @@ const openfort = (() => { if (!process.env.NEXTAUTH_OPENFORT_SECRET_KEY) { throw new Error("Openfort secret key is not set"); } - return new Openfort(process.env.NEXTAUTH_OPENFORT_SECRET_KEY, 'http://localhost:3000'); + return new Openfort(process.env.NEXTAUTH_OPENFORT_SECRET_KEY); })(); export default openfort; diff --git a/packages/internal/openapi-clients/src/backend-openapi.json b/packages/internal/openapi-clients/src/backend-openapi.json index f7f54ee7..743c7741 100644 --- a/packages/internal/openapi-clients/src/backend-openapi.json +++ b/packages/internal/openapi-clients/src/backend-openapi.json @@ -117,10 +117,10 @@ "InputJsonObject": { "properties": {}, "type": "object", - "description": "Matches a JSON object.\nUnlike `JsonObject`, this type allows undefined and read-only properties." + "description": "Matches a JSON object.\r\nUnlike \\`JsonObject\\`, this type allows undefined and read-only properties." }, "InputJsonArray": { - "description": "Matches a JSON array.\nUnlike `JsonArray`, readonly arrays are assignable to this type.", + "description": "Matches a JSON array.\r\nUnlike \\`JsonArray\\`, readonly arrays are assignable to this type.", "properties": {}, "type": "object", "additionalProperties": false @@ -148,7 +148,7 @@ "type": "object" } ], - "description": "Matches any valid value that can be used as an input for operations like\ncreate and update as the value of a JSON field. Unlike `JsonValue`, this\ntype allows read-only arrays and read-only object properties and disallows\n`null` at the top level.\n\n`null` cannot be used as the value of a JSON field because its meaning\nwould be ambiguous. Use `Prisma.JsonNull` to store the JSON null value or\n`Prisma.DbNull` to clear the JSON value and set the field to the database\nNULL value instead." + "description": "Matches any valid value that can be used as an input for operations like\r\ncreate and update as the value of a JSON field. Unlike \\`JsonValue\\`, this\r\ntype allows read-only arrays and read-only object properties and disallows\r\n\\`null\\` at the top level.\r\n\r\n\\`null\\` cannot be used as the value of a JSON field because its meaning\r\nwould be ambiguous. Use \\`Prisma.JsonNull\\` to store the JSON null value or\r\n\\`Prisma.DbNull\\` to clear the JSON value and set the field to the database\r\nNULL value instead." }, "LinkedAccountResponse": { "properties": { @@ -185,6 +185,208 @@ "type": "object", "additionalProperties": false }, + "TransactionAbstractionType": { + "enum": [ + "accountAbstractionV6", + "zkSync", + "standard" + ], + "type": "string" + }, + "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 + }, + "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 + }, "Log": { "properties": { "blockNumber": { @@ -357,6 +559,10 @@ "userOperationHash": { "type": "string", "description": "The hashed userOperation." + }, + "signableHash": { + "type": "string", + "description": "chain-agnostic hash to sign." } }, "type": "object", @@ -419,11 +625,32 @@ "description": "The chain ID.", "example": 5 }, + "abstractionType": { + "$ref": "#/components/schemas/TransactionAbstractionType", + "description": "The transaction abstraction type", + "example": "accountAbstractionV6" + }, + "details": { + "anyOf": [ + { + "$ref": "#/components/schemas/ZKSyncDetails" + }, + { + "$ref": "#/components/schemas/AccountAbstractionV6Details" + }, + { + "$ref": "#/components/schemas/StandardDetails" + } + ], + "description": "Specific transaction details based on its type" + }, "userOperationHash": { "type": "string", - "description": "The hashed userOperation." + "deprecated": true + }, + "userOperation": { + "deprecated": true }, - "userOperation": {}, "response": { "$ref": "#/components/schemas/ResponseResponse" }, @@ -458,6 +685,7 @@ "createdAt", "updatedAt", "chainId", + "abstractionType", "account" ], "type": "object", @@ -2046,7 +2274,7 @@ }, "accountType": { "type": "string", - "description": "The type of smart account that will be created (e.g. ERC6551V1, ManagedV5, UpgradeableV5). Defaults to UpgradeableV5.", + "description": "The type of smart account that will be created (e.g. ERC6551V1, ManagedV5, UpgradeableV5, ZKSyncUpgradeableV1). Defaults to UpgradeableV5.", "example": "UpgradeableV5" }, "defaultGuardian": { @@ -2357,11 +2585,32 @@ "description": "The chain ID.", "example": 5 }, + "abstractionType": { + "$ref": "#/components/schemas/TransactionAbstractionType", + "description": "The transaction abstraction type", + "example": "accountAbstractionV6" + }, + "details": { + "anyOf": [ + { + "$ref": "#/components/schemas/ZKSyncDetails" + }, + { + "$ref": "#/components/schemas/AccountAbstractionV6Details" + }, + { + "$ref": "#/components/schemas/StandardDetails" + } + ], + "description": "Specific transaction details based on its type" + }, "userOperationHash": { "type": "string", - "description": "The hashed userOperation." + "deprecated": true + }, + "userOperation": { + "deprecated": true }, - "userOperation": {}, "response": { "$ref": "#/components/schemas/ResponseResponse" }, @@ -2420,6 +2669,7 @@ "createdAt", "updatedAt", "chainId", + "abstractionType", "account" ], "type": "object", @@ -2493,7 +2743,7 @@ "type": "object", "additionalProperties": false }, - "DomainData": { + "TypedDomainData": { "properties": { "chainId": { "type": "integer", @@ -2502,13 +2752,24 @@ "example": 80002 }, "name": { - "type": "string" + "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" + "type": "string", + "description": "The current major version of the signing domain. Signatures from different versions are not compatible.", + "example": "1" }, "verifyingContract": { - "type": "string" + "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": [ @@ -2536,7 +2797,7 @@ "SignPayloadRequest": { "properties": { "domain": { - "$ref": "#/components/schemas/DomainData", + "$ref": "#/components/schemas/TypedDomainData", "description": "Domain. Specific to the dApp." }, "types": { @@ -2568,8 +2829,7 @@ "domain", "types", "primaryType", - "value", - "hash" + "value" ], "type": "object", "additionalProperties": false @@ -4156,6 +4416,80 @@ "type": "object", "additionalProperties": false }, + "InitEmbeddedRequest": { + "properties": { + "chainId": { + "type": "number", + "format": "double" + } + }, + "required": [ + "chainId" + ], + "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 + }, + "RegisterEmbeddedRequest": { + "properties": { + "chainId": { + "type": "number", + "format": "double" + }, + "address": { + "type": "string" + }, + "share": { + "type": "string" + } + }, + "required": [ + "chainId", + "address", + "share" + ], + "type": "object", + "additionalProperties": false + }, + "ExportedEmbeddedRequest": { + "properties": { + "address": { + "type": "string" + } + }, + "required": [ + "address" + ], + "type": "object", + "additionalProperties": false + }, "EntityType.DEVICE": { "enum": [ "device" @@ -5141,8 +5475,7 @@ "id", "object", "createdAt", - "address", - "url" + "address" ], "type": "object", "additionalProperties": false @@ -5176,8 +5509,7 @@ } }, "required": [ - "address", - "url" + "address" ], "type": "object", "additionalProperties": false @@ -7349,27 +7681,27 @@ "properties": { "preVerificationGas": { "type": "string", - "description": "the preVerification gas used by this UserOperation." + "deprecated": true }, "verificationGas": { "type": "string", - "description": "gas used for validation of this UserOperation, including account creation" + "deprecated": true }, "validUntil": { "type": "string", - "description": "the deadline after which this UserOperation is invalid (not a gas estimation parameter, but returned by validation" + "deprecated": true }, "validAfter": { "type": "string", - "description": "the deadline after which this UserOperation is valid (not a gas estimation parameter, but returned by validation" + "deprecated": true }, "callGasLimit": { "type": "string", - "description": "estimated cost of calling the account with the given callData" + "deprecated": true }, "verificationGasLimit": { "type": "string", - "description": "returned by some bundlers (e.g. Biconomy's)" + "deprecated": true }, "estimatedTXGas": { "type": "string", @@ -7393,9 +7725,6 @@ } }, "required": [ - "preVerificationGas", - "verificationGas", - "callGasLimit", "estimatedTXGas", "estimatedTXGasFee", "estimatedTXGasFeeUSD", @@ -7404,303 +7733,13 @@ "type": "object", "additionalProperties": false }, - "EntityType.WEB3_CONNECTION": { + "Currency": { "enum": [ - "web3Connection" + "usd" ], "type": "string" }, - "Web3ConnectionResponse": { - "properties": { - "id": { - "type": "string" - }, - "object": { - "$ref": "#/components/schemas/EntityType.WEB3_CONNECTION" - }, - "createdAt": { - "type": "integer", - "format": "int32" - }, - "disconnected": { - "type": "boolean" - }, - "player": { - "anyOf": [ - { - "$ref": "#/components/schemas/Player" - }, - { - "type": "string" - } - ], - "description": "The player ID (starts with pla_).", - "example": "pla_..." - } - }, - "required": [ - "id", - "object", - "createdAt", - "disconnected", - "player" - ], - "type": "object", - "additionalProperties": false - }, - "Web3ConnectionListResponse": { - "properties": { - "object": { - "$ref": "#/components/schemas/ResponseType.LIST" - }, - "url": { - "type": "string" - }, - "data": { - "items": { - "$ref": "#/components/schemas/Web3ConnectionResponse" - }, - "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 - }, - "Web3ConnectionListQueries": { - "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/SortOrder", - "description": "Specifies the order in which to sort the results." - }, - "player": { - "type": "string", - "description": "Specifies the unique player ID (starts with pla_)", - "example": "pla_6f6c9067-89fa-4fc8-ac72-c242a268c584" - }, - "disconnected": { - "type": "boolean", - "description": "Specifies connection status", - "example": false - } - }, - "type": "object", - "additionalProperties": false - }, - "Web3ConnectionResponseExpandable": { - "type": "string", - "enum": [ - "player" - ], - "nullable": false - }, - "CreateWeb3ConnectionRequest": { - "properties": { - "player": { - "type": "string", - "description": "ID of the Player this Web3Connection belongs to (starts with `pla_`).", - "example": "pla_e0b84653-1741-4a3d-9e91-2b0fd2942f60" - }, - "chainId": { - "type": "integer", - "format": "int32", - "description": "The chain ID. Must be a [supported chain](/chains).", - "example": 80002 - }, - "uri": { - "type": "string", - "description": "Specifies the URI of WalletConnect.", - "example": "wc:f6b98f7d78c5233413aacc7cbe9ff6035eec3611d36eb311051429a83af419a1@2?relay-protocol=irn&symKey=e8b33b4b969dc952ba6d28bd58f0ddb7ec1106a3c9610961218061a7813f11a6" - } - }, - "required": [ - "player", - "chainId", - "uri" - ], - "type": "object", - "additionalProperties": false - }, - "Web3ActionStatusEnum": { - "enum": [ - "Pending", - "Approved", - "Rejected", - "Expired", - "Failed" - ], - "type": "string" - }, - "EntityType.WEB3_ACTION": { - "enum": [ - "web3Action" - ], - "type": "string" - }, - "Web3ActionResponse": { - "properties": { - "id": { - "type": "string" - }, - "object": { - "$ref": "#/components/schemas/EntityType.WEB3_ACTION" - }, - "createdAt": { - "type": "integer", - "format": "int32" - }, - "web3Connection": { - "type": "string", - "description": "The web3_connection ID (starts with web3_).", - "example": "web3_..." - }, - "status": { - "$ref": "#/components/schemas/Web3ActionStatusEnum" - }, - "chaindId": { - "type": "string" - }, - "method": { - "type": "string" - }, - "from": { - "type": "string" - }, - "to": { - "type": "string" - }, - "data": { - "type": "string" - }, - "decodedData": { - "type": "string" - }, - "hashedData": { - "type": "string" - }, - "value": { - "type": "string" - }, - "gas": { - "type": "string" - } - }, - "required": [ - "id", - "object", - "createdAt", - "web3Connection", - "status", - "chaindId", - "method", - "from", - "data", - "decodedData", - "hashedData" - ], - "type": "object", - "additionalProperties": false - }, - "Web3ActionListResponse": { - "properties": { - "object": { - "$ref": "#/components/schemas/ResponseType.LIST" - }, - "url": { - "type": "string" - }, - "data": { - "items": { - "$ref": "#/components/schemas/Web3ActionResponse" - }, - "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 - }, - "SubmitWeb3ActionRequest": { - "properties": { - "approve": { - "type": "boolean", - "description": "True to approve the action, false to reject it.", - "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" - }, - "signature": { - "type": "string", - "description": "signed repositories by the owner", - "example": "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef" - } - }, - "required": [ - "approve" - ], - "type": "object", - "additionalProperties": false - }, - "Currency": { - "enum": [ - "usd" - ], - "type": "string" - }, - "Money": { + "Money": { "properties": { "amount": { "type": "integer", @@ -8021,11 +8060,14 @@ } }, "401": { - "description": "Error response." + "description": "Unauthorized." + }, + "404": { + "description": "Player not found." } }, "tags": [ - "Authentication" + "AdminAuthentication" ], "security": [ { @@ -9997,6 +10039,16 @@ "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_..." @@ -10033,8 +10085,7 @@ "interactions": [ { "functionName": "mint", - "value": "100000000000000", - "contract": "0x0576...1B57", + "contract": "con_...", "functionArgs": [ "0x63B7...484f" ] @@ -10106,6 +10157,16 @@ "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_..." @@ -10142,8 +10203,7 @@ "interactions": [ { "functionName": "mint", - "value": "100000000000000", - "contract": "0x0576...1B57", + "contract": "con_...", "functionArgs": [ "0x63B7...484f" ] @@ -10438,6 +10498,16 @@ "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_..." @@ -10474,8 +10544,7 @@ "interactions": [ { "functionName": "mint", - "value": "100000000000000", - "contract": "0x0576...1B57", + "contract": "con_...", "functionArgs": [ "0x63B7...484f" ] @@ -10546,6 +10615,16 @@ "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_..." @@ -10582,8 +10661,7 @@ "interactions": [ { "functionName": "mint", - "value": "100000000000000", - "contract": "0x0576...1B57", + "contract": "con_...", "functionArgs": [ "0x63B7...484f" ] @@ -11426,21 +11504,24 @@ "id": "tin_c502d628-5bb3-42f2-b8f5-62ba4d71df3a", "createdAt": 1689869074, "object": "transactionIntent", - "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" + "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_..." @@ -11477,8 +11558,7 @@ "interactions": [ { "functionName": "mint", - "value": "100000000000000", - "contract": "0x0576...1B57", + "contract": "con_...", "functionArgs": [ "0x63B7...484f" ] @@ -12924,21 +13004,24 @@ "id": "tin_c502d628-5bb3-42f2-b8f5-62ba4d71df3a", "createdAt": 1689869074, "object": "transactionIntent", - "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" + "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_..." @@ -12975,8 +13058,7 @@ "interactions": [ { "functionName": "mint", - "value": "100000000000000", - "contract": "0x0576...1B57", + "contract": "con_...", "functionArgs": [ "0x63B7...484f" ] @@ -13046,21 +13128,24 @@ "id": "tin_c502d628-5bb3-42f2-b8f5-62ba4d71df3a", "createdAt": 1689869074, "object": "transactionIntent", - "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" + "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_..." @@ -13097,8 +13182,7 @@ "interactions": [ { "functionName": "mint", - "value": "100000000000000", - "contract": "0x0576...1B57", + "contract": "con_...", "functionArgs": [ "0x63B7...484f" ] @@ -13941,21 +14025,24 @@ "id": "tin_c502d628-5bb3-42f2-b8f5-62ba4d71df3a", "createdAt": 1689869074, "object": "transactionIntent", - "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" + "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_..." @@ -13992,8 +14079,7 @@ "interactions": [ { "functionName": "mint", - "value": "100000000000000", - "contract": "0x0576...1B57", + "contract": "con_...", "functionArgs": [ "0x63B7...484f" ] @@ -14595,7 +14681,16 @@ "sk": [] } ], - "parameters": [], + "parameters": [ + { + "in": "header", + "name": "X-Behalf-Of-Project", + "required": false, + "schema": { + "type": "string" + } + } + ], "requestBody": { "required": true, "content": { @@ -14678,7 +14773,16 @@ "sk": [] } ], - "parameters": [], + "parameters": [ + { + "in": "header", + "name": "X-Behalf-Of-Project", + "required": false, + "schema": { + "type": "string" + } + } + ], "requestBody": { "required": true, "content": { @@ -16003,21 +16107,24 @@ "id": "tin_c502d628-5bb3-42f2-b8f5-62ba4d71df3a", "createdAt": 1689869074, "object": "transactionIntent", - "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" + "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_..." @@ -16054,8 +16161,7 @@ "interactions": [ { "functionName": "mint", - "value": "100000000000000", - "contract": "0x0576...1B57", + "contract": "con_...", "functionArgs": [ "0x63B7...484f" ] @@ -16222,21 +16328,24 @@ "id": "tin_c502d628-5bb3-42f2-b8f5-62ba4d71df3a", "createdAt": 1689869074, "object": "transactionIntent", - "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" + "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_..." @@ -16273,8 +16382,7 @@ "interactions": [ { "functionName": "mint", - "value": "100000000000000", - "contract": "0x0576...1B57", + "contract": "con_...", "functionArgs": [ "0x63B7...484f" ] @@ -16287,21 +16395,24 @@ "id": "tin_c502d628-5bb3-42f2-b8f5-62ba4d71df3a", "createdAt": 1689869074, "object": "transactionIntent", - "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" + "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_..." @@ -16315,20 +16426,7 @@ "nextAction": { "type": "sign_with_wallet", "payload": { - "userOperation": { - "sender": "0x814A...FB72", - "nonce": "0x0", - "initCode": "0x", - "callData": "0xb61d27f6000000000000000", - "callGasLimit": "0x2e84d", - "verificationGasLimit": "0x1bcef", - "maxFeePerGas": "0x62590091", - "maxPriorityFeePerGas": "0x62590091", - "paymasterAndData": "0x3210...391b", - "signature": "", - "preVerificationGas": "0xb80c" - }, - "userOperationHash": "0x25d3...005c" + "signableHash": "0x25d3...005c" } }, "interactions": [ @@ -16349,20 +16447,19 @@ "createdAt": 1689869074, "object": "transactionIntent", "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" + "details": { + "from": "0x70997970c51812dc3a010c7d01b50e0d17dc79c8", + "to": "0x3c44cdddb6a900fa2b585dd299e03d12fa4293bc", + "gas": "0x5208", + "maxFeePerGas": "0x3b9aca00", + "maxPriorityFeePerGas": "0x3b9aca00", + "nonce": "0x0", + "data": "0x3c44...", + "paymaster": "0x3c44cdddb6a900fa2b585dd299e03d12fa4293bc", + "paymasterInput": "0x3c44..." }, - "chainId": 80002, + "chainId": 300, + "abstractionType": "zkSync", "updatedAt": 1689869074, "policy": { "id": "pol_..." @@ -16376,8 +16473,7 @@ "interactions": [ { "functionName": "mint", - "value": "100000000000000", - "contract": "0x0576...1B57", + "contract": "con_...", "functionArgs": [ "0x63B7...484f" ] @@ -16475,21 +16571,24 @@ "id": "tin_c502d628-5bb3-42f2-b8f5-62ba4d71df3a", "createdAt": 1689869074, "object": "transactionIntent", - "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" + "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_..." @@ -16526,8 +16625,7 @@ "interactions": [ { "functionName": "mint", - "value": "100000000000000", - "contract": "0x0576...1B57", + "contract": "con_...", "functionArgs": [ "0x63B7...484f" ] @@ -16705,21 +16803,24 @@ "id": "tin_c502d628-5bb3-42f2-b8f5-62ba4d71df3a", "createdAt": 1689869074, "object": "transactionIntent", - "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" + "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_..." @@ -16756,8 +16857,7 @@ "interactions": [ { "functionName": "mint", - "value": "100000000000000", - "contract": "0x0576...1B57", + "contract": "con_...", "functionArgs": [ "0x63B7...484f" ] @@ -16826,408 +16926,6 @@ } } } - }, - "/v1/web3_connections": { - "get": { - "operationId": "GetWeb3Connections", - "responses": { - "200": { - "description": "Successful response.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Web3ConnectionListResponse" - }, - "examples": { - "Example 1": { - "value": { - "object": "list", - "url": "/v1/web3_connections", - "data": [ - { - "id": "web3_c502d628-5bb3-42f2-b8f5-62ba4d71df3a", - "object": "web3Connection", - "createdAt": 1689869074, - "player": "pla_...", - "disconnected": false - } - ], - "start": 0, - "end": 1, - "total": 1 - } - } - } - } - } - }, - "401": { - "description": "Error response." - } - }, - "description": "Returns a list of web3 connections for the given player.\nThe connections are returned sorted by creation date, with the most recently created connections appearing first.\nBy default, a maximum of ten connections are shown per page.", - "summary": "List Web3 connections.", - "tags": [ - "Web3Connections" - ], - "security": [ - { - "sk": [] - }, - { - "pk_access_token": [] - }, - { - "pk_third_party": [] - } - ], - "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/SortOrder" - } - }, - { - "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 connection status", - "in": "query", - "name": "disconnected", - "required": false, - "schema": { - "type": "boolean" - }, - "example": false - } - ] - }, - "post": { - "operationId": "CreateWeb3Connection", - "responses": { - "200": { - "description": "Successful response.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Web3ConnectionResponse" - }, - "examples": { - "Example 1": { - "value": { - "id": "web3_c502d628-5bb3-42f2-b8f5-62ba4d71df3a", - "object": "web3Connection", - "createdAt": 1689869074, - "player": "pla_...", - "disconnected": false - } - } - } - } - } - }, - "401": { - "description": "Error response." - }, - "409": { - "description": "Error response." - } - }, - "description": "This endpoint allows you to create a new web3 connection to your Openfort player.\nTogether with the player ID (pla_), you need to provide a chain ID.\nThe chain to use is required because Openfort needs to make sure the account is deployed, as counterfactual addresses cannot use web3 connections.\nThe `uri` body parameter must contain a [WalletConnect pairing URI](https://specs.walletconnect.com/2.0/specs/clients/core/pairing/pairing-uri).", - "summary": "Create a Web3 Connection object.", - "tags": [ - "Web3Connections" - ], - "security": [ - { - "sk": [] - }, - { - "pk_access_token": [] - }, - { - "pk_third_party": [] - } - ], - "parameters": [], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateWeb3ConnectionRequest" - } - } - } - } - } - }, - "/v1/web3_connections/{id}": { - "get": { - "operationId": "GetWeb3Connection", - "responses": { - "200": { - "description": "Successful response.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Web3ConnectionResponse" - }, - "examples": { - "Example 1": { - "value": { - "id": "web3_c502d628-5bb3-42f2-b8f5-62ba4d71df3a", - "object": "web3Connection", - "createdAt": 1689869074, - "player": "pla_...", - "disconnected": false - } - } - } - } - } - }, - "401": { - "description": "Error response." - } - }, - "description": "Retrieves the details of an existing web3 connection.\nSupply the unique web3 connection ID from either a web3 connection creation request or the web3 connection list.\nOpenfort will return the corresponding web3 connection information.", - "summary": "Get a web3Connection object.", - "tags": [ - "Web3Connections" - ], - "security": [ - { - "sk": [] - }, - { - "pk_access_token": [] - }, - { - "pk_third_party": [] - } - ], - "parameters": [ - { - "description": "Specifies the unique web3Connection ID (starts with web3_).", - "in": "path", - "name": "id", - "required": true, - "schema": { - "type": "string" - }, - "example": "web3_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/Web3ConnectionResponseExpandable" - } - }, - "example": [ - "players" - ] - } - ] - } - }, - "/v1/web3_connections/{id}/actions": { - "get": { - "operationId": "GetWeb3Actions", - "responses": { - "200": { - "description": "Successful response.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Web3ActionListResponse" - }, - "examples": { - "Example 1": { - "value": { - "object": "list", - "url": "/v1/web3_actions", - "data": [ - { - "id": "act_c502d628-5bb3-42f2-b8f5-62ba4d71df3a", - "object": "web3Action", - "createdAt": 1689869074, - "web3Connection": "web3_...", - "status": "Pending", - "method": "personal_sign", - "chaindId": "11155111", - "from": "0x...", - "data": "0x...", - "hashedData": "0x...", - "decodedData": "This is a decoded repositories..." - } - ], - "start": 0, - "end": 1, - "total": 1 - } - } - } - } - } - }, - "401": { - "description": "Error response." - } - }, - "description": "Returns a list of web3 actions for the given web3 connection.\nThe actions are returned sorted by creation date, with the most recently received action appearing first.\nBy default, a maximum of ten actions are shown per page.", - "summary": "List Web3 actions from a web3 connection.", - "tags": [ - "Web3Connections" - ], - "security": [ - { - "sk": [] - }, - { - "pk_access_token": [] - }, - { - "pk_third_party": [] - } - ], - "parameters": [ - { - "description": "Specifies the web3Connection ID (starts with web3_).", - "in": "path", - "name": "id", - "required": true, - "schema": { - "type": "string" - }, - "example": "web3_48eeba57-2cd5-4159-a2cb-057a23a35e65" - } - ] - } - }, - "/v1/web3_connections/{id}/actions/{web3_action}": { - "post": { - "operationId": "SubmitWeb3Action", - "responses": { - "200": { - "description": "Successful response.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Web3ActionResponse" - }, - "examples": { - "Example 1": { - "value": { - "id": "act_c502d628-5bb3-42f2-b8f5-62ba4d71df3a", - "object": "web3Action", - "createdAt": 1689869074, - "web3Connection": "web3_...", - "status": "Approved", - "method": "personal_sign", - "chaindId": "11155111", - "from": "0x...", - "data": "0x...", - "hashedData": "0x...", - "decodedData": "This is a decoded repositories..." - } - } - } - } - } - }, - "401": { - "description": "Error response." - } - }, - "description": "Approve or Reject a web3 action for the given web3 connection.", - "summary": "Approve or Reject a web3 action", - "tags": [ - "Web3Connections" - ], - "security": [ - { - "sk": [] - }, - { - "pk_access_token": [] - }, - { - "pk_third_party": [] - } - ], - "parameters": [ - { - "description": "Specifies the web3Connection ID (starts with web3_).", - "in": "path", - "name": "id", - "required": true, - "schema": { - "type": "string" - }, - "example": "web3_48eeba57-2cd5-4159-a2cb-057a23a35e65" - }, - { - "description": "Specifies web3_action (starts with act_).", - "in": "path", - "name": "web3_action", - "required": true, - "schema": { - "type": "string" - }, - "example": "act_48eeba57-2cd5-4159-a2cb-057a23a35e65" - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SubmitWeb3ActionRequest" - } - } - } - } - } } }, "servers": [ diff --git a/packages/internal/openapi-clients/src/backend/.openapi-generator/FILES b/packages/internal/openapi-clients/src/backend/.openapi-generator/FILES index c0206a32..9e1a0df4 100644 --- a/packages/internal/openapi-clients/src/backend/.openapi-generator/FILES +++ b/packages/internal/openapi-clients/src/backend/.openapi-generator/FILES @@ -20,12 +20,12 @@ domain/sessions-api.ts domain/settings-api.ts domain/subscriptions-api.ts domain/transaction-intents-api.ts -domain/web3-connections-api.ts git_push.sh index.ts models/abi-type.ts models/abi.ts models/accelbyte-oauth-config.ts +models/account-abstraction-v6-details.ts models/account-event-response.ts models/account-inventory-list-queries.ts models/account-list-queries.ts @@ -105,7 +105,6 @@ models/create-session-request.ts models/create-subscription-request.ts models/create-transaction-intent-request.ts models/create-trigger-request.ts -models/create-web3-connection-request.ts models/currency.ts models/custom-auth-config.ts models/delete-smtpconfig-response.ts @@ -122,12 +121,12 @@ models/developer-account.ts models/device-list-queries.ts models/device-response.ts models/discord-oauth-config.ts -models/domain-data.ts models/ecosystem-configuration-response.ts models/email-sample-delete-response.ts models/email-sample-response.ts models/email-type-request.ts models/email-type-response.ts +models/embedded-response.ts models/entity-id-response.ts models/entity-type-account.ts models/entity-type-contract.ts @@ -150,8 +149,6 @@ models/entity-type-subscription.ts models/entity-type-transactionintent.ts models/entity-type-trigger.ts models/entity-type-user.ts -models/entity-type-web3-action.ts -models/entity-type-web3-connection.ts models/epic-games-oauth-config.ts models/error-type-invalidrequesterror.ts models/estimate-transaction-intent-gas-result.ts @@ -159,6 +156,7 @@ models/event-delete-response.ts models/event-list-queries.ts models/event-list-response.ts models/event-response.ts +models/exported-embedded-request.ts models/facebook-oauth-config.ts models/fee.ts models/field-errors-value.ts @@ -171,6 +169,7 @@ models/gas-report-transaction-intents-inner.ts models/gas-report.ts models/google-oauth-config.ts models/index.ts +models/init-embedded-request.ts models/interaction.ts models/invalid-request-error-response.ts models/invalid-request-error.ts @@ -259,6 +258,7 @@ models/project-stats-request.ts models/project-stats-response.ts models/quote-exchange-result.ts models/refresh-token-request.ts +models/register-embedded-request.ts models/request-reset-password-request.ts models/request-verify-email-request.ts models/reset-password-request.ts @@ -282,10 +282,10 @@ models/sponsor-schema-chargecustomtokens.ts models/sponsor-schema-fixedrate.ts models/sponsor-schema-payforuser.ts models/sponsor-schema.ts +models/standard-details.ts models/start-recovery-request.ts models/stat.ts models/status.ts -models/submit-web3-action-request.ts models/subscription-delete-response.ts models/subscription-list-response.ts models/subscription-response-plan.ts @@ -304,7 +304,9 @@ models/time-interval-type.ts models/token-type.ts models/token.ts models/trade-type.ts +models/transaction-abstraction-type.ts models/transaction-confirmed-event-response.ts +models/transaction-intent-details.ts models/transaction-intent-list-queries.ts models/transaction-intent-list-response.ts models/transaction-intent-response-account.ts @@ -319,6 +321,7 @@ models/trigger-delete-response.ts models/trigger-response.ts models/twitter-oauth-config.ts models/typed-data-field.ts +models/typed-domain-data.ts models/unlink-email-request.ts models/unlink-oauth-request.ts models/update-contract-request.ts @@ -328,6 +331,7 @@ models/update-policy-rule-request.ts models/update-project-api-key-request.ts models/update-project-request.ts models/upsert-smtpconfig-request.ts +models/user-operation-v6.ts models/user-project-create-request-role.ts models/user-project-create-request.ts models/user-project-delete-response.ts @@ -338,13 +342,6 @@ models/user-project-role-member.ts models/user-project-role.ts models/user-project-update-request.ts models/verify-email-request.ts -models/web3-action-list-response.ts -models/web3-action-response.ts -models/web3-action-status-enum.ts -models/web3-connection-list-queries.ts -models/web3-connection-list-response.ts -models/web3-connection-response-expandable.ts -models/web3-connection-response-player.ts -models/web3-connection-response.ts models/webhook-response.ts models/withdrawal-policy-request.ts +models/zksync-details.ts diff --git a/packages/internal/openapi-clients/src/backend/api.ts b/packages/internal/openapi-clients/src/backend/api.ts index 647ac428..20e2bce1 100644 --- a/packages/internal/openapi-clients/src/backend/api.ts +++ b/packages/internal/openapi-clients/src/backend/api.ts @@ -29,5 +29,4 @@ export * from './domain/sessions-api'; export * from './domain/settings-api'; export * from './domain/subscriptions-api'; export * from './domain/transaction-intents-api'; -export * from './domain/web3-connections-api'; diff --git a/packages/internal/openapi-clients/src/backend/domain/admin-authentication-api.ts b/packages/internal/openapi-clients/src/backend/domain/admin-authentication-api.ts index ba282e72..bcb21eba 100644 --- a/packages/internal/openapi-clients/src/backend/domain/admin-authentication-api.ts +++ b/packages/internal/openapi-clients/src/backend/domain/admin-authentication-api.ts @@ -34,6 +34,10 @@ import { AuthSessionResponse } from '../models'; // @ts-ignore import { AuthenticateOAuthRequest } from '../models'; // @ts-ignore +import { Authorize200Response } from '../models'; +// @ts-ignore +import { AuthorizePlayerRequest } from '../models'; +// @ts-ignore import { CreateAuthPlayerRequest } from '../models'; // @ts-ignore import { OAuthConfig } from '../models'; @@ -53,6 +57,45 @@ import { SortOrder } from '../models'; */ export const AdminAuthenticationApiAxiosParamCreator = function (configuration?: Configuration) { return { + /** + * + * @param {AuthorizePlayerRequest} authorizePlayerRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + authorize: async (authorizePlayerRequest: AuthorizePlayerRequest, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'authorizePlayerRequest' is not null or undefined + assertParamExists('authorize', 'authorizePlayerRequest', authorizePlayerRequest) + const localVarPath = `/iam/v1/authorize`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication sk required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(authorizePlayerRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, /** * Creates an authenticated player. The player will be authenticated with the provider and an embedded account can be pre generated. * @summary Create an authenticated player. @@ -476,6 +519,16 @@ export const AdminAuthenticationApiAxiosParamCreator = function (configuration?: export const AdminAuthenticationApiFp = function(configuration?: Configuration) { const localVarAxiosParamCreator = AdminAuthenticationApiAxiosParamCreator(configuration) return { + /** + * + * @param {AuthorizePlayerRequest} authorizePlayerRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async authorize(authorizePlayerRequest: AuthorizePlayerRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.authorize(authorizePlayerRequest, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, /** * Creates an authenticated player. The player will be authenticated with the provider and an embedded account can be pre generated. * @summary Create an authenticated player. @@ -601,6 +654,15 @@ export const AdminAuthenticationApiFp = function(configuration?: Configuration) export const AdminAuthenticationApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { const localVarFp = AdminAuthenticationApiFp(configuration) return { + /** + * + * @param {AdminAuthenticationApiAuthorizeRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + authorize(requestParameters: AdminAuthenticationApiAuthorizeRequest, options?: AxiosRequestConfig): AxiosPromise { + return localVarFp.authorize(requestParameters.authorizePlayerRequest, options).then((request) => request(axios, basePath)); + }, /** * Creates an authenticated player. The player will be authenticated with the provider and an embedded account can be pre generated. * @summary Create an authenticated player. @@ -704,6 +766,20 @@ export const AdminAuthenticationApiFactory = function (configuration?: Configura }; }; +/** + * Request parameters for authorize operation in AdminAuthenticationApi. + * @export + * @interface AdminAuthenticationApiAuthorizeRequest + */ +export interface AdminAuthenticationApiAuthorizeRequest { + /** + * + * @type {AuthorizePlayerRequest} + * @memberof AdminAuthenticationApiAuthorize + */ + readonly authorizePlayerRequest: AuthorizePlayerRequest +} + /** * Request parameters for createAuthPlayer operation in AdminAuthenticationApi. * @export @@ -872,6 +948,17 @@ export interface AdminAuthenticationApiVerifyOAuthTokenRequest { * @extends {BaseAPI} */ export class AdminAuthenticationApi extends BaseAPI { + /** + * + * @param {AdminAuthenticationApiAuthorizeRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AdminAuthenticationApi + */ + public authorize(requestParameters: AdminAuthenticationApiAuthorizeRequest, options?: AxiosRequestConfig) { + return AdminAuthenticationApiFp(this.configuration).authorize(requestParameters.authorizePlayerRequest, options).then((request) => request(this.axios, this.basePath)); + } + /** * Creates an authenticated player. The player will be authenticated with the provider and an embedded account can be pre generated. * @summary Create an authenticated player. diff --git a/packages/internal/openapi-clients/src/backend/domain/authentication-api.ts b/packages/internal/openapi-clients/src/backend/domain/authentication-api.ts index 3c42d2bf..fbd980c9 100644 --- a/packages/internal/openapi-clients/src/backend/domain/authentication-api.ts +++ b/packages/internal/openapi-clients/src/backend/domain/authentication-api.ts @@ -30,10 +30,6 @@ import { AuthResponse } from '../models'; // @ts-ignore import { AuthenticateOAuthRequest } from '../models'; // @ts-ignore -import { Authorize200Response } from '../models'; -// @ts-ignore -import { AuthorizePlayerRequest } from '../models'; -// @ts-ignore import { DeprecatedAuthenticatedPlayerResponse } from '../models'; // @ts-ignore import { JwtKeyResponse } from '../models'; @@ -160,45 +156,6 @@ export const AuthenticationApiAxiosParamCreator = function (configuration?: Conf options: localVarRequestOptions, }; }, - /** - * - * @param {AuthorizePlayerRequest} authorizePlayerRequest - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - authorize: async (authorizePlayerRequest: AuthorizePlayerRequest, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'authorizePlayerRequest' is not null or undefined - assertParamExists('authorize', 'authorizePlayerRequest', authorizePlayerRequest) - const localVarPath = `/iam/v1/authorize`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication sk required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration) - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(authorizePlayerRequest, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, /** * The endpoint verifies the token generated by OAuth provider, creates or retrieves a player based on his email, and returns the jwt token for the player together with the player id. * @summary Authorize player with token. @@ -1155,16 +1112,6 @@ export const AuthenticationApiFp = function(configuration?: Configuration) { const localVarAxiosArgs = await localVarAxiosParamCreator.authenticateSIWE(sIWEAuthenticateRequest, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, - /** - * - * @param {AuthorizePlayerRequest} authorizePlayerRequest - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async authorize(authorizePlayerRequest: AuthorizePlayerRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.authorize(authorizePlayerRequest, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, /** * The endpoint verifies the token generated by OAuth provider, creates or retrieves a player based on his email, and returns the jwt token for the player together with the player id. * @summary Authorize player with token. @@ -1456,15 +1403,6 @@ export const AuthenticationApiFactory = function (configuration?: Configuration, authenticateSIWE(requestParameters: AuthenticationApiAuthenticateSIWERequest, options?: AxiosRequestConfig): AxiosPromise { return localVarFp.authenticateSIWE(requestParameters.sIWEAuthenticateRequest, options).then((request) => request(axios, basePath)); }, - /** - * - * @param {AuthenticationApiAuthorizeRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - authorize(requestParameters: AuthenticationApiAuthorizeRequest, options?: AxiosRequestConfig): AxiosPromise { - return localVarFp.authorize(requestParameters.authorizePlayerRequest, options).then((request) => request(axios, basePath)); - }, /** * The endpoint verifies the token generated by OAuth provider, creates or retrieves a player based on his email, and returns the jwt token for the player together with the player id. * @summary Authorize player with token. @@ -1724,20 +1662,6 @@ export interface AuthenticationApiAuthenticateSIWERequest { readonly sIWEAuthenticateRequest: SIWEAuthenticateRequest } -/** - * Request parameters for authorize operation in AuthenticationApi. - * @export - * @interface AuthenticationApiAuthorizeRequest - */ -export interface AuthenticationApiAuthorizeRequest { - /** - * - * @type {AuthorizePlayerRequest} - * @memberof AuthenticationApiAuthorize - */ - readonly authorizePlayerRequest: AuthorizePlayerRequest -} - /** * Request parameters for authorizeWithOAuthToken operation in AuthenticationApi. * @export @@ -2141,17 +2065,6 @@ export class AuthenticationApi extends BaseAPI { return AuthenticationApiFp(this.configuration).authenticateSIWE(requestParameters.sIWEAuthenticateRequest, options).then((request) => request(this.axios, this.basePath)); } - /** - * - * @param {AuthenticationApiAuthorizeRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof AuthenticationApi - */ - public authorize(requestParameters: AuthenticationApiAuthorizeRequest, options?: AxiosRequestConfig) { - return AuthenticationApiFp(this.configuration).authorize(requestParameters.authorizePlayerRequest, options).then((request) => request(this.axios, this.basePath)); - } - /** * The endpoint verifies the token generated by OAuth provider, creates or retrieves a player based on his email, and returns the jwt token for the player together with the player id. * @summary Authorize player with token. diff --git a/packages/internal/openapi-clients/src/backend/domain/sessions-api.ts b/packages/internal/openapi-clients/src/backend/domain/sessions-api.ts index d16745c0..8bbd2598 100644 --- a/packages/internal/openapi-clients/src/backend/domain/sessions-api.ts +++ b/packages/internal/openapi-clients/src/backend/domain/sessions-api.ts @@ -45,10 +45,11 @@ export const SessionsApiAxiosParamCreator = function (configuration?: Configurat * Creates a Session. * @summary Create a session key. * @param {CreateSessionRequest} createSessionRequest + * @param {string} [xBehalfOfProject] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - createSession: async (createSessionRequest: CreateSessionRequest, options: AxiosRequestConfig = {}): Promise => { + createSession: async (createSessionRequest: CreateSessionRequest, xBehalfOfProject?: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'createSessionRequest' is not null or undefined assertParamExists('createSession', 'createSessionRequest', createSessionRequest) const localVarPath = `/v1/sessions`; @@ -67,6 +68,10 @@ export const SessionsApiAxiosParamCreator = function (configuration?: Configurat // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) + if (xBehalfOfProject != null) { + localVarHeaderParameter['X-Behalf-Of-Project'] = String(xBehalfOfProject); + } + localVarHeaderParameter['Content-Type'] = 'application/json'; @@ -189,10 +194,11 @@ export const SessionsApiAxiosParamCreator = function (configuration?: Configurat * * @summary Revoke the session session key. * @param {RevokeSessionRequest} revokeSessionRequest + * @param {string} [xBehalfOfProject] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - revokeSession: async (revokeSessionRequest: RevokeSessionRequest, options: AxiosRequestConfig = {}): Promise => { + revokeSession: async (revokeSessionRequest: RevokeSessionRequest, xBehalfOfProject?: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'revokeSessionRequest' is not null or undefined assertParamExists('revokeSession', 'revokeSessionRequest', revokeSessionRequest) const localVarPath = `/v1/sessions/revoke`; @@ -211,6 +217,10 @@ export const SessionsApiAxiosParamCreator = function (configuration?: Configurat // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) + if (xBehalfOfProject != null) { + localVarHeaderParameter['X-Behalf-Of-Project'] = String(xBehalfOfProject); + } + localVarHeaderParameter['Content-Type'] = 'application/json'; @@ -287,11 +297,12 @@ export const SessionsApiFp = function(configuration?: Configuration) { * Creates a Session. * @summary Create a session key. * @param {CreateSessionRequest} createSessionRequest + * @param {string} [xBehalfOfProject] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async createSession(createSessionRequest: CreateSessionRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.createSession(createSessionRequest, options); + async createSession(createSessionRequest: CreateSessionRequest, xBehalfOfProject?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createSession(createSessionRequest, xBehalfOfProject, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** @@ -325,11 +336,12 @@ export const SessionsApiFp = function(configuration?: Configuration) { * * @summary Revoke the session session key. * @param {RevokeSessionRequest} revokeSessionRequest + * @param {string} [xBehalfOfProject] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async revokeSession(revokeSessionRequest: RevokeSessionRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.revokeSession(revokeSessionRequest, options); + async revokeSession(revokeSessionRequest: RevokeSessionRequest, xBehalfOfProject?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.revokeSession(revokeSessionRequest, xBehalfOfProject, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** @@ -362,7 +374,7 @@ export const SessionsApiFactory = function (configuration?: Configuration, baseP * @throws {RequiredError} */ createSession(requestParameters: SessionsApiCreateSessionRequest, options?: AxiosRequestConfig): AxiosPromise { - return localVarFp.createSession(requestParameters.createSessionRequest, options).then((request) => request(axios, basePath)); + return localVarFp.createSession(requestParameters.createSessionRequest, requestParameters.xBehalfOfProject, options).then((request) => request(axios, basePath)); }, /** * Returns a list of Sessions. Returns the latest 10 transaction intents for each session. @@ -392,7 +404,7 @@ export const SessionsApiFactory = function (configuration?: Configuration, baseP * @throws {RequiredError} */ revokeSession(requestParameters: SessionsApiRevokeSessionRequest, options?: AxiosRequestConfig): AxiosPromise { - return localVarFp.revokeSession(requestParameters.revokeSessionRequest, options).then((request) => request(axios, basePath)); + return localVarFp.revokeSession(requestParameters.revokeSessionRequest, requestParameters.xBehalfOfProject, options).then((request) => request(axios, basePath)); }, /** * @@ -419,6 +431,13 @@ export interface SessionsApiCreateSessionRequest { * @memberof SessionsApiCreateSession */ readonly createSessionRequest: CreateSessionRequest + + /** + * + * @type {string} + * @memberof SessionsApiCreateSession + */ + readonly xBehalfOfProject?: string } /** @@ -496,6 +515,13 @@ export interface SessionsApiRevokeSessionRequest { * @memberof SessionsApiRevokeSession */ readonly revokeSessionRequest: RevokeSessionRequest + + /** + * + * @type {string} + * @memberof SessionsApiRevokeSession + */ + readonly xBehalfOfProject?: string } /** @@ -535,7 +561,7 @@ export class SessionsApi extends BaseAPI { * @memberof SessionsApi */ public createSession(requestParameters: SessionsApiCreateSessionRequest, options?: AxiosRequestConfig) { - return SessionsApiFp(this.configuration).createSession(requestParameters.createSessionRequest, options).then((request) => request(this.axios, this.basePath)); + return SessionsApiFp(this.configuration).createSession(requestParameters.createSessionRequest, requestParameters.xBehalfOfProject, options).then((request) => request(this.axios, this.basePath)); } /** @@ -571,7 +597,7 @@ export class SessionsApi extends BaseAPI { * @memberof SessionsApi */ public revokeSession(requestParameters: SessionsApiRevokeSessionRequest, options?: AxiosRequestConfig) { - return SessionsApiFp(this.configuration).revokeSession(requestParameters.revokeSessionRequest, options).then((request) => request(this.axios, this.basePath)); + return SessionsApiFp(this.configuration).revokeSession(requestParameters.revokeSessionRequest, requestParameters.xBehalfOfProject, options).then((request) => request(this.axios, this.basePath)); } /** diff --git a/packages/internal/openapi-clients/src/backend/domain/web3-connections-api.ts b/packages/internal/openapi-clients/src/backend/domain/web3-connections-api.ts deleted file mode 100644 index f3a0a931..00000000 --- a/packages/internal/openapi-clients/src/backend/domain/web3-connections-api.ts +++ /dev/null @@ -1,595 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Openfort API - * Complete Openfort API references and guides can be found at: https://openfort.xyz/docs - * - * The version of the OpenAPI document: 1.0.0 - * Contact: founders@openfort.xyz - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import type { Configuration } from '../configuration'; -import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; -import globalAxios from 'axios'; -// Some imports not used depending on template conditions -// @ts-ignore -import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common'; -// @ts-ignore -import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base'; -// @ts-ignore -import { CreateWeb3ConnectionRequest } from '../models'; -// @ts-ignore -import { SortOrder } from '../models'; -// @ts-ignore -import { SubmitWeb3ActionRequest } from '../models'; -// @ts-ignore -import { Web3ActionListResponse } from '../models'; -// @ts-ignore -import { Web3ActionResponse } from '../models'; -// @ts-ignore -import { Web3ConnectionListResponse } from '../models'; -// @ts-ignore -import { Web3ConnectionResponse } from '../models'; -// @ts-ignore -import { Web3ConnectionResponseExpandable } from '../models'; -/** - * Web3ConnectionsApi - axios parameter creator - * @export - */ -export const Web3ConnectionsApiAxiosParamCreator = function (configuration?: Configuration) { - return { - /** - * This endpoint allows you to create a new web3 connection to your Openfort player. Together with the player ID (pla_), you need to provide a chain ID. The chain to use is required because Openfort needs to make sure the account is deployed, as counterfactual addresses cannot use web3 connections. The `uri` body parameter must contain a [WalletConnect pairing URI](https://specs.walletconnect.com/2.0/specs/clients/core/pairing/pairing-uri). - * @summary Create a Web3 Connection object. - * @param {CreateWeb3ConnectionRequest} createWeb3ConnectionRequest - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - createWeb3Connection: async (createWeb3ConnectionRequest: CreateWeb3ConnectionRequest, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'createWeb3ConnectionRequest' is not null or undefined - assertParamExists('createWeb3Connection', 'createWeb3ConnectionRequest', createWeb3ConnectionRequest) - const localVarPath = `/v1/web3_connections`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication sk required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration) - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(createWeb3ConnectionRequest, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Returns a list of web3 actions for the given web3 connection. The actions are returned sorted by creation date, with the most recently received action appearing first. By default, a maximum of ten actions are shown per page. - * @summary List Web3 actions from a web3 connection. - * @param {string} id Specifies the web3Connection ID (starts with web3_). - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getWeb3Actions: async (id: string, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'id' is not null or undefined - assertParamExists('getWeb3Actions', 'id', id) - const localVarPath = `/v1/web3_connections/{id}/actions` - .replace(`{${"id"}}`, encodeURIComponent(String(id))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication sk required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration) - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Retrieves the details of an existing web3 connection. Supply the unique web3 connection ID from either a web3 connection creation request or the web3 connection list. Openfort will return the corresponding web3 connection information. - * @summary Get a web3Connection object. - * @param {string} id Specifies the unique web3Connection ID (starts with web3_). - * @param {Array} [expand] Specifies the fields to expand. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getWeb3Connection: async (id: string, expand?: Array, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'id' is not null or undefined - assertParamExists('getWeb3Connection', 'id', id) - const localVarPath = `/v1/web3_connections/{id}` - .replace(`{${"id"}}`, encodeURIComponent(String(id))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication sk required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration) - - if (expand) { - localVarQueryParameter['expand'] = expand; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Returns a list of web3 connections for the given player. The connections are returned sorted by creation date, with the most recently created connections appearing first. By default, a maximum of ten connections are shown per page. - * @summary List Web3 connections. - * @param {number} [limit] Specifies the maximum number of records to return. - * @param {number} [skip] Specifies the offset for the first records to return. - * @param {SortOrder} [order] Specifies the order in which to sort the results. - * @param {string} [player] Specifies the unique player ID (starts with pla_) - * @param {boolean} [disconnected] Specifies connection status - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getWeb3Connections: async (limit?: number, skip?: number, order?: SortOrder, player?: string, disconnected?: boolean, options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/v1/web3_connections`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication sk required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration) - - if (limit !== undefined) { - localVarQueryParameter['limit'] = limit; - } - - if (skip !== undefined) { - localVarQueryParameter['skip'] = skip; - } - - if (order !== undefined) { - localVarQueryParameter['order'] = order; - } - - if (player !== undefined) { - localVarQueryParameter['player'] = player; - } - - if (disconnected !== undefined) { - localVarQueryParameter['disconnected'] = disconnected; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Approve or Reject a web3 action for the given web3 connection. - * @summary Approve or Reject a web3 action - * @param {string} id Specifies the web3Connection ID (starts with web3_). - * @param {string} web3Action Specifies web3_action (starts with act_). - * @param {SubmitWeb3ActionRequest} submitWeb3ActionRequest - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - submitWeb3Action: async (id: string, web3Action: string, submitWeb3ActionRequest: SubmitWeb3ActionRequest, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'id' is not null or undefined - assertParamExists('submitWeb3Action', 'id', id) - // verify required parameter 'web3Action' is not null or undefined - assertParamExists('submitWeb3Action', 'web3Action', web3Action) - // verify required parameter 'submitWeb3ActionRequest' is not null or undefined - assertParamExists('submitWeb3Action', 'submitWeb3ActionRequest', submitWeb3ActionRequest) - const localVarPath = `/v1/web3_connections/{id}/actions/{web3_action}` - .replace(`{${"id"}}`, encodeURIComponent(String(id))) - .replace(`{${"web3_action"}}`, encodeURIComponent(String(web3Action))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication sk required - // http bearer authentication required - await setBearerAuthToObject(localVarHeaderParameter, configuration) - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(submitWeb3ActionRequest, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - } -}; - -/** - * Web3ConnectionsApi - functional programming interface - * @export - */ -export const Web3ConnectionsApiFp = function(configuration?: Configuration) { - const localVarAxiosParamCreator = Web3ConnectionsApiAxiosParamCreator(configuration) - return { - /** - * This endpoint allows you to create a new web3 connection to your Openfort player. Together with the player ID (pla_), you need to provide a chain ID. The chain to use is required because Openfort needs to make sure the account is deployed, as counterfactual addresses cannot use web3 connections. The `uri` body parameter must contain a [WalletConnect pairing URI](https://specs.walletconnect.com/2.0/specs/clients/core/pairing/pairing-uri). - * @summary Create a Web3 Connection object. - * @param {CreateWeb3ConnectionRequest} createWeb3ConnectionRequest - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async createWeb3Connection(createWeb3ConnectionRequest: CreateWeb3ConnectionRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.createWeb3Connection(createWeb3ConnectionRequest, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * Returns a list of web3 actions for the given web3 connection. The actions are returned sorted by creation date, with the most recently received action appearing first. By default, a maximum of ten actions are shown per page. - * @summary List Web3 actions from a web3 connection. - * @param {string} id Specifies the web3Connection ID (starts with web3_). - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getWeb3Actions(id: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getWeb3Actions(id, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * Retrieves the details of an existing web3 connection. Supply the unique web3 connection ID from either a web3 connection creation request or the web3 connection list. Openfort will return the corresponding web3 connection information. - * @summary Get a web3Connection object. - * @param {string} id Specifies the unique web3Connection ID (starts with web3_). - * @param {Array} [expand] Specifies the fields to expand. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getWeb3Connection(id: string, expand?: Array, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getWeb3Connection(id, expand, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * Returns a list of web3 connections for the given player. The connections are returned sorted by creation date, with the most recently created connections appearing first. By default, a maximum of ten connections are shown per page. - * @summary List Web3 connections. - * @param {number} [limit] Specifies the maximum number of records to return. - * @param {number} [skip] Specifies the offset for the first records to return. - * @param {SortOrder} [order] Specifies the order in which to sort the results. - * @param {string} [player] Specifies the unique player ID (starts with pla_) - * @param {boolean} [disconnected] Specifies connection status - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getWeb3Connections(limit?: number, skip?: number, order?: SortOrder, player?: string, disconnected?: boolean, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getWeb3Connections(limit, skip, order, player, disconnected, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * Approve or Reject a web3 action for the given web3 connection. - * @summary Approve or Reject a web3 action - * @param {string} id Specifies the web3Connection ID (starts with web3_). - * @param {string} web3Action Specifies web3_action (starts with act_). - * @param {SubmitWeb3ActionRequest} submitWeb3ActionRequest - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async submitWeb3Action(id: string, web3Action: string, submitWeb3ActionRequest: SubmitWeb3ActionRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.submitWeb3Action(id, web3Action, submitWeb3ActionRequest, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - } -}; - -/** - * Web3ConnectionsApi - factory interface - * @export - */ -export const Web3ConnectionsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { - const localVarFp = Web3ConnectionsApiFp(configuration) - return { - /** - * This endpoint allows you to create a new web3 connection to your Openfort player. Together with the player ID (pla_), you need to provide a chain ID. The chain to use is required because Openfort needs to make sure the account is deployed, as counterfactual addresses cannot use web3 connections. The `uri` body parameter must contain a [WalletConnect pairing URI](https://specs.walletconnect.com/2.0/specs/clients/core/pairing/pairing-uri). - * @summary Create a Web3 Connection object. - * @param {Web3ConnectionsApiCreateWeb3ConnectionRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - createWeb3Connection(requestParameters: Web3ConnectionsApiCreateWeb3ConnectionRequest, options?: AxiosRequestConfig): AxiosPromise { - return localVarFp.createWeb3Connection(requestParameters.createWeb3ConnectionRequest, options).then((request) => request(axios, basePath)); - }, - /** - * Returns a list of web3 actions for the given web3 connection. The actions are returned sorted by creation date, with the most recently received action appearing first. By default, a maximum of ten actions are shown per page. - * @summary List Web3 actions from a web3 connection. - * @param {Web3ConnectionsApiGetWeb3ActionsRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getWeb3Actions(requestParameters: Web3ConnectionsApiGetWeb3ActionsRequest, options?: AxiosRequestConfig): AxiosPromise { - return localVarFp.getWeb3Actions(requestParameters.id, options).then((request) => request(axios, basePath)); - }, - /** - * Retrieves the details of an existing web3 connection. Supply the unique web3 connection ID from either a web3 connection creation request or the web3 connection list. Openfort will return the corresponding web3 connection information. - * @summary Get a web3Connection object. - * @param {Web3ConnectionsApiGetWeb3ConnectionRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getWeb3Connection(requestParameters: Web3ConnectionsApiGetWeb3ConnectionRequest, options?: AxiosRequestConfig): AxiosPromise { - return localVarFp.getWeb3Connection(requestParameters.id, requestParameters.expand, options).then((request) => request(axios, basePath)); - }, - /** - * Returns a list of web3 connections for the given player. The connections are returned sorted by creation date, with the most recently created connections appearing first. By default, a maximum of ten connections are shown per page. - * @summary List Web3 connections. - * @param {Web3ConnectionsApiGetWeb3ConnectionsRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getWeb3Connections(requestParameters: Web3ConnectionsApiGetWeb3ConnectionsRequest = {}, options?: AxiosRequestConfig): AxiosPromise { - return localVarFp.getWeb3Connections(requestParameters.limit, requestParameters.skip, requestParameters.order, requestParameters.player, requestParameters.disconnected, options).then((request) => request(axios, basePath)); - }, - /** - * Approve or Reject a web3 action for the given web3 connection. - * @summary Approve or Reject a web3 action - * @param {Web3ConnectionsApiSubmitWeb3ActionRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - submitWeb3Action(requestParameters: Web3ConnectionsApiSubmitWeb3ActionRequest, options?: AxiosRequestConfig): AxiosPromise { - return localVarFp.submitWeb3Action(requestParameters.id, requestParameters.web3Action, requestParameters.submitWeb3ActionRequest, options).then((request) => request(axios, basePath)); - }, - }; -}; - -/** - * Request parameters for createWeb3Connection operation in Web3ConnectionsApi. - * @export - * @interface Web3ConnectionsApiCreateWeb3ConnectionRequest - */ -export interface Web3ConnectionsApiCreateWeb3ConnectionRequest { - /** - * - * @type {CreateWeb3ConnectionRequest} - * @memberof Web3ConnectionsApiCreateWeb3Connection - */ - readonly createWeb3ConnectionRequest: CreateWeb3ConnectionRequest -} - -/** - * Request parameters for getWeb3Actions operation in Web3ConnectionsApi. - * @export - * @interface Web3ConnectionsApiGetWeb3ActionsRequest - */ -export interface Web3ConnectionsApiGetWeb3ActionsRequest { - /** - * Specifies the web3Connection ID (starts with web3_). - * @type {string} - * @memberof Web3ConnectionsApiGetWeb3Actions - */ - readonly id: string -} - -/** - * Request parameters for getWeb3Connection operation in Web3ConnectionsApi. - * @export - * @interface Web3ConnectionsApiGetWeb3ConnectionRequest - */ -export interface Web3ConnectionsApiGetWeb3ConnectionRequest { - /** - * Specifies the unique web3Connection ID (starts with web3_). - * @type {string} - * @memberof Web3ConnectionsApiGetWeb3Connection - */ - readonly id: string - - /** - * Specifies the fields to expand. - * @type {Array} - * @memberof Web3ConnectionsApiGetWeb3Connection - */ - readonly expand?: Array -} - -/** - * Request parameters for getWeb3Connections operation in Web3ConnectionsApi. - * @export - * @interface Web3ConnectionsApiGetWeb3ConnectionsRequest - */ -export interface Web3ConnectionsApiGetWeb3ConnectionsRequest { - /** - * Specifies the maximum number of records to return. - * @type {number} - * @memberof Web3ConnectionsApiGetWeb3Connections - */ - readonly limit?: number - - /** - * Specifies the offset for the first records to return. - * @type {number} - * @memberof Web3ConnectionsApiGetWeb3Connections - */ - readonly skip?: number - - /** - * Specifies the order in which to sort the results. - * @type {SortOrder} - * @memberof Web3ConnectionsApiGetWeb3Connections - */ - readonly order?: SortOrder - - /** - * Specifies the unique player ID (starts with pla_) - * @type {string} - * @memberof Web3ConnectionsApiGetWeb3Connections - */ - readonly player?: string - - /** - * Specifies connection status - * @type {boolean} - * @memberof Web3ConnectionsApiGetWeb3Connections - */ - readonly disconnected?: boolean -} - -/** - * Request parameters for submitWeb3Action operation in Web3ConnectionsApi. - * @export - * @interface Web3ConnectionsApiSubmitWeb3ActionRequest - */ -export interface Web3ConnectionsApiSubmitWeb3ActionRequest { - /** - * Specifies the web3Connection ID (starts with web3_). - * @type {string} - * @memberof Web3ConnectionsApiSubmitWeb3Action - */ - readonly id: string - - /** - * Specifies web3_action (starts with act_). - * @type {string} - * @memberof Web3ConnectionsApiSubmitWeb3Action - */ - readonly web3Action: string - - /** - * - * @type {SubmitWeb3ActionRequest} - * @memberof Web3ConnectionsApiSubmitWeb3Action - */ - readonly submitWeb3ActionRequest: SubmitWeb3ActionRequest -} - -/** - * Web3ConnectionsApi - object-oriented interface - * @export - * @class Web3ConnectionsApi - * @extends {BaseAPI} - */ -export class Web3ConnectionsApi extends BaseAPI { - /** - * This endpoint allows you to create a new web3 connection to your Openfort player. Together with the player ID (pla_), you need to provide a chain ID. The chain to use is required because Openfort needs to make sure the account is deployed, as counterfactual addresses cannot use web3 connections. The `uri` body parameter must contain a [WalletConnect pairing URI](https://specs.walletconnect.com/2.0/specs/clients/core/pairing/pairing-uri). - * @summary Create a Web3 Connection object. - * @param {Web3ConnectionsApiCreateWeb3ConnectionRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof Web3ConnectionsApi - */ - public createWeb3Connection(requestParameters: Web3ConnectionsApiCreateWeb3ConnectionRequest, options?: AxiosRequestConfig) { - return Web3ConnectionsApiFp(this.configuration).createWeb3Connection(requestParameters.createWeb3ConnectionRequest, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Returns a list of web3 actions for the given web3 connection. The actions are returned sorted by creation date, with the most recently received action appearing first. By default, a maximum of ten actions are shown per page. - * @summary List Web3 actions from a web3 connection. - * @param {Web3ConnectionsApiGetWeb3ActionsRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof Web3ConnectionsApi - */ - public getWeb3Actions(requestParameters: Web3ConnectionsApiGetWeb3ActionsRequest, options?: AxiosRequestConfig) { - return Web3ConnectionsApiFp(this.configuration).getWeb3Actions(requestParameters.id, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Retrieves the details of an existing web3 connection. Supply the unique web3 connection ID from either a web3 connection creation request or the web3 connection list. Openfort will return the corresponding web3 connection information. - * @summary Get a web3Connection object. - * @param {Web3ConnectionsApiGetWeb3ConnectionRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof Web3ConnectionsApi - */ - public getWeb3Connection(requestParameters: Web3ConnectionsApiGetWeb3ConnectionRequest, options?: AxiosRequestConfig) { - return Web3ConnectionsApiFp(this.configuration).getWeb3Connection(requestParameters.id, requestParameters.expand, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Returns a list of web3 connections for the given player. The connections are returned sorted by creation date, with the most recently created connections appearing first. By default, a maximum of ten connections are shown per page. - * @summary List Web3 connections. - * @param {Web3ConnectionsApiGetWeb3ConnectionsRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof Web3ConnectionsApi - */ - public getWeb3Connections(requestParameters: Web3ConnectionsApiGetWeb3ConnectionsRequest = {}, options?: AxiosRequestConfig) { - return Web3ConnectionsApiFp(this.configuration).getWeb3Connections(requestParameters.limit, requestParameters.skip, requestParameters.order, requestParameters.player, requestParameters.disconnected, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Approve or Reject a web3 action for the given web3 connection. - * @summary Approve or Reject a web3 action - * @param {Web3ConnectionsApiSubmitWeb3ActionRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof Web3ConnectionsApi - */ - public submitWeb3Action(requestParameters: Web3ConnectionsApiSubmitWeb3ActionRequest, options?: AxiosRequestConfig) { - return Web3ConnectionsApiFp(this.configuration).submitWeb3Action(requestParameters.id, requestParameters.web3Action, requestParameters.submitWeb3ActionRequest, options).then((request) => request(this.axios, this.basePath)); - } -} - diff --git a/packages/internal/openapi-clients/src/backend/models/account-abstraction-v6-details.ts b/packages/internal/openapi-clients/src/backend/models/account-abstraction-v6-details.ts new file mode 100644 index 00000000..7401ef5a --- /dev/null +++ b/packages/internal/openapi-clients/src/backend/models/account-abstraction-v6-details.ts @@ -0,0 +1,39 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Openfort API + * Complete Openfort API references and guides can be found at: https://openfort.xyz/docs + * + * The version of the OpenAPI document: 1.0.0 + * Contact: founders@openfort.xyz + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { UserOperationV6 } from './user-operation-v6'; + +/** + * + * @export + * @interface AccountAbstractionV6Details + */ +export interface AccountAbstractionV6Details { + /** + * + * @type {UserOperationV6} + * @memberof AccountAbstractionV6Details + */ + 'userOperation': UserOperationV6; + /** + * A User Operation hash. + * @type {string} + * @memberof AccountAbstractionV6Details + */ + 'userOperationHash': string; +} + diff --git a/packages/internal/openapi-clients/src/backend/models/create-account-request.ts b/packages/internal/openapi-clients/src/backend/models/create-account-request.ts index d41ffed3..f8767f28 100644 --- a/packages/internal/openapi-clients/src/backend/models/create-account-request.ts +++ b/packages/internal/openapi-clients/src/backend/models/create-account-request.ts @@ -33,7 +33,7 @@ export interface CreateAccountRequest { */ 'externalOwnerAddress'?: string; /** - * The type of smart account that will be created (e.g. ERC6551V1, ManagedV5, UpgradeableV5). Defaults to UpgradeableV5. + * The type of smart account that will be created (e.g. ERC6551V1, ManagedV5, UpgradeableV5, ZKSyncUpgradeableV1). Defaults to UpgradeableV5. * @type {string} * @memberof CreateAccountRequest */ diff --git a/packages/internal/openapi-clients/src/backend/models/create-paymaster-request.ts b/packages/internal/openapi-clients/src/backend/models/create-paymaster-request.ts index 008351c3..4efb71b0 100644 --- a/packages/internal/openapi-clients/src/backend/models/create-paymaster-request.ts +++ b/packages/internal/openapi-clients/src/backend/models/create-paymaster-request.ts @@ -31,7 +31,7 @@ export interface CreatePaymasterRequest { * @type {string} * @memberof CreatePaymasterRequest */ - 'url': string; + 'url'?: string; /** * Specifies the context, that is, the arbitrary repositories that the specific paymaster may require * @type {object} diff --git a/packages/internal/openapi-clients/src/backend/models/create-web3-connection-request.ts b/packages/internal/openapi-clients/src/backend/models/embedded-response.ts similarity index 55% rename from packages/internal/openapi-clients/src/backend/models/create-web3-connection-request.ts rename to packages/internal/openapi-clients/src/backend/models/embedded-response.ts index a06fb930..36d17719 100644 --- a/packages/internal/openapi-clients/src/backend/models/create-web3-connection-request.ts +++ b/packages/internal/openapi-clients/src/backend/models/embedded-response.ts @@ -17,26 +17,38 @@ /** * * @export - * @interface CreateWeb3ConnectionRequest + * @interface EmbeddedResponse */ -export interface CreateWeb3ConnectionRequest { +export interface EmbeddedResponse { /** - * ID of the Player this Web3Connection belongs to (starts with `pla_`). + * * @type {string} - * @memberof CreateWeb3ConnectionRequest + * @memberof EmbeddedResponse */ - 'player': string; + 'share': string; /** - * The chain ID. Must be a [supported chain](/chains). + * + * @type {string} + * @memberof EmbeddedResponse + */ + 'accountType': string; + /** + * + * @type {string} + * @memberof EmbeddedResponse + */ + 'address': string; + /** + * * @type {number} - * @memberof CreateWeb3ConnectionRequest + * @memberof EmbeddedResponse */ 'chainId': number; /** - * Specifies the URI of WalletConnect. + * * @type {string} - * @memberof CreateWeb3ConnectionRequest + * @memberof EmbeddedResponse */ - 'uri': string; + 'deviceId'?: string; } diff --git a/packages/internal/openapi-clients/src/backend/models/estimate-transaction-intent-gas-result.ts b/packages/internal/openapi-clients/src/backend/models/estimate-transaction-intent-gas-result.ts index df6c2a4e..d1e0c9e0 100644 --- a/packages/internal/openapi-clients/src/backend/models/estimate-transaction-intent-gas-result.ts +++ b/packages/internal/openapi-clients/src/backend/models/estimate-transaction-intent-gas-result.ts @@ -21,39 +21,45 @@ */ export interface EstimateTransactionIntentGasResult { /** - * the preVerification gas used by this UserOperation. + * * @type {string} * @memberof EstimateTransactionIntentGasResult + * @deprecated */ - 'preVerificationGas': string; + 'preVerificationGas'?: string; /** - * gas used for validation of this UserOperation, including account creation + * * @type {string} * @memberof EstimateTransactionIntentGasResult + * @deprecated */ - 'verificationGas': string; + 'verificationGas'?: string; /** - * the deadline after which this UserOperation is invalid (not a gas estimation parameter, but returned by validation + * * @type {string} * @memberof EstimateTransactionIntentGasResult + * @deprecated */ 'validUntil'?: string; /** - * the deadline after which this UserOperation is valid (not a gas estimation parameter, but returned by validation + * * @type {string} * @memberof EstimateTransactionIntentGasResult + * @deprecated */ 'validAfter'?: string; /** - * estimated cost of calling the account with the given callData + * * @type {string} * @memberof EstimateTransactionIntentGasResult + * @deprecated */ - 'callGasLimit': string; + 'callGasLimit'?: string; /** - * returned by some bundlers (e.g. Biconomy\'s) + * * @type {string} * @memberof EstimateTransactionIntentGasResult + * @deprecated */ 'verificationGasLimit'?: string; /** diff --git a/packages/internal/openapi-clients/src/backend/models/entity-type-web3-action.ts b/packages/internal/openapi-clients/src/backend/models/exported-embedded-request.ts similarity index 68% rename from packages/internal/openapi-clients/src/backend/models/entity-type-web3-action.ts rename to packages/internal/openapi-clients/src/backend/models/exported-embedded-request.ts index 7c915ec6..deb8691f 100644 --- a/packages/internal/openapi-clients/src/backend/models/entity-type-web3-action.ts +++ b/packages/internal/openapi-clients/src/backend/models/exported-embedded-request.ts @@ -17,14 +17,14 @@ /** * * @export - * @enum {string} + * @interface ExportedEmbeddedRequest */ - -export const EntityTypeWEB3ACTION = { - Web3Action: 'web3Action' -} as const; - -export type EntityTypeWEB3ACTION = typeof EntityTypeWEB3ACTION[keyof typeof EntityTypeWEB3ACTION]; - - +export interface ExportedEmbeddedRequest { + /** + * + * @type {string} + * @memberof ExportedEmbeddedRequest + */ + 'address': string; +} diff --git a/packages/internal/openapi-clients/src/backend/models/index.ts b/packages/internal/openapi-clients/src/backend/models/index.ts index 37de9981..dc429209 100644 --- a/packages/internal/openapi-clients/src/backend/models/index.ts +++ b/packages/internal/openapi-clients/src/backend/models/index.ts @@ -8,6 +8,7 @@ export * from './abi'; export * from './abi-type'; export * from './accelbyte-oauth-config'; export * from './account'; +export * from './account-abstraction-v6-details'; export * from './account-event-response'; export * from './account-inventory-list-queries'; export * from './account-list-queries'; @@ -80,7 +81,6 @@ export * from './create-session-request'; export * from './create-subscription-request'; export * from './create-transaction-intent-request'; export * from './create-trigger-request'; -export * from './create-web3-connection-request'; export * from './currency'; export * from './custom-auth-config'; export * from './delete-smtpconfig-response'; @@ -97,12 +97,12 @@ export * from './developer-account-response-expandable'; export * from './device-list-queries'; export * from './device-response'; export * from './discord-oauth-config'; -export * from './domain-data'; export * from './ecosystem-configuration-response'; export * from './email-sample-delete-response'; export * from './email-sample-response'; export * from './email-type-request'; export * from './email-type-response'; +export * from './embedded-response'; export * from './entity-id-response'; export * from './entity-type-account'; export * from './entity-type-contract'; @@ -125,8 +125,6 @@ export * from './entity-type-subscription'; export * from './entity-type-transactionintent'; export * from './entity-type-trigger'; export * from './entity-type-user'; -export * from './entity-type-web3-action'; -export * from './entity-type-web3-connection'; export * from './epic-games-oauth-config'; export * from './error-type-invalidrequesterror'; export * from './estimate-transaction-intent-gas-result'; @@ -134,6 +132,7 @@ export * from './event-delete-response'; export * from './event-list-queries'; export * from './event-list-response'; export * from './event-response'; +export * from './exported-embedded-request'; export * from './facebook-oauth-config'; export * from './fee'; export * from './field-errors-value'; @@ -145,6 +144,7 @@ export * from './gas-report'; export * from './gas-report-list-response'; export * from './gas-report-transaction-intents-inner'; export * from './google-oauth-config'; +export * from './init-embedded-request'; export * from './interaction'; export * from './invalid-request-error'; export * from './invalid-request-error-response'; @@ -233,6 +233,7 @@ export * from './project-stats-request'; export * from './project-stats-response'; export * from './quote-exchange-result'; export * from './refresh-token-request'; +export * from './register-embedded-request'; export * from './request-reset-password-request'; export * from './request-verify-email-request'; export * from './reset-password-request'; @@ -256,10 +257,10 @@ export * from './sponsor-schema'; export * from './sponsor-schema-chargecustomtokens'; export * from './sponsor-schema-fixedrate'; export * from './sponsor-schema-payforuser'; +export * from './standard-details'; export * from './start-recovery-request'; export * from './stat'; export * from './status'; -export * from './submit-web3-action-request'; export * from './subscription-delete-response'; export * from './subscription-list-response'; export * from './subscription-response'; @@ -278,8 +279,10 @@ export * from './time-interval-type'; export * from './token'; export * from './token-type'; export * from './trade-type'; +export * from './transaction-abstraction-type'; export * from './transaction-confirmed-event-response'; export * from './transaction-intent'; +export * from './transaction-intent-details'; export * from './transaction-intent-list-queries'; export * from './transaction-intent-list-response'; export * from './transaction-intent-response'; @@ -293,6 +296,7 @@ export * from './trigger-delete-response'; export * from './trigger-response'; export * from './twitter-oauth-config'; export * from './typed-data-field'; +export * from './typed-domain-data'; export * from './unlink-email-request'; export * from './unlink-oauth-request'; export * from './update-contract-request'; @@ -302,6 +306,7 @@ export * from './update-policy-rule-request'; export * from './update-project-api-key-request'; export * from './update-project-request'; export * from './upsert-smtpconfig-request'; +export * from './user-operation-v6'; export * from './user-project-create-request'; export * from './user-project-create-request-role'; export * from './user-project-delete-response'; @@ -312,13 +317,6 @@ export * from './user-project-role-admin'; export * from './user-project-role-member'; export * from './user-project-update-request'; export * from './verify-email-request'; -export * from './web3-action-list-response'; -export * from './web3-action-response'; -export * from './web3-action-status-enum'; -export * from './web3-connection-list-queries'; -export * from './web3-connection-list-response'; -export * from './web3-connection-response'; -export * from './web3-connection-response-expandable'; -export * from './web3-connection-response-player'; export * from './webhook-response'; export * from './withdrawal-policy-request'; +export * from './zksync-details'; diff --git a/packages/internal/openapi-clients/src/backend/models/entity-type-web3-connection.ts b/packages/internal/openapi-clients/src/backend/models/init-embedded-request.ts similarity index 65% rename from packages/internal/openapi-clients/src/backend/models/entity-type-web3-connection.ts rename to packages/internal/openapi-clients/src/backend/models/init-embedded-request.ts index e9dfc54c..0d611029 100644 --- a/packages/internal/openapi-clients/src/backend/models/entity-type-web3-connection.ts +++ b/packages/internal/openapi-clients/src/backend/models/init-embedded-request.ts @@ -17,14 +17,14 @@ /** * * @export - * @enum {string} + * @interface InitEmbeddedRequest */ - -export const EntityTypeWEB3CONNECTION = { - Web3Connection: 'web3Connection' -} as const; - -export type EntityTypeWEB3CONNECTION = typeof EntityTypeWEB3CONNECTION[keyof typeof EntityTypeWEB3CONNECTION]; - - +export interface InitEmbeddedRequest { + /** + * + * @type {number} + * @memberof InitEmbeddedRequest + */ + 'chainId': number; +} diff --git a/packages/internal/openapi-clients/src/backend/models/next-action-payload.ts b/packages/internal/openapi-clients/src/backend/models/next-action-payload.ts index fd22d7ba..6490a582 100644 --- a/packages/internal/openapi-clients/src/backend/models/next-action-payload.ts +++ b/packages/internal/openapi-clients/src/backend/models/next-action-payload.ts @@ -46,5 +46,11 @@ export interface NextActionPayload { * @memberof NextActionPayload */ 'userOperationHash'?: string; + /** + * chain-agnostic hash to sign. + * @type {string} + * @memberof NextActionPayload + */ + 'signableHash'?: string; } diff --git a/packages/internal/openapi-clients/src/backend/models/paymaster-response.ts b/packages/internal/openapi-clients/src/backend/models/paymaster-response.ts index c0732381..46622a89 100644 --- a/packages/internal/openapi-clients/src/backend/models/paymaster-response.ts +++ b/packages/internal/openapi-clients/src/backend/models/paymaster-response.ts @@ -52,7 +52,7 @@ export interface PaymasterResponse { * @type {string} * @memberof PaymasterResponse */ - 'url': string; + 'url'?: string; /** * * @type {object} diff --git a/packages/internal/openapi-clients/src/backend/models/player-response-transaction-intents-inner.ts b/packages/internal/openapi-clients/src/backend/models/player-response-transaction-intents-inner.ts index 2056c2d1..3a9257de 100644 --- a/packages/internal/openapi-clients/src/backend/models/player-response-transaction-intents-inner.ts +++ b/packages/internal/openapi-clients/src/backend/models/player-response-transaction-intents-inner.ts @@ -30,7 +30,13 @@ import { NextActionResponse } from './next-action-response'; import { ResponseResponse } from './response-response'; // May contain unused imports in some cases // @ts-ignore +import { TransactionAbstractionType } from './transaction-abstraction-type'; +// May contain unused imports in some cases +// @ts-ignore import { TransactionIntent } from './transaction-intent'; +// May contain unused imports in some cases +// @ts-ignore +import { TransactionIntentDetails } from './transaction-intent-details'; /** * @@ -69,15 +75,29 @@ export interface PlayerResponseTransactionIntentsInner { */ 'chainId': number; /** - * The hashed userOperation. + * + * @type {TransactionAbstractionType} + * @memberof PlayerResponseTransactionIntentsInner + */ + 'abstractionType': TransactionAbstractionType; + /** + * + * @type {TransactionIntentDetails} + * @memberof PlayerResponseTransactionIntentsInner + */ + 'details'?: TransactionIntentDetails; + /** + * * @type {string} * @memberof PlayerResponseTransactionIntentsInner + * @deprecated */ 'userOperationHash'?: string; /** * * @type {any} * @memberof PlayerResponseTransactionIntentsInner + * @deprecated */ 'userOperation'?: any; /** diff --git a/packages/internal/openapi-clients/src/backend/models/prisma-input-json-value.ts b/packages/internal/openapi-clients/src/backend/models/prisma-input-json-value.ts index 90d4d627..9b3ea125 100644 --- a/packages/internal/openapi-clients/src/backend/models/prisma-input-json-value.ts +++ b/packages/internal/openapi-clients/src/backend/models/prisma-input-json-value.ts @@ -15,7 +15,7 @@ /** - * Matches any valid value that can be used as an input for operations like create and update as the value of a JSON field. Unlike `JsonValue`, this type allows read-only arrays and read-only object properties and disallows `null` at the top level. `null` cannot be used as the value of a JSON field because its meaning would be ambiguous. Use `Prisma.JsonNull` to store the JSON null value or `Prisma.DbNull` to clear the JSON value and set the field to the database NULL value instead. + * Matches any valid value that can be used as an input for operations like create and update as the value of a JSON field. Unlike \\`JsonValue\\`, this type allows read-only arrays and read-only object properties and disallows \\`null\\` at the top level. \\`null\\` cannot be used as the value of a JSON field because its meaning would be ambiguous. Use \\`Prisma.JsonNull\\` to store the JSON null value or \\`Prisma.DbNull\\` to clear the JSON value and set the field to the database NULL value instead. * @export * @interface PrismaInputJsonValue */ diff --git a/packages/internal/openapi-clients/src/backend/models/domain-data.ts b/packages/internal/openapi-clients/src/backend/models/register-embedded-request.ts similarity index 66% rename from packages/internal/openapi-clients/src/backend/models/domain-data.ts rename to packages/internal/openapi-clients/src/backend/models/register-embedded-request.ts index 671e96fd..e844e391 100644 --- a/packages/internal/openapi-clients/src/backend/models/domain-data.ts +++ b/packages/internal/openapi-clients/src/backend/models/register-embedded-request.ts @@ -17,32 +17,26 @@ /** * * @export - * @interface DomainData + * @interface RegisterEmbeddedRequest */ -export interface DomainData { +export interface RegisterEmbeddedRequest { /** - * The chain ID. + * * @type {number} - * @memberof DomainData + * @memberof RegisterEmbeddedRequest */ 'chainId': number; /** * * @type {string} - * @memberof DomainData - */ - 'name'?: string; - /** - * - * @type {string} - * @memberof DomainData + * @memberof RegisterEmbeddedRequest */ - 'version'?: string; + 'address': string; /** * * @type {string} - * @memberof DomainData + * @memberof RegisterEmbeddedRequest */ - 'verifyingContract'?: string; + 'share': string; } diff --git a/packages/internal/openapi-clients/src/backend/models/sign-payload-request.ts b/packages/internal/openapi-clients/src/backend/models/sign-payload-request.ts index 77d51958..f39ac865 100644 --- a/packages/internal/openapi-clients/src/backend/models/sign-payload-request.ts +++ b/packages/internal/openapi-clients/src/backend/models/sign-payload-request.ts @@ -15,10 +15,10 @@ // May contain unused imports in some cases // @ts-ignore -import { DomainData } from './domain-data'; +import { TypedDataField } from './typed-data-field'; // May contain unused imports in some cases // @ts-ignore -import { TypedDataField } from './typed-data-field'; +import { TypedDomainData } from './typed-domain-data'; /** * @@ -28,10 +28,10 @@ import { TypedDataField } from './typed-data-field'; export interface SignPayloadRequest { /** * - * @type {DomainData} + * @type {TypedDomainData} * @memberof SignPayloadRequest */ - 'domain': DomainData; + 'domain': TypedDomainData; /** * * @type {{ [key: string]: Array; }} @@ -55,6 +55,6 @@ export interface SignPayloadRequest { * @type {string} * @memberof SignPayloadRequest */ - 'hash': string; + 'hash'?: string; } diff --git a/packages/internal/openapi-clients/src/backend/models/standard-details.ts b/packages/internal/openapi-clients/src/backend/models/standard-details.ts new file mode 100644 index 00000000..5c791e6d --- /dev/null +++ b/packages/internal/openapi-clients/src/backend/models/standard-details.ts @@ -0,0 +1,72 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Openfort API + * Complete Openfort API references and guides can be found at: https://openfort.xyz/docs + * + * The version of the OpenAPI document: 1.0.0 + * Contact: founders@openfort.xyz + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * + * @export + * @interface StandardDetails + */ +export interface StandardDetails { + /** + * The transaction sender. + * @type {string} + * @memberof StandardDetails + */ + 'from': string; + /** + * The transaction recipient or contract address. + * @type {string} + * @memberof StandardDetails + */ + 'to': string; + /** + * A contract hashed method call with encoded args. + * @type {string} + * @memberof StandardDetails + */ + 'data'?: string; + /** + * Unique number identifying this transaction. + * @type {string} + * @memberof StandardDetails + */ + 'nonce': string; + /** + * The gas limit for the transaction. + * @type {string} + * @memberof StandardDetails + */ + 'gas': string; + /** + * Total fee per gas (in wei), inclusive of `maxPriorityFeePerGas`. Only applies to EIP-1559 Transactions. + * @type {string} + * @memberof StandardDetails + */ + 'maxFeePerGas': string; + /** + * Max priority fee per gas (in wei). Only applies to EIP-1559 Transactions. + * @type {string} + * @memberof StandardDetails + */ + 'maxPriorityFeePerGas': string; + /** + * Value in wei sent with this transaction. + * @type {string} + * @memberof StandardDetails + */ + 'value'?: string; +} + diff --git a/packages/internal/openapi-clients/src/backend/models/submit-web3-action-request.ts b/packages/internal/openapi-clients/src/backend/models/submit-web3-action-request.ts deleted file mode 100644 index 6e4c19b7..00000000 --- a/packages/internal/openapi-clients/src/backend/models/submit-web3-action-request.ts +++ /dev/null @@ -1,42 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Openfort API - * Complete Openfort API references and guides can be found at: https://openfort.xyz/docs - * - * The version of the OpenAPI document: 1.0.0 - * Contact: founders@openfort.xyz - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - - -/** - * - * @export - * @interface SubmitWeb3ActionRequest - */ -export interface SubmitWeb3ActionRequest { - /** - * True to approve the action, false to reject it. - * @type {boolean} - * @memberof SubmitWeb3ActionRequest - */ - 'approve': boolean; - /** - * 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. - * @type {string} - * @memberof SubmitWeb3ActionRequest - */ - 'policy'?: string; - /** - * signed repositories by the owner - * @type {string} - * @memberof SubmitWeb3ActionRequest - */ - 'signature'?: string; -} - diff --git a/packages/internal/openapi-clients/src/backend/models/web3-action-status-enum.ts b/packages/internal/openapi-clients/src/backend/models/transaction-abstraction-type.ts similarity index 64% rename from packages/internal/openapi-clients/src/backend/models/web3-action-status-enum.ts rename to packages/internal/openapi-clients/src/backend/models/transaction-abstraction-type.ts index 5b8b77f8..07a44ec0 100644 --- a/packages/internal/openapi-clients/src/backend/models/web3-action-status-enum.ts +++ b/packages/internal/openapi-clients/src/backend/models/transaction-abstraction-type.ts @@ -20,15 +20,13 @@ * @enum {string} */ -export const Web3ActionStatusEnum = { - Pending: 'Pending', - Approved: 'Approved', - Rejected: 'Rejected', - Expired: 'Expired', - Failed: 'Failed' +export const TransactionAbstractionType = { + AccountAbstractionV6: 'accountAbstractionV6', + ZkSync: 'zkSync', + Standard: 'standard' } as const; -export type Web3ActionStatusEnum = typeof Web3ActionStatusEnum[keyof typeof Web3ActionStatusEnum]; +export type TransactionAbstractionType = typeof TransactionAbstractionType[keyof typeof TransactionAbstractionType]; diff --git a/packages/internal/openapi-clients/src/backend/models/transaction-intent-details.ts b/packages/internal/openapi-clients/src/backend/models/transaction-intent-details.ts new file mode 100644 index 00000000..4ac87d70 --- /dev/null +++ b/packages/internal/openapi-clients/src/backend/models/transaction-intent-details.ts @@ -0,0 +1,108 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Openfort API + * Complete Openfort API references and guides can be found at: https://openfort.xyz/docs + * + * The version of the OpenAPI document: 1.0.0 + * Contact: founders@openfort.xyz + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { AccountAbstractionV6Details } from './account-abstraction-v6-details'; +// May contain unused imports in some cases +// @ts-ignore +import { StandardDetails } from './standard-details'; +// May contain unused imports in some cases +// @ts-ignore +import { UserOperationV6 } from './user-operation-v6'; +// May contain unused imports in some cases +// @ts-ignore +import { ZKSyncDetails } from './zksync-details'; + +/** + * Specific transaction details based on its type + * @export + * @interface TransactionIntentDetails + */ +export interface TransactionIntentDetails { + /** + * The transaction sender. + * @type {string} + * @memberof TransactionIntentDetails + */ + 'from': string; + /** + * The transaction recipient or contract address. + * @type {string} + * @memberof TransactionIntentDetails + */ + 'to': string; + /** + * A contract hashed method call with encoded args. + * @type {string} + * @memberof TransactionIntentDetails + */ + 'data'?: string; + /** + * Unique number identifying this transaction. + * @type {string} + * @memberof TransactionIntentDetails + */ + 'nonce': string; + /** + * The gas limit for the transaction. + * @type {string} + * @memberof TransactionIntentDetails + */ + 'gas': string; + /** + * Total fee per gas (in wei), inclusive of `maxPriorityFeePerGas`. Only applies to EIP-1559 Transactions. + * @type {string} + * @memberof TransactionIntentDetails + */ + 'maxFeePerGas': string; + /** + * Max priority fee per gas (in wei). Only applies to EIP-1559 Transactions. + * @type {string} + * @memberof TransactionIntentDetails + */ + 'maxPriorityFeePerGas': string; + /** + * Address of the paymaster account that will pay the fees. + * @type {string} + * @memberof TransactionIntentDetails + */ + 'paymaster'?: string; + /** + * Input data to the paymaster + * @type {string} + * @memberof TransactionIntentDetails + */ + 'paymasterInput'?: string; + /** + * Value in wei sent with this transaction. + * @type {string} + * @memberof TransactionIntentDetails + */ + 'value'?: string; + /** + * + * @type {UserOperationV6} + * @memberof TransactionIntentDetails + */ + 'userOperation': UserOperationV6; + /** + * A User Operation hash. + * @type {string} + * @memberof TransactionIntentDetails + */ + 'userOperationHash': string; +} + diff --git a/packages/internal/openapi-clients/src/backend/models/transaction-intent-response.ts b/packages/internal/openapi-clients/src/backend/models/transaction-intent-response.ts index 1cd30b67..8925f0b9 100644 --- a/packages/internal/openapi-clients/src/backend/models/transaction-intent-response.ts +++ b/packages/internal/openapi-clients/src/backend/models/transaction-intent-response.ts @@ -27,6 +27,12 @@ import { NextActionResponse } from './next-action-response'; import { ResponseResponse } from './response-response'; // May contain unused imports in some cases // @ts-ignore +import { TransactionAbstractionType } from './transaction-abstraction-type'; +// May contain unused imports in some cases +// @ts-ignore +import { TransactionIntentDetails } from './transaction-intent-details'; +// May contain unused imports in some cases +// @ts-ignore import { TransactionIntentResponseAccount } from './transaction-intent-response-account'; // May contain unused imports in some cases // @ts-ignore @@ -72,15 +78,29 @@ export interface TransactionIntentResponse { */ 'chainId': number; /** - * The hashed userOperation. + * + * @type {TransactionAbstractionType} + * @memberof TransactionIntentResponse + */ + 'abstractionType': TransactionAbstractionType; + /** + * + * @type {TransactionIntentDetails} + * @memberof TransactionIntentResponse + */ + 'details'?: TransactionIntentDetails; + /** + * * @type {string} * @memberof TransactionIntentResponse + * @deprecated */ 'userOperationHash'?: string; /** * * @type {any} * @memberof TransactionIntentResponse + * @deprecated */ 'userOperation'?: any; /** diff --git a/packages/internal/openapi-clients/src/backend/models/transaction-intent.ts b/packages/internal/openapi-clients/src/backend/models/transaction-intent.ts index cfc69f4b..ef60ac94 100644 --- a/packages/internal/openapi-clients/src/backend/models/transaction-intent.ts +++ b/packages/internal/openapi-clients/src/backend/models/transaction-intent.ts @@ -28,6 +28,12 @@ import { NextActionResponse } from './next-action-response'; // May contain unused imports in some cases // @ts-ignore import { ResponseResponse } from './response-response'; +// May contain unused imports in some cases +// @ts-ignore +import { TransactionAbstractionType } from './transaction-abstraction-type'; +// May contain unused imports in some cases +// @ts-ignore +import { TransactionIntentDetails } from './transaction-intent-details'; /** * @@ -66,15 +72,29 @@ export interface TransactionIntent { */ 'chainId': number; /** - * The hashed userOperation. + * + * @type {TransactionAbstractionType} + * @memberof TransactionIntent + */ + 'abstractionType': TransactionAbstractionType; + /** + * + * @type {TransactionIntentDetails} + * @memberof TransactionIntent + */ + 'details'?: TransactionIntentDetails; + /** + * * @type {string} * @memberof TransactionIntent + * @deprecated */ 'userOperationHash'?: string; /** * * @type {any} * @memberof TransactionIntent + * @deprecated */ 'userOperation'?: any; /** diff --git a/packages/internal/openapi-clients/src/backend/models/typed-domain-data.ts b/packages/internal/openapi-clients/src/backend/models/typed-domain-data.ts new file mode 100644 index 00000000..1865c133 --- /dev/null +++ b/packages/internal/openapi-clients/src/backend/models/typed-domain-data.ts @@ -0,0 +1,54 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Openfort API + * Complete Openfort API references and guides can be found at: https://openfort.xyz/docs + * + * The version of the OpenAPI document: 1.0.0 + * Contact: founders@openfort.xyz + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * + * @export + * @interface TypedDomainData + */ +export interface TypedDomainData { + /** + * The chain ID. + * @type {number} + * @memberof TypedDomainData + */ + 'chainId': number; + /** + * The user readable name of signing domain, i.e. the name of the DApp or the protocol.. + * @type {string} + * @memberof TypedDomainData + */ + 'name'?: string; + /** + * The current major version of the signing domain. Signatures from different versions are not compatible. + * @type {string} + * @memberof TypedDomainData + */ + 'version'?: string; + /** + * The address of the contract that will verify the signature. The user-agent may do contract specific phishing prevention. + * @type {string} + * @memberof TypedDomainData + */ + 'verifyingContract'?: string; + /** + * An disambiguating salt for the protocol. This can be used as a domain separator of last resort. + * @type {string} + * @memberof TypedDomainData + */ + 'salt'?: string; +} + diff --git a/packages/internal/openapi-clients/src/backend/models/user-operation-v6.ts b/packages/internal/openapi-clients/src/backend/models/user-operation-v6.ts new file mode 100644 index 00000000..235ea523 --- /dev/null +++ b/packages/internal/openapi-clients/src/backend/models/user-operation-v6.ts @@ -0,0 +1,90 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Openfort API + * Complete Openfort API references and guides can be found at: https://openfort.xyz/docs + * + * The version of the OpenAPI document: 1.0.0 + * Contact: founders@openfort.xyz + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * + * @export + * @interface UserOperationV6 + */ +export interface UserOperationV6 { + /** + * The data to pass to the `sender` during the main execution call. + * @type {string} + * @memberof UserOperationV6 + */ + 'callData': string; + /** + * The amount of gas to allocate the main execution call + * @type {string} + * @memberof UserOperationV6 + */ + 'callGasLimit': string; + /** + * Account init code. Only for new accounts. + * @type {string} + * @memberof UserOperationV6 + */ + 'initCode'?: string; + /** + * Maximum fee per gas. + * @type {string} + * @memberof UserOperationV6 + */ + 'maxFeePerGas': string; + /** + * Maximum priority fee per gas. + * @type {string} + * @memberof UserOperationV6 + */ + 'maxPriorityFeePerGas': string; + /** + * Anti-replay parameter. + * @type {string} + * @memberof UserOperationV6 + */ + 'nonce': string; + /** + * Paymaster address with calldata. + * @type {string} + * @memberof UserOperationV6 + */ + 'paymasterAndData'?: string; + /** + * Extra gas to pay the bundler. + * @type {string} + * @memberof UserOperationV6 + */ + 'preVerificationGas': string; + /** + * The account making the operation. + * @type {string} + * @memberof UserOperationV6 + */ + 'sender': string; + /** + * Data passed into the account to verify authorization. + * @type {string} + * @memberof UserOperationV6 + */ + 'signature': string; + /** + * The amount of gas to allocate for the verification step. + * @type {string} + * @memberof UserOperationV6 + */ + 'verificationGasLimit': string; +} + diff --git a/packages/internal/openapi-clients/src/backend/models/web3-action-list-response.ts b/packages/internal/openapi-clients/src/backend/models/web3-action-list-response.ts deleted file mode 100644 index c4357b8b..00000000 --- a/packages/internal/openapi-clients/src/backend/models/web3-action-list-response.ts +++ /dev/null @@ -1,68 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Openfort API - * Complete Openfort API references and guides can be found at: https://openfort.xyz/docs - * - * The version of the OpenAPI document: 1.0.0 - * Contact: founders@openfort.xyz - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -// May contain unused imports in some cases -// @ts-ignore -import { ResponseTypeLIST } from './response-type-list'; -// May contain unused imports in some cases -// @ts-ignore -import { Web3ActionResponse } from './web3-action-response'; - -/** - * - * @export - * @interface Web3ActionListResponse - */ -export interface Web3ActionListResponse { - /** - * - * @type {ResponseTypeLIST} - * @memberof Web3ActionListResponse - */ - 'object': ResponseTypeLIST; - /** - * - * @type {string} - * @memberof Web3ActionListResponse - */ - 'url': string; - /** - * - * @type {Array} - * @memberof Web3ActionListResponse - */ - 'data': Array; - /** - * - * @type {number} - * @memberof Web3ActionListResponse - */ - 'start': number; - /** - * - * @type {number} - * @memberof Web3ActionListResponse - */ - 'end': number; - /** - * - * @type {number} - * @memberof Web3ActionListResponse - */ - 'total': number; -} - - - diff --git a/packages/internal/openapi-clients/src/backend/models/web3-action-response.ts b/packages/internal/openapi-clients/src/backend/models/web3-action-response.ts deleted file mode 100644 index b275cfcc..00000000 --- a/packages/internal/openapi-clients/src/backend/models/web3-action-response.ts +++ /dev/null @@ -1,116 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Openfort API - * Complete Openfort API references and guides can be found at: https://openfort.xyz/docs - * - * The version of the OpenAPI document: 1.0.0 - * Contact: founders@openfort.xyz - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -// May contain unused imports in some cases -// @ts-ignore -import { EntityTypeWEB3ACTION } from './entity-type-web3-action'; -// May contain unused imports in some cases -// @ts-ignore -import { Web3ActionStatusEnum } from './web3-action-status-enum'; - -/** - * - * @export - * @interface Web3ActionResponse - */ -export interface Web3ActionResponse { - /** - * - * @type {string} - * @memberof Web3ActionResponse - */ - 'id': string; - /** - * - * @type {EntityTypeWEB3ACTION} - * @memberof Web3ActionResponse - */ - 'object': EntityTypeWEB3ACTION; - /** - * - * @type {number} - * @memberof Web3ActionResponse - */ - 'createdAt': number; - /** - * The web3_connection ID (starts with web3_). - * @type {string} - * @memberof Web3ActionResponse - */ - 'web3Connection': string; - /** - * - * @type {Web3ActionStatusEnum} - * @memberof Web3ActionResponse - */ - 'status': Web3ActionStatusEnum; - /** - * - * @type {string} - * @memberof Web3ActionResponse - */ - 'chaindId': string; - /** - * - * @type {string} - * @memberof Web3ActionResponse - */ - 'method': string; - /** - * - * @type {string} - * @memberof Web3ActionResponse - */ - 'from': string; - /** - * - * @type {string} - * @memberof Web3ActionResponse - */ - 'to'?: string; - /** - * - * @type {string} - * @memberof Web3ActionResponse - */ - 'data': string; - /** - * - * @type {string} - * @memberof Web3ActionResponse - */ - 'decodedData': string; - /** - * - * @type {string} - * @memberof Web3ActionResponse - */ - 'hashedData': string; - /** - * - * @type {string} - * @memberof Web3ActionResponse - */ - 'value'?: string; - /** - * - * @type {string} - * @memberof Web3ActionResponse - */ - 'gas'?: string; -} - - - diff --git a/packages/internal/openapi-clients/src/backend/models/web3-connection-list-queries.ts b/packages/internal/openapi-clients/src/backend/models/web3-connection-list-queries.ts deleted file mode 100644 index 887e6075..00000000 --- a/packages/internal/openapi-clients/src/backend/models/web3-connection-list-queries.ts +++ /dev/null @@ -1,59 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Openfort API - * Complete Openfort API references and guides can be found at: https://openfort.xyz/docs - * - * The version of the OpenAPI document: 1.0.0 - * Contact: founders@openfort.xyz - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -// May contain unused imports in some cases -// @ts-ignore -import { SortOrder } from './sort-order'; - -/** - * - * @export - * @interface Web3ConnectionListQueries - */ -export interface Web3ConnectionListQueries { - /** - * Specifies the maximum number of records to return. - * @type {number} - * @memberof Web3ConnectionListQueries - */ - 'limit'?: number; - /** - * Specifies the offset for the first records to return. - * @type {number} - * @memberof Web3ConnectionListQueries - */ - 'skip'?: number; - /** - * - * @type {SortOrder} - * @memberof Web3ConnectionListQueries - */ - 'order'?: SortOrder; - /** - * Specifies the unique player ID (starts with pla_) - * @type {string} - * @memberof Web3ConnectionListQueries - */ - 'player'?: string; - /** - * Specifies connection status - * @type {boolean} - * @memberof Web3ConnectionListQueries - */ - 'disconnected'?: boolean; -} - - - diff --git a/packages/internal/openapi-clients/src/backend/models/web3-connection-list-response.ts b/packages/internal/openapi-clients/src/backend/models/web3-connection-list-response.ts deleted file mode 100644 index 544bd400..00000000 --- a/packages/internal/openapi-clients/src/backend/models/web3-connection-list-response.ts +++ /dev/null @@ -1,68 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Openfort API - * Complete Openfort API references and guides can be found at: https://openfort.xyz/docs - * - * The version of the OpenAPI document: 1.0.0 - * Contact: founders@openfort.xyz - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -// May contain unused imports in some cases -// @ts-ignore -import { ResponseTypeLIST } from './response-type-list'; -// May contain unused imports in some cases -// @ts-ignore -import { Web3ConnectionResponse } from './web3-connection-response'; - -/** - * - * @export - * @interface Web3ConnectionListResponse - */ -export interface Web3ConnectionListResponse { - /** - * - * @type {ResponseTypeLIST} - * @memberof Web3ConnectionListResponse - */ - 'object': ResponseTypeLIST; - /** - * - * @type {string} - * @memberof Web3ConnectionListResponse - */ - 'url': string; - /** - * - * @type {Array} - * @memberof Web3ConnectionListResponse - */ - 'data': Array; - /** - * - * @type {number} - * @memberof Web3ConnectionListResponse - */ - 'start': number; - /** - * - * @type {number} - * @memberof Web3ConnectionListResponse - */ - 'end': number; - /** - * - * @type {number} - * @memberof Web3ConnectionListResponse - */ - 'total': number; -} - - - diff --git a/packages/internal/openapi-clients/src/backend/models/web3-connection-response-expandable.ts b/packages/internal/openapi-clients/src/backend/models/web3-connection-response-expandable.ts deleted file mode 100644 index 825aea98..00000000 --- a/packages/internal/openapi-clients/src/backend/models/web3-connection-response-expandable.ts +++ /dev/null @@ -1,30 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Openfort API - * Complete Openfort API references and guides can be found at: https://openfort.xyz/docs - * - * The version of the OpenAPI document: 1.0.0 - * Contact: founders@openfort.xyz - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - - -/** - * - * @export - * @enum {string} - */ - -export const Web3ConnectionResponseExpandable = { - Player: 'player' -} as const; - -export type Web3ConnectionResponseExpandable = typeof Web3ConnectionResponseExpandable[keyof typeof Web3ConnectionResponseExpandable]; - - - diff --git a/packages/internal/openapi-clients/src/backend/models/web3-connection-response-player.ts b/packages/internal/openapi-clients/src/backend/models/web3-connection-response-player.ts deleted file mode 100644 index 7db8d9f0..00000000 --- a/packages/internal/openapi-clients/src/backend/models/web3-connection-response-player.ts +++ /dev/null @@ -1,86 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Openfort API - * Complete Openfort API references and guides can be found at: https://openfort.xyz/docs - * - * The version of the OpenAPI document: 1.0.0 - * Contact: founders@openfort.xyz - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -// May contain unused imports in some cases -// @ts-ignore -import { EntityIdResponse } from './entity-id-response'; -// May contain unused imports in some cases -// @ts-ignore -import { EntityTypePLAYER } from './entity-type-player'; -// May contain unused imports in some cases -// @ts-ignore -import { Player } from './player'; -// May contain unused imports in some cases -// @ts-ignore -import { PlayerMetadataValue } from './player-metadata-value'; - -/** - * The player ID (starts with pla_). - * @export - * @interface Web3ConnectionResponsePlayer - */ -export interface Web3ConnectionResponsePlayer { - /** - * - * @type {string} - * @memberof Web3ConnectionResponsePlayer - */ - 'id': string; - /** - * - * @type {EntityTypePLAYER} - * @memberof Web3ConnectionResponsePlayer - */ - 'object': EntityTypePLAYER; - /** - * - * @type {number} - * @memberof Web3ConnectionResponsePlayer - */ - 'createdAt': number; - /** - * - * @type {string} - * @memberof Web3ConnectionResponsePlayer - */ - 'name': string; - /** - * - * @type {string} - * @memberof Web3ConnectionResponsePlayer - */ - 'description'?: string; - /** - * - * @type {{ [key: string]: PlayerMetadataValue; }} - * @memberof Web3ConnectionResponsePlayer - */ - 'metadata'?: { [key: string]: PlayerMetadataValue; }; - /** - * - * @type {Array} - * @memberof Web3ConnectionResponsePlayer - */ - 'transactionIntents'?: Array; - /** - * - * @type {Array} - * @memberof Web3ConnectionResponsePlayer - */ - 'accounts'?: Array; -} - - - diff --git a/packages/internal/openapi-clients/src/backend/models/web3-connection-response.ts b/packages/internal/openapi-clients/src/backend/models/web3-connection-response.ts deleted file mode 100644 index 4e63696a..00000000 --- a/packages/internal/openapi-clients/src/backend/models/web3-connection-response.ts +++ /dev/null @@ -1,62 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Openfort API - * Complete Openfort API references and guides can be found at: https://openfort.xyz/docs - * - * The version of the OpenAPI document: 1.0.0 - * Contact: founders@openfort.xyz - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -// May contain unused imports in some cases -// @ts-ignore -import { EntityTypeWEB3CONNECTION } from './entity-type-web3-connection'; -// May contain unused imports in some cases -// @ts-ignore -import { Web3ConnectionResponsePlayer } from './web3-connection-response-player'; - -/** - * - * @export - * @interface Web3ConnectionResponse - */ -export interface Web3ConnectionResponse { - /** - * - * @type {string} - * @memberof Web3ConnectionResponse - */ - 'id': string; - /** - * - * @type {EntityTypeWEB3CONNECTION} - * @memberof Web3ConnectionResponse - */ - 'object': EntityTypeWEB3CONNECTION; - /** - * - * @type {number} - * @memberof Web3ConnectionResponse - */ - 'createdAt': number; - /** - * - * @type {boolean} - * @memberof Web3ConnectionResponse - */ - 'disconnected': boolean; - /** - * - * @type {Web3ConnectionResponsePlayer} - * @memberof Web3ConnectionResponse - */ - 'player': Web3ConnectionResponsePlayer; -} - - - diff --git a/packages/internal/openapi-clients/src/backend/models/zksync-details.ts b/packages/internal/openapi-clients/src/backend/models/zksync-details.ts new file mode 100644 index 00000000..48901a8c --- /dev/null +++ b/packages/internal/openapi-clients/src/backend/models/zksync-details.ts @@ -0,0 +1,84 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Openfort API + * Complete Openfort API references and guides can be found at: https://openfort.xyz/docs + * + * The version of the OpenAPI document: 1.0.0 + * Contact: founders@openfort.xyz + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * + * @export + * @interface ZKSyncDetails + */ +export interface ZKSyncDetails { + /** + * The transaction sender. + * @type {string} + * @memberof ZKSyncDetails + */ + 'from': string; + /** + * The transaction recipient or contract address. + * @type {string} + * @memberof ZKSyncDetails + */ + 'to': string; + /** + * A contract hashed method call with encoded args. + * @type {string} + * @memberof ZKSyncDetails + */ + 'data'?: string; + /** + * Unique number identifying this transaction. + * @type {string} + * @memberof ZKSyncDetails + */ + 'nonce': string; + /** + * The gas limit for the transaction. + * @type {string} + * @memberof ZKSyncDetails + */ + 'gas': string; + /** + * Total fee per gas (in wei), inclusive of `maxPriorityFeePerGas`. Only applies to EIP-1559 Transactions. + * @type {string} + * @memberof ZKSyncDetails + */ + 'maxFeePerGas': string; + /** + * Max priority fee per gas (in wei). Only applies to EIP-1559 Transactions. + * @type {string} + * @memberof ZKSyncDetails + */ + 'maxPriorityFeePerGas': string; + /** + * Address of the paymaster account that will pay the fees. + * @type {string} + * @memberof ZKSyncDetails + */ + 'paymaster'?: string; + /** + * Input data to the paymaster + * @type {string} + * @memberof ZKSyncDetails + */ + 'paymasterInput'?: string; + /** + * Value in wei sent with this transaction. + * @type {string} + * @memberof ZKSyncDetails + */ + 'value'?: string; +} + diff --git a/sdk/package.json b/sdk/package.json index 479cd570..5c2f4843 100644 --- a/sdk/package.json +++ b/sdk/package.json @@ -1,6 +1,6 @@ { "name": "@openfort/openfort-js", - "version": "0.8.7", + "version": "0.8.8", "author": "Openfort (https://www.openfort.xyz)", "bugs": "https://github.com/openfort-xyz/openfort-js/issues", "repository": "openfort-xyz/openfort-js.git", diff --git a/sdk/src/evm/sendTransaction.ts b/sdk/src/evm/sendTransaction.ts index 785d8691..bd051235 100644 --- a/sdk/src/evm/sendTransaction.ts +++ b/sdk/src/evm/sendTransaction.ts @@ -73,8 +73,8 @@ export const sendTransaction = async ({ policyId, ); let response: ResponseResponse; - if (openfortTransaction?.nextAction?.payload?.userOperationHash) { - const signature = await signer.sign(openfortTransaction.nextAction.payload.userOperationHash); + if (openfortTransaction?.nextAction?.payload?.signableHash) { + const signature = await signer.sign(openfortTransaction.nextAction.payload.signableHash); const openfortSignatureResponse = ( await backendClient.transactionIntentsApi.signature({ id: openfortTransaction.id, diff --git a/sdk/src/openfort.ts b/sdk/src/openfort.ts index 3b0d0fba..85347c04 100644 --- a/sdk/src/openfort.ts +++ b/sdk/src/openfort.ts @@ -549,15 +549,15 @@ export class Openfort { * Sends a signature transaction intent request. * * @param transactionIntentId - Transaction intent ID. - * @param userOperationHash - User operation hash. + * @param signableHash - User operation hash. * @param signature - Transaction signature. * @param optimistic - Whether the request is optimistic. * @returns A TransactionIntentResponse object. - * @throws {OpenfortError} If no userOperationHash or signature is provided. + * @throws {OpenfortError} If no signableHash or signature is provided. */ public async sendSignatureTransactionIntentRequest( transactionIntentId: string, - userOperationHash: string | null = null, + signableHash: string | null = null, signature: string | null = null, optimistic: boolean = false, ): Promise { @@ -568,9 +568,9 @@ export class Openfort { await this.validateAndRefreshToken(); let newSignature = signature; if (!newSignature) { - if (!userOperationHash) { + if (!signableHash) { throw new OpenfortError( - 'No userOperationHash or signature provided', + 'No signableHash or signature provided', OpenfortErrorType.OPERATION_NOT_SUPPORTED_ERROR, ); } @@ -583,7 +583,7 @@ export class Openfort { ); } - newSignature = await signer.sign(userOperationHash); + newSignature = await signer.sign(signableHash); } const request = { diff --git a/sdk/src/types.ts b/sdk/src/types.ts index d0c35f7f..e0f89fc4 100644 --- a/sdk/src/types.ts +++ b/sdk/src/types.ts @@ -38,6 +38,8 @@ export enum AccountType { RECOVERABLE_V4 = 'Recoverable_v04', MANAGED_V5 = 'Managed_v05', UPGRADEABLE_V5 = 'Upgradeable_v05', + UPGRADEABLE_V6 = 'Upgradeable_v06', + ZKSYNC_UPGRADEABLE_V1 = 'zksync_upgradeable_v1', } export enum AuthType { @@ -136,10 +138,9 @@ export enum OAuthProvider { } export interface NextActionPayload { - 'userOp'?: any; - 'userOpHash'?: string; 'userOperation'?: any; 'userOperationHash'?: string; + 'signableHash'?: string; } export interface NextActionResponse { @@ -188,22 +189,6 @@ export interface ResponseResponse { 'error'?: any; } -export interface PlayerResponseTransactionIntentsInner { - 'id': string; - 'object': 'transactionIntent'; - 'createdAt': number; - 'updatedAt': number; - 'chainId': number; - 'userOperationHash'?: string; - 'userOperation'?: any; - 'response'?: ResponseResponse; - 'interactions'?: Array; - 'nextAction'?: NextActionResponse; - 'policy'?: EntityIdResponse; - 'player'?: EntityIdResponse; - 'account': EntityIdResponse; -} - export interface SessionResponse { 'id': string; 'object': 'session'; @@ -216,7 +201,7 @@ export interface SessionResponse { 'whitelist'?: Array; 'limit'?: number; 'nextAction'?: NextActionResponse; - 'transactionIntents'?: Array; + 'transactionIntents'?: Array; } export interface PolicyStrategy { @@ -270,20 +255,28 @@ export interface TransactionIntentResponsePlayer { 'accounts'?: Array; } +export const TRANSACTION_ABSTRACTION_TYPE = { + accountAbstractionV6: 'accountAbstractionV6', + zksync: 'zkSync', + standard: 'standard', +} as const; + +export type TransactionAbstractionType = typeof TRANSACTION_ABSTRACTION_TYPE[keyof typeof TRANSACTION_ABSTRACTION_TYPE]; + export interface TransactionIntentResponse { 'id': string; 'object': 'transactionIntent'; 'createdAt': number; 'updatedAt': number; + 'abstractionType': TransactionAbstractionType; + 'details'?: AccountAbstractionV6Details | ZKSyncDetails | StandardDetails; 'chainId': number; - 'userOperationHash'?: string; - 'userOperation'?: any; 'response'?: ResponseResponse; 'interactions'?: Array; 'nextAction'?: NextActionResponse; - 'policy'?: TransactionIntentResponsePolicy; - 'player'?: TransactionIntentResponsePlayer; - 'account': TransactionIntentResponseAccount; + 'policy'?: TransactionIntentResponsePolicy | EntityIdResponse; + 'player'?: TransactionIntentResponsePlayer | EntityIdResponse; + 'account': TransactionIntentResponseAccount | EntityIdResponse; } export interface PlayerMetadataValue { @@ -314,7 +307,7 @@ export interface AuthPlayerResponsePlayer { 'metadata'?: { [key: string]: PlayerMetadataValue; }; - 'transactionIntents'?: Array; + 'transactionIntents'?: Array; 'accounts'?: Array; } @@ -348,6 +341,49 @@ export interface AuthResponse { 'refreshToken': string; } +export interface AccountAbstractionV6Details { + 'userOperation': UserOperationV6; + 'userOperationHash': string; +} + +export interface UserOperationV6 { + 'callData': string; + 'callGasLimit': string; + 'initCode'?: string; + 'maxFeePerGas': string; + 'maxPriorityFeePerGas': string; + 'nonce': string; + 'paymasterAndData'?: string; + 'preVerificationGas': string; + 'sender': string + 'signature': string + 'verificationGasLimit': string +} + +export interface ZKSyncDetails { + 'from': string; + 'to': string; + 'data'?: string; + 'nonce': string; + 'gas': string; + 'maxFeePerGas': string; + 'maxPriorityFeePerGas': string; + 'paymaster'?: string; + 'paymasterInput'?: string; + 'value'?: string; +} + +export interface StandardDetails { + 'from': string; + 'to': string; + 'data'?: string; + 'nonce': string; + 'gas': string; + 'maxFeePerGas': string; + 'maxPriorityFeePerGas': string; + 'value'?: string; +} + export type PKCEData = { state: string, verifier: string diff --git a/sdk/src/version.ts b/sdk/src/version.ts index c2927cae..e6f85fa9 100644 --- a/sdk/src/version.ts +++ b/sdk/src/version.ts @@ -1,2 +1,2 @@ -export const VERSION = '0.8.7'; +export const VERSION = '0.8.8'; export const PACKAGE = '@openfort/openfort-js';