LogoLogo
vBase.comvBase App
  • Welcome
    • Welcome to vBase
    • Unique Advantages
    • Core Concepts
      • How vBase Works
      • What is a Stamp?
      • Technical Overview
      • Why Blockchains?
    • Example Use Cases
  • Getting Started
    • Start your Journey
    • Stamping Best Practices
    • Python Quickstart
      • Cloud Notebooks
      • Local Installation
  • Web Tools
    • Stamp an Object
    • Verify an Object
  • Use Case How-Tos
    • Verified Investment Track Records
  • Python SDK
    • Samples
      • Creating a Dataset
      • Adding a Dataset Record
      • Adding a Dataset Record Asynchronously
      • Restoring Dataset Provenance
      • Stamp Interactive Brokers Portfolio
      • Stamp Alpaca Portfolio
    • Windows Setup Guide
    • Package vbase-py
    • Package vbase-py-tools
      • Setup
      • commit_s3_objects
      • verify_s3_objects
  • Other SDKs
    • COM Library Overview
    • Working in Excel
      • Via vBase Workbook
      • Via Excel VBA
    • COM API Reference
    • C#
    • TypeScript
  • Technical Reference
    • Command Line Interface
    • Windows Subsystem for Linux (WSL) Guide
    • GCE S3 Compatible Bucket Setup
    • Smart Contract Addresses
Powered by GitBook
On this page
  • Contents
  • Cid type
  • #ctor() constructor
  • #ctor(data) constructor
  • Data property
  • Empty property
  • ToHex() method
  • Convert type
  • CryptoUtils type
  • GetCid(value,size) method
  • GetCid(value) method
  • ForwarderCommitmentService type
  • ICommitmentService type
  • DefaultUser property
  • AddSet(setCid) method
  • AddSetObject(setCid,objectCid) method
  • UserSetExists(user,setCid) method
  • VerifyUserObject(user,objectCid,timestamp) method
  • VerifyUserSetObjects(user,setCid,userSetObjectCidSum) method
  • JsonSerializationDto type
  • Receipt type
  • #ctor() constructor
  • Utils type
  • VerificationResult type
  • VerificationFindings property
  • VerificationPassed property
  • AddFinding(finding) method
  • Web3CommitmentService type
  • CallContractFunction(function,functionData) method
  • CallContractFunction(functionName,functionInput) method
  • CallStateVariable``1(stateVariableName,functionInput) method
  • FetchStateVariable``1(functionData) method
  • Web3Receipt type
  • #ctor() constructor
  • vBaseClient type
  • DefaultUser property
  • AddNamedSet(name) method
  • AddSet(setCid) method
  • AddSetObject(setCid,objectCid) method
  • UserNamedSetExists(user,name) method
  • VerifyUserObject(user,objectCid,timestamp) method
  • VerifyUserSetObjects(user,setCid,userSetObjectsCidSum) method
  • vBaseDataset type
  • #ctor(vBaseClient,name,recordTypeName) constructor
  • #ctor(vBaseClient,json) constructor
  • AddRecord(recordData) method
  • Initialize() method
  • ToJson() method
  • VerifyCommitments() method
  • vBaseException type
  • vBaseObject type
  • Data property
  • StringData property
  • GetCid() method
  • GetJson() method
  • InitFromJson(jData) method
  • vBaseStringObject type
  • vBaseObjectType constants
  1. Other SDKs

C#

PreviousCOM API ReferenceNextTypeScript

Last updated 2 months ago

Contents

Cid type

Namespace

vBase.Core

Summary

Content Identifier (CID) is used to uniquely identify objects.

#ctor() constructor

Summary

Creates a new CID from the provided byte array.

Parameters

This constructor has no parameters.

#ctor(data) constructor

Summary

Creates a new CID from the provided hex string.

Parameters

Name
Type
Description

data

Data property

Summary

The data of the CID.

Empty property

Summary

Empty CID.

ToHex() method

Summary

Returns the CID as a hex string.

Returns

Hex string.

Parameters

This method has no parameters.

Convert type

Namespace

vBase.Core.Utilities

Summary

Provides conversion methods.

CryptoUtils type

Namespace

vBase.Core.Utilities

Summary

Provides cryptographic utilities.

GetCid(value,size) method

Summary

Get SHA3 256 hash of the input integer.

Returns

SHA3 256 hash object.

Parameters

Name
Type
Description

value

Integer value.

size

Size in bits.

GetCid(value) method

Summary

Get SHA3 256 hash of the input string.

Returns

SHA3 256 hash object

Parameters

Name
Type
Description

value

input string

ForwarderCommitmentService type

