← Public packages
@kentcdodds/wise
Call Wise profiles, balances, quotes, recipients, and transfers with wiseApiToken.
AGENTS.md
97 lines · 2.9 KB · Markdown@kentcdodds/wise — agent notes
Human setup and intent live in README.md. This file is for agents: imports,
smoke checks, dry-run snippets, and edge cases. Secrets by name only — never
paste token values.
Secret
- Name:
wiseApiToken(user scope) - Host:
api.wise.com - Save URL:
https://kody.codes/account/secrets/new?name=wiseApiToken&allowedHosts=api.wise.com&scope=user
Import paths
| Export | Import |
|---|---|
| list profiles | kody:@kentcdodds/wise/list-profiles |
| list balances | kody:@kentcdodds/wise/list-balances |
| list recipients | kody:@kentcdodds/wise/list-recipients |
| list transfers | kody:@kentcdodds/wise/list-transfers |
| get transfer | kody:@kentcdodds/wise/get-transfer |
| create quote | kody:@kentcdodds/wise/create-quote |
| smoke test | kody:@kentcdodds/wise/smoke-test |
Prefer named exports over the package root.
Smoke test (read-only)
After wiseApiToken is saved and the host is approved:
import smokeTest from 'kody:@kentcdodds/wise/smoke-test'
export default async function main() {
return await smokeTest()
// => { ok: true, profileCount, profiles, businessProfileId, balanceCount, balancesSample }
}Lighter read-only checks:
import listProfiles from 'kody:@kentcdodds/wise/list-profiles'
export default async function main() {
return await listProfiles()
}import listBalances from 'kody:@kentcdodds/wise/list-balances'
export default async function main() {
return await listBalances({ profileType: 'business' })
}dryRun / confirm (mutations)
Only create-quote writes. Always prefer dry-run first:
import createQuote from 'kody:@kentcdodds/wise/create-quote'
export default async function main() {
return await createQuote({
sourceCurrency: 'USD',
targetCurrency: 'EUR',
sourceAmount: 100,
dryRun: true,
})
}Live quote requires confirm: true (and exactly one of sourceAmount or
targetAmount). Do not fund or execute transfers — out of package scope.
Edge cases
- When
profileIdis omitted, helpers resolve viaprofileType(defaultbusiness). PassprofileType: 'personal'when needed. - Smoke test lists balances only for the first business profile; personal-only
tokens get
businessProfileId: nulland empty balances. create-quotethrows if both or neither amount fields are set, or if neitherdryRunnorconfirm: trueis passed.- Not for “share my Wise ID” flows — that is usually the account email.
Fork / setup for agents
- Fork or clone this package into the caller's account if they need their own token wiring.
- Ensure secret
wiseApiTokenexists with hostapi.wise.comapproved (and any pending package secret approvals cleared). - Run
./smoke-testvia static import fromexecutebefore treating the package as ready. - Keep branding assets in
brand/,icon.svg, andcommunity-icon.svgunchanged unless deliberately updating official artwork.