|
| 1 | +--- |
| 2 | +title: Prepares a sponsored (gasless) transaction with fee payments. |
| 3 | +full: true |
| 4 | +_openapi: |
| 5 | + method: POST |
| 6 | + route: /api/v1/relayers/{relayer_id}/transactions/sponsored/build |
| 7 | + toc: [] |
| 8 | + structuredData: |
| 9 | + headings: [] |
| 10 | + contents: |
| 11 | + - content: >- |
| 12 | + This endpoint builds a transaction where the relayer will pay the |
| 13 | + network fees on behalf of the user. |
| 14 | +
|
| 15 | + The user pays fees in a token of their choice (e.g., USDC) instead of |
| 16 | + the native network currency. |
| 17 | +
|
| 18 | +
|
| 19 | + The endpoint accepts either a pre-built transaction XDR or a set of |
| 20 | + operations to build a transaction from. |
| 21 | +
|
| 22 | + It returns a prepared transaction that includes: |
| 23 | +
|
| 24 | + - The transaction XDR (base64 encoded) ready for signing |
| 25 | +
|
| 26 | + - The fee amount in both the fee token and native currency (stroops |
| 27 | + for Stellar) |
| 28 | +
|
| 29 | + - The fee token identifier |
| 30 | +
|
| 31 | + - The transaction validity timestamp |
| 32 | +
|
| 33 | +
|
| 34 | + After receiving the prepared transaction, the user must sign it and |
| 35 | + submit it through the standard |
| 36 | +
|
| 37 | + transaction submission endpoint. For Stellar, the transaction will be |
| 38 | + wrapped in a fee-bump transaction |
| 39 | +
|
| 40 | + where the relayer pays the network fees. |
| 41 | +--- |
| 42 | + |
| 43 | +{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} |
| 44 | + |
| 45 | +This endpoint builds a transaction where the relayer will pay the network fees on behalf of the user. |
| 46 | +The user pays fees in a token of their choice (e.g., USDC) instead of the native network currency. |
| 47 | + |
| 48 | +The endpoint accepts either a pre-built transaction XDR or a set of operations to build a transaction from. |
| 49 | +It returns a prepared transaction that includes: |
| 50 | +- The transaction XDR (base64 encoded) ready for signing |
| 51 | +- The fee amount in both the fee token and native currency (stroops for Stellar) |
| 52 | +- The fee token identifier |
| 53 | +- The transaction validity timestamp |
| 54 | + |
| 55 | +After receiving the prepared transaction, the user must sign it and submit it through the standard |
| 56 | +transaction submission endpoint. For Stellar, the transaction will be wrapped in a fee-bump transaction |
| 57 | +where the relayer pays the network fees. |
| 58 | + |
| 59 | +<APIPage document={"https://raw.githubusercontent.com/OpenZeppelin/openzeppelin-relayer/refs/heads/release-v1.3.0/openapi.json"} operations={[{"path":"/api/v1/relayers/{relayer_id}/transactions/sponsored/build","method":"post"}]} webhooks={[]} hasHead={false} /> |
0 commit comments