@pufferfinance/puffer-sdk 1.0.2 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. package/README.md +8 -7
  2. package/dist/api/puffer-client.d.ts +16 -0
  3. package/dist/ccip-CzWPognK.js +158 -0
  4. package/dist/ccip-CzWPognK.js.map +1 -0
  5. package/dist/ccip-DNUqn1xf.cjs +2 -0
  6. package/dist/ccip-DNUqn1xf.cjs.map +1 -0
  7. package/dist/chains/constants.d.ts +2 -3
  8. package/dist/contracts/abis/holesky/PufferDepositor.d.ts +283 -0
  9. package/dist/contracts/abis/mainnet/ERC20Permit.d.ts +396 -0
  10. package/dist/contracts/abis/mainnet/PufLocker.d.ts +476 -0
  11. package/dist/contracts/abis/mainnet/PufToken.d.ts +676 -0
  12. package/dist/contracts/abis/mainnet/PufferDepositor.d.ts +283 -0
  13. package/dist/contracts/abis/mainnet/PufferL2Depositor.d.ts +351 -0
  14. package/dist/contracts/abis/puf-locker-abis.d.ts +480 -0
  15. package/dist/contracts/abis/puf-token-abis.d.ts +680 -0
  16. package/dist/contracts/abis/puffer-depositor-abis.d.ts +642 -0
  17. package/dist/contracts/abis/{abis.d.ts → puffer-vault-abis.d.ts} +3 -1367
  18. package/dist/contracts/abis/tokens-abis.d.ts +396 -0
  19. package/dist/contracts/addresses.d.ts +4 -7
  20. package/dist/contracts/handlers/erc20-permit-handler.d.ts +13705 -0
  21. package/dist/contracts/handlers/puf-locker-handler.d.ts +31064 -0
  22. package/dist/contracts/handlers/puffer-depositor-handler.d.ts +9923 -0
  23. package/dist/contracts/handlers/puffer-depositor-handler.test.d.ts +1 -0
  24. package/dist/contracts/handlers/puffer-l2-depositor-handler.d.ts +22867 -0
  25. package/dist/contracts/handlers/puffer-l2-depositor-handler.test.d.ts +1 -0
  26. package/dist/contracts/tokens.d.ts +27 -0
  27. package/dist/main--Ww95s5e.cjs +41 -0
  28. package/dist/main--Ww95s5e.cjs.map +1 -0
  29. package/dist/{main-CiwlneBr.js → main-Cl9ZFxdC.js} +5939 -3509
  30. package/dist/main-Cl9ZFxdC.js.map +1 -0
  31. package/dist/main.cjs +1 -1
  32. package/dist/main.d.ts +2 -0
  33. package/dist/main.js +8 -5
  34. package/dist/utils/time.d.ts +1 -0
  35. package/package.json +12 -10
  36. package/dist/ccip-Bv7jv7p7.cjs +0 -2
  37. package/dist/ccip-Bv7jv7p7.cjs.map +0 -1
  38. package/dist/ccip-n5cHM2-q.js +0 -165
  39. package/dist/ccip-n5cHM2-q.js.map +0 -1
  40. package/dist/contracts/abis/anvil/PufferVaultV2.d.ts +0 -1361
  41. package/dist/contracts/handlers/puffer-vault-handler.d.ts +0 -79
  42. package/dist/main-CiwlneBr.js.map +0 -1
  43. package/dist/main-DY0whdxp.cjs +0 -39
  44. package/dist/main-DY0whdxp.cjs.map +0 -1
  45. /package/dist/{api/puffer-client-helpers.test.d.ts → contracts/handlers/erc20-permit-handler.test.d.ts} +0 -0
  46. /package/dist/{api/puffer-client.test.d.ts → contracts/handlers/puf-locker-handler.test.d.ts} +0 -0
  47. /package/dist/{errors/validation-errors.test.d.ts → contracts/handlers/puf-token-handler.test.d.ts} +0 -0
package/README.md CHANGED
@@ -1,12 +1,13 @@
1
+ <h1 align="center">Puffer SDK</h1>
2
+
1
3
  <div align="center">
2
- <h1>Puffer SDK</h1>
4
+ <a href="https://github.com/pufferfinance/puffer-sdk/actions/workflows/build-and-test.yml?query=branch%3Amain"><img alt="build" src="https://github.com/pufferfinance/puffer-sdk/actions/workflows/build-and-test.yml/badge.svg?branch=main" /></a>
5
+ <a href="https://github.com/PufferFinance/puffer-sdk/blob/main/LICENSE"><img alt="license" src="https://img.shields.io/github/license/pufferfinance/puffer-sdk" /></a>
6
+ <a href="https://www.npmjs.com/package/@pufferfinance/puffer-sdk"><img alt="npm downloads" src="https://img.shields.io/npm/dm/@pufferfinance/puffer-sdk?logo=npm" /></a>
7
+ <a href="https://www.npmjs.com/package/@pufferfinance/puffer-sdk"><img alt="npm version" src="https://img.shields.io/npm/v/@pufferfinance/puffer-sdk?label=version&logo=npm" /></a>
3
8
 
