Skip to content

Commit ba68d2d

Browse files
authored
docs: add wallet_* methods for SCA (#479)
1 parent 39fc1ec commit ba68d2d

10 files changed

+1301
-0
lines changed

accounts/wallet_createAccount.json

+100
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
{
2+
"request": {
3+
"type": "array",
4+
"items": {
5+
"type": "object",
6+
"properties": {
7+
"signerAddress": {
8+
"type": "string",
9+
"pattern": "^0x(.*)$"
10+
},
11+
"id": {
12+
"format": "uuid",
13+
"type": "string"
14+
},
15+
"creationOptions": {
16+
"type": "object",
17+
"properties": {
18+
"accountType": {
19+
"type": "string",
20+
"enum": ["sma-b"]
21+
},
22+
"salt": {
23+
"type": "string",
24+
"pattern": "^0x(.*)$"
25+
}
26+
}
27+
}
28+
},
29+
"required": ["signerAddress"]
30+
}
31+
},
32+
"response": {
33+
"type": "object",
34+
"properties": {
35+
"accountAddress": {
36+
"type": "string",
37+
"pattern": "^0x(.*)$"
38+
},
39+
"id": {
40+
"format": "uuid",
41+
"type": "string"
42+
}
43+
},
44+
"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+
}
99+
}
100+
}

accounts/wallet_createAccount.yml

+74
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
# This file is generated by scripts/generate-schema.ts
2+
openapi: 3.0.1
3+
info:
4+
title: wallet_createAccount
5+
version: 1.0.0
6+
servers:
7+
- url: https://api.g.alchemy.com
8+
paths:
9+
/{apiKey}:
10+
post:
11+
summary: wallet_createAccount
12+
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
13+
x-readme:
14+
samples-languages:
15+
- javascript
16+
- curl
17+
- python
18+
- go
19+
parameters:
20+
- name: apiKey
21+
in: path
22+
schema:
23+
type: string
24+
default: docs-demo
25+
description: |
26+
<style>
27+
.custom-style {
28+
color: #048FF4;
29+
}
30+
</style>
31+
For higher throughput, <span class="custom-style"><a href="https://alchemy.com/?a=docs-demo" target="_blank">create your own API key</a></span>
32+
required: true
33+
- name: x-alchemy-wallet-api-auth
34+
in: header
35+
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
36+
schema:
37+
type: string
38+
required: true
39+
40+
requestBody:
41+
required: true
42+
content:
43+
application/json:
44+
schema:
45+
type: object
46+
properties:
47+
id:
48+
type: integer
49+
default: 1
50+
jsonrpc:
51+
type: string
52+
default: "2.0"
53+
enum:
54+
- "2.0"
55+
method:
56+
type: string
57+
default: wallet_createAccount
58+
enum:
59+
- wallet_createAccount
60+
params:
61+
$ref: ./accounts/wallet_createAccount.json#/request
62+
responses:
63+
"200":
64+
description: "Success"
65+
content:
66+
application/json:
67+
schema:
68+
$ref: "#/components/schemas/Response"
69+
components:
70+
schemas:
71+
Response:
72+
$ref: ./accounts/wallet_createAccount.json#/response
73+
x-alchemy-wallet-api-auth:
74+
$ref: ./accounts/wallet_createAccount.json#/headers/x-alchemy-wallet-api-auth

accounts/wallet_listAccounts.json

+68
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
{
2+
"request": {
3+
"type": "array",
4+
"items": {
5+
"type": "object",
6+
"properties": {
7+
"signerAddress": {
8+
"type": "string",
9+
"pattern": "^0x(.*)$"
10+
},
11+
"limit": {
12+
"minimum": 1,
13+
"maximum": 100,
14+
"default": 100,
15+
"type": "number"
16+
},
17+
"after": {
18+
"format": "base64url",
19+
"type": "string"
20+
}
21+
},
22+
"required": ["signerAddress"]
23+
}
24+
},
25+
"response": {
26+
"type": "object",
27+
"properties": {
28+
"accounts": {
29+
"type": "array",
30+
"items": {
31+
"type": "object",
32+
"properties": {
33+
"accountAddress": {
34+
"type": "string",
35+
"pattern": "^0x(.*)$"
36+
},
37+
"id": {
38+
"format": "uuid",
39+
"type": "string"
40+
}
41+
},
42+
"required": ["accountAddress", "id"]
43+
}
44+
},
45+
"meta": {
46+
"type": "object",
47+
"properties": {
48+
"totalCount": {
49+
"type": "number"
50+
},
51+
"after": {
52+
"anyOf": [
53+
{
54+
"format": "base64url",
55+
"type": "string"
56+
},
57+
{
58+
"type": "null"
59+
}
60+
]
61+
}
62+
},
63+
"required": ["totalCount", "after"]
64+
}
65+
},
66+
"required": ["accounts", "meta"]
67+
}
68+
}

accounts/wallet_listAccounts.yml

+66
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
# This file is generated by scripts/generate-schema.ts
2+
openapi: 3.0.1
3+
info:
4+
title: wallet_listAccounts
5+
version: 1.0.0
6+
servers:
7+
- url: https://api.g.alchemy.com
8+
paths:
9+
/{apiKey}:
10+
post:
11+
summary: wallet_listAccounts
12+
description: This method is used to list all smart accounts for a given signer.. This method is only available as a private early access for now
13+
x-readme:
14+
samples-languages:
15+
- javascript
16+
- curl
17+
- python
18+
- go
19+
parameters:
20+
- name: apiKey
21+
in: path
22+
schema:
23+
type: string
24+
default: docs-demo
25+
description: |
26+
<style>
27+
.custom-style {
28+
color: #048FF4;
29+
}
30+
</style>
31+
For higher throughput, <span class="custom-style"><a href="https://alchemy.com/?a=docs-demo" target="_blank">create your own API key</a></span>
32+
required: true
33+
34+
requestBody:
35+
required: true
36+
content:
37+
application/json:
38+
schema:
39+
type: object
40+
properties:
41+
id:
42+
type: integer
43+
default: 1
44+
jsonrpc:
45+
type: string
46+
default: "2.0"
47+
enum:
48+
- "2.0"
49+
method:
50+
type: string
51+
default: wallet_listAccounts
52+
enum:
53+
- wallet_listAccounts
54+
params:
55+
$ref: ./accounts/wallet_listAccounts.json#/request
56+
responses:
57+
"200":
58+
description: "Success"
59+
content:
60+
application/json:
61+
schema:
62+
$ref: "#/components/schemas/Response"
63+
components:
64+
schemas:
65+
Response:
66+
$ref: ./accounts/wallet_listAccounts.json#/response

0 commit comments

Comments
 (0)