import { BasicRoleInfo, ChannelDetails, ChannelMetadata, MembershipInfo, LegacyMembershipStruct, MembershipStruct, Permission, PricingModuleStruct, RoleDetails, TotalSupplyInfo } from './ContractTypes'; import { XchainConfig } from './entitlement'; import { WalletLink as WalletLinkV3 } from './v3/WalletLink'; import { BigNumber, BytesLike, ContractReceipt, ContractTransaction, ethers } from 'ethers'; import { SpaceInfo } from './types'; import { IRolesBase, Space, SpaceRegistrar, IRuleEntitlementBase, IRuleEntitlementV2Base, RiverAirdropDapp } from './v3'; import { PricingModules } from './v3/PricingModules'; import { BaseChainConfig } from './IStaticContractsInfo'; import { PlatformRequirements } from './v3/PlatformRequirements'; import { TipEventObject } from '@river-build/generated/dev/typings/ITipping'; export type SignerType = ethers.Signer; export interface CreateLegacySpaceParams { spaceName: string; uri: string; channelName: string; membership: LegacyMembershipStruct; shortDescription?: string; longDescription?: string; } export interface CreateSpaceParams { spaceName: string; uri: string; channelName: string; membership: MembershipStruct; shortDescription?: string; longDescription?: string; prepaySupply?: number; } export interface UpdateChannelMetadataParams { spaceId: string; channelId: string; channelName: string; channelDescription: string; roleIds: number[]; disabled?: boolean; } export interface UpdateChannelAccessParams { spaceId: string; channelId: string; disabled: boolean; } export type UpdateChannelParams = UpdateChannelMetadataParams | UpdateChannelAccessParams; export interface RemoveChannelParams { spaceId: string; channelId: string; } export interface LegacyUpdateRoleParams { spaceNetworkId: string; roleId: number; roleName: string; permissions: Permission[]; users: string[]; ruleData: IRuleEntitlementBase.RuleDataStruct; } export interface UpdateRoleParams { spaceNetworkId: string; roleId: number; roleName: string; permissions: Permission[]; users: string[]; ruleData: IRuleEntitlementV2Base.RuleDataV2Struct; } export interface SetChannelPermissionOverridesParams { spaceNetworkId: string; channelId: string; roleId: number; permissions: Permission[]; } export interface ClearChannelPermissionOverridesParams { spaceNetworkId: string; channelId: string; roleId: number; } export interface TransactionOpts { retryCount?: number; } type TransactionType = ContractTransaction; export type ContractEventListener = { wait: () => Promise<{ success: boolean; error?: Error | undefined; [x: string]: unknown; }>; }; export interface ISpaceDapp { readonly provider: ethers.providers.Provider; readonly config: BaseChainConfig; readonly spaceRegistrar: SpaceRegistrar; readonly walletLink: WalletLinkV3; readonly pricingModules: PricingModules; readonly platformRequirements: PlatformRequirements; readonly airdrop: RiverAirdropDapp | undefined; isLegacySpace: (spaceId: string) => Promise; addRoleToChannel: (spaceId: string, channelNetworkId: string, roleId: number, signer: SignerType) => Promise; banWalletAddress: (spaceId: string, walletAddress: string, signer: SignerType) => Promise; unbanWalletAddress: (spaceId: string, walletAddress: string, signer: SignerType) => Promise; walletAddressIsBanned: (spaceId: string, walletAddress: string) => Promise; bannedWalletAddresses: (spaceId: string) => Promise; createLegacySpace: (params: CreateLegacySpaceParams, signer: SignerType, txnOpts?: TransactionOpts) => Promise; createSpace: (params: CreateSpaceParams, signer: SignerType, txnOpts?: TransactionOpts) => Promise; createChannel: (spaceId: string, channelName: string, channelDescription: string, channelNetworkId: string, roleIds: number[], signer: SignerType, txnOpts?: TransactionOpts) => Promise; createChannelWithPermissionOverrides: (spaceId: string, channelName: string, channelDescription: string, channelNetworkId: string, roles: { roleId: number; permissions: Permission[]; }[], signer: SignerType, txnOpts?: TransactionOpts) => Promise; legacyCreateRole(spaceId: string, roleName: string, permissions: Permission[], users: string[], ruleData: IRuleEntitlementBase.RuleDataStruct, signer: SignerType, txnOpts?: TransactionOpts): Promise; createRole(spaceId: string, roleName: string, permissions: Permission[], users: string[], ruleData: IRuleEntitlementV2Base.RuleDataV2Struct, signer: SignerType, txnOpts?: TransactionOpts): Promise; waitForRoleCreated(spaceId: string, txn: ContractTransaction): Promise<{ roleId: number | undefined; error: Error | undefined; }>; createLegacyUpdatedEntitlements(space: Space, params: LegacyUpdateRoleParams): Promise; createUpdatedEntitlements(space: Space, params: UpdateRoleParams): Promise; deleteRole(spaceId: string, roleId: number, signer: SignerType, txnOpts?: TransactionOpts): Promise; refreshMetadata(spaceId: string, signer: ethers.Signer, txnOpts?: TransactionOpts): Promise; encodedUpdateChannelData(space: Space, params: UpdateChannelParams): Promise; getChannels: (spaceId: string) => Promise; getChannelDetails: (spaceId: string, channelId: string) => Promise; getPermissionsByRoleId: (spaceId: string, roleId: number) => Promise; getChannelPermissionOverrides(spaceId: string, roleId: number, channelId: string): Promise; getRole: (spaceId: string, roleId: number) => Promise; getRoles: (spaceId: string) => Promise; getSpaceInfo: (spaceId: string) => Promise; isEntitledToSpace: (spaceId: string, user: string, permission: Permission) => Promise; isEntitledToChannel: (spaceId: string, channelId: string, user: string, permission: Permission, xchainConfig: XchainConfig) => Promise; getEntitledWalletForJoiningSpace: (spaceId: string, wallet: string, xchainConfig: XchainConfig) => Promise; parseAllContractErrors: (args: { spaceId?: string; error: unknown; }) => Error; parseSpaceFactoryError: (error: unknown) => Error; parseSpaceError: (spaceId: string, error: unknown) => Error; parseSpaceLogs: (spaceId: string, logs: ethers.providers.Log[]) => Promise<(ethers.utils.LogDescription | undefined)[]>; updateChannel: (params: UpdateChannelParams, signer: SignerType, txnOpts?: TransactionOpts) => Promise; removeChannel: (params: RemoveChannelParams, signer: SignerType, txnOpts?: TransactionOpts) => Promise; legacyUpdateRole: (params: LegacyUpdateRoleParams, signer: SignerType, txnOpts?: TransactionOpts) => Promise; updateRole: (params: UpdateRoleParams, signer: SignerType, txnOpts?: TransactionOpts) => Promise; setChannelPermissionOverrides: (params: SetChannelPermissionOverridesParams, signer: SignerType, txnOpts?: TransactionOpts) => Promise; clearChannelPermissionOverrides: (params: ClearChannelPermissionOverridesParams, signer: SignerType, txnOpts?: TransactionOpts) => Promise; updateSpaceInfo: (spaceId: string, name: string, uri: string, shortDescription: string, longDescription: string, signer: SignerType, txnOpts?: TransactionOpts) => Promise; setSpaceAccess: (spaceId: string, disabled: boolean, signer: SignerType) => Promise; setChannelAccess: (spaceId: string, channelId: string, disabled: boolean, signer: SignerType) => Promise; getSpace(spaceId: string): Space | undefined; getSpaceMembershipTokenAddress: (spaceId: string) => Promise; getJoinSpacePriceDetails: (spaceId: string) => Promise<{ price: ethers.BigNumber; prepaidSupply: ethers.BigNumber; remainingFreeSupply: ethers.BigNumber; }>; joinSpace: (spaceId: string, recipient: string, signer: SignerType) => Promise<{ issued: true; tokenId: string; } | { issued: false; tokenId: undefined; }>; hasSpaceMembership: (spaceId: string, wallet: string) => Promise; getMembershipSupply: (spaceId: string) => Promise; getMembershipInfo: (spaceId: string) => Promise; getWalletLink: () => WalletLinkV3; getSpaceAddress: (receipt: ContractReceipt, senderAddress: string) => string | undefined; listPricingModules: () => Promise; setMembershipPrice: (spaceId: string, price: string, signer: SignerType) => Promise; setMembershipPricingModule: (spaceId: string, moduleId: string, signer: SignerType) => Promise; setMembershipLimit: (spaceId: string, limit: number, signer: SignerType) => Promise; prepayMembership: (spaceId: string, supply: number, signer: SignerType) => Promise; getPrepaidMembershipSupply: (spaceId: string) => Promise; setMembershipFreeAllocation: (spaceId: string, freeAllocation: number, signer: SignerType) => Promise; listenForMembershipEvent: (spaceId: string, receiver: string, abortController?: AbortController) => Promise<{ issued: true; tokenId: string; } | { issued: false; tokenId: undefined; }>; getMembershipFreeAllocation: (spaceId: string) => Promise; withdrawSpaceFunds: (spaceId: string, recipient: string, signer: SignerType) => Promise; tip: (args: { spaceId: string; tokenId: string; currency: string; amount: bigint; messageId: string; channelId: string; receiver: string; }, signer: SignerType) => Promise; getLinkedWallets: (wallet: string) => Promise; getTokenIdOfOwner: (spaceId: string, owner: string) => Promise; getTipEvent: (spaceId: string, receipt: ContractReceipt, senderAddress: string) => TipEventObject | undefined; } export {}; //# sourceMappingURL=ISpaceDapp.d.ts.map