Skip to main content
Faremeter API
Faremeter API / rides/src

rides/src

Variables

payer

const payer: object
Defined in: packages/rides/src/internal.ts:177 Default payer instance with all networks and assets enabled. Use addLocalWallet to attach wallet credentials before making requests with the fetch method.

Type declaration

addLocalWallet()
addLocalWallet: (input) => Promise<void>
Parameters
input
unknown
Returns
Promise<void>
fetch()
fetch: (input, init?) => Promise<Response>
Parameters
input
RequestInfo | URL
init?
RequestInit
Returns
Promise<Response>

Functions

createPayer()

createPayer(args?): object
Defined in: packages/rides/src/internal.ts:58 Creates a payer instance that manages wallets and payment-enabled fetch. The payer automatically handles x402 payment flows by wrapping fetch with payment capabilities. Wallets must be added via addLocalWallet before making paid requests.

Parameters

args?
CreatePayerArgs Optional configuration for networks, assets, and fetch behavior

Returns

object A payer object with addLocalWallet and fetch methods
addLocalWallet()
addLocalWallet: (input) => Promise<void>
Parameters
input
unknown
Returns
Promise<void>
fetch()
fetch: (input, init?) => Promise<Response>
Parameters
input
RequestInfo | URL
init?
RequestInit
Returns
Promise<Response>