Basic Examples
Creating a TipLink
import { TipLink } from '@tiplink/api';
TipLink.create().then(tiplink => {
console.log("link: ", tiplink.url.toString());
console.log("publicKey: ", tiplink.keypair.publicKey.toBase58());
return tiplink;
});
Getting a keypair from a TipLink link
import { TipLink } from '@tiplink/api';
const tp = 'https://tiplink.io/i#5jC3aFcBJR4g4BQ5D';
TipLink.fromLink(tp).then(tiplink => {
console.log("converted publicKey: ", tiplink.keypair.publicKey.toBase58());
return tiplink;
});