diff --git a/content/remote-specs.json b/content/remote-specs.json index 42f54ecd0..ce8382fef 100644 --- a/content/remote-specs.json +++ b/content/remote-specs.json @@ -12,5 +12,10 @@ "name": "bundler", "url": "https://txe-api-specs.docs.alchemy.com/rundler/openrpc.yaml", "type": "openrpc" + }, + { + "name": "gas-manager-coverage", + "url": "https://txe-api-specs.docs.alchemy.com/paymaster/openrpc.yaml", + "type": "openrpc" } ] diff --git a/src/openrpc/alchemy/gas-manager-coverage/gas-manager-coverage.yaml b/src/openrpc/alchemy/gas-manager-coverage/gas-manager-coverage.yaml deleted file mode 100644 index fff5cbfd4..000000000 --- a/src/openrpc/alchemy/gas-manager-coverage/gas-manager-coverage.yaml +++ /dev/null @@ -1,983 +0,0 @@ -# yaml-language-server: $schema=https://meta.open-rpc.org/ - -$schema: https://meta.open-rpc.org/ -openrpc: 1.2.4 -info: - title: Alchemy Gas Manager Coverage API JSON-RPC Specification - description: A specification of the standard JSON-RPC methods for Gas Manager Coverage API. - version: 0.0.0 -servers: - - url: https://eth-mainnet.g.alchemy.com/v2 - name: Ethereum Mainnet - - url: https://eth-sepolia.g.alchemy.com/v2 - name: Ethereum Sepolia - - url: https://anime-mainnet.g.alchemy.com/v2 - name: Anime Mainnet - - url: https://anime-sepolia.g.alchemy.com/v2 - name: Anime Sepolia - - url: https://apechain-mainnet.g.alchemy.com/v2 - name: ApeChain Mainnet - - url: https://apechain-curtis.g.alchemy.com/v2 - name: ApeChain Curtis - - url: https://arb-mainnet.g.alchemy.com/v2 - name: Arbitrum Mainnet - - url: https://arb-sepolia.g.alchemy.com/v2 - name: Arbitrum Sepolia - - url: https://arc-testnet.g.alchemy.com/v2 - name: Arc Testnet - - url: https://base-mainnet.g.alchemy.com/v2 - name: Base Mainnet - - url: https://base-sepolia.g.alchemy.com/v2 - name: Base Sepolia - - url: https://berachain-mainnet.g.alchemy.com/v2 - name: Berachain Mainnet - - url: https://bnb-mainnet.g.alchemy.com/v2 - name: BNB Smart Chain Mainnet - - url: https://bnb-testnet.g.alchemy.com/v2 - name: BNB Smart Chain Testnet - - url: https://celo-mainnet.g.alchemy.com/v2 - name: Celo Mainnet - - url: https://celo-sepolia.g.alchemy.com/v2 - name: Celo Sepolia - - url: https://frax-mainnet.g.alchemy.com/v2 - name: Frax Mainnet - - url: https://gensyn-mainnet.g.alchemy.com/v2 - name: Gensyn Mainnet - - url: https://gensyn-testnet.g.alchemy.com/v2 - name: Gensyn Testnet - - url: https://hyperliquid-mainnet.g.alchemy.com/v2 - name: Hyperliquid Mainnet - - url: https://hyperliquid-testnet.g.alchemy.com/v2 - name: Hyperliquid Testnet - - url: https://ink-mainnet.g.alchemy.com/v2 - name: Ink Mainnet - - url: https://ink-sepolia.g.alchemy.com/v2 - name: Ink Sepolia - - url: https://polygon-mainnet.g.alchemy.com/v2 - name: Polygon Mainnet - - url: https://polygon-amoy.g.alchemy.com/v2 - name: Polygon Amoy - - url: https://megaeth-mainnet.g.alchemy.com/v2 - name: MegaETH Mainnet - - url: https://megaeth-testnet.g.alchemy.com/v2 - name: MegaETH Testnet - - url: https://monad-mainnet.g.alchemy.com/v2 - name: Monad Mainnet - - url: https://monad-testnet.g.alchemy.com/v2 - name: Monad Testnet - - url: https://mythos-mainnet.g.alchemy.com/v2 - name: Mythos Mainnet - - url: https://opbnb-mainnet.g.alchemy.com/v2 - name: opBNB Mainnet - - url: https://opbnb-testnet.g.alchemy.com/v2 - name: opBNB Testnet - - url: https://opt-mainnet.g.alchemy.com/v2 - name: OP Mainnet Mainnet - - url: https://opt-sepolia.g.alchemy.com/v2 - name: OP Mainnet Sepolia - - url: https://plasma-mainnet.g.alchemy.com/v2 - name: Plasma Mainnet - - url: https://plasma-testnet.g.alchemy.com/v2 - name: Plasma Testnet - - url: https://rise-testnet.g.alchemy.com/v2 - name: Rise Testnet - - url: https://robinhood-testnet.g.alchemy.com/v2 - name: Robinhood Chain Testnet - - url: https://shape-mainnet.g.alchemy.com/v2 - name: Shape Mainnet - - url: https://shape-sepolia.g.alchemy.com/v2 - name: Shape Sepolia - - url: https://solana-mainnet.g.alchemy.com/v2 - name: Solana Mainnet - - url: https://solana-devnet.g.alchemy.com/v2 - name: Solana Devnet - - url: https://soneium-mainnet.g.alchemy.com/v2 - name: Soneium Mainnet - - url: https://soneium-minato.g.alchemy.com/v2 - name: Soneium Minato - - url: https://stable-mainnet.g.alchemy.com/v2 - name: Stable Mainnet - - url: https://stable-testnet.g.alchemy.com/v2 - name: Stable Testnet - - url: https://story-mainnet.g.alchemy.com/v2 - name: Story Mainnet - - url: https://story-aeneid.g.alchemy.com/v2 - name: Story Aeneid - - url: https://unichain-mainnet.g.alchemy.com/v2 - name: Unichain Mainnet - - url: https://unichain-sepolia.g.alchemy.com/v2 - name: Unichain Sepolia - - url: https://worldchain-mainnet.g.alchemy.com/v2 - name: World Chain Mainnet - - url: https://worldchain-sepolia.g.alchemy.com/v2 - name: World Chain Sepolia - - url: https://xlayer-mainnet.g.alchemy.com/v2 - name: X Layer Mainnet - - url: https://xlayer-testnet.g.alchemy.com/v2 - name: X Layer Testnet - - url: https://zora-mainnet.g.alchemy.com/v2 - name: Zora Mainnet - - url: https://zora-sepolia.g.alchemy.com/v2 - name: Zora Sepolia -methods: - - name: "alchemy_requestGasAndPaymasterAndData" - description: | - Requests gas coverage for a `UserOperation`. Optionally accepts fee parameter overrides to be used in the `UserOperation`. - x-compute-units: 1250 - x-rate-limit-cus: 125 - params: - - name: "params[0]" - required: true - description: "Object containing the sponsorship request parameters." - schema: - type: "object" - required: - ["policyId", "entryPoint", "dummySignature", "userOperation"] - properties: - policyId: - description: "The Gas Manager Policy ID or list of Gas Manager Policy IDs." - oneOf: - - type: "string" - title: "policyId" - format: "uuid" - - type: "array" - title: "policyId Array" - items: - type: "string" - format: "uuid" - erc20Context: - $ref: "../_shared_wallets/components.yaml#/components/schemas/erc20Context" - description: "Erc20 context, required to enable users to pay gas with ERC-20 tokens." - entryPoint: - type: "string" - pattern: "^0[xX][0-9a-fA-F]*$" - description: The EntryPoint address the request should be sent through. This MUST be one of the EntryPoints returned by the `supportedEntryPoints` RPC call and match the version of the userOperation in the `userOperation` field. - dummySignature: - type: "string" - description: Dummy signature for the userOperation. This is useful for estimating gas costs. Check our [FAQs](/docs/reference/bundler-faqs#what-is-a-dummy-signature) to learn what a dummy signature is. - userOperation: - title: "User Operation, either v0.6 or v0.7 (missing signature, paymasterData, and gas fields)" - description: An object containing optional gas parameters, `paymasterAndData`, and signature fields. It can be either a v0.6 or v0.7 userOperation but must match the version of the EntryPoint at the specified `entryPoint`. - oneOf: - - title: "User Operation v0.6" - $ref: "../_shared_wallets/components.yaml#/components/schemas/UserOperationV06Partial" - - title: "User Operation v0.7" - $ref: "../_shared_wallets/components.yaml#/components/schemas/UserOperationV07Partial" - overrides: - type: "object" - description: | - Optional fields that override our gas and fee estimates. Use this parameter to override: `maxFeePerGas`, `maxPriorityFeePerGas`, `callGasLimit`, `verificationGasLimit`, or `preVerificationGas`. - - This will apply either: - - absolutes overrides (using a hex string) simply overriding estimated values entirely OR - - multiplier overrides relative to our estimates (in the format of { "multiplier": number } with max precision of 4 decimal places). For example, if the override value is { multiplier: 1.1 } for the `maxPriorityFeePerGas` field, then a 1.1 multiplier, or a 10% increase, is applied to the estimated `maxPriorityFeePerGas` of the userOp. - - A higher buffer may give userOps a better chance to mine if the L1/L2 gas and fees change. - - ```json - "overrides": { - "maxFeePerGas": "hex string" | { "multiplier": number }, - "maxPriorityFeePerGas": "hex string" | { "multiplier": number }, - "callGasLimit": "hex string" | { "multiplier": number }, - "verificationGasLimit": "hex string" | { "multiplier": number }, - "preVerificationGas": "hex string" | { "multiplier": number }, - } - ``` - properties: - maxFeePerGas: - oneOf: - - type: "string" - description: "Hex string." - - type: "object" - properties: - multiplier: - type: "number" - description: "Multiplier value." - maxPriorityFeePerGas: - oneOf: - - type: "string" - description: "Hex string." - - type: "object" - properties: - multiplier: - type: "number" - description: "Multiplier value." - callGasLimit: - oneOf: - - type: "string" - description: "Hex string." - - type: "object" - properties: - multiplier: - type: "number" - description: "Multiplier value." - verificationGasLimit: - oneOf: - - type: "string" - description: "Hex string." - - type: "object" - properties: - multiplier: - type: "number" - description: "Multiplier value." - preVerificationGas: - oneOf: - - type: "string" - description: "Hex string." - - type: "object" - properties: - multiplier: - type: "number" - description: "Multiplier value." - stateOverrideSet: - type: "object" - description: | - Allows changes to the state of a contract before executing the call. For example, you can modify variable values (like balances or approvals) for that call without changing the contract itself on the blockchain. - - In more technical terms, the state override set is an optional parameter that allows executing the call against a modified chain state. It is an address-to-state mapping, where each entry specifies some state to be overridden prior to executing the call. - properties: - balance: - type: "string" - description: "Fake balance to set for the account before executing the call (<= 32 bytes)" - nonce: - type: "string" - description: Fake nonce to set for the account before executing the call (<= 8 bytes). - code: - type: "string" - description: "Fake EVM bytecode to inject into the account before executing the call." - state: - type: "object" - description: "Fake key-value mapping to override all slots in the account storage before executing the call." - stateDiff: - type: "object" - description: "Fake key-value mapping to override individual slots in the account storage before executing the call." - webhookData: - type: "string" - description: "Additional data you can include in the request, such as proof of humanity, if you have enabled custom rules in your Gas Manager policy." - result: - name: "Response" - description: "The response depends on the EntryPoint version used in the request." - schema: - oneOf: - - title: "Entrypoint v0.6 Response" - type: "object" - required: ["paymasterAndData"] - properties: - paymasterAndData: - $ref: "../_shared_wallets/components.yaml#/components/schemas/bytes" - description: "The 0x‑prefixed hex string for the user to put into the UO's paymasterAndData field. Contains gas manager address, sigTimeRange, and secp256k1 signature." - callGasLimit: - $ref: "../_shared_wallets/components.yaml#/components/schemas/uint64" - description: "The amount of gas to allocate for the main execution call." - verificationGasLimit: - $ref: "../_shared_wallets/components.yaml#/components/schemas/uint64" - description: "The amount of gas to allocate for the verification step." - preVerificationGas: - $ref: "../_shared_wallets/components.yaml#/components/schemas/uint64" - description: "The amount of gas to compensate the bundler for pre-verification execution and calldata." - maxFeePerGas: - $ref: "../_shared_wallets/components.yaml#/components/schemas/uint64" - description: "The maximum fee per gas to pay for the execution of this operation (similar to EIP-1559 max_fee_per_gas)." - maxPriorityFeePerGas: - $ref: "../_shared_wallets/components.yaml#/components/schemas/uint64" - description: "Maximum priority fee per gas (similar to EIP-1559 max_priority_fee_per_gas)." - - title: "Entrypoint v0.7 Response" - type: "object" - required: ["paymaster", "paymasterData"] - properties: - paymaster: - $ref: "../_shared_wallets/components.yaml#/components/schemas/address" - description: "The paymaster address used in the operation." - paymasterData: - $ref: "../_shared_wallets/components.yaml#/components/schemas/bytes" - description: "The data for the paymaster in the operation." - callGasLimit: - $ref: "../_shared_wallets/components.yaml#/components/schemas/uint64" - description: "The amount of gas to allocate for the main execution call." - verificationGasLimit: - $ref: "../_shared_wallets/components.yaml#/components/schemas/uint64" - description: "The amount of gas to allocate for the verification step." - preVerificationGas: - $ref: "../_shared_wallets/components.yaml#/components/schemas/uint64" - description: "The amount of gas to compensate the bundler for pre-verification execution and calldata." - maxFeePerGas: - $ref: "../_shared_wallets/components.yaml#/components/schemas/uint64" - description: "The maximum fee per gas to pay for the execution of this operation (similar to EIP-1559 max_fee_per_gas)." - maxPriorityFeePerGas: - $ref: "../_shared_wallets/components.yaml#/components/schemas/uint64" - description: "Maximum priority fee per gas (similar to EIP-1559 max_priority_fee_per_gas)." - paymasterVerificationGasLimit: - $ref: "../_shared_wallets/components.yaml#/components/schemas/uint64" - description: "The gas limit for paymaster verification." - paymasterPostOpGasLimit: - $ref: "../_shared_wallets/components.yaml#/components/schemas/uint64" - description: "The gas limit for paymaster post-operation." - examples: - - name: "alchemy_requestGasAndPaymasterAndData example" - params: - - name: "params" - value: - webhookData: "example webhook data" - policyId: "69d524a7-e932-4214-8673-dcdcba31bb42" - entryPoint: "0x0000000071727De22E5E9d8BAf0edAc6f37da032" - dummySignature: "0xfffffffffffffffffffffffffffffff0000000000000000000000000000000007aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa1c" - userOperation: - sender: "0x1234567890123456789012345678901234567890" - nonce: "0x1" - callData: "0xabcdef" - callGasLimit: "0x5208" - verificationGasLimit: "0x5208" - preVerificationGas: "0x5208" - maxFeePerGas: "0x1" - maxPriorityFeePerGas: "0x1" - result: - name: "alchemy_requestGasAndPaymasterAndData response" - value: - paymaster: "0x4685d4c74BaC297e23D5C7D1a2bFc1b4581e6704" - paymasterData: "0x00000067890abcdef1234567890abcdef1234567890abcdef" - callGasLimit: "0x5208" - verificationGasLimit: "0x5208" - preVerificationGas: "0x5208" - maxFeePerGas: "0x1" - maxPriorityFeePerGas: "0x1" - paymasterVerificationGasLimit: "0x5208" - paymasterPostOpGasLimit: "0x5208" - - - name: "alchemy_requestPaymasterAndData" - description: | - Requests gas coverage for a `UserOperation`. - - - Please use `alchemy_requestGasAndPaymasterAndData` instead. - - While you can use `alchemy_requestPaymasterAndData` to request a paymaster signature, it's important to note that this function requires gas fields to be part of the `UserOperation` passed as a parameter. These gas fields are influenced by the response of this endpoint, creating a circular dependency. - - To simplify this process, we introduced alchemy_requestGasAndPaymasterAndData. This function both estimates gas and provides signed `paymaster` and `paymasterData` fields, therefore resolving the circular dependency. - - x-compute-units: 1000 - x-rate-limit-cus: 100 - - params: - - name: "params[0]" - required: true - description: "Object containing the sponsorship request parameters." - schema: - type: "object" - required: ["policyId", "entryPoint", "userOperation"] - properties: - policyId: - description: "The Gas Manager policy ID or list of Gas Manager policy IDs." - oneOf: - - type: "string" - title: "policyId" - format: "uuid" - - type: "array" - title: "policyId Array" - items: - type: "string" - format: "uuid" - erc20Context: - $ref: "../_shared_wallets/components.yaml#/components/schemas/erc20Context" - description: "Erc20 context, required to enable users to pay gas with ERC-20 tokens." - entryPoint: - type: "string" - pattern: "^0[xX][0-9a-fA-F]*$" - description: The EntryPoint address the request should be sent through. This MUST be one of the EntryPoints returned by the `supportedEntryPoints` RPC call and match the version of the userOperation in the `userOperation` field. - userOperation: - title: "User Operation, either v0.6 or v0.7 (missing signature and paymasterData)" - description: "Partial UserOperation object, missing `paymasterAndData` and `signature` fields. This can be either a v0.6 or v0.7 userOperation, but **MUST** match the version of the EntryPoint at the address in the `entryPoint` field." - oneOf: - - title: "User Operation v0.6" - $ref: "../_shared_wallets/components.yaml#/components/schemas/UserOperationV06Partial" - - title: "User Operation v0.7" - $ref: "../_shared_wallets/components.yaml#/components/schemas/UserOperationV07Partial" - webhookData: - type: "string" - description: "Additional data you can include in the request, such as proof of humanity, if you have enabled custom rules in your Gas Manager policy." - result: - name: "Response" - description: "The response depends on the EntryPoint version used in the request." - schema: - oneOf: - - title: "Entrypoint v0.6 Response" - type: "object" - required: ["paymasterAndData"] - properties: - paymasterAndData: - type: "string" - description: "The 0x-prefixed hex string for the user to put into the UO's paymasterAndData field. Contains gas manager `address`, `sigTimeRange`, and secp256k1 `signature`." - - title: "Entrypoint v0.7 Response" - type: "object" - required: ["paymaster", "paymasterData"] - properties: - paymaster: - type: "string" - description: "The paymaster address used in the operation." - paymasterData: - type: "string" - description: "The data for the paymaster in the operation." - paymasterVerificationGasLimit: - type: "string" - description: "The gas limit for paymaster verification." - paymasterPostOpGasLimit: - type: "string" - description: "The gas limit for paymaster post-operation." - examples: - - name: "alchemy_requestPaymasterAndData example" - params: - - name: "params" - value: - webhookData: "example webhook data" - policyId: "69d524a7-e932-4214-8673-dcdcba31bb42" - entryPoint: "0x0000000071727De22E5E9d8BAf0edAc6f37da032" - userOperation: - sender: "0xabcdefabcdefabcdefabcdefabcdefabcdefabcd" - nonce: "0x2" - callData: "0xdeadbeef" - callGasLimit: "0x5208" - verificationGasLimit: "0x5208" - preVerificationGas: "0x5208" - maxFeePerGas: "0x1" - maxPriorityFeePerGas: "0x1" - result: - name: "alchemy_requestPaymasterAndData response" - value: - paymaster: "0x4685d4c74BaC297e23D5C7D1a2bFc1b4581e6704" - paymasterData: "0x00000067890abcdef1234567890abcdef1234567890abcdef" - paymasterVerificationGasLimit: "0x5208" - paymasterPostOpGasLimit: "0x5208" - - - name: "pm_getPaymasterData" - description: Returns values to be used in paymaster-related fields of a signed userOperation. These values are not stubs and will be included in a signed userOperation as part of an `eth_sendUserOperation` call. - x-compute-units: 1000 - x-rate-limit-cus: 100 - params: - - name: "userOperation" - description: "Partial UserOperation object (either v0.6 or v0.7, missing signature and paymasterData)." - required: true - schema: - title: "User Operation, either v0.6 or v0.7 (missing signature and paymasterData)" - oneOf: - - title: "User Operation v0.6" - $ref: "../_shared_wallets/components.yaml#/components/schemas/UserOperationV06Partial" - - - title: "User Operation v0.7" - $ref: "../_shared_wallets/components.yaml#/components/schemas/UserOperationV07Partial" - - name: "entryPoint" - required: true - description: "The EntryPoint address the request should be sent through. Must be one of the EntryPoints returned by the `supportedEntryPoints` RPC call." - schema: - type: "string" - pattern: "^0[xX][0-9a-fA-F]*$" - - name: "chainId" - required: true - description: "The chain ID of the network the userOperation will be submitted on." - schema: - type: "string" - pattern: "^0[xX][0-9a-fA-F]+$" - - name: "context" - description: "An object containing context. Must include a Gas Manager Policy Id and may include webhookData." - schema: - type: "object" - required: ["policyId"] - properties: - policyId: - oneOf: - - type: "string" - format: "uuid" - - type: "array" - items: - type: "string" - format: "uuid" - description: "The policy ID or list of policy IDs." - webhookData: - type: "string" - description: "Additional data you can include in the request, such as proof of humanity, if you have enabled custom rules in your Gas Manager policy." - erc20Context: - $ref: "../_shared_wallets/components.yaml#/components/schemas/erc20Context" - description: "Erc20 context, required to enable users to pay gas with ERC-20 tokens." - result: - name: "Response" - description: "The response depends on the EntryPoint version used in the request." - schema: - oneOf: - - title: "EntryPoint v0.6 Response" - type: "object" - required: ["paymasterAndData"] - properties: - paymasterAndData: - type: "string" - description: "The 0x‑prefixed hex string for the user to put into the UO's paymasterAndData field." - - title: "EntryPoint v0.7 Response" - type: "object" - required: ["paymaster", "paymasterData"] - properties: - paymaster: - type: "string" - description: "The address of the paymaster." - paymasterData: - type: "string" - description: "The data for the paymaster in the userOperation." - examples: - - name: "pm_getPaymasterData example" - params: - - name: "userOperation" - value: - sender: "0xabcdefabcdefabcdefabcdefabcdefabcdefabcd" - nonce: "0x2" - callData: "0xdeadbeef" - callGasLimit: "0x5208" - verificationGasLimit: "0x5208" - preVerificationGas: "0x5208" - maxFeePerGas: "0x1" - maxPriorityFeePerGas: "0x1" - - name: "entryPoint" - value: "0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789" - - name: "chainId" - value: "0x1" - - name: "context" - value: - policyId: "69d524a7-e932-4214-8673-dcdcba31bb42" - result: - name: "pm_getPaymasterData response" - value: - paymasterAndData: "0xabc123" - - - name: "pm_getPaymasterStubData" - description: "Returns stub values to be used in paymaster-related fields of an unsigned userOperation for gas estimation." - x-compute-units: 250 - x-rate-limit-cus: 100 - params: - - name: "userOperation" - description: "Partial UserOperation object (either v0.6 or v0.7, missing signature and paymasterData)." - required: true - schema: - title: "User Operation, either v0.6 or v0.7 (missing signature and paymasterData)" - oneOf: - - title: "User Operation v0.6" - $ref: "../_shared_wallets/components.yaml#/components/schemas/UserOperationV06Partial" - - - title: "User Operation v0.7" - $ref: "../_shared_wallets/components.yaml#/components/schemas/UserOperationV07Partial" - - name: "entryPoint" - required: true - description: "The EntryPoint address the request should be sent through. Must be one of the EntryPoints returned by the supportedEntryPoints RPC call." - schema: - type: "string" - pattern: "^0[xX][0-9a-fA-F]*$" - - name: "chainId" - required: true - description: "The chain ID of the network the userOperation will be submitted on." - schema: - type: "string" - pattern: "^0[xX][0-9a-fA-F]+$" - - name: "context" - description: "An object containing context. Must include a policyId and may include webhookData." - schema: - type: "object" - required: ["policyId"] - properties: - policyId: - oneOf: - - type: "string" - format: "uuid" - - type: "array" - items: - type: "string" - format: "uuid" - description: "The policy ID or list of policy IDs." - erc20Context: - $ref: "../_shared_wallets/components.yaml#/components/schemas/erc20Context" - description: "Erc20 context, required to enable users to pay gas with ERC-20 tokens." - result: - name: "Response" - description: "The response depends on the EntryPoint version used in the request." - schema: - oneOf: - - title: "EntryPoint v0.6 Stub Response" - type: "object" - required: ["paymasterAndData"] - properties: - paymasterAndData: - type: "string" - description: "The 0x‑prefixed hex string for the user to put into the userOperation's paymasterAndData field." - sponsor: - type: "object" - description: "Information about who is sponsoring the user's transaction." - properties: - name: - type: "string" - description: "The name of the entity sponsoring the userOperation." - - title: "EntryPoint v0.7 Stub Response" - type: "object" - required: ["paymaster", "paymasterData"] - properties: - paymaster: - type: "string" - description: "The address of the paymaster." - paymasterData: - type: "string" - description: "The data for the paymaster in the userOperation." - sponsor: - type: "object" - description: "Information about who is sponsoring the user's transaction." - properties: - name: - type: "string" - description: "The name of the entity sponsoring the userOperation." - examples: - - name: "pm_getPaymasterDataStub example" - params: - - name: "userOperation" - value: - sender: "0xabcdefabcdefabcdefabcdefabcdefabcdefabcd" - nonce: "0x3" - callData: "0x1234" - callGasLimit: "0x5208" - verificationGasLimit: "0x5208" - preVerificationGas: "0x5208" - maxFeePerGas: "0x1" - maxPriorityFeePerGas: "0x1" - - name: "entryPoint" - value: "0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789" - - name: "chainId" - value: "0x1" - - name: "context" - value: - policyId: "69d524a7-e932-4214-8673-dcdcba31bb42" - result: - name: "pm_getPaymasterDataStub response" - value: - paymasterAndData: "0xabc123" - sponsor: - name: "SponsorName" - - - name: "alchemy_requestFeePayer" - description: | - Requests fee sponsorship for a Solana transaction and returns the updated `serializedTransaction` with the paymaster fee payer set and signed. - - - On every sponsored request, any top-level `SystemProgram.createAccount` and Associated Token Program `Create`/`CreateIdempotent` instructions are rewritten so the paymaster funds them directly — no opt-in required. For CPI-driven account creation, opt into rent prefunding with `prefundRent: true`; policies using `prefundRent` must set `maxSpendPerTxnUsd`. - - - - CPI rent prefunding is allowlisted. Contact [support@alchemy.com](mailto:support@alchemy.com) for access. - - x-compute-units: 1000 - x-rate-limit-cus: 100 - - params: - - name: "params[0]" - required: true - description: "Object containing the policy ID, serialized transaction, and optional rent-prefunding settings." - schema: - type: "object" - required: ["policyId", "serializedTransaction"] - properties: - policyId: - description: "The Gas Manager Policy ID or list of Gas Manager Policy IDs." - oneOf: - - title: policyId - type: "string" - format: "uuid" - - title: policyIdArray - type: "array" - items: - type: "string" - format: "uuid" - serializedTransaction: - type: "string" - pattern: "^[A-Za-z0-9+/]+={0,2}$" - description: > - The serialized transaction produced by `tx.serialize()`. - The service replaces the existing `feePayer` with the sponsoring - account and adds the fee-payer signature. For default requests, - `payerKey` can be any placeholder address. For requests with - `prefundRent: true`, `payerKey` MUST be the user's wallet — the - same account the program's CPI will debit for rent — because - prefunding targets that position. - webhookData: - type: "string" - description: Optional metadata forwarded to your policy webhook. - prefundRent: - type: "boolean" - default: false - description: > - Opts into cross-program invocation (CPI) rent prefunding. Use - this when the transaction creates accounts through CPI and the - user's wallet needs SOL prefunded first. Requires two things: - (1) the policy must set `maxSpendPerTxnUsd`, and (2) the - transaction's `payerKey` MUST be the user's wallet (the account - the CPI debits for rent). Prefunding targets `payerKey` by - position, so a placeholder `payerKey` silently misses and the - transaction fails on-chain for lack of rent. - result: - name: "Sponsored transaction wrapper" - description: > - Object containing the sponsored transaction plus fee and rent estimates. - schema: - type: "object" - required: - [ - "serializedTransaction", - "estimatedFeeLamports", - "estimatedRentLamports", - "usesDurableNonce", - ] - properties: - serializedTransaction: - title: "base-64-encoded Solana transaction" - type: "string" - description: > - The transaction after the service sets the `feePayer` field and - adds the fee-payer signature. - estimatedFeeLamports: - type: "integer" - description: Estimated network fee in lamports for the returned transaction. - estimatedRentLamports: - type: "integer" - description: Estimated rent in lamports covered by sponsorship. - prefundLamports: - type: "integer" - description: > - Lamports transferred to the transaction's `payerKey` to cover - CPI-driven account creation rent. Omitted when no prefund - simulation ran — i.e., `prefundRent` was not requested, or it - was requested but the fee payer was replaced rather than - injected so there was no user wallet to top up. - simulationSlot: - type: "integer" - description: > - Slot used for rent-prefunding simulation. Omitted when no - prefund simulation ran. When present, pass it as - `minContextSlot` when submitting the transaction to reduce - stale-state risk. Simulation is only an estimate: onchain state - or CPI behavior can change before execution, so prefunding may - still end up too low or higher than what is ultimately consumed. - usesDurableNonce: - type: "boolean" - description: Whether the returned transaction uses a durable nonce. - lastValidBlockHeight: - type: "integer" - description: > - Expiry hint for recent-blockhash transactions. Omitted for durable - nonce transactions. - servers: - [ - { - "url": "https://solana-mainnet.g.alchemy.com/v2", - "name": "Solana Mainnet", - }, - { - "url": "https://solana-devnet.g.alchemy.com/v2", - "name": "Solana Devnet", - }, - ] - examples: - - name: "Default request" - params: - - name: "params[0]" - value: - policyId: "69d524a7-e932-4214-8673-dcdcba31bb42" - serializedTransaction: "AgICAQMEBQYHCAkKCwwNDg8BCg==" - result: - name: "Sponsored transaction wrapper" - value: - serializedTransaction: "AQIDBAUGBwgJCgsMDQ4PEA==" - estimatedFeeLamports: 5000 - estimatedRentLamports: 890880 - usesDurableNonce: false - lastValidBlockHeight: 567890 - - name: "With CPI rent prefunding" - params: - - name: "params[0]" - value: - policyId: "69d524a7-e932-4214-8673-dcdcba31bb42" - serializedTransaction: "AgICAQMEBQYHCAkKCwwNDg8BCg==" - prefundRent: true - result: - name: "Sponsored transaction wrapper" - value: - serializedTransaction: "AQIDBAUGBwgJCgsMDQ4PEA==" - estimatedFeeLamports: 5000 - estimatedRentLamports: 890880 - prefundLamports: 890880 - simulationSlot: 456789 - usesDurableNonce: false - lastValidBlockHeight: 567890 - - name: "alchemy_requestPaymasterTokenQuote" - description: | - Requests ERC20 fee quote for a `UserOperation`. Optionally accepts fee parameter overrides to be used in the `UserOperation`. - x-compute-units: 1000 - x-rate-limit-cus: 100 - params: - - name: "params[0]" - required: true - description: "Object containing the token quote request parameters." - schema: - type: "object" - required: - ["policyId", "entryPoint", "dummySignature", "userOperation"] - properties: - policyId: - description: "The Gas Manager Policy ID or list of Gas Manager Policy IDs." - oneOf: - - type: "string" - title: "policyId" - format: "uuid" - - type: "array" - title: "policyId Array" - items: - type: "string" - format: "uuid" - erc20Context: - $ref: "../_shared_wallets/components.yaml#/components/schemas/erc20Context" - description: "Erc20 context, required to enable users to pay gas with ERC-20 tokens." - entryPoint: - type: "string" - pattern: "^0[xX][0-9a-fA-F]*$" - description: The EntryPoint address the request should be sent through. This MUST be one of the EntryPoints returned by the `supportedEntryPoints` RPC call and match the version of the userOperation in the `userOperation` field. - dummySignature: - type: "string" - description: Dummy signature for the userOperation. This is useful for estimating gas costs. Check our [FAQs](/docs/reference/bundler-faqs#what-is-a-dummy-signature) to learn what a dummy signature is. - userOperation: - title: "User Operation, either v0.6 or v0.7 (missing signature, paymasterData, and gas fields)" - description: An object containing optional gas parameters, `paymasterAndData`, and signature fields. It can be either a v0.6 or v0.7 userOperation but must match the version of the EntryPoint at the specified `entryPoint`. - oneOf: - - title: "User Operation v0.6" - $ref: "../_shared_wallets/components.yaml#/components/schemas/UserOperationV06Partial" - - title: "User Operation v0.7" - $ref: "../_shared_wallets/components.yaml#/components/schemas/UserOperationV07Partial" - overrides: - type: "object" - description: | - Optional fields that override our gas and fee estimates. Use this parameter to override: `maxFeePerGas`, `maxPriorityFeePerGas`, `callGasLimit`, `verificationGasLimit`, or `preVerificationGas`. - - This will apply either: - - absolutes overrides (using a hex string) simply overriding estimated values entirely OR - - multiplier overrides relative to our estimates (in the format of { "multiplier": number } with max precision of 4 decimal places). For example, if the override value is { multiplier: 1.1 } for the `maxPriorityFeePerGas` field, then a 1.1 multiplier, or a 10% increase, is applied to the estimated `maxPriorityFeePerGas` of the userOp. - - A higher buffer may give userOps a better chance to mine if the L1/L2 gas and fees change. - - ```json - "overrides": { - "maxFeePerGas": "hex string" | { "multiplier": number }, - "maxPriorityFeePerGas": "hex string" | { "multiplier": number }, - "callGasLimit": "hex string" | { "multiplier": number }, - "verificationGasLimit": "hex string" | { "multiplier": number }, - "preVerificationGas": "hex string" | { "multiplier": number }, - } - ``` - properties: - maxFeePerGas: - oneOf: - - type: "string" - description: "Hex string." - - type: "object" - properties: - multiplier: - type: "number" - description: "Multiplier value." - maxPriorityFeePerGas: - oneOf: - - type: "string" - description: "Hex string." - - type: "object" - properties: - multiplier: - type: "number" - description: "Multiplier value." - callGasLimit: - oneOf: - - type: "string" - description: "Hex string." - - type: "object" - properties: - multiplier: - type: "number" - description: "Multiplier value." - verificationGasLimit: - oneOf: - - type: "string" - description: "Hex string." - - type: "object" - properties: - multiplier: - type: "number" - description: "Multiplier value." - preVerificationGas: - oneOf: - - type: "string" - description: "Hex string." - - type: "object" - properties: - multiplier: - type: "number" - description: "Multiplier value." - stateOverrideSet: - type: "object" - description: | - Allows changes to the state of a contract before executing the call. For example, you can modify variable values (like balances or approvals) for that call without changing the contract itself on the blockchain. - - In more technical terms, the state override set is an optional parameter that allows executing the call against a modified chain state. It is an address-to-state mapping, where each entry specifies some state to be overridden prior to executing the call. - properties: - balance: - type: "string" - description: "Fake balance to set for the account before executing the call (<= 32 bytes)" - nonce: - type: "string" - description: Fake nonce to set for the account before executing the call (<= 8 bytes). - code: - type: "string" - description: "Fake EVM bytecode to inject into the account before executing the call." - state: - type: "object" - description: "Fake key-value mapping to override all slots in the account storage before executing the call." - stateDiff: - type: "object" - description: "Fake key-value mapping to override individual slots in the account storage before executing the call." - result: - name: "Response" - description: "The response object may be one of two types:" - schema: - type: "object" - properties: - tokensPerEth: - title: "erc20 token amount per ethereum" - type: "string" - description: > - The erc20 amout per 1 eth. - estimatedTokenAmount: - title: "estimated erc20 token amount to pay for the user operation" - type: "string" - description: > - The estimated erc20 token amount to pay for the user operation. - estimatedUsd: - title: "estimated USD amount to pay for the user operation" - type: "string" - description: > - The estimated USD amount to pay for the user operation. - - examples: - - name: "alchemy_requestPaymasterTokenQuote example" - params: - - name: "params" - value: - policyId: "69d524a7-e932-4214-8673-dcdcba31bb42" - entryPoint: "0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789" - dummySignature: "0xfffffffffffffffffffffffffffffff0000000000000000000000000000000007aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa1c" - userOperation: - sender: "0x1234567890123456789012345678901234567890" - nonce: "0x1" - callData: "0xabcdef" - callGasLimit: "0x5208" - verificationGasLimit: "0x5208" - preVerificationGas: "0x5208" - maxFeePerGas: "0x1" - maxPriorityFeePerGas: "0x1" - result: - name: "alchemy_requestPaymasterTokenQuote response" - value: - tokensPerEth: "2413210000" - estimatedTokenAmount: "100000" - estimatedUsd: "0.1"