Skip to content

docs: add wallet_* methods for SCA #479

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
100 changes: 100 additions & 0 deletions accounts/wallet_createAccount.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
{
"request": {
"type": "array",
"items": {
"type": "object",
"properties": {
"signerAddress": {
"type": "string",
"pattern": "^0x(.*)$"
},
"id": {
"format": "uuid",
"type": "string"
},
"creationOptions": {
"type": "object",
"properties": {
"accountType": {
"type": "string",
"enum": ["sma-b"]
},
"salt": {
"type": "string",
"pattern": "^0x(.*)$"
}
}
}
},
"required": ["signerAddress"]
}
},
"response": {
"type": "object",
"properties": {
"accountAddress": {
"type": "string",
"pattern": "^0x(.*)$"
},
"id": {
"format": "uuid",
"type": "string"
}
},
"required": ["accountAddress", "id"]
},
"headers": {
"x-alchemy-wallet-api-auth": {
"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",
"anyOf": [
{
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": ["ECDSA"]
},
"signature": {
"type": "string",
"pattern": "^0x(.*)$"
}
},
"required": ["type", "signature"]
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": ["TURNKEY_STAMP"]
},
"body": {
"description": "This is the body of the whoami request. The organizationId here is the organizationId returned for a given logged in user",
"type": "object",
"properties": {
"organizationId": {
"type": "string"
}
},
"required": ["organizationId"]
},
"stamp": {
"description": "This is the result of generating a stamp over the body",
"type": "object",
"properties": {
"stampHeaderName": {
"type": "string"
},
"stampHeaderValue": {
"type": "string"
}
},
"required": ["stampHeaderName", "stampHeaderValue"]
}
},
"required": ["type", "body", "stamp"]
}
]
}
}
}
74 changes: 74 additions & 0 deletions accounts/wallet_createAccount.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# This file is generated by scripts/generate-schema.ts
openapi: 3.0.1
info:
title: wallet_createAccount
version: 1.0.0
servers:
- url: https://api.g.alchemy.com
paths:
/{apiKey}:
post:
summary: wallet_createAccount
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
x-readme:
samples-languages:
- javascript
- curl
- python
- go
parameters:
- name: apiKey
in: path
schema:
type: string
default: docs-demo
description: |
<style>
.custom-style {
color: #048FF4;
}
</style>
For higher throughput, <span class="custom-style"><a href="https://alchemy.com/?a=docs-demo" target="_blank">create your own API key</a></span>
required: true
- name: x-alchemy-wallet-api-auth
in: header
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
schema:
type: string
required: true

requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
id:
type: integer
default: 1
jsonrpc:
type: string
default: "2.0"
enum:
- "2.0"
method:
type: string
default: wallet_createAccount
enum:
- wallet_createAccount
params:
$ref: ./accounts/wallet_createAccount.json#/request
responses:
"200":
description: "Success"
content:
application/json:
schema:
$ref: "#/components/schemas/Response"
components:
schemas:
Response:
$ref: ./accounts/wallet_createAccount.json#/response
x-alchemy-wallet-api-auth:
$ref: ./accounts/wallet_createAccount.json#/headers/x-alchemy-wallet-api-auth
68 changes: 68 additions & 0 deletions accounts/wallet_listAccounts.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
{
"request": {
"type": "array",
"items": {
"type": "object",
"properties": {
"signerAddress": {
"type": "string",
"pattern": "^0x(.*)$"
},
"limit": {
"minimum": 1,
"maximum": 100,
"default": 100,
"type": "number"
},
"after": {
"format": "base64url",
"type": "string"
}
},
"required": ["signerAddress"]
}
},
"response": {
"type": "object",
"properties": {
"accounts": {
"type": "array",
"items": {
"type": "object",
"properties": {
"accountAddress": {
"type": "string",
"pattern": "^0x(.*)$"
},
"id": {
"format": "uuid",
"type": "string"
}
},
"required": ["accountAddress", "id"]
}
},
"meta": {
"type": "object",
"properties": {
"totalCount": {
"type": "number"
},
"after": {
"anyOf": [
{
"format": "base64url",
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": ["totalCount", "after"]
}
},
"required": ["accounts", "meta"]
}
}
66 changes: 66 additions & 0 deletions accounts/wallet_listAccounts.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# This file is generated by scripts/generate-schema.ts
openapi: 3.0.1
info:
title: wallet_listAccounts
version: 1.0.0
servers:
- url: https://api.g.alchemy.com
paths:
/{apiKey}:
post:
summary: wallet_listAccounts
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
x-readme:
samples-languages:
- javascript
- curl
- python
- go
parameters:
- name: apiKey
in: path
schema:
type: string
default: docs-demo
description: |
<style>
.custom-style {
color: #048FF4;
}
</style>
For higher throughput, <span class="custom-style"><a href="https://alchemy.com/?a=docs-demo" target="_blank">create your own API key</a></span>
required: true

requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
id:
type: integer
default: 1
jsonrpc:
type: string
default: "2.0"
enum:
- "2.0"
method:
type: string
default: wallet_listAccounts
enum:
- wallet_listAccounts
params:
$ref: ./accounts/wallet_listAccounts.json#/request
responses:
"200":
description: "Success"
content:
application/json:
schema:
$ref: "#/components/schemas/Response"
components:
schemas:
Response:
$ref: ./accounts/wallet_listAccounts.json#/response
Loading