Abstract.js Actions
Abstract.js is built to a modular standard similar to viem and allows for extending any client with additional actions.
Extending the clients
You can extend the client with additional actions by using the extend
method. This method allows you to add additional actions to the client.
import { createApiClient } from '@abstract-money/core'
const apiClient = createApiClient({ apiUrl: 'https://api.abstract.money' })
const extendedClient = apiClient.extend(() => {
return {
getData: async () => Promise.resolve('data')
}
})
You can create your own actions package, such as the @abstract-money/actions-xion
package for custom functionality.