@bananapus/nana-sdk-react 1.0.0

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 (98) hide show
  1. package/README.md +45 -0
  2. package/dist/components/NativeTokenValue.d.ts +13 -0
  3. package/dist/components/NativeTokenValue.d.ts.map +1 -0
  4. package/dist/contexts/JBChainContext/JBChainContext.d.ts +22 -0
  5. package/dist/contexts/JBChainContext/JBChainContext.d.ts.map +1 -0
  6. package/dist/contexts/JBContractContext/JBContractContext.d.ts +54 -0
  7. package/dist/contexts/JBContractContext/JBContractContext.d.ts.map +1 -0
  8. package/dist/contexts/JBDataHookContext/JBCurrentDataHookProvider.d.ts +9 -0
  9. package/dist/contexts/JBDataHookContext/JBCurrentDataHookProvider.d.ts.map +1 -0
  10. package/dist/contexts/JBDataHookContext/JBDataHookContext.d.ts +29 -0
  11. package/dist/contexts/JBDataHookContext/JBDataHookContext.d.ts.map +1 -0
  12. package/dist/contexts/JBProjectMetadataContext/JBProjectMetadataContext.d.ts +25 -0
  13. package/dist/contexts/JBProjectMetadataContext/JBProjectMetadataContext.d.ts.map +1 -0
  14. package/dist/contexts/JBProjectProvider/JBProjectProvider.d.ts +37 -0
  15. package/dist/contexts/JBProjectProvider/JBProjectProvider.d.ts.map +1 -0
  16. package/dist/contexts/JBRulesetContext/JBRulesetContext.d.ts +64 -0
  17. package/dist/contexts/JBRulesetContext/JBRulesetContext.d.ts.map +1 -0
  18. package/dist/contexts/JBTerminalContext/JBPrimaryNativeTerminalProvider.d.ts +9 -0
  19. package/dist/contexts/JBTerminalContext/JBPrimaryNativeTerminalProvider.d.ts.map +1 -0
  20. package/dist/contexts/JBTerminalContext/JBTerminalContext.d.ts +26 -0
  21. package/dist/contexts/JBTerminalContext/JBTerminalContext.d.ts.map +1 -0
  22. package/dist/contexts/JBTokenContext/JBTokenContext.d.ts +32 -0
  23. package/dist/contexts/JBTokenContext/JBTokenContext.d.ts.map +1 -0
  24. package/dist/contexts/types.d.ts +8 -0
  25. package/dist/contexts/types.d.ts.map +1 -0
  26. package/dist/generated/fragment-masking.d.ts +20 -0
  27. package/dist/generated/fragment-masking.d.ts.map +1 -0
  28. package/dist/generated/gql.d.ts +37 -0
  29. package/dist/generated/gql.d.ts.map +1 -0
  30. package/dist/generated/graphql.d.ts +6216 -0
  31. package/dist/generated/graphql.d.ts.map +1 -0
  32. package/dist/generated/index.d.ts +3 -0
  33. package/dist/generated/index.d.ts.map +1 -0
  34. package/dist/hooks/index.d.ts +17 -0
  35. package/dist/hooks/index.d.ts.map +1 -0
  36. package/dist/hooks/jb721Hook/helpers.d.ts +9 -0
  37. package/dist/hooks/jb721Hook/helpers.d.ts.map +1 -0
  38. package/dist/hooks/jb721Hook/helpers.test.d.ts +2 -0
  39. package/dist/hooks/jb721Hook/helpers.test.d.ts.map +1 -0
  40. package/dist/hooks/jb721Hook/use721HookMetadataId.d.ts +8 -0
  41. package/dist/hooks/jb721Hook/use721HookMetadataId.d.ts.map +1 -0
  42. package/dist/hooks/jb721Hook/useFind721DataHook.d.ts +5 -0
  43. package/dist/hooks/jb721Hook/useFind721DataHook.d.ts.map +1 -0
  44. package/dist/hooks/ruleset/useJBRuleset.d.ts +861 -0
  45. package/dist/hooks/ruleset/useJBRuleset.d.ts.map +1 -0
  46. package/dist/hooks/ruleset/useJBUpcomingRuleset.d.ts +10 -0
  47. package/dist/hooks/ruleset/useJBUpcomingRuleset.d.ts.map +1 -0
  48. package/dist/hooks/ruleset/useResolveDataHook.d.ts +21 -0
  49. package/dist/hooks/ruleset/useResolveDataHook.d.ts.map +1 -0
  50. package/dist/hooks/suckers/useSuckers.d.ts +189 -0
  51. package/dist/hooks/suckers/useSuckers.d.ts.map +1 -0
  52. package/dist/hooks/token/useNativeTokenSurplus.d.ts +148 -0
  53. package/dist/hooks/token/useNativeTokenSurplus.d.ts.map +1 -0
  54. package/dist/hooks/token/useNativeTokenSymbol.d.ts +8 -0
  55. package/dist/hooks/token/useNativeTokenSymbol.d.ts.map +1 -0
  56. package/dist/hooks/token/useSuckersCashOutQuote.d.ts +10 -0
  57. package/dist/hooks/token/useSuckersCashOutQuote.d.ts.map +1 -0
  58. package/dist/hooks/token/useSuckersNativeTokenBalance.d.ts +13 -0
  59. package/dist/hooks/token/useSuckersNativeTokenBalance.d.ts.map +1 -0
  60. package/dist/hooks/token/useSuckersNativeTokenSurplus.d.ts +14 -0
  61. package/dist/hooks/token/useSuckersNativeTokenSurplus.d.ts.map +1 -0
  62. package/dist/hooks/token/useSuckersTokenCashOutValue.d.ts +15 -0
  63. package/dist/hooks/token/useSuckersTokenCashOutValue.d.ts.map +1 -0
  64. package/dist/hooks/token/useSuckersUserTokenBalance.d.ts +14 -0
  65. package/dist/hooks/token/useSuckersUserTokenBalance.d.ts.map +1 -0
  66. package/dist/hooks/token/useTokenCashOutQuoteEth.d.ts +1890 -0
  67. package/dist/hooks/token/useTokenCashOutQuoteEth.d.ts.map +1 -0
  68. package/dist/hooks/useEtherPrice.d.ts +7 -0
  69. package/dist/hooks/useEtherPrice.d.ts.map +1 -0
  70. package/dist/hooks/useNetwork.d.ts +8 -0
  71. package/dist/hooks/useNetwork.d.ts.map +1 -0
  72. package/dist/hooks/usePreparePayMetadata.d.ts +14 -0
  73. package/dist/hooks/usePreparePayMetadata.d.ts.map +1 -0
  74. package/dist/index.d.ts +15 -0
  75. package/dist/index.d.ts.map +1 -0
  76. package/dist/index.js +1676 -0
  77. package/dist/index.js.map +1 -0
  78. package/dist/lib/bendystraw/getBendystrawUrl.d.ts +6 -0
  79. package/dist/lib/bendystraw/getBendystrawUrl.d.ts.map +1 -0
  80. package/dist/lib/bendystraw/useBendystrawQuery.d.ts +10 -0
  81. package/dist/lib/bendystraw/useBendystrawQuery.d.ts.map +1 -0
  82. package/dist/lib/relayr/constants.d.ts +3 -0
  83. package/dist/lib/relayr/constants.d.ts.map +1 -0
  84. package/dist/lib/relayr/hooks/useGetRelayrTxBundle.d.ts +10 -0
  85. package/dist/lib/relayr/hooks/useGetRelayrTxBundle.d.ts.map +1 -0
  86. package/dist/lib/relayr/hooks/useGetRelayrTxQuote.d.ts +150 -0
  87. package/dist/lib/relayr/hooks/useGetRelayrTxQuote.d.ts.map +1 -0
  88. package/dist/lib/relayr/hooks/useRequestRelayrQuote.d.ts +9 -0
  89. package/dist/lib/relayr/hooks/useRequestRelayrQuote.d.ts.map +1 -0
  90. package/dist/lib/relayr/hooks/useSendRelayrTx.d.ts +12 -0
  91. package/dist/lib/relayr/hooks/useSendRelayrTx.d.ts.map +1 -0
  92. package/dist/lib/relayr/hooks/useSignErc2771ForwardRequest.d.ts +13 -0
  93. package/dist/lib/relayr/hooks/useSignErc2771ForwardRequest.d.ts.map +1 -0
  94. package/dist/lib/relayr/index.d.ts +6 -0
  95. package/dist/lib/relayr/index.d.ts.map +1 -0
  96. package/dist/lib/relayr/types.d.ts +61 -0
  97. package/dist/lib/relayr/types.d.ts.map +1 -0
  98. package/package.json +53 -0
