Test Your Integration on a Testnet Using a Sandbox API Key
To test your integration, you can leverage a Halliday sandbox API key to create accounts and issue transactions on a test network like Goerli, Sepolia, Polygon Mumbai, Arbitrum Goerli, and more.
To route all of the SDK requests to the Halliday sandbox servers, be sure to set sandbox = true
. Be sure to also specify a testnet BlockchainType
for transactions to not spend actual funds.
Here's an example:
import {Halliday, BlockchainType} from "halliday-sdk";
// Initialize the Halliday client.
const hallidayClient = new Halliday(
"<YOUR_API_KEY>",
BlockchainType.OPTIMISM_GOERLI, // Specifying blockchainType is optional - defaults to Mumbai
true // This is an optional argument that makes the SDK interact with our sandbox environment
);
The last argument sets the Halliday client to sandbox mode. The constructor has the following parameters:
Name | Type | Description |
---|---|---|
apiKey | string | API key for Halliday |
blockchainType | BlockchainType | Blockchain of the Halliday Smart Account |
sandbox | boolean | Optional argument to use sandbox API. Defaults to false. |
All subsequent account creations and transactions will now occur on test networks
Current Supported Testnets |
---|
MUMBAI |
OPTIMISM_GOERLI |
ARBITRUM_GOERLI |
BASE_GOERLI |
DFK_TESTNET |
Updated 4 days ago