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.

Usage: client.platform.contracts.publish(contract, identity)
Description: This method will sign and broadcast any valid contract.

Parameters:

parameterstyperequiredDescription
contractContractyesA valid created contract
identityIdentityyesA valid registered application identity

Example:

const identityId = '';// Your identity identifier.
const identity = await client.platform.identities.get(identityId);
// See the contract.create documentation for more on how to create a dataContract
const contract = await client.platform.contracts.create(contractDefinitions, identity);
await client.platform.contracts.publish(contract, identity);

Returns : DataContractCreateTransition.