C#
Contents
Cid type
type
Namespace
vBase.Core
Summary
Content Identifier (CID) is used to uniquely identify objects.
#ctor() constructor
constructor
Summary
Creates a new CID from the provided byte array.
Parameters
This constructor has no parameters.
#ctor(data) constructor
constructor
Summary
Creates a new CID from the provided hex string.
Parameters
Data property
property
Summary
The data of the CID.
Empty property
property
Summary
Empty CID.
ToHex() method
method
Summary
Returns the CID as a hex string.
Returns
Hex string.
Parameters
This method has no parameters.
Convert type
type
Namespace
vBase.Core.Utilities
Summary
Provides conversion methods.
CryptoUtils type
type
Namespace
vBase.Core.Utilities
Summary
Provides cryptographic utilities.
GetCid(value,size) method
method
Summary
Get SHA3 256 hash of the input integer.
Returns
SHA3 256 hash object.
Parameters
GetCid(value) method
method
Summary
Get SHA3 256 hash of the input string.
Returns
SHA3 256 hash object
Parameters
ForwarderCommitmentService type
type
Namespace
vBase.Core.Web3CommitmentService
Summary
Provides access to the CommitmentService smart contract over vBase forwarder.
ICommitmentService type
type
Namespace
vBase.Core
Summary
Common interface for commitment services.
DefaultUser property
property
Summary
Current user identifier.
AddSet(setCid) method
method
Summary
Records a set commitment. If the set already exists, no action will be taken.
Parameters
AddSetObject(setCid,objectCid) method
method
Summary
Adds an object CID to the specified set.
Returns
Receipt of the operation.
Parameters
UserSetExists(user,setCid) method
method
Summary
Checks if the specified object set exists.
Parameters
VerifyUserObject(user,objectCid,timestamp) method
method
Summary
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
method
Summary
Verifies an object commitment previously recorded.
Returns
True if the commitment has been verified successfully; False otherwise.
Parameters
JsonSerializationDto type
type
Namespace
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
type
Namespace
vBase.Core
Summary
Represents a transaction receipt.
#ctor() constructor
constructor
Summary
Represents a transaction receipt.
Parameters
This constructor has no parameters.
Utils type
type
Namespace
vBase.Core.Utilities
Summary
Provides utility methods.
VerificationResult type
type
Namespace
vBase.Core.Dataset
Summary
Contains a list of verification findings. VerifyCommitments
VerificationFindings property
property
Summary
A collection of verification findings.
VerificationPassed property
property
Summary
Indicates whether the verification passed.
AddFinding(finding) method
method
Summary
Adds a finding to the verification result.
Parameters
Web3CommitmentService type
type
Namespace
vBase.Core.Web3CommitmentService
Summary
Provides access to the CommitmentService smart contract.
CallContractFunction(function,functionData) method
method
Summary
Executes Smart Contract function.
Returns
Parameters
CallContractFunction(functionName,functionInput) method
method
Summary
Calls the specified contract function.
Returns
The result of the contract function execution.
Parameters
CallStateVariable``1(stateVariableName,functionInput) method
method
Summary
Fetches the specified state variable from the contract.
Returns
Variable value
Parameters
Generic Types
TResultType
Expected variable type
FetchStateVariable``1(functionData) method
method
Summary
Fetches state variable from the Smart Contract.
Returns
Variable value
Parameters
Generic Types
TResultType
Expected result type
Web3Receipt type
type
Namespace
vBase.Core.Web3CommitmentService
Summary
WEB3-specific receipt. Additionally to the base timestamp, it contains the transaction hash.
#ctor() constructor
constructor
Summary
WEB3-specific receipt. Additionally to the base timestamp, it contains the transaction hash.
Parameters
This constructor has no parameters.
vBaseClient type
type
Namespace
vBase.Core
Summary
Provides Python validityBase (vBase) access.
DefaultUser property
property
Summary
Return the default user address used in vBase transactions.
AddNamedSet(name) method
method
Summary
Adds a new named set.
Returns
A task representing the asynchronous operation.
Parameters
AddSet(setCid) method
method
Summary
Adds a new set.
Returns
A task representing the asynchronous operation.
Parameters
AddSetObject(setCid,objectCid) method
method
Summary
Adds a new object to the set.
Returns
Receipt of the operation.
Parameters
UserNamedSetExists(user,name) method
method
Summary
Checks if the user has a set with the specified CID.
Returns
Parameters
VerifyUserObject(user,objectCid,timestamp) method
method
Summary
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
method
Summary
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
type
Namespace
vBase.Core.Dataset
Summary
vBase dataset.
#ctor(vBaseClient,name,recordTypeName) constructor
constructor
Summary
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
constructor
Summary
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
method
Summary
Adds a record to the dataset.
Returns
A transaction receipt.
Parameters
Initialize() method
method
Summary
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
method
Summary
Serializes the dataset into a vBase-compatible JSON representation.
Returns
A JSON string.
Parameters
This method has no parameters.
VerifyCommitments() method
method
Summary
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
type
Namespace
vBase.Core.Exceptions
Summary
Base exception for all vBase exceptions.
vBaseObject type
type
Namespace
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
property
Summary
The data stored in the object.
StringData property
property
Summary
String representation of the data.
GetCid() method
method
Summary
Returns the Cid of the object.
Returns
CID (Content Identifiers) for the current object
Parameters
This method has no parameters.
GetJson() method
method
Summary
Serializes the object to a JSON value.
Returns
Parameters
This method has no parameters.
InitFromJson(jData) method
method
Summary
Initializes the object from a JSON object.
Parameters
vBaseStringObject type
type
Namespace
vBase.Core.Dataset.vBaseObjects
Summary
vBase Object representing a string data.
vBaseObjectType constants
constants
Summary
vBase string object name for bidirectional compatibility with vBase Python SDK the V letter is capitalized
Last updated