@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.
- package/README.md +45 -0
- package/dist/components/NativeTokenValue.d.ts +13 -0
- package/dist/components/NativeTokenValue.d.ts.map +1 -0
- package/dist/contexts/JBChainContext/JBChainContext.d.ts +22 -0
- package/dist/contexts/JBChainContext/JBChainContext.d.ts.map +1 -0
- package/dist/contexts/JBContractContext/JBContractContext.d.ts +54 -0
- package/dist/contexts/JBContractContext/JBContractContext.d.ts.map +1 -0
- package/dist/contexts/JBDataHookContext/JBCurrentDataHookProvider.d.ts +9 -0
- package/dist/contexts/JBDataHookContext/JBCurrentDataHookProvider.d.ts.map +1 -0
- package/dist/contexts/JBDataHookContext/JBDataHookContext.d.ts +29 -0
- package/dist/contexts/JBDataHookContext/JBDataHookContext.d.ts.map +1 -0
- package/dist/contexts/JBProjectMetadataContext/JBProjectMetadataContext.d.ts +25 -0
- package/dist/contexts/JBProjectMetadataContext/JBProjectMetadataContext.d.ts.map +1 -0
- package/dist/contexts/JBProjectProvider/JBProjectProvider.d.ts +37 -0
- package/dist/contexts/JBProjectProvider/JBProjectProvider.d.ts.map +1 -0
- package/dist/contexts/JBRulesetContext/JBRulesetContext.d.ts +64 -0
- package/dist/contexts/JBRulesetContext/JBRulesetContext.d.ts.map +1 -0
- package/dist/contexts/JBTerminalContext/JBPrimaryNativeTerminalProvider.d.ts +9 -0
- package/dist/contexts/JBTerminalContext/JBPrimaryNativeTerminalProvider.d.ts.map +1 -0
- package/dist/contexts/JBTerminalContext/JBTerminalContext.d.ts +26 -0
- package/dist/contexts/JBTerminalContext/JBTerminalContext.d.ts.map +1 -0
- package/dist/contexts/JBTokenContext/JBTokenContext.d.ts +32 -0
- package/dist/contexts/JBTokenContext/JBTokenContext.d.ts.map +1 -0
- package/dist/contexts/types.d.ts +8 -0
- package/dist/contexts/types.d.ts.map +1 -0
- package/dist/generated/fragment-masking.d.ts +20 -0
- package/dist/generated/fragment-masking.d.ts.map +1 -0
- package/dist/generated/gql.d.ts +37 -0
- package/dist/generated/gql.d.ts.map +1 -0
- package/dist/generated/graphql.d.ts +6216 -0
- package/dist/generated/graphql.d.ts.map +1 -0
- package/dist/generated/index.d.ts +3 -0
- package/dist/generated/index.d.ts.map +1 -0
- package/dist/hooks/index.d.ts +17 -0
- package/dist/hooks/index.d.ts.map +1 -0
- package/dist/hooks/jb721Hook/helpers.d.ts +9 -0
- package/dist/hooks/jb721Hook/helpers.d.ts.map +1 -0
- package/dist/hooks/jb721Hook/helpers.test.d.ts +2 -0
- package/dist/hooks/jb721Hook/helpers.test.d.ts.map +1 -0
- package/dist/hooks/jb721Hook/use721HookMetadataId.d.ts +8 -0
- package/dist/hooks/jb721Hook/use721HookMetadataId.d.ts.map +1 -0
- package/dist/hooks/jb721Hook/useFind721DataHook.d.ts +5 -0
- package/dist/hooks/jb721Hook/useFind721DataHook.d.ts.map +1 -0
- package/dist/hooks/ruleset/useJBRuleset.d.ts +861 -0
- package/dist/hooks/ruleset/useJBRuleset.d.ts.map +1 -0
- package/dist/hooks/ruleset/useJBUpcomingRuleset.d.ts +10 -0
- package/dist/hooks/ruleset/useJBUpcomingRuleset.d.ts.map +1 -0
- package/dist/hooks/ruleset/useResolveDataHook.d.ts +21 -0
- package/dist/hooks/ruleset/useResolveDataHook.d.ts.map +1 -0
- package/dist/hooks/suckers/useSuckers.d.ts +189 -0
- package/dist/hooks/suckers/useSuckers.d.ts.map +1 -0
- package/dist/hooks/token/useNativeTokenSurplus.d.ts +148 -0
- package/dist/hooks/token/useNativeTokenSurplus.d.ts.map +1 -0
- package/dist/hooks/token/useNativeTokenSymbol.d.ts +8 -0
- package/dist/hooks/token/useNativeTokenSymbol.d.ts.map +1 -0
- package/dist/hooks/token/useSuckersCashOutQuote.d.ts +10 -0
- package/dist/hooks/token/useSuckersCashOutQuote.d.ts.map +1 -0
- package/dist/hooks/token/useSuckersNativeTokenBalance.d.ts +13 -0
- package/dist/hooks/token/useSuckersNativeTokenBalance.d.ts.map +1 -0
- package/dist/hooks/token/useSuckersNativeTokenSurplus.d.ts +14 -0
- package/dist/hooks/token/useSuckersNativeTokenSurplus.d.ts.map +1 -0
- package/dist/hooks/token/useSuckersTokenCashOutValue.d.ts +15 -0
- package/dist/hooks/token/useSuckersTokenCashOutValue.d.ts.map +1 -0
- package/dist/hooks/token/useSuckersUserTokenBalance.d.ts +14 -0
- package/dist/hooks/token/useSuckersUserTokenBalance.d.ts.map +1 -0
- package/dist/hooks/token/useTokenCashOutQuoteEth.d.ts +1890 -0
- package/dist/hooks/token/useTokenCashOutQuoteEth.d.ts.map +1 -0
- package/dist/hooks/useEtherPrice.d.ts +7 -0
- package/dist/hooks/useEtherPrice.d.ts.map +1 -0
- package/dist/hooks/useNetwork.d.ts +8 -0
- package/dist/hooks/useNetwork.d.ts.map +1 -0
- package/dist/hooks/usePreparePayMetadata.d.ts +14 -0
- package/dist/hooks/usePreparePayMetadata.d.ts.map +1 -0
- package/dist/index.d.ts +15 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +1676 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/bendystraw/getBendystrawUrl.d.ts +6 -0
- package/dist/lib/bendystraw/getBendystrawUrl.d.ts.map +1 -0
- package/dist/lib/bendystraw/useBendystrawQuery.d.ts +10 -0
- package/dist/lib/bendystraw/useBendystrawQuery.d.ts.map +1 -0
- package/dist/lib/relayr/constants.d.ts +3 -0
- package/dist/lib/relayr/constants.d.ts.map +1 -0
- package/dist/lib/relayr/hooks/useGetRelayrTxBundle.d.ts +10 -0
- package/dist/lib/relayr/hooks/useGetRelayrTxBundle.d.ts.map +1 -0
- package/dist/lib/relayr/hooks/useGetRelayrTxQuote.d.ts +150 -0
- package/dist/lib/relayr/hooks/useGetRelayrTxQuote.d.ts.map +1 -0
- package/dist/lib/relayr/hooks/useRequestRelayrQuote.d.ts +9 -0
- package/dist/lib/relayr/hooks/useRequestRelayrQuote.d.ts.map +1 -0
- package/dist/lib/relayr/hooks/useSendRelayrTx.d.ts +12 -0
- package/dist/lib/relayr/hooks/useSendRelayrTx.d.ts.map +1 -0
- package/dist/lib/relayr/hooks/useSignErc2771ForwardRequest.d.ts +13 -0
- package/dist/lib/relayr/hooks/useSignErc2771ForwardRequest.d.ts.map +1 -0
- package/dist/lib/relayr/index.d.ts +6 -0
- package/dist/lib/relayr/index.d.ts.map +1 -0
- package/dist/lib/relayr/types.d.ts +61 -0
- package/dist/lib/relayr/types.d.ts.map +1 -0
- package/package.json +53 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useJBRuleset.d.ts","sourceRoot":"","sources":["../../../src/hooks/ruleset/useJBRuleset.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,SAAS,EAET,eAAe,EACf,aAAa,EACb,gBAAgB,EACjB,MAAM,0BAA0B,CAAC;AAKlC,wBAAgB,YAAY,CAAC,EAC3B,SAAS,EACT,OAAO,GACR,EAAE;IACD,SAAS,EAAE,MAAM,GAAG,SAAS,CAAC;IAC9B,OAAO,EAAE,SAAS,GAAG,SAAS,CAAC;CAChC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAiDA"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { JBChainId, JBRulesetData, JBRulesetMetadata } from "@bananapus/nana-sdk-core";
|
|
2
|
+
export declare function useJBUpcomingRuleset({ projectId, chainId, }: {
|
|
3
|
+
projectId: bigint | undefined;
|
|
4
|
+
chainId: JBChainId | undefined;
|
|
5
|
+
}): {
|
|
6
|
+
ruleset: JBRulesetData | undefined;
|
|
7
|
+
rulesetMetadata: JBRulesetMetadata | undefined;
|
|
8
|
+
isLoading: boolean;
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=useJBUpcomingRuleset.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useJBUpcomingRuleset.d.ts","sourceRoot":"","sources":["../../../src/hooks/ruleset/useJBUpcomingRuleset.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,SAAS,EAET,aAAa,EACb,iBAAiB,EAIlB,MAAM,0BAA0B,CAAC;AAKlC,wBAAgB,oBAAoB,CAAC,EACnC,SAAS,EACT,OAAO,GACR,EAAE;IACD,SAAS,EAAE,MAAM,GAAG,SAAS,CAAC;IAC9B,OAAO,EAAE,SAAS,GAAG,SAAS,CAAC;CAChC,GAAG;IACF,OAAO,EAAE,aAAa,GAAG,SAAS,CAAC;IACnC,eAAe,EAAE,iBAAiB,GAAG,SAAS,CAAC;IAC/C,SAAS,EAAE,OAAO,CAAC;CACpB,CA6DA"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { JBChainId } from "@bananapus/nana-sdk-core";
|
|
2
|
+
/**
|
|
3
|
+
* Hook to resolve the actual dataHook address if it is the JBOmnichainDeployer address.
|
|
4
|
+
*
|
|
5
|
+
* @param dataHookAddress - The data hook address from the ruleset metadata
|
|
6
|
+
* @param projectId - The project ID
|
|
7
|
+
* @param chainId - The chain ID
|
|
8
|
+
* @returns The resolved data hook address
|
|
9
|
+
*/
|
|
10
|
+
export declare function useResolveDataHook({ dataHookAddress, projectId, chainId, rulesetId, }: {
|
|
11
|
+
dataHookAddress: `0x${string}` | undefined;
|
|
12
|
+
projectId: bigint | undefined;
|
|
13
|
+
chainId: JBChainId | undefined;
|
|
14
|
+
rulesetId: bigint | undefined;
|
|
15
|
+
}): {
|
|
16
|
+
resolvedDataHook: `0x${string}`;
|
|
17
|
+
dataHookIsOmnichainDeployer: boolean;
|
|
18
|
+
isLoading: boolean;
|
|
19
|
+
error: import("viem").ReadContractErrorType | null;
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=useResolveDataHook.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useResolveDataHook.d.ts","sourceRoot":"","sources":["../../../src/hooks/ruleset/useResolveDataHook.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EAKV,MAAM,0BAA0B,CAAC;AAMlC;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAAC,EACjC,eAAe,EACf,SAAS,EACT,OAAO,EACP,SAAS,GACV,EAAE;IACD,eAAe,EAAE,KAAK,MAAM,EAAE,GAAG,SAAS,CAAC;IAC3C,SAAS,EAAE,MAAM,GAAG,SAAS,CAAC;IAC9B,OAAO,EAAE,SAAS,GAAG,SAAS,CAAC;IAC/B,SAAS,EAAE,MAAM,GAAG,SAAS,CAAC;CAC/B;;;;;EA0FA"}
|
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
import { JBChainId } from "@bananapus/nana-sdk-core";
|
|
2
|
+
/**
|
|
3
|
+
* Return sucker pairs for the project ID in context.
|
|
4
|
+
*
|
|
5
|
+
*/
|
|
6
|
+
export declare function useSuckers(args?: {
|
|
7
|
+
enabled: boolean;
|
|
8
|
+
}): {
|
|
9
|
+
error: Error;
|
|
10
|
+
isError: true;
|
|
11
|
+
isPending: false;
|
|
12
|
+
isLoading: false;
|
|
13
|
+
isLoadingError: false;
|
|
14
|
+
isRefetchError: true;
|
|
15
|
+
isSuccess: false;
|
|
16
|
+
isPlaceholderData: false;
|
|
17
|
+
status: "error";
|
|
18
|
+
dataUpdatedAt: number;
|
|
19
|
+
errorUpdatedAt: number;
|
|
20
|
+
failureCount: number;
|
|
21
|
+
failureReason: Error | null;
|
|
22
|
+
errorUpdateCount: number;
|
|
23
|
+
isFetched: boolean;
|
|
24
|
+
isFetchedAfterMount: boolean;
|
|
25
|
+
isFetching: boolean;
|
|
26
|
+
isInitialLoading: boolean;
|
|
27
|
+
isPaused: boolean;
|
|
28
|
+
isRefetching: boolean;
|
|
29
|
+
isStale: boolean;
|
|
30
|
+
isEnabled: boolean;
|
|
31
|
+
refetch: (options?: import("@tanstack/query-core").RefetchOptions) => Promise<import("@tanstack/query-core").QueryObserverResult<import("src/generated/graphql").ProjectQuery, Error>>;
|
|
32
|
+
fetchStatus: import("@tanstack/query-core").FetchStatus;
|
|
33
|
+
promise: Promise<import("src/generated/graphql").ProjectQuery>;
|
|
34
|
+
data: {
|
|
35
|
+
peerChainId: JBChainId;
|
|
36
|
+
projectId: bigint;
|
|
37
|
+
}[] | undefined;
|
|
38
|
+
} | {
|
|
39
|
+
error: null;
|
|
40
|
+
isError: false;
|
|
41
|
+
isPending: false;
|
|
42
|
+
isLoading: false;
|
|
43
|
+
isLoadingError: false;
|
|
44
|
+
isRefetchError: false;
|
|
45
|
+
isSuccess: true;
|
|
46
|
+
isPlaceholderData: false;
|
|
47
|
+
status: "success";
|
|
48
|
+
dataUpdatedAt: number;
|
|
49
|
+
errorUpdatedAt: number;
|
|
50
|
+
failureCount: number;
|
|
51
|
+
failureReason: Error | null;
|
|
52
|
+
errorUpdateCount: number;
|
|
53
|
+
isFetched: boolean;
|
|
54
|
+
isFetchedAfterMount: boolean;
|
|
55
|
+
isFetching: boolean;
|
|
56
|
+
isInitialLoading: boolean;
|
|
57
|
+
isPaused: boolean;
|
|
58
|
+
isRefetching: boolean;
|
|
59
|
+
isStale: boolean;
|
|
60
|
+
isEnabled: boolean;
|
|
61
|
+
refetch: (options?: import("@tanstack/query-core").RefetchOptions) => Promise<import("@tanstack/query-core").QueryObserverResult<import("src/generated/graphql").ProjectQuery, Error>>;
|
|
62
|
+
fetchStatus: import("@tanstack/query-core").FetchStatus;
|
|
63
|
+
promise: Promise<import("src/generated/graphql").ProjectQuery>;
|
|
64
|
+
data: {
|
|
65
|
+
peerChainId: JBChainId;
|
|
66
|
+
projectId: bigint;
|
|
67
|
+
}[] | undefined;
|
|
68
|
+
} | {
|
|
69
|
+
error: Error;
|
|
70
|
+
isError: true;
|
|
71
|
+
isPending: false;
|
|
72
|
+
isLoading: false;
|
|
73
|
+
isLoadingError: true;
|
|
74
|
+
isRefetchError: false;
|
|
75
|
+
isSuccess: false;
|
|
76
|
+
isPlaceholderData: false;
|
|
77
|
+
status: "error";
|
|
78
|
+
dataUpdatedAt: number;
|
|
79
|
+
errorUpdatedAt: number;
|
|
80
|
+
failureCount: number;
|
|
81
|
+
failureReason: Error | null;
|
|
82
|
+
errorUpdateCount: number;
|
|
83
|
+
isFetched: boolean;
|
|
84
|
+
isFetchedAfterMount: boolean;
|
|
85
|
+
isFetching: boolean;
|
|
86
|
+
isInitialLoading: boolean;
|
|
87
|
+
isPaused: boolean;
|
|
88
|
+
isRefetching: boolean;
|
|
89
|
+
isStale: boolean;
|
|
90
|
+
isEnabled: boolean;
|
|
91
|
+
refetch: (options?: import("@tanstack/query-core").RefetchOptions) => Promise<import("@tanstack/query-core").QueryObserverResult<import("src/generated/graphql").ProjectQuery, Error>>;
|
|
92
|
+
fetchStatus: import("@tanstack/query-core").FetchStatus;
|
|
93
|
+
promise: Promise<import("src/generated/graphql").ProjectQuery>;
|
|
94
|
+
data: {
|
|
95
|
+
peerChainId: JBChainId;
|
|
96
|
+
projectId: bigint;
|
|
97
|
+
}[] | undefined;
|
|
98
|
+
} | {
|
|
99
|
+
error: null;
|
|
100
|
+
isError: false;
|
|
101
|
+
isPending: true;
|
|
102
|
+
isLoading: true;
|
|
103
|
+
isLoadingError: false;
|
|
104
|
+
isRefetchError: false;
|
|
105
|
+
isSuccess: false;
|
|
106
|
+
isPlaceholderData: false;
|
|
107
|
+
status: "pending";
|
|
108
|
+
dataUpdatedAt: number;
|
|
109
|
+
errorUpdatedAt: number;
|
|
110
|
+
failureCount: number;
|
|
111
|
+
failureReason: Error | null;
|
|
112
|
+
errorUpdateCount: number;
|
|
113
|
+
isFetched: boolean;
|
|
114
|
+
isFetchedAfterMount: boolean;
|
|
115
|
+
isFetching: boolean;
|
|
116
|
+
isInitialLoading: boolean;
|
|
117
|
+
isPaused: boolean;
|
|
118
|
+
isRefetching: boolean;
|
|
119
|
+
isStale: boolean;
|
|
120
|
+
isEnabled: boolean;
|
|
121
|
+
refetch: (options?: import("@tanstack/query-core").RefetchOptions) => Promise<import("@tanstack/query-core").QueryObserverResult<import("src/generated/graphql").ProjectQuery, Error>>;
|
|
122
|
+
fetchStatus: import("@tanstack/query-core").FetchStatus;
|
|
123
|
+
promise: Promise<import("src/generated/graphql").ProjectQuery>;
|
|
124
|
+
data: {
|
|
125
|
+
peerChainId: JBChainId;
|
|
126
|
+
projectId: bigint;
|
|
127
|
+
}[] | undefined;
|
|
128
|
+
} | {
|
|
129
|
+
error: null;
|
|
130
|
+
isError: false;
|
|
131
|
+
isPending: true;
|
|
132
|
+
isLoadingError: false;
|
|
133
|
+
isRefetchError: false;
|
|
134
|
+
isSuccess: false;
|
|
135
|
+
isPlaceholderData: false;
|
|
136
|
+
status: "pending";
|
|
137
|
+
dataUpdatedAt: number;
|
|
138
|
+
errorUpdatedAt: number;
|
|
139
|
+
failureCount: number;
|
|
140
|
+
failureReason: Error | null;
|
|
141
|
+
errorUpdateCount: number;
|
|
142
|
+
isFetched: boolean;
|
|
143
|
+
isFetchedAfterMount: boolean;
|
|
144
|
+
isFetching: boolean;
|
|
145
|
+
isLoading: boolean;
|
|
146
|
+
isInitialLoading: boolean;
|
|
147
|
+
isPaused: boolean;
|
|
148
|
+
isRefetching: boolean;
|
|
149
|
+
isStale: boolean;
|
|
150
|
+
isEnabled: boolean;
|
|
151
|
+
refetch: (options?: import("@tanstack/query-core").RefetchOptions) => Promise<import("@tanstack/query-core").QueryObserverResult<import("src/generated/graphql").ProjectQuery, Error>>;
|
|
152
|
+
fetchStatus: import("@tanstack/query-core").FetchStatus;
|
|
153
|
+
promise: Promise<import("src/generated/graphql").ProjectQuery>;
|
|
154
|
+
data: {
|
|
155
|
+
peerChainId: JBChainId;
|
|
156
|
+
projectId: bigint;
|
|
157
|
+
}[] | undefined;
|
|
158
|
+
} | {
|
|
159
|
+
isError: false;
|
|
160
|
+
error: null;
|
|
161
|
+
isPending: false;
|
|
162
|
+
isLoading: false;
|
|
163
|
+
isLoadingError: false;
|
|
164
|
+
isRefetchError: false;
|
|
165
|
+
isSuccess: true;
|
|
166
|
+
isPlaceholderData: true;
|
|
167
|
+
status: "success";
|
|
168
|
+
dataUpdatedAt: number;
|
|
169
|
+
errorUpdatedAt: number;
|
|
170
|
+
failureCount: number;
|
|
171
|
+
failureReason: Error | null;
|
|
172
|
+
errorUpdateCount: number;
|
|
173
|
+
isFetched: boolean;
|
|
174
|
+
isFetchedAfterMount: boolean;
|
|
175
|
+
isFetching: boolean;
|
|
176
|
+
isInitialLoading: boolean;
|
|
177
|
+
isPaused: boolean;
|
|
178
|
+
isRefetching: boolean;
|
|
179
|
+
isStale: boolean;
|
|
180
|
+
isEnabled: boolean;
|
|
181
|
+
refetch: (options?: import("@tanstack/query-core").RefetchOptions) => Promise<import("@tanstack/query-core").QueryObserverResult<import("src/generated/graphql").ProjectQuery, Error>>;
|
|
182
|
+
fetchStatus: import("@tanstack/query-core").FetchStatus;
|
|
183
|
+
promise: Promise<import("src/generated/graphql").ProjectQuery>;
|
|
184
|
+
data: {
|
|
185
|
+
peerChainId: JBChainId;
|
|
186
|
+
projectId: bigint;
|
|
187
|
+
}[] | undefined;
|
|
188
|
+
};
|
|
189
|
+
//# sourceMappingURL=useSuckers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useSuckers.d.ts","sourceRoot":"","sources":["../../../src/hooks/suckers/useSuckers.ts"],"names":[],"mappings":"AAEA,OAAO,EAAS,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAgC5D;;;GAGG;AACH,wBAAgB,UAAU,CAAC,IAAI,CAAC,EAAE;IAAE,OAAO,EAAE,OAAO,CAAA;CAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAmBf,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAAT,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAAT,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAAT,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAAT,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAAT,SAAS;;;EAa/C"}
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
import { JBChainId } from "@bananapus/nana-sdk-core";
|
|
2
|
+
/**
|
|
3
|
+
* Return the current surplus of JB Native token, from the project's primary native terminal.
|
|
4
|
+
*/
|
|
5
|
+
export declare function useNativeTokenSurplus({ chainId, }?: {
|
|
6
|
+
chainId?: JBChainId;
|
|
7
|
+
}): {
|
|
8
|
+
data: bigint;
|
|
9
|
+
error: import("viem").ReadContractErrorType;
|
|
10
|
+
isError: true;
|
|
11
|
+
isPending: false;
|
|
12
|
+
isLoading: false;
|
|
13
|
+
isLoadingError: false;
|
|
14
|
+
isRefetchError: true;
|
|
15
|
+
isSuccess: false;
|
|
16
|
+
isPlaceholderData: false;
|
|
17
|
+
status: "error";
|
|
18
|
+
dataUpdatedAt: number;
|
|
19
|
+
errorUpdatedAt: number;
|
|
20
|
+
failureCount: number;
|
|
21
|
+
failureReason: import("viem").ReadContractErrorType | null;
|
|
22
|
+
errorUpdateCount: number;
|
|
23
|
+
isFetched: boolean;
|
|
24
|
+
isFetchedAfterMount: boolean;
|
|
25
|
+
isFetching: boolean;
|
|
26
|
+
isInitialLoading: boolean;
|
|
27
|
+
isPaused: boolean;
|
|
28
|
+
isRefetching: boolean;
|
|
29
|
+
isStale: boolean;
|
|
30
|
+
isEnabled: boolean;
|
|
31
|
+
refetch: (options?: import("@tanstack/query-core").RefetchOptions) => Promise<import("@tanstack/query-core").QueryObserverResult<bigint, import("viem").ReadContractErrorType>>;
|
|
32
|
+
fetchStatus: import("@tanstack/query-core").FetchStatus;
|
|
33
|
+
promise: Promise<bigint>;
|
|
34
|
+
queryKey: import("@tanstack/query-core").QueryKey;
|
|
35
|
+
} | {
|
|
36
|
+
data: bigint;
|
|
37
|
+
error: null;
|
|
38
|
+
isError: false;
|
|
39
|
+
isPending: false;
|
|
40
|
+
isLoading: false;
|
|
41
|
+
isLoadingError: false;
|
|
42
|
+
isRefetchError: false;
|
|
43
|
+
isSuccess: true;
|
|
44
|
+
isPlaceholderData: false;
|
|
45
|
+
status: "success";
|
|
46
|
+
dataUpdatedAt: number;
|
|
47
|
+
errorUpdatedAt: number;
|
|
48
|
+
failureCount: number;
|
|
49
|
+
failureReason: import("viem").ReadContractErrorType | null;
|
|
50
|
+
errorUpdateCount: number;
|
|
51
|
+
isFetched: boolean;
|
|
52
|
+
isFetchedAfterMount: boolean;
|
|
53
|
+
isFetching: boolean;
|
|
54
|
+
isInitialLoading: boolean;
|
|
55
|
+
isPaused: boolean;
|
|
56
|
+
isRefetching: boolean;
|
|
57
|
+
isStale: boolean;
|
|
58
|
+
isEnabled: boolean;
|
|
59
|
+
refetch: (options?: import("@tanstack/query-core").RefetchOptions) => Promise<import("@tanstack/query-core").QueryObserverResult<bigint, import("viem").ReadContractErrorType>>;
|
|
60
|
+
fetchStatus: import("@tanstack/query-core").FetchStatus;
|
|
61
|
+
promise: Promise<bigint>;
|
|
62
|
+
queryKey: import("@tanstack/query-core").QueryKey;
|
|
63
|
+
} | {
|
|
64
|
+
data: undefined;
|
|
65
|
+
error: import("viem").ReadContractErrorType;
|
|
66
|
+
isError: true;
|
|
67
|
+
isPending: false;
|
|
68
|
+
isLoading: false;
|
|
69
|
+
isLoadingError: true;
|
|
70
|
+
isRefetchError: false;
|
|
71
|
+
isSuccess: false;
|
|
72
|
+
isPlaceholderData: false;
|
|
73
|
+
status: "error";
|
|
74
|
+
dataUpdatedAt: number;
|
|
75
|
+
errorUpdatedAt: number;
|
|
76
|
+
failureCount: number;
|
|
77
|
+
failureReason: import("viem").ReadContractErrorType | null;
|
|
78
|
+
errorUpdateCount: number;
|
|
79
|
+
isFetched: boolean;
|
|
80
|
+
isFetchedAfterMount: boolean;
|
|
81
|
+
isFetching: boolean;
|
|
82
|
+
isInitialLoading: boolean;
|
|
83
|
+
isPaused: boolean;
|
|
84
|
+
isRefetching: boolean;
|
|
85
|
+
isStale: boolean;
|
|
86
|
+
isEnabled: boolean;
|
|
87
|
+
refetch: (options?: import("@tanstack/query-core").RefetchOptions) => Promise<import("@tanstack/query-core").QueryObserverResult<bigint, import("viem").ReadContractErrorType>>;
|
|
88
|
+
fetchStatus: import("@tanstack/query-core").FetchStatus;
|
|
89
|
+
promise: Promise<bigint>;
|
|
90
|
+
queryKey: import("@tanstack/query-core").QueryKey;
|
|
91
|
+
} | {
|
|
92
|
+
data: undefined;
|
|
93
|
+
error: null;
|
|
94
|
+
isError: false;
|
|
95
|
+
isPending: true;
|
|
96
|
+
isLoadingError: false;
|
|
97
|
+
isRefetchError: false;
|
|
98
|
+
isSuccess: false;
|
|
99
|
+
isPlaceholderData: false;
|
|
100
|
+
status: "pending";
|
|
101
|
+
dataUpdatedAt: number;
|
|
102
|
+
errorUpdatedAt: number;
|
|
103
|
+
failureCount: number;
|
|
104
|
+
failureReason: import("viem").ReadContractErrorType | null;
|
|
105
|
+
errorUpdateCount: number;
|
|
106
|
+
isFetched: boolean;
|
|
107
|
+
isFetchedAfterMount: boolean;
|
|
108
|
+
isFetching: boolean;
|
|
109
|
+
isLoading: boolean;
|
|
110
|
+
isInitialLoading: boolean;
|
|
111
|
+
isPaused: boolean;
|
|
112
|
+
isRefetching: boolean;
|
|
113
|
+
isStale: boolean;
|
|
114
|
+
isEnabled: boolean;
|
|
115
|
+
refetch: (options?: import("@tanstack/query-core").RefetchOptions) => Promise<import("@tanstack/query-core").QueryObserverResult<bigint, import("viem").ReadContractErrorType>>;
|
|
116
|
+
fetchStatus: import("@tanstack/query-core").FetchStatus;
|
|
117
|
+
promise: Promise<bigint>;
|
|
118
|
+
queryKey: import("@tanstack/query-core").QueryKey;
|
|
119
|
+
} | {
|
|
120
|
+
data: bigint;
|
|
121
|
+
isError: false;
|
|
122
|
+
error: null;
|
|
123
|
+
isPending: false;
|
|
124
|
+
isLoading: false;
|
|
125
|
+
isLoadingError: false;
|
|
126
|
+
isRefetchError: false;
|
|
127
|
+
isSuccess: true;
|
|
128
|
+
isPlaceholderData: true;
|
|
129
|
+
status: "success";
|
|
130
|
+
dataUpdatedAt: number;
|
|
131
|
+
errorUpdatedAt: number;
|
|
132
|
+
failureCount: number;
|
|
133
|
+
failureReason: import("viem").ReadContractErrorType | null;
|
|
134
|
+
errorUpdateCount: number;
|
|
135
|
+
isFetched: boolean;
|
|
136
|
+
isFetchedAfterMount: boolean;
|
|
137
|
+
isFetching: boolean;
|
|
138
|
+
isInitialLoading: boolean;
|
|
139
|
+
isPaused: boolean;
|
|
140
|
+
isRefetching: boolean;
|
|
141
|
+
isStale: boolean;
|
|
142
|
+
isEnabled: boolean;
|
|
143
|
+
refetch: (options?: import("@tanstack/query-core").RefetchOptions) => Promise<import("@tanstack/query-core").QueryObserverResult<bigint, import("viem").ReadContractErrorType>>;
|
|
144
|
+
fetchStatus: import("@tanstack/query-core").FetchStatus;
|
|
145
|
+
promise: Promise<bigint>;
|
|
146
|
+
queryKey: import("@tanstack/query-core").QueryKey;
|
|
147
|
+
};
|
|
148
|
+
//# sourceMappingURL=useNativeTokenSurplus.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useNativeTokenSurplus.d.ts","sourceRoot":"","sources":["../../../src/hooks/token/useNativeTokenSurplus.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,SAAS,EAKV,MAAM,0BAA0B,CAAC;AAKlC;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,EACpC,OAAO,GACR,GAAE;IAAE,OAAO,CAAC,EAAE,SAAS,CAAA;CAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA6C9B"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { JBChainId } from "@bananapus/nana-sdk-core";
|
|
2
|
+
/**
|
|
3
|
+
* Return the human-readable token symbol for the chain set in JBChainContext.
|
|
4
|
+
*
|
|
5
|
+
* Depends on JBChainContext.
|
|
6
|
+
*/
|
|
7
|
+
export declare function useNativeTokenSymbol(chainId?: JBChainId): string;
|
|
8
|
+
//# sourceMappingURL=useNativeTokenSymbol.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useNativeTokenSymbol.d.ts","sourceRoot":"","sources":["../../../src/hooks/token/useNativeTokenSymbol.ts"],"names":[],"mappings":"AAAA,OAAO,EAA0C,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAG7F;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,CAAC,EAAE,SAAS,UAOvD"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Return the amount of ETH (wei) received from cashing out [tokenAmountWei] project tokens, across all suckers.
|
|
3
|
+
* @param tokenAmountWei the amount of tokens to cash out.
|
|
4
|
+
*/
|
|
5
|
+
export declare function useSuckersCashOutQuote(tokenAmountWei: bigint): {
|
|
6
|
+
data: bigint;
|
|
7
|
+
isLoading: boolean;
|
|
8
|
+
errors: (Error | null)[];
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=useSuckersCashOutQuote.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useSuckersCashOutQuote.d.ts","sourceRoot":"","sources":["../../../src/hooks/token/useSuckersCashOutQuote.ts"],"names":[],"mappings":"AAiBA;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,cAAc,EAAE,MAAM;;;;EA2C5D"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Return the current surplus of JB Native token across each sucker on all chains for the current project.
|
|
3
|
+
*/
|
|
4
|
+
export declare function useSuckersNativeTokenBalance(): {
|
|
5
|
+
isLoading: boolean;
|
|
6
|
+
isError: boolean;
|
|
7
|
+
data: {
|
|
8
|
+
balance: bigint;
|
|
9
|
+
chainId: number;
|
|
10
|
+
projectId: bigint;
|
|
11
|
+
}[] | undefined;
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=useSuckersNativeTokenBalance.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useSuckersNativeTokenBalance.d.ts","sourceRoot":"","sources":["../../../src/hooks/token/useSuckersNativeTokenBalance.ts"],"names":[],"mappings":"AAaA;;GAEG;AACH,wBAAgB,4BAA4B;;;UA+CpC;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAA;KAAE,EAAE,GACzD,SAAS;EAEhB"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { JBChainId } from "@bananapus/nana-sdk-core";
|
|
2
|
+
/**
|
|
3
|
+
* Return the current surplus of JB Native token across each sucker on all chains for the current project.
|
|
4
|
+
*/
|
|
5
|
+
export declare function useSuckersNativeTokenSurplus(): {
|
|
6
|
+
isLoading: boolean;
|
|
7
|
+
isError: boolean;
|
|
8
|
+
data: {
|
|
9
|
+
surplus: bigint;
|
|
10
|
+
chainId: JBChainId;
|
|
11
|
+
projectId: bigint;
|
|
12
|
+
}[] | undefined;
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=useSuckersNativeTokenSurplus.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useSuckersNativeTokenSurplus.d.ts","sourceRoot":"","sources":["../../../src/hooks/token/useSuckersNativeTokenSurplus.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,SAAS,EAKV,MAAM,0BAA0B,CAAC;AAQlC;;GAEG;AACH,wBAAgB,4BAA4B;;;UA8EpC;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,SAAS,CAAC;QAAC,SAAS,EAAE,MAAM,CAAA;KAAE,EAAE,GAC5D,SAAS;EAEhB"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Return the current cashout value of one project token.
|
|
3
|
+
*/
|
|
4
|
+
export declare function useSuckersTokenCashOutValue({ targetCurrency }: {
|
|
5
|
+
targetCurrency: "eth" | "usd";
|
|
6
|
+
}): {
|
|
7
|
+
loading: boolean;
|
|
8
|
+
data: undefined;
|
|
9
|
+
errors?: undefined;
|
|
10
|
+
} | {
|
|
11
|
+
loading: false;
|
|
12
|
+
data: number;
|
|
13
|
+
errors: (Error | null)[];
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=useSuckersTokenCashOutValue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useSuckersTokenCashOutValue.d.ts","sourceRoot":"","sources":["../../../src/hooks/token/useSuckersTokenCashOutValue.ts"],"names":[],"mappings":"AAKA;;GAEG;AACH,wBAAgB,2BAA2B,CAAC,EAAE,cAAc,EAAE,EAAE;IAAE,cAAc,EAAE,KAAK,GAAG,KAAK,CAAA;CAAE;;;;;;;;EAoBhG"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { JBChainId, JBProjectToken } from "@bananapus/nana-sdk-core";
|
|
2
|
+
/**
|
|
3
|
+
* Return the user's project token balance across each sucker on all chains for the current project.
|
|
4
|
+
*/
|
|
5
|
+
export declare function useSuckersUserTokenBalance(): {
|
|
6
|
+
isLoading: boolean;
|
|
7
|
+
isError: boolean;
|
|
8
|
+
data: {
|
|
9
|
+
balance: JBProjectToken;
|
|
10
|
+
chainId: JBChainId;
|
|
11
|
+
projectId: bigint;
|
|
12
|
+
}[] | undefined;
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=useSuckersUserTokenBalance.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useSuckersUserTokenBalance.d.ts","sourceRoot":"","sources":["../../../src/hooks/token/useSuckersUserTokenBalance.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAmB,cAAc,EAAe,MAAM,0BAA0B,CAAC;AAQnG;;GAEG;AACH,wBAAgB,0BAA0B;;;UA0ElC;QAAE,OAAO,EAAE,cAAc,CAAC;QAAC,OAAO,EAAE,SAAS,CAAC;QAAC,SAAS,EAAE,MAAM,CAAA;KAAE,EAAE,GACpE,SAAS;EAEhB"}
|