api.entities.Asset.Base.Documents - PolymeshAssociation/polymesh-sdk GitHub Wiki
@polymeshassociation/polymesh-sdk / api/entities/Asset/Base/Documents
api/entities/Asset/Base/Documents
Classes
Documents
Defined in: api/entities/Asset/Base/Documents/index.ts:24
Handles all Asset Document related functionality
Extends
Namespace<BaseAsset>
Methods
add()
add(
args,opts?):Promise<GenericPolymeshTransaction<void,void>>
Defined in: api/entities/Asset/Base/Documents/index.ts:57
Add documents to the Asset's existing list of documents
Parameters
| Parameter | Type |
|---|---|
args |
AddAssetDocumentsParams |
opts? |
ProcedureOpts |
Returns
Promise<GenericPolymeshTransaction<void, void>>
Note
this method is of type ProcedureMethod, which means you can call add.checkAuthorization on it to see whether the signing Account and Identity have the required roles and permissions to run it
get()
get(
paginationOpts?):Promise<ResultSet<AssetDocumentWithId>>
Defined in: api/entities/Asset/Base/Documents/index.ts:70
Retrieve all documents linked to the Asset
Parameters
| Parameter | Type |
|---|---|
paginationOpts? |
PaginationOptions |
Returns
Promise<ResultSet<AssetDocumentWithId>>
Note
supports pagination
Note
returns documents with their on-chain IDs which can be used with the remove method
remove()
remove(
args,opts?):Promise<GenericPolymeshTransaction<void,void>>
Defined in: api/entities/Asset/Base/Documents/index.ts:62
Remove specific documents from the Asset by their IDs
Parameters
| Parameter | Type |
|---|---|
args |
RemoveAssetDocumentsParams |
opts? |
ProcedureOpts |
Returns
Promise<GenericPolymeshTransaction<void, void>>
Note
this method is of type ProcedureMethod, which means you can call remove.checkAuthorization on it to see whether the signing Account and Identity have the required roles and permissions to run it
set()
set(
args,opts?):Promise<GenericPolymeshTransaction<void,void>>
Defined in: api/entities/Asset/Base/Documents/index.ts:52
Assign a new list of documents to the Asset by replacing the existing list of documents with the ones passed in the parameters
Parameters
| Parameter | Type |
|---|---|
args |
SetAssetDocumentsParams |
opts? |
ProcedureOpts |
Returns
Promise<GenericPolymeshTransaction<void, void>>
Note
this removes all existing documents and adds the new ones
Note
this method is of type ProcedureMethod, which means you can call set.checkAuthorization on it to see whether the signing Account and Identity have the required roles and permissions to run it