@xyo-network/react-chain-provider 1.20.8 → 1.20.10

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 (36) hide show
  1. package/dist/browser/contexts/gateway/Provider.d.ts.map +1 -1
  2. package/dist/browser/hooks/client/helpers/findCaveat.d.ts +2 -2
  3. package/dist/browser/hooks/client/helpers/findCaveat.d.ts.map +1 -1
  4. package/dist/browser/hooks/client/permissions/usePermissions.d.ts +2 -6
  5. package/dist/browser/hooks/client/permissions/usePermissions.d.ts.map +1 -1
  6. package/dist/browser/hooks/client/permissions/usePermissionsAccounts.d.ts +2 -1
  7. package/dist/browser/hooks/client/permissions/usePermissionsAccounts.d.ts.map +1 -1
  8. package/dist/browser/hooks/client/useClientFromWallet.d.ts +2 -11
  9. package/dist/browser/hooks/client/useClientFromWallet.d.ts.map +1 -1
  10. package/dist/browser/hooks/client/useGatewayFromWallet.d.ts +2 -5
  11. package/dist/browser/hooks/client/useGatewayFromWallet.d.ts.map +1 -1
  12. package/dist/browser/hooks/gateway/useNetwork.d.ts +1 -1
  13. package/dist/browser/hooks/gateway/useNetwork.d.ts.map +1 -1
  14. package/dist/browser/hooks/gateway/useRunner.d.ts +1 -1
  15. package/dist/browser/hooks/gateway/useRunner.d.ts.map +1 -1
  16. package/dist/browser/hooks/gateway/useViewer.d.ts +1 -1
  17. package/dist/browser/hooks/gateway/useViewer.d.ts.map +1 -1
  18. package/dist/browser/hooks/helpers/getXyoClient.d.ts +2 -5
  19. package/dist/browser/hooks/helpers/getXyoClient.d.ts.map +1 -1
  20. package/dist/browser/hooks/useAddressBalance.d.ts.map +1 -1
  21. package/dist/browser/hooks/useConnectAccount.d.ts +1 -1
  22. package/dist/browser/index.mjs +200 -382
  23. package/dist/browser/index.mjs.map +1 -1
  24. package/dist/browser/types/GatewayFromWallet.d.ts +2 -7
  25. package/dist/browser/types/GatewayFromWallet.d.ts.map +1 -1
  26. package/package.json +12 -11
  27. package/src/contexts/gateway/Provider.tsx +24 -25
  28. package/src/contexts/gateway/story/ProviderWithWallet.stories.tsx +20 -25
  29. package/src/hooks/client/helpers/findCaveat.ts +2 -20
  30. package/src/hooks/client/permissions/usePermissions.ts +2 -14
  31. package/src/hooks/client/permissions/usePermissionsAccounts.ts +2 -38
  32. package/src/hooks/client/useClientFromWallet.ts +2 -98
  33. package/src/hooks/client/useGatewayFromWallet.ts +2 -30
  34. package/src/hooks/helpers/getXyoClient.ts +2 -46
  35. package/src/hooks/useAddressBalance.ts +0 -6
  36. package/src/types/GatewayFromWallet.ts +2 -8
