Usage
Returns
Parameters
channelAddress
- type:
string
to
- type:
string
tokenId
- type:
bigint
amount
- type:
bigint
mintReferral (optional)
- type:
string
data (optional)
- type:
string
transactionOverrides (optional)
- type:
TransactionOverrides
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Sponsor a token intent with ETH.
import { uplinkClient } from './config'
const signedIntent = { ... }
const { event } = await uplinkClient.sponsorTokenWithETH({
channelAddress: '0x123...',
sponsoredToken: signedIntent,
to: '0x123...',
amount: 1n,
mintReferral: '0x123...',
data: '0x00..',
})
import { TransmissionsClient } from '@tx-kit/sdk'
import { CreatePublicClient, CreateWalletClient } from 'viem'
import { base } from 'viem/chains'
const publicClient = createPublicClient({
chain: base,
transport: http()
})
const walletClient = createWalletClient({
account, // from local private key or browser wallet
chain: base,
transport: http()
})
export const { uplinkClient } = new TransmissionsClient({
publicClient,
walletClient,
chain: base
})
{
tokenId: bigint, // the token ID of the newly created token
event: Log
}
stringconst { event } = await uplinkClient.sponsorTokenWithETH({
channelAddress: '0x1234567890123456789012345678901234567890',
...
})
stringconst { event } = await uplinkClient.sponsorTokenWithETH({
to: '0x1234567890123456789012345678901234567890',
...
})
bigintconst { event } = await uplinkClient.sponsorTokenWithETH({
tokenId: 1n,
...
})
bigintconst { event } = await uplinkClient.sponsorTokenWithETH({
amount: 1n,
...
})
stringconst { event } = await uplinkClient.sponsorTokenWithETH({
mintReferral: '0x1234567890123456789012345678901234567890',
...
})
stringconst { event } = await uplinkClient.sponsorTokenWithETH
({
data: '0x00...',
...
})
TransactionOverridestype TransactionOverrides = {
accessList?: AccessList
gas?: bigint
maxFeePerGas?: bigint
maxPriorityFeePerGas?: bigint
nonce?: number
value?: bigint
}
const { event } = await uplinkClient.sponsorTokenWithETH({
...
transactionOverrides: {
value: parseEther('0.000666')
}
})
const { address, data } = await uplinkClient.calldata.sponsorTokenWithETH({...})
{
address: string, // address of the target contract
data: string // calldata for the transaction
}
const gas = await uplinkClient.estimateGas.sponsorTokenWithETH({...})
bigint // gas estimate in wei