@moveindustries/wallet-adapter-react 7.2.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 (43) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +306 -0
  3. package/dist/WalletProvider.d.ts +12 -0
  4. package/dist/WalletProvider.d.ts.map +1 -0
  5. package/dist/components/AboutMovementConnect.d.ts +29 -0
  6. package/dist/components/AboutMovementConnect.d.ts.map +1 -0
  7. package/dist/components/AboutPetraWeb.d.ts +31 -0
  8. package/dist/components/AboutPetraWeb.d.ts.map +1 -0
  9. package/dist/components/MovementPrivacyPolicy.d.ts +12 -0
  10. package/dist/components/MovementPrivacyPolicy.d.ts.map +1 -0
  11. package/dist/components/WalletItem.d.ts +16 -0
  12. package/dist/components/WalletItem.d.ts.map +1 -0
  13. package/dist/components/utils.d.ts +20 -0
  14. package/dist/components/utils.d.ts.map +1 -0
  15. package/dist/graphics/LinkGraphic.d.ts +3 -0
  16. package/dist/graphics/LinkGraphic.d.ts.map +1 -0
  17. package/dist/graphics/SmallMovementLogo.d.ts +3 -0
  18. package/dist/graphics/SmallMovementLogo.d.ts.map +1 -0
  19. package/dist/graphics/WalletGraphic.d.ts +3 -0
  20. package/dist/graphics/WalletGraphic.d.ts.map +1 -0
  21. package/dist/graphics/Web3Graphic.d.ts +3 -0
  22. package/dist/graphics/Web3Graphic.d.ts.map +1 -0
  23. package/dist/index.d.ts +8 -0
  24. package/dist/index.d.ts.map +1 -0
  25. package/dist/index.js +632 -0
  26. package/dist/index.js.map +1 -0
  27. package/dist/index.mjs +606 -0
  28. package/dist/index.mjs.map +1 -0
  29. package/dist/useWallet.d.ts +31 -0
  30. package/dist/useWallet.d.ts.map +1 -0
  31. package/package.json +60 -0
  32. package/src/WalletProvider.tsx +424 -0
  33. package/src/components/AboutMovementConnect.tsx +60 -0
  34. package/src/components/AboutPetraWeb.tsx +63 -0
  35. package/src/components/MovementPrivacyPolicy.tsx +44 -0
  36. package/src/components/WalletItem.tsx +122 -0
  37. package/src/components/utils.tsx +70 -0
  38. package/src/graphics/LinkGraphic.tsx +26 -0
  39. package/src/graphics/SmallMovementLogo.tsx +25 -0
  40. package/src/graphics/WalletGraphic.tsx +42 -0
  41. package/src/graphics/Web3Graphic.tsx +31 -0
  42. package/src/index.tsx +7 -0
  43. package/src/useWallet.tsx +67 -0
