Skip to content
This repository was archived by the owner on May 20, 2025. It is now read-only.

Commit ad4e6dd

Browse files
authored
Merge pull request #495 from alchemyplatform/jake/update-wallet-server-docs-20250428
update wallet server docs
2 parents d376777 + b99e9a4 commit ad4e6dd

10 files changed

+457
-153
lines changed

.github/workflows/sync-apis.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,12 @@ jobs:
202202
working-directory: ./accounts
203203
run: rdme openapi wallet_requestAccount.yaml --key=$README_API_KEY --id=67f435141927c200189a230a
204204

205+
- name: Update Embedded Accounts API - wallet_getCallsStatus
206+
env:
207+
README_API_KEY: ${{ secrets.README_API_KEY }}
208+
working-directory: ./accounts
209+
run: rdme openapi wallet_getCallsStatus.yaml --key=$README_API_KEY --id=680fcd2f17475500108c0e37
210+
205211
# Update Debug APIs
206212
- name: Update Debug API - debug_traceBlockByHash
207213
env:

accounts/wallet_createAccount.json

Lines changed: 0 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -42,59 +42,5 @@
4242
}
4343
},
4444
"required": ["accountAddress", "id"]
45-
},
46-
"headers": {
47-
"x-alchemy-wallet-api-auth": {
48-
"description": "The auth header is used to verify the end user making the request. When passed as a header, this object needs to be converted to string and Base64 encoded. See the schema definition for x-alchemy-wallet-api-auth for its shape",
49-
"anyOf": [
50-
{
51-
"type": "object",
52-
"properties": {
53-
"type": {
54-
"type": "string",
55-
"enum": ["ECDSA"]
56-
},
57-
"signature": {
58-
"type": "string",
59-
"pattern": "^0x(.*)$"
60-
}
61-
},
62-
"required": ["type", "signature"]
63-
},
64-
{
65-
"type": "object",
66-
"properties": {
67-
"type": {
68-
"type": "string",
69-
"enum": ["TURNKEY_STAMP"]
70-
},
71-
"body": {
72-
"description": "This is the body of the whoami request. The organizationId here is the organizationId returned for a given logged in user",
73-
"type": "object",
74-
"properties": {
75-
"organizationId": {
76-
"type": "string"
77-
}
78-
},
79-
"required": ["organizationId"]
80-
},
81-
"stamp": {
82-
"description": "This is the result of generating a stamp over the body",
83-
"type": "object",
84-
"properties": {
85-
"stampHeaderName": {
86-
"type": "string"
87-
},
88-
"stampHeaderValue": {
89-
"type": "string"
90-
}
91-
},
92-
"required": ["stampHeaderName", "stampHeaderValue"]
93-
}
94-
},
95-
"required": ["type", "body", "stamp"]
96-
}
97-
]
98-
}
9945
}
10046
}

accounts/wallet_createAccount.yaml

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ paths:
1414
/{apiKey}:
1515
post:
1616
summary: wallet_createAccount
17-
description: This method is used to create a smart account for a given signer. This method is primarly used to import existing accounts. For most cases, you should use wallet_requestAccount instead. This method requires passing a stamped whoami request via the x-alchemy-wallet-api-auth header. This method is only available as a private early access for now
17+
description: This method is used to create a smart account for a given signer. This method is primarly used to import existing accounts. For most cases, you should use wallet_requestAccount instead. This method is only available as a private early access for now
1818
x-readme:
1919
samples-languages:
2020
- javascript
@@ -35,12 +35,6 @@ paths:
3535
</style>
3636
For higher throughput, <span class="custom-style"><a href="https://alchemy.com/?a=docs-demo" target="_blank">create your own API key</a></span>
3737
required: true
38-
- name: x-alchemy-wallet-api-auth
39-
in: header
40-
description: The auth header is used to verify the end user making the request. When passed as a header, this object needs to be converted to string and Base64 encoded. See the schema definition for x-alchemy-wallet-api-auth for its shape
41-
schema:
42-
type: string
43-
required: true
4438

4539
requestBody:
4640
required: true
@@ -81,5 +75,3 @@ components:
8175
schemas:
8276
Response:
8377
$ref: wallet_createAccount.json#/response
84-
x-alchemy-wallet-api-auth:
85-
$ref: wallet_createAccount.json#/headers/x-alchemy-wallet-api-auth

accounts/wallet_createSession.json

