Resolve a target
Use the Core SDK to resolve a target.
client.targets.resolve
Use the Core SDK to resolve a target.
Limited availability
Only some variants of this operation are implemented. Check the limitations before integrating it.
Import and client prerequisite
import { createCapxulClient } from "@capxul/sdk";
const created = await createCapxulClient({
publishableKey: "cap_pk_…",
});
if (!created.ok) throw created.error;
const client = created.value;Usage
declare const reference: TargetReference;
const result = await client.targets.resolve(reference);
if (!result.ok) {
console.error(result.error.code);
return;
}
console.log(result.value);Signature
client.targets.resolve(reference: TargetReference, options?: { readonly signal?: AbortSignal; }): Promise<CapxulResult<ResolvedTarget>>;Source: packages/sdk/src/surface/money.ts:125.
Parameters
reference
Required.
TargetReference;options
Optional.
{ readonly signal?: AbortSignal; } | undefinedReturns
Promise<CapxulResult<ResolvedTarget>>;Read the ok discriminant before accessing value or error.
Errors
Expected failures resolve as { ok: false, error: CapxulError }; they are not thrown as the normal domain contract. Branch on result.ok and use the stable error.code. A pre-aborted AbortSignal returns a CANCELLED failure. Provider messages and internal causes are not public contracts.
Availability and evidence
Limited availability. Evidence classification: shipped-proven.
shipped-proven at the typed or hermetic Core SDK contract boundary. Implemented target resolution has partial branches. A destination reference and relevant capxulUserId forms currently return NOT_IMPLEMENTED.
Related
- No dedicated React SDK hook currently projects this method.
- Platform capability matrix
- Core SDK scaffold inventory
- Result and proof boundaries