States
NextNotaryInfoId
The NextNotaryInfoId (NextId) is a global counter for the notary info id. It increments by 1 for each notary info
registered by decentralised applications.
NotaryInfoMap
The mapping of the notary info id to the NotaryInfo object. With native x/vcv integration, the verification routes
themselves are not stored inside the NotaryInfo; instead each NotaryInfo references its x/vcv routes by the route
ids derived from the NotaryInfoId (see Route registration with the VCV module below). The NotaryInfo holds the
admin, the asset type id and the two route ids (proto/d/notary/v1/types.proto):
message NotaryInfo {
// The address used to create this object and can be used to update it
string notary_info_admin = 1
[ (cosmos_proto.scalar) = "cosmos.AddressString" ];
// Asset Type ID: the key to the type of asset
uint64 asset_type_id = 2;
// The route id in vcvKeeper for this notary info.
// The route is used to verify the extension options attached to notarisation.
string notary_ext_opt_route_id = 3;
// The route is used to verify the notarisation of the asset.
string notary_content_route_id = 4;
}
AssetTypeMap
Maps asset type IDs to their string representations (e.g. 1 → "invoice"), allowing for categorization and
identification of different asset types that can be notarised through the system.
NotarisedAssets
A mapping from asset identifiers to their corresponding NotarisedAsset objects. The asset identifier is calculated as
the SHA256 hash of the input asset data components (calculateAssetId) and is included in the compareTo values during
verification so the verifiable presentation is bound to the specific asset.
// Notarised Asset wrapper that can contain different asset types
message NotarisedAsset {
oneof asset {
AssetInvoice asset_invoice = 1;
// Future asset types can be added here
}
d.types.version.VersionMetadata version = 2;
}
AssetInvoice and AssetInvoiceData
The stored state AssetInvoice is the post-processed data derived from the input AssetInvoiceData.
// Stored state of NotarisedAsset for Invoice type
message AssetInvoice {
string owner = 1 [ (cosmos_proto.scalar) = "cosmos.AddressString" ];
// Operator address of this asset
string operator_proxy = 10 [ (cosmos_proto.scalar) = "cosmos.AddressString" ];
// The status of the asset, Init: NOTARISED
Status status = 2;
// odp hash
string odp_hash = 3;
// issuance ID: this is the record string by the registry
// Updatable only by the owner
string issuance_id = 4 [ (gogoproto.nullable) = true ];
// The nominal value of the asset at notarisation
CurrencyValue currency_value = 5;
// Expiration date / aka the final agreed payment due date in unix timestamp
uint64 expiration = 6;
// Collateralised reference available if asset has been used as collateral
string collateral_ref = 7 [ (gogoproto.nullable) = true ];
// On notarise, the module to call
string on_notarise_hook = 8 [ (gogoproto.nullable) = true ];
// The address that sent this asset for notarisation
string notarise_proxy = 9 [ (cosmos_proto.scalar) = "cosmos.AddressString" ];
// Invoice hash
string invoice_hash = 11;
}
// Input data for the notarise transaction
message AssetInvoiceData {
// odp hash
string odp_hash = 1;
// The nominal value of the asset at notarisation
CurrencyValue currency_value = 2;
// Expiration date / aka payment due date in unix timestamp
uint64 expiration = 3;
// Discount rate, e.g. "0.95" for 95%
string discount_rate = 4;
// owner
string owner = 5 [ (cosmos_proto.scalar) = "cosmos.AddressString" ];
// Operator address of this asset
string operator_proxy = 6 [ (cosmos_proto.scalar) = "cosmos.AddressString" ];
// Invoice hash
string invoice_hash = 7;
}
Currency and Pricing State
The notary module also stores pricing state used to compute notarisation fees:
- CurrencyConversionRates: per-currency conversion rate to EUR (e.g.
USD→0.85). - EurPriceInAdt: the price of 1 EUR expressed in adt.
- NotarisationFeeRate: the fee rate applied to the EUR-equivalent asset value.
Route registration with the VCV module
The notary module integrates natively with the x/vcv module rather than storing routes in its own state. Routes are
not held inside the NotaryInfo, and there is no verifier-contract reference.
- On
MsgRegisterNotaryInfo, the notary keeper compiles each providedRegisterNotaryRouteinto anx/vcvRoutecarrying the NotaryInfoadmin, theRouteType(currently SD-JWT), theRequirementsand the issuer's JWK verification materials, then callsVcvKeeper.SetRoute(ctx, routeId, route). The route ids areBuildNotarisationContentRouteId(notaryInfoId)=/d.notary.v1.MsgNotarise:content:<notaryInfoId>(mandatory) andBuildNotarisationExtOptRouteId(notaryInfoId)=/d.notary.v1.MsgNotarise:extop:<notaryInfoId>(optional). - On
MsgNotarise, the vcv ante handler resolves the ext-opt route id (if registered) to verify the verifiable-presentation extension option, and the notary keeper resolves the content route id viaVcvKeeper.GetRouteand delegates the cryptographic verification toVcvKeeper.VerifyVerifiablePresentation.
The routes (requirements, issuers and their JWK verification materials) are owned and persisted by the x/vcv module;
the notary module references them by the deterministically derived route ids stored on the NotaryInfo.