package/README.md ADDED
@@ -0,0 +1,45 @@
1
+ # @bananapus/nana-sdk-react
2
+
3
+ [Wagmi](https://wagmi.sh/) hooks for Juicebox. Useful data contexts and helpers for building React applications.
4
+
5
+ ## Installation
6
+
7
+ Install the `@bananapus/nana-sdk-react` for React, and it's peer dependency, `@bananapus/nana-sdk-core`.
8
+
9
+ ```
10
+ npm install @bananapus/nana-sdk-react @bananapus/nana-sdk-core
11
+ ```
12
+
13
+ ## Usage
14
+
15
+ Fetching all of the commonly used data for Juicebox projects can be cumbersome. We expose the `JBProjectProvider` to fetch a bunch of data about a juicebox project, including (but not limited to):
16
+
17
+ - important contracts (like payment terminals, stores etc.)
18
+ - project metadata (ipfs)
19
+ - current ruleset
20
+ - project token details
21
+
22
+ `JBProjectProvider` is used in the following example:
23
+
24
+ ```tsx
25
+ import { JBProjectProvider } from "@bananapus/nana-sdk-react";
26
+
27
+ function MyPage() {
28
+ const projectId = 1n;
29
+
30
+ return (
31
+ <JBProjectProvider
32
+ chainId={1}
33
+ projectId={projectId}
34
+ version={6}
35
+ ctxProps={{
36
+ metadata: {
37
+ ipfsGatewayHostname: "jbm.infura-ipfs.io", // your custom gateway. Defaults to `ipfs.io`
38
+ },
39
+ }}
40
+ >
41
+ <MyPageComponents />
42
+ </JBProjectProvider>
43
+ );
44
+ }
45
+ ```
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Format a native token value for display.
3
+ *
4
+ * The Native Token might be ETH, Sepolia ETH, etc.
5
+ *
6
+ * @param wei The native token value in wei (fixed-point number with 18 decimals).
7
+ * @param decimals The number of decimal places (or 'fraction digits') to display.
8
+ */
9
+ export declare function NativeTokenValue({ wei, decimals }: {
10
+ wei: bigint;
11
+ decimals?: number;
12
+ }): import("react/jsx-runtime").JSX.Element;
13
+ //# sourceMappingURL=NativeTokenValue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NativeTokenValue.d.ts","sourceRoot":"","sources":["../../src/components/NativeTokenValue.tsx"],"names":[],"mappings":"AAGA;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAAC,EAAE,GAAG,EAAE,QAAY,EAAE,EAAE;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;CAAE,2CAWzF"}
@@ -0,0 +1,22 @@
1
+ import { JBChainId } from "@bananapus/nana-sdk-core";
2
+ import { PropsWithChildren } from "react";
3
+ /**
4
+ * Context for project-specific contracts.
5
+ */
6
+ export type JBChainContextData = {
7
+ chainId: JBChainId | undefined;
8
+ };
9
+ /**
10
+ * Context for project-specific contracts.
11
+ */
12
+ export declare const JBChainContext: import("react").Context<JBChainContextData>;
13
+ export declare function useJBChainId(): JBChainId | undefined;
14
+ /**
15
+ * Load project-specific contract addresses for a given JB project.
16
+ *
17
+ * If `include` arg not specified, all contracts are loaded
18
+ */
19
+ export declare const JBChainProvider: ({ chainId, children, }: PropsWithChildren<{
20
+ chainId: JBChainId;
21
+ }>) => import("react/jsx-runtime").JSX.Element;
22
+ //# sourceMappingURL=JBChainContext.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"JBChainContext.d.ts","sourceRoot":"","sources":["../../../src/contexts/JBChainContext/JBChainContext.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAS,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,EAAiB,iBAAiB,EAAc,MAAM,OAAO,CAAC;AAErE;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG;IAC/B,OAAO,EAAE,SAAS,GAAG,SAAS,CAAC;CAChC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,cAAc,6CAEzB,CAAC;AAEH,wBAAgB,YAAY,IAAI,SAAS,GAAG,SAAS,CAGpD;AAED;;;;GAIG;AACH,eAAO,MAAM,eAAe,GAAI,wBAG7B,iBAAiB,CAAC;IAAE,OAAO,EAAE,SAAS,CAAA;CAAE,CAAC,4CAI3C,CAAC"}
@@ -0,0 +1,54 @@
1
+ import { JBChainId, JBVersion, Contract } from "@bananapus/nana-sdk-core";
2
+ import { PropsWithChildren } from "react";
3
+ import { Address } from "viem";
4
+ import { AsyncData } from "../types";
5
+ /**
6
+ * Context for project-specific contracts.
7
+ */
8
+ export type JBContractContextData = {
9
+ projectId: bigint;
10
+ version: JBVersion;
11
+ contracts: {
12
+ primaryNativeTerminal: AsyncData<Address>;
13
+ controller: AsyncData<Address>;
14
+ fundAccessLimits: AsyncData<Address>;
15
+ rulesets: AsyncData<Address>;
16
+ tokens: AsyncData<Address>;
17
+ splits: AsyncData<Address>;
18
+ };
19
+ contractAddress: (contract: Contract, chainId?: JBChainId) => Address;
20
+ };
21
+ /**
22
+ * Context for project-specific contracts.
23
+ */
24
+ export declare const JBContractContext: import("react").Context<JBContractContextData>;
25
+ export declare function useJBContractContext(): JBContractContextData;
26
+ export declare enum DynamicContract {
27
+ "Controller" = 0,
28
+ "PrimaryNativePaymentTerminal" = 1,
29
+ "FundAccessLimits" = 2,
30
+ "Tokens" = 3,
31
+ "Splits" = 4,
32
+ "Rulesets" = 5
33
+ }
34
+ export type JBContractProviderProps = PropsWithChildren<{
35
+ projectId: bigint;
36
+ version: JBVersion;
37
+ include?: DynamicContract[];
38
+ }>;
39
+ /**
40
+ * Return the current project ID and chain ID. If `chainId` provided, return the project ID for that chain.
41
+ * Otherwise, return the project ID for the current chain.
42
+ */
43
+ export declare function useJBProjectId(chainId?: JBChainId): {
44
+ projectId: bigint | undefined;
45
+ chainId: JBChainId | undefined;
46
+ version: JBVersion;
47
+ };
48
+ /**
49
+ * Load project-specific contract addresses for a given JB project.
50
+ *
51
+ * If `include` arg not specified, all contracts are loaded
52
+ */
53
+ export declare const JBContractProvider: ({ projectId, include, children, version, }: JBContractProviderProps) => import("react/jsx-runtime").JSX.Element;
54
+ //# sourceMappingURL=JBContractContext.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"JBContractContext.d.ts","sourceRoot":"","sources":["../../../src/contexts/JBContractContext/JBContractContext.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EAMT,SAAS,EAIT,QAAQ,EACT,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,iBAAiB,EAAmD,MAAM,OAAO,CAAC;AAC3F,OAAO,EAAE,OAAO,EAA+B,MAAM,MAAM,CAAC;AAG5D,OAAO,EAAE,SAAS,EAAiB,MAAM,UAAU,CAAC;AAGpD;;GAEG;AACH,MAAM,MAAM,qBAAqB,GAAG;IAClC,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,SAAS,CAAC;IACnB,SAAS,EAAE;QACT,qBAAqB,EAAE,SAAS,CAAC,OAAO,CAAC,CAAC;QAC1C,UAAU,EAAE,SAAS,CAAC,OAAO,CAAC,CAAC;QAC/B,gBAAgB,EAAE,SAAS,CAAC,OAAO,CAAC,CAAC;QACrC,QAAQ,EAAE,SAAS,CAAC,OAAO,CAAC,CAAC;QAC7B,MAAM,EAAE,SAAS,CAAC,OAAO,CAAC,CAAC;QAC3B,MAAM,EAAE,SAAS,CAAC,OAAO,CAAC,CAAC;KAC5B,CAAC;IACF,eAAe,EAAE,CAAC,QAAQ,EAAE,QAAQ,EAAE,OAAO,CAAC,EAAE,SAAS,KAAK,OAAO,CAAC;CACvE,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,iBAAiB,gDAqB5B,CAAC;AAEH,wBAAgB,oBAAoB,0BAEnC;AAGD,oBAAY,eAAe;IACzB,YAAY,IAAA;IACZ,8BAA8B,IAAA;IAC9B,kBAAkB,IAAA;IAClB,QAAQ,IAAA;IACR,QAAQ,IAAA;IACR,UAAU,IAAA;CACX;AAED,MAAM,MAAM,uBAAuB,GAAG,iBAAiB,CAAC;IACtD,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,SAAS,CAAC;IACnB,OAAO,CAAC,EAAE,eAAe,EAAE,CAAC;CAC7B,CAAC,CAAC;AAEH;;;GAGG;AACH,wBAAgB,cAAc,CAAC,OAAO,CAAC,EAAE,SAAS,GAAG;IACnD,SAAS,EAAE,MAAM,GAAG,SAAS,CAAC;IAC9B,OAAO,EAAE,SAAS,GAAG,SAAS,CAAC;IAC/B,OAAO,EAAE,SAAS,CAAC;CACpB,CAaA;AAED;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,GAAI,4CAKhC,uBAAuB,4CAgJzB,CAAC"}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Provide infortmaion about the current funding cycle's datahook.
3
+ *
4
+ * @note depends on JBFundingCycleContext
5
+ */
6
+ export declare function JBCurrentDataHookProvider({ children, }: {
7
+ children: React.ReactNode;
8
+ }): import("react/jsx-runtime").JSX.Element;
9
+ //# sourceMappingURL=JBCurrentDataHookProvider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"JBCurrentDataHookProvider.d.ts","sourceRoot":"","sources":["../../../src/contexts/JBDataHookContext/JBCurrentDataHookProvider.tsx"],"names":[],"mappings":"AAIA;;;;GAIG;AACH,wBAAgB,yBAAyB,CAAC,EACxC,QAAQ,GACT,EAAE;IACD,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,2CAWA"}
@@ -0,0 +1,29 @@
1
+ import { PropsWithChildren } from "react";
2
+ import { Address } from "viem";
3
+ import { AsyncData } from "../types";
4
+ /**
5
+ * Data structure for the context for a given dataHook.
6
+ */
7
+ export type JBDataHookContextData = AsyncData<{
8
+ /**
9
+ * Address of the dataHook.
10
+ */
11
+ dataHookAddress: Address;
12
+ }>;
13
+ /**
14
+ * Context for a given dataHook.
15
+ */
16
+ export declare const JBDataHookContext: import("react").Context<JBDataHookContextData>;
17
+ export declare function useJBDataHookContext(): JBDataHookContextData;
18
+ export type JBDataHookProviderProps = PropsWithChildren<{
19
+ dataHookAddress: Address | undefined;
20
+ }>;
21
+ /**
22
+ * Provides information about a given dataHook.
23
+ * ONLY SUPPORTS JB721Delegate!
24
+ * @TODO support other dataHooks (e.g. buy-back delegate)
25
+ *
26
+ * @note depends on JBContractContext
27
+ */
28
+ export declare const JBDataHookProvider: ({ dataHookAddress, children, }: JBDataHookProviderProps) => import("react/jsx-runtime").JSX.Element;
29
+ //# sourceMappingURL=JBDataHookContext.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"JBDataHookContext.d.ts","sourceRoot":"","sources":["../../../src/contexts/JBDataHookContext/JBDataHookContext.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAsC,MAAM,OAAO,CAAC;AAC9E,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAC/B,OAAO,EAAE,SAAS,EAAiB,MAAM,UAAU,CAAC;AAGpD;;GAEG;AACH,MAAM,MAAM,qBAAqB,GAAG,SAAS,CAAC;IAC5C;;OAEG;IACH,eAAe,EAAE,OAAO,CAAC;CAC1B,CAAC,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,iBAAiB,gDACuB,CAAC;AAEtD,wBAAgB,oBAAoB,0BAEnC;AAED,MAAM,MAAM,uBAAuB,GAAG,iBAAiB,CAAC;IACtD,eAAe,EAAE,OAAO,GAAG,SAAS,CAAC;CACtC,CAAC,CAAC;AAEH;;;;;;GAMG;AACH,eAAO,MAAM,kBAAkB,GAAI,gCAGhC,uBAAuB,4CAqBzB,CAAC"}
@@ -0,0 +1,25 @@
1
+ import { JBProjectMetadata } from "@bananapus/nana-sdk-core";
2
+ import { Address } from "viem";
3
+ import { AsyncData } from "../types";
4
+ export type JBProjectMetadataContext = {
5
+ metadata: AsyncData<JBProjectMetadata>;
6
+ };
7
+ export declare const JBProjectMetadataContext: import("react").Context<JBProjectMetadataContext>;
8
+ export declare function useJBProjectMetadataContext(): JBProjectMetadataContext;
9
+ export declare function useProjectMetadata({ projectId, jbControllerAddress, ipfsGatewayHostname, }: {
10
+ projectId: bigint | undefined;
11
+ jbControllerAddress: Address | undefined;
12
+ ipfsGatewayHostname?: string;
13
+ }): import("wagmi/query").UseQueryReturnType<unknown, unknown>;
14
+ export type JBProjectMetadataProviderProps = {
15
+ ipfsGatewayHostname?: string;
16
+ };
17
+ /**
18
+ * Provides the metadata for the project in context.
19
+ *
20
+ * @note depends on JBContractContext
21
+ */
22
+ export declare const JBProjectMetadataProvider: ({ children, ipfsGatewayHostname, }: {
23
+ children: React.ReactNode;
24
+ } & JBProjectMetadataProviderProps) => import("react/jsx-runtime").JSX.Element;
25
+ //# sourceMappingURL=JBProjectMetadataContext.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"JBProjectMetadataContext.d.ts","sourceRoot":"","sources":["../../../src/contexts/JBProjectMetadataContext/JBProjectMetadataContext.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAA6B,MAAM,0BAA0B,CAAC;AAExF,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAK/B,OAAO,EAAE,SAAS,EAAiB,MAAM,UAAU,CAAC;AAEpD,MAAM,MAAM,wBAAwB,GAAG;IACrC,QAAQ,EAAE,SAAS,CAAC,iBAAiB,CAAC,CAAC;CACxC,CAAC;AAEF,eAAO,MAAM,wBAAwB,mDAEnC,CAAC;AAEH,wBAAgB,2BAA2B,6BAE1C;AAED,wBAAgB,kBAAkB,CAAC,EACjC,SAAS,EACT,mBAAmB,EACnB,mBAAmB,GACpB,EAAE;IACD,SAAS,EAAE,MAAM,GAAG,SAAS,CAAC;IAC9B,mBAAmB,EAAE,OAAO,GAAG,SAAS,CAAC;IACzC,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC9B,8DAiCA;AAED,MAAM,MAAM,8BAA8B,GAAG;IAC3C,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC9B,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,yBAAyB,GAAI,oCAGvC;IACD,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,GAAG,8BAA8B,4CAsBjC,CAAC"}
@@ -0,0 +1,37 @@
1
+ import { PropsWithChildren } from "react";
2
+ import { JBContractProviderProps } from "../JBContractContext/JBContractContext";
3
+ import { JBProjectMetadataProviderProps } from "../JBProjectMetadataContext/JBProjectMetadataContext";
4
+ import { JBTokenProviderProps } from "../JBTokenContext/JBTokenContext";
5
+ import { JBChainId, JBVersion } from "@bananapus/nana-sdk-core";
6
+ import { BendystrawConfig } from "../../lib/bendystraw/getBendystrawUrl";
7
+ type JBProjectProviderProps = PropsWithChildren<{
8
+ projectId: bigint;
9
+ chainId: JBChainId;
10
+ version: JBVersion;
11
+ ctxProps?: {
12
+ token?: JBTokenProviderProps;
13
+ contract?: JBContractProviderProps;
14
+ metadata?: JBProjectMetadataProviderProps;
15
+ };
16
+ bendystraw: BendystrawConfig;
17
+ }>;
18
+ export type JBProjectContextData = {
19
+ chainId: JBChainId;
20
+ projectId: bigint;
21
+ version: JBVersion;
22
+ bendystraw: BendystrawConfig;
23
+ };
24
+ export declare const JBProjectContext: import("react").Context<JBProjectContextData | undefined>;
25
+ /**
26
+ * Juicebox project context provider. Loads all the data for a project.
27
+ *
28
+ * Allows for children to access:
29
+ * - {@link JBContractContext}
30
+ * - {@link JBFundingCycleContext}
31
+ * - {@link JBTokenContext}
32
+ */
33
+ export declare const JBProjectProvider: ({ projectId, chainId, children, ctxProps, version, bendystraw, }: JBProjectProviderProps) => import("react/jsx-runtime").JSX.Element;
34
+ export declare function useJBProject(): Omit<JBProjectContextData, "bendystraw"> | undefined;
35
+ export declare function useBendystrawConfig(): BendystrawConfig | undefined;
36
+ export {};
37
+ //# sourceMappingURL=JBProjectProvider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"JBProjectProvider.d.ts","sourceRoot":"","sources":["../../../src/contexts/JBProjectProvider/JBProjectProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAiB,iBAAiB,EAAc,MAAM,OAAO,CAAC;AAErE,OAAO,EAEL,uBAAuB,EACxB,MAAM,wCAAwC,CAAC;AAEhD,OAAO,EAEL,8BAA8B,EAC/B,MAAM,sDAAsD,CAAC;AAE9D,OAAO,EAAmB,oBAAoB,EAAE,MAAM,kCAAkC,CAAC;AAEzF,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAChE,OAAO,EAAE,gBAAgB,EAAE,MAAM,uCAAuC,CAAC;AAEzE,KAAK,sBAAsB,GAAG,iBAAiB,CAAC;IAC9C,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,SAAS,CAAC;IACnB,OAAO,EAAE,SAAS,CAAC;IACnB,QAAQ,CAAC,EAAE;QACT,KAAK,CAAC,EAAE,oBAAoB,CAAC;QAC7B,QAAQ,CAAC,EAAE,uBAAuB,CAAC;QACnC,QAAQ,CAAC,EAAE,8BAA8B,CAAC;KAC3C,CAAC;IACF,UAAU,EAAE,gBAAgB,CAAC;CAC9B,CAAC,CAAC;AAEH,MAAM,MAAM,oBAAoB,GAAG;IACjC,OAAO,EAAE,SAAS,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,SAAS,CAAC;IACnB,UAAU,EAAE,gBAAgB,CAAC;CAC9B,CAAC;AAEF,eAAO,MAAM,gBAAgB,2DAA6D,CAAC;AAE3F;;;;;;;GAOG;AACH,eAAO,MAAM,iBAAiB,GAAI,kEAO/B,sBAAsB,4CAkBxB,CAAC;AAEF,wBAAgB,YAAY,IAAI,IAAI,CAAC,oBAAoB,EAAE,YAAY,CAAC,GAAG,SAAS,CAEnF;AAED,wBAAgB,mBAAmB,IAAI,gBAAgB,GAAG,SAAS,CAElE"}
@@ -0,0 +1,64 @@
1
+ import { CashOutTaxRate, jbControllerAbi, ReservedPercent, RulesetWeight, WeightCutPercent } from "@bananapus/nana-sdk-core";
2
+ import { ContractFunctionReturnType } from "viem";
3
+ import { AsyncData } from "../types";
4
+ /**
5
+ * Context for the current ruleset of a project.
6
+ */
7
+ export type JBRulesetContext = {
8
+ /**
9
+ * The current ruleset of the project.
10
+ */
11
+ ruleset: AsyncData<Omit<ContractFunctionReturnType<typeof jbControllerAbi, "view", "currentRulesetOf">[0], "weight" | "weightCutPercent"> & {
12
+ weight: RulesetWeight;
13
+ weightCutPercent: WeightCutPercent;
14
+ }>;
15
+ /**
16
+ * The metadata for the current ruleset of the project.
17
+ */
18
+ rulesetMetadata: AsyncData<Omit<ContractFunctionReturnType<typeof jbControllerAbi, "view", "currentRulesetOf">[1], "cashOutTaxRate" | "reservedPercent"> & {
19
+ cashOutTaxRate: CashOutTaxRate;
20
+ reservedPercent: ReservedPercent;
21
+ }>;
22
+ };
23
+ /**
24
+ * Context for the project's current ruleset.
25
+ */
26
+ export declare const JBRulesetContext: import("react").Context<JBRulesetContext>;
27
+ export declare function useJBRulesetContext(): JBRulesetContext;
28
+ /**
29
+ *
30
+ * @deprecated use useJBRuleset instead
31
+ */
32
+ export declare function useJBRulesetMetadata(): AsyncData<Omit<{
33
+ reservedPercent: number;
34
+ cashOutTaxRate: number;
35
+ baseCurrency: number;
36
+ pausePay: boolean;
37
+ pauseCreditTransfers: boolean;
38
+ allowOwnerMinting: boolean;
39
+ allowSetCustomToken: boolean;
40
+ allowTerminalMigration: boolean;
41
+ allowSetTerminals: boolean;
42
+ allowSetController: boolean;
43
+ allowAddAccountingContext: boolean;
44
+ allowAddPriceFeed: boolean;
45
+ ownerMustSendPayouts: boolean;
46
+ holdFees: boolean;
47
+ scopeCashOutsToLocalBalances: boolean;
48
+ useDataHookForPay: boolean;
49
+ useDataHookForCashOut: boolean;
50
+ dataHook: `0x${string}`;
51
+ metadata: number;
52
+ }, "cashOutTaxRate" | "reservedPercent"> & {
53
+ cashOutTaxRate: CashOutTaxRate;
54
+ reservedPercent: ReservedPercent;
55
+ }>;
56
+ /**
57
+ * Provides the current ruleset for a project.
58
+ *
59
+ * @note depends on JBContractContext
60
+ */
61
+ export declare const JBRulesetProvider: ({ children }: {
62
+ children: React.ReactNode;
63
+ }) => import("react/jsx-runtime").JSX.Element;
64
+ //# sourceMappingURL=JBRulesetContext.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"JBRulesetContext.d.ts","sourceRoot":"","sources":["../../../src/contexts/JBRulesetContext/JBRulesetContext.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EAEd,eAAe,EACf,eAAe,EACf,aAAa,EACb,gBAAgB,EACjB,MAAM,0BAA0B,CAAC;AAElC,OAAO,EAAE,0BAA0B,EAAE,MAAM,MAAM,CAAC;AAKlD,OAAO,EAAE,SAAS,EAAiB,MAAM,UAAU,CAAC;AAEpD;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG;IAC7B;;OAEG;IACH,OAAO,EAAE,SAAS,CAChB,IAAI,CACF,0BAA0B,CAAC,OAAO,eAAe,EAAE,MAAM,EAAE,kBAAkB,CAAC,CAAC,CAAC,CAAC,EACjF,QAAQ,GAAG,kBAAkB,CAC9B,GAAG;QACF,MAAM,EAAE,aAAa,CAAC;QACtB,gBAAgB,EAAE,gBAAgB,CAAC;KACpC,CACF,CAAC;IACF;;OAEG;IACH,eAAe,EAAE,SAAS,CACxB,IAAI,CACF,0BAA0B,CAAC,OAAO,eAAe,EAAE,MAAM,EAAE,kBAAkB,CAAC,CAAC,CAAC,CAAC,EACjF,gBAAgB,GAAG,iBAAiB,CACrC,GAAG;QACF,cAAc,EAAE,cAAc,CAAC;QAC/B,eAAe,EAAE,eAAe,CAAC;KAClC,CACF,CAAC;CACH,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,gBAAgB,2CAG3B,CAAC;AAEH,wBAAgB,mBAAmB,qBAElC;AAED;;;GAGG;AACH,wBAAgB,oBAAoB;;;;;;;;;;;;;;;;;;;;;oBAtBd,cAAc;qBACb,eAAe;GAyBrC;AAED;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,GAAI,cAAc;IAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,4CAyE5E,CAAC"}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Provide infortmaion about the project's primary native terminal.
3
+ *
4
+ * @note depends on JBContractContext
5
+ */
6
+ export declare function JBPrimaryNativeTerminalProvider({ children, }: {
7
+ children: React.ReactNode;
8
+ }): string | number | bigint | boolean | Iterable<import("react").ReactNode> | Promise<string | number | bigint | boolean | import("react").ReactPortal | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | Iterable<import("react").ReactNode> | null | undefined> | import("react/jsx-runtime").JSX.Element | null | undefined;
9
+ //# sourceMappingURL=JBPrimaryNativeTerminalProvider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"JBPrimaryNativeTerminalProvider.d.ts","sourceRoot":"","sources":["../../../src/contexts/JBTerminalContext/JBPrimaryNativeTerminalProvider.tsx"],"names":[],"mappings":"AAIA;;;;GAIG;AACH,wBAAgB,+BAA+B,CAAC,EAC9C,QAAQ,GACT,EAAE;IACD,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,2WAYA"}
@@ -0,0 +1,26 @@
1
+ import { jbMultiTerminalAbi } from "@bananapus/nana-sdk-core";
2
+ import { PropsWithChildren } from "react";
3
+ import { Address, ContractFunctionReturnType } from "viem";
4
+ import { AsyncData } from "../types";
5
+ /**
6
+ * [token] The address of the token that accounting is being done with.
7
+ * [decimals] The number of decimals expected in that token's fixed point accounting.
8
+ * [currency] The currency that the token is priced in terms of.
9
+ */
10
+ type JBAccountingContext = ContractFunctionReturnType<typeof jbMultiTerminalAbi, "view", "accountingContextsOf">[0];
11
+ export type JBTerminalContext = {
12
+ address: Address | undefined;
13
+ accountingContexts: AsyncData<readonly JBAccountingContext[] | undefined>;
14
+ store: AsyncData<Address>;
15
+ };
16
+ export declare const JBTerminalContext: import("react").Context<JBTerminalContext>;
17
+ export declare function useJBTerminalContext(): JBTerminalContext;
18
+ type JBTerminalProviderProps = PropsWithChildren<{
19
+ address: Address | undefined;
20
+ }>;
21
+ /**
22
+ * Provide details about a given terminal.
23
+ */
24
+ export declare const JBTerminalProvider: ({ address, children }: JBTerminalProviderProps) => import("react/jsx-runtime").JSX.Element;
25
+ export {};
26
+ //# sourceMappingURL=JBTerminalContext.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"JBTerminalContext.d.ts","sourceRoot":"","sources":["../../../src/contexts/JBTerminalContext/JBTerminalContext.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,EAAE,iBAAiB,EAA6B,MAAM,OAAO,CAAC;AACrE,OAAO,EAAE,OAAO,EAAE,0BAA0B,EAA+B,MAAM,MAAM,CAAC;AAExF,OAAO,EAAE,SAAS,EAAiB,MAAM,UAAU,CAAC;AAGpD;;;;GAIG;AACH,KAAK,mBAAmB,GAAG,0BAA0B,CACnD,OAAO,kBAAkB,EACzB,MAAM,EACN,sBAAsB,CACvB,CAAC,CAAC,CAAC,CAAC;AAEL,MAAM,MAAM,iBAAiB,GAAG;IAC9B,OAAO,EAAE,OAAO,GAAG,SAAS,CAAC;IAC7B,kBAAkB,EAAE,SAAS,CAAC,SAAS,mBAAmB,EAAE,GAAG,SAAS,CAAC,CAAC;IAC1E,KAAK,EAAE,SAAS,CAAC,OAAO,CAAC,CAAC;CAC3B,CAAC;AAEF,eAAO,MAAM,iBAAiB,4CAI5B,CAAC;AAEH,wBAAgB,oBAAoB,sBAEnC;AAED,KAAK,uBAAuB,GAAG,iBAAiB,CAAC;IAC/C,OAAO,EAAE,OAAO,GAAG,SAAS,CAAC;CAC9B,CAAC,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,kBAAkB,GAAI,uBAAuB,uBAAuB,4CAkChF,CAAC"}
@@ -0,0 +1,32 @@
1
+ import { JBProjectToken } from "@bananapus/nana-sdk-core";
2
+ import { PropsWithChildren } from "react";
3
+ import { UseTokenReturnType } from "wagmi";
4
+ import { AsyncData } from "../types";
5
+ /**
6
+ * Context for the token of a project.
7
+ */
8
+ export type JBTokenContextData = {
9
+ /**
10
+ * The token of the project.
11
+ */
12
+ token: AsyncData<UseTokenReturnType["data"]>;
13
+ /**
14
+ * The total outstanding tokens of the project.
15
+ */
16
+ totalOutstanding: AsyncData<JBProjectToken>;
17
+ };
18
+ /**
19
+ * Context for the token of a project.
20
+ */
21
+ export declare const JBTokenContext: import("react").Context<JBTokenContextData>;
22
+ export declare function useJBTokenContext(): JBTokenContextData;
23
+ export type JBTokenProviderProps = PropsWithChildren<{
24
+ withTotalOutstanding?: boolean;
25
+ }>;
26
+ /**
27
+ * Provides the token for a project.
28
+ *
29
+ * @note depends on JBContractContext
30
+ */
31
+ export declare const JBTokenProvider: ({ children, withTotalOutstanding }: JBTokenProviderProps) => import("react/jsx-runtime").JSX.Element;
32
+ //# sourceMappingURL=JBTokenContext.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"JBTokenContext.d.ts","sourceRoot":"","sources":["../../../src/contexts/JBTokenContext/JBTokenContext.tsx"],"names":[],"mappings":"AAAA,OAAO,EAIL,cAAc,EAEf,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAiB,iBAAiB,EAAc,MAAM,OAAO,CAAC;AAErE,OAAO,EAA6B,kBAAkB,EAAE,MAAM,OAAO,CAAC;AAGtE,OAAO,EAAE,SAAS,EAAiB,MAAM,UAAU,CAAC;AAEpD;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG;IAC/B;;OAEG;IACH,KAAK,EAAE,SAAS,CAAC,kBAAkB,CAAC,MAAM,CAAC,CAAC,CAAC;IAC7C;;OAEG;IACH,gBAAgB,EAAE,SAAS,CAAC,cAAc,CAAC,CAAC;CAC7C,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,cAAc,6CAazB,CAAC;AAEH,wBAAgB,iBAAiB,uBAEhC;AAED,MAAM,MAAM,oBAAoB,GAAG,iBAAiB,CAAC;IACnD,oBAAoB,CAAC,EAAE,OAAO,CAAC;CAChC,CAAC,CAAC;AAEH;;;;GAIG;AACH,eAAO,MAAM,eAAe,GAAI,oCAAoC,oBAAoB,4CAqDvF,CAAC"}
@@ -0,0 +1,8 @@
1
+ export interface AsyncData<T> {
2
+ isLoading: boolean;
3
+ data: T | undefined | null;
4
+ }
5
+ declare const AsyncDataNone: AsyncData<any>;
6
+ declare const AsyncDataLoading: AsyncData<any>;
7
+ export { AsyncDataNone, AsyncDataLoading };
8
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/contexts/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,SAAS,CAAC,CAAC;IAC1B,SAAS,EAAE,OAAO,CAAC;IACnB,IAAI,EAAE,CAAC,GAAG,SAAS,GAAG,IAAI,CAAC;CAC5B;AAED,QAAA,MAAM,aAAa,EAAE,SAAS,CAAC,GAAG,CAGjC,CAAC;AAEF,QAAA,MAAM,gBAAgB,EAAE,SAAS,CAAC,GAAG,CAGpC,CAAC;AAEF,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,CAAC"}
@@ -0,0 +1,20 @@
1
+ import { ResultOf, DocumentTypeDecoration, TypedDocumentNode } from '@graphql-typed-document-node/core';
2
+ import { Incremental } from './graphql';
3
+ export type FragmentType<TDocumentType extends DocumentTypeDecoration<any, any>> = TDocumentType extends DocumentTypeDecoration<infer TType, any> ? [TType] extends [{
4
+ ' $fragmentName'?: infer TKey;
5
+ }] ? TKey extends string ? {
6
+ ' $fragmentRefs'?: {
7
+ [key in TKey]: TType;
8
+ };
9
+ } : never : never : never;
10
+ export declare function useFragment<TType>(_documentNode: DocumentTypeDecoration<TType, any>, fragmentType: FragmentType<DocumentTypeDecoration<TType, any>>): TType;
11
+ export declare function useFragment<TType>(_documentNode: DocumentTypeDecoration<TType, any>, fragmentType: FragmentType<DocumentTypeDecoration<TType, any>> | undefined): TType | undefined;
12
+ export declare function useFragment<TType>(_documentNode: DocumentTypeDecoration<TType, any>, fragmentType: FragmentType<DocumentTypeDecoration<TType, any>> | null): TType | null;
13
+ export declare function useFragment<TType>(_documentNode: DocumentTypeDecoration<TType, any>, fragmentType: FragmentType<DocumentTypeDecoration<TType, any>> | null | undefined): TType | null | undefined;
14
+ export declare function useFragment<TType>(_documentNode: DocumentTypeDecoration<TType, any>, fragmentType: Array<FragmentType<DocumentTypeDecoration<TType, any>>>): Array<TType>;
15
+ export declare function useFragment<TType>(_documentNode: DocumentTypeDecoration<TType, any>, fragmentType: Array<FragmentType<DocumentTypeDecoration<TType, any>>> | null | undefined): Array<TType> | null | undefined;
16
+ export declare function useFragment<TType>(_documentNode: DocumentTypeDecoration<TType, any>, fragmentType: ReadonlyArray<FragmentType<DocumentTypeDecoration<TType, any>>>): ReadonlyArray<TType>;
17
+ export declare function useFragment<TType>(_documentNode: DocumentTypeDecoration<TType, any>, fragmentType: ReadonlyArray<FragmentType<DocumentTypeDecoration<TType, any>>> | null | undefined): ReadonlyArray<TType> | null | undefined;
18
+ export declare function makeFragmentData<F extends DocumentTypeDecoration<any, any>, FT extends ResultOf<F>>(data: FT, _fragment: F): FragmentType<F>;
19
+ export declare function isFragmentReady<TQuery, TFrag>(queryNode: DocumentTypeDecoration<TQuery, any>, fragmentNode: TypedDocumentNode<TFrag>, data: FragmentType<TypedDocumentNode<Incremental<TFrag>, any>> | null | undefined): data is FragmentType<typeof fragmentNode>;
20
+ //# sourceMappingURL=fragment-masking.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fragment-masking.d.ts","sourceRoot":"","sources":["../../src/generated/fragment-masking.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,37 @@
1
+ import * as types from './graphql';
2
+ import { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core';
3
+ /**
4
+ * Map of all GraphQL operations in the project.
5
+ *
6
+ * This map has several performance disadvantages:
7
+ * 1. It is not tree-shakeable, so it will include all operations in the project.
8
+ * 2. It is not minifiable, so the string of a GraphQL query will be multiple times inside the bundle.
9
+ * 3. It does not support dead code elimination, so it will add unused operations.
10
+ *
11
+ * Therefore it is highly recommended to use the babel or swc plugin for production.
12
+ * Learn more about it here: https://the-guild.dev/graphql/codegen/plugins/presets/preset-client#reducing-bundle-size
13
+ */
14
+ type Documents = {
15
+ "query Project($projectId: Float!, $chainId: Float!, $version: Float!) {\n project(projectId: $projectId, chainId: $chainId, version: $version) {\n projectId\n metadataUri\n handle\n createdAt\n logoUri\n name\n version\n suckerGroupId\n suckerGroup {\n projects {\n items {\n chainId\n balance\n tokenSupply\n projectId\n }\n }\n }\n }\n}\n\nquery Projects($where: projectFilter) {\n projects(where: $where) {\n items {\n projectId\n metadataUri\n handle\n createdAt\n suckerGroupId\n participants {\n totalCount\n }\n version\n }\n }\n}\n\nquery ProjectAccountingContext($chainId: Float!, $projectId: Float!, $version: Float!) {\n project(chainId: $chainId, projectId: $projectId, version: $version) {\n token\n decimals\n currency\n }\n}": typeof types.ProjectDocument;
16
+ };
17
+ declare const documents: Documents;
18
+ /**
19
+ * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
20
+ *
21
+ *
22
+ * @example
23
+ * ```ts
24
+ * const query = graphql(`query GetUser($id: ID!) { user(id: $id) { name } }`);
25
+ * ```
26
+ *
27
+ * The query argument is unknown!
28
+ * Please regenerate the types.
29
+ */
30
+ export declare function graphql(source: string): unknown;
31
+ /**
32
+ * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
33
+ */
34
+ export declare function graphql(source: "query Project($projectId: Float!, $chainId: Float!, $version: Float!) {\n project(projectId: $projectId, chainId: $chainId, version: $version) {\n projectId\n metadataUri\n handle\n createdAt\n logoUri\n name\n version\n suckerGroupId\n suckerGroup {\n projects {\n items {\n chainId\n balance\n tokenSupply\n projectId\n }\n }\n }\n }\n}\n\nquery Projects($where: projectFilter) {\n projects(where: $where) {\n items {\n projectId\n metadataUri\n handle\n createdAt\n suckerGroupId\n participants {\n totalCount\n }\n version\n }\n }\n}\n\nquery ProjectAccountingContext($chainId: Float!, $projectId: Float!, $version: Float!) {\n project(chainId: $chainId, projectId: $projectId, version: $version) {\n token\n decimals\n currency\n }\n}"): (typeof documents)["query Project($projectId: Float!, $chainId: Float!, $version: Float!) {\n project(projectId: $projectId, chainId: $chainId, version: $version) {\n projectId\n metadataUri\n handle\n createdAt\n logoUri\n name\n version\n suckerGroupId\n suckerGroup {\n projects {\n items {\n chainId\n balance\n tokenSupply\n projectId\n }\n }\n }\n }\n}\n\nquery Projects($where: projectFilter) {\n projects(where: $where) {\n items {\n projectId\n metadataUri\n handle\n createdAt\n suckerGroupId\n participants {\n totalCount\n }\n version\n }\n }\n}\n\nquery ProjectAccountingContext($chainId: Float!, $projectId: Float!, $version: Float!) {\n project(chainId: $chainId, projectId: $projectId, version: $version) {\n token\n decimals\n currency\n }\n}"];
35
+ export type DocumentType<TDocumentNode extends DocumentNode<any, any>> = TDocumentNode extends DocumentNode<infer TType, any> ? TType : never;
36
+ export {};
37
+ //# sourceMappingURL=gql.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gql.d.ts","sourceRoot":"","sources":["../../src/generated/gql.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,WAAW,CAAC;AACnC,OAAO,EAAE,iBAAiB,IAAI,YAAY,EAAE,MAAM,mCAAmC,CAAC;AAEtF;;;;;;;;;;GAUG;AACH,KAAK,SAAS,GAAG;IACb,m4BAAm4B,EAAE,OAAO,KAAK,CAAC,eAAe,CAAC;CACr6B,CAAC;AACF,QAAA,MAAM,SAAS,EAAE,SAEhB,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,wBAAgB,OAAO,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC;AAEjD;;GAEG;AACH,wBAAgB,OAAO,CAAC,MAAM,EAAE,m4BAAm4B,GAAG,CAAC,OAAO,SAAS,CAAC,CAAC,m4BAAm4B,CAAC,CAAC;AAM9zD,MAAM,MAAM,YAAY,CAAC,aAAa,SAAS,YAAY,CAAC,GAAG,EAAE,GAAG,CAAC,IAAI,aAAa,SAAS,YAAY,CAAG,MAAM,KAAK,EAAG,GAAG,CAAC,GAAI,KAAK,GAAI,KAAK,CAAC"}