Appearance
convertEURToToken (On-Ramp)
This method returns a calculated token amount to match requested EUR amount.
Usage
typescript
import { Network } from '@holyheld/sdk';
const data = await holyheldSDK.evm.onRamp.convertEURToToken({
tokenAddress: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48',
tokenNetwork: Network.ethereum,
amount: '11.11',
});Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
tokenAddress | string | Yes | Contract address of the token to receive. |
tokenNetwork | Network | Yes | The chain the token will arrive on. |
amount | string | Yes | EUR amount to convert, as a decimal string. |
Token Address
Address of the token
- Type:
string
typescript
import { Network } from '@holyheld/sdk';
const data = await holyheldSDK.evm.onRamp.convertEURToToken({
tokenAddress: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48',
tokenNetwork: Network.ethereum,
amount: '11.11',
});Token Network
Token's network
- Type:
Network
typescript
import { Network } from '@holyheld/sdk';
const data = await holyheldSDK.evm.onRamp.convertEURToToken({
tokenAddress: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48',
tokenNetwork: Network.ethereum,
amount: '11.11',
});Amount
EUR amount
- Type:
String
typescript
import { Network } from '@holyheld/sdk';
const data = await holyheldSDK.evm.onRamp.convertEURToToken({
tokenAddress: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48',
tokenNetwork: Network.ethereum,
amount: '11.11'
});Returns
- Type:
String
Token amount equivalent to the given EUR input, as a decimal string (e.g. "10.47").