Namespace

vBase.Core.Web3CommitmentService

Summary

Provides access to the CommitmentService smart contract over vBase forwarder.

ICommitmentService type

Namespace

vBase.Core

Summary

Common interface for commitment services.

DefaultUser property

Summary

Current user identifier.

AddSet(setCid) method

Summary

Records a set commitment. If the set already exists, no action will be taken.

Parameters

Name
Type
Description

setCid

The CID identifying the set.

AddSetObject(setCid,objectCid) method

Summary

Adds an object CID to the specified set.

Returns

Receipt of the operation.

Parameters

Name
Type
Description

setCid

CID of the set where the objectCid will be added.

objectCid

Object CID to add.

UserSetExists(user,setCid) method

Summary

Checks if the specified object set exists.

Parameters

Name
Type
Description

user

Set owner.

setCid

CID of the set.

VerifyUserObject(user,objectCid,timestamp) 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

Name
Type
Description

user

The address for the user who recorded the commitment.

objectCid

The CID identifying the object.

timestamp

The timestamp of the transaction.

VerifyUserSetObjects(user,setCid,userSetObjectCidSum) method

Summary

Verifies an object commitment previously recorded.

Returns

True if the commitment has been verified successfully; False otherwise.

Parameters

Name
Type
Description

user

The address for the user who recorded the commitment.

setCid

The CID for the set containing the object.

userSetObjectCidSum

The sum of all object hashes for the user set.

JsonSerializationDto 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

Namespace

vBase.Core

Summary

Represents a transaction receipt.

#ctor() constructor

Summary

Represents a transaction receipt.

Parameters

This constructor has no parameters.

Utils type

Namespace

vBase.Core.Utilities

Summary

Provides utility methods.

VerificationResult type

Namespace

vBase.Core.Dataset

Summary

VerificationFindings property

Summary

A collection of verification findings.

VerificationPassed property

Summary

Indicates whether the verification passed.

AddFinding(finding) method

Summary

Adds a finding to the verification result.

Parameters

Name
Type
Description

finding

Web3CommitmentService type

Namespace

vBase.Core.Web3CommitmentService

Summary

Provides access to the CommitmentService smart contract.

CallContractFunction(function,functionData) method

Summary

Executes Smart Contract function.

Returns

Parameters

Name
Type
Description

function

Function descriptor.

functionData

Data which will be passed as a function arguments.

CallContractFunction(functionName,functionInput) method

Summary

Calls the specified contract function.

Returns

The result of the contract function execution.

Parameters

Name
Type
Description

functionName

The name of the function to call.

functionInput

The input parameters for the function.

CallStateVariable``1(stateVariableName,functionInput) method

Summary

Fetches the specified state variable from the contract.

Returns

Variable value

Parameters

Name
Type
Description

stateVariableName

Name of the variable to fetch

functionInput

Context identifying the set

Generic Types

Name
Description

TResultType

Expected variable type

FetchStateVariable``1(functionData) method

Summary

Fetches state variable from the Smart Contract.

Returns

Variable value

Parameters

Name
Type
Description

functionData

Encoded state variable

Generic Types

Name
Description

TResultType

Expected result type

Web3Receipt type

Namespace

vBase.Core.Web3CommitmentService

Summary

WEB3-specific receipt. Additionally to the base timestamp, it contains the transaction hash.

#ctor() constructor

Summary

WEB3-specific receipt. Additionally to the base timestamp, it contains the transaction hash.

Parameters

This constructor has no parameters.

vBaseClient type

Namespace

vBase.Core

Summary

Provides Python validityBase (vBase) access.

DefaultUser property

Summary

Return the default user address used in vBase transactions.

AddNamedSet(name) method

Summary

Adds a new named set.

Returns

A task representing the asynchronous operation.

Parameters

Name
Type
Description

name

The name of the set to add.

AddSet(setCid) method

Summary

Adds a new set.

Returns

A task representing the asynchronous operation.

Parameters

Name
Type
Description

setCid

The identifier of the set.

AddSetObject(setCid,objectCid) method

Summary

Adds a new object to the set.

Returns

Receipt of the operation.

Parameters

Name
Type
Description

setCid

Set CID.

objectCid

Object to add CID.

UserNamedSetExists(user,name) method

Summary

Checks if the user has a set with the specified CID.

Returns

Parameters

Name
Type
Description

user

User's identifier.

name

Name of the set.

VerifyUserObject(user,objectCid,timestamp) 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

Name
Type
Description

user

The object owner.

objectCid

The object identifier.

timestamp

The time when the object was stamped.

