@filoz/synapse-react 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +228 -0
- package/README.md +32 -0
- package/dist/src/calibration.d.ts +9 -0
- package/dist/src/calibration.d.ts.map +1 -0
- package/dist/src/calibration.js +45 -0
- package/dist/src/calibration.js.map +1 -0
- package/dist/src/erc20.d.ts +17 -0
- package/dist/src/erc20.d.ts.map +1 -0
- package/dist/src/erc20.js +57 -0
- package/dist/src/erc20.js.map +1 -0
- package/dist/src/filsnap.d.ts +5 -0
- package/dist/src/filsnap.d.ts.map +1 -0
- package/dist/src/filsnap.js +14 -0
- package/dist/src/filsnap.js.map +1 -0
- package/dist/src/index.d.ts +7 -0
- package/dist/src/index.d.ts.map +1 -0
- package/dist/src/index.js +7 -0
- package/dist/src/index.js.map +1 -0
- package/dist/src/payments/index.d.ts +42 -0
- package/dist/src/payments/index.d.ts.map +1 -0
- package/dist/src/payments/index.js +192 -0
- package/dist/src/payments/index.js.map +1 -0
- package/dist/src/payments/use-deposit-and-approve.d.ts +11 -0
- package/dist/src/payments/use-deposit-and-approve.d.ts.map +1 -0
- package/dist/src/payments/use-deposit-and-approve.js +42 -0
- package/dist/src/payments/use-deposit-and-approve.js.map +1 -0
- package/dist/src/usdfc.d.ts +6 -0
- package/dist/src/usdfc.d.ts.map +1 -0
- package/dist/src/usdfc.js +15 -0
- package/dist/src/usdfc.js.map +1 -0
- package/dist/src/warm-storage/index.d.ts +6 -0
- package/dist/src/warm-storage/index.d.ts.map +1 -0
- package/dist/src/warm-storage/index.js +6 -0
- package/dist/src/warm-storage/index.js.map +1 -0
- package/dist/src/warm-storage/use-create-data-set.d.ts +14 -0
- package/dist/src/warm-storage/use-create-data-set.d.ts.map +1 -0
- package/dist/src/warm-storage/use-create-data-set.js +35 -0
- package/dist/src/warm-storage/use-create-data-set.js.map +1 -0
- package/dist/src/warm-storage/use-data-sets.d.ts +42 -0
- package/dist/src/warm-storage/use-data-sets.d.ts.map +1 -0
- package/dist/src/warm-storage/use-data-sets.js +51 -0
- package/dist/src/warm-storage/use-data-sets.js.map +1 -0
- package/dist/src/warm-storage/use-providers.d.ts +8 -0
- package/dist/src/warm-storage/use-providers.d.ts.map +1 -0
- package/dist/src/warm-storage/use-providers.js +14 -0
- package/dist/src/warm-storage/use-providers.js.map +1 -0
- package/dist/src/warm-storage/use-service-price.d.ts +8 -0
- package/dist/src/warm-storage/use-service-price.d.ts.map +1 -0
- package/dist/src/warm-storage/use-service-price.js +15 -0
- package/dist/src/warm-storage/use-service-price.js.map +1 -0
- package/dist/src/warm-storage/use-upload.d.ts +14 -0
- package/dist/src/warm-storage/use-upload.d.ts.map +1 -0
- package/dist/src/warm-storage/use-upload.js +39 -0
- package/dist/src/warm-storage/use-upload.js.map +1 -0
- package/package.json +91 -0
- package/src/calibration.ts +76 -0
- package/src/erc20.ts +103 -0
- package/src/filsnap.ts +16 -0
- package/src/index.ts +17 -0
- package/src/payments/index.ts +357 -0
- package/src/payments/use-deposit-and-approve.ts +71 -0
- package/src/usdfc.ts +26 -0
- package/src/warm-storage/index.ts +5 -0
- package/src/warm-storage/use-create-data-set.ts +62 -0
- package/src/warm-storage/use-data-sets.ts +74 -0
- package/src/warm-storage/use-providers.ts +21 -0
- package/src/warm-storage/use-service-price.ts +34 -0
- package/src/warm-storage/use-upload.ts +58 -0
package/LICENSE.md
ADDED
|
@@ -0,0 +1,228 @@
|
|
|
1
|
+
The contents of this repository are Copyright (c) corresponding authors and
|
|
2
|
+
contributors, licensed under the `Permissive License Stack` meaning either of:
|
|
3
|
+
|
|
4
|
+
- Apache-2.0 Software License: <https://www.apache.org/licenses/LICENSE-2.0>
|
|
5
|
+
- MIT Software License: <https://opensource.org/licenses/MIT>
|
|
6
|
+
|
|
7
|
+
You may not use the contents of this repository except in compliance
|
|
8
|
+
with one of the listed Licenses. For an extended clarification of the
|
|
9
|
+
intent behind the choice of Licensing please refer to
|
|
10
|
+
[Permissive License Stack](https://web.archive.org/web/20241127162157/https://www.protocol.ai/blog/announcing-the-permissive-license-stack/).
|
|
11
|
+
|
|
12
|
+
Unless required by applicable law or agreed to in writing, software
|
|
13
|
+
distributed under the terms listed in this notice is distributed on
|
|
14
|
+
an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
|
|
15
|
+
either express or implied. See each License for the specific language
|
|
16
|
+
governing permissions and limitations under that License.
|
|
17
|
+
|
|
18
|
+
<!--- SPDX-License-Identifier: Apache-2.0 OR MIT -->
|
|
19
|
+
`SPDX-License-Identifier: Apache-2.0 OR MIT`
|
|
20
|
+
|
|
21
|
+
Verbatim copies of both licenses are included below:
|
|
22
|
+
|
|
23
|
+
<details><summary>Apache-2.0 Software License</summary>
|
|
24
|
+
|
|
25
|
+
```text
|
|
26
|
+
Apache License
|
|
27
|
+
Version 2.0, January 2004
|
|
28
|
+
http://www.apache.org/licenses/
|
|
29
|
+
|
|
30
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
31
|
+
|
|
32
|
+
1. Definitions.
|
|
33
|
+
|
|
34
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
35
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
36
|
+
|
|
37
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
38
|
+
the copyright owner that is granting the License.
|
|
39
|
+
|
|
40
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
41
|
+
other entities that control, are controlled by, or are under common
|
|
42
|
+
control with that entity. For the purposes of this definition,
|
|
43
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
44
|
+
direction or management of such entity, whether by contract or
|
|
45
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
46
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
47
|
+
|
|
48
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
49
|
+
exercising permissions granted by this License.
|
|
50
|
+
|
|
51
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
52
|
+
including but not limited to software source code, documentation
|
|
53
|
+
source, and configuration files.
|
|
54
|
+
|
|
55
|
+
"Object" form shall mean any form resulting from mechanical
|
|
56
|
+
transformation or translation of a Source form, including but
|
|
57
|
+
not limited to compiled object code, generated documentation,
|
|
58
|
+
and conversions to other media types.
|
|
59
|
+
|
|
60
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
61
|
+
Object form, made available under the License, as indicated by a
|
|
62
|
+
copyright notice that is included in or attached to the work
|
|
63
|
+
(an example is provided in the Appendix below).
|
|
64
|
+
|
|
65
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
66
|
+
form, that is based on (or derived from) the Work and for which the
|
|
67
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
68
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
69
|
+
of this License, Derivative Works shall not include works that remain
|
|
70
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
71
|
+
the Work and Derivative Works thereof.
|
|
72
|
+
|
|
73
|
+
"Contribution" shall mean any work of authorship, including
|
|
74
|
+
the original version of the Work and any modifications or additions
|
|
75
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
76
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
77
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
78
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
79
|
+
means any form of electronic, verbal, or written communication sent
|
|
80
|
+
to the Licensor or its representatives, including but not limited to
|
|
81
|
+
communication on electronic mailing lists, source code control systems,
|
|
82
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
83
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
84
|
+
excluding communication that is conspicuously marked or otherwise
|
|
85
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
86
|
+
|
|
87
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
88
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
89
|
+
subsequently incorporated within the Work.
|
|
90
|
+
|
|
91
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
92
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
93
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
94
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
95
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
96
|
+
Work and such Derivative Works in Source or Object form.
|
|
97
|
+
|
|
98
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
99
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
100
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
101
|
+
(except as stated in this section) patent license to make, have made,
|
|
102
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
103
|
+
where such license applies only to those patent claims licensable
|
|
104
|
+
by such Contributor that are necessarily infringed by their
|
|
105
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
106
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
107
|
+
institute patent litigation against any entity (including a
|
|
108
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
109
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
110
|
+
or contributory patent infringement, then any patent licenses
|
|
111
|
+
granted to You under this License for that Work shall terminate
|
|
112
|
+
as of the date such litigation is filed.
|
|
113
|
+
|
|
114
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
115
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
116
|
+
modifications, and in Source or Object form, provided that You
|
|
117
|
+
meet the following conditions:
|
|
118
|
+
|
|
119
|
+
(a) You must give any other recipients of the Work or
|
|
120
|
+
Derivative Works a copy of this License; and
|
|
121
|
+
|
|
122
|
+
(b) You must cause any modified files to carry prominent notices
|
|
123
|
+
stating that You changed the files; and
|
|
124
|
+
|
|
125
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
126
|
+
that You distribute, all copyright, patent, trademark, and
|
|
127
|
+
attribution notices from the Source form of the Work,
|
|
128
|
+
excluding those notices that do not pertain to any part of
|
|
129
|
+
the Derivative Works; and
|
|
130
|
+
|
|
131
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
132
|
+
distribution, then any Derivative Works that You distribute must
|
|
133
|
+
include a readable copy of the attribution notices contained
|
|
134
|
+
within such NOTICE file, excluding those notices that do not
|
|
135
|
+
pertain to any part of the Derivative Works, in at least one
|
|
136
|
+
of the following places: within a NOTICE text file distributed
|
|
137
|
+
as part of the Derivative Works; within the Source form or
|
|
138
|
+
documentation, if provided along with the Derivative Works; or,
|
|
139
|
+
within a display generated by the Derivative Works, if and
|
|
140
|
+
wherever such third-party notices normally appear. The contents
|
|
141
|
+
of the NOTICE file are for informational purposes only and
|
|
142
|
+
do not modify the License. You may add Your own attribution
|
|
143
|
+
notices within Derivative Works that You distribute, alongside
|
|
144
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
145
|
+
that such additional attribution notices cannot be construed
|
|
146
|
+
as modifying the License.
|
|
147
|
+
|
|
148
|
+
You may add Your own copyright statement to Your modifications and
|
|
149
|
+
may provide additional or different license terms and conditions
|
|
150
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
151
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
152
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
153
|
+
the conditions stated in this License.
|
|
154
|
+
|
|
155
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
156
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
157
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
158
|
+
this License, without any additional terms or conditions.
|
|
159
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
160
|
+
the terms of any separate license agreement you may have executed
|
|
161
|
+
with Licensor regarding such Contributions.
|
|
162
|
+
|
|
163
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
164
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
165
|
+
except as required for reasonable and customary use in describing the
|
|
166
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
167
|
+
|
|
168
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
169
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
170
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
171
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
172
|
+
implied, including, without limitation, any warranties or conditions
|
|
173
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
174
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
175
|
+
appropriateness of using or redistributing the Work and assume any
|
|
176
|
+
risks associated with Your exercise of permissions under this License.
|
|
177
|
+
|
|
178
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
179
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
180
|
+
unless required by applicable law (such as deliberate and grossly
|
|
181
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
182
|
+
liable to You for damages, including any direct, indirect, special,
|
|
183
|
+
incidental, or consequential damages of any character arising as a
|
|
184
|
+
result of this License or out of the use or inability to use the
|
|
185
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
186
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
187
|
+
other commercial damages or losses), even if such Contributor
|
|
188
|
+
has been advised of the possibility of such damages.
|
|
189
|
+
|
|
190
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
191
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
192
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
193
|
+
or other liability obligations and/or rights consistent with this
|
|
194
|
+
License. However, in accepting such obligations, You may act only
|
|
195
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
196
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
197
|
+
defend, and hold each Contributor harmless for any liability
|
|
198
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
199
|
+
of your accepting any such warranty or additional liability.
|
|
200
|
+
|
|
201
|
+
END OF TERMS AND CONDITIONS
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
</details>
|
|
205
|
+
|
|
206
|
+
<details><summary>MIT Software License</summary>
|
|
207
|
+
|
|
208
|
+
```text
|
|
209
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
210
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
211
|
+
in the Software without restriction, including without limitation the rights
|
|
212
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
213
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
214
|
+
furnished to do so, subject to the following conditions:
|
|
215
|
+
|
|
216
|
+
The above copyright notice and this permission notice shall be included in
|
|
217
|
+
all copies or substantial portions of the Software.
|
|
218
|
+
|
|
219
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
220
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
221
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
222
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
223
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
224
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
225
|
+
THE SOFTWARE.
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
</details>
|
package/README.md
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# Synapse React
|
|
2
|
+
|
|
3
|
+
[](https://nodei.co/npm/@filoz/synapse-react/)
|
|
4
|
+
|
|
5
|
+
> A React hooks for interacting with Filecoin Onchain Cloud smart contracts
|
|
6
|
+
|
|
7
|
+
## Overview
|
|
8
|
+
|
|
9
|
+
TODO
|
|
10
|
+
|
|
11
|
+
## Installation
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
pnpm install @filoz/synapse-core viem@2.x
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
Note: `viem` is a peer dependency and must be installed separately.
|
|
18
|
+
|
|
19
|
+
## Docs
|
|
20
|
+
|
|
21
|
+
Check the documentation [website](https://synapse.filecoin.services/)
|
|
22
|
+
|
|
23
|
+
## Contributing
|
|
24
|
+
|
|
25
|
+
Read contributing [guidelines](../../.github/CONTRIBUTING.md).
|
|
26
|
+
|
|
27
|
+
[](https://codespaces.new/FilOzone/synapse-sdk)
|
|
28
|
+
|
|
29
|
+
## License
|
|
30
|
+
|
|
31
|
+
Dual-licensed: [MIT](../../LICENSE.md), [Apache Software License v2](../../LICENSE.md) by way of the
|
|
32
|
+
[Permissive License Stack](https://protocol.ai/blog/announcing-the-permissive-license-stack/).
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type MutateOptions } from '@tanstack/react-query';
|
|
2
|
+
import type { TransactionReceipt } from 'viem';
|
|
3
|
+
interface UseFundWalletProps {
|
|
4
|
+
mutation?: Omit<MutateOptions<TransactionReceipt, Error>, 'mutationFn'>;
|
|
5
|
+
onHash?: (hash: string) => void;
|
|
6
|
+
}
|
|
7
|
+
export declare function useFundWallet(props?: UseFundWalletProps): import("@tanstack/react-query").UseMutationResult<TransactionReceipt, Error, void, unknown>;
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=calibration.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"calibration.d.ts","sourceRoot":"","sources":["../../src/calibration.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,aAAa,EAA+B,MAAM,uBAAuB,CAAA;AACvF,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,MAAM,CAAA;AAK9C,UAAU,kBAAkB;IAI1B,QAAQ,CAAC,EAAE,IAAI,CAAC,aAAa,CAAC,kBAAkB,EAAE,KAAK,CAAC,EAAE,YAAY,CAAC,CAAA;IAIvE,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAA;CAChC;AAUD,wBAAgB,aAAa,CAAC,KAAK,CAAC,EAAE,kBAAkB,+FAiDvD"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { getChain } from '@filoz/synapse-core/chains';
|
|
2
|
+
import { useMutation, useQueryClient } from '@tanstack/react-query';
|
|
3
|
+
import { waitForTransactionReceipt } from 'viem/actions';
|
|
4
|
+
import { useChainId, useConfig } from 'wagmi';
|
|
5
|
+
import { getConnectorClient } from 'wagmi/actions';
|
|
6
|
+
export function useFundWallet(props) {
|
|
7
|
+
const config = useConfig();
|
|
8
|
+
const chainId = useChainId({ config });
|
|
9
|
+
const chain = getChain(chainId);
|
|
10
|
+
const publicClient = config.getClient();
|
|
11
|
+
const queryClient = useQueryClient();
|
|
12
|
+
const result = useMutation({
|
|
13
|
+
...props?.mutation,
|
|
14
|
+
mutationFn: async () => {
|
|
15
|
+
const client = await getConnectorClient(config);
|
|
16
|
+
if (!chain.testnet) {
|
|
17
|
+
throw new Error('Wallet funding is only available on testnet');
|
|
18
|
+
}
|
|
19
|
+
const responses = await Promise.all([
|
|
20
|
+
fetch(`https://forest-explorer.chainsafe.dev/api/claim_token?faucet_info=CalibnetUSDFC&address=${client.account.address}`),
|
|
21
|
+
fetch(`https://forest-explorer.chainsafe.dev/api/claim_token?faucet_info=CalibnetFIL&address=${client.account.address}`),
|
|
22
|
+
]);
|
|
23
|
+
const hashes = await Promise.all(responses.filter((response) => response.ok).map((response) => response.json()));
|
|
24
|
+
props?.onHash?.(hashes[0]);
|
|
25
|
+
const wait = await waitForTransactionReceipt(publicClient, {
|
|
26
|
+
hash: hashes[0],
|
|
27
|
+
});
|
|
28
|
+
queryClient.invalidateQueries({
|
|
29
|
+
queryKey: ['synapse-erc20-balance', client.account.address, chain.contracts.usdfc.address],
|
|
30
|
+
});
|
|
31
|
+
queryClient.invalidateQueries({
|
|
32
|
+
queryKey: [
|
|
33
|
+
'balance',
|
|
34
|
+
{
|
|
35
|
+
address: client.account.address,
|
|
36
|
+
chainId,
|
|
37
|
+
},
|
|
38
|
+
],
|
|
39
|
+
});
|
|
40
|
+
return wait;
|
|
41
|
+
},
|
|
42
|
+
});
|
|
43
|
+
return result;
|
|
44
|
+
}
|
|
45
|
+
//# sourceMappingURL=calibration.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"calibration.js","sourceRoot":"","sources":["../../src/calibration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAA;AACrD,OAAO,EAAsB,WAAW,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;AAEvF,OAAO,EAAE,yBAAyB,EAAE,MAAM,cAAc,CAAA;AACxD,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAC7C,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAA;AAqBlD,MAAM,UAAU,aAAa,CAAC,KAA0B;IACtD,MAAM,MAAM,GAAG,SAAS,EAAE,CAAA;IAC1B,MAAM,OAAO,GAAG,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC,CAAA;IACtC,MAAM,KAAK,GAAG,QAAQ,CAAC,OAAO,CAAC,CAAA;IAC/B,MAAM,YAAY,GAAG,MAAM,CAAC,SAAS,EAAE,CAAA;IACvC,MAAM,WAAW,GAAG,cAAc,EAAE,CAAA;IACpC,MAAM,MAAM,GAAG,WAAW,CAAC;QACzB,GAAG,KAAK,EAAE,QAAQ;QAClB,UAAU,EAAE,KAAK,IAAI,EAAE;YACrB,MAAM,MAAM,GAAG,MAAM,kBAAkB,CAAC,MAAM,CAAC,CAAA;YAE/C,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC;gBACnB,MAAM,IAAI,KAAK,CAAC,6CAA6C,CAAC,CAAA;YAChE,CAAC;YAED,MAAM,SAAS,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC;gBAClC,KAAK,CACH,2FAA2F,MAAM,CAAC,OAAO,CAAC,OAAO,EAAE,CACpH;gBACD,KAAK,CACH,yFAAyF,MAAM,CAAC,OAAO,CAAC,OAAO,EAAE,CAClH;aACF,CAAC,CAAA;YAEF,MAAM,MAAM,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAC,CAAA;YAEhH,KAAK,EAAE,MAAM,EAAE,CAAC,MAAM,CAAC,CAAC,CAAkB,CAAC,CAAA;YAE3C,MAAM,IAAI,GAAG,MAAM,yBAAyB,CAAC,YAAY,EAAE;gBACzD,IAAI,EAAE,MAAM,CAAC,CAAC,CAAkB;aACjC,CAAC,CAAA;YAEF,WAAW,CAAC,iBAAiB,CAAC;gBAC5B,QAAQ,EAAE,CAAC,uBAAuB,EAAE,MAAM,CAAC,OAAO,CAAC,OAAO,EAAE,KAAK,CAAC,SAAS,CAAC,KAAK,CAAC,OAAO,CAAC;aAC3F,CAAC,CAAA;YAEF,WAAW,CAAC,iBAAiB,CAAC;gBAC5B,QAAQ,EAAE;oBACR,SAAS;oBACT;wBACE,OAAO,EAAE,MAAM,CAAC,OAAO,CAAC,OAAO;wBAC/B,OAAO;qBACR;iBACF;aACF,CAAC,CAAA;YACF,OAAO,IAAI,CAAA;QACb,CAAC;KACF,CAAC,CAAA;IACF,OAAO,MAAM,CAAA;AACf,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { ERC20BalanceOptions, ERC20BalanceResult } from '@filoz/synapse-core/erc20';
|
|
2
|
+
import * as erc20 from '@filoz/synapse-core/erc20';
|
|
3
|
+
import { type MutateOptions, type UseQueryOptions } from '@tanstack/react-query';
|
|
4
|
+
import type { SetOptional } from 'type-fest';
|
|
5
|
+
import type { TransactionReceipt } from 'viem';
|
|
6
|
+
interface UseERC20BalanceProps extends SetOptional<ERC20BalanceOptions, 'address'> {
|
|
7
|
+
query?: Omit<UseQueryOptions<ERC20BalanceResult>, 'queryKey' | 'queryFn'>;
|
|
8
|
+
}
|
|
9
|
+
export declare function useERC20Balance(props: UseERC20BalanceProps): import("@tanstack/react-query").UseQueryResult<ERC20BalanceResult, Error>;
|
|
10
|
+
type UseApproveAllowanceVariables = Pick<erc20.ERC20ApproveAllowanceOptions, 'amount'>;
|
|
11
|
+
interface UseApproveAllowanceProps extends Omit<erc20.ERC20ApproveAllowanceOptions, 'amount'> {
|
|
12
|
+
mutation?: Omit<MutateOptions<TransactionReceipt, Error, UseApproveAllowanceVariables>, 'mutationFn'>;
|
|
13
|
+
onHash?: (hash: string) => void;
|
|
14
|
+
}
|
|
15
|
+
export declare function useApproveAllowance(props?: UseApproveAllowanceProps): import("@tanstack/react-query").UseMutationResult<TransactionReceipt, Error, UseApproveAllowanceVariables, unknown>;
|
|
16
|
+
export {};
|
|
17
|
+
//# sourceMappingURL=erc20.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"erc20.d.ts","sourceRoot":"","sources":["../../src/erc20.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAA;AACxF,OAAO,KAAK,KAAK,MAAM,2BAA2B,CAAA;AAClD,OAAO,EACL,KAAK,aAAa,EAElB,KAAK,eAAe,EAIrB,MAAM,uBAAuB,CAAA;AAC9B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,WAAW,CAAA;AAC5C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,MAAM,CAAA;AAK9C,UAAU,oBAAqB,SAAQ,WAAW,CAAC,mBAAmB,EAAE,SAAS,CAAC;IAChF,KAAK,CAAC,EAAE,IAAI,CAAC,eAAe,CAAC,kBAAkB,CAAC,EAAE,UAAU,GAAG,SAAS,CAAC,CAAA;CAC1E;AAQD,wBAAgB,eAAe,CAAC,KAAK,EAAE,oBAAoB,6EAqB1D;AAED,KAAK,4BAA4B,GAAG,IAAI,CAAC,KAAK,CAAC,4BAA4B,EAAE,QAAQ,CAAC,CAAA;AAEtF,UAAU,wBAAyB,SAAQ,IAAI,CAAC,KAAK,CAAC,4BAA4B,EAAE,QAAQ,CAAC;IAI3F,QAAQ,CAAC,EAAE,IAAI,CAAC,aAAa,CAAC,kBAAkB,EAAE,KAAK,EAAE,4BAA4B,CAAC,EAAE,YAAY,CAAC,CAAA;IAIrG,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAA;CAChC;AAQD,wBAAgB,mBAAmB,CAAC,KAAK,CAAC,EAAE,wBAAwB,uHAiCnE"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { getChain } from '@filoz/synapse-core/chains';
|
|
2
|
+
import * as erc20 from '@filoz/synapse-core/erc20';
|
|
3
|
+
import { skipToken, useMutation, useQuery, useQueryClient, } from '@tanstack/react-query';
|
|
4
|
+
import { waitForTransactionReceipt } from 'viem/actions';
|
|
5
|
+
import { useAccount, useChainId, useConfig } from 'wagmi';
|
|
6
|
+
import { getConnectorClient } from 'wagmi/actions';
|
|
7
|
+
export function useERC20Balance(props) {
|
|
8
|
+
const config = useConfig();
|
|
9
|
+
const chain = getChain(config.state.chainId);
|
|
10
|
+
const token = props.token ?? chain.contracts.usdfc.address;
|
|
11
|
+
const address = props.address;
|
|
12
|
+
const result = useQuery({
|
|
13
|
+
...props.query,
|
|
14
|
+
queryKey: ['synapse-erc20-balance', address, token],
|
|
15
|
+
queryFn: address
|
|
16
|
+
? async () => {
|
|
17
|
+
const result = await erc20.balance(config.getClient(), {
|
|
18
|
+
address,
|
|
19
|
+
token,
|
|
20
|
+
});
|
|
21
|
+
return result;
|
|
22
|
+
}
|
|
23
|
+
: skipToken,
|
|
24
|
+
});
|
|
25
|
+
return result;
|
|
26
|
+
}
|
|
27
|
+
export function useApproveAllowance(props) {
|
|
28
|
+
const config = useConfig();
|
|
29
|
+
const chainId = useChainId({ config });
|
|
30
|
+
const account = useAccount({ config });
|
|
31
|
+
const queryClient = useQueryClient();
|
|
32
|
+
const chain = getChain(config.state.chainId);
|
|
33
|
+
const token = props?.token ?? chain.contracts.usdfc.address;
|
|
34
|
+
return useMutation({
|
|
35
|
+
...props?.mutation,
|
|
36
|
+
mutationFn: async ({ amount }) => {
|
|
37
|
+
const client = await getConnectorClient(config, {
|
|
38
|
+
account: account.address,
|
|
39
|
+
chainId,
|
|
40
|
+
connector: account.connector,
|
|
41
|
+
});
|
|
42
|
+
const approve = await erc20.approveAllowance(client, {
|
|
43
|
+
token: props?.token,
|
|
44
|
+
amount,
|
|
45
|
+
});
|
|
46
|
+
props?.onHash?.(approve);
|
|
47
|
+
const transactionReceipt = await waitForTransactionReceipt(config.getClient(), {
|
|
48
|
+
hash: approve,
|
|
49
|
+
});
|
|
50
|
+
queryClient.invalidateQueries({
|
|
51
|
+
queryKey: ['synapse-erc20-balance', account.address, token],
|
|
52
|
+
});
|
|
53
|
+
return transactionReceipt;
|
|
54
|
+
},
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
//# sourceMappingURL=erc20.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"erc20.js","sourceRoot":"","sources":["../../src/erc20.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAA;AAErD,OAAO,KAAK,KAAK,MAAM,2BAA2B,CAAA;AAClD,OAAO,EAEL,SAAS,EAET,WAAW,EACX,QAAQ,EACR,cAAc,GACf,MAAM,uBAAuB,CAAA;AAG9B,OAAO,EAAE,yBAAyB,EAAE,MAAM,cAAc,CAAA;AACxD,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,OAA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E3D,OAAO,WAAW,CAAC;QACjB,GAAG,KAAK,EAAE,QAAQ;QAClB,UAAU,EAAE,KAAK,EAAE,EAAE,MAAM,EAAgC,EAAE,EAAE;YAC7D,MAAM,MAAM,GAAG,MAAM,kBAAkB,CAAC,MAAM,EAAE;gBAC9C,OAAO,EAAE,OAAO,CAAC,OAAO;gBACxB,OAAO;gBACP,SAAS,EAAE,OAAO,CAAC,SAAS;aAC7B,CAAC,CAAA;YAEF,MAAM,OAAO,GAAG,MAAM,KAAK,CAAC,gBAAgB,CAAC,MAAM,EAAE;gBACnD,KAAK,EAAE,KAAK,EAAE,KAAK;gBACnB,MAAM;aACP,CAAC,CAAA;YAEF,KAAK,EAAE,MAAM,EAAE,CAAC,OAAO,CAAC,CAAA;YACxB,MAAM,kBAAkB,GAAG,MAAM,yBAAyB,CAAC,MAAM,CAAC,SAAS,EAAE,EAAE;gBAC7E,IAAI,EAAE,OAAO;aACd,CAAC,CAAA;YAEF,WAAW,CAAC,iBAAiB,CAAC;gBAC5B,QAAQ,EAAE,CAAC,uBAAuB,EAAE,OAAO,CAAC,OAAO,EAAE,KAAK,CAAC;aAC5D,CAAC,CAAA;YACF,OAAO,kBAAkB,CAAA;QAC3B,CAAC;KACF,CAAC,CAAA;AACJ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"filsnap.d.ts","sourceRoot":"","sources":["../../src/filsnap.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,UAAU,GAAI,qBAAoB;IAAE,OAAO,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,OAAO,CAAA;CAAO,SASxF,CAAA"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { getOrInstallSnap } from 'filsnap-adapter';
|
|
2
|
+
import { useAccountEffect } from 'wagmi';
|
|
3
|
+
const SNAP_ID = 'npm:filsnap';
|
|
4
|
+
export const useFilsnap = ({ version, force } = {}) => {
|
|
5
|
+
useAccountEffect({
|
|
6
|
+
onConnect: async (data) => {
|
|
7
|
+
const provider = (await data.connector.getProvider());
|
|
8
|
+
if (provider.isMetaMask) {
|
|
9
|
+
await getOrInstallSnap(provider, SNAP_ID, version ?? '*', force);
|
|
10
|
+
}
|
|
11
|
+
},
|
|
12
|
+
});
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=filsnap.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"filsnap.js","sourceRoot":"","sources":["../../src/filsnap.ts"],"names":[],"mappings":"AAAA,OAAO,EAAwB,gBAAgB,EAAE,MAAM,iBAAiB,CAAA;AACxE,OAAO,EAAE,gBAAgB,EAAE,MAAM,OAAO,CAAA;AAExC,MAAM,OAAO,GAAG,aAAa,CAAA;AAG7B,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,EAAE,OAAO,EAAE,KAAK,KAA4C,EAAE,EAAE,EAAE;IAC3F,gBAAgB,CAAC;QACf,SAAS,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE;YACxB,MAAM,QAAQ,GAAG,CAAC,MAAM,IAAI,CAAC,SAAS,CAAC,WAAW,EAAE,CAAoB,CAAA;YACxE,IAAI,QAAQ,CAAC,UAAU,EAAE,CAAC;gBACxB,MAAM,gBAAgB,CAAC,QAAQ,EAAE,OAAO,EAAE,OAAO,IAAI,GAAG,EAAE,KAAK,CAAC,CAAA;YAClE,CAAC;QACH,CAAC;KACF,CAAC,CAAA;AACJ,CAAC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAWA,cAAc,kBAAkB,CAAA;AAChC,cAAc,YAAY,CAAA;AAC1B,cAAc,cAAc,CAAA;AAC5B,cAAc,qBAAqB,CAAA;AACnC,cAAc,YAAY,CAAA;AAC1B,cAAc,yBAAyB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAWA,cAAc,kBAAkB,CAAA;AAChC,cAAc,YAAY,CAAA;AAC1B,cAAc,cAAc,CAAA;AAC5B,cAAc,qBAAqB,CAAA;AACnC,cAAc,YAAY,CAAA;AAC1B,cAAc,yBAAyB,CAAA"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { type AccountInfoOptions, type AccountInfoResult, type DepositOptions, type OperatorApprovalsOptions, type OperatorApprovalsResult, type WithdrawOptions } from '@filoz/synapse-core/pay';
|
|
2
|
+
import { type MutateOptions, type UseQueryOptions } from '@tanstack/react-query';
|
|
3
|
+
import type { SetOptional } from 'type-fest';
|
|
4
|
+
import type { Address, TransactionReceipt } from 'viem';
|
|
5
|
+
interface UseAccountInfoProps extends SetOptional<AccountInfoOptions, 'address'> {
|
|
6
|
+
watch?: boolean;
|
|
7
|
+
query?: Omit<UseQueryOptions<AccountInfoResult>, 'queryKey' | 'queryFn'>;
|
|
8
|
+
}
|
|
9
|
+
export declare function useAccountInfo(props?: UseAccountInfoProps): import("@tanstack/react-query").UseQueryResult<AccountInfoResult, Error>;
|
|
10
|
+
export interface UseOperatorApprovalsProps extends SetOptional<OperatorApprovalsOptions, 'address'> {
|
|
11
|
+
query?: Omit<UseQueryOptions<OperatorApprovalsResult>, 'queryKey' | 'queryFn'>;
|
|
12
|
+
}
|
|
13
|
+
export type { OperatorApprovalsResult } from '@filoz/synapse-core/pay';
|
|
14
|
+
export declare function useOperatorApprovals(props?: UseOperatorApprovalsProps): import("@tanstack/react-query").UseQueryResult<OperatorApprovalsResult, Error>;
|
|
15
|
+
type UseDepositVariables = Pick<DepositOptions, 'amount'>;
|
|
16
|
+
interface UseDepositProps extends Omit<DepositOptions, 'amount'> {
|
|
17
|
+
mutation?: Omit<MutateOptions<TransactionReceipt, Error, UseDepositVariables>, 'mutationFn'>;
|
|
18
|
+
onHash?: (hash: string) => void;
|
|
19
|
+
}
|
|
20
|
+
export declare function useDeposit(props?: UseDepositProps): import("@tanstack/react-query").UseMutationResult<TransactionReceipt, Error, UseDepositVariables, unknown>;
|
|
21
|
+
type UseWithdrawVariables = Pick<WithdrawOptions, 'amount'>;
|
|
22
|
+
type UseWithdrawProps = Omit<WithdrawOptions, 'amount'> & {
|
|
23
|
+
mutation?: Omit<MutateOptions<TransactionReceipt, Error, UseWithdrawVariables>, 'mutationFn'>;
|
|
24
|
+
onHash?: (hash: string) => void;
|
|
25
|
+
};
|
|
26
|
+
export declare function useWithdraw(props?: UseWithdrawProps): import("@tanstack/react-query").UseMutationResult<TransactionReceipt, Error, UseWithdrawVariables, unknown>;
|
|
27
|
+
type ApproveOperatorProps = {
|
|
28
|
+
operator?: Address;
|
|
29
|
+
token?: Address;
|
|
30
|
+
mutation?: Omit<MutateOptions<TransactionReceipt, Error>, 'mutationFn'>;
|
|
31
|
+
onHash?: (hash: string) => void;
|
|
32
|
+
} | undefined;
|
|
33
|
+
export declare function useApproveOperator(props?: ApproveOperatorProps): import("@tanstack/react-query").UseMutationResult<TransactionReceipt, Error, void, unknown>;
|
|
34
|
+
type RevokeOperatorProps = {
|
|
35
|
+
operator?: Address;
|
|
36
|
+
token?: Address;
|
|
37
|
+
mutation?: Omit<MutateOptions<TransactionReceipt, Error>, 'mutationFn'>;
|
|
38
|
+
onHash?: (hash: string) => void;
|
|
39
|
+
} | undefined;
|
|
40
|
+
export declare function useRevokeOperator(props?: RevokeOperatorProps): import("@tanstack/react-query").UseMutationResult<TransactionReceipt, Error, void, unknown>;
|
|
41
|
+
export * from './use-deposit-and-approve.ts';
|
|
42
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/payments/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,kBAAkB,EACvB,KAAK,iBAAiB,EAEtB,KAAK,cAAc,EAEnB,KAAK,wBAAwB,EAC7B,KAAK,uBAAuB,EAG5B,KAAK,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