C#
Contents
Cid type
typeNamespace
vBase.Core
Summary
Content Identifier (CID) is used to uniquely identify objects.
#ctor() constructor
constructorSummary
Creates a new CID from the provided byte array.
Parameters
This constructor has no parameters.
#ctor(data) constructor
constructorSummary
Creates a new CID from the provided hex string.
Parameters
Data property
propertySummary
The data of the CID.
Empty property
propertySummary
Empty CID.
ToHex() method
methodSummary
Returns the CID as a hex string.
Returns
Hex string.
Parameters
This method has no parameters.
Convert type
typeNamespace
vBase.Core.Utilities
Summary
Provides conversion methods.
CryptoUtils type
typeNamespace
vBase.Core.Utilities
Summary
Provides cryptographic utilities.
GetCid(value,size) method
methodSummary
Get SHA3 256 hash of the input integer.
Returns
SHA3 256 hash object.
Parameters
GetCid(value) method
methodSummary
Get SHA3 256 hash of the input string.
Returns
SHA3 256 hash object
Parameters
ForwarderCommitmentService type
typeNamespace
vBase.Core.Web3CommitmentService
Summary
Provides access to the CommitmentService smart contract over vBase forwarder.
ICommitmentService type
typeNamespace
vBase.Core
Summary
Common interface for commitment services.
DefaultUser property
propertySummary
Current user identifier.
AddSet(setCid) method
methodSummary
Records a set commitment. If the set already exists, no action will be taken.
Parameters
AddSetObject(setCid,objectCid) method
methodSummary
Adds an object CID to the specified set.
Returns
Receipt of the operation.
Parameters
UserSetExists(user,setCid) method
methodSummary
Checks if the specified object set exists.
Parameters
VerifyUserObject(user,objectCid,timestamp) method
methodSummary
Checks whether the object with the specified CID was stamped at the given time.
Returns
True if the commitment has been verified successfully; False otherwise.
Parameters
VerifyUserSetObjects(user,setCid,userSetObjectCidSum) method
methodSummary
Verifies an object commitment previously recorded.
Returns
True if the commitment has been verified successfully; False otherwise.
Parameters
JsonSerializationDto type
typeNamespace
vBase.Core.Dataset
Summary
DTO for dataset JSON serialization. It's important to keep this class in sync with the Python and other SDKs.
Receipt type
typeNamespace
vBase.Core
Summary
Represents a transaction receipt.
#ctor() constructor
constructorSummary
Represents a transaction receipt.
Parameters
This constructor has no parameters.
Utils type
typeNamespace
vBase.Core.Utilities
Summary
Provides utility methods.
VerificationResult type
typeNamespace
vBase.Core.Dataset
Summary
Contains a list of verification findings. VerifyCommitments
VerificationFindings property
propertySummary
A collection of verification findings.
VerificationPassed property
propertySummary
Indicates whether the verification passed.
AddFinding(finding) method
methodSummary
Adds a finding to the verification result.
Parameters
Web3CommitmentService type
typeNamespace
vBase.Core.Web3CommitmentService
Summary
Provides access to the CommitmentService smart contract.
CallContractFunction(function,functionData) method
methodSummary
Executes Smart Contract function.
Returns
Parameters
CallContractFunction(functionName,functionInput) method
methodSummary
Calls the specified contract function.
Returns
The result of the contract function execution.
Parameters
CallStateVariable``1(stateVariableName,functionInput) method
methodSummary
Fetches the specified state variable from the contract.
Returns
Variable value
Parameters
Generic Types
TResultType
Expected variable type
FetchStateVariable``1(functionData) method
methodSummary
Fetches state variable from the Smart Contract.
Returns
Variable value
Parameters
Generic Types
TResultType
Expected result type
Web3Receipt type
typeNamespace
vBase.Core.Web3CommitmentService
Summary
WEB3-specific receipt. Additionally to the base timestamp, it contains the transaction hash.
#ctor() constructor
constructorSummary
WEB3-specific receipt. Additionally to the base timestamp, it contains the transaction hash.
Parameters
This constructor has no parameters.
vBaseClient type
typeNamespace
vBase.Core
Summary
Provides Python validityBase (vBase) access.
DefaultUser property
propertySummary
Return the default user address used in vBase transactions.
AddNamedSet(name) method
methodSummary
Adds a new named set.
Returns
A task representing the asynchronous operation.
Parameters
AddSet(setCid) method
methodSummary
Adds a new set.
Returns
A task representing the asynchronous operation.
Parameters
AddSetObject(setCid,objectCid) method
methodSummary
Adds a new object to the set.
Returns
Receipt of the operation.
Parameters
UserNamedSetExists(user,name) method
methodSummary
Checks if the user has a set with the specified CID.
Returns
Parameters
VerifyUserObject(user,objectCid,timestamp) method
methodSummary
Verifies if the specified object was stamped at the given time by the given user.
Returns
True if the object was stamped; otherwise, false.
Parameters
VerifyUserSetObjects(user,setCid,userSetObjectsCidSum) method
methodSummary
Verifies if the sum of all CIDs in the current dataset matches the sum of the dataset stored in the commitment service.
Returns
A boolean indicating whether the sums match.
Parameters
userSetObjectsCidSum
The sum of the CIDs of all objects belonging to the set.
vBaseDataset type
typeNamespace
vBase.Core.Dataset
Summary
vBase dataset.
#ctor(vBaseClient,name,recordTypeName) constructor
constructorSummary
Creates a new instance of the vBase dataset.
Parameters
vBaseClient
The vBaseClient used for communication with the vBase smart protocol.
Exceptions
Thrown if an unknown record type is provided.
#ctor(vBaseClient,json) constructor
constructorSummary
Creates a new instance of the vBase dataset from JSON.
Parameters
vBaseClient
The vBaseClient used for communication with the vBase smart protocol.
json
The JSON representation of the dataset. JSON created by vBase SDKs for other platforms, such as Python or Java, is also supported.
Exceptions
Thrown when the current CID generation algorithm does not match the one used to generate the provided JSON.
AddRecord(recordData) method
methodSummary
Adds a record to the dataset.
Returns
A transaction receipt.
Parameters
Initialize() method
methodSummary
Creates a new dataset on the blockchain if it does not already exist.
Returns
A task representing the asynchronous operation.
Parameters
This method has no parameters.
ToJson() method
methodSummary
Serializes the dataset into a vBase-compatible JSON representation.
Returns
A JSON string.
Parameters
This method has no parameters.
VerifyCommitments() method
methodSummary
Verifies if all records in the dataset were actually created on the Validity Base platform at the specified timestamps.
Returns
Validation result: A collection of errors. For each record that was not found on the Validity Base platform, or was added with a different timestamp, there will be a separate error item in the collection. Additionally, an error item will be added if the dataset on the Validity Base platform contains more records than exist in this client-side dataset.
Parameters
This method has no parameters.
vBaseException type
typeNamespace
vBase.Core.Exceptions
Summary
Base exception for all vBase exceptions.
vBaseObject type
typeNamespace
vBase.Core.Dataset.vBaseObjects
Summary
Base class for all vBase objects. Each implementation should provide a constructor with one object parameter, and parameterless constructor.
Data property
propertySummary
The data stored in the object.
StringData property
propertySummary
String representation of the data.
GetCid() method
methodSummary
Returns the Cid of the object.
Returns
CID (Content Identifiers) for the current object
Parameters
This method has no parameters.
GetJson() method
methodSummary
Serializes the object to a JSON value.
Returns
Parameters
This method has no parameters.
InitFromJson(jData) method
methodSummary
Initializes the object from a JSON object.
Parameters
vBaseStringObject type
typeNamespace
vBase.Core.Dataset.vBaseObjects
Summary
vBase Object representing a string data.
vBaseObjectType constants
constantsSummary
vBase string object name for bidirectional compatibility with vBase Python SDK the V letter is capitalized
Last updated

