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
Name | Type |
---|---|
adapter? | IpfsAdapter |
Methods
getMetadata
▸ getMetadata<K
>(cid
, type?
): Promise
<MetadataTypeMap
[K
]>
Type parameters
Name | Type |
---|---|
K | extends MetadataType |
Parameters
Name | Type |
---|---|
cid | string |
type? | K |
Returns
Promise
<MetadataTypeMap
[K
]>
getMetadataForEvent
▸ getMetadataForEvent<T
, E
>(eventName
, cid
): Promise
<MetadataTypeMap
[T
]>
Type parameters
Name | Type |
---|---|
T | extends MetadataType |
E | extends "" | "Annotation(address,bytes32,string)" | "ColonyMetadata(address,string)" | "DomainMetadata(address,uint256,string)" |
Parameters
Name | Type |
---|---|
eventName | E |
cid | string |
Returns
Promise
<MetadataTypeMap
[T
]>
getRawMetadata
▸ getRawMetadata(cid
): Promise
<Metadata
>
Parameters
Name | Type |
---|---|
cid | string |
Returns
Promise
<Metadata
>
uploadMetadata
▸ uploadMetadata<T
>(type
, input
): Promise
<string
>
Type parameters
Name | Type |
---|---|
T | extends MetadataType |
Parameters
Name | Type |
---|---|
type | T |
input | DataTypeMap [T ] |
Returns
Promise
<string
>
eventSupportsMetadata
▸ Static
eventSupportsMetadata(eventName
): boolean
Parameters
Name | Type |
---|---|
eventName | string |
Returns
boolean