@xyo-network/react-chain-provider 1.7.0 → 1.7.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.
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { XyoViewer } from '@xyo-network/xl1-protocol';
|
|
2
|
-
export declare const useCurrentBlock: (refresh?: number, viewer?: XyoViewer) => [import("@xyo-network/xl1-protocol").HydratedBlock
|
|
2
|
+
export declare const useCurrentBlock: (refresh?: number, viewer?: XyoViewer) => [import("@xyo-network/xl1-protocol").HydratedBlock | undefined, Error | undefined, import("@xylabs/react-promise").UsePromiseState | undefined];
|
|
3
3
|
//# sourceMappingURL=useCurrentBlock.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useCurrentBlock.d.ts","sourceRoot":"","sources":["../../../src/hooks/useCurrentBlock.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAA;AAE1D,eAAO,MAAM,eAAe,GAAI,gBAAW,EAAE,SAAS,SAAS,
|
|
1
|
+
{"version":3,"file":"useCurrentBlock.d.ts","sourceRoot":"","sources":["../../../src/hooks/useCurrentBlock.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAA;AAE1D,eAAO,MAAM,eAAe,GAAI,gBAAW,EAAE,SAAS,SAAS,oJAO9D,CAAA"}
|
package/dist/browser/index.d.ts
CHANGED
|
@@ -1,36 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import { XyoViewer, AttoXL1, DefaultNetworkIds, XyoProvider, XyoSigner } from '@xyo-network/xl1-protocol';
|
|
4
|
-
import * as _xylabs_react_promise from '@xylabs/react-promise';
|
|
5
|
-
import * as _xyo_network_payload_model from '@xyo-network/payload-model';
|
|
6
|
-
import { JsonRpcXyoRunner, MemoryXyoNetwork, JsonRpcXyoViewer } from '@xyo-network/xl1-rpc';
|
|
7
|
-
import { AccountInstance } from '@xyo-network/account-model';
|
|
8
|
-
|
|
9
|
-
declare const useAddressBalance: (address?: Address, viewer?: XyoViewer, refresh?: number) => {
|
|
10
|
-
address: Lowercase<string> | undefined;
|
|
11
|
-
balanceForAddress: AttoXL1 | null | undefined;
|
|
12
|
-
balanceIntlFriendly: string | undefined;
|
|
13
|
-
shortBalanceIntlFriendly: string | undefined;
|
|
14
|
-
error: Error | undefined;
|
|
15
|
-
loading: boolean;
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
declare const useCurrentBlock: (refresh?: number, viewer?: XyoViewer) => [_xyo_network_xl1_protocol.HydratedBlock<_xyo_network_xl1_protocol.BlockBoundWitness, _xyo_network_payload_model.Payload> | undefined, Error | undefined, _xylabs_react_promise.UsePromiseState | undefined];
|
|
19
|
-
|
|
20
|
-
declare const useHttpRpcRunner: (url?: string) => JsonRpcXyoRunner | undefined;
|
|
21
|
-
|
|
22
|
-
declare const useNetwork: (id?: DefaultNetworkIds) => MemoryXyoNetwork | undefined;
|
|
23
|
-
|
|
24
|
-
declare const useSigner: (_provider?: XyoProvider, account?: AccountInstance) => XyoSigner | undefined;
|
|
25
|
-
|
|
26
|
-
declare const useHttpRpcViewer: (url?: string) => JsonRpcXyoViewer | undefined;
|
|
27
|
-
|
|
28
|
-
/**
|
|
29
|
-
* Creates a JsonRpcXyoViewer instance based on the provided networkId.
|
|
30
|
-
* @param networkId - a network id like 'sequence', 'local', etc.
|
|
31
|
-
* @returns An instance of JsonRpcXyoViewer if the networkId is found in walletConnections,
|
|
32
|
-
* otherwise undefined.
|
|
33
|
-
*/
|
|
34
|
-
declare const useViewerFromWallet: (networkId?: string) => JsonRpcXyoViewer | undefined;
|
|
35
|
-
|
|
36
|
-
export { useAddressBalance, useCurrentBlock, useHttpRpcRunner, useHttpRpcViewer, useNetwork, useSigner, useViewerFromWallet };
|
|
1
|
+
export * from './hooks/index.ts';
|
|
2
|
+
//# sourceMappingURL=index.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "http://json.schemastore.org/package.json",
|
|
3
3
|
"name": "@xyo-network/react-chain-provider",
|
|
4
|
-
"version": "1.7.
|
|
4
|
+
"version": "1.7.2",
|
|
5
5
|
"description": "XYO Layer One API",
|
|
6
6
|
"homepage": "https://xylabs.com",
|
|
7
7
|
"bugs": {
|
|
@@ -34,25 +34,25 @@
|
|
|
34
34
|
"module": "dist/browser/index.mjs",
|
|
35
35
|
"types": "dist/browser/index.d.ts",
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@xylabs/hex": "^4.13.
|
|
38
|
-
"@xylabs/react-promise": "^6.3.
|
|
39
|
-
"@xylabs/typeof": "^4.13.
|
|
40
|
-
"@xyo-network/account-model": "^4.1.
|
|
41
|
-
"@xyo-network/chain-wrappers": "^1.7.
|
|
42
|
-
"@xyo-network/xl1-protocol": "^1.
|
|
43
|
-
"@xyo-network/xl1-rpc": "^1.7.
|
|
37
|
+
"@xylabs/hex": "^4.13.17",
|
|
38
|
+
"@xylabs/react-promise": "^6.3.11",
|
|
39
|
+
"@xylabs/typeof": "^4.13.17",
|
|
40
|
+
"@xyo-network/account-model": "^4.1.3",
|
|
41
|
+
"@xyo-network/chain-wrappers": "^1.7.2",
|
|
42
|
+
"@xyo-network/xl1-protocol": "^1.7.1",
|
|
43
|
+
"@xyo-network/xl1-rpc": "^1.7.2",
|
|
44
44
|
"react": "^19.1.0"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
47
|
"@emotion/react": "^11.14.0",
|
|
48
48
|
"@emotion/styled": "^11.14.1",
|
|
49
49
|
"@mui/material": "^7.2.0",
|
|
50
|
-
"@storybook/react-vite": "^9.0.
|
|
50
|
+
"@storybook/react-vite": "^9.0.17",
|
|
51
51
|
"@types/react": "^19.1.8",
|
|
52
|
-
"@xylabs/ts-scripts-yarn3": "^7.0.0-rc.
|
|
53
|
-
"@xylabs/tsconfig-react": "^7.0.0-rc.
|
|
54
|
-
"@xyo-network/chain-network-model": "^1.7.
|
|
55
|
-
"@xyo-network/react-chain-model": "^1.7.
|
|
52
|
+
"@xylabs/ts-scripts-yarn3": "^7.0.0-rc.27",
|
|
53
|
+
"@xylabs/tsconfig-react": "^7.0.0-rc.27",
|
|
54
|
+
"@xyo-network/chain-network-model": "^1.7.2",
|
|
55
|
+
"@xyo-network/react-chain-model": "^1.7.2",
|
|
56
56
|
"knip": "^5.61.3",
|
|
57
57
|
"typescript": "^5.8.3"
|
|
58
58
|
},
|