@privy-io/react-auth 2.18.1 → 2.18.2
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/dist/cjs/abstract-smart-wallets.js +1 -1
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/{privy-provider-CURvvz5W.js → privy-provider-CUA5RhGV.js} +22 -22
- package/dist/cjs/{smart-wallets-ieCGvkYu.js → smart-wallets-Dh0jTSUz.js} +1 -1
- package/dist/cjs/smart-wallets.js +1 -1
- package/dist/cjs/solana.js +1 -1
- package/dist/cjs/ui.js +1 -1
- package/dist/cjs/{useActiveWallet-B8dTfhVh.js → useActiveWallet-Bid3gn-d.js} +1 -1
- package/dist/cjs/{useFundWallet-Bl1vf9MU.js → useFundWallet-BSIeXhtj.js} +1 -1
- package/dist/esm/abstract-smart-wallets.mjs +1 -1
- package/dist/esm/farcaster.mjs +1 -1
- package/dist/esm/{frame-UsDF_L76.mjs → frame-FpttHlk8.mjs} +1 -1
- package/dist/esm/index.mjs +1 -1
- package/dist/esm/{paths-j39vuJt8.mjs → paths-CYLUXo_U.mjs} +1 -1
- package/dist/esm/{privy-provider-ElOeMJBm.mjs → privy-provider-CGNOFJ8i.mjs} +22 -22
- package/dist/esm/{smart-wallets-CyBOoqqt.mjs → smart-wallets-DWVzc4NE.mjs} +1 -1
- package/dist/esm/smart-wallets.mjs +1 -1
- package/dist/esm/solana.mjs +1 -1
- package/dist/esm/ui.mjs +1 -1
- package/dist/esm/{useActiveWallet-Cp73WmB3.mjs → useActiveWallet-DwAADhPG.mjs} +1 -1
- package/dist/esm/{useFundWallet-DywFOko6.mjs → useFundWallet-CHnKKMFA.mjs} +1 -1
- package/package.json +5 -4
|
@@ -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-
|
|
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-CGNOFJ8i.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-BzsB315R.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.18.
|
|
3
|
+
"version": "2.18.2",
|
|
4
4
|
"description": "React client for the Privy Auth API",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"authentication",
|
|
@@ -151,9 +151,9 @@
|
|
|
151
151
|
"@marsidev/react-turnstile": "^0.4.1",
|
|
152
152
|
"@metamask/eth-sig-util": "^6.0.0",
|
|
153
153
|
"@privy-io/chains": "0.0.2",
|
|
154
|
-
"@privy-io/js-sdk-core": "0.52.
|
|
154
|
+
"@privy-io/js-sdk-core": "0.52.7",
|
|
155
155
|
"@privy-io/ethereum": "0.0.2",
|
|
156
|
-
"@privy-io/public-api": "2.39.
|
|
156
|
+
"@privy-io/public-api": "2.39.1",
|
|
157
157
|
"@privy-io/api-base": "1.5.2",
|
|
158
158
|
"@reown/appkit": "^1.7.11",
|
|
159
159
|
"@scure/base": "^1.2.5",
|
|
@@ -195,7 +195,8 @@
|
|
|
195
195
|
"@jest/globals": "^29.7.0",
|
|
196
196
|
"@privy-io/build-config": "*",
|
|
197
197
|
"@privy-io/eslint-config-custom": "*",
|
|
198
|
-
"@privy-io/
|
|
198
|
+
"@privy-io/eslint-plugin-privy-rules": "*",
|
|
199
|
+
"@privy-io/public-api": "2.39.1",
|
|
199
200
|
"@privy-io/testing": "*",
|
|
200
201
|
"@rollup/plugin-commonjs": "^26.0.1",
|
|
201
202
|
"@rollup/plugin-node-resolve": "^15.3.0",
|