Type aliases
SubsocialApiProps
Subsocial
ApiProps: SubsocialContext & { ipfsNodeUrl: string; offchainUrl: string; substrateApi: SubstrateApi }
SubsocialIpfsProps
Subsocial
IpfsProps: SubsocialContext & { ipfsNodeUrl: IpfsUrl; offchainUrl: string }
Functions
asAccountId
-
Parameters
Returns GenericAccountId | undefined
contentFilter
- contentFilter<T>(__namedParameters: Props<T>): T[]
-
Type parameters
Parameters
-
__namedParameters: Props<T>
Returns T[]
Const createResolveSubsocialApi
- createResolveSubsocialApi(context: NewSubsocialApiProps): () => Promise<Api>
-
Parameters
-
context: NewSubsocialApiProps
Returns () => Promise<Api>
Const getApi
- getApi(url: string): Promise<ApiPromise>
-
Parameters
Returns Promise<ApiPromise>
getCidsOfStructs
- getCidsOfStructs(structs: HasIpfsCidSomewhere[]): string[]
-
Parameters
-
structs: HasIpfsCidSomewhere[]
Returns string[]
getIpfsCidOfSocialAccount
-
Parameters
Returns string | undefined
getIpfsCidOfStruct
- getIpfsCidOfStruct<S>(struct: S): string | undefined
-
Type parameters
Parameters
Returns string | undefined
Const getPostIdFromExtension
- getPostIdFromExtension(postData?: HasPostStruct): PostId
-
Parameters
-
Optional postData: HasPostStruct
Const getSharedPostId
- getSharedPostId(postData: any): PostId
Const getUniqueIds
- getUniqueIds<ID>(ids: ID[]): ID[]
-
Type parameters
Parameters
Returns ID[]
Const isEmptyContent
- isEmptyContent(struct?: StructWithHidden): boolean
-
Parameters
-
Optional struct: StructWithHidden
Returns boolean
Const isEmptyIpfsContent
- isEmptyIpfsContent(struct?: HasContent): boolean
-
Parameters
-
Optional struct: HasContent
Returns boolean
Const isHidden
- isHidden(struct?: StructWithHidden): boolean
-
Parameters
-
Optional struct: StructWithHidden
Returns boolean
Const isPublic
- isPublic(struct?: StructWithHidden): struct is StructWithHidden
-
Parameters
-
Optional struct: StructWithHidden
Returns struct is StructWithHidden
Const isUnlisted
- isUnlisted(struct?: StructWithHidden): boolean
-
Parameters
-
Optional struct: StructWithHidden
Returns boolean
Const isValidIpfsCid
- isValidIpfsCid(cid: IpfsCid): boolean
-
Parameters
Returns boolean
Const isVisible
- isVisible(struct?: StructWithHidden): struct is StructWithHidden
-
Parameters
-
Optional struct: StructWithHidden
Returns struct is StructWithHidden
loadAndSetPostRelatedStructs
Const newSubsocialApi
- newSubsocialApi(__namedParameters: NewSubsocialApiProps): Promise<Api>
-
Parameters
-
__namedParameters: NewSubsocialApiProps
Returns Promise<Api>
Const notEmptyIpfsContent
- notEmptyIpfsContent(struct?: HasContent): boolean
-
Parameters
-
Optional struct: HasContent
Returns boolean
Const resolveCidOfContent
- resolveCidOfContent(content?: Content): string
-
Parameters
Returns string
visibilityFilter
- visibilityFilter<T>(structs: T[], filter?: Visibility): T[]
-
Type parameters
Parameters
Returns T[]
A set of API wrappers for Subsocial Network.