@use-glyph/sdk-react 1.0.24 → 1.0.27

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.
@@ -0,0 +1 @@
1
+ export default function BaseIcon(props: React.SVGProps<SVGSVGElement>): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ declare function DelegatedNFTChip(props: React.SVGProps<SVGSVGElement>): import("react/jsx-runtime").JSX.Element;
2
+ export default DelegatedNFTChip;
@@ -0,0 +1,2 @@
1
+ declare function LinkedNFTChip(props: React.SVGProps<SVGSVGElement>): JSX.Element;
2
+ export default LinkedNFTChip;
@@ -0,0 +1,41 @@
1
+ export type GlyphOwnedToken = {
2
+ id: number;
3
+ qty: number;
4
+ owner: string;
5
+ delegated: boolean;
6
+ linked: boolean;
7
+ nodeId: string;
8
+ delegatedNodeId: string;
9
+ };
10
+ export type GlyphDelegationChainItem = {
11
+ account: string;
12
+ contractAddress: string;
13
+ tokenIds: number[];
14
+ source: "root" | "V1" | "V2" | "warm";
15
+ linked: boolean;
16
+ nodeId: string;
17
+ delegatedNodeId: string;
18
+ };
19
+ export type GlyphOwnershipCheckRequest = {
20
+ contractAddress: string;
21
+ chainId?: number;
22
+ quantity?: number;
23
+ tokenIdRange?: string;
24
+ includeDelegates?: boolean;
25
+ };
26
+ export type GlyphTokenGateResult = {
27
+ result: boolean;
28
+ error?: string;
29
+ };
30
+ export type GlyphOwnershipCheckResult = GlyphTokenGateResult & {
31
+ tokens: GlyphOwnedToken[];
32
+ delegationChain: GlyphDelegationChainItem[];
33
+ };
34
+ export declare function useGlyphTokenGate(): {
35
+ checkTokenGate: (req: GlyphOwnershipCheckRequest) => Promise<GlyphTokenGateResult>;
36
+ isTokenGateLoading: boolean;
37
+ };
38
+ export declare function useGlyphOwnershipCheck(): {
39
+ checkOwnership: (req: GlyphOwnershipCheckRequest) => Promise<GlyphOwnershipCheckResult>;
40
+ isOwnershipCheckLoading: boolean;
41
+ };
@@ -6,6 +6,7 @@ import { GlyphProvider } from './context/GlyphProvider';
6
6
  export { useBalances } from './hooks/useBalances';
7
7
  export { useGlyph } from './hooks/useGlyph';
8
8
  export { useGlyphFunding, type GLYPH_FUND_STATUS } from './hooks/useGlyphFunding';
9
+ export { useGlyphTokenGate, useGlyphOwnershipCheck, type GlyphOwnershipCheckRequest, type GlyphTokenGateResult, type GlyphOwnershipCheckResult } from './hooks/useGlyphTokenGate';
9
10
  export { useGlyphView } from './hooks/useGlyphView';
10
11
  export { glyphConnectorDetails } from './lib/constants';
11
12
  export { GlyphViewType as GlyphView, StrategyType, WalletClientType } from './types';
@@ -36,6 +36,7 @@ export declare enum SendView {
36
36
  END = "send-end"
37
37
  }
38
38
  export declare const CHAIN_ICONS: Record<number, React.FC<React.SVGProps<SVGSVGElement>>>;
39
+ export declare const CHAIN_NAMES: Map<number, string>;
39
40
  export declare const TOKEN_LOGOS: Record<string, React.FC<React.SVGProps<SVGSVGElement>>>;
40
41
  export declare const TESTNET_CLASS = "gw-grayscale";
41
42
  export declare const IS_TESTNET_CHAIN: Map<number, boolean>;
@@ -66,10 +66,17 @@ export type GlyphWidgetNFTBalancesItem = {
66
66
  name: string;
67
67
  symbol: string;
68
68
  image: string | null;
69
+ contractImage: string | null;
69
70
  items: {
70
71
  tokenId: string;
72
+ symbol: string;
71
73
  name: string;
74
+ tokenName: string;
75
+ tokenImage: string;
72
76
  balance: string;
77
+ owner: string;
78
+ fromLinked: boolean;
79
+ fromDelegated: boolean;
73
80
  image?: {
74
81
  cachedUrl: string;
75
82
  thumbnailUrl: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@use-glyph/sdk-react",
3
- "version": "1.0.24",
3
+ "version": "1.0.27",
4
4
  "type": "module",
5
5
  "license": "GLYPH-1.0",
6
6
  "sideEffects": false,