@megaeth-labs/wallet-sdk-react 0.1.19 → 0.1.22
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/README.md +17 -1
- package/dist/index.d.cts +1 -0
- package/dist/index.d.ts +1 -0
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -35,6 +35,8 @@ React hooks and components for the MegaETH Wallet SDK, built on top of [@megaeth
|
|
|
35
35
|
- [Open Wallet UI](#open-wallet-ui)
|
|
36
36
|
- [Deposit Funds](#deposit-funds)
|
|
37
37
|
- [Direct SDK Access](#direct-sdk-access)
|
|
38
|
+
- [Testing Locally](#testing-locally)
|
|
39
|
+
- [Publishing](#publishing)
|
|
38
40
|
|
|
39
41
|
## Install
|
|
40
42
|
|
|
@@ -621,4 +623,18 @@ mega.events.on('statusChange', ({ status, address }) => {
|
|
|
621
623
|
});
|
|
622
624
|
```
|
|
623
625
|
|
|
624
|
-
**Note:** When using `MegaProvider`, the SDK is automatically initialized, so you don't need to call `mega.initialise()` manually. The `useStatus` hook provides the initialization state via the `initialised` property.
|
|
626
|
+
**Note:** When using `MegaProvider`, the SDK is automatically initialized, so you don't need to call `mega.initialise()` manually. The `useStatus` hook provides the initialization state via the `initialised` property.
|
|
627
|
+
|
|
628
|
+
## Testing Locally
|
|
629
|
+
- Link locally: `pnpm link`
|
|
630
|
+
- Run build with watch: `pnpm dev`
|
|
631
|
+
- In another project run: `pnpm link @megaeth-labs/wallet-sdk-react`
|
|
632
|
+
- Restart the other project dev server to ensure the link is working
|
|
633
|
+
|
|
634
|
+
**Caution:** A pnpm workspace file will be created in the other project. Make sure to remove this file and run `pnpm i` before committing otherwise CI will fail.
|
|
635
|
+
|
|
636
|
+
## Publishing
|
|
637
|
+
- Create a PR
|
|
638
|
+
- Merge to `main`
|
|
639
|
+
- When ready, open GitHub and click Run Workflow on the `Publish to npm` job
|
|
640
|
+
https://github.com/megaeth-labs/wallet-sdk-react/actions/workflows/publish.yml
|
package/dist/index.d.cts
CHANGED
|
@@ -14,6 +14,7 @@ declare const useStatus: () => {
|
|
|
14
14
|
status: "connected" | "disconnected" | "cancelled";
|
|
15
15
|
address?: `0x${string}`;
|
|
16
16
|
network: _megaeth_labs_wallet_sdk.Network;
|
|
17
|
+
megaName?: string;
|
|
17
18
|
};
|
|
18
19
|
declare const useConnect: (options?: Omit<UseMutationOptions<Awaited<ReturnType<typeof mega.connect>>, Error, void, unknown>, "mutationFn">) => _tanstack_react_query.UseMutationResult<ConnectionStatus, Error, void, unknown>;
|
|
19
20
|
declare const useDisconnect: (options?: Omit<UseMutationOptions<Awaited<ReturnType<typeof mega.disconnect>>, Error, void, unknown>, "mutationFn">) => _tanstack_react_query.UseMutationResult<ConnectionStatus, Error, void, unknown>;
|
package/dist/index.d.ts
CHANGED
|
@@ -14,6 +14,7 @@ declare const useStatus: () => {
|
|
|
14
14
|
status: "connected" | "disconnected" | "cancelled";
|
|
15
15
|
address?: `0x${string}`;
|
|
16
16
|
network: _megaeth_labs_wallet_sdk.Network;
|
|
17
|
+
megaName?: string;
|
|
17
18
|
};
|
|
18
19
|
declare const useConnect: (options?: Omit<UseMutationOptions<Awaited<ReturnType<typeof mega.connect>>, Error, void, unknown>, "mutationFn">) => _tanstack_react_query.UseMutationResult<ConnectionStatus, Error, void, unknown>;
|
|
19
20
|
declare const useDisconnect: (options?: Omit<UseMutationOptions<Awaited<ReturnType<typeof mega.disconnect>>, Error, void, unknown>, "mutationFn">) => _tanstack_react_query.UseMutationResult<ConnectionStatus, Error, void, unknown>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@megaeth-labs/wallet-sdk-react",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.22",
|
|
4
4
|
"description": "MegaETH Wallet SDK React Wrapper for web applications",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -28,10 +28,10 @@
|
|
|
28
28
|
"license": "SEE LICENSE IN LICENSE",
|
|
29
29
|
"publishConfig": {
|
|
30
30
|
"registry": "https://registry.npmjs.org/",
|
|
31
|
-
"access": "
|
|
31
|
+
"access": "public"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@megaeth-labs/wallet-sdk": "0.1.
|
|
34
|
+
"@megaeth-labs/wallet-sdk": "0.1.23"
|
|
35
35
|
},
|
|
36
36
|
"peerDependencies": {
|
|
37
37
|
"@tanstack/react-query": "^5",
|