wallet_getCapabilities
Gets supported capabilities of Porto.
Request
type Request = {
method: 'wallet_getCapabilities',
params: [
/** Account address to get the capabilities for. */
account?: `0x${string}`
/** Chain IDs to get the capabilities for. */
chainIds?: `0x${string}`[],
]
}
Response
type Response = {
capabilities: {
atomic: {
status: "supported" | "unsupported"
}
feeToken: {
supported: true,
tokens: {
address: `0x${string}`,
decimals: number,
kind: string,
nativeRate: `0x${string}`,
symbol: string,
}[]
},
permissions: {
supported: true
},
sponsor: {
supported: true
}
}
}
Example
import { Porto } from 'porto'
const { provider } = Porto.create()
const capabilities = await provider.request({
method: 'wallet_getCapabilities',
})