Skip to main content

Class: IpfsMetadata

IpfsMetadata

This is part of the ColonyNetwork and ColonyEventManager classes and not to be meant to instantiated directly. You can find an instance of this under colonyNetwork.ipfs or eventManager.ipfs

Constructors

constructor

new IpfsMetadata(adapter?)

Parameters

NameType
adapter?IpfsAdapter

Methods

getMetadata

getMetadata<K>(cid, type?): Promise<MetadataTypeMap[K]>

Type parameters

NameType
Kextends MetadataType

Parameters

NameType
cidstring
type?K

Returns

Promise<MetadataTypeMap[K]>


getMetadataForEvent

getMetadataForEvent<T, E>(eventName, cid): Promise<MetadataTypeMap[T]>

Type parameters

NameType
Textends MetadataType
Eextends "" | "Annotation(address,bytes32,string)" | "ColonyMetadata(address,string)" | "DomainMetadata(address,uint256,string)"

Parameters

NameType
eventNameE
cidstring

Returns

Promise<MetadataTypeMap[T]>


getRawMetadata

getRawMetadata(cid): Promise<Metadata>

Parameters

NameType
cidstring

Returns

Promise<Metadata>


uploadMetadata

uploadMetadata<T>(type, input): Promise<string>

Type parameters

NameType
Textends MetadataType

Parameters

NameType
typeT
inputDataTypeMap[T]

Returns

Promise<string>


eventSupportsMetadata

Static eventSupportsMetadata(eventName): boolean

Parameters

NameType
eventNamestring

Returns

boolean