4
- <img alt="build" src="https://github.com/pufferfinance/puffer-sdk/actions/workflows/build-and-test.yml/badge.svg?branch=main" />
5
- <img alt="license" src="https://img.shields.io/github/license/pufferfinance/puffer-sdk?color=limegreen" />
6
- <img alt="npm downloads" src="https://img.shields.io/npm/dm/@pufferfinance/puffer-sdk?color=limegreen&logo=npm" />
7
- <img alt="npm version" src="https://img.shields.io/npm/v/@pufferfinance/puffer-sdk?label=version&logo=npm" />
8
9
  <!-- TODO: ADD COVERAGE BADGE -->
9
-
10
+
10
11
  <p>SDK to seamlessly interact with puffer smart contracts<p>
11
12
  </div>
12
13
 
@@ -43,7 +44,7 @@ const balance = await pufferClient.vault.balanceOf(walletAddress);
43
44
  - Deposit ETH to mint pufETH.
44
45
  - Deposit stETH to mint pufETH.
45
46
  - Check pufETH balance.
46
- - Get latest rate of pufETH compared to ETH.
47
+ - Get the latest rate of pufETH compared to ETH.
47
48
  - and much more.
48
49
 
49
50
  ## Documentation
@@ -1,6 +1,11 @@
1
1
  import { PublicClient, WalletClient } from 'viem';
2
2
  import { Chain } from '../chains/constants';
3
3
  import { PufferVaultHandler } from '../contracts/handlers/puffer-vault-handler';
4
+ import { PufferDepositorHandler } from '../contracts/handlers/puffer-depositor-handler';
5
+ import { PufTokenHandler } from '../contracts/handlers/puf-token-handler';
6
+ import { PufferL2DepositorHandler } from '../contracts/handlers/puffer-l2-depositor-handler';
7
+ import { ERC20PermitHandler } from '../contracts/handlers/erc20-permit-handler';
8
+ import { PufLockerHandler } from '../contracts/handlers/puf-locker-handler';
4
9
 
5
10
  /**
6
11
  * The core class and the main entry point of the Puffer SDK.
@@ -8,7 +13,18 @@ import { PufferVaultHandler } from '../contracts/handlers/puffer-vault-handler';
8
13
  export declare class PufferClient {
9
14
  private walletClient;
10
15
  private publicClient;
16
+ /** Handler for the `ERC20Permit` contract. */
17
+ erc20Permit: ERC20PermitHandler;
18
+ /** Handler for the `PufferVaultV2` contract. */
11
19
  vault: PufferVaultHandler;
