1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5639],{18444:(e,t,n)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/dev/wallet",function(){return n(32714)}])},32714:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>r});var a=n(6029),l=n(30145),s=n(55729);function r(){let[e,t]=(0,s.useState)(null),[n,r]=(0,s.useState)(null),[c,o]=(0,s.useState)(!1);async function i(){let e=await l.Nv.enable({projectId:"1306a66f-f986-4bb6-9cb6-e0c8d1957158",networkId:0,appUrl:"http://localhost:3000/",baseUrl:"https://api.sparkscan.io/v1"});t(e),console.log("getUser",e.getUser())}async function u(){e&&console.log("transfer",await e.spark.transfer({receiverSparkAddress:"sprt1pgssy09wyvqz935grcknedkntl26thssm30j57t20n7rj6lu84pu4vykun0vfy",amountSats:80,walletType:"developer"}))}async function d(){if(e){o(!0);try{let t=await e.spark.getBalance();console.log("balance",t),r(t.balance.toString())}catch(e){console.error("getBalance error:",e),r("Error fetching balance")}finally{o(!1)}}}return(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("button",{type:"button",onClick:async()=>{await i()},children:"connectWallet"}),(0,a.jsx)("button",{type:"button",onClick:d,disabled:c,children:c?"Loading...":"getBalance"}),(0,a.jsx)("button",{type:"button",onClick:u,children:"signtx"}),n&&(0,a.jsxs)("div",{className:"rounded bg-gray-100 p-2",children:[(0,a.jsx)("strong",{children:"Balance:"})," ",n," sats"]})]})}}},e=>{e.O(0,[636,6593,8792],()=>e(e.s=18444)),_N_E=e.O()}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.