VerifyUserSetObjects(user,setCid,userSetObjectsCidSum) 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

Name
Type
Description

user

The set owner.

setCid

The CID of the set.

userSetObjectsCidSum

The sum of the CIDs of all objects belonging to the set.

vBaseDataset type

Namespace

vBase.Core.Dataset

Summary

vBase dataset.

#ctor(vBaseClient,name,recordTypeName) constructor

Summary

Creates a new instance of the vBase dataset.

Parameters

Name
Type
Description

vBaseClient

The vBaseClient used for communication with the vBase smart protocol.

name

The name of the dataset.

recordTypeName

The type of records to be stored in the dataset.

Exceptions

Name
Description

Thrown if an unknown record type is provided.

#ctor(vBaseClient,json) constructor

Summary

Creates a new instance of the vBase dataset from JSON.

Parameters

Name
Type
Description

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

Name
Description

Thrown when the current CID generation algorithm does not match the one used to generate the provided JSON.

AddRecord(recordData) method

Summary

Adds a record to the dataset.

Returns

A transaction receipt.

Parameters

Name
Type
Description

recordData

The record to add. The record type must match the dataset type.

Initialize() 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

Summary

Serializes the dataset into a vBase-compatible JSON representation.

Returns

A JSON string.

Parameters

This method has no parameters.

VerifyCommitments() 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

Namespace

vBase.Core.Exceptions

Summary

Base exception for all vBase exceptions.

vBaseObject 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

Summary

The data stored in the object.

StringData property

Summary

String representation of the data.

GetCid() method

Summary

Returns

CID (Content Identifiers) for the current object

Parameters

This method has no parameters.

GetJson() method

Summary

Serializes the object to a JSON value.

Returns

Parameters

This method has no parameters.

InitFromJson(jData) method

Summary

Initializes the object from a JSON object.

Parameters

Name
Type
Description

jData

Json value.

vBaseStringObject type

Namespace

vBase.Core.Dataset.vBaseObjects

Summary

vBase Object representing a string data.

vBaseObjectType constants

Summary

vBase string object name for bidirectional compatibility with vBase Python SDK the V letter is capitalized

Contains a list of verification findings.

Returns the of the object.

Cid
#ctor()
#ctor(data)
Data
Empty
ToHex()
Convert
CryptoUtils
GetCid(value,size)
GetCid(value)
ForwarderCommitmentService
ICommitmentService
DefaultUser
AddSet(setCid)
AddSetObject(setCid,objectCid)
UserSetExists(user,setCid)
VerifyUserObject(user,objectCid,timestamp)
VerifyUserSetObjects(user,setCid,userSetObjectCidSum)
JsonSerializationDto
Receipt
#ctor()
Utils
VerificationResult
VerificationFindings
VerificationPassed
AddFinding(finding)
Web3CommitmentService
CallContractFunction(function,functionData)
CallContractFunction(functionName,functionInput)
CallStateVariable``1(stateVariableName,functionInput)
FetchStateVariable``1(functionData)
Web3Receipt
#ctor()
vBaseClient
DefaultUser
AddNamedSet(name)
AddSet(setCid)
AddSetObject(setCid,objectCid)
UserNamedSetExists(user,name)
VerifyUserObject(user,objectCid,timestamp)
VerifyUserSetObjects(user,setCid,userSetObjectsCidSum)
vBaseDataset
#ctor(vBaseClient,name,recordTypeName)
#ctor(vBaseClient,json)
AddRecord(recordData)
Initialize()
ToJson()
VerifyCommitments()
vBaseException
vBaseObject
Data
StringData
GetCid()
GetJson()
InitFromJson(jData)
vBaseStringObject
vBaseObjectType
VerifyCommitments
Cid
System.String
System.Numerics.BigInteger
System.UInt32
System.String
System.String
System.String
System.DateTimeOffset
System.String
System.Numerics.BigInteger
System.String
System.String
System.String
System.Object[]
System.String
System.Object[]
System.String
System.String
System.String
System.String
System.String
System.DateTimeOffset
System.String
System.Numerics.BigInteger
System.String
System.String
System.InvalidOperationException
System.String
System.Object
vBase.Core.Cid
vBase.Core.Cid
vBase.Core.Cid
vBase.Core.Cid
vBase.Core.Cid
vBase.Core.Cid
Nethereum.Contracts.Function
vBase.Core.Cid
vBase.Core.Cid
vBase.Core.Cid
vBase.Core.Cid
vBase.Core.Cid
vBase.Core.vBaseClient
vBase.Core.vBaseClient
vBase.Core.Exceptions.vBaseException
Newtonsoft.Json.Linq.JValue