20
+ /** Handler for the `PufferDepositor` contract. */
21
+ depositor: PufferDepositorHandler;
22
+ /** Handler for the `PufferL2Depositor` contract. */
23
+ l2Depositor: PufferL2DepositorHandler;
24
+ /** Handler for the `PufToken` contract. */
25
+ pufToken: PufTokenHandler;
26
+ /** Handler for the `PufLocker` contract. */
27
+ pufLocker: PufLockerHandler;
12
28
  /**
13
29
  * Create the Puffer Client.
14
30
  *
@@ -0,0 +1,158 @@
1
+ import { B as p, g as m, s as y, d as w, i as k, c as O, a as E, e as L, H as h, b as x } from "./main-Cl9ZFxdC.js";
2
+ class M extends p {
3
+ constructor({ callbackSelector: s, cause: e, data: n, extraData: c, sender: u, urls: t }) {
4
+ var i;
5
+ super(e.shortMessage || "An error occurred while fetching for an offchain result.", {
6
+ cause: e,
7
+ metaMessages: [
8
+ ...e.metaMessages || [],
9
+ (i = e.metaMessages) != null && i.length ? "" : [],
10
+ "Offchain Gateway Call:",
11
+ t && [
12
+ " Gateway URL(s):",
13
+ ...t.map((f) => ` ${m(f)}`)
14
+ ],
15
+ ` Sender: ${u}`,
16
+ ` Data: ${n}`,
17
+ ` Callback selector: ${s}`,
18
+ ` Extra data: ${c}`
19
+ ].flat()
20
+ }), Object.defineProperty(this, "name", {
21
+ enumerable: !0,
22
+ configurable: !0,
23
+ writable: !0,
24
+ value: "OffchainLookupError"
25
+ });
26
+ }
27
+ }
28
+ class R extends p {
29
+ constructor({ result: s, url: e }) {
30
+ super("Offchain gateway response is malformed. Response data must be a hex value.", {
31
+ metaMessages: [
32
+ `Gateway URL: ${m(e)}`,
33
+ `Response: ${y(s)}`
34
+ ]
35
+ }), Object.defineProperty(this, "name", {
36
+ enumerable: !0,
37
+ configurable: !0,
38
+ writable: !0,
39
+ value: "OffchainLookupResponseMalformedError"
40
+ });
41
+ }
42
+ }
43
+ class $ extends p {
44
+ constructor({ sender: s, to: e }) {
45
+ super("Reverted sender address does not match target contract address (`to`).", {
46
+ metaMessages: [
47
+ `Contract address: ${e}`,
48
+ `OffchainLookup sender address: ${s}`
49
+ ]
50
+ }), Object.defineProperty(this, "name", {
51
+ enumerable: !0,
52
+ configurable: !0,
53
+ writable: !0,
54
+ value: "OffchainLookupSenderMismatchError"
55
+ });
56
+ }
57
+ }
58
+ const j = "0x556f1830", S = {
59
+ name: "OffchainLookup",
60
+ type: "error",
61
+ inputs: [
62
+ {
63
+ name: "sender",
64
+ type: "address"
65
+ },
66
+ {
67
+ name: "urls",
68
+ type: "string[]"
69
+ },
70
+ {
71
+ name: "callData",
72
+ type: "bytes"
73
+ },
74
+ {
75
+ name: "callbackFunction",
76
+ type: "bytes4"
77
+ },
78
+ {
79
+ name: "extraData",
80
+ type: "bytes"
81
+ }
82
+ ]
83
+ };
84
+ async function v(o, { blockNumber: s, blockTag: e, data: n, to: c }) {
85
+ const { args: u } = w({
86
+ data: n,
87
+ abi: [S]
88
+ }), [t, i, f, a, r] = u, { ccipRead: d } = o, b = d && typeof (d == null ? void 0 : d.request) == "function" ? d.request : q;
89
+ try {
90
+ if (!k(c, t))
91
+ throw new $({ sender: t, to: c });
92
+ const l = await b({ data: f, sender: t, urls: i }), { data: g } = await O(o, {
93
+ blockNumber: s,
94
+ blockTag: e,
95
+ data: E([
96
+ a,
97
+ L([{ type: "bytes" }, { type: "bytes" }], [l, r])
98
+ ]),
99
+ to: c
100
+ });
101
+ return g;
102
+ } catch (l) {
103
+ throw new M({
104
+ callbackSelector: a,
105
+ cause: l,
106
+ data: n,
107
+ extraData: r,
108
+ sender: t,
109
+ urls: i
110
+ });
111
+ }
112
+ }
113
+ async function q({ data: o, sender: s, urls: e }) {
114
+ var c;
115
+ let n = new Error("An unknown error occurred.");
116
+ for (let u = 0; u < e.length; u++) {
117
+ const t = e[u], i = t.includes("{data}") ? "GET" : "POST", f = i === "POST" ? { data: o, sender: s } : void 0;
118
+ try {
119
+ const a = await fetch(t.replace("{sender}", s).replace("{data}", o), {
120
+ body: JSON.stringify(f),
121
+ method: i
122
+ });
123
+ let r;
124
+ if ((c = a.headers.get("Content-Type")) != null && c.startsWith("application/json") ? r = (await a.json()).data : r = await a.text(), !a.ok) {
125
+ n = new h({
126
+ body: f,
127
+ details: r != null && r.error ? y(r.error) : a.statusText,
128
+ headers: a.headers,
129
+ status: a.status,
130
+ url: t
131
+ });
132
+ continue;
133
+ }
134
+ if (!x(r)) {
135
+ n = new R({
136
+ result: r,
137
+ url: t
138
+ });
139
+ continue;
140
+ }
141
+ return r;
142
+ } catch (a) {
143
+ n = new h({
144
+ body: f,
145
+ details: a.message,
146
+ url: t
147
+ });
148
+ }
149
+ }
150
+ throw n;
151
+ }
152
+ export {
153
+ q as ccipRequest,
154
+ v as offchainLookup,
155
+ S as offchainLookupAbiItem,
156
+ j as offchainLookupSignature
157
+ };
158
+ //# sourceMappingURL=ccip-CzWPognK.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ccip-CzWPognK.js","sources":["../node_modules/.pnpm/viem@2.14.0_typescript@5.4.5_zod@3.23.8/node_modules/viem/_esm/errors/ccip.js","../node_modules/.pnpm/viem@2.14.0_typescript@5.4.5_zod@3.23.8/node_modules/viem/_esm/utils/ccip.js"],"sourcesContent":["import { stringify } from '../utils/stringify.js';\nimport { BaseError } from './base.js';\nimport { getUrl } from './utils.js';\nexport class OffchainLookupError extends BaseError {\n constructor({ callbackSelector, cause, data, extraData, sender, urls, }) {\n super(cause.shortMessage ||\n 'An error occurred while fetching for an offchain result.', {\n cause,\n metaMessages: [\n ...(cause.metaMessages || []),\n cause.metaMessages?.length ? '' : [],\n 'Offchain Gateway Call:',\n urls && [\n ' Gateway URL(s):',\n ...urls.map((url) => ` ${getUrl(url)}`),\n ],\n ` Sender: ${sender}`,\n ` Data: ${data}`,\n ` Callback selector: ${callbackSelector}`,\n ` Extra data: ${extraData}`,\n ].flat(),\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'OffchainLookupError'\n });\n }\n}\nexport class OffchainLookupResponseMalformedError extends BaseError {\n constructor({ result, url }) {\n super('Offchain gateway response is malformed. Response data must be a hex value.', {\n metaMessages: [\n `Gateway URL: ${getUrl(url)}`,\n `Response: ${stringify(result)}`,\n ],\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'OffchainLookupResponseMalformedError'\n });\n }\n}\nexport class OffchainLookupSenderMismatchError extends BaseError {\n constructor({ sender, to }) {\n super('Reverted sender address does not match target contract address (`to`).', {\n metaMessages: [\n `Contract address: ${to}`,\n `OffchainLookup sender address: ${sender}`,\n ],\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'OffchainLookupSenderMismatchError'\n });\n }\n}\n//# sourceMappingURL=ccip.js.map","import { call } from '../actions/public/call.js';\nimport { OffchainLookupError, OffchainLookupResponseMalformedError, OffchainLookupSenderMismatchError, } from '../errors/ccip.js';\nimport { HttpRequestError, } from '../errors/request.js';\nimport { decodeErrorResult } from './abi/decodeErrorResult.js';\nimport { encodeAbiParameters } from './abi/encodeAbiParameters.js';\nimport { isAddressEqual } from './address/isAddressEqual.js';\nimport { concat } from './data/concat.js';\nimport { isHex } from './data/isHex.js';\nimport { stringify } from './stringify.js';\nexport const offchainLookupSignature = '0x556f1830';\nexport const offchainLookupAbiItem = {\n name: 'OffchainLookup',\n type: 'error',\n inputs: [\n {\n name: 'sender',\n type: 'address',\n },\n {\n name: 'urls',\n type: 'string[]',\n },\n {\n name: 'callData',\n type: 'bytes',\n },\n {\n name: 'callbackFunction',\n type: 'bytes4',\n },\n {\n name: 'extraData',\n type: 'bytes',\n },\n ],\n};\nexport async function offchainLookup(client, { blockNumber, blockTag, data, to, }) {\n const { args } = decodeErrorResult({\n data,\n abi: [offchainLookupAbiItem],\n });\n const [sender, urls, callData, callbackSelector, extraData] = args;\n const { ccipRead } = client;\n const ccipRequest_ = ccipRead && typeof ccipRead?.request === 'function'\n ? ccipRead.request\n : ccipRequest;\n try {\n if (!isAddressEqual(to, sender))\n throw new OffchainLookupSenderMismatchError({ sender, to });\n const result = await ccipRequest_({ data: callData, sender, urls });\n const { data: data_ } = await call(client, {\n blockNumber,\n blockTag,\n data: concat([\n callbackSelector,\n encodeAbiParameters([{ type: 'bytes' }, { type: 'bytes' }], [result, extraData]),\n ]),\n to,\n });\n return data_;\n }\n catch (err) {\n throw new OffchainLookupError({\n callbackSelector,\n cause: err,\n data,\n extraData,\n sender,\n urls,\n });\n }\n}\nexport async function ccipRequest({ data, sender, urls, }) {\n let error = new Error('An unknown error occurred.');\n for (let i = 0; i < urls.length; i++) {\n const url = urls[i];\n const method = url.includes('{data}') ? 'GET' : 'POST';\n const body = method === 'POST' ? { data, sender } : undefined;\n try {\n const response = await fetch(url.replace('{sender}', sender).replace('{data}', data), {\n body: JSON.stringify(body),\n method,\n });\n let result;\n if (response.headers.get('Content-Type')?.startsWith('application/json')) {\n result = (await response.json()).data;\n }\n else {\n result = (await response.text());\n }\n if (!response.ok) {\n error = new HttpRequestError({\n body,\n details: result?.error\n ? stringify(result.error)\n : response.statusText,\n headers: response.headers,\n status: response.status,\n url,\n });\n continue;\n }\n if (!isHex(result)) {\n error = new OffchainLookupResponseMalformedError({\n result,\n url,\n });\n continue;\n }\n return result;\n }\n catch (err) {\n error = new HttpRequestError({\n body,\n details: err.message,\n url,\n });\n }\n }\n throw error;\n}\n//# sourceMappingURL=ccip.js.map"],"names":["OffchainLookupError","BaseError","callbackSelector","cause","data","extraData","sender","urls","_a","url","getUrl","OffchainLookupResponseMalformedError","result","stringify","OffchainLookupSenderMismatchError","to","offchainLookupSignature","offchainLookupAbiItem","offchainLookup","client","blockNumber","blockTag","args","decodeErrorResult","callData","ccipRead","ccipRequest_","ccipRequest","isAddressEqual","data_","call","concat","encodeAbiParameters","err","error","i","method","body","response","HttpRequestError","isHex"],"mappings":";AAGO,MAAMA,UAA4BC,EAAU;AAA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AAA,UAClB,QAAQA,EAAS;AAAA,UACjB,KAAA7B;AAAA,QACpB,CAAiB;AACD;AAAA,MACH;AACD,UAAI,CAAC+B,EAAM5B,CAAM,GAAG;AAChB,QAAAsB,IAAQ,IAAIvB,EAAqC;AAAA,UAC7C,QAAAC;AAAA,UACA,KAAAH;AAAA,QACpB,CAAiB;AACD;AAAA,MACH;AACD,aAAOG;AAAA,IACV,SACMqB,GAAK;AACR,MAAAC,IAAQ,IAAIK,EAAiB;AAAA,QACzB,MAAAF;AAAA,QACA,SAASJ,EAAI;AAAA,QACb,KAAAxB;AAAA,MAChB,CAAa;AAAA,IACJ;AAAA,EACJ;AACD,QAAMyB;AACV;","x_google_ignoreList":[0,1]}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./main--Ww95s5e.cjs");class g extends e.BaseError{constructor({callbackSelector:o,cause:t,data:n,extraData:i,sender:f,urls:r}){var u;super(t.shortMessage||"An error occurred while fetching for an offchain result.",{cause:t,metaMessages:[...t.metaMessages||[],(u=t.metaMessages)!=null&&u.length?"":[],"Offchain Gateway Call:",r&&[" Gateway URL(s):",...r.map(l=>` ${e.getUrl(l)}`)],` Sender: ${f}`,` Data: ${n}`,` Callback selector: ${o}`,` Extra data: ${i}`].flat()}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"OffchainLookupError"})}}class w extends e.BaseError{constructor({result:o,url:t}){super("Offchain gateway response is malformed. Response data must be a hex value.",{metaMessages:[`Gateway URL: ${e.getUrl(t)}`,`Response: ${e.stringify(o)}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"OffchainLookupResponseMalformedError"})}}class k extends e.BaseError{constructor({sender:o,to:t}){super("Reverted sender address does not match target contract address (`to`).",{metaMessages:[`Contract address: ${t}`,`OffchainLookup sender address: ${o}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"OffchainLookupSenderMismatchError"})}}const O="0x556f1830",h={name:"OffchainLookup",type:"error",inputs:[{name:"sender",type:"address"},{name:"urls",type:"string[]"},{name:"callData",type:"bytes"},{name:"callbackFunction",type:"bytes4"},{name:"extraData",type:"bytes"}]};async function E(c,{blockNumber:o,blockTag:t,data:n,to:i}){const{args:f}=e.decodeErrorResult({data:n,abi:[h]}),[r,u,l,a,s]=f,{ccipRead:d}=c,y=d&&typeof(d==null?void 0:d.request)=="function"?d.request:m;try{if(!e.isAddressEqual(i,r))throw new k({sender:r,to:i});const p=await y({data:l,sender:r,urls:u}),{data:b}=await e.call(c,{blockNumber:o,blockTag:t,data:e.concat([a,e.encodeAbiParameters([{type:"bytes"},{type:"bytes"}],[p,s])]),to:i});return b}catch(p){throw new g({callbackSelector:a,cause:p,data:n,extraData:s,sender:r,urls:u})}}async function m({data:c,sender:o,urls:t}){var i;let n=new Error("An unknown error occurred.");for(let f=0;f<t.length;f++){const r=t[f],u=r.includes("{data}")?"GET":"POST",l=u==="POST"?{data:c,sender:o}:void 0;try{const a=await fetch(r.replace("{sender}",o).replace("{data}",c),{body:JSON.stringify(l),method:u});let s;if((i=a.headers.get("Content-Type"))!=null&&i.startsWith("application/json")?s=(await a.json()).data:s=await a.text(),!a.ok){n=new e.HttpRequestError({body:l,details:s!=null&&s.error?e.stringify(s.error):a.statusText,headers:a.headers,status:a.status,url:r});continue}if(!e.isHex(s)){n=new w({result:s,url:r});continue}return s}catch(a){n=new e.HttpRequestError({body:l,details:a.message,url:r})}}throw n}exports.ccipRequest=m;exports.offchainLookup=E;exports.offchainLookupAbiItem=h;exports.offchainLookupSignature=O;
2
+ //# sourceMappingURL=ccip-DNUqn1xf.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ccip-DNUqn1xf.cjs","sources":["../node_modules/.pnpm/viem@2.14.0_typescript@5.4.5_zod@3.23.8/node_modules/viem/_esm/errors/ccip.js","../node_modules/.pnpm/viem@2.14.0_typescript@5.4.5_zod@3.23.8/node_modules/viem/_esm/utils/ccip.js"],"sourcesContent":["import { stringify } from '../utils/stringify.js';\nimport { BaseError } from './base.js';\nimport { getUrl } from './utils.js';\nexport class OffchainLookupError extends BaseError {\n constructor({ callbackSelector, cause, data, extraData, sender, urls, }) {\n super(cause.shortMessage ||\n 'An error occurred while fetching for an offchain result.', {\n cause,\n metaMessages: [\n ...(cause.metaMessages || []),\n cause.metaMessages?.length ? '' : [],\n 'Offchain Gateway Call:',\n urls && [\n ' Gateway URL(s):',\n ...urls.map((url) => ` ${getUrl(url)}`),\n ],\n ` Sender: ${sender}`,\n ` Data: ${data}`,\n ` Callback selector: ${callbackSelector}`,\n ` Extra data: ${extraData}`,\n ].flat(),\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'OffchainLookupError'\n });\n }\n}\nexport class OffchainLookupResponseMalformedError extends BaseError {\n constructor({ result, url }) {\n super('Offchain gateway response is malformed. Response data must be a hex value.', {\n metaMessages: [\n `Gateway URL: ${getUrl(url)}`,\n `Response: ${stringify(result)}`,\n ],\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'OffchainLookupResponseMalformedError'\n });\n }\n}\nexport class OffchainLookupSenderMismatchError extends BaseError {\n constructor({ sender, to }) {\n super('Reverted sender address does not match target contract address (`to`).', {\n metaMessages: [\n `Contract address: ${to}`,\n `OffchainLookup sender address: ${sender}`,\n ],\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'OffchainLookupSenderMismatchError'\n });\n }\n}\n//# sourceMappingURL=ccip.js.map","import { call } from '../actions/public/call.js';\nimport { OffchainLookupError, OffchainLookupResponseMalformedError, OffchainLookupSenderMismatchError, } from '../errors/ccip.js';\nimport { HttpRequestError, } from '../errors/request.js';\nimport { decodeErrorResult } from './abi/decodeErrorResult.js';\nimport { encodeAbiParameters } from './abi/encodeAbiParameters.js';\nimport { isAddressEqual } from './address/isAddressEqual.js';\nimport { concat } from './data/concat.js';\nimport { isHex } from './data/isHex.js';\nimport { stringify } from './stringify.js';\nexport const offchainLookupSignature = '0x556f1830';\nexport const offchainLookupAbiItem = {\n name: 'OffchainLookup',\n type: 'error',\n inputs: [\n {\n name: 'sender',\n type: 'address',\n },\n {\n name: 'urls',\n type: 'string[]',\n },\n {\n name: 'callData',\n type: 'bytes',\n },\n {\n name: 'callbackFunction',\n type: 'bytes4',\n },\n {\n name: 'extraData',\n type: 'bytes',\n },\n ],\n};\nexport async function offchainLookup(client, { blockNumber, blockTag, data, to, }) {\n const { args } = decodeErrorResult({\n data,\n abi: [offchainLookupAbiItem],\n });\n const [sender, urls, callData, callbackSelector, extraData] = args;\n const { ccipRead } = client;\n const ccipRequest_ = ccipRead && typeof ccipRead?.request === 'function'\n ? ccipRead.request\n : ccipRequest;\n try {\n if (!isAddressEqual(to, sender))\n throw new OffchainLookupSenderMismatchError({ sender, to });\n const result = await ccipRequest_({ data: callData, sender, urls });\n const { data: data_ } = await call(client, {\n blockNumber,\n blockTag,\n data: concat([\n callbackSelector,\n encodeAbiParameters([{ type: 'bytes' }, { type: 'bytes' }], [result, extraData]),\n ]),\n to,\n });\n return data_;\n }\n catch (err) {\n throw new OffchainLookupError({\n callbackSelector,\n cause: err,\n data,\n extraData,\n sender,\n urls,\n });\n }\n}\nexport async function ccipRequest({ data, sender, urls, }) {\n let error = new Error('An unknown error occurred.');\n for (let i = 0; i < urls.length; i++) {\n const url = urls[i];\n const method = url.includes('{data}') ? 'GET' : 'POST';\n const body = method === 'POST' ? { data, sender } : undefined;\n try {\n const response = await fetch(url.replace('{sender}', sender).replace('{data}', data), {\n body: JSON.stringify(body),\n method,\n });\n let result;\n if (response.headers.get('Content-Type')?.startsWith('application/json')) {\n result = (await response.json()).data;\n }\n else {\n result = (await response.text());\n }\n if (!response.ok) {\n error = new HttpRequestError({\n body,\n details: result?.error\n ? stringify(result.error)\n : response.statusText,\n headers: response.headers,\n status: response.status,\n url,\n });\n continue;\n }\n if (!isHex(result)) {\n error = new OffchainLookupResponseMalformedError({\n result,\n url,\n });\n continue;\n }\n return result;\n }\n catch (err) {\n error = new HttpRequestError({\n body,\n details: err.message,\n url,\n });\n }\n }\n throw error;\n}\n//# sourceMappingURL=ccip.js.map"],"names":["OffchainLookupError","BaseError","callbackSelector","cause","data","extraData","sender","urls","_a","url","getUrl","OffchainLookupResponseMalformedError","result","stringify","OffchainLookupSenderMismatchError","to","offchainLookupSignature","offchainLookupAbiItem","offchainLookup","client","blockNumber","blockTag","args","decodeErrorResult","callData","ccipRead","ccipRequest_","ccipRequest","isAddressEqual","data_","call","concat","encodeAbiParameters","err","error","i","method","body","response","HttpRequestError","isHex"],"mappings":"uHAGO,MAAMA,UAA4BC,EAAAA,SAAU,CAC/C,YAAY,CAAE,iBAAAC,EAAkB,MAAAC,EAAO,KAAAC,EAAM,UAAAC,EAAW,OAAAC,EAAQ,KAAAC,GAAS,OACrE,MAAMJ,EAAM,cACR,2DAA4D,CAC5D,MAAAA,EACA,aAAc,CACV,GAAIA,EAAM,cAAgB,CAAE,GAC5BK,EAAAL,EAAM,eAAN,MAAAK,EAAoB,OAAS,GAAK,CAAE,EACpC,yBACAD,GAAQ,CACJ,oBACA,GAAGA,EAAK,IAAKE,GAAQ,OAAOC,EAAM,OAACD,CAAG,CAAC,EAAE,CAC5C,EACD,aAAaH,CAAM,GACnB,WAAWF,CAAI,GACf,wBAAwBF,CAAgB,GACxC,iBAAiBG,CAAS,EAC7B,EAAC,KAAM,CACpB,CAAS,EACD,OAAO,eAAe,KAAM,OAAQ,CAChC,WAAY,GACZ,aAAc,GACd,SAAU,GACV,MAAO,qBACnB,CAAS,CACJ,CACL,CACO,MAAMM,UAA6CV,EAAAA,SAAU,CAChE,YAAY,CAAE,OAAAW,EAAQ,IAAAH,GAAO,CACzB,MAAM,6EAA8E,CAChF,aAAc,CACV,gBAAgBC,EAAAA,OAAOD,CAAG,CAAC,GAC3B,aAAaI,EAAAA,UAAUD,CAAM,CAAC,E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,CAAiB,EACD,QACH,CACD,GAAI,CAAC+B,EAAAA,MAAM5B,CAAM,EAAG,CAChBsB,EAAQ,IAAIvB,EAAqC,CAC7C,OAAAC,EACA,IAAAH,CACpB,CAAiB,EACD,QACH,CACD,OAAOG,CACV,OACMqB,EAAK,CACRC,EAAQ,IAAIK,EAAAA,iBAAiB,CACzB,KAAAF,EACA,QAASJ,EAAI,QACb,IAAAxB,CAChB,CAAa,CACJ,CACJ,CACD,MAAMyB,CACV","x_google_ignoreList":[0,1]}
@@ -1,9 +1,8 @@
1
1
  import { Chain as ViemChain } from 'viem';
2
2
 
3
3
  export declare enum Chain {
4
- Mainnet = "mainnet",
5
- Holesky = "holesky",
6
- Anvil = "anvil"
4
+ Mainnet,
5
+ Holesky
7
6
  }
8
7
  export declare const VIEM_CHAINS: {
9
8
  [key in Chain]: ViemChain;
@@ -0,0 +1,283 @@
1
+ export declare const PufferDepositor: readonly [{
2
+ readonly type: "constructor";
3
+ readonly inputs: readonly [{
4
+ readonly name: "pufferVault";
5
+ readonly type: "address";
6
+ readonly internalType: "contract PufferVaultV2";
7
+ }, {
8
+ readonly name: "stETH";
9
+ readonly type: "address";
10
+ readonly internalType: "contract IStETH";
11
+ }];
12
+ readonly stateMutability: "payable";
13
+ }, {
14
+ readonly type: "function";
15
+ readonly name: "PUFFER_VAULT";
16
+ readonly inputs: readonly [];
17
+ readonly outputs: readonly [{
18
+ readonly name: "";
19
+ readonly type: "address";
20
+ readonly internalType: "contract PufferVaultV2";
21
+ }];
22
+ readonly stateMutability: "view";
23
+ }, {
24
+ readonly type: "function";
25
+ readonly name: "UPGRADE_INTERFACE_VERSION";
26
+ readonly inputs: readonly [];
27
+ readonly outputs: readonly [{
28
+ readonly name: "";
29
+ readonly type: "string";
30
+ readonly internalType: "string";
31
+ }];
32
+ readonly stateMutability: "view";
33
+ }, {
34
+ readonly type: "function";
35
+ readonly name: "authority";
36
+ readonly inputs: readonly [];
37
+ readonly outputs: readonly [{
38
+ readonly name: "";
39
+ readonly type: "address";
40
+ readonly internalType: "address";
41
+ }];
42
+ readonly stateMutability: "view";
43
+ }, {
44
+ readonly type: "function";
45
+ readonly name: "depositStETH";
46
+ readonly inputs: readonly [{
47
+ readonly name: "permitData";
48
+ readonly type: "tuple";
49
+ readonly internalType: "struct Permit";
50
+ readonly components: readonly [{
51
+ readonly name: "deadline";
52
+ readonly type: "uint256";
53
+ readonly internalType: "uint256";
54
+ }, {
55
+ readonly name: "amount";
56
+ readonly type: "uint256";
57
+ readonly internalType: "uint256";
58
+ }, {
59
+ readonly name: "v";
60
+ readonly type: "uint8";
61
+ readonly internalType: "uint8";
62
+ }, {
63
+ readonly name: "r";
64
+ readonly type: "bytes32";
65
+ readonly internalType: "bytes32";
66
+ }, {
67
+ readonly name: "s";
68
+ readonly type: "bytes32";
69
+ readonly internalType: "bytes32";
70
+ }];
71
+ }, {
72
+ readonly name: "recipient";
73
+ readonly type: "address";
74
+ readonly internalType: "address";
75
+ }];
76
+ readonly outputs: readonly [{
77
+ readonly name: "pufETHAmount";
78
+ readonly type: "uint256";
79
+ readonly internalType: "uint256";
80
+ }];
81
+ readonly stateMutability: "nonpayable";
82
+ }, {
83
+ readonly type: "function";
84
+ readonly name: "depositWstETH";
85
+ readonly inputs: readonly [{
86
+ readonly name: "permitData";
87
+ readonly type: "tuple";
88
+ readonly internalType: "struct Permit";
89
+ readonly components: readonly [{
90
+ readonly name: "deadline";
91
+ readonly type: "uint256";
92
+ readonly internalType: "uint256";
93
+ }, {
94
+ readonly name: "amount";
95
+ readonly type: "uint256";
96
+ readonly internalType: "uint256";
97
+ }, {
98
+ readonly name: "v";
99
+ readonly type: "uint8";
100
+ readonly internalType: "uint8";
101
+ }, {
102
+ readonly name: "r";
103
+ readonly type: "bytes32";
104
+ readonly internalType: "bytes32";
105
+ }, {
106
+ readonly name: "s";
107
+ readonly type: "bytes32";
108
+ readonly internalType: "bytes32";
109
+ }];
110
+ }, {
111
+ readonly name: "recipient";
112
+ readonly type: "address";
113
+ readonly internalType: "address";
114
+ }];
115
+ readonly outputs: readonly [{
116
+ readonly name: "pufETHAmount";
117
+ readonly type: "uint256";
118
+ readonly internalType: "uint256";
119
+ }];
120
+ readonly stateMutability: "nonpayable";
121
+ }, {
122
+ readonly type: "function";
123
+ readonly name: "isConsumingScheduledOp";
124
+ readonly inputs: readonly [];
125
+ readonly outputs: readonly [{
126
+ readonly name: "";
127
+ readonly type: "bytes4";
128
+ readonly internalType: "bytes4";
129
+ }];
130
+ readonly stateMutability: "view";
131
+ }, {
132
+ readonly type: "function";
133
+ readonly name: "proxiableUUID";
134
+ readonly inputs: readonly [];
135
+ readonly outputs: readonly [{
136
+ readonly name: "";
137
+ readonly type: "bytes32";
138
+ readonly internalType: "bytes32";
139
+ }];
140
+ readonly stateMutability: "view";
141
+ }, {
142
+ readonly type: "function";
143
+ readonly name: "setAuthority";
144
+ readonly inputs: readonly [{
145
+ readonly name: "newAuthority";
146
+ readonly type: "address";
147
+ readonly internalType: "address";
148
+ }];
149
+ readonly outputs: readonly [];
150
+ readonly stateMutability: "nonpayable";
151
+ }, {
152
+ readonly type: "function";
153
+ readonly name: "upgradeToAndCall";
154
+ readonly inputs: readonly [{
155
+ readonly name: "newImplementation";
156
+ readonly type: "address";
157
+ readonly internalType: "address";
158
+ }, {
159
+ readonly name: "data";
160
+ readonly type: "bytes";
161
+ readonly internalType: "bytes";
162
+ }];
163
+ readonly outputs: readonly [];
164
+ readonly stateMutability: "payable";
165
+ }, {
166
+ readonly type: "event";
167
+ readonly name: "AuthorityUpdated";
168
+ readonly inputs: readonly [{
169
+ readonly name: "authority";
170
+ readonly type: "address";
171
+ readonly indexed: false;
172
+ readonly internalType: "address";
173
+ }];
174
+ readonly anonymous: false;
175
+ }, {
176
+ readonly type: "event";
177
+ readonly name: "Initialized";
178
+ readonly inputs: readonly [{
179
+ readonly name: "version";
180
+ readonly type: "uint64";
181
+ readonly indexed: false;
182
+ readonly internalType: "uint64";
183
+ }];
184
+ readonly anonymous: false;
185
+ }, {
186
+ readonly type: "event";
187
+ readonly name: "Upgraded";
188
+ readonly inputs: readonly [{
189
+ readonly name: "implementation";
190
+ readonly type: "address";
191
+ readonly indexed: true;
192
+ readonly internalType: "address";
193
+ }];
194
+ readonly anonymous: false;
195
+ }, {
196
+ readonly type: "error";
197
+ readonly name: "AccessManagedInvalidAuthority";
198
+ readonly inputs: readonly [{
199
+ readonly name: "authority";
200
+ readonly type: "address";
201
+ readonly internalType: "address";
202
+ }];
203
+ }, {
204
+ readonly type: "error";
205
+ readonly name: "AccessManagedRequiredDelay";
206
+ readonly inputs: readonly [{
207
+ readonly name: "caller";
208
+ readonly type: "address";
209
+ readonly internalType: "address";
210
+ }, {
211
+ readonly name: "delay";
212
+ readonly type: "uint32";
213
+ readonly internalType: "uint32";
214
+ }];
215
+ }, {
216
+ readonly type: "error";
217
+ readonly name: "AccessManagedUnauthorized";
218
+ readonly inputs: readonly [{
219
+ readonly name: "caller";
220
+ readonly type: "address";
221
+ readonly internalType: "address";
222
+ }];
223
+ }, {
224
+ readonly type: "error";
225
+ readonly name: "AddressEmptyCode";
226
+ readonly inputs: readonly [{
227
+ readonly name: "target";
228
+ readonly type: "address";
229
+ readonly internalType: "address";
230
+ }];
231
+ }, {
232
+ readonly type: "error";
233
+ readonly name: "AddressInsufficientBalance";
234
+ readonly inputs: readonly [{
235
+ readonly name: "account";
236
+ readonly type: "address";
237
+ readonly internalType: "address";
238
+ }];
239
+ }, {
240
+ readonly type: "error";
241
+ readonly name: "ERC1967InvalidImplementation";
242
+ readonly inputs: readonly [{
243
+ readonly name: "implementation";
244
+ readonly type: "address";
245
+ readonly internalType: "address";
246
+ }];
247
+ }, {
248
+ readonly type: "error";
249
+ readonly name: "ERC1967NonPayable";
250
+ readonly inputs: readonly [];
251
+ }, {
252
+ readonly type: "error";
253
+ readonly name: "FailedInnerCall";
254
+ readonly inputs: readonly [];
255
+ }, {
256
+ readonly type: "error";
257
+ readonly name: "InvalidInitialization";
258
+ readonly inputs: readonly [];
259
+ }, {
260
+ readonly type: "error";
261
+ readonly name: "NotInitializing";
262
+ readonly inputs: readonly [];
263
+ }, {
264
+ readonly type: "error";
265
+ readonly name: "SafeERC20FailedOperation";
266
+ readonly inputs: readonly [{
267
+ readonly name: "token";
268
+ readonly type: "address";
269
+ readonly internalType: "address";
270
+ }];
271
+ }, {
272
+ readonly type: "error";
273
+ readonly name: "UUPSUnauthorizedCallContext";
274
+ readonly inputs: readonly [];
275
+ }, {
276
+ readonly type: "error";
277
+ readonly name: "UUPSUnsupportedProxiableUUID";
278
+ readonly inputs: readonly [{
279
+ readonly name: "slot";
280
+ readonly type: "bytes32";
281
+ readonly internalType: "bytes32";
282
+ }];
283
+ }];