graz 0.0.24 → 0.0.25

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/index.d.ts CHANGED
@@ -179,7 +179,18 @@ declare function clearRecentChain(): void;
179
179
  declare function getActiveChainCurrency(denom: string): AppCurrency | undefined;
180
180
  declare function getRecentChain(): GrazChain | null;
181
181
  declare function suggestChain(chainInfo: ChainInfo): Promise<ChainInfo>;
182
- declare function suggestChainAndConnect(chainInfo: ChainInfo): Promise<{
182
+ interface SuggestChainAndConnectArgs {
183
+ chainInfo: ChainInfo;
184
+ signerOpts?: SigningCosmWasmClientOptions;
185
+ walletType?: WalletType;
186
+ gas?: {
187
+ price: string;
188
+ denom: string;
189
+ };
190
+ rpcHeaders?: Dictionary;
191
+ path?: string;
192
+ }
193
+ declare function suggestChainAndConnect({ chainInfo, ...rest }: SuggestChainAndConnectArgs): Promise<{
183
194
  account: Key;
184
195
  chain: ChainInfo;
185
196
  }>;
@@ -586,7 +597,7 @@ declare function useSuggestChain({ onError, onLoading, onSuccess }?: UseSuggestC
586
597
  suggestAsync: _tanstack_react_query.UseMutateAsyncFunction<ChainInfo, unknown, ChainInfo, unknown>;
587
598
  status: "error" | "idle" | "loading" | "success";
588
599
  };
589
- declare type UseSuggestChainAndConnectArgs = MutationEventArgs<ChainInfo, {
600
+ declare type UseSuggestChainAndConnectArgs = MutationEventArgs<SuggestChainAndConnectArgs, {
590
601
  chain: ChainInfo;
591
602
  account: Key;
592
603
  }>;
@@ -610,10 +621,13 @@ declare type UseSuggestChainAndConnectArgs = MutationEventArgs<ChainInfo, {
610
621
  *
611
622
  * // suggest and connect usage
612
623
  * suggestAndConnect({
613
- * rpc: "https://rpc.cosmoshub.strange.love",
614
- * rest: "https://api.cosmoshub.strange.love",
615
- * chainId: "cosmoshub-4",
616
- * ...
624
+ * chainInfo: {
625
+ * rpc: "https://rpc.cosmoshub.strange.love",
626
+ * rest: "https://api.cosmoshub.strange.love",
627
+ * chainId: "cosmoshub-4",
628
+ * ...
629
+ * },
630
+ * ...
617
631
  * });
618
632
  * ```
619
633
  */
@@ -626,11 +640,11 @@ declare function useSuggestChainAndConnect({ onError, onLoading, onSuccess }?: U
626
640
  suggestAndConnect: _tanstack_react_query.UseMutateFunction<{
627
641
  account: Key;
628
642
  chain: ChainInfo;
629
- }, unknown, ChainInfo, unknown>;
643
+ }, unknown, SuggestChainAndConnectArgs, unknown>;
630
644
  suggestAndConnectAsync: _tanstack_react_query.UseMutateAsyncFunction<{
631
645
  account: Key;
632
646
  chain: ChainInfo;
633
- }, unknown, ChainInfo, unknown>;
647
+ }, unknown, SuggestChainAndConnectArgs, unknown>;
634
648
  };
635
649
 
636
650
  /**
@@ -817,4 +831,4 @@ declare function useGrazEvents(): null;
817
831
  */
818
832
  declare function GrazEvents(): null;
819
833
 
820
- export { ChainInfoWithPath, ConfigureGrazArgs, ConnectArgs, CreateClientArgs, CreateSigningClientArgs, Dictionary, GrazAdapter, GrazChain, GrazEvents, GrazProvider, GrazProviderProps, Maybe, SendIbcTokensArgs, SendTokensArgs, UseAccountArgs, UseConnectChainArgs, UseSuggestChainAndConnectArgs, UseSuggestChainArgs, WALLET_TYPES, WalletType, checkWallet, clearRecentChain, configureGraz, connect, createClients, createQueryClient, createSigningClients, defineChain, defineChainInfo, defineChains, disconnect, getActiveChainCurrency, getAvailableWallets, getBalances, getKeplr, getLeap, getRecentChain, getStakedBalances, getWallet, mainnetChains, mainnetChainsArray, reconnect, sendIbcTokens, sendTokens, suggestChain, suggestChainAndConnect, testnetChains, testnetChainsArray, useAccount, useActiveChain, useActiveChainCurrency, useActiveChainValidators, useBalance, useBalances, useCheckKeplr, useCheckWallet, useClients, useConnect, useDisconnect, useGrazEvents, useOfflineSigners, useQueryClient, useRecentChain, useSendIbcTokens, useSendTokens, useSigners, useSigningClients, useStakedBalances, useSuggestChain, useSuggestChainAndConnect };
834
+ export { ChainInfoWithPath, ConfigureGrazArgs, ConnectArgs, CreateClientArgs, CreateSigningClientArgs, Dictionary, GrazAdapter, GrazChain, GrazEvents, GrazProvider, GrazProviderProps, Maybe, SendIbcTokensArgs, SendTokensArgs, SuggestChainAndConnectArgs, UseAccountArgs, UseConnectChainArgs, UseSuggestChainAndConnectArgs, UseSuggestChainArgs, WALLET_TYPES, WalletType, checkWallet, clearRecentChain, configureGraz, connect, createClients, createQueryClient, createSigningClients, defineChain, defineChainInfo, defineChains, disconnect, getActiveChainCurrency, getAvailableWallets, getBalances, getKeplr, getLeap, getRecentChain, getStakedBalances, getWallet, mainnetChains, mainnetChainsArray, reconnect, sendIbcTokens, sendTokens, suggestChain, suggestChainAndConnect, testnetChains, testnetChainsArray, useAccount, useActiveChain, useActiveChainCurrency, useActiveChainValidators, useBalance, useBalances, useCheckKeplr, useCheckWallet, useClients, useConnect, useDisconnect, useGrazEvents, useOfflineSigners, useQueryClient, useRecentChain, useSendIbcTokens, useSendTokens, useSigners, useSigningClients, useStakedBalances, useSuggestChain, useSuggestChainAndConnect };
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- "use strict";var it=Object.create;var I=Object.defineProperty;var ct=Object.getOwnPropertyDescriptor;var ut=Object.getOwnPropertyNames;var at=Object.getPrototypeOf,pt=Object.prototype.hasOwnProperty;var mt=(e,t)=>()=>(e&&(t=e(e=0)),t);var w=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),lt=(e,t)=>{for(var n in t)I(e,n,{get:t[n],enumerable:!0})},fe=(e,t,n,c)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of ut(t))!pt.call(e,o)&&o!==n&&I(e,o,{get:()=>t[o],enumerable:!(c=ct(t,o))||c.enumerable});return e};var B=(e,t,n)=>(n=e!=null?it(at(e)):{},fe(t||!e||!e.__esModule?I(n,"default",{value:e,enumerable:!0}):n,e)),ft=e=>fe(I({},"__esModule",{value:!0}),e);var a,r=mt(()=>{"use strict";a=B(require("react"))});var de=w(C=>{"use strict";r();Object.defineProperty(C,"__esModule",{value:!0});C.arrayContentStartsWith=C.arrayContentEquals=void 0;function dt(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;++n)if(e[n]!==t[n])return!1;return!0}C.arrayContentEquals=dt;function gt(e,t){if(e.length<t.length)return!1;for(let n=0;n<t.length;++n)if(e[n]!==t[n])return!1;return!0}C.arrayContentStartsWith=gt});var ge=w(f=>{"use strict";r();Object.defineProperty(f,"__esModule",{value:!0});f.assertDefinedAndNotNull=f.assertDefined=f.assert=void 0;function Ct(e,t){if(!e)throw new Error(t||"condition is not truthy")}f.assert=Ct;function ht(e,t){if(e===void 0)throw new Error(t??"value is undefined")}f.assertDefined=ht;function xt(e,t){if(e==null)throw new Error(t??"value is undefined or null")}f.assertDefinedAndNotNull=xt});var Ce=w(v=>{"use strict";r();Object.defineProperty(v,"__esModule",{value:!0});v.sleep=void 0;async function St(e){return new Promise(t=>setTimeout(t,e))}v.sleep=St});var xe=w(h=>{"use strict";r();Object.defineProperty(h,"__esModule",{value:!0});h.isUint8Array=h.isNonNullObject=void 0;function he(e){return typeof e=="object"&&e!==null}h.isNonNullObject=he;function At(e){return!(!he(e)||Object.prototype.toString.call(e)!=="[object Uint8Array]"||typeof Buffer<"u"&&typeof Buffer.isBuffer<"u"&&Buffer.isBuffer(e))}h.isUint8Array=At});var be=w(m=>{"use strict";r();Object.defineProperty(m,"__esModule",{value:!0});m.isUint8Array=m.isNonNullObject=m.sleep=m.assertDefinedAndNotNull=m.assertDefined=m.assert=m.arrayContentStartsWith=m.arrayContentEquals=void 0;var Se=de();Object.defineProperty(m,"arrayContentEquals",{enumerable:!0,get:function(){return Se.arrayContentEquals}});Object.defineProperty(m,"arrayContentStartsWith",{enumerable:!0,get:function(){return Se.arrayContentStartsWith}});var K=ge();Object.defineProperty(m,"assert",{enumerable:!0,get:function(){return K.assert}});Object.defineProperty(m,"assertDefined",{enumerable:!0,get:function(){return K.assertDefined}});Object.defineProperty(m,"assertDefinedAndNotNull",{enumerable:!0,get:function(){return K.assertDefinedAndNotNull}});var bt=Ce();Object.defineProperty(m,"sleep",{enumerable:!0,get:function(){return bt.sleep}});var Ae=xe();Object.defineProperty(m,"isNonNullObject",{enumerable:!0,get:function(){return Ae.isNonNullObject}});Object.defineProperty(m,"isUint8Array",{enumerable:!0,get:function(){return Ae.isUint8Array}})});var gn={};lt(gn,{GrazEvents:()=>pe,GrazProvider:()=>dn,WALLET_TYPES:()=>P,WalletType:()=>z,checkWallet:()=>G,clearRecentChain:()=>_,configureGraz:()=>V,connect:()=>A,createClients:()=>D,createQueryClient:()=>W,createSigningClients:()=>k,defineChain:()=>Ft,defineChainInfo:()=>_t,defineChains:()=>Rt,disconnect:()=>F,getActiveChainCurrency:()=>H,getAvailableWallets:()=>Et,getBalances:()=>J,getKeplr:()=>we,getLeap:()=>De,getRecentChain:()=>jt,getStakedBalances:()=>Y,getWallet:()=>S,mainnetChains:()=>Ht,mainnetChainsArray:()=>Lt,reconnect:()=>d,sendIbcTokens:()=>X,sendTokens:()=>$,suggestChain:()=>q,suggestChainAndConnect:()=>L,testnetChains:()=>Vt,testnetChainsArray:()=>Jt,useAccount:()=>E,useActiveChain:()=>nn,useActiveChainCurrency:()=>on,useActiveChainValidators:()=>rn,useBalance:()=>$t,useBalances:()=>$e,useCheckKeplr:()=>Yt,useCheckWallet:()=>b,useClients:()=>pn,useConnect:()=>Xt,useDisconnect:()=>Zt,useGrazEvents:()=>tt,useOfflineSigners:()=>Xe,useQueryClient:()=>an,useRecentChain:()=>sn,useSendIbcTokens:()=>fn,useSendTokens:()=>ln,useSigners:()=>en,useSigningClients:()=>mn,useStakedBalances:()=>tn,useSuggestChain:()=>cn,useSuggestChainAndConnect:()=>un});module.exports=ft(gn);r();r();var ke=require("@cosmjs/stargate");r();var ye=B(require("zustand")),T=require("zustand/middleware");r();var z=(n=>(n.KEPLR="keplr",n.LEAP="leap",n))(z||{}),P=["keplr","leap"];var N={account:null,activeChain:null,balances:null,clients:null,defaultChain:null,defaultSigningClient:"stargate",offlineSigner:null,offlineSignerAmino:null,offlineSignerAuto:null,recentChain:null,signingClients:null,status:"disconnected",walletType:"keplr",_notFoundFn:()=>null,_reconnect:!1},yt={name:"graz",partialize:e=>({activeChain:e.activeChain,recentChain:e.recentChain,_reconnect:e._reconnect}),version:1},u=(0,ye.default)((0,T.subscribeWithSelector)((0,T.persist)(()=>N,yt)));r();var M=require("@cosmjs/cosmwasm-stargate"),R=require("@cosmjs/stargate"),je=require("@cosmjs/tendermint-rpc");r();var Ee=require("@cosmjs/stargate"),x=B(be());function W(...e){let{tendermint:t}=u.getState().clients,n=new Ee.QueryClient(t),c=e.map(o=>o(n));for(let o of c){(0,x.assert)((0,x.isNonNullObject)(o),"Extension must be a non-null object");for(let[i,s]of Object.entries(o)){(0,x.assert)((0,x.isNonNullObject)(s),`Module must be a non-null object. Found type ${typeof s} for module "${i}".`);let p=n[i]||{};n[i]={...p,...s}}}return n}async function D({rpc:e,rpcHeaders:t}){let n={url:e,headers:{...t||{}}},[c,o,i]=await Promise.all([M.SigningCosmWasmClient.connect(n),R.SigningStargateClient.connect(n),je.Tendermint34Client.connect(e)]);return{cosmWasm:c,stargate:o,tendermint:i}}async function k(e){let{rpc:t,rpcHeaders:n,offlineSignerAuto:c,cosmWasmSignerOptions:o={},stargateSignerOptions:i={}}=e,s={url:t,headers:{...n||{}}},[p,l]=await Promise.all([M.SigningCosmWasmClient.connectWithSigner(s,c,o),R.SigningStargateClient.connectWithSigner(s,c,i)]);return{cosmWasm:p,stargate:l}}r();function G(e=u.getState().walletType){try{return S(e),!0}catch(t){return console.error(t),!1}}function we(){if(typeof window.keplr<"u")return window.keplr;throw u.getState()._notFoundFn(),new Error("window.keplr is not defined")}function De(){if(typeof window.leap<"u")return window.leap;throw u.getState()._notFoundFn(),new Error("window.leap is not defined")}function S(e=u.getState().walletType){switch(e){case"keplr":return we();case"leap":return De();default:throw new Error("Unknown wallet type")}}function Et(){return Object.fromEntries(P.map(e=>[e,G(e)]))}async function A(e){try{let{defaultChain:t,recentChain:n,walletType:c}=u.getState(),o=(e==null?void 0:e.walletType)||c,i=S(o),s=e||n||t;if(!s)throw new Error("No last known connected chain, connect action requires chain info");u.setState(O=>{let st=O._reconnect;return O.activeChain&&O.activeChain.chainId!==s.chainId?{status:"connecting"}:st?{status:"reconnecting"}:{status:"connecting"}}),await i.enable(s.chainId);let p=i.getOfflineSigner(s.chainId),l=i.getOfflineSignerOnlyAmino(s.chainId),y=await i.getOfflineSignerAuto(s.chainId),nt=s.gas?ke.GasPrice.fromString(`${s.gas.price}${s.gas.denom}`):void 0,[le,ot,rt]=await Promise.all([i.getKey(s.chainId),D(s),k({...s,offlineSignerAuto:y,cosmWasmSignerOptions:{gasPrice:nt,...(e==null?void 0:e.signerOpts)||{}}})]);return u.setState({account:le,activeChain:s,clients:ot,offlineSigner:p,offlineSignerAmino:l,offlineSignerAuto:y,recentChain:s,signingClients:rt,status:"connected",walletType:o,_reconnect:!0}),le}catch(t){throw u.getState().account===null&&u.setState({status:"disconnected"}),t}}async function F(e=!1){return u.setState(t=>({...N,recentChain:e?null:t.recentChain})),Promise.resolve()}function d(){let{activeChain:e}=u.getState();e&&A(e)}r();function _(){u.setState({recentChain:null})}function H(e){let{activeChain:t}=u.getState();return t==null?void 0:t.currencies.find(n=>n.coinMinimalDenom===e)}function jt(){return u.getState().recentChain}async function q(e){return await S().experimentalSuggestChain(e),e}async function L(e){let t=await q(e);return{account:await A(e),chain:t}}r();function V(e={}){return u.setState(t=>({defaultChain:e.defaultChain||t.defaultChain,defaultSigningClient:e.defaultSigningClient||e.defaultSigningClient,walletType:e.defaultWallet||t.walletType,_notFoundFn:e.onNotFound||t._notFoundFn})),e}r();async function J(e){let{activeChain:t,signingClients:n}=u.getState();if(!t||!n)throw new Error("No connected account detected");let{defaultSigningClient:c}=u.getState();return await Promise.all(t.currencies.map(async i=>n[c].getBalance(e,i.coinMinimalDenom)))}async function Y(e){let{clients:t}=u.getState();if(!(t!=null&&t.stargate))throw new Error("Stargate client is not ready");return t.stargate.getBalanceStaked(e)}async function $({senderAddress:e,recipientAddress:t,amount:n,fee:c,memo:o}){let{signingClients:i,defaultSigningClient:s}=u.getState();if(!i)throw new Error("No connected account detected");if(!e)throw new Error("senderAddress is not defined");return i[s].sendTokens(e,t,n,c,o)}async function X({senderAddress:e,recipientAddress:t,transferAmount:n,sourcePort:c,sourceChannel:o,timeoutHeight:i,timeoutTimestamp:s,fee:p,memo:l}){let{signingClients:y}=u.getState();if(!(y!=null&&y.stargate))throw new Error("Stargate signing client is not ready");if(!e)throw new Error("senderAddress is not defined");return y.stargate.sendIbcTokens(e,t,n,c,o,i,s,p,l)}r();r();var Be=require("@keplr-wallet/cosmos"),Te={coinDenom:"axl",coinMinimalDenom:"uaxl",coinDecimals:6,coinGeckoId:"axelar-network",coinImageUrl:"https://raw.githubusercontent.com/cosmos/chain-registry/master/axelar/images/axl.png"},wt={coinDenom:"usdc",coinMinimalDenom:"uusdc",coinDecimals:6,coinGeckoId:"usd-coin",coinImageUrl:"https://raw.githubusercontent.com/cosmos/chain-registry/master/axelar/images/usdc.png"},Dt={coinDenom:"dai",coinMinimalDenom:"dai-wei",coinDecimals:18,coinGeckoId:"dai",coinImageUrl:"https://raw.githubusercontent.com/cosmos/chain-registry/master/axelar/images/dai.png"},kt={coinDenom:"usdt",coinMinimalDenom:"uusdt",coinDecimals:6,coinGeckoId:"tether",coinImageUrl:"https://raw.githubusercontent.com/cosmos/chain-registry/master/axelar/images/usdt.png"},It={coinDenom:"weth-wei",coinMinimalDenom:"weth",coinDecimals:18,coinGeckoId:"weth",coinImageUrl:"https://raw.githubusercontent.com/cosmos/chain-registry/master/axelar/images/weth.png"},Bt={coinDenom:"wbtc-satoshi",coinMinimalDenom:"wbtc",coinDecimals:8,coinGeckoId:"wrapped-bitcoin",coinImageUrl:"https://raw.githubusercontent.com/cosmos/chain-registry/master/axelar/images/wbtc.png"},Ie=[Te,wt,Dt,kt,It,Bt],Z={rpc:"https://rpc.axelar.strange.love",rest:"https://api.axelar.strange.love",chainId:"axelar-dojo-1",chainName:"Axelar",stakeCurrency:Te,bip44:{coinType:118},bech32Config:Be.Bech32Address.defaultBech32Config("axelar"),currencies:Ie,feeCurrencies:Ie};r();var Ge=require("@keplr-wallet/cosmos"),qe={coinDenom:"atom",coinMinimalDenom:"uatom",coinDecimals:6,coinGeckoId:"cosmos",coinImageUrl:"https://raw.githubusercontent.com/cosmos/chain-registry/master/cosmoshub/images/atom.png"},ve=[qe],U={rpc:"https://rpc.cosmoshub.strange.love",rest:"https://api.cosmoshub.strange.love",chainId:"cosmoshub-4",chainName:"Cosmos Hub",stakeCurrency:qe,bip44:{coinType:118},bech32Config:Ge.Bech32Address.defaultBech32Config("cosmos"),currencies:ve,feeCurrencies:ve};r();var Qe=require("@keplr-wallet/cosmos"),Oe={coinDenom:"juno",coinMinimalDenom:"ujuno",coinDecimals:6,coinGeckoId:"juno-network",coinImageUrl:"https://raw.githubusercontent.com/cosmos/chain-registry/master/juno/images/juno.png"},Tt={coinDenom:"neta",coinMinimalDenom:"cw20:juno168ctmpyppk90d34p3jjy658zf5a5l3w8wk35wht6ccqj4mr0yv8s4j5awr",coinDecimals:6,coinGeckoId:"neta",coinImageUrl:"https://raw.githubusercontent.com/cosmos/chain-registry/master/juno/images/neta.png"},vt={coinDenom:"marble",coinMinimalDenom:"cw20:juno1g2g7ucurum66d42g8k5twk34yegdq8c82858gz0tq2fc75zy7khssgnhjl",coinDecimals:3,coinGeckoId:"marble",coinImageUrl:"https://raw.githubusercontent.com/cosmos/chain-registry/master/juno/images/marble.png"},Gt={coinDenom:"hope",coinMinimalDenom:"cw20:juno1re3x67ppxap48ygndmrc7har2cnc7tcxtm9nplcas4v0gc3wnmvs3s807z",coinDecimals:6,coinGeckoId:"hope-galaxy",coinImageUrl:"https://raw.githubusercontent.com/cosmos/chain-registry/master/juno/images/hope.png"},qt={coinDenom:"rac",coinMinimalDenom:"cw20:juno1r4pzw8f9z0sypct5l9j906d47z998ulwvhvqe5xdwgy8wf84583sxwh0pa",coinDecimals:6,coinGeckoId:"racoon",coinImageUrl:"https://raw.githubusercontent.com/cosmos/chain-registry/master/juno/images/rac.png"},Ut={coinDenom:"block",coinMinimalDenom:"cw20:juno1y9rf7ql6ffwkv02hsgd4yruz23pn4w97p75e2slsnkm0mnamhzysvqnxaq",coinDecimals:6,coinImageUrl:"https://raw.githubusercontent.com/cosmos/chain-registry/master/juno/images/block.png"},Qt={coinDenom:"dhk",coinMinimalDenom:"cw20:juno1tdjwrqmnztn2j3sj2ln9xnyps5hs48q3ddwjrz7jpv6mskappjys5czd49",coinDecimals:0,coinImageUrl:"https://raw.githubusercontent.com/cosmos/chain-registry/master/juno/images/dhk.png"},Ot={coinDenom:"raw",coinMinimalDenom:"cw20:juno15u3dt79t6sxxa3x3kpkhzsy56edaa5a66wvt3kxmukqjz2sx0hes5sn38g",coinDecimals:6,coinImageUrl:"https://raw.githubusercontent.com/cosmos/chain-registry/master/juno/images/raw.png",coinGeckoId:"junoswap-raw-dao"},zt={coinDenom:"asvt",coinMinimalDenom:"cw20:juno17wzaxtfdw5em7lc94yed4ylgjme63eh73lm3lutp2rhcxttyvpwsypjm4w",coinDecimals:6,coinImageUrl:"https://raw.githubusercontent.com/cosmos/chain-registry/master/juno/images/asvt.png"},Pt={coinDenom:"hns",coinMinimalDenom:"cw20:juno1ur4jx0sxchdevahep7fwq28yk4tqsrhshdtylz46yka3uf6kky5qllqp4k",coinDecimals:6,coinImageUrl:"https://raw.githubusercontent.com/cosmos/chain-registry/master/juno/images/hns.svg"},Nt={coinDenom:"joe",coinMinimalDenom:"cw20:juno1n7n7d5088qlzlj37e9mgmkhx6dfgtvt02hqxq66lcap4dxnzdhwqfmgng3",coinDecimals:6,coinImageUrl:"https://raw.githubusercontent.com/cosmos/chain-registry/master/juno/images/joe.png"},Ue=[Oe,Tt,vt,Gt,qt,Ut,Qt,Ot,zt,Pt,Nt],ee={rpc:"https://rpc.juno.strange.love",rest:"https://api.juno.strange.love",chainId:"juno-1",chainName:"Juno",stakeCurrency:Oe,bip44:{coinType:118},bech32Config:Qe.Bech32Address.defaultBech32Config("juno"),currencies:Ue,feeCurrencies:Ue};r();var Pe=require("@keplr-wallet/cosmos"),Ne={coinDenom:"osmo",coinMinimalDenom:"uosmo",coinDecimals:6,coinGeckoId:"osmosis",coinImageUrl:"https://raw.githubusercontent.com/cosmos/chain-registry/master/cosmoshub/images/atom.png"},Kt={coinDenom:"ion",coinMinimalDenom:"uion",coinDecimals:6,coinGeckoId:"ion",coinImageUrl:"https://raw.githubusercontent.com/cosmos/chain-registry/master/osmosis/images/ion.png"},ze=[Ne,Kt],te={rpc:"https://rpc.osmosis.strange.love",rest:"https://api.osmosis.strange.love",chainId:"osmosis-1",chainName:"Osmosis",stakeCurrency:Ne,bip44:{coinType:118},bech32Config:Pe.Bech32Address.defaultBech32Config("osmo"),currencies:ze,feeCurrencies:ze};r();var We=require("@keplr-wallet/cosmos"),Me={coinDenom:"somm",coinMinimalDenom:"usomm",coinDecimals:6,coinGeckoId:"sommelier",coinImageUrl:"https://raw.githubusercontent.com/cosmos/chain-registry/master/sommelier/images/somm.png"},Ke=[Me],ne={rpc:"https://rpc.sommelier.strange.love",rest:"https://api.sommelier.strange.love",chainId:"sommelier-3",chainName:"Sommelier",stakeCurrency:Me,bip44:{coinType:118},bech32Config:We.Bech32Address.defaultBech32Config("somm"),currencies:Ke,feeCurrencies:Ke};r();var Fe=require("@keplr-wallet/cosmos"),_e={coinDenom:"CRE",coinMinimalDenom:"ucre",coinDecimals:6,coinGeckoId:"crescent",coinImageUrl:"https://raw.githubusercontent.com/crescent-network/asset/main/images/coin/CRE.png"},Re=[_e],oe={rpc:"https://testnet-endpoint.crescent.network/rpc/crescent",rest:"https://testnet-endpoint.crescent.network/api/crescent",chainId:"mooncat-1-1",chainName:"Crescent Testnet",bip44:{coinType:118},bech32Config:Fe.Bech32Address.defaultBech32Config("CRE"),currencies:Re,feeCurrencies:Re,stakeCurrency:_e,coinType:118};r();var He=require("@keplr-wallet/cosmos"),re={coinDenom:"junox",coinMinimalDenom:"ujunox",coinDecimals:6,coinGeckoId:"juno-network",coinImageUrl:"https://raw.githubusercontent.com/cosmos/chain-registry/master/juno/images/juno.png"},Wt=[re],se={rpc:"https://rpc.uni.junonetwork.io",rest:"https://api.uni.junonetwork.io",chainId:"uni-3",chainName:"Juno Testnet",stakeCurrency:re,bip44:{coinType:118},bech32Config:He.Bech32Address.defaultBech32Config("juno"),currencies:Wt,feeCurrencies:[re],coinType:118};r();var Le=require("@keplr-wallet/cosmos"),ie={coinDenom:"osmo",coinMinimalDenom:"uosmo",coinDecimals:6,coinGeckoId:"osmosis",coinImageUrl:"https://dhj8dql1kzq2v.cloudfront.net/white/osmo.png"},Mt=[ie],ce={rpc:"https://testnet-rpc.osmosis.zone",rest:"https://testnet-rest.osmosis.zone",chainId:"osmo-test-4",chainName:"Osmosis Testnet",stakeCurrency:ie,bip44:{coinType:118},bech32Config:Le.Bech32Address.defaultBech32Config("osmo"),currencies:Mt,feeCurrencies:[ie],coinType:118};function Rt(e){return e}function Ft(e){return e}function _t(e){return e}var Ht={axelar:Z,cosmos:U,cosmoshub:U,juno:ee,osmosis:te,sommelier:ne},Lt=[Z,U,ee,te,ne],Vt={crescent:oe,juno:se,osmosis:ce},Jt=[oe,se,ce];r();var g=require("@tanstack/react-query"),Je=require("react"),Ye=B(require("zustand/shallow"));r();var Ve=require("@tanstack/react-query");function Yt(){return b("keplr")}function b(e){let t=u(o=>e||o.walletType);return(0,Ve.useQuery)(["USE_CHECK_WALLET",t],({queryKey:[,o]})=>G(o))}function E({onConnect:e,onDisconnect:t}={}){let n=u(o=>o.account),c=u(o=>o.status);return(0,Je.useEffect)(()=>u.subscribe(o=>o.status,(o,i)=>{if(o==="connected"){let s=u.getState();e==null||e({account:s.account,isReconnect:i==="reconnecting"})}o==="disconnected"&&(t==null||t())}),[e,t]),{data:n,isConnected:Boolean(n),isConnecting:c==="connecting",isDisconnected:c==="disconnected",isReconnecting:c==="reconnecting",reconnect:d,status:c}}function $e(e){let{data:t}=E(),n=e||(t==null?void 0:t.bech32Address);return(0,g.useQuery)(["USE_BALANCES",n],({queryKey:[,i]})=>J(i),{enabled:Boolean(n)})}function $t(e,t){let{data:n}=$e(t);return(0,g.useQuery)(["USE_BALANCE",n,e,t],({queryKey:[,i]})=>i==null?void 0:i.find(s=>s.denom===e),{enabled:Boolean(n)})}function Xt({onError:e,onLoading:t,onSuccess:n}={}){let o=(0,g.useMutation)(["USE_CONNECT",e,t,n],A,{onError:(s,p)=>Promise.resolve(e==null?void 0:e(s,p)),onMutate:t,onSuccess:s=>Promise.resolve(n==null?void 0:n(s))}),{data:i}=b();return{connect:s=>o.mutate(s),connectAsync:s=>o.mutateAsync(s),error:o.error,isLoading:o.isLoading,isSuccess:o.isSuccess,isSupported:Boolean(i),status:o.status}}function Zt({onError:e,onLoading:t,onSuccess:n}={}){let o=(0,g.useMutation)(["USE_DISCONNECT",e,t,n],F,{onError:i=>Promise.resolve(e==null?void 0:e(i,void 0)),onMutate:t,onSuccess:()=>Promise.resolve(n==null?void 0:n(void 0))});return{disconnect:i=>o.mutate(i),disconnectAsync:i=>o.mutateAsync(i),error:o.error,isLoading:o.isLoading,isSuccess:o.isSuccess,status:o.status}}function Xe(){return u(e=>({signer:e.offlineSigner,signerAmino:e.offlineSignerAmino,signerAuto:e.offlineSignerAuto}),Ye.default)}function en(){return Xe()}function tn(e){let{data:t}=E(),n=e||(t==null?void 0:t.bech32Address);return(0,g.useQuery)(["USE_STAKED_BALANCES",n],({queryKey:[,i]})=>Y(n),{enabled:Boolean(n)})}r();var j=require("@tanstack/react-query");function nn(){return u(e=>e.activeChain)}function on(e){return(0,j.useQuery)(["USE_ACTIVE_CHAIN_CURRENCY",e],({queryKey:[,c]})=>H(c))}function rn(e,t="BOND_STATUS_BONDED"){return(0,j.useQuery)(["USE_ACTIVE_CHAIN_VALIDATORS",e,t],({queryKey:[,o,i]})=>o.staking.validators(i),{enabled:typeof e<"u"})}function sn(){return{data:u(t=>t.recentChain),clear:_}}function cn({onError:e,onLoading:t,onSuccess:n}={}){let o=(0,j.useMutation)(["USE_SUGGEST_CHAIN",e,t,n],q,{onError:(i,s)=>Promise.resolve(e==null?void 0:e(i,s)),onMutate:t,onSuccess:i=>Promise.resolve(n==null?void 0:n(i))});return{error:o.error,isLoading:o.isLoading,isSuccess:o.isSuccess,suggest:o.mutate,suggestAsync:o.mutateAsync,status:o.status}}function un({onError:e,onLoading:t,onSuccess:n}={}){let o=(0,j.useMutation)(["USE_SUGGEST_CHAIN_AND_CONNECT",e,t,n],L,{onError:(s,p)=>Promise.resolve(e==null?void 0:e(s,p)),onMutate:t,onSuccess:s=>Promise.resolve(n==null?void 0:n(s))}),{data:i}=b();return{error:o.error,isLoading:o.isLoading,isSuccess:o.isSuccess,isSupported:Boolean(i),status:o.status,suggestAndConnect:o.mutate,suggestAndConnectAsync:o.mutateAsync}}r();var ue=require("@tanstack/react-query");r();var Ze=require("@tanstack/react-query");function an(...e){let t=["USE_QUERY_CLIENT",...e];return(0,Ze.useQuery)(t,({queryKey:[,...c]})=>W(...e),{refetchOnMount:!1,refetchOnWindowFocus:!1})}function pn(e){let t=u(o=>o.clients);return(0,ue.useQuery)(["USE_CLIENTS",e,t],({queryKey:[,o,i]})=>o!=null&&o.rpc?D(o):i,{refetchOnMount:!1,refetchOnWindowFocus:!1})}function mn(e){let t=u(o=>o.signingClients);return(0,ue.useQuery)(["USE_SIGNING_CLIENTS",e,t],({queryKey:[,o,i]})=>o!=null&&o.rpc?k(o):i,{refetchOnMount:!1,refetchOnWindowFocus:!1})}r();var ae=require("@tanstack/react-query");function ln({onError:e,onLoading:t,onSuccess:n}={}){let{data:c}=E(),o=c==null?void 0:c.bech32Address,s=(0,ae.useMutation)(["USE_SEND_TOKENS",e,t,n,o],p=>$({senderAddress:o,...p}),{onError:(p,l)=>Promise.resolve(e==null?void 0:e(p,l)),onMutate:t,onSuccess:p=>Promise.resolve(n==null?void 0:n(p))});return{error:s.error,isLoading:s.isLoading,isSuccess:s.isSuccess,sendTokens:s.mutate,sendTokensAsync:s.mutateAsync,status:s.status}}function fn({onError:e,onLoading:t,onSuccess:n}={}){let{data:c}=E(),o=c==null?void 0:c.bech32Address,s=(0,ae.useMutation)(["USE_SEND_IBC_TOKENS",e,t,n,o],p=>X({senderAddress:o,...p}),{onError:(p,l)=>Promise.resolve(e==null?void 0:e(p,l)),onMutate:t,onSuccess:p=>Promise.resolve(n==null?void 0:n(p))});return{error:s.error,isLoading:s.isLoading,isSuccess:s.isSuccess,sendIbcTokens:s.mutate,sendIbcTokensAsync:s.mutateAsync,status:s.status}}r();var Q=require("@tanstack/react-query");r();var et=require("react");function tt(){return(0,et.useEffect)(()=>{let{_reconnect:e}=u.getState();return e&&d(),window.addEventListener("keplr_keystorechange",d),()=>{window.removeEventListener("keplr_keystorechange",d)}},[]),null}function pe(){return tt(),null}var me=require("react/jsx-runtime"),yn=new Q.QueryClient({});function dn({children:e,grazOptions:t,...n}){return t&&V(t),(0,me.jsxs)(Q.QueryClientProvider,{client:yn,...n,children:[(0,me.jsx)(pe,{}),e]})}0&&(module.exports={GrazEvents,GrazProvider,WALLET_TYPES,WalletType,checkWallet,clearRecentChain,configureGraz,connect,createClients,createQueryClient,createSigningClients,defineChain,defineChainInfo,defineChains,disconnect,getActiveChainCurrency,getAvailableWallets,getBalances,getKeplr,getLeap,getRecentChain,getStakedBalances,getWallet,mainnetChains,mainnetChainsArray,reconnect,sendIbcTokens,sendTokens,suggestChain,suggestChainAndConnect,testnetChains,testnetChainsArray,useAccount,useActiveChain,useActiveChainCurrency,useActiveChainValidators,useBalance,useBalances,useCheckKeplr,useCheckWallet,useClients,useConnect,useDisconnect,useGrazEvents,useOfflineSigners,useQueryClient,useRecentChain,useSendIbcTokens,useSendTokens,useSigners,useSigningClients,useStakedBalances,useSuggestChain,useSuggestChainAndConnect});
1
+ "use strict";var it=Object.create;var I=Object.defineProperty;var ct=Object.getOwnPropertyDescriptor;var ut=Object.getOwnPropertyNames;var at=Object.getPrototypeOf,pt=Object.prototype.hasOwnProperty;var mt=(e,t)=>()=>(e&&(t=e(e=0)),t);var w=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),lt=(e,t)=>{for(var n in t)I(e,n,{get:t[n],enumerable:!0})},fe=(e,t,n,c)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of ut(t))!pt.call(e,o)&&o!==n&&I(e,o,{get:()=>t[o],enumerable:!(c=ct(t,o))||c.enumerable});return e};var T=(e,t,n)=>(n=e!=null?it(at(e)):{},fe(t||!e||!e.__esModule?I(n,"default",{value:e,enumerable:!0}):n,e)),ft=e=>fe(I({},"__esModule",{value:!0}),e);var a,r=mt(()=>{"use strict";a=T(require("react"))});var de=w(C=>{"use strict";r();Object.defineProperty(C,"__esModule",{value:!0});C.arrayContentStartsWith=C.arrayContentEquals=void 0;function dt(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;++n)if(e[n]!==t[n])return!1;return!0}C.arrayContentEquals=dt;function gt(e,t){if(e.length<t.length)return!1;for(let n=0;n<t.length;++n)if(e[n]!==t[n])return!1;return!0}C.arrayContentStartsWith=gt});var ge=w(f=>{"use strict";r();Object.defineProperty(f,"__esModule",{value:!0});f.assertDefinedAndNotNull=f.assertDefined=f.assert=void 0;function Ct(e,t){if(!e)throw new Error(t||"condition is not truthy")}f.assert=Ct;function ht(e,t){if(e===void 0)throw new Error(t??"value is undefined")}f.assertDefined=ht;function xt(e,t){if(e==null)throw new Error(t??"value is undefined or null")}f.assertDefinedAndNotNull=xt});var Ce=w(v=>{"use strict";r();Object.defineProperty(v,"__esModule",{value:!0});v.sleep=void 0;async function St(e){return new Promise(t=>setTimeout(t,e))}v.sleep=St});var xe=w(h=>{"use strict";r();Object.defineProperty(h,"__esModule",{value:!0});h.isUint8Array=h.isNonNullObject=void 0;function he(e){return typeof e=="object"&&e!==null}h.isNonNullObject=he;function At(e){return!(!he(e)||Object.prototype.toString.call(e)!=="[object Uint8Array]"||typeof Buffer<"u"&&typeof Buffer.isBuffer<"u"&&Buffer.isBuffer(e))}h.isUint8Array=At});var be=w(m=>{"use strict";r();Object.defineProperty(m,"__esModule",{value:!0});m.isUint8Array=m.isNonNullObject=m.sleep=m.assertDefinedAndNotNull=m.assertDefined=m.assert=m.arrayContentStartsWith=m.arrayContentEquals=void 0;var Se=de();Object.defineProperty(m,"arrayContentEquals",{enumerable:!0,get:function(){return Se.arrayContentEquals}});Object.defineProperty(m,"arrayContentStartsWith",{enumerable:!0,get:function(){return Se.arrayContentStartsWith}});var K=ge();Object.defineProperty(m,"assert",{enumerable:!0,get:function(){return K.assert}});Object.defineProperty(m,"assertDefined",{enumerable:!0,get:function(){return K.assertDefined}});Object.defineProperty(m,"assertDefinedAndNotNull",{enumerable:!0,get:function(){return K.assertDefinedAndNotNull}});var bt=Ce();Object.defineProperty(m,"sleep",{enumerable:!0,get:function(){return bt.sleep}});var Ae=xe();Object.defineProperty(m,"isNonNullObject",{enumerable:!0,get:function(){return Ae.isNonNullObject}});Object.defineProperty(m,"isUint8Array",{enumerable:!0,get:function(){return Ae.isUint8Array}})});var gn={};lt(gn,{GrazEvents:()=>pe,GrazProvider:()=>dn,WALLET_TYPES:()=>P,WalletType:()=>z,checkWallet:()=>G,clearRecentChain:()=>_,configureGraz:()=>V,connect:()=>A,createClients:()=>D,createQueryClient:()=>W,createSigningClients:()=>k,defineChain:()=>Ft,defineChainInfo:()=>_t,defineChains:()=>Rt,disconnect:()=>F,getActiveChainCurrency:()=>H,getAvailableWallets:()=>Et,getBalances:()=>J,getKeplr:()=>we,getLeap:()=>De,getRecentChain:()=>jt,getStakedBalances:()=>Y,getWallet:()=>S,mainnetChains:()=>Ht,mainnetChainsArray:()=>Lt,reconnect:()=>d,sendIbcTokens:()=>X,sendTokens:()=>$,suggestChain:()=>q,suggestChainAndConnect:()=>L,testnetChains:()=>Vt,testnetChainsArray:()=>Jt,useAccount:()=>E,useActiveChain:()=>nn,useActiveChainCurrency:()=>on,useActiveChainValidators:()=>rn,useBalance:()=>$t,useBalances:()=>$e,useCheckKeplr:()=>Yt,useCheckWallet:()=>b,useClients:()=>pn,useConnect:()=>Xt,useDisconnect:()=>Zt,useGrazEvents:()=>tt,useOfflineSigners:()=>Xe,useQueryClient:()=>an,useRecentChain:()=>sn,useSendIbcTokens:()=>fn,useSendTokens:()=>ln,useSigners:()=>en,useSigningClients:()=>mn,useStakedBalances:()=>tn,useSuggestChain:()=>cn,useSuggestChainAndConnect:()=>un});module.exports=ft(gn);r();r();var ke=require("@cosmjs/stargate");r();var ye=T(require("zustand")),B=require("zustand/middleware");r();var z=(n=>(n.KEPLR="keplr",n.LEAP="leap",n))(z||{}),P=["keplr","leap"];var N={account:null,activeChain:null,balances:null,clients:null,defaultChain:null,defaultSigningClient:"stargate",offlineSigner:null,offlineSignerAmino:null,offlineSignerAuto:null,recentChain:null,signingClients:null,status:"disconnected",walletType:"keplr",_notFoundFn:()=>null,_reconnect:!1},yt={name:"graz",partialize:e=>({activeChain:e.activeChain,recentChain:e.recentChain,_reconnect:e._reconnect}),version:1},u=(0,ye.default)((0,B.subscribeWithSelector)((0,B.persist)(()=>N,yt)));r();var M=require("@cosmjs/cosmwasm-stargate"),R=require("@cosmjs/stargate"),je=require("@cosmjs/tendermint-rpc");r();var Ee=require("@cosmjs/stargate"),x=T(be());function W(...e){let{tendermint:t}=u.getState().clients,n=new Ee.QueryClient(t),c=e.map(o=>o(n));for(let o of c){(0,x.assert)((0,x.isNonNullObject)(o),"Extension must be a non-null object");for(let[i,s]of Object.entries(o)){(0,x.assert)((0,x.isNonNullObject)(s),`Module must be a non-null object. Found type ${typeof s} for module "${i}".`);let p=n[i]||{};n[i]={...p,...s}}}return n}async function D({rpc:e,rpcHeaders:t}){let n={url:e,headers:{...t||{}}},[c,o,i]=await Promise.all([M.SigningCosmWasmClient.connect(n),R.SigningStargateClient.connect(n),je.Tendermint34Client.connect(e)]);return{cosmWasm:c,stargate:o,tendermint:i}}async function k(e){let{rpc:t,rpcHeaders:n,offlineSignerAuto:c,cosmWasmSignerOptions:o={},stargateSignerOptions:i={}}=e,s={url:t,headers:{...n||{}}},[p,l]=await Promise.all([M.SigningCosmWasmClient.connectWithSigner(s,c,o),R.SigningStargateClient.connectWithSigner(s,c,i)]);return{cosmWasm:p,stargate:l}}r();function G(e=u.getState().walletType){try{return S(e),!0}catch(t){return console.error(t),!1}}function we(){if(typeof window.keplr<"u")return window.keplr;throw u.getState()._notFoundFn(),new Error("window.keplr is not defined")}function De(){if(typeof window.leap<"u")return window.leap;throw u.getState()._notFoundFn(),new Error("window.leap is not defined")}function S(e=u.getState().walletType){switch(e){case"keplr":return we();case"leap":return De();default:throw new Error("Unknown wallet type")}}function Et(){return Object.fromEntries(P.map(e=>[e,G(e)]))}async function A(e){try{let{defaultChain:t,recentChain:n,walletType:c}=u.getState(),o=(e==null?void 0:e.walletType)||c,i=S(o),s=e||n||t;if(!s)throw new Error("No last known connected chain, connect action requires chain info");u.setState(Q=>{let st=Q._reconnect;return Q.activeChain&&Q.activeChain.chainId!==s.chainId?{status:"connecting"}:st?{status:"reconnecting"}:{status:"connecting"}}),await i.enable(s.chainId);let p=i.getOfflineSigner(s.chainId),l=i.getOfflineSignerOnlyAmino(s.chainId),y=await i.getOfflineSignerAuto(s.chainId),nt=s.gas?ke.GasPrice.fromString(`${s.gas.price}${s.gas.denom}`):void 0,[le,ot,rt]=await Promise.all([i.getKey(s.chainId),D(s),k({...s,offlineSignerAuto:y,cosmWasmSignerOptions:{gasPrice:nt,...(e==null?void 0:e.signerOpts)||{}}})]);return u.setState({account:le,activeChain:s,clients:ot,offlineSigner:p,offlineSignerAmino:l,offlineSignerAuto:y,recentChain:s,signingClients:rt,status:"connected",walletType:o,_reconnect:!0}),le}catch(t){throw u.getState().account===null&&u.setState({status:"disconnected"}),t}}async function F(e=!1){return u.setState(t=>({...N,recentChain:e?null:t.recentChain})),Promise.resolve()}function d(){let{activeChain:e}=u.getState();e&&A(e)}r();function _(){u.setState({recentChain:null})}function H(e){let{activeChain:t}=u.getState();return t==null?void 0:t.currencies.find(n=>n.coinMinimalDenom===e)}function jt(){return u.getState().recentChain}async function q(e){return await S().experimentalSuggestChain(e),e}async function L({chainInfo:e,...t}){let n=await q(e);return{account:await A({chainId:e.chainId,currencies:e.currencies,rest:e.rest,rpc:e.rpc,...t}),chain:n}}r();function V(e={}){return u.setState(t=>({defaultChain:e.defaultChain||t.defaultChain,defaultSigningClient:e.defaultSigningClient||t.defaultSigningClient,walletType:e.defaultWallet||t.walletType,_notFoundFn:e.onNotFound||t._notFoundFn})),e}r();async function J(e){let{activeChain:t,signingClients:n}=u.getState();if(!t||!n)throw new Error("No connected account detected");let{defaultSigningClient:c}=u.getState();return await Promise.all(t.currencies.map(async i=>n[c].getBalance(e,i.coinMinimalDenom)))}async function Y(e){let{clients:t}=u.getState();if(!(t!=null&&t.stargate))throw new Error("Stargate client is not ready");return t.stargate.getBalanceStaked(e)}async function $({senderAddress:e,recipientAddress:t,amount:n,fee:c,memo:o}){let{signingClients:i,defaultSigningClient:s}=u.getState();if(!i)throw new Error("No connected account detected");if(!e)throw new Error("senderAddress is not defined");return i[s].sendTokens(e,t,n,c,o)}async function X({senderAddress:e,recipientAddress:t,transferAmount:n,sourcePort:c,sourceChannel:o,timeoutHeight:i,timeoutTimestamp:s,fee:p,memo:l}){let{signingClients:y}=u.getState();if(!(y!=null&&y.stargate))throw new Error("Stargate signing client is not ready");if(!e)throw new Error("senderAddress is not defined");return y.stargate.sendIbcTokens(e,t,n,c,o,i,s,p,l)}r();r();var Te=require("@keplr-wallet/cosmos"),Be={coinDenom:"axl",coinMinimalDenom:"uaxl",coinDecimals:6,coinGeckoId:"axelar-network",coinImageUrl:"https://raw.githubusercontent.com/cosmos/chain-registry/master/axelar/images/axl.png"},wt={coinDenom:"usdc",coinMinimalDenom:"uusdc",coinDecimals:6,coinGeckoId:"usd-coin",coinImageUrl:"https://raw.githubusercontent.com/cosmos/chain-registry/master/axelar/images/usdc.png"},Dt={coinDenom:"dai",coinMinimalDenom:"dai-wei",coinDecimals:18,coinGeckoId:"dai",coinImageUrl:"https://raw.githubusercontent.com/cosmos/chain-registry/master/axelar/images/dai.png"},kt={coinDenom:"usdt",coinMinimalDenom:"uusdt",coinDecimals:6,coinGeckoId:"tether",coinImageUrl:"https://raw.githubusercontent.com/cosmos/chain-registry/master/axelar/images/usdt.png"},It={coinDenom:"weth-wei",coinMinimalDenom:"weth",coinDecimals:18,coinGeckoId:"weth",coinImageUrl:"https://raw.githubusercontent.com/cosmos/chain-registry/master/axelar/images/weth.png"},Tt={coinDenom:"wbtc-satoshi",coinMinimalDenom:"wbtc",coinDecimals:8,coinGeckoId:"wrapped-bitcoin",coinImageUrl:"https://raw.githubusercontent.com/cosmos/chain-registry/master/axelar/images/wbtc.png"},Ie=[Be,wt,Dt,kt,It,Tt],Z={rpc:"https://rpc.axelar.strange.love",rest:"https://api.axelar.strange.love",chainId:"axelar-dojo-1",chainName:"Axelar",stakeCurrency:Be,bip44:{coinType:118},bech32Config:Te.Bech32Address.defaultBech32Config("axelar"),currencies:Ie,feeCurrencies:Ie};r();var Ge=require("@keplr-wallet/cosmos"),qe={coinDenom:"atom",coinMinimalDenom:"uatom",coinDecimals:6,coinGeckoId:"cosmos",coinImageUrl:"https://raw.githubusercontent.com/cosmos/chain-registry/master/cosmoshub/images/atom.png"},ve=[qe],U={rpc:"https://rpc.cosmoshub.strange.love",rest:"https://api.cosmoshub.strange.love",chainId:"cosmoshub-4",chainName:"Cosmos Hub",stakeCurrency:qe,bip44:{coinType:118},bech32Config:Ge.Bech32Address.defaultBech32Config("cosmos"),currencies:ve,feeCurrencies:ve};r();var Oe=require("@keplr-wallet/cosmos"),Qe={coinDenom:"juno",coinMinimalDenom:"ujuno",coinDecimals:6,coinGeckoId:"juno-network",coinImageUrl:"https://raw.githubusercontent.com/cosmos/chain-registry/master/juno/images/juno.png"},Bt={coinDenom:"neta",coinMinimalDenom:"cw20:juno168ctmpyppk90d34p3jjy658zf5a5l3w8wk35wht6ccqj4mr0yv8s4j5awr",coinDecimals:6,coinGeckoId:"neta",coinImageUrl:"https://raw.githubusercontent.com/cosmos/chain-registry/master/juno/images/neta.png"},vt={coinDenom:"marble",coinMinimalDenom:"cw20:juno1g2g7ucurum66d42g8k5twk34yegdq8c82858gz0tq2fc75zy7khssgnhjl",coinDecimals:3,coinGeckoId:"marble",coinImageUrl:"https://raw.githubusercontent.com/cosmos/chain-registry/master/juno/images/marble.png"},Gt={coinDenom:"hope",coinMinimalDenom:"cw20:juno1re3x67ppxap48ygndmrc7har2cnc7tcxtm9nplcas4v0gc3wnmvs3s807z",coinDecimals:6,coinGeckoId:"hope-galaxy",coinImageUrl:"https://raw.githubusercontent.com/cosmos/chain-registry/master/juno/images/hope.png"},qt={coinDenom:"rac",coinMinimalDenom:"cw20:juno1r4pzw8f9z0sypct5l9j906d47z998ulwvhvqe5xdwgy8wf84583sxwh0pa",coinDecimals:6,coinGeckoId:"racoon",coinImageUrl:"https://raw.githubusercontent.com/cosmos/chain-registry/master/juno/images/rac.png"},Ut={coinDenom:"block",coinMinimalDenom:"cw20:juno1y9rf7ql6ffwkv02hsgd4yruz23pn4w97p75e2slsnkm0mnamhzysvqnxaq",coinDecimals:6,coinImageUrl:"https://raw.githubusercontent.com/cosmos/chain-registry/master/juno/images/block.png"},Ot={coinDenom:"dhk",coinMinimalDenom:"cw20:juno1tdjwrqmnztn2j3sj2ln9xnyps5hs48q3ddwjrz7jpv6mskappjys5czd49",coinDecimals:0,coinImageUrl:"https://raw.githubusercontent.com/cosmos/chain-registry/master/juno/images/dhk.png"},Qt={coinDenom:"raw",coinMinimalDenom:"cw20:juno15u3dt79t6sxxa3x3kpkhzsy56edaa5a66wvt3kxmukqjz2sx0hes5sn38g",coinDecimals:6,coinImageUrl:"https://raw.githubusercontent.com/cosmos/chain-registry/master/juno/images/raw.png",coinGeckoId:"junoswap-raw-dao"},zt={coinDenom:"asvt",coinMinimalDenom:"cw20:juno17wzaxtfdw5em7lc94yed4ylgjme63eh73lm3lutp2rhcxttyvpwsypjm4w",coinDecimals:6,coinImageUrl:"https://raw.githubusercontent.com/cosmos/chain-registry/master/juno/images/asvt.png"},Pt={coinDenom:"hns",coinMinimalDenom:"cw20:juno1ur4jx0sxchdevahep7fwq28yk4tqsrhshdtylz46yka3uf6kky5qllqp4k",coinDecimals:6,coinImageUrl:"https://raw.githubusercontent.com/cosmos/chain-registry/master/juno/images/hns.svg"},Nt={coinDenom:"joe",coinMinimalDenom:"cw20:juno1n7n7d5088qlzlj37e9mgmkhx6dfgtvt02hqxq66lcap4dxnzdhwqfmgng3",coinDecimals:6,coinImageUrl:"https://raw.githubusercontent.com/cosmos/chain-registry/master/juno/images/joe.png"},Ue=[Qe,Bt,vt,Gt,qt,Ut,Ot,Qt,zt,Pt,Nt],ee={rpc:"https://rpc.juno.strange.love",rest:"https://api.juno.strange.love",chainId:"juno-1",chainName:"Juno",stakeCurrency:Qe,bip44:{coinType:118},bech32Config:Oe.Bech32Address.defaultBech32Config("juno"),currencies:Ue,feeCurrencies:Ue};r();var Pe=require("@keplr-wallet/cosmos"),Ne={coinDenom:"osmo",coinMinimalDenom:"uosmo",coinDecimals:6,coinGeckoId:"osmosis",coinImageUrl:"https://raw.githubusercontent.com/cosmos/chain-registry/master/cosmoshub/images/atom.png"},Kt={coinDenom:"ion",coinMinimalDenom:"uion",coinDecimals:6,coinGeckoId:"ion",coinImageUrl:"https://raw.githubusercontent.com/cosmos/chain-registry/master/osmosis/images/ion.png"},ze=[Ne,Kt],te={rpc:"https://rpc.osmosis.strange.love",rest:"https://api.osmosis.strange.love",chainId:"osmosis-1",chainName:"Osmosis",stakeCurrency:Ne,bip44:{coinType:118},bech32Config:Pe.Bech32Address.defaultBech32Config("osmo"),currencies:ze,feeCurrencies:ze};r();var We=require("@keplr-wallet/cosmos"),Me={coinDenom:"somm",coinMinimalDenom:"usomm",coinDecimals:6,coinGeckoId:"sommelier",coinImageUrl:"https://raw.githubusercontent.com/cosmos/chain-registry/master/sommelier/images/somm.png"},Ke=[Me],ne={rpc:"https://rpc.sommelier.strange.love",rest:"https://api.sommelier.strange.love",chainId:"sommelier-3",chainName:"Sommelier",stakeCurrency:Me,bip44:{coinType:118},bech32Config:We.Bech32Address.defaultBech32Config("somm"),currencies:Ke,feeCurrencies:Ke};r();var Fe=require("@keplr-wallet/cosmos"),_e={coinDenom:"CRE",coinMinimalDenom:"ucre",coinDecimals:6,coinGeckoId:"crescent",coinImageUrl:"https://raw.githubusercontent.com/crescent-network/asset/main/images/coin/CRE.png"},Re=[_e],oe={rpc:"https://testnet-endpoint.crescent.network/rpc/crescent",rest:"https://testnet-endpoint.crescent.network/api/crescent",chainId:"mooncat-1-1",chainName:"Crescent Testnet",bip44:{coinType:118},bech32Config:Fe.Bech32Address.defaultBech32Config("CRE"),currencies:Re,feeCurrencies:Re,stakeCurrency:_e,coinType:118};r();var He=require("@keplr-wallet/cosmos"),re={coinDenom:"junox",coinMinimalDenom:"ujunox",coinDecimals:6,coinGeckoId:"juno-network",coinImageUrl:"https://raw.githubusercontent.com/cosmos/chain-registry/master/juno/images/juno.png"},Wt=[re],se={rpc:"https://rpc.uni.junonetwork.io",rest:"https://api.uni.junonetwork.io",chainId:"uni-3",chainName:"Juno Testnet",stakeCurrency:re,bip44:{coinType:118},bech32Config:He.Bech32Address.defaultBech32Config("juno"),currencies:Wt,feeCurrencies:[re],coinType:118};r();var Le=require("@keplr-wallet/cosmos"),ie={coinDenom:"osmo",coinMinimalDenom:"uosmo",coinDecimals:6,coinGeckoId:"osmosis",coinImageUrl:"https://dhj8dql1kzq2v.cloudfront.net/white/osmo.png"},Mt=[ie],ce={rpc:"https://testnet-rpc.osmosis.zone",rest:"https://testnet-rest.osmosis.zone",chainId:"osmo-test-4",chainName:"Osmosis Testnet",stakeCurrency:ie,bip44:{coinType:118},bech32Config:Le.Bech32Address.defaultBech32Config("osmo"),currencies:Mt,feeCurrencies:[ie],coinType:118};function Rt(e){return e}function Ft(e){return e}function _t(e){return e}var Ht={axelar:Z,cosmos:U,cosmoshub:U,juno:ee,osmosis:te,sommelier:ne},Lt=[Z,U,ee,te,ne],Vt={crescent:oe,juno:se,osmosis:ce},Jt=[oe,se,ce];r();var g=require("@tanstack/react-query"),Je=require("react"),Ye=T(require("zustand/shallow"));r();var Ve=require("@tanstack/react-query");function Yt(){return b("keplr")}function b(e){let t=u(o=>e||o.walletType);return(0,Ve.useQuery)(["USE_CHECK_WALLET",t],({queryKey:[,o]})=>G(o))}function E({onConnect:e,onDisconnect:t}={}){let n=u(o=>o.account),c=u(o=>o.status);return(0,Je.useEffect)(()=>u.subscribe(o=>o.status,(o,i)=>{if(o==="connected"){let s=u.getState();e==null||e({account:s.account,isReconnect:i==="reconnecting"})}o==="disconnected"&&(t==null||t())}),[e,t]),{data:n,isConnected:Boolean(n),isConnecting:c==="connecting",isDisconnected:c==="disconnected",isReconnecting:c==="reconnecting",reconnect:d,status:c}}function $e(e){let{data:t}=E(),n=e||(t==null?void 0:t.bech32Address);return(0,g.useQuery)(["USE_BALANCES",n],({queryKey:[,i]})=>J(i),{enabled:Boolean(n)})}function $t(e,t){let{data:n}=$e(t);return(0,g.useQuery)(["USE_BALANCE",n,e,t],({queryKey:[,i]})=>i==null?void 0:i.find(s=>s.denom===e),{enabled:Boolean(n)})}function Xt({onError:e,onLoading:t,onSuccess:n}={}){let o=(0,g.useMutation)(["USE_CONNECT",e,t,n],A,{onError:(s,p)=>Promise.resolve(e==null?void 0:e(s,p)),onMutate:t,onSuccess:s=>Promise.resolve(n==null?void 0:n(s))}),{data:i}=b();return{connect:s=>o.mutate(s),connectAsync:s=>o.mutateAsync(s),error:o.error,isLoading:o.isLoading,isSuccess:o.isSuccess,isSupported:Boolean(i),status:o.status}}function Zt({onError:e,onLoading:t,onSuccess:n}={}){let o=(0,g.useMutation)(["USE_DISCONNECT",e,t,n],F,{onError:i=>Promise.resolve(e==null?void 0:e(i,void 0)),onMutate:t,onSuccess:()=>Promise.resolve(n==null?void 0:n(void 0))});return{disconnect:i=>o.mutate(i),disconnectAsync:i=>o.mutateAsync(i),error:o.error,isLoading:o.isLoading,isSuccess:o.isSuccess,status:o.status}}function Xe(){return u(e=>({signer:e.offlineSigner,signerAmino:e.offlineSignerAmino,signerAuto:e.offlineSignerAuto}),Ye.default)}function en(){return Xe()}function tn(e){let{data:t}=E(),n=e||(t==null?void 0:t.bech32Address);return(0,g.useQuery)(["USE_STAKED_BALANCES",n],({queryKey:[,i]})=>Y(n),{enabled:Boolean(n)})}r();var j=require("@tanstack/react-query");function nn(){return u(e=>e.activeChain)}function on(e){return(0,j.useQuery)(["USE_ACTIVE_CHAIN_CURRENCY",e],({queryKey:[,c]})=>H(c))}function rn(e,t="BOND_STATUS_BONDED"){return(0,j.useQuery)(["USE_ACTIVE_CHAIN_VALIDATORS",e,t],({queryKey:[,o,i]})=>o.staking.validators(i),{enabled:typeof e<"u"})}function sn(){return{data:u(t=>t.recentChain),clear:_}}function cn({onError:e,onLoading:t,onSuccess:n}={}){let o=(0,j.useMutation)(["USE_SUGGEST_CHAIN",e,t,n],q,{onError:(i,s)=>Promise.resolve(e==null?void 0:e(i,s)),onMutate:t,onSuccess:i=>Promise.resolve(n==null?void 0:n(i))});return{error:o.error,isLoading:o.isLoading,isSuccess:o.isSuccess,suggest:o.mutate,suggestAsync:o.mutateAsync,status:o.status}}function un({onError:e,onLoading:t,onSuccess:n}={}){let o=(0,j.useMutation)(["USE_SUGGEST_CHAIN_AND_CONNECT",e,t,n],L,{onError:(s,p)=>Promise.resolve(e==null?void 0:e(s,p)),onMutate:s=>t==null?void 0:t(s),onSuccess:s=>Promise.resolve(n==null?void 0:n(s))}),{data:i}=b();return{error:o.error,isLoading:o.isLoading,isSuccess:o.isSuccess,isSupported:Boolean(i),status:o.status,suggestAndConnect:o.mutate,suggestAndConnectAsync:o.mutateAsync}}r();var ue=require("@tanstack/react-query");r();var Ze=require("@tanstack/react-query");function an(...e){let t=["USE_QUERY_CLIENT",...e];return(0,Ze.useQuery)(t,({queryKey:[,...c]})=>W(...e),{refetchOnMount:!1,refetchOnWindowFocus:!1})}function pn(e){let t=u(o=>o.clients);return(0,ue.useQuery)(["USE_CLIENTS",e,t],({queryKey:[,o,i]})=>o!=null&&o.rpc?D(o):i,{refetchOnMount:!1,refetchOnWindowFocus:!1})}function mn(e){let t=u(o=>o.signingClients);return(0,ue.useQuery)(["USE_SIGNING_CLIENTS",e,t],({queryKey:[,o,i]})=>o!=null&&o.rpc?k(o):i,{refetchOnMount:!1,refetchOnWindowFocus:!1})}r();var ae=require("@tanstack/react-query");function ln({onError:e,onLoading:t,onSuccess:n}={}){let{data:c}=E(),o=c==null?void 0:c.bech32Address,s=(0,ae.useMutation)(["USE_SEND_TOKENS",e,t,n,o],p=>$({senderAddress:o,...p}),{onError:(p,l)=>Promise.resolve(e==null?void 0:e(p,l)),onMutate:t,onSuccess:p=>Promise.resolve(n==null?void 0:n(p))});return{error:s.error,isLoading:s.isLoading,isSuccess:s.isSuccess,sendTokens:s.mutate,sendTokensAsync:s.mutateAsync,status:s.status}}function fn({onError:e,onLoading:t,onSuccess:n}={}){let{data:c}=E(),o=c==null?void 0:c.bech32Address,s=(0,ae.useMutation)(["USE_SEND_IBC_TOKENS",e,t,n,o],p=>X({senderAddress:o,...p}),{onError:(p,l)=>Promise.resolve(e==null?void 0:e(p,l)),onMutate:t,onSuccess:p=>Promise.resolve(n==null?void 0:n(p))});return{error:s.error,isLoading:s.isLoading,isSuccess:s.isSuccess,sendIbcTokens:s.mutate,sendIbcTokensAsync:s.mutateAsync,status:s.status}}r();var O=require("@tanstack/react-query");r();var et=require("react");function tt(){return(0,et.useEffect)(()=>{let{_reconnect:e}=u.getState();return e&&d(),window.addEventListener("keplr_keystorechange",d),()=>{window.removeEventListener("keplr_keystorechange",d)}},[]),null}function pe(){return tt(),null}var me=require("react/jsx-runtime"),yn=new O.QueryClient({});function dn({children:e,grazOptions:t,...n}){return t&&V(t),(0,me.jsxs)(O.QueryClientProvider,{client:yn,...n,children:[(0,me.jsx)(pe,{}),e]})}0&&(module.exports={GrazEvents,GrazProvider,WALLET_TYPES,WalletType,checkWallet,clearRecentChain,configureGraz,connect,createClients,createQueryClient,createSigningClients,defineChain,defineChainInfo,defineChains,disconnect,getActiveChainCurrency,getAvailableWallets,getBalances,getKeplr,getLeap,getRecentChain,getStakedBalances,getWallet,mainnetChains,mainnetChainsArray,reconnect,sendIbcTokens,sendTokens,suggestChain,suggestChainAndConnect,testnetChains,testnetChainsArray,useAccount,useActiveChain,useActiveChainCurrency,useActiveChainValidators,useBalance,useBalances,useCheckKeplr,useCheckWallet,useClients,useConnect,useDisconnect,useGrazEvents,useOfflineSigners,useQueryClient,useRecentChain,useSendIbcTokens,useSendTokens,useSigners,useSigningClients,useStakedBalances,useSuggestChain,useSuggestChainAndConnect});
package/dist/index.mjs CHANGED
@@ -1 +1 @@
1
- import{a as x,b as Ue,c as r}from"./chunk-6M3A6KFX.mjs";var H=x(d=>{"use strict";r();Object.defineProperty(d,"__esModule",{value:!0});d.arrayContentStartsWith=d.arrayContentEquals=void 0;function Ne(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;++n)if(e[n]!==t[n])return!1;return!0}d.arrayContentEquals=Ne;function Ke(e,t){if(e.length<t.length)return!1;for(let n=0;n<t.length;++n)if(e[n]!==t[n])return!1;return!0}d.arrayContentStartsWith=Ke});var L=x(f=>{"use strict";r();Object.defineProperty(f,"__esModule",{value:!0});f.assertDefinedAndNotNull=f.assertDefined=f.assert=void 0;function We(e,t){if(!e)throw new Error(t||"condition is not truthy")}f.assert=We;function Me(e,t){if(e===void 0)throw new Error(t??"value is undefined")}f.assertDefined=Me;function Re(e,t){if(e==null)throw new Error(t??"value is undefined or null")}f.assertDefinedAndNotNull=Re});var V=x(j=>{"use strict";r();Object.defineProperty(j,"__esModule",{value:!0});j.sleep=void 0;async function Fe(e){return new Promise(t=>setTimeout(t,e))}j.sleep=Fe});var Y=x(g=>{"use strict";r();Object.defineProperty(g,"__esModule",{value:!0});g.isUint8Array=g.isNonNullObject=void 0;function J(e){return typeof e=="object"&&e!==null}g.isNonNullObject=J;function _e(e){return!(!J(e)||Object.prototype.toString.call(e)!=="[object Uint8Array]"||typeof Buffer<"u"&&typeof Buffer.isBuffer<"u"&&Buffer.isBuffer(e))}g.isUint8Array=_e});var Z=x(m=>{"use strict";r();Object.defineProperty(m,"__esModule",{value:!0});m.isUint8Array=m.isNonNullObject=m.sleep=m.assertDefinedAndNotNull=m.assertDefined=m.assert=m.arrayContentStartsWith=m.arrayContentEquals=void 0;var $=H();Object.defineProperty(m,"arrayContentEquals",{enumerable:!0,get:function(){return $.arrayContentEquals}});Object.defineProperty(m,"arrayContentStartsWith",{enumerable:!0,get:function(){return $.arrayContentStartsWith}});var T=L();Object.defineProperty(m,"assert",{enumerable:!0,get:function(){return T.assert}});Object.defineProperty(m,"assertDefined",{enumerable:!0,get:function(){return T.assertDefined}});Object.defineProperty(m,"assertDefinedAndNotNull",{enumerable:!0,get:function(){return T.assertDefinedAndNotNull}});var He=V();Object.defineProperty(m,"sleep",{enumerable:!0,get:function(){return He.sleep}});var X=Y();Object.defineProperty(m,"isNonNullObject",{enumerable:!0,get:function(){return X.isNonNullObject}});Object.defineProperty(m,"isUint8Array",{enumerable:!0,get:function(){return X.isUint8Array}})});r();r();import{GasPrice as $e}from"@cosmjs/stargate";r();import Qe from"zustand";import{persist as Oe,subscribeWithSelector as ze}from"zustand/middleware";r();var F=(n=>(n.KEPLR="keplr",n.LEAP="leap",n))(F||{}),_=["keplr","leap"];var B={account:null,activeChain:null,balances:null,clients:null,defaultChain:null,defaultSigningClient:"stargate",offlineSigner:null,offlineSignerAmino:null,offlineSignerAuto:null,recentChain:null,signingClients:null,status:"disconnected",walletType:"keplr",_notFoundFn:()=>null,_reconnect:!1},Pe={name:"graz",partialize:e=>({activeChain:e.activeChain,recentChain:e.recentChain,_reconnect:e._reconnect}),version:1},c=Qe(ze(Oe(()=>B,Pe)));r();import{SigningCosmWasmClient as te}from"@cosmjs/cosmwasm-stargate";import{SigningStargateClient as ne}from"@cosmjs/stargate";import{Tendermint34Client as Ve}from"@cosmjs/tendermint-rpc";r();var C=Ue(Z());import{QueryClient as Le}from"@cosmjs/stargate";function ee(...e){let{tendermint:t}=c.getState().clients,n=new Le(t),u=e.map(o=>o(n));for(let o of u){(0,C.assert)((0,C.isNonNullObject)(o),"Extension must be a non-null object");for(let[i,s]of Object.entries(o)){(0,C.assert)((0,C.isNonNullObject)(s),`Module must be a non-null object. Found type ${typeof s} for module "${i}".`);let p=n[i]||{};n[i]={...p,...s}}}return n}async function w({rpc:e,rpcHeaders:t}){let n={url:e,headers:{...t||{}}},[u,o,i]=await Promise.all([te.connect(n),ne.connect(n),Ve.connect(e)]);return{cosmWasm:u,stargate:o,tendermint:i}}async function D(e){let{rpc:t,rpcHeaders:n,offlineSignerAuto:u,cosmWasmSignerOptions:o={},stargateSignerOptions:i={}}=e,s={url:t,headers:{...n||{}}},[p,l]=await Promise.all([te.connectWithSigner(s,u,o),ne.connectWithSigner(s,u,i)]);return{cosmWasm:p,stargate:l}}r();function v(e=c.getState().walletType){try{return S(e),!0}catch(t){return console.error(t),!1}}function Je(){if(typeof window.keplr<"u")return window.keplr;throw c.getState()._notFoundFn(),new Error("window.keplr is not defined")}function Ye(){if(typeof window.leap<"u")return window.leap;throw c.getState()._notFoundFn(),new Error("window.leap is not defined")}function S(e=c.getState().walletType){switch(e){case"keplr":return Je();case"leap":return Ye();default:throw new Error("Unknown wallet type")}}function on(){return Object.fromEntries(_.map(e=>[e,v(e)]))}async function A(e){try{let{defaultChain:t,recentChain:n,walletType:u}=c.getState(),o=(e==null?void 0:e.walletType)||u,i=S(o),s=e||n||t;if(!s)throw new Error("No last known connected chain, connect action requires chain info");c.setState(I=>{let qe=I._reconnect;return I.activeChain&&I.activeChain.chainId!==s.chainId?{status:"connecting"}:qe?{status:"reconnecting"}:{status:"connecting"}}),await i.enable(s.chainId);let p=i.getOfflineSigner(s.chainId),l=i.getOfflineSignerOnlyAmino(s.chainId),y=await i.getOfflineSignerAuto(s.chainId),Te=s.gas?$e.fromString(`${s.gas.price}${s.gas.denom}`):void 0,[R,ve,Ge]=await Promise.all([i.getKey(s.chainId),w(s),D({...s,offlineSignerAuto:y,cosmWasmSignerOptions:{gasPrice:Te,...(e==null?void 0:e.signerOpts)||{}}})]);return c.setState({account:R,activeChain:s,clients:ve,offlineSigner:p,offlineSignerAmino:l,offlineSignerAuto:y,recentChain:s,signingClients:Ge,status:"connected",walletType:o,_reconnect:!0}),R}catch(t){throw c.getState().account===null&&c.setState({status:"disconnected"}),t}}async function oe(e=!1){return c.setState(t=>({...B,recentChain:e?null:t.recentChain})),Promise.resolve()}function h(){let{activeChain:e}=c.getState();e&&A(e)}r();function re(){c.setState({recentChain:null})}function se(e){let{activeChain:t}=c.getState();return t==null?void 0:t.currencies.find(n=>n.coinMinimalDenom===e)}function yn(){return c.getState().recentChain}async function G(e){return await S().experimentalSuggestChain(e),e}async function ie(e){let t=await G(e);return{account:await A(e),chain:t}}r();function ce(e={}){return c.setState(t=>({defaultChain:e.defaultChain||t.defaultChain,defaultSigningClient:e.defaultSigningClient||e.defaultSigningClient,walletType:e.defaultWallet||t.walletType,_notFoundFn:e.onNotFound||t._notFoundFn})),e}r();async function ue(e){let{activeChain:t,signingClients:n}=c.getState();if(!t||!n)throw new Error("No connected account detected");let{defaultSigningClient:u}=c.getState();return await Promise.all(t.currencies.map(async i=>n[u].getBalance(e,i.coinMinimalDenom)))}async function ae(e){let{clients:t}=c.getState();if(!(t!=null&&t.stargate))throw new Error("Stargate client is not ready");return t.stargate.getBalanceStaked(e)}async function pe({senderAddress:e,recipientAddress:t,amount:n,fee:u,memo:o}){let{signingClients:i,defaultSigningClient:s}=c.getState();if(!i)throw new Error("No connected account detected");if(!e)throw new Error("senderAddress is not defined");return i[s].sendTokens(e,t,n,u,o)}async function me({senderAddress:e,recipientAddress:t,transferAmount:n,sourcePort:u,sourceChannel:o,timeoutHeight:i,timeoutTimestamp:s,fee:p,memo:l}){let{signingClients:y}=c.getState();if(!(y!=null&&y.stargate))throw new Error("Stargate signing client is not ready");if(!e)throw new Error("senderAddress is not defined");return y.stargate.sendIbcTokens(e,t,n,u,o,i,s,p,l)}r();r();import{Bech32Address as Xe}from"@keplr-wallet/cosmos";var fe={coinDenom:"axl",coinMinimalDenom:"uaxl",coinDecimals:6,coinGeckoId:"axelar-network",coinImageUrl:"https://raw.githubusercontent.com/cosmos/chain-registry/master/axelar/images/axl.png"},Ze={coinDenom:"usdc",coinMinimalDenom:"uusdc",coinDecimals:6,coinGeckoId:"usd-coin",coinImageUrl:"https://raw.githubusercontent.com/cosmos/chain-registry/master/axelar/images/usdc.png"},et={coinDenom:"dai",coinMinimalDenom:"dai-wei",coinDecimals:18,coinGeckoId:"dai",coinImageUrl:"https://raw.githubusercontent.com/cosmos/chain-registry/master/axelar/images/dai.png"},tt={coinDenom:"usdt",coinMinimalDenom:"uusdt",coinDecimals:6,coinGeckoId:"tether",coinImageUrl:"https://raw.githubusercontent.com/cosmos/chain-registry/master/axelar/images/usdt.png"},nt={coinDenom:"weth-wei",coinMinimalDenom:"weth",coinDecimals:18,coinGeckoId:"weth",coinImageUrl:"https://raw.githubusercontent.com/cosmos/chain-registry/master/axelar/images/weth.png"},ot={coinDenom:"wbtc-satoshi",coinMinimalDenom:"wbtc",coinDecimals:8,coinGeckoId:"wrapped-bitcoin",coinImageUrl:"https://raw.githubusercontent.com/cosmos/chain-registry/master/axelar/images/wbtc.png"},le=[fe,Ze,et,tt,nt,ot],q={rpc:"https://rpc.axelar.strange.love",rest:"https://api.axelar.strange.love",chainId:"axelar-dojo-1",chainName:"Axelar",stakeCurrency:fe,bip44:{coinType:118},bech32Config:Xe.defaultBech32Config("axelar"),currencies:le,feeCurrencies:le};r();import{Bech32Address as rt}from"@keplr-wallet/cosmos";var de={coinDenom:"atom",coinMinimalDenom:"uatom",coinDecimals:6,coinGeckoId:"cosmos",coinImageUrl:"https://raw.githubusercontent.com/cosmos/chain-registry/master/cosmoshub/images/atom.png"},ye=[de],k={rpc:"https://rpc.cosmoshub.strange.love",rest:"https://api.cosmoshub.strange.love",chainId:"cosmoshub-4",chainName:"Cosmos Hub",stakeCurrency:de,bip44:{coinType:118},bech32Config:rt.defaultBech32Config("cosmos"),currencies:ye,feeCurrencies:ye};r();import{Bech32Address as st}from"@keplr-wallet/cosmos";var Ce={coinDenom:"juno",coinMinimalDenom:"ujuno",coinDecimals:6,coinGeckoId:"juno-network",coinImageUrl:"https://raw.githubusercontent.com/cosmos/chain-registry/master/juno/images/juno.png"},it={coinDenom:"neta",coinMinimalDenom:"cw20:juno168ctmpyppk90d34p3jjy658zf5a5l3w8wk35wht6ccqj4mr0yv8s4j5awr",coinDecimals:6,coinGeckoId:"neta",coinImageUrl:"https://raw.githubusercontent.com/cosmos/chain-registry/master/juno/images/neta.png"},ct={coinDenom:"marble",coinMinimalDenom:"cw20:juno1g2g7ucurum66d42g8k5twk34yegdq8c82858gz0tq2fc75zy7khssgnhjl",coinDecimals:3,coinGeckoId:"marble",coinImageUrl:"https://raw.githubusercontent.com/cosmos/chain-registry/master/juno/images/marble.png"},ut={coinDenom:"hope",coinMinimalDenom:"cw20:juno1re3x67ppxap48ygndmrc7har2cnc7tcxtm9nplcas4v0gc3wnmvs3s807z",coinDecimals:6,coinGeckoId:"hope-galaxy",coinImageUrl:"https://raw.githubusercontent.com/cosmos/chain-registry/master/juno/images/hope.png"},at={coinDenom:"rac",coinMinimalDenom:"cw20:juno1r4pzw8f9z0sypct5l9j906d47z998ulwvhvqe5xdwgy8wf84583sxwh0pa",coinDecimals:6,coinGeckoId:"racoon",coinImageUrl:"https://raw.githubusercontent.com/cosmos/chain-registry/master/juno/images/rac.png"},pt={coinDenom:"block",coinMinimalDenom:"cw20:juno1y9rf7ql6ffwkv02hsgd4yruz23pn4w97p75e2slsnkm0mnamhzysvqnxaq",coinDecimals:6,coinImageUrl:"https://raw.githubusercontent.com/cosmos/chain-registry/master/juno/images/block.png"},mt={coinDenom:"dhk",coinMinimalDenom:"cw20:juno1tdjwrqmnztn2j3sj2ln9xnyps5hs48q3ddwjrz7jpv6mskappjys5czd49",coinDecimals:0,coinImageUrl:"https://raw.githubusercontent.com/cosmos/chain-registry/master/juno/images/dhk.png"},lt={coinDenom:"raw",coinMinimalDenom:"cw20:juno15u3dt79t6sxxa3x3kpkhzsy56edaa5a66wvt3kxmukqjz2sx0hes5sn38g",coinDecimals:6,coinImageUrl:"https://raw.githubusercontent.com/cosmos/chain-registry/master/juno/images/raw.png",coinGeckoId:"junoswap-raw-dao"},ft={coinDenom:"asvt",coinMinimalDenom:"cw20:juno17wzaxtfdw5em7lc94yed4ylgjme63eh73lm3lutp2rhcxttyvpwsypjm4w",coinDecimals:6,coinImageUrl:"https://raw.githubusercontent.com/cosmos/chain-registry/master/juno/images/asvt.png"},yt={coinDenom:"hns",coinMinimalDenom:"cw20:juno1ur4jx0sxchdevahep7fwq28yk4tqsrhshdtylz46yka3uf6kky5qllqp4k",coinDecimals:6,coinImageUrl:"https://raw.githubusercontent.com/cosmos/chain-registry/master/juno/images/hns.svg"},dt={coinDenom:"joe",coinMinimalDenom:"cw20:juno1n7n7d5088qlzlj37e9mgmkhx6dfgtvt02hqxq66lcap4dxnzdhwqfmgng3",coinDecimals:6,coinImageUrl:"https://raw.githubusercontent.com/cosmos/chain-registry/master/juno/images/joe.png"},ge=[Ce,it,ct,ut,at,pt,mt,lt,ft,yt,dt],U={rpc:"https://rpc.juno.strange.love",rest:"https://api.juno.strange.love",chainId:"juno-1",chainName:"Juno",stakeCurrency:Ce,bip44:{coinType:118},bech32Config:st.defaultBech32Config("juno"),currencies:ge,feeCurrencies:ge};r();import{Bech32Address as gt}from"@keplr-wallet/cosmos";var xe={coinDenom:"osmo",coinMinimalDenom:"uosmo",coinDecimals:6,coinGeckoId:"osmosis",coinImageUrl:"https://raw.githubusercontent.com/cosmos/chain-registry/master/cosmoshub/images/atom.png"},Ct={coinDenom:"ion",coinMinimalDenom:"uion",coinDecimals:6,coinGeckoId:"ion",coinImageUrl:"https://raw.githubusercontent.com/cosmos/chain-registry/master/osmosis/images/ion.png"},he=[xe,Ct],Q={rpc:"https://rpc.osmosis.strange.love",rest:"https://api.osmosis.strange.love",chainId:"osmosis-1",chainName:"Osmosis",stakeCurrency:xe,bip44:{coinType:118},bech32Config:gt.defaultBech32Config("osmo"),currencies:he,feeCurrencies:he};r();import{Bech32Address as ht}from"@keplr-wallet/cosmos";var Ae={coinDenom:"somm",coinMinimalDenom:"usomm",coinDecimals:6,coinGeckoId:"sommelier",coinImageUrl:"https://raw.githubusercontent.com/cosmos/chain-registry/master/sommelier/images/somm.png"},Se=[Ae],O={rpc:"https://rpc.sommelier.strange.love",rest:"https://api.sommelier.strange.love",chainId:"sommelier-3",chainName:"Sommelier",stakeCurrency:Ae,bip44:{coinType:118},bech32Config:ht.defaultBech32Config("somm"),currencies:Se,feeCurrencies:Se};r();import{Bech32Address as xt}from"@keplr-wallet/cosmos";var Ee={coinDenom:"CRE",coinMinimalDenom:"ucre",coinDecimals:6,coinGeckoId:"crescent",coinImageUrl:"https://raw.githubusercontent.com/crescent-network/asset/main/images/coin/CRE.png"},be=[Ee],z={rpc:"https://testnet-endpoint.crescent.network/rpc/crescent",rest:"https://testnet-endpoint.crescent.network/api/crescent",chainId:"mooncat-1-1",chainName:"Crescent Testnet",bip44:{coinType:118},bech32Config:xt.defaultBech32Config("CRE"),currencies:be,feeCurrencies:be,stakeCurrency:Ee,coinType:118};r();import{Bech32Address as St}from"@keplr-wallet/cosmos";var P={coinDenom:"junox",coinMinimalDenom:"ujunox",coinDecimals:6,coinGeckoId:"juno-network",coinImageUrl:"https://raw.githubusercontent.com/cosmos/chain-registry/master/juno/images/juno.png"},At=[P],N={rpc:"https://rpc.uni.junonetwork.io",rest:"https://api.uni.junonetwork.io",chainId:"uni-3",chainName:"Juno Testnet",stakeCurrency:P,bip44:{coinType:118},bech32Config:St.defaultBech32Config("juno"),currencies:At,feeCurrencies:[P],coinType:118};r();import{Bech32Address as bt}from"@keplr-wallet/cosmos";var K={coinDenom:"osmo",coinMinimalDenom:"uosmo",coinDecimals:6,coinGeckoId:"osmosis",coinImageUrl:"https://dhj8dql1kzq2v.cloudfront.net/white/osmo.png"},Et=[K],W={rpc:"https://testnet-rpc.osmosis.zone",rest:"https://testnet-rest.osmosis.zone",chainId:"osmo-test-4",chainName:"Osmosis Testnet",stakeCurrency:K,bip44:{coinType:118},bech32Config:bt.defaultBech32Config("osmo"),currencies:Et,feeCurrencies:[K],coinType:118};function _n(e){return e}function Hn(e){return e}function Ln(e){return e}var Vn={axelar:q,cosmos:k,cosmoshub:k,juno:U,osmosis:Q,sommelier:O},Jn=[q,k,U,Q,O],Yn={crescent:z,juno:N,osmosis:W},$n=[z,N,W];r();import{useMutation as je,useQuery as M}from"@tanstack/react-query";import{useEffect as wt}from"react";import Dt from"zustand/shallow";r();import{useQuery as jt}from"@tanstack/react-query";function no(){return b("keplr")}function b(e){let t=c(o=>e||o.walletType);return jt(["USE_CHECK_WALLET",t],({queryKey:[,o]})=>v(o))}function E({onConnect:e,onDisconnect:t}={}){let n=c(o=>o.account),u=c(o=>o.status);return wt(()=>c.subscribe(o=>o.status,(o,i)=>{if(o==="connected"){let s=c.getState();e==null||e({account:s.account,isReconnect:i==="reconnecting"})}o==="disconnected"&&(t==null||t())}),[e,t]),{data:n,isConnected:Boolean(n),isConnecting:u==="connecting",isDisconnected:u==="disconnected",isReconnecting:u==="reconnecting",reconnect:h,status:u}}function kt(e){let{data:t}=E(),n=e||(t==null?void 0:t.bech32Address);return M(["USE_BALANCES",n],({queryKey:[,i]})=>ue(i),{enabled:Boolean(n)})}function mo(e,t){let{data:n}=kt(t);return M(["USE_BALANCE",n,e,t],({queryKey:[,i]})=>i==null?void 0:i.find(s=>s.denom===e),{enabled:Boolean(n)})}function lo({onError:e,onLoading:t,onSuccess:n}={}){let o=je(["USE_CONNECT",e,t,n],A,{onError:(s,p)=>Promise.resolve(e==null?void 0:e(s,p)),onMutate:t,onSuccess:s=>Promise.resolve(n==null?void 0:n(s))}),{data:i}=b();return{connect:s=>o.mutate(s),connectAsync:s=>o.mutateAsync(s),error:o.error,isLoading:o.isLoading,isSuccess:o.isSuccess,isSupported:Boolean(i),status:o.status}}function fo({onError:e,onLoading:t,onSuccess:n}={}){let o=je(["USE_DISCONNECT",e,t,n],oe,{onError:i=>Promise.resolve(e==null?void 0:e(i,void 0)),onMutate:t,onSuccess:()=>Promise.resolve(n==null?void 0:n(void 0))});return{disconnect:i=>o.mutate(i),disconnectAsync:i=>o.mutateAsync(i),error:o.error,isLoading:o.isLoading,isSuccess:o.isSuccess,status:o.status}}function It(){return c(e=>({signer:e.offlineSigner,signerAmino:e.offlineSignerAmino,signerAuto:e.offlineSignerAuto}),Dt)}function yo(){return It()}function go(e){let{data:t}=E(),n=e||(t==null?void 0:t.bech32Address);return M(["USE_STAKED_BALANCES",n],({queryKey:[,i]})=>ae(n),{enabled:Boolean(n)})}r();import{useMutation as we,useQuery as De}from"@tanstack/react-query";function bo(){return c(e=>e.activeChain)}function Eo(e){return De(["USE_ACTIVE_CHAIN_CURRENCY",e],({queryKey:[,u]})=>se(u))}function jo(e,t="BOND_STATUS_BONDED"){return De(["USE_ACTIVE_CHAIN_VALIDATORS",e,t],({queryKey:[,o,i]})=>o.staking.validators(i),{enabled:typeof e<"u"})}function wo(){return{data:c(t=>t.recentChain),clear:re}}function Do({onError:e,onLoading:t,onSuccess:n}={}){let o=we(["USE_SUGGEST_CHAIN",e,t,n],G,{onError:(i,s)=>Promise.resolve(e==null?void 0:e(i,s)),onMutate:t,onSuccess:i=>Promise.resolve(n==null?void 0:n(i))});return{error:o.error,isLoading:o.isLoading,isSuccess:o.isSuccess,suggest:o.mutate,suggestAsync:o.mutateAsync,status:o.status}}function ko({onError:e,onLoading:t,onSuccess:n}={}){let o=we(["USE_SUGGEST_CHAIN_AND_CONNECT",e,t,n],ie,{onError:(s,p)=>Promise.resolve(e==null?void 0:e(s,p)),onMutate:t,onSuccess:s=>Promise.resolve(n==null?void 0:n(s))}),{data:i}=b();return{error:o.error,isLoading:o.isLoading,isSuccess:o.isSuccess,isSupported:Boolean(i),status:o.status,suggestAndConnect:o.mutate,suggestAndConnectAsync:o.mutateAsync}}r();import{useQuery as ke}from"@tanstack/react-query";r();import{useQuery as Bt}from"@tanstack/react-query";function vo(...e){let t=["USE_QUERY_CLIENT",...e];return Bt(t,({queryKey:[,...u]})=>ee(...e),{refetchOnMount:!1,refetchOnWindowFocus:!1})}function Oo(e){let t=c(o=>o.clients);return ke(["USE_CLIENTS",e,t],({queryKey:[,o,i]})=>o!=null&&o.rpc?w(o):i,{refetchOnMount:!1,refetchOnWindowFocus:!1})}function zo(e){let t=c(o=>o.signingClients);return ke(["USE_SIGNING_CLIENTS",e,t],({queryKey:[,o,i]})=>o!=null&&o.rpc?D(o):i,{refetchOnMount:!1,refetchOnWindowFocus:!1})}r();import{useMutation as Ie}from"@tanstack/react-query";function Ro({onError:e,onLoading:t,onSuccess:n}={}){let{data:u}=E(),o=u==null?void 0:u.bech32Address,s=Ie(["USE_SEND_TOKENS",e,t,n,o],p=>pe({senderAddress:o,...p}),{onError:(p,l)=>Promise.resolve(e==null?void 0:e(p,l)),onMutate:t,onSuccess:p=>Promise.resolve(n==null?void 0:n(p))});return{error:s.error,isLoading:s.isLoading,isSuccess:s.isSuccess,sendTokens:s.mutate,sendTokensAsync:s.mutateAsync,status:s.status}}function Fo({onError:e,onLoading:t,onSuccess:n}={}){let{data:u}=E(),o=u==null?void 0:u.bech32Address,s=Ie(["USE_SEND_IBC_TOKENS",e,t,n,o],p=>me({senderAddress:o,...p}),{onError:(p,l)=>Promise.resolve(e==null?void 0:e(p,l)),onMutate:t,onSuccess:p=>Promise.resolve(n==null?void 0:n(p))});return{error:s.error,isLoading:s.isLoading,isSuccess:s.isSuccess,sendIbcTokens:s.mutate,sendIbcTokensAsync:s.mutateAsync,status:s.status}}r();import{QueryClient as Gt,QueryClientProvider as qt}from"@tanstack/react-query";r();import{useEffect as Tt}from"react";function vt(){return Tt(()=>{let{_reconnect:e}=c.getState();return e&&h(),window.addEventListener("keplr_keystorechange",h),()=>{window.removeEventListener("keplr_keystorechange",h)}},[]),null}function Be(){return vt(),null}import{jsx as Qt,jsxs as Ot}from"react/jsx-runtime";var Ut=new Gt({});function Zo({children:e,grazOptions:t,...n}){return t&&ce(t),Ot(qt,{client:Ut,...n,children:[Qt(Be,{}),e]})}export{Be as GrazEvents,Zo as GrazProvider,_ as WALLET_TYPES,F as WalletType,v as checkWallet,re as clearRecentChain,ce as configureGraz,A as connect,w as createClients,ee as createQueryClient,D as createSigningClients,Hn as defineChain,Ln as defineChainInfo,_n as defineChains,oe as disconnect,se as getActiveChainCurrency,on as getAvailableWallets,ue as getBalances,Je as getKeplr,Ye as getLeap,yn as getRecentChain,ae as getStakedBalances,S as getWallet,Vn as mainnetChains,Jn as mainnetChainsArray,h as reconnect,me as sendIbcTokens,pe as sendTokens,G as suggestChain,ie as suggestChainAndConnect,Yn as testnetChains,$n as testnetChainsArray,E as useAccount,bo as useActiveChain,Eo as useActiveChainCurrency,jo as useActiveChainValidators,mo as useBalance,kt as useBalances,no as useCheckKeplr,b as useCheckWallet,Oo as useClients,lo as useConnect,fo as useDisconnect,vt as useGrazEvents,It as useOfflineSigners,vo as useQueryClient,wo as useRecentChain,Fo as useSendIbcTokens,Ro as useSendTokens,yo as useSigners,zo as useSigningClients,go as useStakedBalances,Do as useSuggestChain,ko as useSuggestChainAndConnect};
1
+ import{a as x,b as Ue,c as r}from"./chunk-6M3A6KFX.mjs";var H=x(d=>{"use strict";r();Object.defineProperty(d,"__esModule",{value:!0});d.arrayContentStartsWith=d.arrayContentEquals=void 0;function Ne(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;++n)if(e[n]!==t[n])return!1;return!0}d.arrayContentEquals=Ne;function Ke(e,t){if(e.length<t.length)return!1;for(let n=0;n<t.length;++n)if(e[n]!==t[n])return!1;return!0}d.arrayContentStartsWith=Ke});var L=x(f=>{"use strict";r();Object.defineProperty(f,"__esModule",{value:!0});f.assertDefinedAndNotNull=f.assertDefined=f.assert=void 0;function We(e,t){if(!e)throw new Error(t||"condition is not truthy")}f.assert=We;function Me(e,t){if(e===void 0)throw new Error(t??"value is undefined")}f.assertDefined=Me;function Re(e,t){if(e==null)throw new Error(t??"value is undefined or null")}f.assertDefinedAndNotNull=Re});var V=x(j=>{"use strict";r();Object.defineProperty(j,"__esModule",{value:!0});j.sleep=void 0;async function Fe(e){return new Promise(t=>setTimeout(t,e))}j.sleep=Fe});var Y=x(g=>{"use strict";r();Object.defineProperty(g,"__esModule",{value:!0});g.isUint8Array=g.isNonNullObject=void 0;function J(e){return typeof e=="object"&&e!==null}g.isNonNullObject=J;function _e(e){return!(!J(e)||Object.prototype.toString.call(e)!=="[object Uint8Array]"||typeof Buffer<"u"&&typeof Buffer.isBuffer<"u"&&Buffer.isBuffer(e))}g.isUint8Array=_e});var Z=x(m=>{"use strict";r();Object.defineProperty(m,"__esModule",{value:!0});m.isUint8Array=m.isNonNullObject=m.sleep=m.assertDefinedAndNotNull=m.assertDefined=m.assert=m.arrayContentStartsWith=m.arrayContentEquals=void 0;var $=H();Object.defineProperty(m,"arrayContentEquals",{enumerable:!0,get:function(){return $.arrayContentEquals}});Object.defineProperty(m,"arrayContentStartsWith",{enumerable:!0,get:function(){return $.arrayContentStartsWith}});var B=L();Object.defineProperty(m,"assert",{enumerable:!0,get:function(){return B.assert}});Object.defineProperty(m,"assertDefined",{enumerable:!0,get:function(){return B.assertDefined}});Object.defineProperty(m,"assertDefinedAndNotNull",{enumerable:!0,get:function(){return B.assertDefinedAndNotNull}});var He=V();Object.defineProperty(m,"sleep",{enumerable:!0,get:function(){return He.sleep}});var X=Y();Object.defineProperty(m,"isNonNullObject",{enumerable:!0,get:function(){return X.isNonNullObject}});Object.defineProperty(m,"isUint8Array",{enumerable:!0,get:function(){return X.isUint8Array}})});r();r();import{GasPrice as $e}from"@cosmjs/stargate";r();import Oe from"zustand";import{persist as Qe,subscribeWithSelector as ze}from"zustand/middleware";r();var F=(n=>(n.KEPLR="keplr",n.LEAP="leap",n))(F||{}),_=["keplr","leap"];var T={account:null,activeChain:null,balances:null,clients:null,defaultChain:null,defaultSigningClient:"stargate",offlineSigner:null,offlineSignerAmino:null,offlineSignerAuto:null,recentChain:null,signingClients:null,status:"disconnected",walletType:"keplr",_notFoundFn:()=>null,_reconnect:!1},Pe={name:"graz",partialize:e=>({activeChain:e.activeChain,recentChain:e.recentChain,_reconnect:e._reconnect}),version:1},c=Oe(ze(Qe(()=>T,Pe)));r();import{SigningCosmWasmClient as te}from"@cosmjs/cosmwasm-stargate";import{SigningStargateClient as ne}from"@cosmjs/stargate";import{Tendermint34Client as Ve}from"@cosmjs/tendermint-rpc";r();var C=Ue(Z());import{QueryClient as Le}from"@cosmjs/stargate";function ee(...e){let{tendermint:t}=c.getState().clients,n=new Le(t),u=e.map(o=>o(n));for(let o of u){(0,C.assert)((0,C.isNonNullObject)(o),"Extension must be a non-null object");for(let[i,s]of Object.entries(o)){(0,C.assert)((0,C.isNonNullObject)(s),`Module must be a non-null object. Found type ${typeof s} for module "${i}".`);let p=n[i]||{};n[i]={...p,...s}}}return n}async function w({rpc:e,rpcHeaders:t}){let n={url:e,headers:{...t||{}}},[u,o,i]=await Promise.all([te.connect(n),ne.connect(n),Ve.connect(e)]);return{cosmWasm:u,stargate:o,tendermint:i}}async function D(e){let{rpc:t,rpcHeaders:n,offlineSignerAuto:u,cosmWasmSignerOptions:o={},stargateSignerOptions:i={}}=e,s={url:t,headers:{...n||{}}},[p,l]=await Promise.all([te.connectWithSigner(s,u,o),ne.connectWithSigner(s,u,i)]);return{cosmWasm:p,stargate:l}}r();function v(e=c.getState().walletType){try{return S(e),!0}catch(t){return console.error(t),!1}}function Je(){if(typeof window.keplr<"u")return window.keplr;throw c.getState()._notFoundFn(),new Error("window.keplr is not defined")}function Ye(){if(typeof window.leap<"u")return window.leap;throw c.getState()._notFoundFn(),new Error("window.leap is not defined")}function S(e=c.getState().walletType){switch(e){case"keplr":return Je();case"leap":return Ye();default:throw new Error("Unknown wallet type")}}function on(){return Object.fromEntries(_.map(e=>[e,v(e)]))}async function A(e){try{let{defaultChain:t,recentChain:n,walletType:u}=c.getState(),o=(e==null?void 0:e.walletType)||u,i=S(o),s=e||n||t;if(!s)throw new Error("No last known connected chain, connect action requires chain info");c.setState(I=>{let qe=I._reconnect;return I.activeChain&&I.activeChain.chainId!==s.chainId?{status:"connecting"}:qe?{status:"reconnecting"}:{status:"connecting"}}),await i.enable(s.chainId);let p=i.getOfflineSigner(s.chainId),l=i.getOfflineSignerOnlyAmino(s.chainId),y=await i.getOfflineSignerAuto(s.chainId),Be=s.gas?$e.fromString(`${s.gas.price}${s.gas.denom}`):void 0,[R,ve,Ge]=await Promise.all([i.getKey(s.chainId),w(s),D({...s,offlineSignerAuto:y,cosmWasmSignerOptions:{gasPrice:Be,...(e==null?void 0:e.signerOpts)||{}}})]);return c.setState({account:R,activeChain:s,clients:ve,offlineSigner:p,offlineSignerAmino:l,offlineSignerAuto:y,recentChain:s,signingClients:Ge,status:"connected",walletType:o,_reconnect:!0}),R}catch(t){throw c.getState().account===null&&c.setState({status:"disconnected"}),t}}async function oe(e=!1){return c.setState(t=>({...T,recentChain:e?null:t.recentChain})),Promise.resolve()}function h(){let{activeChain:e}=c.getState();e&&A(e)}r();function re(){c.setState({recentChain:null})}function se(e){let{activeChain:t}=c.getState();return t==null?void 0:t.currencies.find(n=>n.coinMinimalDenom===e)}function yn(){return c.getState().recentChain}async function G(e){return await S().experimentalSuggestChain(e),e}async function ie({chainInfo:e,...t}){let n=await G(e);return{account:await A({chainId:e.chainId,currencies:e.currencies,rest:e.rest,rpc:e.rpc,...t}),chain:n}}r();function ce(e={}){return c.setState(t=>({defaultChain:e.defaultChain||t.defaultChain,defaultSigningClient:e.defaultSigningClient||t.defaultSigningClient,walletType:e.defaultWallet||t.walletType,_notFoundFn:e.onNotFound||t._notFoundFn})),e}r();async function ue(e){let{activeChain:t,signingClients:n}=c.getState();if(!t||!n)throw new Error("No connected account detected");let{defaultSigningClient:u}=c.getState();return await Promise.all(t.currencies.map(async i=>n[u].getBalance(e,i.coinMinimalDenom)))}async function ae(e){let{clients:t}=c.getState();if(!(t!=null&&t.stargate))throw new Error("Stargate client is not ready");return t.stargate.getBalanceStaked(e)}async function pe({senderAddress:e,recipientAddress:t,amount:n,fee:u,memo:o}){let{signingClients:i,defaultSigningClient:s}=c.getState();if(!i)throw new Error("No connected account detected");if(!e)throw new Error("senderAddress is not defined");return i[s].sendTokens(e,t,n,u,o)}async function me({senderAddress:e,recipientAddress:t,transferAmount:n,sourcePort:u,sourceChannel:o,timeoutHeight:i,timeoutTimestamp:s,fee:p,memo:l}){let{signingClients:y}=c.getState();if(!(y!=null&&y.stargate))throw new Error("Stargate signing client is not ready");if(!e)throw new Error("senderAddress is not defined");return y.stargate.sendIbcTokens(e,t,n,u,o,i,s,p,l)}r();r();import{Bech32Address as Xe}from"@keplr-wallet/cosmos";var fe={coinDenom:"axl",coinMinimalDenom:"uaxl",coinDecimals:6,coinGeckoId:"axelar-network",coinImageUrl:"https://raw.githubusercontent.com/cosmos/chain-registry/master/axelar/images/axl.png"},Ze={coinDenom:"usdc",coinMinimalDenom:"uusdc",coinDecimals:6,coinGeckoId:"usd-coin",coinImageUrl:"https://raw.githubusercontent.com/cosmos/chain-registry/master/axelar/images/usdc.png"},et={coinDenom:"dai",coinMinimalDenom:"dai-wei",coinDecimals:18,coinGeckoId:"dai",coinImageUrl:"https://raw.githubusercontent.com/cosmos/chain-registry/master/axelar/images/dai.png"},tt={coinDenom:"usdt",coinMinimalDenom:"uusdt",coinDecimals:6,coinGeckoId:"tether",coinImageUrl:"https://raw.githubusercontent.com/cosmos/chain-registry/master/axelar/images/usdt.png"},nt={coinDenom:"weth-wei",coinMinimalDenom:"weth",coinDecimals:18,coinGeckoId:"weth",coinImageUrl:"https://raw.githubusercontent.com/cosmos/chain-registry/master/axelar/images/weth.png"},ot={coinDenom:"wbtc-satoshi",coinMinimalDenom:"wbtc",coinDecimals:8,coinGeckoId:"wrapped-bitcoin",coinImageUrl:"https://raw.githubusercontent.com/cosmos/chain-registry/master/axelar/images/wbtc.png"},le=[fe,Ze,et,tt,nt,ot],q={rpc:"https://rpc.axelar.strange.love",rest:"https://api.axelar.strange.love",chainId:"axelar-dojo-1",chainName:"Axelar",stakeCurrency:fe,bip44:{coinType:118},bech32Config:Xe.defaultBech32Config("axelar"),currencies:le,feeCurrencies:le};r();import{Bech32Address as rt}from"@keplr-wallet/cosmos";var de={coinDenom:"atom",coinMinimalDenom:"uatom",coinDecimals:6,coinGeckoId:"cosmos",coinImageUrl:"https://raw.githubusercontent.com/cosmos/chain-registry/master/cosmoshub/images/atom.png"},ye=[de],k={rpc:"https://rpc.cosmoshub.strange.love",rest:"https://api.cosmoshub.strange.love",chainId:"cosmoshub-4",chainName:"Cosmos Hub",stakeCurrency:de,bip44:{coinType:118},bech32Config:rt.defaultBech32Config("cosmos"),currencies:ye,feeCurrencies:ye};r();import{Bech32Address as st}from"@keplr-wallet/cosmos";var Ce={coinDenom:"juno",coinMinimalDenom:"ujuno",coinDecimals:6,coinGeckoId:"juno-network",coinImageUrl:"https://raw.githubusercontent.com/cosmos/chain-registry/master/juno/images/juno.png"},it={coinDenom:"neta",coinMinimalDenom:"cw20:juno168ctmpyppk90d34p3jjy658zf5a5l3w8wk35wht6ccqj4mr0yv8s4j5awr",coinDecimals:6,coinGeckoId:"neta",coinImageUrl:"https://raw.githubusercontent.com/cosmos/chain-registry/master/juno/images/neta.png"},ct={coinDenom:"marble",coinMinimalDenom:"cw20:juno1g2g7ucurum66d42g8k5twk34yegdq8c82858gz0tq2fc75zy7khssgnhjl",coinDecimals:3,coinGeckoId:"marble",coinImageUrl:"https://raw.githubusercontent.com/cosmos/chain-registry/master/juno/images/marble.png"},ut={coinDenom:"hope",coinMinimalDenom:"cw20:juno1re3x67ppxap48ygndmrc7har2cnc7tcxtm9nplcas4v0gc3wnmvs3s807z",coinDecimals:6,coinGeckoId:"hope-galaxy",coinImageUrl:"https://raw.githubusercontent.com/cosmos/chain-registry/master/juno/images/hope.png"},at={coinDenom:"rac",coinMinimalDenom:"cw20:juno1r4pzw8f9z0sypct5l9j906d47z998ulwvhvqe5xdwgy8wf84583sxwh0pa",coinDecimals:6,coinGeckoId:"racoon",coinImageUrl:"https://raw.githubusercontent.com/cosmos/chain-registry/master/juno/images/rac.png"},pt={coinDenom:"block",coinMinimalDenom:"cw20:juno1y9rf7ql6ffwkv02hsgd4yruz23pn4w97p75e2slsnkm0mnamhzysvqnxaq",coinDecimals:6,coinImageUrl:"https://raw.githubusercontent.com/cosmos/chain-registry/master/juno/images/block.png"},mt={coinDenom:"dhk",coinMinimalDenom:"cw20:juno1tdjwrqmnztn2j3sj2ln9xnyps5hs48q3ddwjrz7jpv6mskappjys5czd49",coinDecimals:0,coinImageUrl:"https://raw.githubusercontent.com/cosmos/chain-registry/master/juno/images/dhk.png"},lt={coinDenom:"raw",coinMinimalDenom:"cw20:juno15u3dt79t6sxxa3x3kpkhzsy56edaa5a66wvt3kxmukqjz2sx0hes5sn38g",coinDecimals:6,coinImageUrl:"https://raw.githubusercontent.com/cosmos/chain-registry/master/juno/images/raw.png",coinGeckoId:"junoswap-raw-dao"},ft={coinDenom:"asvt",coinMinimalDenom:"cw20:juno17wzaxtfdw5em7lc94yed4ylgjme63eh73lm3lutp2rhcxttyvpwsypjm4w",coinDecimals:6,coinImageUrl:"https://raw.githubusercontent.com/cosmos/chain-registry/master/juno/images/asvt.png"},yt={coinDenom:"hns",coinMinimalDenom:"cw20:juno1ur4jx0sxchdevahep7fwq28yk4tqsrhshdtylz46yka3uf6kky5qllqp4k",coinDecimals:6,coinImageUrl:"https://raw.githubusercontent.com/cosmos/chain-registry/master/juno/images/hns.svg"},dt={coinDenom:"joe",coinMinimalDenom:"cw20:juno1n7n7d5088qlzlj37e9mgmkhx6dfgtvt02hqxq66lcap4dxnzdhwqfmgng3",coinDecimals:6,coinImageUrl:"https://raw.githubusercontent.com/cosmos/chain-registry/master/juno/images/joe.png"},ge=[Ce,it,ct,ut,at,pt,mt,lt,ft,yt,dt],U={rpc:"https://rpc.juno.strange.love",rest:"https://api.juno.strange.love",chainId:"juno-1",chainName:"Juno",stakeCurrency:Ce,bip44:{coinType:118},bech32Config:st.defaultBech32Config("juno"),currencies:ge,feeCurrencies:ge};r();import{Bech32Address as gt}from"@keplr-wallet/cosmos";var xe={coinDenom:"osmo",coinMinimalDenom:"uosmo",coinDecimals:6,coinGeckoId:"osmosis",coinImageUrl:"https://raw.githubusercontent.com/cosmos/chain-registry/master/cosmoshub/images/atom.png"},Ct={coinDenom:"ion",coinMinimalDenom:"uion",coinDecimals:6,coinGeckoId:"ion",coinImageUrl:"https://raw.githubusercontent.com/cosmos/chain-registry/master/osmosis/images/ion.png"},he=[xe,Ct],O={rpc:"https://rpc.osmosis.strange.love",rest:"https://api.osmosis.strange.love",chainId:"osmosis-1",chainName:"Osmosis",stakeCurrency:xe,bip44:{coinType:118},bech32Config:gt.defaultBech32Config("osmo"),currencies:he,feeCurrencies:he};r();import{Bech32Address as ht}from"@keplr-wallet/cosmos";var Ae={coinDenom:"somm",coinMinimalDenom:"usomm",coinDecimals:6,coinGeckoId:"sommelier",coinImageUrl:"https://raw.githubusercontent.com/cosmos/chain-registry/master/sommelier/images/somm.png"},Se=[Ae],Q={rpc:"https://rpc.sommelier.strange.love",rest:"https://api.sommelier.strange.love",chainId:"sommelier-3",chainName:"Sommelier",stakeCurrency:Ae,bip44:{coinType:118},bech32Config:ht.defaultBech32Config("somm"),currencies:Se,feeCurrencies:Se};r();import{Bech32Address as xt}from"@keplr-wallet/cosmos";var Ee={coinDenom:"CRE",coinMinimalDenom:"ucre",coinDecimals:6,coinGeckoId:"crescent",coinImageUrl:"https://raw.githubusercontent.com/crescent-network/asset/main/images/coin/CRE.png"},be=[Ee],z={rpc:"https://testnet-endpoint.crescent.network/rpc/crescent",rest:"https://testnet-endpoint.crescent.network/api/crescent",chainId:"mooncat-1-1",chainName:"Crescent Testnet",bip44:{coinType:118},bech32Config:xt.defaultBech32Config("CRE"),currencies:be,feeCurrencies:be,stakeCurrency:Ee,coinType:118};r();import{Bech32Address as St}from"@keplr-wallet/cosmos";var P={coinDenom:"junox",coinMinimalDenom:"ujunox",coinDecimals:6,coinGeckoId:"juno-network",coinImageUrl:"https://raw.githubusercontent.com/cosmos/chain-registry/master/juno/images/juno.png"},At=[P],N={rpc:"https://rpc.uni.junonetwork.io",rest:"https://api.uni.junonetwork.io",chainId:"uni-3",chainName:"Juno Testnet",stakeCurrency:P,bip44:{coinType:118},bech32Config:St.defaultBech32Config("juno"),currencies:At,feeCurrencies:[P],coinType:118};r();import{Bech32Address as bt}from"@keplr-wallet/cosmos";var K={coinDenom:"osmo",coinMinimalDenom:"uosmo",coinDecimals:6,coinGeckoId:"osmosis",coinImageUrl:"https://dhj8dql1kzq2v.cloudfront.net/white/osmo.png"},Et=[K],W={rpc:"https://testnet-rpc.osmosis.zone",rest:"https://testnet-rest.osmosis.zone",chainId:"osmo-test-4",chainName:"Osmosis Testnet",stakeCurrency:K,bip44:{coinType:118},bech32Config:bt.defaultBech32Config("osmo"),currencies:Et,feeCurrencies:[K],coinType:118};function _n(e){return e}function Hn(e){return e}function Ln(e){return e}var Vn={axelar:q,cosmos:k,cosmoshub:k,juno:U,osmosis:O,sommelier:Q},Jn=[q,k,U,O,Q],Yn={crescent:z,juno:N,osmosis:W},$n=[z,N,W];r();import{useMutation as je,useQuery as M}from"@tanstack/react-query";import{useEffect as wt}from"react";import Dt from"zustand/shallow";r();import{useQuery as jt}from"@tanstack/react-query";function no(){return b("keplr")}function b(e){let t=c(o=>e||o.walletType);return jt(["USE_CHECK_WALLET",t],({queryKey:[,o]})=>v(o))}function E({onConnect:e,onDisconnect:t}={}){let n=c(o=>o.account),u=c(o=>o.status);return wt(()=>c.subscribe(o=>o.status,(o,i)=>{if(o==="connected"){let s=c.getState();e==null||e({account:s.account,isReconnect:i==="reconnecting"})}o==="disconnected"&&(t==null||t())}),[e,t]),{data:n,isConnected:Boolean(n),isConnecting:u==="connecting",isDisconnected:u==="disconnected",isReconnecting:u==="reconnecting",reconnect:h,status:u}}function kt(e){let{data:t}=E(),n=e||(t==null?void 0:t.bech32Address);return M(["USE_BALANCES",n],({queryKey:[,i]})=>ue(i),{enabled:Boolean(n)})}function mo(e,t){let{data:n}=kt(t);return M(["USE_BALANCE",n,e,t],({queryKey:[,i]})=>i==null?void 0:i.find(s=>s.denom===e),{enabled:Boolean(n)})}function lo({onError:e,onLoading:t,onSuccess:n}={}){let o=je(["USE_CONNECT",e,t,n],A,{onError:(s,p)=>Promise.resolve(e==null?void 0:e(s,p)),onMutate:t,onSuccess:s=>Promise.resolve(n==null?void 0:n(s))}),{data:i}=b();return{connect:s=>o.mutate(s),connectAsync:s=>o.mutateAsync(s),error:o.error,isLoading:o.isLoading,isSuccess:o.isSuccess,isSupported:Boolean(i),status:o.status}}function fo({onError:e,onLoading:t,onSuccess:n}={}){let o=je(["USE_DISCONNECT",e,t,n],oe,{onError:i=>Promise.resolve(e==null?void 0:e(i,void 0)),onMutate:t,onSuccess:()=>Promise.resolve(n==null?void 0:n(void 0))});return{disconnect:i=>o.mutate(i),disconnectAsync:i=>o.mutateAsync(i),error:o.error,isLoading:o.isLoading,isSuccess:o.isSuccess,status:o.status}}function It(){return c(e=>({signer:e.offlineSigner,signerAmino:e.offlineSignerAmino,signerAuto:e.offlineSignerAuto}),Dt)}function yo(){return It()}function go(e){let{data:t}=E(),n=e||(t==null?void 0:t.bech32Address);return M(["USE_STAKED_BALANCES",n],({queryKey:[,i]})=>ae(n),{enabled:Boolean(n)})}r();import{useMutation as we,useQuery as De}from"@tanstack/react-query";function bo(){return c(e=>e.activeChain)}function Eo(e){return De(["USE_ACTIVE_CHAIN_CURRENCY",e],({queryKey:[,u]})=>se(u))}function jo(e,t="BOND_STATUS_BONDED"){return De(["USE_ACTIVE_CHAIN_VALIDATORS",e,t],({queryKey:[,o,i]})=>o.staking.validators(i),{enabled:typeof e<"u"})}function wo(){return{data:c(t=>t.recentChain),clear:re}}function Do({onError:e,onLoading:t,onSuccess:n}={}){let o=we(["USE_SUGGEST_CHAIN",e,t,n],G,{onError:(i,s)=>Promise.resolve(e==null?void 0:e(i,s)),onMutate:t,onSuccess:i=>Promise.resolve(n==null?void 0:n(i))});return{error:o.error,isLoading:o.isLoading,isSuccess:o.isSuccess,suggest:o.mutate,suggestAsync:o.mutateAsync,status:o.status}}function ko({onError:e,onLoading:t,onSuccess:n}={}){let o=we(["USE_SUGGEST_CHAIN_AND_CONNECT",e,t,n],ie,{onError:(s,p)=>Promise.resolve(e==null?void 0:e(s,p)),onMutate:s=>t==null?void 0:t(s),onSuccess:s=>Promise.resolve(n==null?void 0:n(s))}),{data:i}=b();return{error:o.error,isLoading:o.isLoading,isSuccess:o.isSuccess,isSupported:Boolean(i),status:o.status,suggestAndConnect:o.mutate,suggestAndConnectAsync:o.mutateAsync}}r();import{useQuery as ke}from"@tanstack/react-query";r();import{useQuery as Tt}from"@tanstack/react-query";function vo(...e){let t=["USE_QUERY_CLIENT",...e];return Tt(t,({queryKey:[,...u]})=>ee(...e),{refetchOnMount:!1,refetchOnWindowFocus:!1})}function Qo(e){let t=c(o=>o.clients);return ke(["USE_CLIENTS",e,t],({queryKey:[,o,i]})=>o!=null&&o.rpc?w(o):i,{refetchOnMount:!1,refetchOnWindowFocus:!1})}function zo(e){let t=c(o=>o.signingClients);return ke(["USE_SIGNING_CLIENTS",e,t],({queryKey:[,o,i]})=>o!=null&&o.rpc?D(o):i,{refetchOnMount:!1,refetchOnWindowFocus:!1})}r();import{useMutation as Ie}from"@tanstack/react-query";function Ro({onError:e,onLoading:t,onSuccess:n}={}){let{data:u}=E(),o=u==null?void 0:u.bech32Address,s=Ie(["USE_SEND_TOKENS",e,t,n,o],p=>pe({senderAddress:o,...p}),{onError:(p,l)=>Promise.resolve(e==null?void 0:e(p,l)),onMutate:t,onSuccess:p=>Promise.resolve(n==null?void 0:n(p))});return{error:s.error,isLoading:s.isLoading,isSuccess:s.isSuccess,sendTokens:s.mutate,sendTokensAsync:s.mutateAsync,status:s.status}}function Fo({onError:e,onLoading:t,onSuccess:n}={}){let{data:u}=E(),o=u==null?void 0:u.bech32Address,s=Ie(["USE_SEND_IBC_TOKENS",e,t,n,o],p=>me({senderAddress:o,...p}),{onError:(p,l)=>Promise.resolve(e==null?void 0:e(p,l)),onMutate:t,onSuccess:p=>Promise.resolve(n==null?void 0:n(p))});return{error:s.error,isLoading:s.isLoading,isSuccess:s.isSuccess,sendIbcTokens:s.mutate,sendIbcTokensAsync:s.mutateAsync,status:s.status}}r();import{QueryClient as Gt,QueryClientProvider as qt}from"@tanstack/react-query";r();import{useEffect as Bt}from"react";function vt(){return Bt(()=>{let{_reconnect:e}=c.getState();return e&&h(),window.addEventListener("keplr_keystorechange",h),()=>{window.removeEventListener("keplr_keystorechange",h)}},[]),null}function Te(){return vt(),null}import{jsx as Ot,jsxs as Qt}from"react/jsx-runtime";var Ut=new Gt({});function Zo({children:e,grazOptions:t,...n}){return t&&ce(t),Qt(qt,{client:Ut,...n,children:[Ot(Te,{}),e]})}export{Te as GrazEvents,Zo as GrazProvider,_ as WALLET_TYPES,F as WalletType,v as checkWallet,re as clearRecentChain,ce as configureGraz,A as connect,w as createClients,ee as createQueryClient,D as createSigningClients,Hn as defineChain,Ln as defineChainInfo,_n as defineChains,oe as disconnect,se as getActiveChainCurrency,on as getAvailableWallets,ue as getBalances,Je as getKeplr,Ye as getLeap,yn as getRecentChain,ae as getStakedBalances,S as getWallet,Vn as mainnetChains,Jn as mainnetChainsArray,h as reconnect,me as sendIbcTokens,pe as sendTokens,G as suggestChain,ie as suggestChainAndConnect,Yn as testnetChains,$n as testnetChainsArray,E as useAccount,bo as useActiveChain,Eo as useActiveChainCurrency,jo as useActiveChainValidators,mo as useBalance,kt as useBalances,no as useCheckKeplr,b as useCheckWallet,Qo as useClients,lo as useConnect,fo as useDisconnect,vt as useGrazEvents,It as useOfflineSigners,vo as useQueryClient,wo as useRecentChain,Fo as useSendIbcTokens,Ro as useSendTokens,yo as useSigners,zo as useSigningClients,go as useStakedBalances,Do as useSuggestChain,ko as useSuggestChainAndConnect};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "graz",
3
3
  "description": "React hooks for Cosmos",
4
- "version": "0.0.24",
4
+ "version": "0.0.25",
5
5
  "author": "Griko Nibras <griko@strangelove.ventures>",
6
6
  "repository": "https://github.com/strangelove-ventures/graz.git",
7
7
  "homepage": "https://github.com/strangelove-ventures/graz",