Guides
Dash CoreDash PlatformDash.orgDash User DocsLog In
These docs are for v0.24.0. Click to read the latest docs for v0.25-redirect.

Broadcast

Usage: client.platform.document.broadcast(documents, identity)
Description: This method will broadcast the document on the Application Chain

Parameters:

parameterstyperequiredDescription
documentsObjectyes
documents.createExtendedDocument[]noarray of valid created document to create
documents.replaceExtendedDocument[]noarray of valid created document to replace
documents.deleteExtendedDocument[]noarray 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.