Proven AppDocs
Docs/SDK

Payment links

Build and parse claim and request links.

ts
const secret = newLinkSecret();
const url = buildClaimLink({
  secret, block, token, amount,
  message: "Happy birthday!", locked: false, shares: 1,
});

Everything sits after the #, so servers never see it. Parse a link with parseClaimLink(url).

Send the amount to the link's address:

ts
const keys = linkKeys(secret, passcode);
const to = linkAddress(keys);
await priv.send(token, to, amount);

#Claim

ts
await priv.sweep(token, to, onStatus, { one: true });

sweep empties a balance in one relayed call to a proven: or 0x address, with no gas needed. one takes a single share of a split link.

ts
const url = buildRequestLink({ to, token, amount, note, name });
const parsed = parseRequestLink(url);

A request link asks to be paid HYPE or USDC to a proven: or 0x address.