Onramp to Halliday Smart Account

Shown below is an example integration of onramp to the Halliday Smart Account. This flow should be used if you expect your users to not be authenticated before they onramp funds. Users would be prompted to log in to their Halliday Smart Account or create a Halliday Smart Account in this flow:

import { openHallidayOnramp } from "halliday-sdk";

// openHallidayOnramp will open a popup that begins the onramp flow.
  verifierClientId: "VERIFIER_CLIENT_ID",
  destinationBlockchainType: "DFK",
  destinationCryptoType: "JEWEL_DFK",
  // Optional. If not provided, the user's non-custodial wallet address will be used.
  inGamePlayerId: "in-game-player-id",
  // Optional, defaults to false. If set to true, will mint HallidayTestToken to the 
  // user's smart account on the destinationBlockchainType. 
  // If you set this to true, be sure to provide a sandbox API key above.
  useSandbox: false, 

Here, the openHallidayOnramp function takes in the following arguments:

apiKeystringYour Halliday API Key. Visit dashboard.halliday.xyz to create one!
verifierClientIdstringPlease contact [email protected] to receive this value.
destinationBlockchainTypestringThe destination blockchain of the token to onramp for.
destinationCryptoTypestringThe crypto type for the destination blockchain
inGamePlayerId (optional)stringThe userId for the player performing the onramp. If not specified, it will be set to the user's EOA/signer address
useSandbox (optional)booleanWhether to test onramp or perform a live onramp. If set to true, please use a sandbox Halliday API Key.