COM API Reference
Contents
AssemblyResolver type
type
Namespace
vBase.Infrastructure
Summary
Some dependencies are referenced transitively multiple times with different versions. Only the latest version is available in the application folder. To resolve older versions at runtime and return the latest version, we use the AssemblyResolver class.
ComGuids type
type
Namespace
vBase
Summary
Contains the GUIDs for the COM interfaces and classes.
IReceipt type
type
Namespace
vBase.Receipts
Summary
Represents a transaction receipt.
Timestamp property
property
Summary
The transaction timestamp in Unix time format (seconds).
IVerificationResult type
type
Namespace
vBase
Summary
Represents the result of a verification operation.
VerificationFindings property
property
Summary
A collection of verification findings.
VerificationPassed property
property
Summary
Indicates whether the verification passed.
IWeb3Receipt type
type
Namespace
vBase.Receipts
Summary
WEB3-specific receipt. Additionally to the base timestamp, it contains the transaction hash.
In COM interfaces can inherit from one another. However, the .NET implementation that exposes the .NET interface to COM does not support inheritance. Therefore, you must replicate any interface members in a base interface to the derived interface. The interop code does not look at base interface types when building the exposed COM interface.
Timestamp property
property
Summary
The transaction timestamp in Unix time format (seconds).
TransactionHash property
property
Summary
The transaction hash.
IvBaseBuilder type
type
Namespace
vBase
Summary
COM does not support constructors with parameters, so we need to use a factory method to create the objects.
CreateDataset(client,name,objectType) method
method
Summary
Create a COM visible dataset object.
Returns
Newly created dataset object.
Parameters
client
vBase client.
name
The name of the dataset.
objectType
Type of the objects that will be stored in the dataset.
CreateDatasetFromJson(client,json) method
method
Summary
Create a COM visible dataset object.
Returns
Newly created dataset object.
Parameters
client
vBase client.
json
Json that contains all data records, and dataset properties.
CreateForwarderClient(forwarderUrl,apiKey,privateKey) method
method
Summary
Create a COM visible client for the vBase API.
Returns
Newly created client object.
Parameters
forwarderUrl
Forwarder API url.
apiKey
API key.
privateKey
Private key.
IvBaseClient type
type
Namespace
vBase
Summary
COM visible client interface for the vBase API. It's a shim between the COM client and the vBase.Core client class.
AddNamedSet(name) method
method
Summary
Creates a commitment for a set with a given name. The set will be added for the account associated with the client object.
Parameters
name
The name of the set.
AddSet(setCid) method
method
Summary
Records a set commitment.
Parameters
setCid
The HEX encoded CID (hash) identifying the set.
AddSetObject(setCid,objectCid) method
method
Summary
Adds a record to the dataset.
Returns
The transaction timestamp of the record addition in Unix time format (seconds).
Parameters
setCid
HEX encoded CID for the set containing the object.
objectCid
HEX encoded CID of the object to record.
UserNamedSetExists(user,name) method
method
Summary
Checks if a named dataset exists.
Returns
True if the set with the given name exists; False otherwise.
Parameters
user
The address for the user who recorded the commitment.
name
The name of the set.
VerifyUserObject(user,objectCid,timestamp) method
method
Summary
Verifies an object commitment previously recorded.
Returns
True if the commitment has been verified successfully; False otherwise.
Parameters
user
The address for the user who recorded the commitment.
objectCid
The HEX encoded CID of the object.
timestamp
The timestamp of the object's creation, in Unix time format (seconds).
VerifyUserSetObjects(user,setCid,userSetObjectsCidSum) method
method
Summary
Verifies an object commitment previously recorded.
Returns
True if the commitment has been verified successfully; False otherwise.
Parameters
user
The address for the user who recorded the commitment.
setCid
The CID for the set containing the object.
userSetObjectsCidSum
The sum of all object hashes for the user set.
IvBaseDataset type
type
Namespace
vBase
Summary
Represents a set of records created on the Validity Base platform.
AddRecord(recordData) method
method
Summary
Adds a record to the dataset.
Parameters
recordData
Record to add.
ToJson() method
method
Summary
Serializes the dataset to a JSON string.
Returns
JSON string that can be deserialized using vBase SDK on any other platform.
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.
ObjectTypes type
type
Namespace
vBase
Summary
Types of objects that can be stored in a dataset.
ReceiptConverter type
type
Namespace
vBase.Infrastructure
Summary
Converts between Receipt and COM-compatible IReceipt.
ToCom(receipt) method
method
Summary
Converts a Receipt to a IReceipt.
Returns
The converted receipt.
Parameters
receipt
The receipt to convert.
SecurityProtocolHelper type
type
Namespace
vBase.Infrastructure
Summary
When running the shim in the VBA environment, we observed on some machines that the security protocol is explicitly set to Ssl3 or Tls. Such a configuration is incompatible with TLS 1.2, which is the protocol used by the Forwarder server. Experimentally, we found that setting the security protocol to 0 (SystemDefault) does not resolve the issue. Setting explicitly to Tls12 does.
ResetSecurityProtocol() method
method
Summary
Updates the security protocol to Tls12.
Parameters
This method has no parameters.
ShimInstaller type
type
Namespace
vBase.Infrastructure
Summary
It's important to register the assembly using both versions of regasm—32-bit and 64-bit. Even though the Excel process is 64-bit, it seems that the VBA execution process is 32-bit, so it doesn't recognize the registrations in the 64-bit registry.
Utils type
type
Namespace
vBase
Summary
Utility methods.
PreprocessException(action,logger) method
method
Summary
Executes an action and logs any exceptions that occur. Additionally, converts the exception into a VBA-friendly exception.
Parameters
action
Action to execute.
logger
Logger.
PreprocessException(ex) method
method
Summary
Converts a regular .NET exception into a VBA-friendly exception with all relevant information aggregated into the exception message. This improves the user experience in a VBA environment, where the error object does not include the stack trace or the original exception type.
Returns
A VBA-friendly exception with aggregated information.
Parameters
ex
The original exception.
PreprocessException``1(func,logger) method
method
Summary
Executes a function and logs any exceptions that occur. Additionally, converts the exception into a VBA-friendly exception.
Returns
Function execution result.
Parameters
func
Function to execute.
logger
Logger.
Generic Types
T
Function return type.
Last updated