Lines changed: 157 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,31 @@
6363
},
6464
"required": ["type", "data"]
6565
},
66+
{
67+
"description": "allows transfer or approval of erc20 tokens from the account",
68+
"type": "object",
69+
"properties": {
70+
"type": {
71+
"type": "string",
72+
"enum": ["erc20-token-transfer"]
73+
},
74+
"data": {
75+
"type": "object",
76+
"properties": {
77+
"allowance": {
78+
"type": "string",
79+
"pattern": "^0x(.*)$"
80+
},
81+
"address": {
82+
"type": "string",
83+
"pattern": "^0x(.*)$"
84+
}
85+
},
86+
"required": ["allowance", "address"]
87+
}
88+
},
89+
"required": ["type", "data"]
90+
},
6691
{
6792
"description": "allows the key to spend gas for UOs",
6893
"type": "object",
@@ -84,6 +109,27 @@
84109
},
85110
"required": ["type", "data"]
86111
},
112+
{
113+
"description": "grants access to all functions in a contract",
114+
"type": "object",
115+
"properties": {
116+
"type": {
117+
"type": "string",
118+
"enum": ["contract-access"]
119+
},
120+
"data": {
121+
"type": "object",
122+
"properties": {
123+
"address": {
124+
"type": "string",
125+
"pattern": "^0x(.*)$"
126+
}
127+
},
128+
"required": ["address"]
129+
}
130+
},
131+
"required": ["type", "data"]
132+
},
87133
{
88134
"description": "grants access to functions in the account",
89135
"type": "object",
@@ -110,15 +156,66 @@
110156
"required": ["type", "data"]
111157
},
112158
{
113-
"description": "grants full access to everything",
159+
"description": "access to a function selector in any address or contract",
114160
"type": "object",
115161
"properties": {
116162
"type": {
117163
"type": "string",
118-
"enum": ["root"]
164+
"enum": ["functions-on-all-contracts"]
119165
},
120166
"data": {
121-
"not": {}
167+
"type": "object",
168+
"properties": {
169+
"functions": {
170+
"minItems": 1,
171+
"type": "array",
172+
"items": {
173+
"type": "string",
174+
"pattern": "^0x(.*)$"
175+
}
176+
}
177+
},
178+
"required": ["functions"]
179+
}
180+
},
181+
"required": ["type", "data"]
182+
},
183+
{
184+
"description": "grants access to specified functions on a specific contract",
185+
"type": "object",
186+
"properties": {
187+
"type": {
188+
"type": "string",
189+
"enum": ["functions-on-contract"]
190+
},
191+
"data": {
192+
"type": "object",
193+
"properties": {
194+
"address": {
195+
"type": "string",
196+
"pattern": "^0x(.*)$"
197+
},
198+
"functions": {
199+
"minItems": 1,
200+
"type": "array",
201+
"items": {
202+
"type": "string",
203+
"pattern": "^0x(.*)$"
204+
}
205+
}
206+
},
207+
"required": ["address", "functions"]
208+
}
209+
},
210+
"required": ["type", "data"]
211+
},
212+
{
213+
"description": "grants full access to everything",
214+
"type": "object",
215+
"properties": {
216+
"type": {
217+
"type": "string",
218+
"enum": ["root"]
122219
}
123220
},
124221
"required": ["type"]
@@ -174,7 +271,63 @@
174271
"type": "string",
175272
"enum": ["eth_signTypedData_v4"]
176273
},
177-
"data": {}
274+
"data": {
275+
"type": "object",
276+
"properties": {
277+
"domain": {
278+
"type": "object",
279+
"properties": {
280+
"chainId": {
281+
"type": "number"
282+
},
283+
"name": {
284+
"type": "string"
285+
},
286+
"salt": {
287+
"type": "string",
288+
"pattern": "^0x(.*)$"
289+
},
290+
"verifyingContract": {
291+
"type": "string",
292+
"pattern": "^0x(.*)$"
293+
},
294+
"version": {
295+
"type": "string"
296+
}
297+
}
298+
},
299+
"types": {
300+
"type": "object",
301+
"patternProperties": {
302+
"^(.*)$": {
303+
"type": "array",
304+
"items": {
305+
"type": "object",
306+
"properties": {
307+
"name": {
308+
"type": "string"
309+
},
310+
"type": {
311+
"type": "string"
312+
}
313+
},
314+
"required": ["name", "type"]
315+
}
316+
}
317+
}
318+
},
319+
"primaryType": {
320+
"type": "string"
321+
},
322+
"message": {
323+
"type": "object",
324+
"patternProperties": {
325+
"^(.*)$": {}
326+
}
327+
}
328+
},
329+
"required": ["types", "primaryType", "message"]
330+
}
178331
},
179332
"required": ["type", "data"]
180333
}

0 commit comments

Comments
 (0)