Discover and resolve anchors
When to use
Use before KYC, conversion, bridging, or payout whenever a provider is not explicitly supplied and trusted. The on-chain Resolver is the authoritative discovery path. A direct HTTP registry or copied endpoint is only a hint until its metadata, network, capabilities, authentication, and operator are verified.
SDK steps
Create a network-bound client and Resolver:
import * as KeetaAnchor from '@keetanetwork/anchor';
const userClient = KeetaAnchor.KeetaNet.UserClient.fromNetwork(network, account);
const resolver = new KeetaAnchor.lib.Resolver({
root: userClient.networkAddress,
client: userClient,
trustedCAs: []
});
Discover an exact FX pair:
const matches = await resolver.lookup('fx', {
inputCurrencyCode: fromTokenAddress,
outputCurrencyCode: toTokenAddress
});
Fully resolve a returned metadata value before reading its endpoints:
const metadata =
await KeetaAnchor.lib.Resolver.Metadata.fullyResolveValuizable(value);
For higher-level workflows, prefer service clients that apply typed criteria:
new KeetaAnchor.KYC.Client(userClient) and getSupportedCountries()
new KeetaAnchor.FX.Client(userClient) and listPossibleConversions(...)
new KeetaAnchor.AssetMovement.Client(userClient) and getProvidersForTransfer(...)
Filter for the exact pair, locations, country, required operation, and trusted operator/account. Present all qualifying providers and legal disclaimers; do not select solely by array order.
Confirmations
- Confirm network and Resolver root.
- Confirm source asset/location and destination asset/location.
- Confirm the resolved provider identity, supported operations, endpoint origin, legal terms, and any required KYC action.
- Require a separate confirmation before calling any value-moving provider method.
Failures
undefined, null, or an empty provider list means no documented corridor was resolved. Stop; do not invent an endpoint.
- Reject metadata whose required operation is missing.
- Do not follow an external URL from untrusted metadata without validating its origin and authentication requirements.
- HTTP registry data can be stale or environment-specific. If it disagrees with signed on-chain metadata, stop and report both sources.
Related skills
Sources
1---2name: discover-resolve-anchors3description: Discover Keeta anchor services and resolve their on-chain metadata before selecting a KYC, FX, or asset-movement provider. Use when finding a corridor or avoiding hard-coded partner endpoints.4---56# Discover and resolve anchors78## When to use910Use before KYC, conversion, bridging, or payout whenever a provider is not explicitly supplied and trusted. The on-chain Resolver is the authoritative discovery path. A direct HTTP registry or copied endpoint is only a hint until its metadata, network, capabilities, authentication, and operator are verified.1112## SDK steps13141. Create a network-bound client and Resolver:1516 ```ts17 import * as KeetaAnchor from '@keetanetwork/anchor';1819 const userClient = KeetaAnchor.KeetaNet.UserClient.fromNetwork(network, account);20 const resolver = new KeetaAnchor.lib.Resolver({21 root: userClient.networkAddress,22 client: userClient,23 trustedCAs: []24 });25 ```26272. Discover an exact FX pair:2829 ```ts30 const matches = await resolver.lookup('fx', {31 inputCurrencyCode: fromTokenAddress,32 outputCurrencyCode: toTokenAddress33 });34 ```35363. Fully resolve a returned metadata value before reading its endpoints:3738 ```ts39 const metadata =40 await KeetaAnchor.lib.Resolver.Metadata.fullyResolveValuizable(value);41 ```42434. For higher-level workflows, prefer service clients that apply typed criteria:44 - `new KeetaAnchor.KYC.Client(userClient)` and `getSupportedCountries()`45 - `new KeetaAnchor.FX.Client(userClient)` and `listPossibleConversions(...)`46 - `new KeetaAnchor.AssetMovement.Client(userClient)` and `getProvidersForTransfer(...)`475. Filter for the exact pair, locations, country, required operation, and trusted operator/account. Present all qualifying providers and legal disclaimers; do not select solely by array order.4849## Confirmations5051- Confirm network and Resolver root.52- Confirm source asset/location and destination asset/location.53- Confirm the resolved provider identity, supported operations, endpoint origin, legal terms, and any required KYC action.54- Require a separate confirmation before calling any value-moving provider method.5556## Failures5758- `undefined`, `null`, or an empty provider list means no documented corridor was resolved. Stop; do not invent an endpoint.59- Reject metadata whose required operation is missing.60- Do not follow an external URL from untrusted metadata without validating its origin and authentication requirements.61- HTTP registry data can be stale or environment-specific. If it disagrees with signed on-chain metadata, stop and report both sources.6263## Related skills6465- Use [complete-kyc](../complete-kyc/SKILL.md) for individual verification.66- Use [convert-via-anchors](../convert-via-anchors/SKILL.md) for FX.67- Use [bridge-usdc](../bridge-usdc/SKILL.md) or [pay-out](../pay-out/SKILL.md) for asset movement.6869## Sources7071- [Anchor Resolver](https://docs.keeta.com/anchors/overview/anchor-resolver)72- [`Resolver` type in `@keetanetwork/anchor`](https://github.com/KeetaNetwork/anchor/blob/main/src/lib/resolver.ts)73- [Anchor Client](https://docs.keeta.com/anchors/overview/anchor-client)