Skip to content
docs

FiatProtocol

Defined in: protocols/fiat.ts:68

Base class for fiat on/off-ramp modules.

TConfig extends object = Record<string, never>

new FiatProtocol<TConfig>(account, config?): FiatProtocol<TConfig>

Defined in: protocols/fiat.ts:72

IWalletAccountReadOnly | IWalletAccount

TConfig = ...

FiatProtocol<TConfig>

ProtocolBase.constructor

protected readonly _account: IWalletAccountReadOnly | IWalletAccount

Defined in: protocols/base.ts:8

ProtocolBase._account


protected readonly _config: TConfig

Defined in: protocols/base.ts:9

ProtocolBase._config

buy(_o): Promise<BuyResult>

Defined in: protocols/fiat.ts:76

BuyOptions

Promise<BuyResult>

IFiatProtocol.buy


describeActivity(_tx, _ctx): ActivityItem | null

Defined in: protocols/base.ts:24

Recognize one of this protocol’s own transactions in an address’s history and describe it for the wallet’s activity feed (“Supplied 100 USDC · Aave v3”). Return null when the transaction is not this protocol’s: the kit then asks the next module and finally falls back to send / receive / approve / contract call. Must be pure and synchronous: no network, no account state. The conformance suite feeds every module its recorded fixtures through this method.

ChainTx

DescribeActivityContext

ActivityItem | null

ProtocolBase.describeActivity


getSupportedCountries(): Promise<SupportedCountry[]>

Defined in: protocols/fiat.ts:82

Promise<SupportedCountry[]>

IFiatProtocol.getSupportedCountries


getSupportedCryptoAssets(): Promise<SupportedCryptoAsset[]>

Defined in: protocols/fiat.ts:80

Promise<SupportedCryptoAsset[]>

IFiatProtocol.getSupportedCryptoAssets


getSupportedFiatCurrencies(): Promise<SupportedFiatCurrency[]>

Defined in: protocols/fiat.ts:81

Promise<SupportedFiatCurrency[]>

IFiatProtocol.getSupportedFiatCurrencies


getTransactionDetail(_id): Promise<FiatTransactionDetail>

Defined in: protocols/fiat.ts:79

string

Promise<FiatTransactionDetail>

IFiatProtocol.getTransactionDetail


quoteBuy(_o): Promise<FiatQuote>

Defined in: protocols/fiat.ts:75

BuyOptions

Promise<FiatQuote>

IFiatProtocol.quoteBuy


quoteSell(_o): Promise<FiatQuote>

Defined in: protocols/fiat.ts:77

SellOptions

Promise<FiatQuote>

IFiatProtocol.quoteSell


protected requireSigningAccount(methodName): IWalletAccount

Defined in: protocols/base.ts:29

The account, narrowed to a signing one, or a ReadOnlyAccountError naming the caller.

string

IWalletAccount

ProtocolBase.requireSigningAccount


sell(_o): Promise<SellResult>

Defined in: protocols/fiat.ts:78

SellOptions

Promise<SellResult>

IFiatProtocol.sell