@liberfi.io/ui-channels 0.1.278 → 0.1.280

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.
@@ -223,4 +223,4 @@ interface IChannelsClient {
223
223
  getXAuthorizeUrl(returnUrl?: string): Promise<string>;
224
224
  }
225
225
 
226
- export type { BaseChannelEvent as B, ChannelEvent as C, IChannelsClient as I, ListChannelEventsOptions as L, UpdateChannelOptions as U, XEligibilityInfo as X, Channel as a, ChannelSource as b, ChannelsList as c, ChannelEventsList as d, ListChannelsOptions as e, CreateChannelOptions as f, UpdateChannelSourcesOptions as g, ChannelTradeEvent as h, ChannelSink as i, ChannelSourceOption as j };
226
+ export type { BaseChannelEvent as B, ChannelEvent as C, IChannelsClient as I, ListChannelsOptions as L, UpdateChannelOptions as U, XEligibilityInfo as X, Channel as a, ChannelSource as b, ChannelsList as c, ListChannelEventsOptions as d, ChannelEventsList as e, CreateChannelOptions as f, UpdateChannelSourcesOptions as g, ChannelSink as h, ChannelSourceOption as i, ChannelTradeEvent as j };
@@ -223,4 +223,4 @@ interface IChannelsClient {
223
223
  getXAuthorizeUrl(returnUrl?: string): Promise<string>;
224
224
  }
225
225
 
226
- export type { BaseChannelEvent as B, ChannelEvent as C, IChannelsClient as I, ListChannelEventsOptions as L, UpdateChannelOptions as U, XEligibilityInfo as X, Channel as a, ChannelSource as b, ChannelsList as c, ChannelEventsList as d, ListChannelsOptions as e, CreateChannelOptions as f, UpdateChannelSourcesOptions as g, ChannelTradeEvent as h, ChannelSink as i, ChannelSourceOption as j };
226
+ export type { BaseChannelEvent as B, ChannelEvent as C, IChannelsClient as I, ListChannelsOptions as L, UpdateChannelOptions as U, XEligibilityInfo as X, Channel as a, ChannelSource as b, ChannelsList as c, ListChannelEventsOptions as d, ChannelEventsList as e, CreateChannelOptions as f, UpdateChannelSourcesOptions as g, ChannelSink as h, ChannelSourceOption as i, ChannelTradeEvent as j };
@@ -1,4 +1,4 @@
1
- import { I as IChannelsClient, a as Channel, e as ListChannelsOptions, c as ChannelsList, L as ListChannelEventsOptions, d as ChannelEventsList, f as CreateChannelOptions, U as UpdateChannelOptions, g as UpdateChannelSourcesOptions, b as ChannelSource, X as XEligibilityInfo } from '../api-CKXPYs9e.mjs';
1
+ import { I as IChannelsClient, a as Channel, L as ListChannelsOptions, c as ChannelsList, d as ListChannelEventsOptions, e as ChannelEventsList, f as CreateChannelOptions, U as UpdateChannelOptions, g as UpdateChannelSourcesOptions, b as ChannelSource, X as XEligibilityInfo } from '../api-CHbFBuXe.mjs';
2
2
  import '@liberfi.io/types';
3
3
 
