Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "tailwind-plus-icpay",
"version": "1.2.32",
"version": "1.2.33",
"private": true,
"packageManager": "pnpm@9.12.3",
"scripts": {
Expand Down
6 changes: 3 additions & 3 deletions src/app/sdk/page.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ try {

There are two common ways to pay: fixed token amount or USD amount automatically converted to tokens.

Primary input going forward is the token shortcode. Each verified token ledger exposes a unique, human‑readable `shortcode` (e.g. `ic_icp`, `base_usdcoin`). Prefer sending `tokenShortcode` instead of `symbol`/`ledgerCanisterId`/`chainId`. Legacy fields still work for backward compatibility but are deprecated.
Primary input going forward is the token shortcode. Each verified token ledger exposes a unique, human‑readable `shortcode` (e.g. `ic_icp`, `base_usdc`). Prefer sending `tokenShortcode` instead of `symbol`/`ledgerCanisterId`/`chainId`. Legacy fields still work for backward compatibility but are deprecated.

Note on chains:

Expand Down Expand Up @@ -267,8 +267,8 @@ const all = await icpay.getExternalWalletBalances({
network: 'evm', // 'evm' | 'ic'
address: '0xabc...', // or principal: 'aaaa-bbbb...'
amountUsd: 10, // optional: compute requiredAmount per ledger
chainShortcodes: ['base-sep'],// optional filter
tokenShortcodes: ['base_usdcoin'], // optional filter by token shortcode
chainShortcodes: ['base'],// optional filter
tokenShortcodes: ['base_usdc'], // optional filter by token shortcode
})
for (const b of all.balances) {
console.log(b.ledgerSymbol, b.formattedBalance, b.hasSufficientBalance)
Expand Down