package/LICENSE ADDED
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Licensed under the Apache License, Version 2.0 (the "License");
190
+ you may not use this file except in compliance with the License.
191
+ You may obtain a copy of the License at
192
+
193
+ http://www.apache.org/licenses/LICENSE-2.0
194
+
195
+ Copyright 2023 Aptos Foundation
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
package/README.md ADDED
@@ -0,0 +1,306 @@
1
+ > **_NOTE:_** This documentation is for Wallet Adapter React `v4.0.0` and up that is fully compatible with the Aptos TypeScript SDK V2. For Wallet Adapter React `v^3.*.*` refer to [this guide](./READMEV2.md)
2
+
3
+ # Wallet Adapter React Provider
4
+
5
+ A react provider wrapper for the Movement Wallet Adapter
6
+
7
+ Dapps that want to use the adapter should install this package and other supported wallet packages.
8
+
9
+ ### Support
10
+
11
+ The React provider follows the [wallet standard](https://github.com/movement-labs/wallet-standard/tree/main) and supports the following required functions
12
+
13
+ ##### [Standard required functions](https://github.com/movement-labs/wallet-standard/blob/main/src/detect.ts#L16)
14
+
15
+ ```
16
+ account
17
+ connect
18
+ disconnect
19
+ network
20
+ onAccountChange
21
+ onNetworkChange
22
+ signMessage
23
+ signTransaction
24
+ ```
25
+
26
+ ##### Additional functions
27
+
28
+ ```
29
+ signAndSubmitTransaction
30
+ signMessageAndVerify
31
+ submitTransaction
32
+ ```
33
+
34
+ ### Usage
35
+
36
+ #### Install Dependencies
37
+
38
+ Install wallet dependencies you want to include in your app.
39
+ To do that, you can look at our [supported wallets list](https://github.com/movement-labs/movement-wallet-adapter#supported-wallet-packages). Each wallet is a link to npm package where you can install it from.
40
+
41
+ Next, install the `@movement-labs/wallet-adapter-react`
42
+
43
+ ```cli
44
+ pnpm i @movement-labs/wallet-adapter-react
45
+ ```
46
+
47
+ using npm
48
+
49
+ ```cli
50
+ npm i @movement-labs/wallet-adapter-react
51
+ ```
52
+
53
+ #### Import dependencies
54
+
55
+ Import the `MovementWalletAdapterProvider`.
56
+
57
+ ```tsx
58
+ import { MovementWalletAdapterProvider } from "@movement-labs/wallet-adapter-react";
59
+ ```
60
+
61
+ Wrap your app with the Provider, pass it the relevant props.
62
+
63
+ ```tsx
64
+ import { Network } from "@movement-labs/ts-sdk";
65
+
66
+ <MovementWalletAdapterProvider
67
+ autoConnect={true}
68
+ dappConfig={{ network: Network.MAINNET, aptosApiKey: "my-generated-api-key" }}
69
+ onError={(error) => {
70
+ console.log("error", error);
71
+ }}
72
+ >
73
+ <App />
74
+ </MovementWalletAdapterProvider>;
75
+ ```
76
+
77
+ #### Available Provider Props
78
+
79
+ - `autoConnect` - a prop indicates whether the dapp should auto connect with a previous connected wallet.
80
+ - `dappConfig` - Config used to initialize the dapp with.
81
+ - `network` - the network the dapp works with
82
+ - `aptosApiKey` - an api key generated from https://developers.aptoslabs.com/docs/api-access
83
+ - `onError` - a callback function to fire when the adapter throws an error
84
+ - `optInWallets` - the adapter detects and adds AIP-62 standard wallets by default, sometimes you might want to opt-in with specific wallets. This props lets you define the AIP-62 standard wallets you want to support in your dapp.
85
+
86
+ ```tsx
87
+ <MovementWalletAdapterProvider
88
+ ...
89
+ optInWallets={["Petra"]}
90
+ ...
91
+ >
92
+ <App />
93
+ </MovementWalletAdapterProvider>
94
+ ```
95
+
96
+ - `disableTelemetry` - A boolean flag to disable the adapter telemetry tool, false by default
97
+
98
+ ```tsx
99
+ <MovementWalletAdapterProvider
100
+ ...
101
+ disableTelemetry={true}
102
+ ...
103
+ >
104
+ <App />
105
+ </MovementWalletAdapterProvider>
106
+ ```
107
+
108
+ #### Use Wallet
109
+
110
+ On any page you want to use the wallet props, import `useWallet` from `@movement-labs/wallet-adapter-react`
111
+
112
+ ```tsx
113
+ import { useWallet } from "@movement-labs/wallet-adapter-react";
114
+ ```
115
+
116
+ Then you can use the exported properties
117
+
118
+ ```tsx
119
+ const {
120
+ account,
121
+ changeNetwork,
122
+ connect,
123
+ connected,
124
+ disconnect,
125
+ network,
126
+ signAndSubmitTransaction,
127
+ signMessage,
128
+ signMessageAndVerify,
129
+ signTransaction,
130
+ submitTransaction,
131
+ wallet,
132
+ wallets,
133
+ } = useWallet();
134
+ ```
135
+
136
+ #### Examples
137
+
138
+ ##### Account
139
+
140
+ ```tsx
141
+ // The account address as a typed AccountAddress
142
+ <div>{account?.address.toString()}</div>
143
+ // The account public key as a typed PublicKey
144
+ <div>{account?.publicKey.toString()}</div>
145
+ ```
146
+
147
+ ##### Network
148
+
149
+ ```tsx
150
+ <div>{network?.name}</div>
151
+ ```
152
+
153
+ ##### Wallet
154
+
155
+ ```tsx
156
+ <div>{wallet?.name}</div>
157
+ <div>{wallet?.icon}</div>
158
+ <div>{wallet?.url}</div>
159
+ ```
160
+
161
+ ##### Wallets
162
+
163
+ ```tsx
164
+ {
165
+ wallets.map((wallet) => <p>{wallet.name}</p>);
166
+ }
167
+ ```
168
+
169
+ ##### connect(walletName)
170
+
171
+ ```tsx
172
+ const onConnect = async (walletName) => {
173
+ await connect(walletName);
174
+ };
175
+
176
+ <button onClick={() => onConnect(wallet.name)}>{wallet.name}</button>;
177
+ ```
178
+
179
+ ##### disconnect()
180
+
181
+ ```tsx
182
+ <button onClick={disconnect}>Disconnect</button>
183
+ ```
184
+
185
+ ##### signAndSubmitTransaction(payload)
186
+
187
+ ```tsx
188
+ const onSignAndSubmitTransaction = async () => {
189
+ const response = await signAndSubmitTransaction({
190
+ data: {
191
+ function: "0x1::coin::transfer",
192
+ typeArguments: [APTOS_COIN],
193
+ functionArguments: [account.address, 1], // 1 is in Octas
194
+ },
195
+ });
196
+ // if you want to wait for transaction
197
+ try {
198
+ await aptos.waitForTransaction({ transactionHash: response.hash });
199
+ } catch (error) {
200
+ console.error(error);
201
+ }
202
+ };
203
+
204
+ <button onClick={onSignAndSubmitTransaction}>
205
+ Sign and submit transaction
206
+ </button>;
207
+ ```
208
+
209
+ ##### signAndSubmitBCSTransaction(payload)
210
+
211
+ ```tsx
212
+ const onSignAndSubmitBCSTransaction = async () => {
213
+ const response = await signAndSubmitTransaction({
214
+ data: {
215
+ function: "0x1::coin::transfer",
216
+ typeArguments: [parseTypeTag(APTOS_COIN)],
217
+ functionArguments: [AccountAddress.from(account.address), new U64(1)],
218
+ },
219
+ });
220
+ // if you want to wait for transaction
221
+ try {
222
+ await aptos.waitForTransaction({ transactionHash: response.hash });
223
+ } catch (error) {
224
+ console.error(error);
225
+ }
226
+ };
227
+
228
+ <button onClick={onSignAndSubmitTransaction}>
229
+ Sign and submit BCS transaction
230
+ </button>;
231
+ ```
232
+
233
+ ##### signMessage(payload)
234
+
235
+ ```tsx
236
+ const onSignMessage = async () => {
237
+ const payload = {
238
+ message: "Hello from Movement Wallet Adapter",
239
+ nonce: "random_string",
240
+ };
241
+ const response = await signMessage(payload);
242
+ };
243
+
244
+ <button onClick={onSignMessage}>Sign message</button>;
245
+ ```
246
+
247
+ ##### signTransaction(payload | transaction)
248
+
249
+ ```tsx
250
+ const onSignTransaction = async () => {
251
+ const payload: InputTransactionData = {
252
+ data: {
253
+ function: "0x1::coin::transfer",
254
+ typeArguments: [APTOS_COIN],
255
+ functionArguments: [account?.address.toString(), 1],
256
+ },
257
+ };
258
+ const response = await signTransaction({
259
+ transactionOrPayload: payload,
260
+ });
261
+ };
262
+
263
+ const onSignRawTransaction = async () => {
264
+ const aptosConfig = new AptosConfig({ network: Network.MAINNET });
265
+ const aptos = new Aptos(aptosConfig);
266
+ const transactionToSign = await aptos.transaction.build.simple({
267
+ sender: account.address,
268
+ data: {
269
+ function: "0x1::coin::transfer",
270
+ typeArguments: [APTOS_COIN],
271
+ functionArguments: [account.address.toString(), 1],
272
+ },
273
+ });
274
+ const response = await signTransaction({
275
+ transactionOrPayload: transactionToSign,
276
+ });
277
+ };
278
+
279
+ <button onClick={onSignTransaction}>Sign transaction</button>;
280
+ <button onClick={onSignRawTransaction}>Sign raw transaction</button>;
281
+ ```
282
+
283
+ ##### signMessageAndVerify(payload)
284
+
285
+ ```tsx
286
+ const onSignMessageAndVerify = async () => {
287
+ const payload = {
288
+ message: "Hello from Movement Wallet Adapter",
289
+ nonce: "random_string",
290
+ };
291
+ const response = await signMessageAndVerify(payload);
292
+ };
293
+
294
+ <button onClick={onSignMessageAndVerify}>Sign message and verify</button>;
295
+ ```
296
+
297
+ ### Use a UI package (recommended)
298
+
299
+ As part of the wallet adapter repo we provide a wallet connect UI package that provides a wallet connect button and a wallet select modal.
300
+
301
+ The available UI Packages are
302
+
303
+ - [shadcn/ui](../../apps/nextjs-example/README.md#use-shadcnui-wallet-selector-for-your-own-app)
304
+ - [MUI](../wallet-adapter-mui-design/)
305
+
306
+ If you want to create your own wallet selector UI from existing components and styles in your app, `@movement-labs/wallet-adapter-react` provides a series of headless components and utilities to simplify this process so that you can focus on writing CSS instead of implementing business logic. For more information, check out the [Building Your Own Wallet Selector](./docs/BYO-wallet-selector.md) document.
@@ -0,0 +1,12 @@
1
+ import { AvailableWallets, DappConfig, AdapterWallet, WalletCore } from "@moveindustries/wallet-adapter-core";
2
+ import { ReactNode, FC } from "react";
3
+ export interface MovementWalletProviderProps {
4
+ children: ReactNode;
5
+ optInWallets?: ReadonlyArray<AvailableWallets>;
6
+ autoConnect?: boolean | ((core: WalletCore, adapter: AdapterWallet) => Promise<boolean>);
7
+ dappConfig?: DappConfig;
8
+ disableTelemetry?: boolean;
9
+ onError?: (error: any) => void;
10
+ }
11
+ export declare const MovementWalletAdapterProvider: FC<MovementWalletProviderProps>;
12
+ //# sourceMappingURL=WalletProvider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WalletProvider.d.ts","sourceRoot":"","sources":["../src/WalletProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAChB,UAAU,EAEV,aAAa,EAUb,UAAU,EAOX,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,EAAE,EAA4C,MAAM,OAAO,CAAC;AAGhF,MAAM,WAAW,2BAA2B;IAC1C,QAAQ,EAAE,SAAS,CAAC;IACpB,YAAY,CAAC,EAAE,aAAa,CAAC,gBAAgB,CAAC,CAAC;IAC/C,WAAW,CAAC,EACR,OAAO,GACP,CAAC,CAAC,IAAI,EAAE,UAAU,EAAE,OAAO,EAAE,aAAa,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC;IACrE,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,IAAI,CAAC;CAChC;AAcD,eAAO,MAAM,6BAA6B,EAAE,EAAE,CAAC,2BAA2B,CAuXzE,CAAC"}
@@ -0,0 +1,29 @@
1
+ import { ForwardRefExoticComponent, ReactNode, RefAttributes, SVGProps } from "react";
2
+ import { HeadlessComponentProps } from "./utils";
3
+ /** @deprecated Use AboutPetraWeb instead. Social sign-in disabled. */
4
+ export interface AboutMovementConnectEducationScreen {
5
+ Graphic: ForwardRefExoticComponent<Omit<SVGProps<SVGSVGElement>, "ref"> & RefAttributes<SVGSVGElement>>;
6
+ Title: ForwardRefExoticComponent<HeadlessComponentProps & RefAttributes<HTMLHeadingElement>>;
7
+ Description: ForwardRefExoticComponent<HeadlessComponentProps & RefAttributes<HTMLParagraphElement>>;
8
+ screenIndex: number;
9
+ totalScreens: number;
10
+ screenIndicators: ForwardRefExoticComponent<HeadlessComponentProps & RefAttributes<HTMLButtonElement>>[];
11
+ back: () => void;
12
+ next: () => void;
13
+ cancel: () => void;
14
+ }
15
+ /** @deprecated Use AboutPetraWebProps instead. Social sign-in disabled. */
16
+ export interface AboutMovementConnectProps {
17
+ renderEducationScreen: (screen: AboutMovementConnectEducationScreen) => ReactNode;
18
+ children?: ReactNode;
19
+ }
20
+ /**
21
+ * @deprecated Social sign-in disabled - this component just renders children
22
+ */
23
+ export declare const AboutMovementConnect: {
24
+ ({ children }: AboutMovementConnectProps): import("react/jsx-runtime").JSX.Element;
25
+ displayName: string;
26
+ } & {
27
+ Trigger: ForwardRefExoticComponent<HeadlessComponentProps & RefAttributes<HTMLButtonElement>>;
28
+ };
29
+ //# sourceMappingURL=AboutMovementConnect.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AboutMovementConnect.d.ts","sourceRoot":"","sources":["../../src/components/AboutMovementConnect.tsx"],"names":[],"mappings":"AAGA,OAAO,EACL,yBAAyB,EACzB,SAAS,EACT,aAAa,EACb,QAAQ,EACT,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,sBAAsB,EAA2B,MAAM,SAAS,CAAC;AAE1E,sEAAsE;AACtE,MAAM,WAAW,mCAAmC;IAClD,OAAO,EAAE,yBAAyB,CAChC,IAAI,CAAC,QAAQ,CAAC,aAAa,CAAC,EAAE,KAAK,CAAC,GAAG,aAAa,CAAC,aAAa,CAAC,CACpE,CAAC;IACF,KAAK,EAAE,yBAAyB,CAC9B,sBAAsB,GAAG,aAAa,CAAC,kBAAkB,CAAC,CAC3D,CAAC;IACF,WAAW,EAAE,yBAAyB,CACpC,sBAAsB,GAAG,aAAa,CAAC,oBAAoB,CAAC,CAC7D,CAAC;IACF,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,gBAAgB,EAAE,yBAAyB,CAAC,sBAAsB,GAAG,aAAa,CAAC,iBAAiB,CAAC,CAAC,EAAE,CAAC;IACzG,IAAI,EAAE,MAAM,IAAI,CAAC;IACjB,IAAI,EAAE,MAAM,IAAI,CAAC;IACjB,MAAM,EAAE,MAAM,IAAI,CAAC;CACpB;AAED,2EAA2E;AAC3E,MAAM,WAAW,yBAAyB;IACxC,qBAAqB,EAAE,CAAC,MAAM,EAAE,mCAAmC,KAAK,SAAS,CAAC;IAClF,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAoBD;;GAEG;AACH,eAAO,MAAM,oBAAoB;mBAlBL,yBAAyB;;;;CAoBnD,CAAC"}
@@ -0,0 +1,31 @@
1
+ import { ForwardRefExoticComponent, ReactNode, RefAttributes, SVGProps } from "react";
2
+ import { HeadlessComponentProps } from "./utils";
3
+ /** @deprecated Social sign-in disabled */
4
+ export declare const EXPLORE_ECOSYSTEM_URL = "https://movementlabs.xyz/ecosystem";
5
+ /** @deprecated Social sign-in disabled */
6
+ export interface AboutPetraWebEducationScreen {
7
+ Graphic: ForwardRefExoticComponent<Omit<SVGProps<SVGSVGElement>, "ref"> & RefAttributes<SVGSVGElement>>;
8
+ Title: ForwardRefExoticComponent<HeadlessComponentProps & RefAttributes<HTMLHeadingElement>>;
9
+ Description: ForwardRefExoticComponent<HeadlessComponentProps & RefAttributes<HTMLParagraphElement>>;
10
+ screenIndex: number;
11
+ totalScreens: number;
12
+ screenIndicators: ForwardRefExoticComponent<HeadlessComponentProps & RefAttributes<HTMLButtonElement>>[];
13
+ back: () => void;
14
+ next: () => void;
15
+ cancel: () => void;
16
+ }
17
+ /** @deprecated Social sign-in disabled */
18
+ export interface AboutPetraWebProps {
19
+ renderEducationScreen: (screen: AboutPetraWebEducationScreen) => ReactNode;
20
+ children?: ReactNode;
21
+ }
22
+ /**
23
+ * @deprecated Social sign-in disabled - this component just renders children
24
+ */
25
+ export declare const AboutPetraWeb: {
26
+ ({ children }: AboutPetraWebProps): import("react/jsx-runtime").JSX.Element;
27
+ displayName: string;
28
+ } & {
29
+ Trigger: ForwardRefExoticComponent<HeadlessComponentProps & RefAttributes<HTMLButtonElement>>;
30
+ };
31
+ //# sourceMappingURL=AboutPetraWeb.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AboutPetraWeb.d.ts","sourceRoot":"","sources":["../../src/components/AboutPetraWeb.tsx"],"names":[],"mappings":"AAGA,OAAO,EACL,yBAAyB,EACzB,SAAS,EACT,aAAa,EACb,QAAQ,EACT,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,sBAAsB,EAA2B,MAAM,SAAS,CAAC;AAE1E,0CAA0C;AAC1C,eAAO,MAAM,qBAAqB,uCAAuC,CAAC;AAE1E,0CAA0C;AAC1C,MAAM,WAAW,4BAA4B;IAC3C,OAAO,EAAE,yBAAyB,CAChC,IAAI,CAAC,QAAQ,CAAC,aAAa,CAAC,EAAE,KAAK,CAAC,GAAG,aAAa,CAAC,aAAa,CAAC,CACpE,CAAC;IACF,KAAK,EAAE,yBAAyB,CAC9B,sBAAsB,GAAG,aAAa,CAAC,kBAAkB,CAAC,CAC3D,CAAC;IACF,WAAW,EAAE,yBAAyB,CACpC,sBAAsB,GAAG,aAAa,CAAC,oBAAoB,CAAC,CAC7D,CAAC;IACF,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,gBAAgB,EAAE,yBAAyB,CAAC,sBAAsB,GAAG,aAAa,CAAC,iBAAiB,CAAC,CAAC,EAAE,CAAC;IACzG,IAAI,EAAE,MAAM,IAAI,CAAC;IACjB,IAAI,EAAE,MAAM,IAAI,CAAC;IACjB,MAAM,EAAE,MAAM,IAAI,CAAC;CACpB;AAED,0CAA0C;AAC1C,MAAM,WAAW,kBAAkB;IACjC,qBAAqB,EAAE,CAAC,MAAM,EAAE,4BAA4B,KAAK,SAAS,CAAC;IAC3E,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAoBD;;GAEG;AACH,eAAO,MAAM,aAAa;mBAlBE,kBAAkB;;;;CAoB5C,CAAC"}
@@ -0,0 +1,12 @@
1
+ import { HeadlessComponentProps } from "./utils";
2
+ export declare const MOVEMENT_PRIVACY_POLICY_URL = "https://movementlabs.xyz/privacy";
3
+ /**
4
+ * A headless component for rendering the Movement Labs privacy policy disclaimer
5
+ * that should be placed under the Petra Web login options.
6
+ */
7
+ export declare const MovementPrivacyPolicy: import("react").ForwardRefExoticComponent<HeadlessComponentProps & import("react").RefAttributes<HTMLDivElement>> & {
8
+ Disclaimer: import("react").ForwardRefExoticComponent<HeadlessComponentProps & import("react").RefAttributes<HTMLSpanElement>>;
9
+ Link: import("react").ForwardRefExoticComponent<HeadlessComponentProps & import("react").RefAttributes<HTMLAnchorElement>>;
10
+ PoweredBy: import("react").ForwardRefExoticComponent<Pick<HeadlessComponentProps, "className"> & import("react").RefAttributes<HTMLDivElement>>;
11
+ };
12
+ //# sourceMappingURL=MovementPrivacyPolicy.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MovementPrivacyPolicy.d.ts","sourceRoot":"","sources":["../../src/components/MovementPrivacyPolicy.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,sBAAsB,EAA2B,MAAM,SAAS,CAAC;AAE1E,eAAO,MAAM,2BAA2B,qCAAqC,CAAC;AA+B9E;;;GAGG;AACH,eAAO,MAAM,qBAAqB;;;;CAIhC,CAAC"}
@@ -0,0 +1,16 @@
1
+ import { AdapterNotDetectedWallet, AdapterWallet } from "@moveindustries/wallet-adapter-core";
2
+ import { HeadlessComponentProps } from "./utils";
3
+ export interface WalletItemProps extends HeadlessComponentProps {
4
+ /** The wallet option to be displayed. */
5
+ wallet: AdapterWallet | AdapterNotDetectedWallet;
6
+ /** A callback to be invoked when the wallet is connected. */
7
+ onConnect?: () => void;
8
+ }
9
+ /** A headless component for rendering a wallet option's name, icon, and either connect button or install link. */
10
+ export declare const WalletItem: import("react").ForwardRefExoticComponent<WalletItemProps & import("react").RefAttributes<HTMLDivElement>> & {
11
+ Icon: import("react").ForwardRefExoticComponent<HeadlessComponentProps & import("react").RefAttributes<HTMLImageElement>>;
12
+ Name: import("react").ForwardRefExoticComponent<HeadlessComponentProps & import("react").RefAttributes<HTMLDivElement>>;
13
+ ConnectButton: import("react").ForwardRefExoticComponent<HeadlessComponentProps & import("react").RefAttributes<HTMLButtonElement>>;
14
+ InstallLink: import("react").ForwardRefExoticComponent<HeadlessComponentProps & import("react").RefAttributes<HTMLAnchorElement>>;
15
+ };
16
+ //# sourceMappingURL=WalletItem.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WalletItem.d.ts","sourceRoot":"","sources":["../../src/components/WalletItem.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,wBAAwB,EACxB,aAAa,EAGd,MAAM,qCAAqC,CAAC;AAI7C,OAAO,EAAE,sBAAsB,EAA2B,MAAM,SAAS,CAAC;AAE1E,MAAM,WAAW,eAAgB,SAAQ,sBAAsB;IAC7D,yCAAyC;IACzC,MAAM,EAAE,aAAa,GAAG,wBAAwB,CAAC;IACjD,6DAA6D;IAC7D,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;CACxB;AAmGD,kHAAkH;AAClH,eAAO,MAAM,UAAU;;;;;CAKrB,CAAC"}
@@ -0,0 +1,20 @@
1
+ import { ReactNode } from "react";
2
+ export interface HeadlessComponentProps {
3
+ /** A class name for styling the element. */
4
+ className?: string;
5
+ /**
6
+ * Whether to render as the child element instead of the default element provided.
7
+ * All props will be merged into the child element.
8
+ */
9
+ asChild?: boolean;
10
+ children?: ReactNode;
11
+ }
12
+ /**
13
+ * Gets an HTML element type from its tag name
14
+ * @example
15
+ * HTMLElementFromTag<"img"> // resolved type: HTMLImageElement
16
+ */
17
+ type HTMLElementFromTag<T extends keyof JSX.IntrinsicElements> = JSX.IntrinsicElements[T] extends React.ClassAttributes<infer Element> ? Element : HTMLElement;
18
+ export declare function createHeadlessComponent<TElement extends keyof JSX.IntrinsicElements>(displayName: string, elementType: TElement, props?: JSX.IntrinsicElements[TElement] | ((displayName: string) => JSX.IntrinsicElements[TElement])): import("react").ForwardRefExoticComponent<HeadlessComponentProps & import("react").RefAttributes<HTMLElementFromTag<TElement>>>;
19
+ export {};
20
+ //# sourceMappingURL=utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/components/utils.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAA4C,MAAM,OAAO,CAAC;AAE5E,MAAM,WAAW,sBAAsB;IACrC,4CAA4C;IAC5C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED;;;;GAIG;AACH,KAAK,kBAAkB,CAAC,CAAC,SAAS,MAAM,GAAG,CAAC,iBAAiB,IAC3D,GAAG,CAAC,iBAAiB,CAAC,CAAC,CAAC,SAAS,KAAK,CAAC,eAAe,CAAC,MAAM,OAAO,CAAC,GACjE,OAAO,GACP,WAAW,CAAC;AAElB,wBAAgB,uBAAuB,CACrC,QAAQ,SAAS,MAAM,GAAG,CAAC,iBAAiB,EAE5C,WAAW,EAAE,MAAM,EACnB,WAAW,EAAE,QAAQ,EACrB,KAAK,CAAC,EACF,GAAG,CAAC,iBAAiB,CAAC,QAAQ,CAAC,GAC/B,CAAC,CAAC,WAAW,EAAE,MAAM,KAAK,GAAG,CAAC,iBAAiB,CAAC,QAAQ,CAAC,CAAC,mIAsC/D"}
@@ -0,0 +1,3 @@
1
+ import { SVGProps } from "react";
2
+ export declare const LinkGraphic: import("react").ForwardRefExoticComponent<Omit<SVGProps<SVGSVGElement>, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
3
+ //# sourceMappingURL=LinkGraphic.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LinkGraphic.d.ts","sourceRoot":"","sources":["../../src/graphics/LinkGraphic.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAc,MAAM,OAAO,CAAC;AAE7C,eAAO,MAAM,WAAW,gIAsBvB,CAAC"}