Skip to main content

Initiate an anchor request

POST 

/api/v1/wallet/anchor

Initiates an anchoring request for an application. This endpoint is used to create an anchor request without explicit wallet approval.

Request​

Body

required

    applicationId string

    Identifier of the application virtual blockchain. The application must be published online before calling this endpoint.When omitted, either a wallet or an application must be associated with the API key.

    virtualBlockchainId string

    Identifier of the target application ledger. If omitted, a new virtual blockchain is created for this anchor request

    chainStorageInDays number

    Retention period in days for the anchored data on the Carmentis blockchain. After this period, data may be archived or removed. Required only for the first microblock of the virtual blockchain.

    gasPriceInAtomics numberrequired

    Gas price in atomic units to use for the anchoring transaction. If limits are defined in the API key, then the gas price must be within theses limits (gasMinAtomics - gasMaxAtomics)

    channels

    object[]

    required

    List of channels to create in this virtual blockchain. Each channel controls data visibility to different actors

  • Array [

  • name Name of the channel (string)required

    Unique identifier for this channel within the virtual blockchain

    public Channel visibility (boolean)required

    Indicates whether the channel is public (visible to all) or private (visible only to authorized actors)

  • ]

  • actors

    object[]

    required

    All participants/actors that need to be created and used in this transaction

  • Array [

  • name Name of the actor (string)required

    Identifier for this actor within the virtual blockchain. Used in authorizations and endorsements

  • ]

  • data objectrequired

    Your business-related data to be anchored. This is the actual payload being recorded on the blockchain

    channelAssignations

    object[]

    required

    Assignment of data fields to specific channels. Controls which actors can see which data

  • Array [

  • channelName stringrequired

    The name of the channel to assign the fields.

    fieldPath stringrequired

    Fields involved in this assignation.

  • ]

  • actorAssignations

    object[]

    required

    Assignment of channel visibility to specific actors

  • Array [

  • channelName stringrequired

    The name of the channel visible by the actor.

    actorName stringrequired

    Actor involved in this assignation.

  • ]

  • hashableFields

    object[]

    Fields whose values should be hashed for zero-knowledge proofs

  • Array [

  • fieldPath stringrequired

    States that data indicated by this field is hashable.

  • ]

  • maskableFields

    object[]

    required

    Fields that support masking (redaction) of specific parts. Useful for PII and sensitive data

  • Array [

  • fieldPath stringrequired

    States that data indicated by this field is maskable.

    maskedParts

    object[]

    required

    List of masks.

  • Array [

  • position numberrequired

    Position of the masked part in the field.

    length numberrequired

    Length of the masked part in the field.

    replacementString stringrequired

    Replacement field

  • ]

  • ]

  • author Author (string)required

    The actor who initiated this transaction. Usually your application server or user identity

Responses​

The anchoring request has been created successfully.

Schema

    anchorRequestId stringrequired

    Anchor request id used to track the anchor request.

Loading...