Broadcast
New site!
All content has been migrated to docs.dash.org. You will be automatically redirected momentarily.
Usage: client.platform.document.broadcast(documents, identity)
Description: This method will broadcast the document on the Application Chain
Parameters:
type | parameters | required | Description |
---|---|---|---|
Object | documents | yes | |
ExtendedDocument[] | documents.create | no | array of valid created document to create |
ExtendedDocument[] | documents.replace | no | array of valid created document to replace |
ExtendedDocument[] | documents.delete | no | array of valid created document to delete |
Identity | identity | yes | A valid registered identity |
Example:
const identityId = '';// Your identity identifier
const identity = await client.platform.identities.get(identityId);
const helloWorldDocument = await client.platform.documents.create(
// Assuming a contract tutorialContract is registered with a field note
'tutorialContract.note',
identity,
{ message: 'Hello World'},
);
await client.platform.documents.broadcast({ create: [helloWorldDocument] }, identity);
Returns: documents.
Updated 10 days ago