@@ -1 +1 @@
1
- {"version":3,"file":"Provider.d.ts","sourceRoot":"","sources":["../../../../src/contexts/gateway/Provider.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAA;AACvD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAA;AAC9C,OAAO,KAEN,MAAM,OAAO,CAAA;AAQd,MAAM,WAAW,oBAAqB,SAAQ,iBAAiB;IAC7D,WAAW,CAAC,EAAE,WAAW,CAAA;CAC1B;AAED,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CA6D1D,CAAA"}
1
+ {"version":3,"file":"Provider.d.ts","sourceRoot":"","sources":["../../../../src/contexts/gateway/Provider.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAA;AACvD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAA;AAC9C,OAAO,KAAkB,MAAM,OAAO,CAAA;AAMtC,MAAM,WAAW,oBAAqB,SAAQ,iBAAiB;IAC7D,WAAW,CAAC,EAAE,WAAW,CAAA;CAC1B;AAED,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CAiE1D,CAAA"}
@@ -1,3 +1,3 @@
1
- import type { CaveatTypes, ParentCapability, XyoPermissions } from '@xyo-network/xl1-sdk';
2
- export declare const findCaveat: (permissions: XyoPermissions, targetCapability: ParentCapability, targetCaveatType: CaveatTypes) => Promise<{}>;
1
+ /** @deprecated Import from `@xyo-network/react-chain-client` instead */
2
+ export { findCaveat } from '@xyo-network/react-chain-client';
3
3
  //# sourceMappingURL=findCaveat.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"findCaveat.d.ts","sourceRoot":"","sources":["../../../../../src/hooks/client/helpers/findCaveat.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,WAAW,EAAE,gBAAgB,EAAE,cAAc,EAC9C,MAAM,sBAAsB,CAAA;AAE7B,eAAO,MAAM,UAAU,GACrB,aAAa,cAAc,EAC3B,kBAAkB,gBAAgB,EAClC,kBAAkB,WAAW,gBAW9B,CAAA"}
1
+ {"version":3,"file":"findCaveat.d.ts","sourceRoot":"","sources":["../../../../../src/hooks/client/helpers/findCaveat.ts"],"names":[],"mappings":"AAAA,wEAAwE;AACxE,OAAO,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAA"}
@@ -1,7 +1,3 @@
1
- export declare const usePermissions: () => {
2
- permissions: import("@xyo-network/xl1-protocol").XyoPermissions | undefined;
3
- isLoading: boolean;
4
- error: Error | null;
5
- timedout: boolean;
6
- };
1
+ /** @deprecated Import from `@xyo-network/react-chain-client` instead */
2
+ export { usePermissions } from '@xyo-network/react-chain-client';
7
3
  //# sourceMappingURL=usePermissions.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"usePermissions.d.ts","sourceRoot":"","sources":["../../../../../src/hooks/client/permissions/usePermissions.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,cAAc;;;;;CAW1B,CAAA"}
1
+ {"version":3,"file":"usePermissions.d.ts","sourceRoot":"","sources":["../../../../../src/hooks/client/permissions/usePermissions.ts"],"names":[],"mappings":"AAAA,wEAAwE;AACxE,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAA"}
@@ -1,2 +1,3 @@
1
- export declare const useAccountPermissions: () => [readonly string[] | undefined, Error | undefined, import("@xylabs/react-promise").UsePromiseState | undefined];
1
+ /** @deprecated Import from `@xyo-network/react-chain-client` instead */
2
+ export { useAccountPermissions } from '@xyo-network/react-chain-client';
2
3
  //# sourceMappingURL=usePermissionsAccounts.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"usePermissionsAccounts.d.ts","sourceRoot":"","sources":["../../../../../src/hooks/client/permissions/usePermissionsAccounts.ts"],"names":[],"mappings":"AAsBA,eAAO,MAAM,qBAAqB,uHAejC,CAAA"}
1
+ {"version":3,"file":"usePermissionsAccounts.d.ts","sourceRoot":"","sources":["../../../../../src/hooks/client/permissions/usePermissionsAccounts.ts"],"names":[],"mappings":"AAAA,wEAAwE;AACxE,OAAO,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAA"}
@@ -1,12 +1,3 @@
1
- import type { XyoClient } from '@xyo-network/xl1-sdk';
2
- interface ClientState {
3
- client?: XyoClient | null;
4
- error: Error | null;
5
- isLoading: boolean;
6
- timedout: boolean;
7
- }
8
- export declare const useClientFromWallet: (timeout?: number) => ClientState;
9
- /** @deprecated - use useClientFromWallet instead */
10
- export declare const useClient: (timeout?: number) => ClientState;
11
- export {};
1
+ /** @deprecated Import from `@xyo-network/react-chain-client` instead */
2
+ export { useClient, useClientFromWallet } from '@xyo-network/react-chain-client';
12
3
  //# sourceMappingURL=useClientFromWallet.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useClientFromWallet.d.ts","sourceRoot":"","sources":["../../../../src/hooks/client/useClientFromWallet.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAA;AAOrD,UAAU,WAAW;IACnB,MAAM,CAAC,EAAE,SAAS,GAAG,IAAI,CAAA;IACzB,KAAK,EAAE,KAAK,GAAG,IAAI,CAAA;IACnB,SAAS,EAAE,OAAO,CAAA;IAClB,QAAQ,EAAE,OAAO,CAAA;CAClB;AAsDD,eAAO,MAAM,mBAAmB,GAAI,UAAU,MAAM,gBA2BnD,CAAA;AAED,oDAAoD;AACpD,eAAO,MAAM,SAAS,aA9BwB,MAAM,gBA8BR,CAAA"}
1
+ {"version":3,"file":"useClientFromWallet.d.ts","sourceRoot":"","sources":["../../../../src/hooks/client/useClientFromWallet.ts"],"names":[],"mappings":"AAAA,wEAAwE;AACxE,OAAO,EAAE,SAAS,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAA"}
@@ -1,6 +1,3 @@
1
- import type { GatewayName } from '@xyo-network/xl1-sdk';
2
- import type { GatewayFromWallet } from '../../types/index.ts';
3
- export declare const useGatewayFromWallet: (gatewayName?: GatewayName, timeout?: number) => GatewayFromWallet;
4
- /** @deprecated - useGatewayFromWallet */
5
- export declare const useGateway: (gatewayName?: GatewayName, timeout?: number) => GatewayFromWallet;
1
+ /** @deprecated Import from `@xyo-network/react-chain-client` instead */
2
+ export { useGateway, useGatewayFromWallet } from '@xyo-network/react-chain-client';
6
3
  //# sourceMappingURL=useGatewayFromWallet.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useGatewayFromWallet.d.ts","sourceRoot":"","sources":["../../../../src/hooks/client/useGatewayFromWallet.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAA;AAEvD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAA;AAG7D,eAAO,MAAM,oBAAoB,GAAI,cAAc,WAAW,EAAE,UAAU,MAAM,KAAG,iBAoBlF,CAAA;AAED,yCAAyC;AACzC,eAAO,MAAM,UAAU,iBAvB4B,WAAW,YAAY,MAAM,KAAG,iBAuBrC,CAAA"}
1
+ {"version":3,"file":"useGatewayFromWallet.d.ts","sourceRoot":"","sources":["../../../../src/hooks/client/useGatewayFromWallet.ts"],"names":[],"mappings":"AAAA,wEAAwE;AACxE,OAAO,EAAE,UAAU,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAA"}
@@ -1,2 +1,2 @@
1
- export declare const useNetworkFromGateway: () => import("@xyo-network/xl1-protocol").XyoNetwork | undefined;
1
+ export declare const useNetworkFromGateway: () => import("@xyo-network/xl1-protocol-lib").XyoNetwork | undefined;
2
2
  //# sourceMappingURL=useNetwork.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useNetwork.d.ts","sourceRoot":"","sources":["../../../../src/hooks/gateway/useNetwork.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,qBAAqB,kEAGjC,CAAA"}
1
+ {"version":3,"file":"useNetwork.d.ts","sourceRoot":"","sources":["../../../../src/hooks/gateway/useNetwork.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,qBAAqB,sEAGjC,CAAA"}
@@ -1,2 +1,2 @@
1
- export declare const useRunnerFromGateway: () => import("@xyo-network/xl1-protocol").XyoRunner | undefined;
1
+ export declare const useRunnerFromGateway: () => import("@xyo-network/xl1-protocol-lib").XyoRunner | undefined;
2
2
  //# sourceMappingURL=useRunner.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useRunner.d.ts","sourceRoot":"","sources":["../../../../src/hooks/gateway/useRunner.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,oBAAoB,iEAGhC,CAAA"}
1
+ {"version":3,"file":"useRunner.d.ts","sourceRoot":"","sources":["../../../../src/hooks/gateway/useRunner.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,oBAAoB,qEAGhC,CAAA"}
@@ -1,2 +1,2 @@
1
- export declare const useViewerFromGateway: () => import("@xyo-network/xl1-protocol").XyoViewer | undefined;
1
+ export declare const useViewerFromGateway: () => import("@xyo-network/xl1-protocol-lib").XyoViewer | undefined;
2
2
  //# sourceMappingURL=useViewer.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useViewer.d.ts","sourceRoot":"","sources":["../../../../src/hooks/gateway/useViewer.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,oBAAoB,iEAGhC,CAAA"}
1
+ {"version":3,"file":"useViewer.d.ts","sourceRoot":"","sources":["../../../../src/hooks/gateway/useViewer.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,oBAAoB,qEAGhC,CAAA"}
@@ -1,6 +1,3 @@
1
- import type { XyoClient } from '@xyo-network/xl1-sdk';
2
- export declare const listenForClientInjection: (onClientReady: () => void, timeout: number, onTimeout: () => void) => void;
3
- type ReturnType = XyoClient | undefined | null;
4
- export declare function getXyoClient(timeout?: number): Promise<ReturnType>;
5
- export {};
1
+ /** @deprecated Import from `@xyo-network/react-chain-client` instead */
2
+ export { getXyoClient, listenForClientInjection } from '@xyo-network/react-chain-client';
6
3
  //# sourceMappingURL=getXyoClient.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"getXyoClient.d.ts","sourceRoot":"","sources":["../../../../src/hooks/helpers/getXyoClient.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAA;AAQrD,eAAO,MAAM,wBAAwB,GAAI,eAAe,MAAM,IAAI,EAAE,SAAS,MAAM,EAAE,WAAW,MAAM,IAAI,SAazG,CAAA;AAED,KAAK,UAAU,GAAG,SAAS,GAAG,SAAS,GAAG,IAAI,CAAA;AAE9C,wBAAsB,YAAY,CAAC,OAAO,SAA0B,GAAG,OAAO,CAAC,UAAU,CAAC,CAmBzF"}
1
+ {"version":3,"file":"getXyoClient.d.ts","sourceRoot":"","sources":["../../../../src/hooks/helpers/getXyoClient.ts"],"names":[],"mappings":"AAAA,wEAAwE;AACxE,OAAO,EAAE,YAAY,EAAE,wBAAwB,EAAE,MAAM,iCAAiC,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"useAddressBalance.d.ts","sourceRoot":"","sources":["../../../src/hooks/useAddressBalance.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAA;AAE7C,OAAO,KAAK,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAA;AAM9D,eAAO,MAAM,iBAAiB,GAE5B,UAAU,OAAO,EAEjB,SAAS,SAAS,EAElB,UAAU,MAAM,EAEhB,QAAQ,MAAM;;;;;;;;;;;CA0Ef,CAAA"}
1
+ {"version":3,"file":"useAddressBalance.d.ts","sourceRoot":"","sources":["../../../src/hooks/useAddressBalance.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAA;AAE7C,OAAO,KAAK,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAA;AAM9D,eAAO,MAAM,iBAAiB,GAE5B,UAAU,OAAO,EAEjB,SAAS,SAAS,EAElB,UAAU,MAAM,EAEhB,QAAQ,MAAM;;;;;;;;;;;CAoEf,CAAA"}
@@ -11,7 +11,7 @@ export declare const useConnectAccount: (gatewayName?: GatewayName, timeout?: nu
11
11
  readonly __address: true;
12
12
  }) | undefined>;
13
13
  error: Error | undefined;
14
- gateway: import("@xyo-network/xl1-sdk").XyoGatewayRunner | null | undefined;
14
+ gateway: import("@xyo-network/xl1-protocol").XyoGatewayRunner | null | undefined;
15
15
  timedout: boolean;
16
16
  };
17
17
  //# sourceMappingURL=useConnectAccount.d.ts.map