Appearance
Testing
SDK Testing
The SDK provides a dedicated test $holytag, $SDKTEST, that lets you run the full off-ramp flow — including wallet signing, smart contract interactions, and on-chain transactions — without any real fiat movement.
Funds from test transactions are not retrievable
Tokens sent to $SDKTEST cannot be recovered. Use small amounts (under $0.10) on low-fee networks. Do not send significant value to this tag.
The $SDKTEST holytag
$SDKTEST is a special off-ramp recipient with the following properties:
| Property | Behavior |
|---|---|
| Minimum amount | No minimum (unlike regular $holytags) |
| Fiat movement | None — no EUR is credited anywhere |
| On-chain transaction | Executed normally on the selected network |
| Smart contract interaction | Same as production |
onHashGenerate callback | Fires as normal with the real transaction hash |
Any call to getTagInfo('SDKTEST') returns { found: true }, so your validation code works identically to production.
Recommended test setup
For the lowest gas cost, use one of these networks with USDC (6 decimals):
| Network | Reason |
|---|---|
| Arbitrum | Low fees, fast confirmation, widely supported |
| Polygon | Very low fees |
| Avalanche | Low fees |
| Solana | Near-zero fees |
Avoid Ethereum mainnet for testing — gas costs are disproportionate for the tiny amounts involved.
Step-by-step test checklist
Follow these steps to validate your off-ramp integration end-to-end:
1. Initialize the SDK
typescript
import HolyheldSDK from '@holyheld/sdk';
const holyheldSDK = new HolyheldSDK({
apiKey: process.env.HOLYHELD_SDK_API_KEY, // your real SDK API key
logger: true, // enable logging during testing
});
await holyheldSDK.init();2. Confirm off-ramp is enabled
typescript
const settings = await holyheldSDK.getServerSettings();
console.assert(settings.external.isTopupEnabled, 'Off-ramp must be enabled');
console.log('Min EUR:', settings.external.minTopUpAmountInEUR);
console.log('Max EUR:', settings.external.maxTopUpAmountInEUR);3. Validate the test $holytag
typescript
const tagInfo = await holyheldSDK.getTagInfo('SDKTEST');
console.assert(tagInfo.found === true, 'SDKTEST tag must be found');4. Get a conversion quote
Use a small amount — less than $0.10 worth of the token:
typescript
import { Network } from '@holyheld/sdk';
const quote = await holyheldSDK.evm.offRamp.convertTokenToEUR({
walletAddress: '0xYOUR_WALLET_ADDRESS',
tokenAddress: '0xFF970A61A04b1cA14834A43f5dE4533eBDDB5CC2', // USDC on Arbitrum
tokenDecimals: 6,
amount: '0.05', // 0.05 USDC ≈ ~$0.05
network: Network.arbitrum,
});
console.log('Quote:', quote.EURAmount, 'EUR for', quote.tokenAmount, 'tokens');5. Execute the off-ramp to $SDKTEST
typescript
await holyheldSDK.evm.offRamp.topup({
publicClient,
walletClient,
walletAddress: '0xYOUR_WALLET_ADDRESS',
tokenAddress: '0xFF970A61A04b1cA14834A43f5dE4533eBDDB5CC2',
tokenNetwork: Network.arbitrum,
tokenAmount: quote.tokenAmount,
transferData: quote.transferData,
holytag: 'SDKTEST',
supportsSignTypedDataV4: true,
eventConfig: {
onStepChange: (step) => console.log('Step:', step),
onHashGenerate: (hash) => console.log('✓ Transaction hash available:', hash),
},
});6. Verify onHashGenerate fires
The test is successful when onHashGenerate fires with a real transaction hash and the topup call resolves successfully.
Testing on-ramp
On-ramp testing requires a real Holyheld mobile app connected to your wallet. The test flow is the same as production — requestOnRamp creates a request, and the user confirms it in the app. There is no simulated confirmation available; you must use a real device.
Use the SDK API key from your development environment and small EUR amounts for on-ramp testing.
