
Company News
Socket Named Top Sales Organization by RepVue
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.
@trikon_sdk/custom-paymaster-sdk
Advanced tools
The CustomPaymasterSDX is a Node.js SDK to interact with Trikon’s Paymaster Service, a backend service that provides Account Abstraction-powered features such as:
This SDK is intended for developers building smart account-based decentralized applications (dApps) that wish to offer seamless user experience with minimal wallet friction.
npm install node-fetch dotenv
You need to first login to https://trikon.io and create an account to get an API key, project id and dapp id. These will be used in further SDK methods.
const CustomPaymasterSDK = require("@trikon_sdk/custom-paymaster-sdk");
const sdk = new CustomPaymasterSDK({
apiKey: 'YOUR_API_KEY_HERE' // replace with actual Trikon API key
});
All methods return a Promise and must be called using await or .then().
testTrikonSDX()Purpose: To verify if the Trikon SDX system is up and responding.
await sdk.testTrikonSDX();
signUpAnonymous(data)Purpose: Registers a user anonymously.
await sdk.signUpAnonymous({
userName: 'testuser',
password: 'testpassword'
});
signInAnonymous(data)Purpose: Signs in an anonymous user and returns their session/token data.
await sdk.signInAnonymous({
userName: 'testuser',
password: 'testpassword',
projectId: 'your_project_id',
dappId: 'your_dapp_id'
});
getMultichainPortfolio(address)Purpose: Retrieves all ERC-20 and native token balances of a wallet across supported chains.
await sdk.getMultichainPortfolio('0xYourAddress');
getBalance(data)Purpose: Fetches the native token balance of a wallet on a specific chain.
await sdk.getBalance({
address: '0xYourAddress',
chainId: '0x89' // Polygon
});
getERC20Balance(data)Purpose: Returns the balance of a specific ERC-20 token for a wallet.
await sdk.getERC20Balance({
contractAddress: '0xdAC17F...', // token contract (e.g., USDT)
address: '0xYourAddress',
chainId: '0x1' // Ethereum mainnet
});
checkERC20ApprovalAmount(data)Purpose: Checks whether the token is approved for transfer to a spender contract.
await sdk.checkERC20ApprovalAmount({
contractAddress: '0xdAC17F...',
userAddress: '0xYourAddress',
spenderAddress: '0xSpenderContract',
chainId: '0x1'
});
approveERC20(data)Purpose: Approve the transfer of an ERC-20 token via smart account.
await sdk.approveERC20({
cfa: '0xYourSmartAccount',
toAddress: '0xRecipient',
valueInEther: '0.0001',
contractAddress: '0xTokenContract',
projectId: 'your_project_id',
chainId: '0xaa36a7'
});
estimateGasSendERC20Transfer(data)Purpose: Estimate the gas required to send an ERC-20 token via smart account.
await sdk.estimateGasSendERC20Transfer({
cfa: '0xYourSmartAccount',
toAddress: '0xRecipient',
valueInEther: '0.0001',
contractAddress: '0xTokenContract',
projectId: 'your_project_id',
chainId: '0xaa36a7'
});
sendERC20Transfer(data)Purpose: Executes the transfer of ERC-20 tokens using the Account Abstraction smart account.
await sdk.sendERC20Transfer({
toAddress: '0xRecipient',
projectId: 'your_project_id',
contractAddress: '0xTokenContract',
valueInEther: '0.0001',
chainId: '0xaa36a7',
cfa: '0xYourSmartAccount'
});
estimateGasSendNative(data)Purpose: Estimate the gas required to send native tokens (ETH, MATIC, etc.).
await sdk.estimateGasSendNative({
toAddress: '0xRecipient',
valueInEther: '0.00000001',
chainId: '0xaa36a7',
projectId: 'your_project_id',
cfa: '0xYourSmartAccount'
});
sendNative(data)Purpose: Sends native tokens from the smart account.
await sdk.sendNative({
toAddress: '0xRecipient',
valueInEther: '0.00000001',
chainId: '0xaa36a7',
projectId: 'your_project_id',
cfa: '0xYourSmartAccount'
});
getLifiRoutes(data)Purpose: Fetches token swap route options between two chains.
await sdk.getLifiRoutes({
fromAddress: '0xYourAddress',
fromChainId: 1,
toChainId: 137,
fromTokenAddress: '0xdAC17F...', // USDT
toTokenAddress: '0x0000000000000000000000000000000000000000', // MATIC
fromAmount: '1000000'
});
swapAssets(data)Purpose: Initiates a cross-chain token swap using LiFi tools (like StargateV2).
await sdk.swapAssets({
fromAddress: '0xYourAddress',
fromChain: 137,
fromToken: '0x0000000000000000000000000000000000000000',
toChain: 8453,
toToken: '0x0000000000000000000000000000000000000000',
fromAmount: '2000000000000',
selectedTool: 'stargateV2',
chainId: '0xaa36a7',
cfa: '0xYourSmartAccount'
});
x-api-key header.chainId should be in hexadecimal format (e.g., 0xaa36a7 for Sepolia).MIT © 2025 Trikon
If you have any questions or need help integrating the SDK, contact the Trikon team.
FAQs
Node.js SDK for Trikon OS APIs
We found that @trikon_sdk/custom-paymaster-sdk demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Company News
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.

Security News
NIST will stop enriching most CVEs under a new risk-based model, narrowing the NVD's scope as vulnerability submissions continue to surge.

Company News
/Security News
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.