@gardenfi/utils 2.4.1 → 2.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (175) hide show
  1. package/dist/index10.cjs +1 -1
  2. package/dist/index10.js +4 -4
  3. package/dist/index107.cjs +1 -1
  4. package/dist/index107.js +1 -1
  5. package/dist/index110.cjs +1 -1
  6. package/dist/index110.js +1 -1
  7. package/dist/index111.cjs +1 -1
  8. package/dist/index111.js +4 -4
  9. package/dist/index113.cjs +1 -1
  10. package/dist/index113.js +1 -1
  11. package/dist/index114.cjs +1 -1
  12. package/dist/index114.js +1 -1
  13. package/dist/index115.cjs +1 -1
  14. package/dist/index115.js +1 -1
  15. package/dist/index116.cjs +1 -1
  16. package/dist/index116.js +1 -1
  17. package/dist/index16.cjs +1 -1
  18. package/dist/index16.js +4 -4
  19. package/dist/index18.cjs +1 -1
  20. package/dist/index18.js +2 -2
  21. package/dist/index23.cjs +1 -1
  22. package/dist/index23.js +6 -6
  23. package/dist/index233.cjs +1 -1
  24. package/dist/index233.js +25 -10
  25. package/dist/index234.cjs +1 -1
  26. package/dist/index234.js +13 -16
  27. package/dist/index235.cjs +1 -1
  28. package/dist/index235.js +14 -21
  29. package/dist/index236.cjs +1 -1
  30. package/dist/index236.js +5 -30
  31. package/dist/index237.cjs +1 -1
  32. package/dist/index237.js +14 -2
  33. package/dist/index238.cjs +1 -1
  34. package/dist/index238.js +9 -12
  35. package/dist/index239.cjs +1 -1
  36. package/dist/index239.js +16 -12
  37. package/dist/index24.cjs +1 -1
  38. package/dist/index24.js +31 -13
  39. package/dist/index240.cjs +1 -1
  40. package/dist/index240.js +10 -47
  41. package/dist/index241.cjs +1 -1
  42. package/dist/index241.js +15 -10
  43. package/dist/index242.cjs +1 -1
  44. package/dist/index242.js +22 -7
  45. package/dist/index243.cjs +1 -1
  46. package/dist/index243.js +30 -9
  47. package/dist/index244.cjs +1 -1
  48. package/dist/index244.js +2 -14
  49. package/dist/index245.cjs +1 -1
  50. package/dist/index245.js +13 -14
  51. package/dist/index246.cjs +1 -1
  52. package/dist/index246.js +12 -9
  53. package/dist/index247.cjs +1 -1
  54. package/dist/index247.js +47 -24
  55. package/dist/index248.cjs +1 -1
  56. package/dist/index248.js +11 -12
  57. package/dist/index249.cjs +1 -1
  58. package/dist/index249.js +7 -24
  59. package/dist/index25.cjs +1 -1
  60. package/dist/index25.js +32 -58
  61. package/dist/index250.cjs +1 -1
  62. package/dist/index250.js +8 -12
  63. package/dist/index251.cjs +1 -1
  64. package/dist/index251.js +13 -15
  65. package/dist/index252.cjs +1 -2
  66. package/dist/index252.js +11 -21
  67. package/dist/index253.cjs +1 -1
  68. package/dist/index253.js +9 -52
  69. package/dist/index254.cjs +1 -1
  70. package/dist/index254.js +24 -25
  71. package/dist/index255.cjs +1 -1
  72. package/dist/index255.js +12 -13
  73. package/dist/index256.cjs +1 -1
  74. package/dist/index256.js +24 -15
  75. package/dist/index257.cjs +1 -1
  76. package/dist/index257.js +13 -5
  77. package/dist/index258.cjs +1 -1
  78. package/dist/index258.js +15 -13
  79. package/dist/index259.cjs +2 -1
  80. package/dist/index259.js +24 -10
  81. package/dist/index26.cjs +1 -16
  82. package/dist/index26.js +11 -113
  83. package/dist/index260.cjs +1 -1
  84. package/dist/index260.js +52 -16
  85. package/dist/index27.cjs +1 -1
  86. package/dist/index27.js +58 -32
  87. package/dist/index28.cjs +1 -1
  88. package/dist/index28.js +12 -26
  89. package/dist/index280.cjs +1 -1
  90. package/dist/index280.js +1 -1
  91. package/dist/index282.cjs +1 -1
  92. package/dist/index282.js +1 -1
  93. package/dist/index287.cjs +1 -1
  94. package/dist/index287.js +1 -1
  95. package/dist/index288.cjs +1 -1
  96. package/dist/index288.js +139 -3
  97. package/dist/index289.cjs +1 -1
  98. package/dist/index289.js +39 -137
  99. package/dist/index29.cjs +16 -1
  100. package/dist/index29.js +113 -7
  101. package/dist/index290.cjs +1 -1
  102. package/dist/index290.js +72 -149
  103. package/dist/index291.cjs +1 -1
  104. package/dist/index291.js +2 -10
  105. package/dist/index292.cjs +1 -1
  106. package/dist/index292.js +3 -113
  107. package/dist/index293.cjs +1 -2
  108. package/dist/index293.js +128 -122
  109. package/dist/index294.cjs +1 -1
  110. package/dist/index294.js +153 -137
  111. package/dist/index295.cjs +1 -1
  112. package/dist/index295.js +9 -42
  113. package/dist/index296.cjs +1 -1
  114. package/dist/index296.js +107 -72
  115. package/dist/index297.cjs +2 -1
  116. package/dist/index297.js +135 -2
  117. package/dist/index30.cjs +1 -1
  118. package/dist/index30.js +27 -31
  119. package/dist/index301.cjs +1 -1
  120. package/dist/index301.js +2 -2
  121. package/dist/index302.cjs +1 -1
  122. package/dist/index302.js +1 -1
  123. package/dist/index305.cjs +1 -1
  124. package/dist/index305.js +1 -1
  125. package/dist/index306.cjs +1 -1
  126. package/dist/index306.js +1 -1
  127. package/dist/index31.cjs +1 -1
  128. package/dist/index31.js +8 -12
  129. package/dist/index310.cjs +1 -1
  130. package/dist/index310.js +2 -2
  131. package/dist/index311.cjs +1 -1
  132. package/dist/index311.js +1 -1
  133. package/dist/index33.cjs +1 -1
  134. package/dist/index33.js +1 -1
  135. package/dist/index39.cjs +1 -1
  136. package/dist/index39.js +1 -1
  137. package/dist/index56.cjs +1 -1
  138. package/dist/index56.js +2 -2
  139. package/dist/index57.cjs +1 -1
  140. package/dist/index57.js +1 -1
  141. package/dist/index58.cjs +1 -1
  142. package/dist/index58.js +2 -2
  143. package/dist/index59.cjs +1 -1
  144. package/dist/index59.js +1 -1
  145. package/dist/index60.cjs +1 -1
  146. package/dist/index60.js +2 -2
  147. package/dist/index61.cjs +1 -1
  148. package/dist/index61.js +6 -6
  149. package/dist/index62.cjs +1 -1
  150. package/dist/index62.js +2 -2
  151. package/dist/index63.cjs +1 -1
  152. package/dist/index63.js +1 -1
  153. package/dist/index64.cjs +1 -1
  154. package/dist/index64.js +1 -1
  155. package/dist/index65.cjs +1 -1
  156. package/dist/index65.js +1 -1
  157. package/dist/index67.cjs +1 -1
  158. package/dist/index67.js +4 -4
  159. package/dist/index76.cjs +1 -1
  160. package/dist/index76.js +1 -1
  161. package/dist/index77.cjs +1 -1
  162. package/dist/index77.js +1 -1
  163. package/dist/index82.cjs +1 -1
  164. package/dist/index82.js +1 -1
  165. package/dist/index88.cjs +1 -1
  166. package/dist/index88.js +3 -3
  167. package/dist/index89.cjs +1 -1
  168. package/dist/index89.js +2 -2
  169. package/dist/index91.cjs +1 -1
  170. package/dist/index91.js +1 -1
  171. package/dist/index92.cjs +1 -1
  172. package/dist/index92.js +1 -1
  173. package/dist/index98.cjs +1 -1
  174. package/dist/index98.js +1 -1
  175. package/package.json +1 -1