4
4
  interface ChannelsClientOptions {
@@ -1,4 +1,4 @@
1
- import { I as IChannelsClient, a as Channel, e as ListChannelsOptions, c as ChannelsList, L as ListChannelEventsOptions, d as ChannelEventsList, f as CreateChannelOptions, U as UpdateChannelOptions, g as UpdateChannelSourcesOptions, b as ChannelSource, X as XEligibilityInfo } from '../api-CKXPYs9e.js';
1
+ import { I as IChannelsClient, a as Channel, L as ListChannelsOptions, c as ChannelsList, d as ListChannelEventsOptions, e as ChannelEventsList, f as CreateChannelOptions, U as UpdateChannelOptions, g as UpdateChannelSourcesOptions, b as ChannelSource, X as XEligibilityInfo } from '../api-CHbFBuXe.js';
2
2
  import '@liberfi.io/types';
3
3
 
4
4
  interface ChannelsClientOptions {
package/dist/index.d.mts CHANGED
@@ -1,7 +1,7 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import { z } from 'zod';
3
- import { C as ChannelEvent, a as Channel, b as ChannelSource, c as ChannelsList, I as IChannelsClient, L as ListChannelEventsOptions, d as ChannelEventsList, e as ListChannelsOptions, f as CreateChannelOptions, U as UpdateChannelOptions, g as UpdateChannelSourcesOptions, X as XEligibilityInfo } from './api-CKXPYs9e.mjs';
4
- export { B as BaseChannelEvent, i as ChannelSink, j as ChannelSourceOption, h as ChannelTradeEvent } from './api-CKXPYs9e.mjs';
3
+ import { C as ChannelEvent, a as Channel, b as ChannelSource, c as ChannelsList, I as IChannelsClient, L as ListChannelsOptions, d as ListChannelEventsOptions, e as ChannelEventsList, X as XEligibilityInfo, f as CreateChannelOptions, U as UpdateChannelOptions, g as UpdateChannelSourcesOptions } from './api-CHbFBuXe.mjs';
4
+ export { B as BaseChannelEvent, h as ChannelSink, i as ChannelSourceOption, j as ChannelTradeEvent } from './api-CHbFBuXe.mjs';
5
5
  import * as _liberfi_io_wallet_connector from '@liberfi.io/wallet-connector';
6
6
  import * as _tanstack_react_query from '@tanstack/react-query';
7
7
  import { UseQueryOptions, UseInfiniteQueryOptions, InfiniteData, useInfiniteQuery, UseMutationOptions } from '@tanstack/react-query';
@@ -238,6 +238,14 @@ type CheckEligibilityWidgetProps = {
238
238
  */
239
239
  declare function CheckEligibilityWidget({ onContinue, onCancel, minFollowers, minAccountAge, returnUrl, className, }: CheckEligibilityWidgetProps): react_jsx_runtime.JSX.Element;
240
240
 
241
+ interface EligibilityCoordinator {
242
+ authorized(): void;
243
+ subscribeAuthorized(listener: () => void): () => void;
244
+ }
245
+ /** Create a typed OAuth completion channel without a global event bus. */
246
+ declare function createEligibilityCoordinator(): EligibilityCoordinator;
247
+ declare const eligibilityCoordinator: EligibilityCoordinator;
248
+
241
249
  type PresetAvatar = {
242
250
  id: string;
243
251
  url: string;
@@ -1203,10 +1211,51 @@ interface ChannelsContextValue {
1203
1211
  }
1204
1212
  declare const ChannelsContext: react.Context<ChannelsContextValue>;
1205
1213
 
1214
+ type ChannelsCredential = {
1215
+ getToken(): Promise<string | null | undefined>;
1216
+ };
1217
+ declare class ChannelsCredentialError extends Error {
1218
+ constructor(message?: string);
1219
+ }
1220
+ interface ChannelsQueryPort {
1221
+ get(credential: ChannelsCredential, id: string): Promise<Channel>;
1222
+ list(credential: ChannelsCredential, options?: ListChannelsOptions): Promise<ChannelsList>;
1223
+ listMine(credential: ChannelsCredential, options?: ListChannelsOptions): Promise<ChannelsList>;
1224
+ listSubscribed(credential: ChannelsCredential, options?: ListChannelsOptions): Promise<ChannelsList>;
1225
+ events(credential: ChannelsCredential, channelId: string, options?: ListChannelEventsOptions): Promise<ChannelEventsList>;
1226
+ sources(credential: ChannelsCredential, channelId: string): Promise<ChannelSource[]>;
1227
+ checkXEligibility(credential: ChannelsCredential): Promise<XEligibilityInfo>;
1228
+ getXAuthorizeUrl(credential: ChannelsCredential, returnUrl?: string): Promise<string>;
1229
+ }
1230
+ interface ChannelsMutationPort {
1231
+ subscribe(credential: ChannelsCredential, id: string): Promise<void>;
1232
+ unsubscribe(credential: ChannelsCredential, id: string): Promise<void>;
1233
+ create(credential: ChannelsCredential, options: CreateChannelOptions): Promise<Channel>;
1234
+ update(credential: ChannelsCredential, options: UpdateChannelOptions): Promise<Channel>;
1235
+ updateSources(credential: ChannelsCredential, options: UpdateChannelSourcesOptions): Promise<ChannelSource[]>;
1236
+ }
1237
+ interface ChannelsSubscriptionPort {
1238
+ events(credential: ChannelsCredential, channelId: string, callback: (event: ChannelEvent) => void): {
1239
+ unsubscribe(): void;
1240
+ };
1241
+ }
1242
+ interface ChannelsAdapter {
1243
+ query: ChannelsQueryPort;
1244
+ mutation: ChannelsMutationPort;
1245
+ subscription: ChannelsSubscriptionPort;
1246
+ }
1247
+ declare function createInMemoryChannelsAdapter(seed?: {
1248
+ channel?: Channel;
1249
+ }): ChannelsAdapter;
1250
+
1251
+ declare const ChannelsAdapterContext: react.Context<ChannelsAdapter | null>;
1252
+
1206
1253
  type ChannelsProviderProps = PropsWithChildren<{
1207
1254
  client: IChannelsClient;
1255
+ credential?: ChannelsCredential;
1256
+ adapter?: ChannelsAdapter;
1208
1257
  }>;
1209
- declare function ChannelsProvider({ client, children }: ChannelsProviderProps): react_jsx_runtime.JSX.Element;
1258
+ declare function ChannelsProvider({ client, credential, adapter, children, }: ChannelsProviderProps): react_jsx_runtime.JSX.Element;
1210
1259
 
1211
1260
  type UseChannelEventsQueryParams = ListChannelEventsOptions;
1212
1261
  declare function channelEventsQueryKey(channelId: string, params: UseChannelEventsQueryParams): string[];
@@ -1224,6 +1273,8 @@ declare function useChannelsContext(): ChannelsContextValue;
1224
1273
 
1225
1274
  declare function useChannelsClient(): IChannelsClient;
1226
1275
 
1276
+ declare function useChannelsAdapter(): ChannelsAdapter;
1277
+
1227
1278
  interface UseChannelsListQueryParams extends Omit<ListChannelsOptions, "chain"> {
1228
1279
  chain?: Chain;
1229
1280
  }
@@ -1283,4 +1334,6 @@ declare function useXAuthorizeUrlQuery(params?: {
1283
1334
 
1284
1335
  declare function parseWalletsText(value: string): Array<Partial<WalletValues>>;
1285
1336
 
1286
- export { ActivityFeedUI, type ActivityFeedUIProps, ActivityFeedWidget, type ActivityFeedWidgetProps, BaseFormUI, type BaseFormUIProps, type BaseFormValues, type BotConnectionStatus, Channel, ChannelAttributes, type ChannelAttributesProps, ChannelBaseInfo, type ChannelBaseInfoProps, ChannelBasicInfoUI, type ChannelBasicInfoUIProps, ChannelBasicInfoWidget, type ChannelBasicInfoWidgetProps, type ChannelCardData, type ChannelDetailData, ChannelDetailNewUI, type ChannelDetailNewUIProps, ChannelDetailNewWidget, type ChannelDetailNewWidgetProps, type ChannelDetailPageProps, type ChannelDetailStats, ChannelDetailUI, type ChannelDetailUIProps, ChannelDetailWidget, type ChannelDetailWidgetProps, ChannelEditButton, type ChannelEditButtonProps, ChannelEvent, type ChannelEventRowProps, ChannelEventsList, type ChannelHomePageProps, ChannelSource, ChannelStats, type ChannelStatsProps, ChannelSubscribeButton, type ChannelSubscribeButtonProps, ChannelsContext, type ChannelsContextValue, ChannelsDetailPage, ChannelsEmptyUI, type ChannelsEmptyUIProps, ChannelsHomePage, ChannelsList, ChannelsProvider, type ChannelsProviderProps, ChannelsSkeletonUI, type ChannelsSkeletonUIProps, ChannelsUI, type ChannelsUIProps, CheckEligibilityUI, type CheckEligibilityUIProps, CheckEligibilityWidget, type CheckEligibilityWidgetProps, CreateChannelOptions, CreateChannelWidget, type CreateChannelWidgetProps, type EligibilityCheckItem, type EligibilityCheckStatus, FindChannelUI, type FindChannelUIProps, FindChannelWidget, type FindChannelWidgetProps, IChannelsClient, type KeyMetric, ListChannelEventsOptions, ListChannelsOptions, type MonitoredWallet, MyChannelsWidget, type MyChannelsWidgetProps, MySubscribeUI, type MySubscribeUIProps, MySubscribeWidget, type MySubscribeWidgetProps, type PresetAvatar, SocialBotsUI, type SocialBotsUIProps, SocialBotsWidget, type SocialBotsWidgetProps, SocialsFormUI, type SocialsFormUIProps, type SortDirection, type SortField, type Step, type StepStatus, StepperUI, type StepperUIProps, type SubscribedChannelData, SubscribedChannelsWidget, type SubscribedChannelsWidgetProps, TabContainerUI, type TabContainerUIProps, TabContainerWidget, type TabContainerWidgetProps, type TabType, type TimeFilter, type Token, TokensListUI, type TokensListUIProps, TokensListWidget, type TokensListWidgetProps, type TradeEvent, type Trader, TradersTableUI, type TradersTableUIProps, TradersTableWidget, type TradersTableWidgetProps, TrendingChannelsWidget, type TrendingChannelsWidgetProps, type UpdateChannelFormType, UpdateChannelFormUI, type UpdateChannelFormUIProps, UpdateChannelOptions, UpdateChannelSourcesOptions, UpdateChannelWidget, type UpdateChannelWidgetProps, type UseChannelBasicInfoScriptParams, type UseChannelBasicInfoScriptResult, type UseChannelEventsQueryParams, type UseChannelsListQueryParams, type UseCheckEligibilityScriptParams, type UseCheckEligibilityScriptResult, type UseCreateChannelMutationParams, type UseFindChannelScriptParams, type UseMyChannelsListQueryParams, type UseMySubscribeScriptParams, type UseSocialBotsScriptParams, type UseSocialBotsScriptResult, type UseSubscribedChannelsListQueryParams, type UseUpdateChannelMutationParams, type UseUpdateChannelSourcesMutationParams, type UseWalletImportScriptParams, type UseWalletImportScriptResult, WalletImportUI, type WalletImportUIProps, WalletImportWidget, type WalletImportWidgetProps, type WalletValues, WalletsFormUI, type WalletsFormUIProps, type WalletsFormValues, WalletsListUI, type WalletsListUIProps, type XAccountInfo, XEligibilityInfo, baseFormSchema, channelEventsInfiniteQueryKey, channelEventsQueryKey, channelQueryKey, channelSourcesQueryKey, channelsListQueryKey, createChannel, fetchChannel, fetchChannelEvents, fetchChannelSources, fetchChannelsList, fetchMyChannelsList, fetchSubscribedChannelsList, fetchXAuthorizeUrl, fetchXEligibility, myChannelsListQueryKey, parseWalletsText, subscribeChannel, subscribedChannelsListQueryKey, unsubscribeChannel, updateChannel, updateChannelSources, useChannelBasicInfoScript, useChannelDetail, useChannelEventsInfiniteQuery, useChannelEventsQuery, useChannelQuery, useChannelSourcesQuery, useChannelsClient, useChannelsContext, useChannelsListQuery, useCheckEligibilityScript, useCreateChannelMutation, useFindChannelScript, useMyChannels, useMyChannelsListQuery, useMySubscribeScript, useSocialBotsScript, useSubscribeChannelMutation, useSubscribedChannels, useSubscribedChannelsListQuery, useTrendingChannels, useUnsubscribeChannelMutation, useUpdateBaseForm, useUpdateChannelMutation, useUpdateChannelSourcesMutation, useUpdateWalletsForm, useWalletImportScript, useXAuthorizeUrlQuery, useXEligibilityQuery, walletSchema, walletsFormSchema, xAuthorizeUrlQueryKey, xEligibilityQueryKey };
1337
+ declare function createClientChannelsAdapter(client: IChannelsClient, credential: ChannelsCredential): ChannelsAdapter;
1338
+
1339
+ export { ActivityFeedUI, type ActivityFeedUIProps, ActivityFeedWidget, type ActivityFeedWidgetProps, BaseFormUI, type BaseFormUIProps, type BaseFormValues, type BotConnectionStatus, Channel, ChannelAttributes, type ChannelAttributesProps, ChannelBaseInfo, type ChannelBaseInfoProps, ChannelBasicInfoUI, type ChannelBasicInfoUIProps, ChannelBasicInfoWidget, type ChannelBasicInfoWidgetProps, type ChannelCardData, type ChannelDetailData, ChannelDetailNewUI, type ChannelDetailNewUIProps, ChannelDetailNewWidget, type ChannelDetailNewWidgetProps, type ChannelDetailPageProps, type ChannelDetailStats, ChannelDetailUI, type ChannelDetailUIProps, ChannelDetailWidget, type ChannelDetailWidgetProps, ChannelEditButton, type ChannelEditButtonProps, ChannelEvent, type ChannelEventRowProps, ChannelEventsList, type ChannelHomePageProps, ChannelSource, ChannelStats, type ChannelStatsProps, ChannelSubscribeButton, type ChannelSubscribeButtonProps, type ChannelsAdapter, ChannelsAdapterContext, ChannelsContext, type ChannelsContextValue, type ChannelsCredential, ChannelsCredentialError, ChannelsDetailPage, ChannelsEmptyUI, type ChannelsEmptyUIProps, ChannelsHomePage, ChannelsList, ChannelsProvider, type ChannelsProviderProps, ChannelsSkeletonUI, type ChannelsSkeletonUIProps, ChannelsUI, type ChannelsUIProps, CheckEligibilityUI, type CheckEligibilityUIProps, CheckEligibilityWidget, type CheckEligibilityWidgetProps, CreateChannelOptions, CreateChannelWidget, type CreateChannelWidgetProps, type EligibilityCheckItem, type EligibilityCheckStatus, type EligibilityCoordinator, FindChannelUI, type FindChannelUIProps, FindChannelWidget, type FindChannelWidgetProps, IChannelsClient, type KeyMetric, ListChannelEventsOptions, ListChannelsOptions, type MonitoredWallet, MyChannelsWidget, type MyChannelsWidgetProps, MySubscribeUI, type MySubscribeUIProps, MySubscribeWidget, type MySubscribeWidgetProps, type PresetAvatar, SocialBotsUI, type SocialBotsUIProps, SocialBotsWidget, type SocialBotsWidgetProps, SocialsFormUI, type SocialsFormUIProps, type SortDirection, type SortField, type Step, type StepStatus, StepperUI, type StepperUIProps, type SubscribedChannelData, SubscribedChannelsWidget, type SubscribedChannelsWidgetProps, TabContainerUI, type TabContainerUIProps, TabContainerWidget, type TabContainerWidgetProps, type TabType, type TimeFilter, type Token, TokensListUI, type TokensListUIProps, TokensListWidget, type TokensListWidgetProps, type TradeEvent, type Trader, TradersTableUI, type TradersTableUIProps, TradersTableWidget, type TradersTableWidgetProps, TrendingChannelsWidget, type TrendingChannelsWidgetProps, type UpdateChannelFormType, UpdateChannelFormUI, type UpdateChannelFormUIProps, UpdateChannelOptions, UpdateChannelSourcesOptions, UpdateChannelWidget, type UpdateChannelWidgetProps, type UseChannelBasicInfoScriptParams, type UseChannelBasicInfoScriptResult, type UseChannelEventsQueryParams, type UseChannelsListQueryParams, type UseCheckEligibilityScriptParams, type UseCheckEligibilityScriptResult, type UseCreateChannelMutationParams, type UseFindChannelScriptParams, type UseMyChannelsListQueryParams, type UseMySubscribeScriptParams, type UseSocialBotsScriptParams, type UseSocialBotsScriptResult, type UseSubscribedChannelsListQueryParams, type UseUpdateChannelMutationParams, type UseUpdateChannelSourcesMutationParams, type UseWalletImportScriptParams, type UseWalletImportScriptResult, WalletImportUI, type WalletImportUIProps, WalletImportWidget, type WalletImportWidgetProps, type WalletValues, WalletsFormUI, type WalletsFormUIProps, type WalletsFormValues, WalletsListUI, type WalletsListUIProps, type XAccountInfo, XEligibilityInfo, baseFormSchema, channelEventsInfiniteQueryKey, channelEventsQueryKey, channelQueryKey, channelSourcesQueryKey, channelsListQueryKey, createChannel, createClientChannelsAdapter, createEligibilityCoordinator, createInMemoryChannelsAdapter, eligibilityCoordinator, fetchChannel, fetchChannelEvents, fetchChannelSources, fetchChannelsList, fetchMyChannelsList, fetchSubscribedChannelsList, fetchXAuthorizeUrl, fetchXEligibility, myChannelsListQueryKey, parseWalletsText, subscribeChannel, subscribedChannelsListQueryKey, unsubscribeChannel, updateChannel, updateChannelSources, useChannelBasicInfoScript, useChannelDetail, useChannelEventsInfiniteQuery, useChannelEventsQuery, useChannelQuery, useChannelSourcesQuery, useChannelsAdapter, useChannelsClient, useChannelsContext, useChannelsListQuery, useCheckEligibilityScript, useCreateChannelMutation, useFindChannelScript, useMyChannels, useMyChannelsListQuery, useMySubscribeScript, useSocialBotsScript, useSubscribeChannelMutation, useSubscribedChannels, useSubscribedChannelsListQuery, useTrendingChannels, useUnsubscribeChannelMutation, useUpdateBaseForm, useUpdateChannelMutation, useUpdateChannelSourcesMutation, useUpdateWalletsForm, useWalletImportScript, useXAuthorizeUrlQuery, useXEligibilityQuery, walletSchema, walletsFormSchema, xAuthorizeUrlQueryKey, xEligibilityQueryKey };
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import { z } from 'zod';
3
- import { C as ChannelEvent, a as Channel, b as ChannelSource, c as ChannelsList, I as IChannelsClient, L as ListChannelEventsOptions, d as ChannelEventsList, e as ListChannelsOptions, f as CreateChannelOptions, U as UpdateChannelOptions, g as UpdateChannelSourcesOptions, X as XEligibilityInfo } from './api-CKXPYs9e.js';
4
- export { B as BaseChannelEvent, i as ChannelSink, j as ChannelSourceOption, h as ChannelTradeEvent } from './api-CKXPYs9e.js';
3
+ import { C as ChannelEvent, a as Channel, b as ChannelSource, c as ChannelsList, I as IChannelsClient, L as ListChannelsOptions, d as ListChannelEventsOptions, e as ChannelEventsList, X as XEligibilityInfo, f as CreateChannelOptions, U as UpdateChannelOptions, g as UpdateChannelSourcesOptions } from './api-CHbFBuXe.js';
4
+ export { B as BaseChannelEvent, h as ChannelSink, i as ChannelSourceOption, j as ChannelTradeEvent } from './api-CHbFBuXe.js';
5
5
  import * as _liberfi_io_wallet_connector from '@liberfi.io/wallet-connector';
6
6
  import * as _tanstack_react_query from '@tanstack/react-query';
7
7
  import { UseQueryOptions, UseInfiniteQueryOptions, InfiniteData, useInfiniteQuery, UseMutationOptions } from '@tanstack/react-query';
@@ -238,6 +238,14 @@ type CheckEligibilityWidgetProps = {
238
238
  */
239
239
  declare function CheckEligibilityWidget({ onContinue, onCancel, minFollowers, minAccountAge, returnUrl, className, }: CheckEligibilityWidgetProps): react_jsx_runtime.JSX.Element;
240
240
 
241
+ interface EligibilityCoordinator {
242
+ authorized(): void;
243
+ subscribeAuthorized(listener: () => void): () => void;
244
+ }
245
+ /** Create a typed OAuth completion channel without a global event bus. */
246
+ declare function createEligibilityCoordinator(): EligibilityCoordinator;
247
+ declare const eligibilityCoordinator: EligibilityCoordinator;
248
+
241
249
  type PresetAvatar = {
242
250
  id: string;
243
251
  url: string;
@@ -1203,10 +1211,51 @@ interface ChannelsContextValue {
1203
1211
  }
1204
1212
  declare const ChannelsContext: react.Context<ChannelsContextValue>;
1205
1213
 
1214
+ type ChannelsCredential = {
1215
+ getToken(): Promise<string | null | undefined>;
1216
+ };
1217
+ declare class ChannelsCredentialError extends Error {
1218
+ constructor(message?: string);
1219
+ }
1220
+ interface ChannelsQueryPort {
1221
+ get(credential: ChannelsCredential, id: string): Promise<Channel>;
1222
+ list(credential: ChannelsCredential, options?: ListChannelsOptions): Promise<ChannelsList>;
1223
+ listMine(credential: ChannelsCredential, options?: ListChannelsOptions): Promise<ChannelsList>;
1224
+ listSubscribed(credential: ChannelsCredential, options?: ListChannelsOptions): Promise<ChannelsList>;
1225
+ events(credential: ChannelsCredential, channelId: string, options?: ListChannelEventsOptions): Promise<ChannelEventsList>;
1226
+ sources(credential: ChannelsCredential, channelId: string): Promise<ChannelSource[]>;
1227
+ checkXEligibility(credential: ChannelsCredential): Promise<XEligibilityInfo>;
1228
+ getXAuthorizeUrl(credential: ChannelsCredential, returnUrl?: string): Promise<string>;
1229
+ }
1230
+ interface ChannelsMutationPort {
1231
+ subscribe(credential: ChannelsCredential, id: string): Promise<void>;
1232
+ unsubscribe(credential: ChannelsCredential, id: string): Promise<void>;
1233
+ create(credential: ChannelsCredential, options: CreateChannelOptions): Promise<Channel>;
1234
+ update(credential: ChannelsCredential, options: UpdateChannelOptions): Promise<Channel>;
1235
+ updateSources(credential: ChannelsCredential, options: UpdateChannelSourcesOptions): Promise<ChannelSource[]>;
1236
+ }
1237
+ interface ChannelsSubscriptionPort {
1238
+ events(credential: ChannelsCredential, channelId: string, callback: (event: ChannelEvent) => void): {
1239
+ unsubscribe(): void;
1240
+ };
1241
+ }
1242
+ interface ChannelsAdapter {
1243
+ query: ChannelsQueryPort;
1244
+ mutation: ChannelsMutationPort;
1245
+ subscription: ChannelsSubscriptionPort;
1246
+ }
1247
+ declare function createInMemoryChannelsAdapter(seed?: {
1248
+ channel?: Channel;
1249
+ }): ChannelsAdapter;
1250
+
1251
+ declare const ChannelsAdapterContext: react.Context<ChannelsAdapter | null>;
1252
+
1206
1253
  type ChannelsProviderProps = PropsWithChildren<{
1207
1254
  client: IChannelsClient;
1255
+ credential?: ChannelsCredential;
1256
+ adapter?: ChannelsAdapter;
1208
1257
  }>;
1209
- declare function ChannelsProvider({ client, children }: ChannelsProviderProps): react_jsx_runtime.JSX.Element;
1258
+ declare function ChannelsProvider({ client, credential, adapter, children, }: ChannelsProviderProps): react_jsx_runtime.JSX.Element;
1210
1259
 
1211
1260
  type UseChannelEventsQueryParams = ListChannelEventsOptions;
1212
1261
  declare function channelEventsQueryKey(channelId: string, params: UseChannelEventsQueryParams): string[];
@@ -1224,6 +1273,8 @@ declare function useChannelsContext(): ChannelsContextValue;
1224
1273
 
1225
1274
  declare function useChannelsClient(): IChannelsClient;
1226
1275
 
1276
+ declare function useChannelsAdapter(): ChannelsAdapter;
1277
+
1227
1278
  interface UseChannelsListQueryParams extends Omit<ListChannelsOptions, "chain"> {
1228
1279
  chain?: Chain;
1229
1280
  }
@@ -1283,4 +1334,6 @@ declare function useXAuthorizeUrlQuery(params?: {
1283
1334
 
1284
1335
  declare function parseWalletsText(value: string): Array<Partial<WalletValues>>;
1285
1336
 
1286
- export { ActivityFeedUI, type ActivityFeedUIProps, ActivityFeedWidget, type ActivityFeedWidgetProps, BaseFormUI, type BaseFormUIProps, type BaseFormValues, type BotConnectionStatus, Channel, ChannelAttributes, type ChannelAttributesProps, ChannelBaseInfo, type ChannelBaseInfoProps, ChannelBasicInfoUI, type ChannelBasicInfoUIProps, ChannelBasicInfoWidget, type ChannelBasicInfoWidgetProps, type ChannelCardData, type ChannelDetailData, ChannelDetailNewUI, type ChannelDetailNewUIProps, ChannelDetailNewWidget, type ChannelDetailNewWidgetProps, type ChannelDetailPageProps, type ChannelDetailStats, ChannelDetailUI, type ChannelDetailUIProps, ChannelDetailWidget, type ChannelDetailWidgetProps, ChannelEditButton, type ChannelEditButtonProps, ChannelEvent, type ChannelEventRowProps, ChannelEventsList, type ChannelHomePageProps, ChannelSource, ChannelStats, type ChannelStatsProps, ChannelSubscribeButton, type ChannelSubscribeButtonProps, ChannelsContext, type ChannelsContextValue, ChannelsDetailPage, ChannelsEmptyUI, type ChannelsEmptyUIProps, ChannelsHomePage, ChannelsList, ChannelsProvider, type ChannelsProviderProps, ChannelsSkeletonUI, type ChannelsSkeletonUIProps, ChannelsUI, type ChannelsUIProps, CheckEligibilityUI, type CheckEligibilityUIProps, CheckEligibilityWidget, type CheckEligibilityWidgetProps, CreateChannelOptions, CreateChannelWidget, type CreateChannelWidgetProps, type EligibilityCheckItem, type EligibilityCheckStatus, FindChannelUI, type FindChannelUIProps, FindChannelWidget, type FindChannelWidgetProps, IChannelsClient, type KeyMetric, ListChannelEventsOptions, ListChannelsOptions, type MonitoredWallet, MyChannelsWidget, type MyChannelsWidgetProps, MySubscribeUI, type MySubscribeUIProps, MySubscribeWidget, type MySubscribeWidgetProps, type PresetAvatar, SocialBotsUI, type SocialBotsUIProps, SocialBotsWidget, type SocialBotsWidgetProps, SocialsFormUI, type SocialsFormUIProps, type SortDirection, type SortField, type Step, type StepStatus, StepperUI, type StepperUIProps, type SubscribedChannelData, SubscribedChannelsWidget, type SubscribedChannelsWidgetProps, TabContainerUI, type TabContainerUIProps, TabContainerWidget, type TabContainerWidgetProps, type TabType, type TimeFilter, type Token, TokensListUI, type TokensListUIProps, TokensListWidget, type TokensListWidgetProps, type TradeEvent, type Trader, TradersTableUI, type TradersTableUIProps, TradersTableWidget, type TradersTableWidgetProps, TrendingChannelsWidget, type TrendingChannelsWidgetProps, type UpdateChannelFormType, UpdateChannelFormUI, type UpdateChannelFormUIProps, UpdateChannelOptions, UpdateChannelSourcesOptions, UpdateChannelWidget, type UpdateChannelWidgetProps, type UseChannelBasicInfoScriptParams, type UseChannelBasicInfoScriptResult, type UseChannelEventsQueryParams, type UseChannelsListQueryParams, type UseCheckEligibilityScriptParams, type UseCheckEligibilityScriptResult, type UseCreateChannelMutationParams, type UseFindChannelScriptParams, type UseMyChannelsListQueryParams, type UseMySubscribeScriptParams, type UseSocialBotsScriptParams, type UseSocialBotsScriptResult, type UseSubscribedChannelsListQueryParams, type UseUpdateChannelMutationParams, type UseUpdateChannelSourcesMutationParams, type UseWalletImportScriptParams, type UseWalletImportScriptResult, WalletImportUI, type WalletImportUIProps, WalletImportWidget, type WalletImportWidgetProps, type WalletValues, WalletsFormUI, type WalletsFormUIProps, type WalletsFormValues, WalletsListUI, type WalletsListUIProps, type XAccountInfo, XEligibilityInfo, baseFormSchema, channelEventsInfiniteQueryKey, channelEventsQueryKey, channelQueryKey, channelSourcesQueryKey, channelsListQueryKey, createChannel, fetchChannel, fetchChannelEvents, fetchChannelSources, fetchChannelsList, fetchMyChannelsList, fetchSubscribedChannelsList, fetchXAuthorizeUrl, fetchXEligibility, myChannelsListQueryKey, parseWalletsText, subscribeChannel, subscribedChannelsListQueryKey, unsubscribeChannel, updateChannel, updateChannelSources, useChannelBasicInfoScript, useChannelDetail, useChannelEventsInfiniteQuery, useChannelEventsQuery, useChannelQuery, useChannelSourcesQuery, useChannelsClient, useChannelsContext, useChannelsListQuery, useCheckEligibilityScript, useCreateChannelMutation, useFindChannelScript, useMyChannels, useMyChannelsListQuery, useMySubscribeScript, useSocialBotsScript, useSubscribeChannelMutation, useSubscribedChannels, useSubscribedChannelsListQuery, useTrendingChannels, useUnsubscribeChannelMutation, useUpdateBaseForm, useUpdateChannelMutation, useUpdateChannelSourcesMutation, useUpdateWalletsForm, useWalletImportScript, useXAuthorizeUrlQuery, useXEligibilityQuery, walletSchema, walletsFormSchema, xAuthorizeUrlQueryKey, xEligibilityQueryKey };
1337
+ declare function createClientChannelsAdapter(client: IChannelsClient, credential: ChannelsCredential): ChannelsAdapter;
1338
+
1339
+ export { ActivityFeedUI, type ActivityFeedUIProps, ActivityFeedWidget, type ActivityFeedWidgetProps, BaseFormUI, type BaseFormUIProps, type BaseFormValues, type BotConnectionStatus, Channel, ChannelAttributes, type ChannelAttributesProps, ChannelBaseInfo, type ChannelBaseInfoProps, ChannelBasicInfoUI, type ChannelBasicInfoUIProps, ChannelBasicInfoWidget, type ChannelBasicInfoWidgetProps, type ChannelCardData, type ChannelDetailData, ChannelDetailNewUI, type ChannelDetailNewUIProps, ChannelDetailNewWidget, type ChannelDetailNewWidgetProps, type ChannelDetailPageProps, type ChannelDetailStats, ChannelDetailUI, type ChannelDetailUIProps, ChannelDetailWidget, type ChannelDetailWidgetProps, ChannelEditButton, type ChannelEditButtonProps, ChannelEvent, type ChannelEventRowProps, ChannelEventsList, type ChannelHomePageProps, ChannelSource, ChannelStats, type ChannelStatsProps, ChannelSubscribeButton, type ChannelSubscribeButtonProps, type ChannelsAdapter, ChannelsAdapterContext, ChannelsContext, type ChannelsContextValue, type ChannelsCredential, ChannelsCredentialError, ChannelsDetailPage, ChannelsEmptyUI, type ChannelsEmptyUIProps, ChannelsHomePage, ChannelsList, ChannelsProvider, type ChannelsProviderProps, ChannelsSkeletonUI, type ChannelsSkeletonUIProps, ChannelsUI, type ChannelsUIProps, CheckEligibilityUI, type CheckEligibilityUIProps, CheckEligibilityWidget, type CheckEligibilityWidgetProps, CreateChannelOptions, CreateChannelWidget, type CreateChannelWidgetProps, type EligibilityCheckItem, type EligibilityCheckStatus, type EligibilityCoordinator, FindChannelUI, type FindChannelUIProps, FindChannelWidget, type FindChannelWidgetProps, IChannelsClient, type KeyMetric, ListChannelEventsOptions, ListChannelsOptions, type MonitoredWallet, MyChannelsWidget, type MyChannelsWidgetProps, MySubscribeUI, type MySubscribeUIProps, MySubscribeWidget, type MySubscribeWidgetProps, type PresetAvatar, SocialBotsUI, type SocialBotsUIProps, SocialBotsWidget, type SocialBotsWidgetProps, SocialsFormUI, type SocialsFormUIProps, type SortDirection, type SortField, type Step, type StepStatus, StepperUI, type StepperUIProps, type SubscribedChannelData, SubscribedChannelsWidget, type SubscribedChannelsWidgetProps, TabContainerUI, type TabContainerUIProps, TabContainerWidget, type TabContainerWidgetProps, type TabType, type TimeFilter, type Token, TokensListUI, type TokensListUIProps, TokensListWidget, type TokensListWidgetProps, type TradeEvent, type Trader, TradersTableUI, type TradersTableUIProps, TradersTableWidget, type TradersTableWidgetProps, TrendingChannelsWidget, type TrendingChannelsWidgetProps, type UpdateChannelFormType, UpdateChannelFormUI, type UpdateChannelFormUIProps, UpdateChannelOptions, UpdateChannelSourcesOptions, UpdateChannelWidget, type UpdateChannelWidgetProps, type UseChannelBasicInfoScriptParams, type UseChannelBasicInfoScriptResult, type UseChannelEventsQueryParams, type UseChannelsListQueryParams, type UseCheckEligibilityScriptParams, type UseCheckEligibilityScriptResult, type UseCreateChannelMutationParams, type UseFindChannelScriptParams, type UseMyChannelsListQueryParams, type UseMySubscribeScriptParams, type UseSocialBotsScriptParams, type UseSocialBotsScriptResult, type UseSubscribedChannelsListQueryParams, type UseUpdateChannelMutationParams, type UseUpdateChannelSourcesMutationParams, type UseWalletImportScriptParams, type UseWalletImportScriptResult, WalletImportUI, type WalletImportUIProps, WalletImportWidget, type WalletImportWidgetProps, type WalletValues, WalletsFormUI, type WalletsFormUIProps, type WalletsFormValues, WalletsListUI, type WalletsListUIProps, type XAccountInfo, XEligibilityInfo, baseFormSchema, channelEventsInfiniteQueryKey, channelEventsQueryKey, channelQueryKey, channelSourcesQueryKey, channelsListQueryKey, createChannel, createClientChannelsAdapter, createEligibilityCoordinator, createInMemoryChannelsAdapter, eligibilityCoordinator, fetchChannel, fetchChannelEvents, fetchChannelSources, fetchChannelsList, fetchMyChannelsList, fetchSubscribedChannelsList, fetchXAuthorizeUrl, fetchXEligibility, myChannelsListQueryKey, parseWalletsText, subscribeChannel, subscribedChannelsListQueryKey, unsubscribeChannel, updateChannel, updateChannelSources, useChannelBasicInfoScript, useChannelDetail, useChannelEventsInfiniteQuery, useChannelEventsQuery, useChannelQuery, useChannelSourcesQuery, useChannelsAdapter, useChannelsClient, useChannelsContext, useChannelsListQuery, useCheckEligibilityScript, useCreateChannelMutation, useFindChannelScript, useMyChannels, useMyChannelsListQuery, useMySubscribeScript, useSocialBotsScript, useSubscribeChannelMutation, useSubscribedChannels, useSubscribedChannelsListQuery, useTrendingChannels, useUnsubscribeChannelMutation, useUpdateBaseForm, useUpdateChannelMutation, useUpdateChannelSourcesMutation, useUpdateWalletsForm, useWalletImportScript, useXAuthorizeUrlQuery, useXEligibilityQuery, walletSchema, walletsFormSchema, xAuthorizeUrlQueryKey, xEligibilityQueryKey };