@privy-io/react-auth 2.19.1 → 2.19.3

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.
@@ -1 +1 @@
1
- import{useCallback as e}from"react";import{aY as a,aX as t,u as n,o as s,e as r,aU as o,aZ as c,a_ as i}from"./privy-provider-CCrdZtua.mjs";import{getAssociatedTokenAddressSync as l,createAssociatedTokenAccountIdempotentInstruction as d,createTransferInstruction as m}from"@solana/spl-token";import{Connection as u,PublicKey as p,Transaction as w,SystemProgram as f,TransactionInstruction as h,VersionedTransaction as k,TransactionMessage as y}from"@solana/web3.js";import{getSolanaRpcEndpointForCluster as g,SolanaClient as b}from"@privy-io/js-sdk-core";import{u as B}from"./internal-context-qdNgTV5f.mjs";var T={id:a,getBalance:({address:e,cluster:a})=>new u(g(a)).getBalance(new p(e)),getTokenBalance:async({address:e,cluster:a,mintAddress:t})=>await new b({...a,rpcUrl:g(a)}).getTokenAccountsByOwner(e,t)||{amount:BigInt(0),decimals:9},createTransferTransaction:async({from:e,to:a,amount:t,cluster:n})=>{let s=new p(e),r=new w;r.add(f.transfer({fromPubkey:s,toPubkey:new p(a),lamports:t}));let o=new u(g(n)),c=await o.getLatestBlockhash();return r.recentBlockhash=c.blockhash,r.feePayer=s,{transaction:r,connection:o}},createSplTransferTransaction:async({from:e,to:a,amount:t,cluster:n,mintAddress:s})=>{let r=new p(s),o=new p(e),c=new p(a),i=new w,f=l(r,o),h=l(r,c);i.add(d(o,h,c,r)),i.add(m(f,h,o,t));let k=new u(g(n)),y=await k.getLatestBlockhash();return i.recentBlockhash=y.blockhash,i.feePayer=o,{transaction:i,connection:k}},createBridgeTransactionFromRelayQuote:async({quote:e,from:a,cluster:n})=>{let s=e.steps[0]?.items?.[0];if(!s)return;let r=s.data.instructions.map((({keys:e,programId:a,data:n})=>new h({keys:e.map((({pubkey:e,isSigner:a,isWritable:t})=>({pubkey:new p(e),isSigner:a,isWritable:t}))),programId:new p(a),data:t(n,"hex")}))),o=s.data.addressLookupTableAddresses?.map((e=>new p(e))),c=new u(g(n)),i=await Promise.all((o??[]).map((async e=>c.getAddressLookupTable(e).then((e=>e.value))))),{blockhash:l}=await c.getLatestBlockhash();return{transaction:new k(new y({payerKey:new p(a),instructions:r,recentBlockhash:l}).compileToV0Message(i)),connection:c}}};const v=a=>{n("fundSolanaWallet",a);let t=s(),{setModalData:l}=r(),{openModal:d}=B();return o(T),{fundWallet:e((async(e,a)=>{l({funding:c({address:e,appConfig:t,fundWalletConfig:a,methodScreen:i})}),d(i)}),[t,l,d])}};export{T as t,v as u};
1
+ import{useCallback as e}from"react";import{aY as a,aX as t,u as n,o as s,e as r,aU as o,aZ as c,a_ as i}from"./privy-provider-DhzPL6wG.mjs";import{getAssociatedTokenAddressSync as l,createAssociatedTokenAccountIdempotentInstruction as d,createTransferInstruction as m}from"@solana/spl-token";import{Connection as u,PublicKey as p,Transaction as w,SystemProgram as f,TransactionInstruction as h,VersionedTransaction as k,TransactionMessage as y}from"@solana/web3.js";import{getSolanaRpcEndpointForCluster as g,SolanaClient as b}from"@privy-io/js-sdk-core";import{u as B}from"./internal-context-qdNgTV5f.mjs";var T={id:a,getBalance:({address:e,cluster:a})=>new u(g(a)).getBalance(new p(e)),getTokenBalance:async({address:e,cluster:a,mintAddress:t})=>await new b({...a,rpcUrl:g(a)}).getTokenAccountsByOwner(e,t)||{amount:BigInt(0),decimals:9},createTransferTransaction:async({from:e,to:a,amount:t,cluster:n})=>{let s=new p(e),r=new w;r.add(f.transfer({fromPubkey:s,toPubkey:new p(a),lamports:t}));let o=new u(g(n)),c=await o.getLatestBlockhash();return r.recentBlockhash=c.blockhash,r.feePayer=s,{transaction:r,connection:o}},createSplTransferTransaction:async({from:e,to:a,amount:t,cluster:n,mintAddress:s})=>{let r=new p(s),o=new p(e),c=new p(a),i=new w,f=l(r,o),h=l(r,c);i.add(d(o,h,c,r)),i.add(m(f,h,o,t));let k=new u(g(n)),y=await k.getLatestBlockhash();return i.recentBlockhash=y.blockhash,i.feePayer=o,{transaction:i,connection:k}},createBridgeTransactionFromRelayQuote:async({quote:e,from:a,cluster:n})=>{let s=e.steps[0]?.items?.[0];if(!s)return;let r=s.data.instructions.map((({keys:e,programId:a,data:n})=>new h({keys:e.map((({pubkey:e,isSigner:a,isWritable:t})=>({pubkey:new p(e),isSigner:a,isWritable:t}))),programId:new p(a),data:t(n,"hex")}))),o=s.data.addressLookupTableAddresses?.map((e=>new p(e))),c=new u(g(n)),i=await Promise.all((o??[]).map((async e=>c.getAddressLookupTable(e).then((e=>e.value))))),{blockhash:l}=await c.getLatestBlockhash();return{transaction:new k(new y({payerKey:new p(a),instructions:r,recentBlockhash:l}).compileToV0Message(i)),connection:c}}};const v=a=>{n("fundSolanaWallet",a);let t=s(),{setModalData:l}=r(),{openModal:d}=B();return o(T),{fundWallet:e((async(e,a)=>{l({funding:c({address:e,appConfig:t,fundWalletConfig:a,methodScreen:i})}),d(i)}),[t,l,d])}};export{T as t,v as u};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@privy-io/react-auth",
3
- "version": "2.19.1",
3
+ "version": "2.19.3",
4
4
  "description": "React client for the Privy Auth API",
5
5
  "keywords": [
6
6
  "authentication",
@@ -152,7 +152,7 @@
152
152
  "@marsidev/react-turnstile": "^0.4.1",
153
153
  "@metamask/eth-sig-util": "^6.0.0",
154
154
  "@privy-io/chains": "0.0.2",
155
- "@privy-io/js-sdk-core": "0.52.9",
155
+ "@privy-io/js-sdk-core": "0.52.10",
156
156
  "@privy-io/ethereum": "0.0.2",
157
157
  "@privy-io/public-api": "2.40.0",
158
158
  "@privy-io/api-base": "1.5.2",
@@ -164,7 +164,7 @@
164
164
  "@solana/wallet-standard-wallet-adapter-react": "^1.1.2",
165
165
  "@tanstack/react-virtual": "^3.13.10",
166
166
  "@wallet-standard/app": "^1.0.1",
167
- "@walletconnect/ethereum-provider": "2.19.2",
167
+ "@walletconnect/ethereum-provider": "2.21.5",
168
168
  "base64-js": "^1.5.1",
169
169
  "dotenv": "^16.0.3",
170
170
  "encoding": "^0.1.13",