@tuwaio/quasar-sdk 0.7.3 → 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +113 -19
- package/dist/checkout.cjs +1 -0
- package/dist/checkout.d.cts +1451 -0
- package/dist/checkout.d.ts +1451 -0
- package/dist/checkout.js +1 -0
- package/dist/{chunk-7EJ6DS4C.cjs → chunk-2LAAWGEK.cjs} +2 -2
- package/dist/chunk-KLHEH7HS.js +1 -0
- package/dist/chunk-LGJMFD5H.cjs +1 -0
- package/dist/chunk-ZSO6HC5H.js +2 -0
- package/dist/cli.cjs +28 -9
- package/dist/errors-4kLHVSws.d.cts +1040 -0
- package/dist/errors-4kLHVSws.d.ts +1040 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +619 -85
- package/dist/index.d.ts +619 -85
- package/dist/index.js +1 -1
- package/dist/pulsar.cjs +1 -0
- package/dist/pulsar.d.cts +50 -0
- package/dist/pulsar.d.ts +50 -0
- package/dist/pulsar.js +1 -0
- package/dist/react.cjs +1 -1
- package/dist/react.js +1 -1
- package/package.json +28 -9
- package/dist/chunk-MK6C4P3O.js +0 -2
package/dist/checkout.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {a,b}from'./chunk-KLHEH7HS.js';import {a as a$1}from'./chunk-ZSO6HC5H.js';import {createStore}from'zustand/vanilla';import {ofetch}from'ofetch';function _e(){try{return globalThis.sessionStorage??null}catch{return null}}function ln(e){return async(...s)=>{try{return await e(...s)}catch(c){if(!(c instanceof a)||!c.code)throw c;return {refused:{code:c.code,message:c.message,status:c.status}}}}}var Ae="quasar-sdk:refundHandOvers",gt=5*6e4,St=3e4,kt=new Set([401,403,408,425,429]),_t=({status:e})=>e!==void 0&&e>=400&&e<500&&!kt.has(e);function X(e){if(e&&typeof e=="object"&&"refused"in e)throw Object.assign(new Error(e.refused.message),e.refused);return e}function Z(e){if(e instanceof a){let c=e.details?.invoice;return {code:e.code??"request_failed",message:e.message,status:e.status,issues:e.issues,...typeof c=="string"?{otherInvoice:c}:{}}}let s=e;return {code:typeof s?.code=="string"?s.code:"request_failed",message:e instanceof Error?e.message:String(e),...typeof s?.status=="number"&&{status:s.status},...typeof s?.text=="string"&&{text:s.text}}}function dn(e){let s=e.pollMs??5e3,c=null,y=e.handOverStorage!==void 0?e.handOverStorage:_e(),S=()=>{c&&clearTimeout(c),c=null;},v=()=>{try{let g=JSON.parse(y?.getItem(Ae)??"[]");return Array.isArray(g)?g:[]}catch{return []}},O=g=>{try{g.length>0?y?.setItem(Ae,JSON.stringify(g)):y?.removeItem(Ae);}catch{}},M=g=>O(v().filter(C=>C.refundId!==g));return createStore()((g,C)=>{let L=l=>{S();let m=Date.now(),P=()=>{let T=Date.now()-m<gt?s:Math.max(s,St),E=setTimeout(()=>{e.get(l).then(X).then(b=>{c!==E||C().refund?.id!==l||(b.status==="confirmed"||b.status==="failed"?(S(),g({refund:b,phase:b.status})):(g({refund:b}),P()));},b=>{if(c!==E)return;let{status:U}=Z(b);U===401||U===403||U===404?S():P();});},T);c=E;};P();};return {phase:"idle",refund:null,instructions:null,error:null,sentTransaction:null,preview:async(l,m={})=>{if(g({error:null}),!e.preview)return null;try{return X(await e.preview(l,m))}catch(P){return g({error:Z(P)}),null}},start:async(l,m={})=>{S(),g({phase:"requesting",error:null,refund:null,instructions:null,sentTransaction:null});let P=v().find(T=>T.invoiceId===l);if(P)try{let T=X(await e.get(P.refundId));if(T.status==="requested"){let{txHash:E,from:b,instructions:U}=P;return g({phase:"awaitingTransfer",refund:T,instructions:U,sentTransaction:{txHash:E,from:b}}),!0}if(M(P.refundId),T.status==="submitted")return g({phase:"confirming",refund:T}),L(T.id),!0}catch(T){let E=Z(T);if(E.status!==404)return g({phase:"idle",error:E}),false;M(P.refundId);}try{let{refund:T,instructions:E}=X(await e.request(l,m));return g({phase:"awaitingTransfer",refund:T,instructions:E}),!0}catch(T){return g({phase:"idle",error:Z(T)}),false}},resume:(l,m)=>{S();let P=v().find(E=>E.refundId===l.id),T=P?{txHash:P.txHash,from:P.from}:C().refund?.id===l.id?C().sentTransaction:null;g({phase:"awaitingTransfer",refund:l,instructions:m,error:null,sentTransaction:T});},recheck:async()=>{let l=C().refund;if(!l)return false;try{let m=X(await e.get(l.id));if(C().refund?.id!==l.id)return !1;if(m.status==="requested"){let P=C().instructions;return P&&m.cryptoAmount&&m.cryptoAmount!==P.amount&&!C().sentTransaction?(g({refund:m,instructions:{...P,amount:m.cryptoAmount},error:{code:"refund_repriced",message:"Quasar priced this refund again: check the new amount"}}),!1):(g({refund:m,error:null}),!C().sentTransaction)}return M(l.id),m.status==="submitted"?(g({phase:"confirming",refund:m,error:null,sentTransaction:null}),L(l.id)):g({phase:m.status,refund:m,error:null,sentTransaction:null}),!1}catch(m){return g({error:Z(m)}),false}},submit:async l=>{let m=C().refund;if(!m)return g({error:{code:"refund_required",message:"Ask for the refund first"}}),false;let P={txHash:l.txHash,from:l.from},T=C().instructions;T&&O([...v().filter(E=>E.refundId!==m.id),{refundId:m.id,invoiceId:m.invoiceId,instructions:T,...P}]),g({phase:"submitting",error:null,sentTransaction:P});try{let E=X(await e.submit(m.id,l));return M(m.id),g({phase:"confirming",refund:E,sentTransaction:null}),L(m.id),!0}catch(E){let b=Z(E);return _t(b)?(M(m.id),g({phase:"awaitingTransfer",error:b,sentTransaction:null})):g({phase:"awaitingTransfer",error:b}),false}},stopFollowing:S,keepFollowing:()=>{let{phase:l,refund:m}=C();l==="confirming"&&m&&!c&&L(m.id);},reset:()=>{S(),g({phase:"idle",refund:null,instructions:null,error:null,sentTransaction:null});}}})}var wt=45e3,vt=9e4,Qe=(e,s="")=>`/v1/payments/checkout/${encodeURIComponent(e)}${s?`/${s}`:""}`;function Ge(e,s=a$1){let c=async(y,S,v=wt)=>{try{return await ofetch(Qe(e,y),{baseURL:s,method:S?"POST":"GET",timeout:v,...S?{body:S}:{}})}catch(O){throw b(O)}};return {view:()=>c(""),quote:y=>c("quote",y),payerProofMessage:y=>c("payer-proof/message",y),payerProof:y=>c("payer-proof",y),buyer:y=>c("buyer",y),locale:y=>c("locale",{locale:y}),submit:async({methodId:y,...S})=>{if(!y)return c("submit",S);try{return await c("submit",{...S,methodId:y})}catch(v){if(!(v instanceof a)||v.status!==400)throw v;return c("submit",S)}},relay:y=>c("relay",{signature:y},vt),permission:y=>c("permission",y),permissionRevoked:()=>c("permission/revoked",{}),url:y=>`${s.replace(/\/+$/,"")}${Qe(e,y)}`}}var st=new Set(["paid","held","expired","cancelled","refunded","partially_refunded"]),ee=new Set(["paid","held","refunded","partially_refunded"]),Ke=new Set(["open","processing","underpaid","expired","cancelled"]),D=new Set(["expired","cancelled"]),V=new Set(["open","processing","underpaid"]),Pe=new Set(["loading","selectMethod","awaitingPayment","underpaid","unconfirmed"]),Et=25*6e4,Rt=35*6e4,Ct=35*6e4,xt=60*6e4,Be=2e4,Ot=3*6e4,bt=45e3,It=1e4,Ve=(e,s)=>e===s||Date.parse(e??"")===Date.parse(s??""),At=new Set(["quoting","submitting"]),Ye=new Set(["checkout_not_found","origin_not_allowed","payments_disabled"]),Kt=new Set(["nonce_spent_unexplained","no_matching_transfer","reference_missing","too_early","tx_already_used","payer_mismatch","payer_unconfirmed","already_paid","quote_changed","too_many_parts","too_many_transfers","below_minimum","native_from_contract_unverifiable","invoice_not_payable","settlement_failed"]),qe="settlement_failed",de="nonce_spent_unexplained",Te="tx_already_used",at="too_many_payments",Mt=[6e4,5*6e4,15*6e4],it=new Set(["timeout","not_found","replaced","nonce_spent"]),qt="quasar-sdk:checkoutHandOvers:",Lt=new Set(["payer_mismatch","payer_unconfirmed"]),Ut="reference_missing",Nt="quote_changed",ut=new Set(["eoa","authorization"]);function ve(e){let[s,c,y,...S]=e.split(":");return !s||!c||!y||S.length>0?null:{namespace:s,chainId:`${s}:${c}`,address:s==="eip155"?y.toLowerCase():y}}var $e="The wallet did not sign the confirmation. It is free and moves no funds: sign it to pay from this wallet, or choose another wallet or method.",Dt=new Set(["payer_chain_mismatch","too_many_payers","native_from_contract","payer_blocked","payer_not_expected"]);function Ht(e){let s=e?.code;return s!==void 0&&(s.startsWith("payer_proof_")||Dt.has(s))}function Wt(e,s){let c=ve(s);return c?e.some(y=>{let S=ve(y.payer);return !S||S.namespace!==c.namespace||S.address!==c.address?false:y.kind&&ut.has(y.kind)||y.chainId===c.chainId}):false}var Je=[2e3,4e3,8e3,16e3,3e4],Ft=60*6e4,jt=new Set(["too_many_pending"]),ze=e=>e instanceof a&&e.code==="too_many_payments",Xe=e=>e instanceof a&&e.code===Te;function Ze(e){if(!(e instanceof a)||e.code&&jt.has(e.code))return true;let{status:s}=e;return s===void 0||s===408||s===429||s>=500}var Q=e=>e.startsWith("0x")||e.startsWith("0X")?e.toLowerCase():e;function et(e){return e.rejectedPayments?e.rejectedPayments.map(({txKey:s,original:c,userOpHash:y,reason:S,final:v,movedMoney:O,rechecked:M,held:g,otherInvoice:C})=>({keys:[s,c,y].filter(L=>!!L).map(Q),reason:S,final:v,movedMoney:O===true||Kt.has(S),rechecked:M===true,held:g===true,...typeof C=="string"?{otherInvoice:C}:{}})):e.rejectedTxKeys?.map(s=>({keys:[Q(s)],final:true}))??null}var Qt=(e,s)=>e!==null&&!(Date.parse(e.expiresAt??"")<=s),Gt=new Set([...st,"underpaid"]),Bt=new Set(["quoting","awaitingPayment","submitting","confirming","unconfirmed"]);function j(e){switch(e){case "processing":return "confirming";case "paid":case "partially_refunded":return "paid";case "refunded":case "underpaid":case "held":case "expired":return e;case "cancelled":return "cancelled";default:return "selectMethod"}}function tt(e,s){if(e.invoice.status!=="open")return j(e.invoice.status);if(e.buyer.required)return "buyer";let c=e.quote?.expiresAt?Date.parse(e.quote.expiresAt):Number.NaN;return e.quote&&!(c<=s)?"awaitingPayment":"selectMethod"}var nt={payer_blocked:"blocked",payer_not_expected:"blocked",buyer_required:"buyer",invoice_expired:"expired",invoice_processing:"confirming",payment_on_its_way:"confirming",payer_mismatch:"underpaid",rest_method_mismatch:"underpaid",too_many_payments:"selectMethod"},Vt=new Set(["invoice_expired","invoice_processing","payment_on_its_way"]);function Y(e){return {...Jt(e),...$t(e)}}var Yt=new Set(["reverted"]);function $t(e){let s=e.keys?.[0];return s?e.movedMoney||e.reason!==void 0&&Yt.has(e.reason)?{txKey:s}:{}:{}}function Jt(e){let s=e.reason?{reason:e.reason}:{};if(e.reason===qe)return Zt(e.rechecked);if(e.reason===de)return e.otherInvoice?le():ct(e.keys?.[0]);if(e.reason===Nt)return {code:"payment_mismatch",message:"This payment was sent or charged under an earlier price of this invoice, so it does not pay it. The merchant holds it to return it to the wallet that sent it, and the invoice can still be paid.",...s,held:true};if(e.reason==="too_many_parts")return {code:"payment_mismatch",message:"This invoice has taken as many parts as it can, so this transfer does not pay it. The merchant holds it to return it to the wallet that sent it; send the whole rest at once.",...s,held:true};if(e.reason&&Lt.has(e.reason))return {code:"payment_mismatch",message:e.held?"This transaction came from a wallet that did not confirm this invoice, so it does not pay it. The merchant returns it to the wallet that sent it, and the invoice can still be paid from the wallet that confirmed it.":"This transaction came from a wallet that did not confirm this invoice, so it does not pay it. If money left your wallet, contact the merchant.",...s,...e.held?{held:true}:{}};if(e.reason===Ut&&e.held)return {code:"payment_mismatch",message:"This transfer arrived without the Solana Pay reference of this invoice, and its amount alone does not tie it to the invoice, so it does not pay it. The merchant returns it to the wallet that sent it, and the invoice can still be paid.",...s,held:true};let c=e.otherInvoice?{otherInvoice:e.otherInvoice}:{};return e.held?{code:"payment_mismatch",message:"This transaction is tied to another invoice, which holds it for a refund to the wallet that sent it. It does not count for this invoice. If it was your payment for this invoice, contact the merchant.",...s,held:true,...c}:e.movedMoney?{...c,code:"payment_mismatch",message:"This transaction does not pay the invoice. If money left your wallet, contact the merchant.",...s}:e.final?{code:"payment_failed",message:"The payment did not go through. Try again.",...s}:le(e.reason,e.rechecked)}function le(e,s=false){return {code:"payment_unconfirmed",message:s?"The payment is not confirmed yet; Quasar checks it again for up to 24 hours. Check your wallet before paying again.":e?"The payment could not be confirmed. If it left your wallet, contact the merchant with the transaction hash.":"The payment could not be confirmed. Check your wallet before paying again.",...e?{reason:e}:{},...s?{rechecked:true}:{}}}var zt=()=>({code:"payment_unconfirmed",message:"The payment has not reached Quasar yet; this page keeps handing it over. Check your wallet before paying again.",reason:"submit_retrying"}),Xt=()=>({code:"payment_unconfirmed",message:"This invoice takes no more payments, and Quasar does not follow this one. If it left your wallet, contact the merchant with the transaction hash.",reason:at}),we=()=>({code:"payment_unconfirmed",message:"Quasar did not receive the payment. If it left your wallet, contact the merchant with the transaction hash.",reason:"submit_failed"}),Zt=(e=false)=>({code:"payment_unconfirmed",message:e?"The payment reached the network, but Quasar has not recorded it yet; it tries again daily for up to 30 days. Do not pay again; contact the merchant with the transaction hash.":"The payment reached the network, but Quasar could not record it. Do not pay again; contact the merchant with the transaction hash.",reason:qe,...e?{rechecked:true}:{}}),ct=e=>({code:"payment_unconfirmed",...e?{txKey:e}:{},message:"The wallet used the number of this transaction for another one, which Quasar could not find, so money may have left the wallet. Do not pay again yet: name that transaction, or contact the merchant.",reason:de}),en=()=>({code:"payment_unconfirmed",message:"This transaction was handed over for another invoice first. Quasar credits it to the invoice that the wallet which sent it confirmed, and this page shows the result. Do not pay again meanwhile.",status:409,reason:Te}),tn=e=>e?.code==="payment_unconfirmed"&&(e.reason===Te||e.reason===qe||e.reason===de||e.reason===at),rt=e=>e.find(s=>s.reason===de&&!s.otherInvoice)??null,nn=e=>e?.code==="payment_unconfirmed"&&e.reason===Te,te=e=>(e.unresolvedPayments??0)>0,rn=(e,s)=>!e.final&&!e.movedMoney&&!e.rechecked&&it.has(e.reason??"")&&s.unresolvedPayments===0,ot=e=>(e.unresolvedPayments??e.pendingPayments??0)>0,Me=e=>({status:e.invoice.status,ledgerSeq:0,txHash:null,amountPaid:e.invoice.amountPaid,quoteExpiresAt:e.quote?.expiresAt??null,pendingPayments:e.invoice.pendingPayments,rejectedTxKeys:e.invoice.rejectedTxKeys,rejectedPayments:e.invoice.rejectedPayments,paymentCountsUntil:e.invoice.paymentCountsUntil,unresolvedPayments:e.invoice.unresolvedPayments,onTimeTxKeys:e.invoice.onTimeTxKeys});function ce(e){if(e instanceof a){let{reason:s,originWallet:c}=e.details??{};return {code:e.code??"request_failed",message:e.message,status:e.status,issues:e.issues,...typeof s=="string"?{reason:s}:{},...typeof c=="string"?{originWallet:c}:{}}}return {code:"request_failed",message:e instanceof Error?e.message:String(e)}}function wn(e){let s=e.api??Ge(e.token,e.baseUrl??a$1),c=e.pollMs??5e3,y=e.EventSource===void 0?globalThis.EventSource??null:e.EventSource,S=null,v=null,O=null,M=null,g=false,C=null,L=c,l=false,m=[],P=false,T=[],E=null,b=new Set,U=0,Ee=0,H=null,G=null,Re=false,W=new Map,fe=false,x=null,ne=()=>({error:x?Y(x):ct()}),Ce=0,he=null,me=[],Le=new Set,re=e.handOverStorage!==void 0?e.handOverStorage:e.api?null:_e(),xe=`${qt}${e.token}`,Oe=()=>{try{let _=JSON.parse(re?.getItem(xe)??"[]");return Array.isArray(_)?_.filter(o=>typeof o=="object"&&o!==null&&typeof o.txKey=="string"&&typeof o.at=="number"):[]}catch{return []}},Ue=_=>{try{_.length>0?re?.setItem(xe,JSON.stringify(_)):re?.removeItem(xe);}catch{}},lt=_=>{if(!re)return;let o=Oe(),a=o.find(({txKey:A})=>A===_.txKey);Ue([...o.filter(({txKey:A})=>A!==_.txKey),{txKey:_.txKey,..._.from?{from:_.from}:{},..._.connectorType?{connectorType:_.connectorType}:{},..._.methodId?{methodId:_.methodId}:{},at:a?.at??Date.now()}]);},F=_=>{if(!re)return;let o=Oe();o.some(({txKey:a})=>a===_)&&Ue(o.filter(({txKey:a})=>a!==_));},Ne=({quote:_,checkout:o})=>[...o?.payerProofs??[],...me,..._?.payerProof?.proven===true&&_.payer!==null?[{payer:_.payer,chainId:ve(_.payer)?.chainId??"",kind:_.payerProof.kind??void 0}]:[]],dt=_=>{let o=_.checkout?.methods.find(({id:q})=>q===_.methodId)?.chainId,a=o?.split(":")[0];if(!o)return [];let A=new Map;for(let q of Ne(_)){let N=ve(q.payer);!N||N.namespace!==a||(q.kind&&ut.has(q.kind)||q.chainId===o)&&(A.has(N.address)||A.set(N.address,q.payer));}return [...A.values()]},De=_=>{let{payer:o}=_,a=_.checkout?.methods.find(({id:N})=>N===_.methodId),q=o!==null&&Le.has(o)?"before_quote":a?.payerProof??"none";return q==="none"||!a?"not_needed":o&&Wt(Ne(_),o)?"confirmed":o!==null&&o===he&&q==="before_quote"?"confirming":q==="before_quote"?"required":"unless_relayed"};return createStore()((_,o)=>{let a$1=t=>{let r={...o(),...t};_({...t,receiptUrl:r.phase==="paid"||r.phase==="refunded"?s.url("receipt"):null,paymasterUrl:r.quote?.gasless?.paymaster?s.url("paymaster"):null,logoUrl:r.checkout?.merchant.logo?s.url("logo"):null,payerProof:De(r),confirmedWallets:dt(r)});},A=(t,r)=>{let n=ce(t),u=o().invoiceStatus;if(u&&(ee.has(u)||D.has(u))){a$1({error:n,...At.has(o().phase)?{phase:j(u)}:{}});return}a$1({error:n,phase:nt[n.code]??r});},q=()=>{G&&clearTimeout(G),G=null,H=null,Re=false,o().followingUntil!==null&&a$1({followingUntil:null});},N=()=>{S?.close(),S=null,v&&clearInterval(v),v=null,O&&clearTimeout(O),O=null,M&&clearTimeout(M),M=null,q();},oe=()=>(m=[],P=false,{paymentOnTheWay:false}),be=()=>{P=true,U=Date.now(),b=new Set(T);},ft=(t,r)=>{if(!r)return null;let n=r.find(({keys:u})=>u.some(i=>m.includes(i)));return n||(t.pendingPayments!==0?null:r.find(({keys:u})=>u.some(i=>!b.has(i)))??null)},pe=t=>t==="underpaid"?{phase:"underpaid"}:t&&!V.has(t)?{phase:j(t)}:Qt(o().quote,Date.now())?{phase:"awaitingPayment"}:{phase:"selectMethod",quote:null},ht=()=>s.view().then(t=>{if(l)return;let r=t.invoice.status==="underpaid"&&t.quote;a$1({checkout:t,...r?{quote:r,methodId:r.methodId}:{}});}).catch(()=>{}),He=()=>{let{invoiceStatus:t,paymentOnTheWay:r}=o();return !st.has(t??"")||D.has(t??"")&&(r||P)},mt=t=>{let r=o().paymentOnTheWay||P;N(),a$1(r?{...oe(),error:we(),phase:"unconfirmed"}:{error:ce(t),phase:"error"});},se=()=>{if(v||l)return;L=H!==null||g&&!o().paymentOnTheWay&&!P?Math.max(c,Be):c;let r=false,n=setInterval(()=>{if(r)return;r=true;let u=Ee;s.view().then(i=>{if(l||v!==n)return;let p=i.invoice.status==="underpaid"&&i.quote;a$1({checkout:i,...p?{quote:p,methodId:p.methodId}:{}}),ye(Me(i),i,u===Ee),We(i.quote);}).catch(i=>{v===n&&i instanceof a&&i.code==="checkout_not_found"&&mt(i);}).finally(()=>{r=false;});},L);v=n;},We=t=>{let{phase:r,quote:n}=o();r!=="awaitingPayment"||!n||!t||Ve(t.expiresAt,n.expiresAt)||(t.payer===n.payer&&t.methodId===n.methodId?a$1({quote:t}):a$1({quote:null,phase:"selectMethod"}));},Ie=(t,r=false)=>{let n=Date.parse(o().checkout?.invoice.dueAt??""),u=t==="cancelled"?Math.max(Date.now(),U)+Ct:Number.isFinite(n)?Math.max(Math.min(n,Date.now()),U)+Rt:Date.now()+xt;(H===null||r&&u>H)&&(H=u,G&&clearTimeout(G),G=setTimeout(()=>{G=null,!l&&(a$1({...oe(),invoicePaymentOnTheWay:false,...o().invoicePaymentUnresolved&&!o().error?{error:le(void 0,fe)}:{}}),N());},Math.max(0,H-Date.now())),a$1({followingUntil:new Date(H).toISOString()})),v&&L<Be&&(clearInterval(v),v=null,se());},ye=(t,r,n=true)=>{if(l)return;let{invoiceStatus:u,phase:i,checkout:p,paymentOnTheWay:f}=o(),w=nn(o().error),h=et(t),k=new Set(T);h&&(T=h.flatMap(({keys:I})=>I));let d={invoiceStatus:t.status,txHash:t.txHash??o().txHash};if(n&&t.pendingPayments!==void 0&&(d.invoicePaymentOnTheWay=t.pendingPayments>0),n&&t.paymentCountsUntil!==void 0&&(d.paymentCountsUntil=t.paymentCountsUntil),n&&(t.unresolvedPayments!==void 0||t.pendingPayments!==void 0)&&(d.invoicePaymentUnresolved=ot(t)),n&&t.unresolvedPayments!==void 0&&(fe=te(t)),n&&t.onTimeTxKeys&&m.length>0&&o().paymentSentInTime!==true){let I=new Set(t.onTimeTxKeys.map(Q));d.paymentSentInTime=m.some(z=>I.has(z));}!r&&p&&t.amountPaid!==void 0&&t.amountPaid!==p.invoice.amountPaid&&(d.checkout={...p,invoice:{...p.invoice,amountPaid:t.amountPaid}});let B=f||P,ae=t.pendingPayments??0,ie=t.amountPaid!==void 0&&t.amountPaid!==null&&t.amountPaid!==E;ie&&(E=t.amountPaid);let J=u==="underpaid"&&t.status==="underpaid"&&!ie,R=null;B&&n&&Ke.has(t.status)&&(R=ft(t,h),!R&&(t.status==="open"||J)&&t.pendingPayments===0&&t.rejectedPayments&&(P||Date.now()-U>=Et)&&!(w&&(t.unresolvedPayments??0)>0)&&(R={final:false,rechecked:te(t)})),!R&&t.status==="open"&&u==="processing"&&ae===0&&(R=t.rejectedPayments?h?.find(({keys:I})=>I.some(z=>!k.has(z)))??{final:false,rechecked:te(t)}:{final:true});let Se=x;if(h&&(x=rt(h)),R&&x&&(R=x),R?.final)Object.assign(d,oe(),{error:Y(R)},t.status==="open"||t.status==="processing"||t.status==="underpaid"?pe(t.status):{phase:j(t.status)});else if(R)Object.assign(d,oe(),{error:Y(R),phase:V.has(t.status)?"unconfirmed":j(t.status)});else if(t.status==="open")i==="loading"&&(d.phase="selectMethod");else if(!J||!Bt.has(i)||i==="awaitingPayment"&&r?.invoice.restPayable===false){d.phase=j(t.status);let I=o().error;t.status==="underpaid"&&u!=="underpaid"&&I&&I.code!=="payment_mismatch"&&!x&&(d.error=null);}if(B&&!R){let I=n&&t.pendingPayments===0,z=ee.has(t.status)||t.status==="underpaid"&&!J||D.has(t.status)&&r!==void 0&&I;z&&Object.assign(d,oe()),z&&D.has(t.status)&&(d.invoicePaymentUnresolved??o().invoicePaymentUnresolved)&&(d.error=le(void 0,fe));}if(n&&ae>0&&Ke.has(t.status)){!P&&!(d.paymentOnTheWay??f)&&be();let I=w&&d.error===void 0;V.has(t.status)&&Pe.has(d.phase??i)&&!I&&(d.phase="confirming");}w&&d.error===void 0&&(t.status==="processing"||t.status==="underpaid"&&!J||ee.has(t.status))&&(d.error=null),x&&V.has(t.status)&&Pe.has(d.phase??i)?Object.assign(d,ne(),{phase:"unconfirmed"}):Se&&!x&&o().error?.reason===de&&!d.error&&Object.assign(d,{error:null},V.has(t.status)?pe(t.status):{}),a$1(d),He()?D.has(t.status)&&(Re=(t.pendingPayments??0)>0,Ie(t.status),S&&t.pendingPayments===0&&(S.close(),S=null,se())):N(),!r&&t.status!==u&&Gt.has(t.status)&&ht();let ue=o().quote;!r&&o().phase==="awaitingPayment"&&ue&&t.quoteExpiresAt&&t.quoteExpiresAt!==C&&!Ve(t.quoteExpiresAt,ue.expiresAt)&&(C=t.quoteExpiresAt,s.view().then(I=>{l||We(I.quote);}).catch(()=>{}));},ge=()=>{if(l||S||v||!He())return;if(!y)return se();let t=new y(s.url("events"));S=t;let r=()=>{O&&clearTimeout(O),O=setTimeout(()=>{O=null,!(S!==t||l)&&(t.close(),S=null,s.view().then(n=>{l||ye(Me(n),n);}).catch(()=>{}),ge());},bt);};r(),t.addEventListener("ping",r),t.addEventListener("status",n=>{r();try{ye(JSON.parse(n.data));}catch{}}),t.onerror=()=>{if(S!==t)return;let{invoiceStatus:n,paymentOnTheWay:u}=o(),i=u||P,p=t.readyState===2;(p||D.has(n??"")&&i&&!Re)&&(t.close(),S=null,O&&clearTimeout(O),O=null,g=p,se(),p&&!M&&(M=setTimeout(()=>{M=null,!(l||!v||H!==null)&&(clearInterval(v),v=null,g=false,ge());},Ot)));};},$=(t,r,n,u=false)=>{if(ee.has(n??"")||ee.has(o().invoiceStatus??"")){let{error:f,txKey:w}=o();f?.reason?.startsWith("submit_")&&w&&t.includes(w)&&a$1({error:null}),s.view().then(h=>{l||ye(Me(h),h);}).catch(()=>{});return}Ee+=1,U=Date.now(),P=false,m=[...m,...t.filter(f=>!!f).map(Q)],b=new Set(T.map(Q));let{invoiceStatus:i}=o(),p=i&&D.has(i)?i:null;a$1({txKey:r,paymentOnTheWay:true,paymentSentInTime:null,error:u?en():null,phase:p?j(p):u?"unconfirmed":"confirming"}),p&&Ie(p,true),v&&g&&H===null&&L>c&&(clearInterval(v),v=null,se()),ge();},Fe=async(t,r)=>{let n={txKey:t.txKey,...t.from?{from:t.from}:{},...t.connectorType?{connectorType:t.connectorType}:{},...t.methodId?{methodId:t.methodId}:{}};lt(n);let u=()=>ee.has(o().invoiceStatus??""),i=()=>D.has(o().invoiceStatus??""),p=h=>{u()||a$1({txKey:h,error:Xt(),...i()?{}:{phase:"unconfirmed"}}),f(0);},f=h=>{let k=Mt[h];if(k===void 0||l)return;let d=setTimeout(()=>{W.delete(n.txKey),!l&&s.submit(n).then(B=>{l||(F(n.txKey),$([n.txKey],n.txKey,B?.status));},()=>f(h+1));},k);W.set(n.txKey,d);},w=r==="unconfirmed";!u()&&!i()&&!w&&a$1({phase:"submitting",error:null}),clearTimeout(W.get(n.txKey)),W.delete(n.txKey);try{let h=await s.submit(n);return F(n.txKey),$([n.txKey],n.txKey,h?.status),!0}catch(h){if(Xe(h))return F(n.txKey),$([n.txKey],n.txKey,void 0,true),false;if(ze(h))return p(n.txKey),false;if(h instanceof a&&Ye.has(h.code??""))return u()||a$1({txKey:n.txKey,error:we(),...i()?{}:{phase:"unconfirmed"}}),false;if(!Ze(h))return F(n.txKey),w&&!x||(x&&!u()?a$1({...ne(),...i()?{}:{phase:"unconfirmed"}}):u()||A(h,r==="submitting"?"awaitingPayment":r)),false;u()||a$1({txKey:n.txKey,...x?ne():{error:zt()},...i()?{}:{phase:"unconfirmed"}});let k=Date.now()+Ft,d=()=>(o().error?.reason==="submit_retrying"||!!x)&&o().txKey===n.txKey,B=ae=>{let ie=Je[Math.min(ae,Je.length-1)];if(l)return;if(Date.now()+ie>k){d()&&a$1(x?ne():{error:we()});return}let J=setTimeout(()=>{W.delete(n.txKey),!l&&s.submit(n).then(R=>{l||(F(n.txKey),$([n.txKey],n.txKey,R?.status));}).catch(R=>{if(l)return;if(Ze(R))return B(ae+1);if(R instanceof a&&Ye.has(R.code??"")){d()&&a$1({error:we()});return}if(ze(R)){d()?p(n.txKey):F(n.txKey);return}if(F(n.txKey),Xe(R)){d()&&$([n.txKey],n.txKey,void 0,true);return}if(!d())return;if(x){a$1(ne());return}let Se=ce(R),ue=nt[Se.code],I=o().phase;a$1({error:Se,...ue?{phase:ue}:I==="unconfirmed"?pe(o().invoiceStatus):{}});});},ie);W.set(n.txKey,J);};return B(0),false}},pt=t=>{let r=Oe();if(r.length===0)return;let n=new Set([...t.invoice.rejectedTxKeys??[],...t.invoice.onTimeTxKeys??[]].map(Q)),u=r.filter(({txKey:i})=>!n.has(Q(i))).sort((i,p)=>i.at-p.at);for(let{txKey:i}of r)n.has(Q(i))&&F(i);(async()=>{for(let i of u){if(l)return;await Fe(i,o().phase);}})();};return {phase:"loading",checkout:null,invoiceStatus:null,methodId:null,payer:null,consentGiven:false,payerProof:"not_needed",confirmedWallets:[],quote:null,locale:null,txKey:null,paymentOnTheWay:false,invoicePaymentOnTheWay:false,paymentCountsUntil:null,invoicePaymentUnresolved:false,paymentSentInTime:null,followingUntil:null,txHash:null,error:null,receiptUrl:null,clockSkewMs:0,paymasterUrl:null,logoUrl:null,load:async()=>{a$1({phase:"loading",error:null});try{let t=await s.view(),{invoice:r}=t,n=et(r);n&&(T=n.flatMap(({keys:k})=>k)),E=r.amountPaid;let u=tt(t,Date.now()),i=null,p=(r.pendingPayments??0)>0&&Ke.has(r.status);p&&!o().paymentOnTheWay&&be(),p&&V.has(r.status)&&Pe.has(u)&&(u="confirming");let f=n?.[0],w=ot(r),h=r.status==="open"||r.status==="underpaid"||D.has(r.status);if(n&&(x=rt(n)),!p&&!o().paymentOnTheWay&&h){let k=!1;x?(i=Y(x),k=!0):f&&!f.final&&!rn(f,r)?(i=Y(f),it.has(f.reason??"")&&!f.rechecked&&te(r)&&(i={...i,stillRead:!0}),k=!0):f?.reason==="unresolved_after_24h"?(i=Y(f),k=!0):w?(i=le(void 0,te(r)),k=!0):f?.movedMoney&&(i=Y(f)),k&&Pe.has(u)&&(u="unconfirmed");}r.unresolvedPayments!==void 0&&(fe=te(r)),a$1({checkout:t,invoiceStatus:r.status,locale:r.locale,quote:t.quote,methodId:t.quote?.methodId??o().methodId,payer:t.quote?.payer??o().payer,invoicePaymentOnTheWay:(r.pendingPayments??0)>0,invoicePaymentUnresolved:w,paymentCountsUntil:r.paymentCountsUntil??null,phase:u,error:i}),P&&D.has(r.status)&&Ie(r.status),ge(),pt(t);}catch(t){a$1({phase:"error",error:ce(t)});}},selectMethod:(t,r)=>{let{quote:n,phase:u,error:i}=o(),p=n&&n.methodId!==t;a$1({methodId:t,error:r?.keepError?i:null,...p?{quote:null,phase:u==="awaitingPayment"?"selectMethod":u}:{}});},setPayer:t=>{let{quote:r,phase:n,invoiceStatus:u,checkout:i,error:p}=o(),f=r&&r.payer!==t,w=t!==o().payer&&Ht(p)?{error:null}:{},h=(u??i?.invoice.status)==="underpaid",k=n==="blocked"&&t!==null&&t!==o().payer?{phase:h?"underpaid":"selectMethod",quote:h?r:null}:{};if(f&&h){a$1({payer:t,...w,phase:n==="awaitingPayment"?"underpaid":n,...k});return}a$1({payer:t,...w,...f?{quote:null,phase:n==="awaitingPayment"?"selectMethod":n}:{},...k});},clearError:()=>a$1({error:null}),setConsentGiven:t=>a$1({consentGiven:t,error:null}),releaseQuote:()=>{let{phase:t,invoiceStatus:r,checkout:n}=o();t==="awaitingPayment"&&((r??n?.invoice.status)==="underpaid"?a$1({error:null,phase:"underpaid"}):a$1({quote:null,error:null,phase:"selectMethod"}));},requestQuote:async()=>{let{methodId:t,payer:r,phase:n,checkout:u,consentGiven:i,invoiceStatus:p}=o();if(!t)return a$1({error:{code:"method_required",message:"Choose a payment method first"}}),null;let f=(p??u?.invoice.status)==="underpaid";if(u?.consent?.required&&!i&&!f)return a$1({error:{code:"consent_required",message:"Tick the consent of the checkout first"}}),null;if(o().payerProof==="required"||o().payerProof==="confirming")return a$1({error:{code:"payer_proof_required",message:"Confirm the paying wallet with a free signature first"}}),null;a$1({phase:"quoting",error:null});let w=()=>{let k=o().invoiceStatus;return k!==null&&!V.has(k)},h=()=>{let k=o().invoiceStatus;return k&&a$1({phase:j(k),error:null}),null};try{let k=await s.quote({methodId:t,...r?{payer:r}:{},...u?.consent&&i&&!f?{consentGiven:!0}:{}});if(w())return h();if(o().payer!==r||o().methodId!==t)return a$1({phase:f?"underpaid":"selectMethod"}),null;let d=Date.now()-Date.parse(k.lockedAt??"");return a$1({quote:k,phase:o().invoicePaymentOnTheWay?"confirming":"awaitingPayment",clockSkewMs:Number.isFinite(d)&&Math.abs(d)>It?d:0}),k}catch(k){if(k instanceof a&&k.code==="payer_proof_required"&&r&&Le.add(r),w())return h();let d=ce(k);return d.code==="payment_on_its_way"&&be(),f&&!Vt.has(d.code)?a$1({error:d,phase:"underpaid"}):A(k,n==="quoting"?"selectMethod":n),null}},confirmPayer:async t=>{let{payer:r}=o();if(!r)return a$1({error:{code:"payer_required",message:"Connect the paying wallet first"}}),false;if(o().payerProof==="confirmed"||o().payerProof==="not_needed")return a$1({error:null}),true;let{payerProofMessage:n,payerProof:u}=s;if(!n||!u)return a$1({error:{code:"request_failed",message:"The checkout calls cannot confirm a wallet (payerProofMessage)"}}),false;let i=++Ce;he=r,a$1({error:null});let p=(f,w)=>{f&&me.push(f);let h=i===Ce;h&&(he=null),!l&&(w===void 0||!h||o().payer!==r||De(o())==="confirmed"?a$1({}):w instanceof Error&&w.name==="PayerProofDeclined"?a$1({error:{code:"payer_proof_declined",message:$e}}):A(w,o().phase));};try{let f=await n({payer:r});if(f.proven)return p({payer:f.payer,chainId:f.chainId}),!0;let w;try{w=await t(f.message,f);}catch(k){let d=new Error(k instanceof Error?k.message:String(k));throw d.name="PayerProofDeclined",d}let h=await u({payer:r,message:f.message,signature:w});return p(h),!0}catch(f){return p(null,f),false}},abandonConfirmation:()=>{Ce++,he=null,a$1({});},setBuyer:async(t,r={})=>{a$1({error:null});try{let n=await s.buyer({buyer:t,...r.company?{company:!0}:{}});return a$1({checkout:n,phase:tt(n,Date.now())}),!0}catch(n){return A(n,o().phase),false}},setLocale:async t=>{let r=o().locale;a$1({locale:t});try{return await s.locale(t),!0}catch{return a$1({locale:r}),false}},submit:t=>Fe(t,o().phase),relay:async t=>{let r=o().phase;a$1({phase:"submitting",error:null});try{let n=await s.relay(t);return $([n.userOpHash,n.txHash],n.txHash??null),!0}catch(n){return A(n,r==="submitting"?"awaitingPayment":r),false}},grantPermission:async(t,r)=>{a$1({error:null});let n=async()=>{let{autoCharge:u}=await s.permission(t),i=o().checkout;return i&&a$1({checkout:{...i,autoCharge:u}}),true};try{try{return await n()}catch(u){let{payerProofMessage:i,payerProof:p}=s;if(!(u instanceof a&&u.code==="payer_proof_required")||!r||!i||!p)throw u;let w=await i({payer:t.payer});if(w.proven)me.push({payer:w.payer,chainId:w.chainId});else {let h;try{h=await r(w.message,w);}catch{return a$1({error:{code:"payer_proof_declined",message:$e}}),!1}me.push(await p({payer:t.payer,message:w.message,signature:h}));}return await n()}}catch(u){return A(u,o().phase),false}},permissionRevoked:async()=>{try{let{autoCharge:t}=await s.permissionRevoked(),r=o().checkout;return r&&a$1({checkout:{...r,autoCharge:t}}),t?.status!=="active"}catch{return null}},payAgain:()=>{o().phase!=="unconfirmed"||tn(o().error)||x||a$1({error:null,...pe(o().invoiceStatus)});},destroy:()=>{l=true;for(let t of W.values())clearTimeout(t);W.clear(),N();}}})}export{wn as createCheckoutStore,dn as createRefundStore,ln as refundAction};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
'use strict';var o="https://api.tuwa.io",t="/v1/engine/pulsar/sync",s="/v1/engine/pulsar/history",e=n=>`${t}/${encodeURIComponent(n)}/hash
|
|
2
|
-
exports.a=o;exports.b=t;exports.c=s;exports.d=e;
|
|
1
|
+
'use strict';var o="https://api.tuwa.io",t="/v1/engine/pulsar/sync",s="/v1/engine/pulsar/history",e=n=>`${t}/${encodeURIComponent(n)}/hash`,p="/v1/payments";
|
|
2
|
+
exports.a=o;exports.b=t;exports.c=s;exports.d=e;exports.e=p;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var u=class extends Error{status;originalError;code;issues;details;constructor(e,n,s,r={}){super(e),this.name="QuasarSDKError",this.status=n,this.originalError=s,this.code=r.code,this.issues=r.issues,this.details=r.details;}};function g(t){let e=t,n=e.statusCode??e.response?.status,s=l(e.data??e.response?._data),r=s?.error,o=e.message??"Unknown Error",i={};if(typeof r=="string")o=typeof s?.statusCode=="number"&&typeof s.message=="string"?s.message:r,typeof s?.code=="string"&&(i={code:s.code});else if(typeof r=="object"&&r!==null){let{code:a,message:d,issues:c,...f}=r;typeof d=="string"&&(o=d),i={code:typeof a=="string"?a:void 0,issues:Array.isArray(c)?c:void 0,details:Object.keys(f).length>0?f:void 0};}else typeof s?.message=="string"&&(o=s.message);return (n===401||n===403)&&!i.code&&console.error("\u{1F6A8} [Quasar SDK] Auth Error. Check your Secret Key and scopes."),new u(`[Quasar SDK] Request Failed (${n}): ${o}`,n,e,i)}function l(t){let e=t;if(e instanceof ArrayBuffer||e instanceof Uint8Array)try{e=JSON.parse(new TextDecoder().decode(e));}catch{return}return typeof e=="object"&&e!==null?e:void 0}export{u as a,g as b};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';var u=class extends Error{status;originalError;code;issues;details;constructor(e,n,s,r={}){super(e),this.name="QuasarSDKError",this.status=n,this.originalError=s,this.code=r.code,this.issues=r.issues,this.details=r.details;}};function g(t){let e=t,n=e.statusCode??e.response?.status,s=l(e.data??e.response?._data),r=s?.error,o=e.message??"Unknown Error",i={};if(typeof r=="string")o=typeof s?.statusCode=="number"&&typeof s.message=="string"?s.message:r,typeof s?.code=="string"&&(i={code:s.code});else if(typeof r=="object"&&r!==null){let{code:a,message:d,issues:c,...f}=r;typeof d=="string"&&(o=d),i={code:typeof a=="string"?a:void 0,issues:Array.isArray(c)?c:void 0,details:Object.keys(f).length>0?f:void 0};}else typeof s?.message=="string"&&(o=s.message);return (n===401||n===403)&&!i.code&&console.error("\u{1F6A8} [Quasar SDK] Auth Error. Check your Secret Key and scopes."),new u(`[Quasar SDK] Request Failed (${n}): ${o}`,n,e,i)}function l(t){let e=t;if(e instanceof ArrayBuffer||e instanceof Uint8Array)try{e=JSON.parse(new TextDecoder().decode(e));}catch{return}return typeof e=="object"&&e!==null?e:void 0}exports.a=u;exports.b=g;
|
package/dist/cli.cjs
CHANGED
|
@@ -48,11 +48,11 @@ var path = __toESM(require("path"), 1);
|
|
|
48
48
|
// package.json
|
|
49
49
|
var package_default = {
|
|
50
50
|
name: "@tuwaio/quasar-sdk",
|
|
51
|
-
version: "0.
|
|
51
|
+
version: "0.9.0",
|
|
52
52
|
private: false,
|
|
53
53
|
author: "Oleksandr Tkach",
|
|
54
54
|
license: "Apache-2.0",
|
|
55
|
-
description: "L5 client of Quasar (TUWA): the Quasar API client for Quasar Cloud and self-hosted Quasar nodes (transaction sync and history for Pulsar), and the quasar-sdk CLI that relays webhooks to localhost.",
|
|
55
|
+
description: "L5 client of Quasar (TUWA): the Quasar API client for Quasar Cloud and self-hosted Quasar nodes (transaction sync and history for Pulsar, Payments invoices, refunds and subscriptions, webhook verification), and the quasar-sdk CLI that relays webhooks to localhost.",
|
|
56
56
|
type: "module",
|
|
57
57
|
main: "./dist/index.cjs",
|
|
58
58
|
module: "./dist/index.js",
|
|
@@ -63,12 +63,23 @@ var package_default = {
|
|
|
63
63
|
import: "./dist/index.js",
|
|
64
64
|
require: "./dist/index.cjs"
|
|
65
65
|
},
|
|
66
|
+
"./pulsar": {
|
|
67
|
+
types: "./dist/pulsar.d.ts",
|
|
68
|
+
import: "./dist/pulsar.js",
|
|
69
|
+
require: "./dist/pulsar.cjs"
|
|
70
|
+
},
|
|
66
71
|
"./react": {
|
|
67
72
|
types: "./dist/react.d.ts",
|
|
68
73
|
import: "./dist/react.js",
|
|
69
74
|
require: "./dist/react.cjs"
|
|
75
|
+
},
|
|
76
|
+
"./checkout": {
|
|
77
|
+
types: "./dist/checkout.d.ts",
|
|
78
|
+
import: "./dist/checkout.js",
|
|
79
|
+
require: "./dist/checkout.cjs"
|
|
70
80
|
}
|
|
71
81
|
},
|
|
82
|
+
sideEffects: false,
|
|
72
83
|
publishConfig: {
|
|
73
84
|
access: "public"
|
|
74
85
|
},
|
|
@@ -105,12 +116,12 @@ var package_default = {
|
|
|
105
116
|
],
|
|
106
117
|
repository: {
|
|
107
118
|
type: "git",
|
|
108
|
-
url: "git+https://github.com/TuwaIO/
|
|
119
|
+
url: "git+https://github.com/TuwaIO/quasar-client.git",
|
|
109
120
|
directory: "packages/quasar-sdk"
|
|
110
121
|
},
|
|
111
|
-
homepage: "https://github.com/TuwaIO/
|
|
122
|
+
homepage: "https://github.com/TuwaIO/quasar-client",
|
|
112
123
|
bugs: {
|
|
113
|
-
url: "https://github.com/TuwaIO/
|
|
124
|
+
url: "https://github.com/TuwaIO/quasar-client/issues"
|
|
114
125
|
},
|
|
115
126
|
contributors: [
|
|
116
127
|
{
|
|
@@ -123,18 +134,26 @@ var package_default = {
|
|
|
123
134
|
},
|
|
124
135
|
peerDependencies: {
|
|
125
136
|
"@tuwaio/pulsar-core": ">=0.10",
|
|
126
|
-
"@tuwaio/siwx-react": ">=0.5"
|
|
137
|
+
"@tuwaio/siwx-react": ">=0.5",
|
|
138
|
+
zustand: "5.x.x"
|
|
127
139
|
},
|
|
128
140
|
peerDependenciesMeta: {
|
|
141
|
+
"@tuwaio/pulsar-core": {
|
|
142
|
+
optional: true
|
|
143
|
+
},
|
|
129
144
|
"@tuwaio/siwx-react": {
|
|
130
145
|
optional: true
|
|
146
|
+
},
|
|
147
|
+
zustand: {
|
|
148
|
+
optional: true
|
|
131
149
|
}
|
|
132
150
|
},
|
|
133
151
|
devDependencies: {
|
|
134
|
-
"@tuwaio/pulsar-core": "^0.
|
|
135
|
-
"@tuwaio/siwx-react": "^0.6.
|
|
152
|
+
"@tuwaio/pulsar-core": "^0.12.4",
|
|
153
|
+
"@tuwaio/siwx-react": "^0.6.6",
|
|
136
154
|
tsup: "^9.0.0",
|
|
137
|
-
typescript: "6.0.3"
|
|
155
|
+
typescript: "6.0.3",
|
|
156
|
+
zustand: "^5.0.15"
|
|
138
157
|
}
|
|
139
158
|
};
|
|
140
159
|
|