Skip to main content

Messages

Message Types

RegisterNotaryInfo

Purpose: Register a new notary configuration that DApps can use for asset notarisation, and provision its native x/vcv verification route.

Sender: Any address (becomes the admin if notary_info_admin is not specified)

Parameters (proto/d/notary/v1/tx.proto, MsgRegisterNotaryInfo):

  • sender: transaction signer
  • notary_info_admin: Admin address (optional, defaults to sender)
  • asset_type_id: Type of assets this configuration handles (e.g. invoice)
  • ext_opt_route: Optional RegisterNotaryRoute used to verify verifiable presentations carried as tx extension options (enforced by the vcv ante handler)
  • content_route: Required RegisterNotaryRoute used to verify the verifier_input content during notarisation

Each RegisterNotaryRoute is a flat structure {issuer, typ, routes, verification_materials} — the typ is the x/vcv route type (currently only SD-JWT, ROUTE_TYPE_SD_JWT), routes are the d.vcv.v1.Requirements and verification_materials are the issuer's JWK public keys. The issuers map of the resulting x/vcv Route is compiled in state (compileRegisterRoute, x/notary/keeper/verifier.go) because gogoproto map entries cannot be carried in a tx.

VCV Integration (x/notary/keeper/ms_notaryinfo.go):

  • The notary keeper stores the NotaryInfo, compiles each provided RegisterNotaryRoute into an x/vcv Route{Admin, Typ, Requirements, Issuers} and calls VcvKeeper.SetRoute(ctx, routeId, route) with routeId = BuildNotarisationExtOptRouteId(notaryInfoId) (/d.notary.v1.MsgNotarise:extop:<notaryInfoId>) and/or routeId = BuildNotarisationContentRouteId(notaryInfoId) (/d.notary.v1.MsgNotarise:content:<notaryInfoId>).
  • There are no verifier contracts and no contract addresses; the routes are persisted natively by x/vcv.

Returns: notary_info_id for the newly registered configuration. (The response also defines notary_ext_opt_route_id and notary_content_route_id fields, but the keeper does not currently populate them — only notary_info_id is set.)

UpdateNotaryInfoRoute

Purpose: Update the x/vcv route(s) provisioned for an existing NotaryInfo.

Sender: Must be the admin of the NotaryInfo

Parameters (MsgUpdateNotaryInfoRoute):

  • sender: transaction signer
  • notary_info_id: ID of the notary configuration to update
  • ext_opt_route: Optional UpdateNotaryRoute for the extension-option route
  • content_route: Optional UpdateNotaryRoute for the content route

VCV Integration (x/notary/keeper/ms_notaryinfo.go, mergeUpdateRoute):

  • For each provided UpdateNotaryRoute, the keeper loads the existing route (or creates a fresh one owned by the admin if none exists), overwrites its typ and requirements, and updates-or-appends the issuer in the route's Issuers map. A nil UpdateNotaryRoute leaves that route untouched.

Returns: notary_info_id, notary_ext_opt_route_id, notary_content_route_id

Notarise

Purpose: Notarise an asset by providing a verifiable presentation that proves asset validity.

Sender: Any address

Parameters (MsgNotarise):

  • sender: transaction signer
  • notary_info_id: ID of the notary configuration to use
  • verifier_input: Verifiable presentation bytes (SD-JWT) for verification
  • asset_data: JSON-encoded asset data (structure depends on asset type, e.g. AssetInvoiceData)
  • owner: Asset owner address (optional, defaults to sender)
  • max_notarise_fee: Optional maximum fee the sender is willing to pay (nil = no limit, 0 = reject any fee)

VCV Integration (x/notary/keeper/keeper_notarise.go):

  1. If an extension-option route exists for the NotaryInfoId, the vcv ante handler first verifies the verifiable presentation carried as a tx extension option (via the notary keeper's GetMsgExtensionOptionRequirements, x/notary/keeper/exported.go)
  2. Build the content routeId (/d.notary.v1.MsgNotarise:content:<notaryInfoId>) and fetch the route via VcvKeeper.GetRoute(ctx, routeId)
  3. Parse the asset data and calculate the AssetId as a SHA256 hash of asset components (calculateAssetId)
  4. Call VcvKeeper.VerifyVerifiablePresentation(ctx, route, vp, compareTo) with the verifier_input as the verifiable presentation and a compareTo map of {"AssetId": assetId, "OdpHash": odpHash}
  5. x/vcv natively verifies the SD-JWT presentation against the route's issuer requirements and verification materials
  6. If verification fails, the notarisation is rejected with an error

Returns: notarised_asset_id (the SHA256 asset id), along with notary_info_id and asset_type_id

Additional Processing:

  • Calculates the notarisation fee from the asset value via the configured currency conversion rate, EUR price in adt, and notarisation fee rate
  • Transfers the fee from the sender to the module account and burns it
  • Stores the NotarisedAsset in state
  • Emits EventNotarise with the asset id and fee burned

UpdateNotarisedAsset

Purpose: Update the state of an existing notarised asset (e.g. status, owner, operator, issuance id, collateral ref).

Sender: Must be the asset's owner or operator_proxy

Parameters (MsgUpdateNotarisedAsset):

  • sender: transaction signer
  • notarised_asset_id: ID of the notarised asset to update
  • new_asset_data: JSON-encoded AssetInvoiceUpdateData

Returns: updated_notarised_asset_id

VCV Integration: None — updating an already-notarised asset does not re-run verification.

UpdateAdmin

Purpose: Transfer admin rights of a NotaryInfo to a new address.

Sender: Must be the current admin of the NotaryInfo

Parameters (MsgUpdateAdmin):

  • sender: transaction signer
  • notary_info_id: ID of the NotaryInfo to update
  • new_admin: New admin address

VCV Integration: None — no verification required for admin updates.

RemoveNotaryInfo

Purpose: Delete a notary configuration.

Sender: Must be the admin of the NotaryInfo

Parameters (MsgRemoveNotaryInfo):

  • sender: transaction signer
  • notary_info_id: ID of the NotaryInfo to remove

Effects:

  • Removes the NotaryInfo from state
  • Future MsgNotarise calls with this notary_info_id will fail (the route can no longer be resolved)

VCV Integration: None — no verification required for removal.

Fee and Pricing Messages

The following authority-gated messages configure the inputs used to compute notarisation fees:

  • SetCurrencyConversionRate (MsgSetCurrencyConversionRate): set a currency's conversion rate to EUR.
  • SetEurPriceInAdt (MsgSetEurPriceInAdt): set the price of 1 EUR expressed in adt.
  • SetNotarisationFeeRate (MsgSetNotarisationFeeRate): set the notarisation fee rate (EUR equivalent).

Each requires the sender to be the module authority and performs no VCV verification.