package/dist/index10.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const w=require("tough-cookie"),g=require("fetch-cookie"),k=require("./index14.cjs"),f=require("./index15.cjs"),h=require("./index3.cjs"),n=require("./index5.cjs"),m=require("./index24.cjs"),y=require("./index25.cjs"),C=require("./index23.cjs"),T=require("./index26.cjs"),v=require("./index27.cjs"),S=c=>c&&c.__esModule?c:{default:c},p=S(g);class u{constructor(t,i,e){if(this.url=t.endpoint("siwe"),this.walletClient=i,this.domain=(e==null?void 0:e.domain)||"app.garden.finance",this.domain.startsWith("https://")&&(this.domain=this.domain.split("https://")[1]),this.signingStatement=(e==null?void 0:e.signingStatement)??"Garden.fi",this.store=(e==null?void 0:e.store)??(typeof window<"u"?window.localStorage:new k.MemoryStorage),typeof window>"u"){const r=new w.CookieJar;this.fetchWithCookies=p.default(fetch,r)}else this.fetchWithCookies=window.fetch.bind(window)}static fromDigestKey(t,i,e){const r=m.createWalletClient({account:C.privateKeyToAccount(h.add0x(i.digestKey)),transport:y.http(),chain:v.mainnet});return new u(t,r,e)}verifyToken(t,i){try{const e=h.parseJwt(t);if(!e)return n.Ok(!1);const r=Math.floor(Date.now()/1e3)+120;return n.Ok(e.exp>r&&e.user_id.toLowerCase()===i.toLowerCase())}catch{return n.Ok(!1)}}async getToken(){var s;if(!((s=this.walletClient.account)!=null&&s.address))return n.Err("Wallet client does not have an account");const t=this.store.getItem(f.StoreKeys.AUTH_TOKEN);if(t){const o=this.verifyToken(t,this.walletClient.account.address);if(o.ok&&o.val)return n.Ok(t)}const i=await this.signStatement();if(i.error)return n.Err(i.error);let e;try{const a=await(await this.fetchWithCookies(this.url.endpoint("tokens"),{method:"POST",body:JSON.stringify({...i.val}),headers:{"Content-Type":"application/json"},credentials:"include"})).json();if(a.error||!a.result)return n.Err(a.error??"Failed to get token");e=a.result}catch(o){return n.Err("Failed to get token",o)}if(!this.verifyToken(e,this.walletClient.account.address).val)throw new Error("Token verification failed");return this.store.setItem(f.StoreKeys.AUTH_TOKEN,e),n.Ok(e)}async signStatement(){var a;if(!((a=this.walletClient.account)!=null&&a.address))return n.Err("Wallet client does not have a valid account");const t=new Date,i=new Date(t.getTime()+300*1e3);let e;try{const l=await(await this.fetchWithCookies(this.url.endpoint("challenges"),{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include"})).json();if(l.error||!l.result)return n.Err("Failed to get nonce");e=l.result}catch(d){return n.Err("Failed to get nonce",d)}const r=await this.walletClient.getChainId(),s=T.createSiweMessage({domain:this.domain,address:this.walletClient.account.address,statement:this.signingStatement,nonce:e,uri:"https://"+this.domain,version:"1",chainId:r,notBefore:i}),o=await this.walletClient.signMessage({account:this.walletClient.account,message:s});return n.Ok({message:s,signature:o,nonce:e})}async getAuthHeaders(){const t=await this.getToken();return t.ok?n.Ok({Authorization:h.Authorization(t.val)}):n.Err(t.error)}}exports.Siwe=u;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const w=require("tough-cookie"),g=require("fetch-cookie"),k=require("./index14.cjs"),f=require("./index15.cjs"),h=require("./index3.cjs"),n=require("./index5.cjs"),m=require("./index28.cjs"),y=require("./index27.cjs"),C=require("./index23.cjs"),T=require("./index29.cjs"),v=require("./index25.cjs"),S=c=>c&&c.__esModule?c:{default:c},p=S(g);class u{constructor(t,i,e){if(this.url=t.endpoint("siwe"),this.walletClient=i,this.domain=(e==null?void 0:e.domain)||"app.garden.finance",this.domain.startsWith("https://")&&(this.domain=this.domain.split("https://")[1]),this.signingStatement=(e==null?void 0:e.signingStatement)??"Garden.fi",this.store=(e==null?void 0:e.store)??(typeof window<"u"?window.localStorage:new k.MemoryStorage),typeof window>"u"){const r=new w.CookieJar;this.fetchWithCookies=p.default(fetch,r)}else this.fetchWithCookies=window.fetch.bind(window)}static fromDigestKey(t,i,e){const r=m.createWalletClient({account:C.privateKeyToAccount(h.add0x(i.digestKey)),transport:y.http(),chain:v.mainnet});return new u(t,r,e)}verifyToken(t,i){try{const e=h.parseJwt(t);if(!e)return n.Ok(!1);const r=Math.floor(Date.now()/1e3)+120;return n.Ok(e.exp>r&&e.user_id.toLowerCase()===i.toLowerCase())}catch{return n.Ok(!1)}}async getToken(){var s;if(!((s=this.walletClient.account)!=null&&s.address))return n.Err("Wallet client does not have an account");const t=this.store.getItem(f.StoreKeys.AUTH_TOKEN);if(t){const o=this.verifyToken(t,this.walletClient.account.address);if(o.ok&&o.val)return n.Ok(t)}const i=await this.signStatement();if(i.error)return n.Err(i.error);let e;try{const a=await(await this.fetchWithCookies(this.url.endpoint("tokens"),{method:"POST",body:JSON.stringify({...i.val}),headers:{"Content-Type":"application/json"},credentials:"include"})).json();if(a.error||!a.result)return n.Err(a.error??"Failed to get token");e=a.result}catch(o){return n.Err("Failed to get token",o)}if(!this.verifyToken(e,this.walletClient.account.address).val)throw new Error("Token verification failed");return this.store.setItem(f.StoreKeys.AUTH_TOKEN,e),n.Ok(e)}async signStatement(){var a;if(!((a=this.walletClient.account)!=null&&a.address))return n.Err("Wallet client does not have a valid account");const t=new Date,i=new Date(t.getTime()+300*1e3);let e;try{const l=await(await this.fetchWithCookies(this.url.endpoint("challenges"),{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include"})).json();if(l.error||!l.result)return n.Err("Failed to get nonce");e=l.result}catch(d){return n.Err("Failed to get nonce",d)}const r=await this.walletClient.getChainId(),s=T.createSiweMessage({domain:this.domain,address:this.walletClient.account.address,statement:this.signingStatement,nonce:e,uri:"https://"+this.domain,version:"1",chainId:r,notBefore:i}),o=await this.walletClient.signMessage({account:this.walletClient.account,message:s});return n.Ok({message:s,signature:o,nonce:e})}async getAuthHeaders(){const t=await this.getToken();return t.ok?n.Ok({Authorization:h.Authorization(t.val)}):n.Err(t.error)}}exports.Siwe=u;
package/dist/index10.js CHANGED
@@ -4,11 +4,11 @@ import { MemoryStorage as w } from "./index14.js";
4
4
  import { StoreKeys as d } from "./index15.js";
5
5
  import { add0x as g, parseJwt as k, Authorization as p } from "./index3.js";
6
6
  import { Ok as s, Err as r } from "./index5.js";
7
- import { createWalletClient as y } from "./index24.js";
8
- import { http as C } from "./index25.js";
7
+ import { createWalletClient as y } from "./index28.js";
8
+ import { http as C } from "./index27.js";
9
9
  import { privateKeyToAccount as T } from "./index23.js";
10
- import { createSiweMessage as v } from "./index26.js";
11
- import { mainnet as S } from "./index27.js";
10
+ import { createSiweMessage as v } from "./index29.js";
11
+ import { mainnet as S } from "./index25.js";
12
12
  class f {
13
13
  constructor(e, n, t) {
14
14
  if (this.url = e.endpoint("siwe"), this.walletClient = n, this.domain = (t == null ? void 0 : t.domain) || "app.garden.finance", this.domain.startsWith("https://") && (this.domain = this.domain.split("https://")[1]), this.signingStatement = (t == null ? void 0 : t.signingStatement) ?? "Garden.fi", this.store = (t == null ? void 0 : t.store) ?? (typeof window < "u" ? window.localStorage : new w()), typeof window > "u") {
package/dist/index107.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("./index48.cjs"),f=require("./index252.cjs"),g=require("./index184.cjs"),s=require("./index32.cjs"),h=require("./index74.cjs"),A=require("./index86.cjs");async function p(o,n){var i;const{account:c=o.account,chainId:u,nonce:a}=n;if(!c)throw new f.AccountNotFoundError({docsPath:"/docs/eip7702/prepareAuthorization"});const r=d.parseAccount(c),t=(()=>{if(n.executor)return n.executor==="self"?n.executor:d.parseAccount(n.executor)})(),e={address:n.contractAddress??n.address,chainId:u,nonce:a};return typeof e.chainId>"u"&&(e.chainId=((i=o.chain)==null?void 0:i.id)??await s.getAction(o,h.getChainId,"getChainId")({})),typeof e.nonce>"u"&&(e.nonce=await s.getAction(o,A.getTransactionCount,"getTransactionCount")({address:r.address,blockTag:"pending"}),(t==="self"||t!=null&&t.address&&g.isAddressEqual(t.address,r.address))&&(e.nonce+=1)),e}exports.prepareAuthorization=p;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("./index48.cjs"),f=require("./index259.cjs"),g=require("./index184.cjs"),s=require("./index32.cjs"),h=require("./index74.cjs"),A=require("./index86.cjs");async function p(o,n){var i;const{account:c=o.account,chainId:u,nonce:a}=n;if(!c)throw new f.AccountNotFoundError({docsPath:"/docs/eip7702/prepareAuthorization"});const r=d.parseAccount(c),t=(()=>{if(n.executor)return n.executor==="self"?n.executor:d.parseAccount(n.executor)})(),e={address:n.contractAddress??n.address,chainId:u,nonce:a};return typeof e.chainId>"u"&&(e.chainId=((i=o.chain)==null?void 0:i.id)??await s.getAction(o,h.getChainId,"getChainId")({})),typeof e.nonce>"u"&&(e.nonce=await s.getAction(o,A.getTransactionCount,"getTransactionCount")({address:r.address,blockTag:"pending"}),(t==="self"||t!=null&&t.address&&g.isAddressEqual(t.address,r.address))&&(e.nonce+=1)),e}exports.prepareAuthorization=p;
package/dist/index107.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { parseAccount as e } from "./index48.js";
2
- import { AccountNotFoundError as f } from "./index252.js";
2
+ import { AccountNotFoundError as f } from "./index259.js";
3
3
  import { isAddressEqual as h } from "./index184.js";
4
4
  import { getAction as a } from "./index32.js";
5
5
  import { getChainId as p } from "./index74.js";
package/dist/index110.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const k=require("./index48.cjs"),h=require("./index41.cjs"),w=require("./index141.cjs"),N=require("./index180.cjs"),g=require("./index157.cjs"),M=require("./index185.cjs"),c=require("./index153.cjs"),S=require("./index250.cjs"),_=require("./index111.cjs"),T="0x5792579257925792579257925792579257925792579257925792579257925792",v=c.numberToHex(0,{size:32});async function H(i,s){const{account:f=i.account,capabilities:l,chain:u=i.chain,experimental_fallback:x,experimental_fallbackDelay:m=32,forceAtomic:b=!1,id:y,version:C="2.0.0"}=s,r=f?k.parseAccount(f):null,d=s.calls.map(a=>{const e=a,o=e.abi?N.encodeFunctionData({abi:e.abi,functionName:e.functionName,args:e.args}):e.data;return{data:e.dataSuffix&&o?g.concat([o,e.dataSuffix]):o,to:e.to,value:e.value?c.numberToHex(e.value):void 0}});try{const a=await i.request({method:"wallet_sendCalls",params:[{atomicRequired:b,calls:d,capabilities:l,chainId:c.numberToHex(u.id),from:r==null?void 0:r.address,id:y,version:C}]},{retryCount:0});return typeof a=="string"?{id:a}:a}catch(a){const e=a;if(x&&(e.name==="MethodNotFoundRpcError"||e.name==="MethodNotSupportedRpcError"||e.name==="UnknownRpcError"||e.details.toLowerCase().includes("does not exist / is not available")||e.details.toLowerCase().includes("missing or invalid. request()")||e.details.toLowerCase().includes("did not match any variant of untagged enum")||e.details.toLowerCase().includes("account upgraded to unsupported contract")||e.details.toLowerCase().includes("eip-7702 not supported")||e.details.toLowerCase().includes("unsupported wc_ method"))){if(l&&Object.values(l).some(n=>!n.optional)){const n="non-optional `capabilities` are not supported on fallback to `eth_sendTransaction`.";throw new w.UnsupportedNonOptionalCapabilityError(new h.BaseError(n,{details:n}))}if(b&&d.length>1){const t="`forceAtomic` is not supported on fallback to `eth_sendTransaction`.";throw new w.AtomicityNotSupportedError(new h.BaseError(t,{details:t}))}const o=[];for(const t of d){const n=_.sendTransaction(i,{account:r,chain:u,data:t.data,to:t.to,value:t.value?M.hexToBigInt(t.value):void 0});o.push(n),m>0&&await new Promise(E=>setTimeout(E,m))}const p=await Promise.allSettled(o);if(p.every(t=>t.status==="rejected"))throw p[0].reason;const q=p.map(t=>t.status==="fulfilled"?t.value:v);return{id:g.concat([...q,c.numberToHex(u.id,{size:32}),T])}}throw S.getTransactionError(a,{...s,account:r,chain:s.chain})}}exports.fallbackMagicIdentifier=T;exports.fallbackTransactionErrorMagicIdentifier=v;exports.sendCalls=H;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const k=require("./index48.cjs"),h=require("./index41.cjs"),w=require("./index141.cjs"),N=require("./index180.cjs"),g=require("./index157.cjs"),M=require("./index185.cjs"),c=require("./index153.cjs"),S=require("./index257.cjs"),_=require("./index111.cjs"),T="0x5792579257925792579257925792579257925792579257925792579257925792",v=c.numberToHex(0,{size:32});async function H(i,s){const{account:f=i.account,capabilities:l,chain:u=i.chain,experimental_fallback:x,experimental_fallbackDelay:m=32,forceAtomic:b=!1,id:y,version:C="2.0.0"}=s,r=f?k.parseAccount(f):null,d=s.calls.map(a=>{const e=a,o=e.abi?N.encodeFunctionData({abi:e.abi,functionName:e.functionName,args:e.args}):e.data;return{data:e.dataSuffix&&o?g.concat([o,e.dataSuffix]):o,to:e.to,value:e.value?c.numberToHex(e.value):void 0}});try{const a=await i.request({method:"wallet_sendCalls",params:[{atomicRequired:b,calls:d,capabilities:l,chainId:c.numberToHex(u.id),from:r==null?void 0:r.address,id:y,version:C}]},{retryCount:0});return typeof a=="string"?{id:a}:a}catch(a){const e=a;if(x&&(e.name==="MethodNotFoundRpcError"||e.name==="MethodNotSupportedRpcError"||e.name==="UnknownRpcError"||e.details.toLowerCase().includes("does not exist / is not available")||e.details.toLowerCase().includes("missing or invalid. request()")||e.details.toLowerCase().includes("did not match any variant of untagged enum")||e.details.toLowerCase().includes("account upgraded to unsupported contract")||e.details.toLowerCase().includes("eip-7702 not supported")||e.details.toLowerCase().includes("unsupported wc_ method"))){if(l&&Object.values(l).some(n=>!n.optional)){const n="non-optional `capabilities` are not supported on fallback to `eth_sendTransaction`.";throw new w.UnsupportedNonOptionalCapabilityError(new h.BaseError(n,{details:n}))}if(b&&d.length>1){const t="`forceAtomic` is not supported on fallback to `eth_sendTransaction`.";throw new w.AtomicityNotSupportedError(new h.BaseError(t,{details:t}))}const o=[];for(const t of d){const n=_.sendTransaction(i,{account:r,chain:u,data:t.data,to:t.to,value:t.value?M.hexToBigInt(t.value):void 0});o.push(n),m>0&&await new Promise(E=>setTimeout(E,m))}const p=await Promise.allSettled(o);if(p.every(t=>t.status==="rejected"))throw p[0].reason;const q=p.map(t=>t.status==="fulfilled"?t.value:v);return{id:g.concat([...q,c.numberToHex(u.id,{size:32}),T])}}throw S.getTransactionError(a,{...s,account:r,chain:s.chain})}}exports.fallbackMagicIdentifier=T;exports.fallbackTransactionErrorMagicIdentifier=v;exports.sendCalls=H;
package/dist/index110.js CHANGED
@@ -5,7 +5,7 @@ import { encodeFunctionData as k } from "./index180.js";
5
5
  import { concat as b } from "./index157.js";
6
6
  import { hexToBigInt as _ } from "./index185.js";
7
7
  import { numberToHex as c } from "./index153.js";
8
- import { getTransactionError as L } from "./index250.js";
8
+ import { getTransactionError as L } from "./index257.js";
9
9
  import { sendTransaction as S } from "./index111.js";
10
10
  const A = "0x5792579257925792579257925792579257925792579257925792579257925792", I = c(0, {
11
11
  size: 32
package/dist/index111.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const G=require("./index48.cjs"),u=require("./index252.cjs"),O=require("./index41.cjs"),j=require("./index243.cjs"),B=require("./index215.cjs"),U=require("./index250.cjs"),W=require("./index239.cjs"),k=require("./index187.cjs"),l=require("./index32.cjs"),D=require("./index223.cjs"),H=require("./index200.cjs"),J=require("./index74.cjs"),L=require("./index99.cjs"),K=require("./index100.cjs"),f=new D.LruMap(128);async function Q(r,e){var M,z,I,S;const{account:d=r.account,chain:n=r.chain,accessList:w,authorizationList:s,blobs:q,data:m,gas:T,gasPrice:g,maxFeePerBlobGas:y,maxFeePerGas:R,maxPriorityFeePerGas:A,nonce:E,type:C,value:N,...P}=e;if(typeof d>"u")throw new u.AccountNotFoundError({docsPath:"/docs/actions/wallet/sendTransaction"});const t=d?G.parseAccount(d):null;try{H.assertRequest(e);const a=await(async()=>{if(e.to)return e.to;if(e.to!==null&&s&&s.length>0)return await j.recoverAuthorizationAddress({authorization:s[0]}).catch(()=>{throw new O.BaseError("`to` is required. Could not infer from `authorizationList`.")})})();if((t==null?void 0:t.type)==="json-rpc"||t===null){let i;n!==null&&(i=await l.getAction(r,J.getChainId,"getChainId")({}),B.assertCurrentChain({currentChainId:i,chain:n}));const c=(I=(z=(M=r.chain)==null?void 0:M.formatters)==null?void 0:z.transactionRequest)==null?void 0:I.format,F=(c||k.formatTransactionRequest)({...W.extract(P,{format:c}),accessList:w,authorizationList:s,blobs:q,chainId:i,data:m,from:t==null?void 0:t.address,gas:T,gasPrice:g,maxFeePerBlobGas:y,maxFeePerGas:R,maxPriorityFeePerGas:A,nonce:E,to:a,type:C,value:N}),v=f.get(r.uid),_=v?"wallet_sendTransaction":"eth_sendTransaction";try{return await r.request({method:_,params:[F]},{retryCount:0})}catch(x){if(v===!1)throw x;const o=x;if(o.name==="InvalidInputRpcError"||o.name==="InvalidParamsRpcError"||o.name==="MethodNotFoundRpcError"||o.name==="MethodNotSupportedRpcError")return await r.request({method:"wallet_sendTransaction",params:[F]},{retryCount:0}).then(p=>(f.set(r.uid,!0),p)).catch(p=>{const h=p;throw h.name==="MethodNotFoundRpcError"||h.name==="MethodNotSupportedRpcError"?(f.set(r.uid,!1),o):h});throw o}}if((t==null?void 0:t.type)==="local"){const i=await l.getAction(r,L.prepareTransactionRequest,"prepareTransactionRequest")({account:t,accessList:w,authorizationList:s,blobs:q,chain:n,data:m,gas:T,gasPrice:g,maxFeePerBlobGas:y,maxFeePerGas:R,maxPriorityFeePerGas:A,nonce:E,nonceManager:t.nonceManager,parameters:[...L.defaultParameters,"sidecars"],type:C,value:N,...P,to:a}),c=(S=n==null?void 0:n.serializers)==null?void 0:S.transaction,b=await t.signTransaction(i,{serializer:c});return await l.getAction(r,K.sendRawTransaction,"sendRawTransaction")({serializedTransaction:b})}throw(t==null?void 0:t.type)==="smart"?new u.AccountTypeNotSupportedError({metaMessages:["Consider using the `sendUserOperation` Action instead."],docsPath:"/docs/actions/bundler/sendUserOperation",type:"smart"}):new u.AccountTypeNotSupportedError({docsPath:"/docs/actions/wallet/sendTransaction",type:t==null?void 0:t.type})}catch(a){throw a instanceof u.AccountTypeNotSupportedError?a:U.getTransactionError(a,{...e,account:t,chain:e.chain||void 0})}}exports.sendTransaction=Q;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const G=require("./index48.cjs"),u=require("./index259.cjs"),O=require("./index41.cjs"),j=require("./index250.cjs"),B=require("./index215.cjs"),U=require("./index257.cjs"),W=require("./index246.cjs"),k=require("./index187.cjs"),l=require("./index32.cjs"),D=require("./index223.cjs"),H=require("./index200.cjs"),J=require("./index74.cjs"),L=require("./index99.cjs"),K=require("./index100.cjs"),f=new D.LruMap(128);async function Q(r,e){var M,z,I,S;const{account:d=r.account,chain:n=r.chain,accessList:w,authorizationList:s,blobs:q,data:m,gas:T,gasPrice:g,maxFeePerBlobGas:y,maxFeePerGas:R,maxPriorityFeePerGas:A,nonce:E,type:C,value:N,...P}=e;if(typeof d>"u")throw new u.AccountNotFoundError({docsPath:"/docs/actions/wallet/sendTransaction"});const t=d?G.parseAccount(d):null;try{H.assertRequest(e);const a=await(async()=>{if(e.to)return e.to;if(e.to!==null&&s&&s.length>0)return await j.recoverAuthorizationAddress({authorization:s[0]}).catch(()=>{throw new O.BaseError("`to` is required. Could not infer from `authorizationList`.")})})();if((t==null?void 0:t.type)==="json-rpc"||t===null){let i;n!==null&&(i=await l.getAction(r,J.getChainId,"getChainId")({}),B.assertCurrentChain({currentChainId:i,chain:n}));const c=(I=(z=(M=r.chain)==null?void 0:M.formatters)==null?void 0:z.transactionRequest)==null?void 0:I.format,F=(c||k.formatTransactionRequest)({...W.extract(P,{format:c}),accessList:w,authorizationList:s,blobs:q,chainId:i,data:m,from:t==null?void 0:t.address,gas:T,gasPrice:g,maxFeePerBlobGas:y,maxFeePerGas:R,maxPriorityFeePerGas:A,nonce:E,to:a,type:C,value:N}),v=f.get(r.uid),_=v?"wallet_sendTransaction":"eth_sendTransaction";try{return await r.request({method:_,params:[F]},{retryCount:0})}catch(x){if(v===!1)throw x;const o=x;if(o.name==="InvalidInputRpcError"||o.name==="InvalidParamsRpcError"||o.name==="MethodNotFoundRpcError"||o.name==="MethodNotSupportedRpcError")return await r.request({method:"wallet_sendTransaction",params:[F]},{retryCount:0}).then(p=>(f.set(r.uid,!0),p)).catch(p=>{const h=p;throw h.name==="MethodNotFoundRpcError"||h.name==="MethodNotSupportedRpcError"?(f.set(r.uid,!1),o):h});throw o}}if((t==null?void 0:t.type)==="local"){const i=await l.getAction(r,L.prepareTransactionRequest,"prepareTransactionRequest")({account:t,accessList:w,authorizationList:s,blobs:q,chain:n,data:m,gas:T,gasPrice:g,maxFeePerBlobGas:y,maxFeePerGas:R,maxPriorityFeePerGas:A,nonce:E,nonceManager:t.nonceManager,parameters:[...L.defaultParameters,"sidecars"],type:C,value:N,...P,to:a}),c=(S=n==null?void 0:n.serializers)==null?void 0:S.transaction,b=await t.signTransaction(i,{serializer:c});return await l.getAction(r,K.sendRawTransaction,"sendRawTransaction")({serializedTransaction:b})}throw(t==null?void 0:t.type)==="smart"?new u.AccountTypeNotSupportedError({metaMessages:["Consider using the `sendUserOperation` Action instead."],docsPath:"/docs/actions/bundler/sendUserOperation",type:"smart"}):new u.AccountTypeNotSupportedError({docsPath:"/docs/actions/wallet/sendTransaction",type:t==null?void 0:t.type})}catch(a){throw a instanceof u.AccountTypeNotSupportedError?a:U.getTransactionError(a,{...e,account:t,chain:e.chain||void 0})}}exports.sendTransaction=Q;
package/dist/index111.js CHANGED
@@ -1,10 +1,10 @@
1
1
  import { parseAccount as _ } from "./index48.js";
2
- import { AccountNotFoundError as G, AccountTypeNotSupportedError as p } from "./index252.js";
2
+ import { AccountNotFoundError as G, AccountTypeNotSupportedError as p } from "./index259.js";
3
3
  import { BaseError as B } from "./index41.js";
4
- import { recoverAuthorizationAddress as O } from "./index243.js";
4
+ import { recoverAuthorizationAddress as O } from "./index250.js";
5
5
  import { assertCurrentChain as U } from "./index215.js";
6
- import { getTransactionError as W } from "./index250.js";
7
- import { extract as j } from "./index239.js";
6
+ import { getTransactionError as W } from "./index257.js";
7
+ import { extract as j } from "./index246.js";
8
8
  import { formatTransactionRequest as k } from "./index187.js";
9
9
  import { getAction as f } from "./index32.js";
10
10
  import { LruMap as D } from "./index223.js";
package/dist/index113.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("./index48.cjs"),r=require("./index252.cjs"),e=require("./index107.cjs");async function a(t,n){const{account:i=t.account}=n;if(!i)throw new r.AccountNotFoundError({docsPath:"/docs/eip7702/signAuthorization"});const o=u.parseAccount(i);if(!o.signAuthorization)throw new r.AccountTypeNotSupportedError({docsPath:"/docs/eip7702/signAuthorization",metaMessages:["The `signAuthorization` Action does not support JSON-RPC Accounts."],type:o.type});const c=await e.prepareAuthorization(t,n);return o.signAuthorization(c)}exports.signAuthorization=a;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("./index48.cjs"),r=require("./index259.cjs"),e=require("./index107.cjs");async function a(t,n){const{account:i=t.account}=n;if(!i)throw new r.AccountNotFoundError({docsPath:"/docs/eip7702/signAuthorization"});const o=u.parseAccount(i);if(!o.signAuthorization)throw new r.AccountTypeNotSupportedError({docsPath:"/docs/eip7702/signAuthorization",metaMessages:["The `signAuthorization` Action does not support JSON-RPC Accounts."],type:o.type});const c=await e.prepareAuthorization(t,n);return o.signAuthorization(c)}exports.signAuthorization=a;
package/dist/index113.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { parseAccount as c } from "./index48.js";
2
- import { AccountNotFoundError as u, AccountTypeNotSupportedError as a } from "./index252.js";
2
+ import { AccountNotFoundError as u, AccountTypeNotSupportedError as a } from "./index259.js";
3
3
  import { prepareAuthorization as s } from "./index107.js";
4
4
  async function A(t, n) {
5
5
  const { account: i = t.account } = n;
package/dist/index114.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("./index48.cjs"),a=require("./index252.cjs"),o=require("./index153.cjs");async function i(n,{account:e=n.account,message:r}){if(!e)throw new a.AccountNotFoundError({docsPath:"/docs/actions/wallet/signMessage"});const t=c.parseAccount(e);if(t.signMessage)return t.signMessage({message:r});const s=typeof r=="string"?o.stringToHex(r):r.raw instanceof Uint8Array?o.toHex(r.raw):r.raw;return n.request({method:"personal_sign",params:[s,t.address]},{retryCount:0})}exports.signMessage=i;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("./index48.cjs"),a=require("./index259.cjs"),o=require("./index153.cjs");async function i(n,{account:e=n.account,message:r}){if(!e)throw new a.AccountNotFoundError({docsPath:"/docs/actions/wallet/signMessage"});const t=c.parseAccount(e);if(t.signMessage)return t.signMessage({message:r});const s=typeof r=="string"?o.stringToHex(r):r.raw instanceof Uint8Array?o.toHex(r.raw):r.raw;return n.request({method:"personal_sign",params:[s,t.address]},{retryCount:0})}exports.signMessage=i;
package/dist/index114.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { parseAccount as e } from "./index48.js";
2
- import { AccountNotFoundError as i } from "./index252.js";
2
+ import { AccountNotFoundError as i } from "./index259.js";
3
3
  import { stringToHex as a, toHex as c } from "./index153.js";
4
4
  async function g(n, { account: o = n.account, message: r }) {
5
5
  if (!o)
package/dist/index115.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("./index48.cjs"),f=require("./index252.cjs"),C=require("./index215.cjs"),T=require("./index153.cjs"),m=require("./index187.cjs"),I=require("./index32.cjs"),w=require("./index200.cjs"),A=require("./index74.cjs");async function R(t,s){var i,u,d,h;const{account:o=t.account,chain:n=t.chain,...c}=s;if(!o)throw new f.AccountNotFoundError({docsPath:"/docs/actions/wallet/signTransaction"});const r=g.parseAccount(o);w.assertRequest({account:r,...s});const a=await I.getAction(t,A.getChainId,"getChainId")({});n!==null&&C.assertCurrentChain({currentChainId:a,chain:n});const e=(n==null?void 0:n.formatters)||((i=t.chain)==null?void 0:i.formatters),q=((u=e==null?void 0:e.transactionRequest)==null?void 0:u.format)||m.formatTransactionRequest;return r.signTransaction?r.signTransaction({...c,chainId:a},{serializer:(h=(d=t.chain)==null?void 0:d.serializers)==null?void 0:h.transaction}):await t.request({method:"eth_signTransaction",params:[{...q(c),chainId:T.numberToHex(a),from:r.address}]},{retryCount:0})}exports.signTransaction=R;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("./index48.cjs"),f=require("./index259.cjs"),C=require("./index215.cjs"),T=require("./index153.cjs"),m=require("./index187.cjs"),I=require("./index32.cjs"),w=require("./index200.cjs"),A=require("./index74.cjs");async function R(t,s){var i,u,d,h;const{account:o=t.account,chain:n=t.chain,...c}=s;if(!o)throw new f.AccountNotFoundError({docsPath:"/docs/actions/wallet/signTransaction"});const r=g.parseAccount(o);w.assertRequest({account:r,...s});const a=await I.getAction(t,A.getChainId,"getChainId")({});n!==null&&C.assertCurrentChain({currentChainId:a,chain:n});const e=(n==null?void 0:n.formatters)||((i=t.chain)==null?void 0:i.formatters),q=((u=e==null?void 0:e.transactionRequest)==null?void 0:u.format)||m.formatTransactionRequest;return r.signTransaction?r.signTransaction({...c,chainId:a},{serializer:(h=(d=t.chain)==null?void 0:d.serializers)==null?void 0:h.transaction}):await t.request({method:"eth_signTransaction",params:[{...q(c),chainId:T.numberToHex(a),from:r.address}]},{retryCount:0})}exports.signTransaction=R;
package/dist/index115.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { parseAccount as d } from "./index48.js";
2
- import { AccountNotFoundError as p } from "./index252.js";
2
+ import { AccountNotFoundError as p } from "./index259.js";
3
3
  import { assertCurrentChain as g } from "./index215.js";
4
4
  import { numberToHex as T } from "./index153.js";
5
5
  import { formatTransactionRequest as C } from "./index187.js";
package/dist/index116.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("./index48.cjs"),y=require("./index252.cjs"),s=require("./index191.cjs");async function p(c,r){const{account:i=c.account,domain:t,message:a,primaryType:e}=r;if(!i)throw new y.AccountNotFoundError({docsPath:"/docs/actions/wallet/signTypedData"});const n=u.parseAccount(i),o={EIP712Domain:s.getTypesForEIP712Domain({domain:t}),...r.types};if(s.validateTypedData({domain:t,message:a,primaryType:e,types:o}),n.signTypedData)return n.signTypedData({domain:t,message:a,primaryType:e,types:o});const d=s.serializeTypedData({domain:t,message:a,primaryType:e,types:o});return c.request({method:"eth_signTypedData_v4",params:[n.address,d]},{retryCount:0})}exports.signTypedData=p;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("./index48.cjs"),y=require("./index259.cjs"),s=require("./index191.cjs");async function p(c,r){const{account:i=c.account,domain:t,message:a,primaryType:e}=r;if(!i)throw new y.AccountNotFoundError({docsPath:"/docs/actions/wallet/signTypedData"});const n=u.parseAccount(i),o={EIP712Domain:s.getTypesForEIP712Domain({domain:t}),...r.types};if(s.validateTypedData({domain:t,message:a,primaryType:e,types:o}),n.signTypedData)return n.signTypedData({domain:t,message:a,primaryType:e,types:o});const d=s.serializeTypedData({domain:t,message:a,primaryType:e,types:o});return c.request({method:"eth_signTypedData_v4",params:[n.address,d]},{retryCount:0})}exports.signTypedData=p;
package/dist/index116.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { parseAccount as p } from "./index48.js";
2
- import { AccountNotFoundError as d } from "./index252.js";
2
+ import { AccountNotFoundError as d } from "./index259.js";
3
3
  import { getTypesForEIP712Domain as y, validateTypedData as m, serializeTypedData as u } from "./index191.js";
4
4
  async function f(r, s) {
5
5
  const { account: c = r.account, domain: t, message: a, primaryType: o } = s;
package/dist/index16.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("./index5.cjs"),a=require("./index30.cjs"),s=require("./index27.cjs"),l=require("./index31.cjs"),b=require("./index25.cjs"),n={42161:s.mainnet,421614:a.sepolia},h=async r=>{const{chain:e}=r;if(!e)return c.Err("No chain found");const o=(u=>u in n)(e.id)?n[e.id]:e;return await i(o)},i=async r=>{const e=l.createPublicClient({chain:r,transport:b.http()});try{const t=await e.getBlockNumber();return c.Ok(Number(t))}catch(t){return c.Err("Failed to fetch evm block number",t)}};exports._fetchEVMBlockNumber=i;exports.fetchEVMBlockNumber=h;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("./index5.cjs"),a=require("./index24.cjs"),s=require("./index25.cjs"),l=require("./index26.cjs"),b=require("./index27.cjs"),n={42161:s.mainnet,421614:a.sepolia},h=async r=>{const{chain:e}=r;if(!e)return c.Err("No chain found");const o=(u=>u in n)(e.id)?n[e.id]:e;return await i(o)},i=async r=>{const e=l.createPublicClient({chain:r,transport:b.http()});try{const t=await e.getBlockNumber();return c.Ok(Number(t))}catch(t){return c.Err("Failed to fetch evm block number",t)}};exports._fetchEVMBlockNumber=i;exports.fetchEVMBlockNumber=h;
package/dist/index16.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import { Err as c, Ok as a } from "./index5.js";
2
- import { sepolia as m } from "./index30.js";
3
- import { mainnet as s } from "./index27.js";
4
- import { createPublicClient as u } from "./index31.js";
5
- import { http as l } from "./index25.js";
2
+ import { sepolia as m } from "./index24.js";
3
+ import { mainnet as s } from "./index25.js";
4
+ import { createPublicClient as u } from "./index26.js";
5
+ import { http as l } from "./index27.js";
6
6
  const n = {
7
7
  42161: s,
8
8
  421614: m
package/dist/index18.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./index28.cjs"),u=require("./index29.cjs");class l{static async _postWithFallback(a,t){let r="";for(const n of a)try{const s=await fetch(n,{method:"POST",...t});if(s.status>=500){r=await(s.text()||s.json());continue}return await this.parse(s)}catch(s){r=o(s);continue}throw new Error(r||"All APIs failed")}static async postWithFallback(a,t){return await c(t).retry(()=>this._postWithFallback(a,t))}static async _getWithFallback(a,t){let r="";for(const n of a)try{const s=await fetch(n,t);if(s.status>=500){r=await(s.text()||s.json());continue}return await this.parse(s)}catch(s){r=o(s);continue}throw new Error(r||"All APIs failed")}static async getWithFallback(a,t){return await c(t).retry(()=>this._getWithFallback(a,t))}static async _get(a,t){return await this.parse(await fetch(a,t))}static async get(a,t){return await c(t).retry(()=>this._get(a,t))}static async _post(a,t){return await this.parse(await fetch(a,{method:"POST",...t}))}static async post(a,t){return await c(t).retry(()=>this._post(a,t))}static async parse(a){const t=await a.text();if(a.status>=200&&a.status<300)return u.safeParseJson(t);throw new Error(t)}}function o(e){return(e==null?void 0:e.message)||(e==null?void 0:e.toString())||"unknown error"}const c=e=>new i.Retry((e==null?void 0:e.retryCount)??2,(e==null?void 0:e.retryDelay)??1e3);exports.Fetcher=l;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./index30.cjs"),u=require("./index31.cjs");class l{static async _postWithFallback(a,t){let r="";for(const n of a)try{const s=await fetch(n,{method:"POST",...t});if(s.status>=500){r=await(s.text()||s.json());continue}return await this.parse(s)}catch(s){r=o(s);continue}throw new Error(r||"All APIs failed")}static async postWithFallback(a,t){return await c(t).retry(()=>this._postWithFallback(a,t))}static async _getWithFallback(a,t){let r="";for(const n of a)try{const s=await fetch(n,t);if(s.status>=500){r=await(s.text()||s.json());continue}return await this.parse(s)}catch(s){r=o(s);continue}throw new Error(r||"All APIs failed")}static async getWithFallback(a,t){return await c(t).retry(()=>this._getWithFallback(a,t))}static async _get(a,t){return await this.parse(await fetch(a,t))}static async get(a,t){return await c(t).retry(()=>this._get(a,t))}static async _post(a,t){return await this.parse(await fetch(a,{method:"POST",...t}))}static async post(a,t){return await c(t).retry(()=>this._post(a,t))}static async parse(a){const t=await a.text();if(a.status>=200&&a.status<300)return u.safeParseJson(t);throw new Error(t)}}function o(e){return(e==null?void 0:e.message)||(e==null?void 0:e.toString())||"unknown error"}const c=e=>new i.Retry((e==null?void 0:e.retryCount)??2,(e==null?void 0:e.retryDelay)??1e3);exports.Fetcher=l;
package/dist/index18.js CHANGED
@@ -1,5 +1,5 @@
1
- import { Retry as h } from "./index28.js";
2
- import { safeParseJson as i } from "./index29.js";
1
+ import { Retry as h } from "./index30.js";
2
+ import { safeParseJson as i } from "./index31.js";
3
3
  class w {
4
4
  static async _postWithFallback(a, t) {
5
5
  let r = "";
package/dist/index23.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./index195.cjs"),u=require("./index153.cjs"),a=require("./index254.cjs"),g=require("./index193.cjs"),y=require("./index255.cjs"),d=require("./index256.cjs"),T=require("./index257.cjs"),l=require("./index258.cjs"),q=require("./index259.cjs");function A(s,t={}){const{nonceManager:c}=t,e=u.toHex(i.secp256k1.getPublicKey(s.slice(2),!1)),o=g.publicKeyToAddress(e);return{...a.toAccount({address:o,nonceManager:c,async sign({hash:n}){return y.sign({hash:n,privateKey:s,to:"hex"})},async signAuthorization(n){return d.signAuthorization({...n,privateKey:s})},async signMessage({message:n}){return T.signMessage({message:n,privateKey:s})},async signTransaction(n,{serializer:r}={}){return l.signTransaction({privateKey:s,transaction:n,serializer:r})},async signTypedData(n){return q.signTypedData({...n,privateKey:s})}}),publicKey:e,source:"privateKey"}}exports.privateKeyToAccount=A;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./index195.cjs"),u=require("./index153.cjs"),a=require("./index233.cjs"),g=require("./index193.cjs"),y=require("./index234.cjs"),d=require("./index235.cjs"),T=require("./index236.cjs"),l=require("./index237.cjs"),q=require("./index238.cjs");function A(s,t={}){const{nonceManager:c}=t,e=u.toHex(i.secp256k1.getPublicKey(s.slice(2),!1)),o=g.publicKeyToAddress(e);return{...a.toAccount({address:o,nonceManager:c,async sign({hash:n}){return y.sign({hash:n,privateKey:s,to:"hex"})},async signAuthorization(n){return d.signAuthorization({...n,privateKey:s})},async signMessage({message:n}){return T.signMessage({message:n,privateKey:s})},async signTransaction(n,{serializer:r}={}){return l.signTransaction({privateKey:s,transaction:n,serializer:r})},async signTypedData(n){return q.signTypedData({...n,privateKey:s})}}),publicKey:e,source:"privateKey"}}exports.privateKeyToAccount=A;
package/dist/index23.js CHANGED
@@ -1,12 +1,12 @@
1
1
  import { secp256k1 as e } from "./index195.js";
2
2
  import { toHex as a } from "./index153.js";
3
- import { toAccount as m } from "./index254.js";
3
+ import { toAccount as m } from "./index233.js";
4
4
  import { publicKeyToAddress as u } from "./index193.js";
5
- import { sign as g } from "./index255.js";
6
- import { signAuthorization as p } from "./index256.js";
7
- import { signMessage as f } from "./index257.js";
8
- import { signTransaction as y } from "./index258.js";
9
- import { signTypedData as d } from "./index259.js";
5
+ import { sign as g } from "./index234.js";
6
+ import { signAuthorization as p } from "./index235.js";
7
+ import { signMessage as f } from "./index236.js";
8
+ import { signTransaction as y } from "./index237.js";
9
+ import { signTypedData as d } from "./index238.js";
10
10
  function H(n, t = {}) {
11
11
  const { nonceManager: s } = t, r = a(e.getPublicKey(n.slice(2), !1)), c = u(r);
12
12
  return {
package/dist/index233.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("./index131.cjs"),f=require("./index41.cjs"),i=require("./index130.cjs");function v(e,l){var t,o,n,a,s,u;if(!(e instanceof f.BaseError))return!1;const r=e.walk(c=>c instanceof i.ContractFunctionRevertedError);return r instanceof i.ContractFunctionRevertedError?!!(((t=r.data)==null?void 0:t.errorName)==="ResolverNotFound"||((o=r.data)==null?void 0:o.errorName)==="ResolverWildcardNotSupported"||((n=r.data)==null?void 0:n.errorName)==="ResolverNotContract"||((a=r.data)==null?void 0:a.errorName)==="ResolverError"||((s=r.data)==null?void 0:s.errorName)==="HttpError"||(u=r.reason)!=null&&u.includes("Wildcard on non-extended resolvers is not supported")||l==="reverse"&&r.reason===d.panicReasons[50]):!1}exports.isNullUniversalResolverError=v;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./index148.cjs"),t=require("./index174.cjs");function i(s){if(typeof s=="string"){if(!t.isAddress(s,{strict:!1}))throw new n.InvalidAddressError({address:s});return{address:s,type:"json-rpc"}}if(!t.isAddress(s.address,{strict:!1}))throw new n.InvalidAddressError({address:s.address});return{address:s.address,nonceManager:s.nonceManager,sign:s.sign,signAuthorization:s.signAuthorization,signMessage:s.signMessage,signTransaction:s.signTransaction,signTypedData:s.signTypedData,source:"custom",type:"local"}}exports.toAccount=i;
package/dist/index233.js CHANGED
@@ -1,13 +1,28 @@
1
- import { panicReasons as l } from "./index131.js";
2
- import { BaseError as c } from "./index41.js";
3
- import { ContractFunctionRevertedError as i } from "./index130.js";
4
- function N(e, f) {
5
- var t, o, n, a, s, u;
6
- if (!(e instanceof c))
7
- return !1;
8
- const r = e.walk((d) => d instanceof i);
9
- return r instanceof i ? !!(((t = r.data) == null ? void 0 : t.errorName) === "ResolverNotFound" || ((o = r.data) == null ? void 0 : o.errorName) === "ResolverWildcardNotSupported" || ((n = r.data) == null ? void 0 : n.errorName) === "ResolverNotContract" || ((a = r.data) == null ? void 0 : a.errorName) === "ResolverError" || ((s = r.data) == null ? void 0 : s.errorName) === "HttpError" || (u = r.reason) != null && u.includes("Wildcard on non-extended resolvers is not supported") || f === "reverse" && r.reason === l[50]) : !1;
1
+ import { InvalidAddressError as s } from "./index148.js";
2
+ import { isAddress as a } from "./index174.js";
3
+ function r(n) {
4
+ if (typeof n == "string") {
5
+ if (!a(n, { strict: !1 }))
6
+ throw new s({ address: n });
7
+ return {
8
+ address: n,
9
+ type: "json-rpc"
10
+ };
11
+ }
12
+ if (!a(n.address, { strict: !1 }))
13
+ throw new s({ address: n.address });
14
+ return {
15
+ address: n.address,
16
+ nonceManager: n.nonceManager,
17
+ sign: n.sign,
18
+ signAuthorization: n.signAuthorization,
19
+ signMessage: n.signMessage,
20
+ signTransaction: n.signTransaction,
21
+ signTypedData: n.signTypedData,
22
+ source: "custom",
23
+ type: "local"
24
+ };
10
25
  }
11
26
  export {
12
- N as isNullUniversalResolverError
27
+ r as toAccount
13
28
  };
package/dist/index234.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("./index152.cjs"),a=require("./index288.cjs"),c=require("./index151.cjs");function h(i){const r=i.replace(/^\.|\.$/gm,"");if(r.length===0)return new Uint8Array(1);const e=new Uint8Array(l.stringToBytes(r).byteLength+2);let t=0;const o=r.split(".");for(let s=0;s<o.length;s++){let n=l.stringToBytes(o[s]);n.byteLength>255&&(n=l.stringToBytes(a.encodeLabelhash(c.labelhash(o[s])))),e[t]=n.length,e.set(n,t+1),t+=n.length+1}return e.byteLength!==t+1?e.slice(0,t+1):e}exports.packetToBytes=h;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./index195.cjs"),s=require("./index153.cjs"),a=require("./index196.cjs");let l=!1;async function g({hash:t,privateKey:i,to:e="object"}){const{r:u,s:c,recovery:r}=o.secp256k1.sign(t.slice(2),i.slice(2),{lowS:!0,extraEntropy:l}),n={r:s.numberToHex(u,{size:32}),s:s.numberToHex(c,{size:32}),v:r?28n:27n,yParity:r};return e==="bytes"||e==="hex"?a.serializeSignature({...n,to:e}):n}exports.sign=g;
package/dist/index234.js CHANGED
@@ -1,19 +1,16 @@
1
- import { stringToBytes as i } from "./index152.js";
2
- import { encodeLabelhash as h } from "./index288.js";
3
- import { labelhash as f } from "./index151.js";
4
- function y(s) {
5
- const o = s.replace(/^\.|\.$/gm, "");
6
- if (o.length === 0)
7
- return new Uint8Array(1);
8
- const e = new Uint8Array(i(o).byteLength + 2);
9
- let t = 0;
10
- const l = o.split(".");
11
- for (let r = 0; r < l.length; r++) {
12
- let n = i(l[r]);
13
- n.byteLength > 255 && (n = i(h(f(l[r])))), e[t] = n.length, e.set(n, t + 1), t += n.length + 1;
14
- }
15
- return e.byteLength !== t + 1 ? e.slice(0, t + 1) : e;
1
+ import { secp256k1 as u } from "./index195.js";
2
+ import { numberToHex as i } from "./index153.js";
3
+ import { serializeSignature as a } from "./index196.js";
4
+ let m = !1;
5
+ async function y({ hash: n, privateKey: s, to: r = "object" }) {
6
+ const { r: o, s: c, recovery: e } = u.sign(n.slice(2), s.slice(2), { lowS: !0, extraEntropy: m }), t = {
7
+ r: i(o, { size: 32 }),
8
+ s: i(c, { size: 32 }),
9
+ v: e ? 28n : 27n,
10
+ yParity: e
11
+ };
12
+ return r === "bytes" || r === "hex" ? a({ ...t, to: r }) : t;
16
13
  }
17
14
  export {
18
- y as packetToBytes
15
+ y as sign
19
16
  };
package/dist/index235.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index289.cjs");async function f(i,{gatewayUrls:t,record:r}){return/eip155:/i.test(r)?l(i,{gatewayUrls:t,record:r}):e.parseAvatarUri({uri:r,gatewayUrls:t})}async function l(i,{gatewayUrls:t,record:r}){const n=e.parseNftUri(r),o=await e.getNftTokenUri(i,{nft:n}),{uri:a,isOnChain:c,isEncoded:p}=e.resolveAvatarUri({uri:o,gatewayUrls:t});if(c&&(a.includes("data:application/json;base64,")||a.startsWith("{"))){const u=p?atob(a.replace("data:application/json;base64,","")):a,d=JSON.parse(u);return e.parseAvatarUri({uri:e.getJsonImage(d),gatewayUrls:t})}let s=n.tokenID;return n.namespace==="erc1155"&&(s=s.replace("0x","").padStart(64,"0")),e.getMetadataAvatarUri({gatewayUrls:t,uri:a.replace(/(?:0x)?{id}/,s)})}exports.parseAvatarRecord=f;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("./index239.cjs"),a=require("./index234.cjs");async function u(t){const{chainId:n,nonce:i,privateKey:r,to:o="object"}=t,s=t.contractAddress??t.address,e=await a.sign({hash:c.hashAuthorization({address:s,chainId:n,nonce:i}),privateKey:r,to:o});return o==="object"?{address:s,chainId:n,nonce:i,...e}:e}exports.signAuthorization=u;
package/dist/index235.js CHANGED
@@ -1,25 +1,18 @@
1
- import { parseAvatarUri as o, parseNftUri as f, getNftTokenUri as v, resolveAvatarUri as l, getJsonImage as A, getMetadataAvatarUri as N } from "./index289.js";
2
- async function b(r, { gatewayUrls: t, record: e }) {
3
- return /eip155:/i.test(e) ? U(r, { gatewayUrls: t, record: e }) : o({ uri: e, gatewayUrls: t });
4
- }
5
- async function U(r, { gatewayUrls: t, record: e }) {
6
- const i = f(e), s = await v(r, { nft: i }), { uri: a, isOnChain: c, isEncoded: p } = l({ uri: s, gatewayUrls: t });
7
- if (c && (a.includes("data:application/json;base64,") || a.startsWith("{"))) {
8
- const d = p ? (
9
- // if it is encoded, decode it
10
- atob(a.replace("data:application/json;base64,", ""))
11
- ) : (
12
- // if it isn't encoded assume it is a JSON string, but it could be anything (it will error if it is)
13
- a
14
- ), u = JSON.parse(d);
15
- return o({ uri: A(u), gatewayUrls: t });
16
- }
17
- let n = i.tokenID;
18
- return i.namespace === "erc1155" && (n = n.replace("0x", "").padStart(64, "0")), N({
19
- gatewayUrls: t,
20
- uri: a.replace(/(?:0x)?{id}/, n)
1
+ import { hashAuthorization as a } from "./index239.js";
2
+ import { sign as e } from "./index234.js";
3
+ async function u(t) {
4
+ const { chainId: o, nonce: n, privateKey: c, to: i = "object" } = t, r = t.contractAddress ?? t.address, s = await e({
5
+ hash: a({ address: r, chainId: o, nonce: n }),
6
+ privateKey: c,
7
+ to: i
21
8
  });
9
+ return i === "object" ? {
10
+ address: r,
11
+ chainId: o,
12
+ nonce: n,
13
+ ...s
14
+ } : s;
22
15
  }
23
16
  export {
24
- b as parseAvatarRecord
17
+ u as signAuthorization
25
18
  };
package/dist/index236.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index290.cjs"),a=require("./index291.cjs");function i(t){return{...typeof t.baseFeePerGas=="bigint"&&{baseFeePerGas:e.fromNumber(t.baseFeePerGas)},...typeof t.blobBaseFee=="bigint"&&{blobBaseFee:e.fromNumber(t.blobBaseFee)},...typeof t.feeRecipient=="string"&&{feeRecipient:t.feeRecipient},...typeof t.gasLimit=="bigint"&&{gasLimit:e.fromNumber(t.gasLimit)},...typeof t.number=="bigint"&&{number:e.fromNumber(t.number)},...typeof t.prevRandao=="bigint"&&{prevRandao:e.fromNumber(t.prevRandao)},...typeof t.time=="bigint"&&{time:e.fromNumber(t.time)},...t.withdrawals&&{withdrawals:t.withdrawals.map(a.toRpc)}}}exports.toRpc=i;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./index226.cjs"),n=require("./index234.cjs");async function t({message:e,privateKey:s}){return await n.sign({hash:a.hashMessage(e),privateKey:s,to:"hex"})}exports.signMessage=t;
package/dist/index236.js CHANGED
@@ -1,33 +1,8 @@
1
- import { fromNumber as a } from "./index290.js";
2
- import { toRpc as e } from "./index291.js";
3
- function n(t) {
4
- return {
5
- ...typeof t.baseFeePerGas == "bigint" && {
6
- baseFeePerGas: a(t.baseFeePerGas)
7
- },
8
- ...typeof t.blobBaseFee == "bigint" && {
9
- blobBaseFee: a(t.blobBaseFee)
10
- },
11
- ...typeof t.feeRecipient == "string" && {
12
- feeRecipient: t.feeRecipient
13
- },
14
- ...typeof t.gasLimit == "bigint" && {
15
- gasLimit: a(t.gasLimit)
16
- },
17
- ...typeof t.number == "bigint" && {
18
- number: a(t.number)
19
- },
20
- ...typeof t.prevRandao == "bigint" && {
21
- prevRandao: a(t.prevRandao)
22
- },
23
- ...typeof t.time == "bigint" && {
24
- time: a(t.time)
25
- },
26
- ...t.withdrawals && {
27
- withdrawals: t.withdrawals.map(e)
28
- }
29
- };
1
+ import { hashMessage as e } from "./index226.js";
2
+ import { sign as o } from "./index234.js";
3
+ async function i({ message: s, privateKey: a }) {
4
+ return await o({ hash: e(s), privateKey: a, to: "hex" });
30
5
  }
31
6
  export {
32
- n as toRpc
7
+ i as signMessage
33
8
  };
package/dist/index237.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e="0x82ad56cb";exports.aggregate3Signature=e;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./index154.cjs"),c=require("./index231.cjs"),o=require("./index234.cjs");async function u(i){const{privateKey:r,transaction:e,serializer:n=c.serializeTransaction}=i,a=e.type==="eip4844"?{...e,sidecars:!1}:e,s=await o.sign({hash:t.keccak256(n(a)),privateKey:r});return n(e,s)}exports.signTransaction=u;
package/dist/index237.js CHANGED
@@ -1,4 +1,16 @@
1
- const a = "0x82ad56cb";
1
+ import { keccak256 as e } from "./index154.js";
2
+ import { serializeTransaction as o } from "./index231.js";
3
+ import { sign as c } from "./index234.js";
4
+ async function u(n) {
5
+ const { privateKey: a, transaction: r, serializer: i = o } = n, t = r.type === "eip4844" ? {
6
+ ...r,
7
+ sidecars: !1
8
+ } : r, s = await c({
9
+ hash: e(i(t)),
10
+ privateKey: a
11
+ });
12
+ return i(r, s);
13
+ }
2
14
  export {
3
- a as aggregate3Signature
15
+ u as signTransaction
4
16
  };
package/dist/index238.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("./index130.cjs"),u=require("./index146.cjs"),i=require("./index247.cjs");function l(r,{docsPath:t,...e}){const n=(()=>{const o=i.getNodeError(r,e);return o instanceof u.UnknownNodeError?r:o})();return new c.CallExecutionError(n,{docsPath:t,...e})}exports.getCallError=l;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./index190.cjs"),s=require("./index234.cjs");async function i(e){const{privateKey:t,...a}=e;return await s.sign({hash:n.hashTypedData(a),privateKey:t,to:"hex"})}exports.signTypedData=i;
package/dist/index238.js CHANGED
@@ -1,16 +1,13 @@
1
- import { CallExecutionError as c } from "./index130.js";
2
- import { UnknownNodeError as i } from "./index146.js";
3
- import { getNodeError as u } from "./index247.js";
4
- function a(r, { docsPath: t, ...o }) {
5
- const e = (() => {
6
- const n = u(r, o);
7
- return n instanceof i ? r : n;
8
- })();
9
- return new c(e, {
10
- docsPath: t,
11
- ...o
1
+ import { hashTypedData as o } from "./index190.js";
2
+ import { sign as r } from "./index234.js";
3
+ async function p(t) {
4
+ const { privateKey: a, ...e } = t;
5
+ return await r({
6
+ hash: o(e),
7
+ privateKey: a,
8
+ to: "hex"
12
9
  });
13
10
  }
14
11
  export {
15
- a as getCallError
12
+ p as signTypedData
16
13
  };
package/dist/index239.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function y(c,{format:n}){if(!n)return{};const r={};function i(e){const s=Object.keys(e);for(const t of s)t in c&&(r[t]=c[t]),e[t]&&typeof e[t]=="object"&&!Array.isArray(e[t])&&i(e[t])}const o=n(c||{});return i(o),r}exports.extract=y;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./index157.cjs"),u=require("./index152.cjs"),c=require("./index153.cjs"),a=require("./index197.cjs"),h=require("./index154.cjs");function d(e){const{chainId:t,nonce:o,to:r}=e,s=e.contractAddress??e.address,n=h.keccak256(i.concatHex(["0x05",a.toRlp([t?c.numberToHex(t):"0x",s,o?c.numberToHex(o):"0x"])]));return r==="bytes"?u.hexToBytes(n):n}exports.hashAuthorization=d;
package/dist/index239.js CHANGED
@@ -1,15 +1,19 @@
1
- function y(t, { format: r }) {
2
- if (!r)
3
- return {};
4
- const e = {};
5
- function i(c) {
6
- const s = Object.keys(c);
7
- for (const n of s)
8
- n in t && (e[n] = t[n]), c[n] && typeof c[n] == "object" && !Array.isArray(c[n]) && i(c[n]);
9
- }
10
- const o = r(t || {});
11
- return i(o), e;
1
+ import { concatHex as i } from "./index157.js";
2
+ import { hexToBytes as m } from "./index152.js";
3
+ import { numberToHex as c } from "./index153.js";
4
+ import { toRlp as d } from "./index197.js";
5
+ import { keccak256 as f } from "./index154.js";
6
+ function b(o) {
7
+ const { chainId: t, nonce: r, to: s } = o, e = o.contractAddress ?? o.address, n = f(i([
8
+ "0x05",
9
+ d([
10
+ t ? c(t) : "0x",
11
+ e,
12
+ r ? c(r) : "0x"
13
+ ])
14
+ ]));
15
+ return s === "bytes" ? m(n) : n;
12
16
  }
13
17
  export {
14
- y as extract
18
+ b as hashAuthorization
15
19
  };
package/dist/index24.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./index47.cjs"),c=require("./index101.cjs");function r(e){const{key:t="wallet",name:l="Wallet Client",transport:n}=e;return i.createClient({...e,key:t,name:l,transport:n,type:"walletClient"}).extend(c.walletActions)}exports.createWalletClient=r;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index216.cjs"),a=e.defineChain({id:11155111,name:"Sepolia",nativeCurrency:{name:"Sepolia Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://sepolia.drpc.org"]}},blockExplorers:{default:{name:"Etherscan",url:"https://sepolia.etherscan.io",apiUrl:"https://api-sepolia.etherscan.io/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:751532},ensRegistry:{address:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"},ensUniversalResolver:{address:"0xc8Af999e38273D658BE1b921b88A9Ddf005769cC",blockCreated:5317080}},testnet:!0});exports.sepolia=a;
package/dist/index24.js CHANGED
@@ -1,15 +1,33 @@
1
- import { createClient as i } from "./index47.js";
2
- import { walletActions as o } from "./index101.js";
3
- function m(t) {
4
- const { key: e = "wallet", name: l = "Wallet Client", transport: n } = t;
5
- return i({
6
- ...t,
7
- key: e,
8
- name: l,
9
- transport: n,
10
- type: "walletClient"
11
- }).extend(o);
12
- }
1
+ import { defineChain as e } from "./index216.js";
2
+ const s = /* @__PURE__ */ e({
3
+ id: 11155111,
4
+ name: "Sepolia",
5
+ nativeCurrency: { name: "Sepolia Ether", symbol: "ETH", decimals: 18 },
6
+ rpcUrls: {
7
+ default: {
8
+ http: ["https://sepolia.drpc.org"]
9
+ }
10
+ },
11
+ blockExplorers: {
12
+ default: {
13
+ name: "Etherscan",
14
+ url: "https://sepolia.etherscan.io",
15
+ apiUrl: "https://api-sepolia.etherscan.io/api"
16
+ }
17
+ },
18
+ contracts: {
19
+ multicall3: {
20
+ address: "0xca11bde05977b3631167028862be2a173976ca11",
21
+ blockCreated: 751532
22
+ },
23
+ ensRegistry: { address: "0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e" },
24
+ ensUniversalResolver: {
25
+ address: "0xc8Af999e38273D658BE1b921b88A9Ddf005769cC",
26
+ blockCreated: 5317080
27
+ }
28
+ },
29
+ testnet: !0
30
+ });
13
31
  export {
14
- m as createWalletClient
32
+ s as sepolia
15
33
  };