Guides
Dash CoreDash PlatformDash.orgDash User DocsLog In

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:

typeparametersrequiredDescription
Objectdocumentsyes
ExtendedDocument[]documents.createnoarray of valid created document to create
ExtendedDocument[]documents.replacenoarray of valid created document to replace
ExtendedDocument[]documents.deletenoarray of valid created document to delete
IdentityidentityyesA 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.