@halliday-sdk/client
v1.1.0-beta-2
Published
## Client Library
Keywords
Readme
Halliday Client
Client Library
The Halliday client library allows you to use the Halliday API without any dependencies on the browser. You can import the client library like so:
import { HallidayClient } from '@halliday-sdk/client'Usage
First, construct a new client using your apiKey and initialize it:
const client = await HallidayClient.create({ apiKey })If you want to test using testnets, you can pass in a sandbox key.
To get the list of supported tokens:
const tokens = await client.getSupportedTokens()To get the list of supported fiat currencies:
const fiatCurrencies = await client.getSupportedFiatCurrencies()To get the list of supported countries:
const countries = await client.getSupportedCountries()To request a quote for a limited set of providers:
const quote = await client.getOnrampQuote({
fiatType: 'USD',
fiatAmount,
chainId,
tokenAddress,
ipAddress,
onrampProviders: ['MOONPAY'],
})