@privy-io/js-sdk-core
Version:
Vanilla JS client for the Privy Auth API
2 lines (1 loc) • 453 B
JavaScript
import a from"canonicalize";import{WalletUpdate as i}from"@privy-io/public-api";async function e(e,{wallet_id:r},t,o){let p={version:1,url:e.getCompiledPath(i,{params:{wallet_id:r}}),method:i.method,headers:{"privy-app-id":e.app.appId},body:o},d=Buffer.from(a(p)).toString("base64"),{signature:l}=await t({message:d});return await e.fetchPrivyRoute(i,{params:{wallet_id:r},body:o,headers:{"privy-authorization-signature":l}})}export{e as updateWallet};