@ambolt/sdk
Client for Ambolt: dated, sourced data lookups as pay-per-call HTTP endpoints (x402, USDC on Base, Polygon or Solana). Failed calls are never charged.
import { wrapFetchWithPaymentFromConfig } from '@x402/fetch';
import { ExactEvmScheme } from '@x402/evm';
import { privateKeyToAccount } from 'viem/accounts';
import { createAmbolt } from '@ambolt/sdk';
const signer = privateKeyToAccount(process.env.EVM_PRIVATE_KEY);
const payFetch = wrapFetchWithPaymentFromConfig(fetch, { schemes: [{ network: 'eip155:8453', client: new ExactEvmScheme(signer) }] });
const ambolt = createAmbolt({ fetch: payFetch });
console.log(await ambolt.ibanValidate({ iban: 'DK5000400440116243' }));
console.log(await ambolt.dkElectricityPrices({ area: 'DK1' }));
console.log(await ambolt.call('lei-lookup', { name: 'Maersk' }));
The Solana swap API is free and needs no payment client: await ambolt.swap.quote({ inputMint, outputMint, amount }), ambolt.swap.build({ ..., taker }) returns an unsigned transaction that you sign with your own key, then ambolt.swap.execute({ signedTransaction, requestId }). Full flow with signing: https://ambolt.dev/docs/swap-api.
Every function is also an MCP tool at https://api.ambolt.dev/mcp. Not financial, legal or tax advice.