dash-platform-sdk
    Preparing search index...

    Class DataContractsController

    Collection of methods necessary to work with Data Contracts in the network, such as data contract creation or retrieval

    Index

    Methods

    • Creates an instance of {DataContractWASM} that can be used to register a data contract in the network.

      Parameters

      • ownerId: IdentifierLike

        {IdentifierLike} Identifier of the Data Contract's owner

      • identityNonce: bigint

        {bigint} Identity nonce

      • schema: object

        {object} Data Contract schema in json

      • OptionalfullValidation: boolean

        {true=} Full validation (omit it)

      • OptionaltokenConfiguration: TokenConfigurationWASM

        {object=} Token configuration

      • Optionalconfig: DataContractConfig

        {DataContractConfig=} Data Contract config

      • OptionalplatformVersion: PlatformVersionWASM

        {PlatformVersionWASM=} version of the platform

      Returns DataContractWASM

    • Helper function to create a state transition from a {DataContractWASM} instance Pass {DataContractTransitionType} in type param to specify which type of operation you want to make: create or update.

      Parameters

      • dataContract: DataContractWASM

        {DataContractWASM} An instance of DataContractWASM to create or update

      • type: DataContractTransitionType

        {DataContractTransitionType} type of state transition to create

      • identityNonce: bigint

        {bigint} identity contract nonce

      Returns StateTransitionWASM