@xyo-network/react-wallet-service 9.0.1 → 9.0.4
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.
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
export declare const WalletServiceContext: import("react").Context<({
|
|
2
|
-
metaMaskWallet: import("@xyo-network/
|
|
2
|
+
metaMaskWallet: import("@xyo-network/sdk-protocol-js").MetaMaskConnector;
|
|
3
3
|
} & {
|
|
4
4
|
provided: true;
|
|
5
5
|
}) | (import("@xylabs/react-shared").FixedValues<import("@xylabs/react-shared").ProvidedContextExState<{
|
|
6
|
-
metaMaskWallet: import("@xyo-network/
|
|
6
|
+
metaMaskWallet: import("@xyo-network/sdk-protocol-js").MetaMaskConnector;
|
|
7
7
|
}>, never> & {
|
|
8
8
|
provided: false;
|
|
9
9
|
}) | (import("@xylabs/react-shared").FixedValues<import("@xylabs/react-shared").NotProvidedContextExState<{
|
|
10
|
-
metaMaskWallet: import("@xyo-network/
|
|
10
|
+
metaMaskWallet: import("@xyo-network/sdk-protocol-js").MetaMaskConnector;
|
|
11
11
|
}>, never> & {
|
|
12
12
|
provided: false;
|
|
13
13
|
})>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ContextExState } from '@xylabs/react-shared';
|
|
2
|
-
import type { MetaMaskConnector } from '@xyo-network/
|
|
2
|
+
import type { MetaMaskConnector } from '@xyo-network/sdk-js';
|
|
3
3
|
export type WalletServiceState = ContextExState<{
|
|
4
4
|
metaMaskWallet: MetaMaskConnector;
|
|
5
5
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"State.d.ts","sourceRoot":"","sources":["../../../src/contexts/State.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAC1D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"State.d.ts","sourceRoot":"","sources":["../../../src/contexts/State.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAC1D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAA;AAE5D,MAAM,MAAM,kBAAkB,GAAG,cAAc,CAAC;IAC9C,cAAc,EAAE,iBAAiB,CAAA;CAClC,CAAC,CAAA"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
export declare const useWalletService: () => ({
|
|
2
|
-
metaMaskWallet: import("@xyo-network/
|
|
2
|
+
metaMaskWallet: import("@xyo-network/sdk-protocol-js").MetaMaskConnector;
|
|
3
3
|
} & {
|
|
4
4
|
provided: true;
|
|
5
5
|
}) | (import("@xylabs/react-shared").FixedValues<import("@xylabs/react-shared").ProvidedContextExState<{
|
|
6
|
-
metaMaskWallet: import("@xyo-network/
|
|
6
|
+
metaMaskWallet: import("@xyo-network/sdk-protocol-js").MetaMaskConnector;
|
|
7
7
|
}>, never> & {
|
|
8
8
|
provided: false;
|
|
9
9
|
}) | (import("@xylabs/react-shared").FixedValues<import("@xylabs/react-shared").NotProvidedContextExState<{
|
|
10
|
-
metaMaskWallet: import("@xyo-network/
|
|
10
|
+
metaMaskWallet: import("@xyo-network/sdk-protocol-js").MetaMaskConnector;
|
|
11
11
|
}>, never> & {
|
|
12
12
|
provided: false;
|
|
13
13
|
});
|
package/dist/browser/index.mjs
CHANGED
|
@@ -3,7 +3,7 @@ import { createContextEx } from "@xylabs/react-shared";
|
|
|
3
3
|
var WalletServiceContext = createContextEx();
|
|
4
4
|
|
|
5
5
|
// src/contexts/Provider.tsx
|
|
6
|
-
import { MetaMaskConnector } from "@xyo-network/
|
|
6
|
+
import { MetaMaskConnector } from "@xyo-network/sdk-js";
|
|
7
7
|
import { useMemo } from "react";
|
|
8
8
|
import { jsx } from "react/jsx-runtime";
|
|
9
9
|
var WalletServiceProvider = ({ children }) => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/contexts/Context.ts", "../../src/contexts/Provider.tsx", "../../src/contexts/use.ts"],
|
|
4
|
-
"sourcesContent": ["import { createContextEx } from '@xylabs/react-shared'\n\nimport type { WalletServiceState } from './State.ts'\n\nexport const WalletServiceContext = createContextEx<WalletServiceState>()\n", "import { MetaMaskConnector } from '@xyo-network/
|
|
4
|
+
"sourcesContent": ["import { createContextEx } from '@xylabs/react-shared'\n\nimport type { WalletServiceState } from './State.ts'\n\nexport const WalletServiceContext = createContextEx<WalletServiceState>()\n", "import { MetaMaskConnector } from '@xyo-network/sdk-js'\nimport type { PropsWithChildren } from 'react'\nimport React, { useMemo } from 'react'\n\nimport { WalletServiceContext } from './Context.ts'\nimport type { WalletServiceState } from './State.ts'\n\nexport const WalletServiceProvider: React.FC<PropsWithChildren> = ({ children }) => {\n const value: WalletServiceState = useMemo(() => ({ metaMaskWallet: new MetaMaskConnector(), provided: true as const }), [])\n return <WalletServiceContext value={value}>{children}</WalletServiceContext>\n}\n", "import { assertEx } from '@xylabs/sdk-js'\nimport { use } from 'react'\n\nimport { WalletServiceContext } from './Context.ts'\n\nexport const useWalletService = () => {\n const context = use(WalletServiceContext)\n assertEx(context.metaMaskWallet, () => 'WalletServiceContext not initialized')\n // we do the cast to make the api non-optional\n return context\n}\n"],
|
|
5
5
|
"mappings": ";AAAA,SAAS,uBAAuB;AAIzB,IAAM,uBAAuB,gBAAoC;;;ACJxE,SAAS,yBAAyB;AAElC,SAAgB,eAAe;AAOtB;AAFF,IAAM,wBAAqD,CAAC,EAAE,SAAS,MAAM;AAClF,QAAM,QAA4B,QAAQ,OAAO,EAAE,gBAAgB,IAAI,kBAAkB,GAAG,UAAU,KAAc,IAAI,CAAC,CAAC;AAC1H,SAAO,oBAAC,wBAAqB,OAAe,UAAS;AACvD;;;ACVA,SAAS,gBAAgB;AACzB,SAAS,WAAW;AAIb,IAAM,mBAAmB,MAAM;AACpC,QAAM,UAAU,IAAI,oBAAoB;AACxC,WAAS,QAAQ,gBAAgB,MAAM,sCAAsC;AAE7E,SAAO;AACT;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xyo-network/react-wallet-service",
|
|
3
|
-
"version": "9.0.
|
|
3
|
+
"version": "9.0.4",
|
|
4
4
|
"description": "Common React library for all XYO projects that use React",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"xyo",
|
|
@@ -41,42 +41,68 @@
|
|
|
41
41
|
"README.md"
|
|
42
42
|
],
|
|
43
43
|
"devDependencies": {
|
|
44
|
+
"@bitauth/libauth": "~3.0.0",
|
|
44
45
|
"@metamask/providers": "^22.1.1",
|
|
45
46
|
"@mui/material": "^9.0.1",
|
|
47
|
+
"@noble/post-quantum": "~0.6.1",
|
|
46
48
|
"@opentelemetry/api": "^1.9.1",
|
|
47
49
|
"@opentelemetry/sdk-trace-base": "^2.7.1",
|
|
48
|
-
"@
|
|
50
|
+
"@scure/base": "~2.2.0",
|
|
51
|
+
"@scure/bip39": "~2.2.0",
|
|
52
|
+
"@types/react": "^19.2.16",
|
|
53
|
+
"@xylabs/geo": "^6.0.7",
|
|
49
54
|
"@xylabs/react-shared": "~9.0.2",
|
|
50
|
-
"@xylabs/sdk-js": "^6.0.
|
|
51
|
-
"@xylabs/
|
|
52
|
-
"@xylabs/
|
|
53
|
-
"@xylabs/tsconfig
|
|
54
|
-
"@xylabs/tsconfig-
|
|
55
|
-
"@
|
|
55
|
+
"@xylabs/sdk-js": "^6.0.7",
|
|
56
|
+
"@xylabs/threads": "^6.0.7",
|
|
57
|
+
"@xylabs/toolchain": "~8.1.15",
|
|
58
|
+
"@xylabs/tsconfig": "^8.1.15",
|
|
59
|
+
"@xylabs/tsconfig-dom": "^8.1.15",
|
|
60
|
+
"@xylabs/tsconfig-react": "~8.1.15",
|
|
61
|
+
"@xyo-network/sdk-js": "^6.0.2",
|
|
62
|
+
"@xyo-network/sdk-protocol-js": "~6.0.7",
|
|
63
|
+
"ajv": "^8.20.0",
|
|
56
64
|
"async-mutex": "^0.5.0",
|
|
57
65
|
"bn.js": "^5.2.3",
|
|
58
66
|
"buffer": "^6.0.3",
|
|
67
|
+
"debug": "~4.4.3",
|
|
59
68
|
"eslint": "^10.4.1",
|
|
60
69
|
"ethers": "^6.16.0",
|
|
70
|
+
"hash-wasm": "~4.12.0",
|
|
71
|
+
"idb": "^8.0.3",
|
|
72
|
+
"lru-cache": "^11.5.1",
|
|
73
|
+
"observable-fns": "~0.6.1",
|
|
61
74
|
"pako": "^2.1.0",
|
|
62
|
-
"react": "^19.2.
|
|
63
|
-
"react-dom": "^19.2.
|
|
75
|
+
"react": "^19.2.7",
|
|
76
|
+
"react-dom": "^19.2.7",
|
|
64
77
|
"typescript": "^6.0.3",
|
|
65
78
|
"webextension-polyfill": "^0.12.0",
|
|
66
79
|
"zod": "^4.4.3"
|
|
67
80
|
},
|
|
68
81
|
"peerDependencies": {
|
|
82
|
+
"@bitauth/libauth": "~3.0",
|
|
69
83
|
"@metamask/providers": "^22.1",
|
|
70
84
|
"@mui/material": "^9.0",
|
|
85
|
+
"@noble/post-quantum": "~0.6.1",
|
|
71
86
|
"@opentelemetry/api": "^1.9",
|
|
72
87
|
"@opentelemetry/sdk-trace-base": "^2.7",
|
|
88
|
+
"@scure/base": "~2.2",
|
|
89
|
+
"@scure/bip39": "~2.2",
|
|
90
|
+
"@xylabs/geo": "^6.0",
|
|
73
91
|
"@xylabs/react-shared": "~9.0",
|
|
74
92
|
"@xylabs/sdk-js": "^6.0",
|
|
75
|
-
"@
|
|
93
|
+
"@xylabs/threads": "^6.0",
|
|
94
|
+
"@xyo-network/sdk-js": "^6.0",
|
|
95
|
+
"@xyo-network/sdk-protocol-js": "~6.0",
|
|
96
|
+
"ajv": "^8.20",
|
|
76
97
|
"async-mutex": "^0.5",
|
|
77
98
|
"bn.js": "^5.2",
|
|
78
99
|
"buffer": "^6.0",
|
|
100
|
+
"debug": "~4.4",
|
|
79
101
|
"ethers": "^6.16",
|
|
102
|
+
"hash-wasm": "~4.12",
|
|
103
|
+
"idb": "^8.0",
|
|
104
|
+
"lru-cache": "^11.3",
|
|
105
|
+
"observable-fns": "~0.6",
|
|
80
106
|
"pako": "^2.1",
|
|
81
107
|
"react": "^19.2",
|
|
82
108
|
"react-dom": "^19.2",
|