Skip to content

Commit b16fb59

Browse files
authored
Merge pull request #465 from AlvaroLuken/al/request-fee-payer
Add new endpoint page for alchemy_requestFeePayer
2 parents f39999f + de8352b commit b16fb59

File tree

5 files changed

+132
-1
lines changed

5 files changed

+132
-1
lines changed

.github/workflows/sync-apis.yaml

+7-1
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,12 @@ jobs:
154154
working-directory: ./account-abstraction
155155
run: rdme openapi pm_getPaymasterStubData.yaml --key=$README_API_KEY --id=66c9270918cfbd0012803bb9
156156

157+
- name: Update AA API - alchemy_requestFeePayer
158+
env:
159+
README_API_KEY: ${{ secrets.README_API_KEY }}
160+
working-directory: ./account-abstraction
161+
run: rdme openapi alchemy_requestFeePayer.yaml --key=$README_API_KEY --id=67dc9614acaaf200248f71ea
162+
157163
# Update Embedded Accounts API
158164
- name: Update Embedded Accounts API - accounts
159165
env:
@@ -2773,4 +2779,4 @@ jobs:
27732779
env:
27742780
README_API_KEY: ${{ secrets.README_API_KEY }}
27752781
working-directory: ./zkSync
2776-
run: rdme openapi zks_L1ChainId.yaml --key=$README_API_KEY --id=65ef6dba72dd030072ccb501
2782+
run: rdme openapi zks_L1ChainId.yaml --key=$README_API_KEY --id=65ef6dba72dd030072ccb501
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
openapi: 3.1.0
2+
info:
3+
title: alchemy_requestFeePayer
4+
version: '1.0'
5+
servers:
6+
- url: 'https://solana-devnet.g.alchemy.com/v2/'
7+
variables:
8+
network:
9+
enum:
10+
- solana-mainnet
11+
- solana-devnet
12+
default: solana-mainnet
13+
x-sandbox:
14+
category:
15+
type:
16+
$ref: '../components/sandbox.yaml#/Category'
17+
value: gas-manager
18+
paths:
19+
/{apiKey}:
20+
$ref: '#/components/pathItems/path'
21+
components:
22+
pathItems:
23+
path:
24+
post:
25+
summary: alchemy_requestFeePayer
26+
description: Request gas sponsorship for a `transaction` on Solana. Returns the `serializedTransaction`, including the `feePayer` signature.
27+
tags: []
28+
parameters:
29+
- name: apiKey
30+
in: path
31+
schema:
32+
type: string
33+
default: docs-demo
34+
description: |
35+
<style>
36+
.custom-style {
37+
color: #048FF4;
38+
}
39+
</style>
40+
For higher throughput, <span class="custom-style"><a href="https://alchemy.com/?a=docs-demo" target="_blank">create your own API key</a></span>
41+
required: true
42+
requestBody:
43+
required: true
44+
content:
45+
application/json:
46+
schema:
47+
$ref: ../evm_body.yaml#/alchemy_requestFeePayer
48+
x-readme:
49+
samples-languages:
50+
- curl
51+
- javascript
52+
- python
53+
responses:
54+
'200':
55+
description: Successful response
56+
content:
57+
application/json:
58+
schema:
59+
$ref: ../evm_responses.yaml#/alchemy_requestFeePayer
60+
operationId: alchemy-requestFeePayer
61+
x-sandbox:
62+
category:
63+
type:
64+
$ref: '../components/sandbox.yaml#/Category'
65+
value: gas-manager

evm_body.yaml

+35
Original file line numberDiff line numberDiff line change
@@ -2749,3 +2749,38 @@ pm_getPaymasterData:
27492749
webhookData:
27502750
type: string
27512751
description: Additional data you wish to include in the request, such as proof of humanity.
2752+
2753+
alchemy_requestFeePayer:
2754+
allOf:
2755+
- $ref: '#/common_request_fields'
2756+
- type: object
2757+
properties:
2758+
method:
2759+
$ref: ./components/schemas.yaml#/Method
2760+
default: alchemy_requestFeePayer
2761+
params:
2762+
type: array
2763+
description: Parameters for requesting fee payer
2764+
minItems: 1
2765+
maxItems: 1
2766+
items:
2767+
type: array
2768+
minItems: 1
2769+
maxItems: 1
2770+
items:
2771+
type: object
2772+
properties:
2773+
webhookData:
2774+
type: string
2775+
description: Additional data you wish to include in the request, such as proof of humanity.
2776+
policyId:
2777+
oneOf:
2778+
- type: string
2779+
format: uuid
2780+
- type: array
2781+
items:
2782+
type: string
2783+
format: uuid
2784+
serializedTransaction:
2785+
type: string
2786+
description: A base64-encoded serialized transaction missing signature fields. The `feePayer` field should be set to an address that is different than any other address included in the tx. The API will update the `feePayer` and add the signature to the `serializedTransaction`.

evm_examples.yaml

+10
Original file line numberDiff line numberDiff line change
@@ -2948,3 +2948,13 @@ alchemy_requestGasAndPaymasterAndData:
29482948
'preVerificationGas': '0xab9c',
29492949
},
29502950
}
2951+
2952+
alchemy_requestFeePayer:
2953+
{
2954+
'jsonrpc': '2.0',
2955+
'method': 'alchemy_requestFeePayer',
2956+
'id': 1,
2957+
'result': {
2958+
'serializedTransaction': 'Ag0GtWZxxEAa5RRlVa9nlvoHlQipM/Xe27r8M+tU7UR3gFIX6inCTo22g1GGTMzKv+8O5d0UfCh1sv1ncCeTHwsAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAIAAQORLBR6iVTq70gqvschURzPHFw9OqToL0kpKcKJq/fSDMnfsDRNlEHTg8DntRPI83TAVf3jUyJ23AiXAcWFBtckAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB/srKfEvAFKeLN9XFazboEjOa7AXHC5+zjZ6wCIFEgHAECAgEBDAIAAACAlpgAAAAAAAA=',
2959+
},
2960+
}

evm_responses.yaml

+15
Original file line numberDiff line numberDiff line change
@@ -1928,3 +1928,18 @@ pm_getPaymasterData:
19281928
type: string
19291929
description: |
19301930
The data for the paymaster in the operation.
1931+
1932+
alchemy_requestFeePayer:
1933+
allOf:
1934+
- $ref: '#/common_response_fields'
1935+
- type: object
1936+
properties:
1937+
result:
1938+
type: object
1939+
properties:
1940+
serializedTransaction:
1941+
type: string
1942+
description: The serialized transaction with the fee payer set.
1943+
example:
1944+
$ref: ./evm_examples.yaml#/alchemy_requestFeePayer
1945+

0 commit comments

Comments
 (0)