diff --git a/.github/workflows/sync-apis.yaml b/.github/workflows/sync-apis.yaml index 3a43cd3d..a9921a59 100644 --- a/.github/workflows/sync-apis.yaml +++ b/.github/workflows/sync-apis.yaml @@ -1549,7 +1549,13 @@ jobs: working-directory: ./account-abstraction run: rdme openapi rundler_maxPriorityFeePerGas.yaml --key=$README_API_KEY --id=64df886f8b288c002455bba1 - + - name: Update AA API - alchemy_simulateUserOperationAssetChanges + env: + README_API_KEY: ${{ secrets.README_API_KEY }} + working-directory: ./account-abstraction + run: rdme openapi alchemy_simulateUserOperationAssetChanges.yaml --key=$README_API_KEY --id=6554e8dc1914ac000f50da38 + + # Update Debug APIs - name: Update Debug API - debug_traceBlockByHash env: diff --git a/account-abstraction/alchemy_simulateUserOperationAssetChanges.yaml b/account-abstraction/alchemy_simulateUserOperationAssetChanges.yaml new file mode 100644 index 00000000..4868574b --- /dev/null +++ b/account-abstraction/alchemy_simulateUserOperationAssetChanges.yaml @@ -0,0 +1,127 @@ +openapi: 3.1.0 +info: + title: alchemy_simulateUserOperationAssetChanges + version: '1.0' +servers: + - url: https://{network}.g.alchemy.com/v2 + variables: + network: + enum: + - eth-mainnet + - eth-sepolia + - eth-goerli + - arb-mainnet + - arb-goerli + - arb-sepolia + - opt-mainnet + - opt-goerli + - polygon-mainnet + - polygon-mumbai + - base-mainnet + - base-goerli + default: eth-mainnet +x-sandbox: + category: + type: + $ref: '../components/sandbox.yaml#/Category' + value: bundler +x-readme: + samples-languages: + - curl + - javascript + - python +paths: + /{apiKey}: + $ref: '#/components/pathItems/path' +components: + pathItems: + path: + post: + summary: alchemy_simulateUserOperationAssetChanges + operationId: alchemy-simulateuseroperationassetchanges + description: Simulates user operations and returns a list of asset changes. + parameters: + - $ref: ../components/parameters.yaml#/ApiKey + requestBody: + content: + application/json: + schema: + type: object + properties: + method: + type: string + default: alchemy_simulateUserOperationAssetChanges + params: + type: array + items: + oneOf: + - $ref: '../components/schemas.yaml#/UserOperation' + description: User operation to simulate. Please note that the `signature` does not need to be a valid signature, only a dummy value is required similar to the one that's used for estimating gas. + - $ref: '../components/schemas.yaml#/EntryPoint' + description: EntryPoint to use for the simulation. This MUST be one of the entry points returned by the `supportedEntryPoints` RPC call. + minItems: 2 + maxItems: 2 + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + required: + - changes + properties: + changes: + type: array + items: + $ref: '#/components/schemas/AssetChange' + schemas: + AssetChange: + type: object + required: + - assetType + - changeType + - from + - to + - rawAmount + - amount + - symbol + - decimals + - contractAddress + - name + - logo + - tokenId + properties: + assetType: + type: string + enum: + - NATIVE + - ERC20 + - ERC721 + - ERC1155 + - SPECIAL_NFT + changeType: + type: string + enum: + - APPROVE + - TRANSFER + from: + $ref: '../components/schemas.yaml#/FromAddress' + to: + $ref: '../components/schemas.yaml#/ToAddress' + rawAmount: + type: string + amount: + type: string + symbol: + type: string + decimals: + type: [number, 'null'] + contractAddress: + type: [string, 'null'] + name: + type: [string, 'null'] + logo: + type: [string, 'null'] + tokenId: + type: [number, 'null'] diff --git a/components/schemas.yaml b/components/schemas.yaml index e57b9b60..f5ebcffb 100644 --- a/components/schemas.yaml +++ b/components/schemas.yaml @@ -204,5 +204,5 @@ UserOperationReceipt: EntryPoint: $ref: '#/Hex' title: Entrypoint Address - description: The entrypoint address the request should be sent through. This MUST be one of the entry points returned by the `supportedEntryPoints` rpc call. + description: The entrypoint address the request should be sent through. This MUST be one of the entry points returned by the `supportedEntryPoints` RPC call. default: '0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789'