# C\#

## Contents

* [Cid](#tvbasecorecid)
  * [#ctor()](#mvbasecorecidctorsystembyte)
  * [#ctor(data)](#mvbasecorecidctorsystemstring)
  * [Data](#pvbasecoreciddata)
  * [Empty](#pvbasecorecidempty)
  * [ToHex()](#mvbasecorecidtohex)
* [Convert](#tvbasecoreutilitiesconvert)
* [CryptoUtils](#tvbasecoreutilitiescryptoutils)
  * [GetCid(value,size)](#mvbasecoreutilitiescryptoutilsgetcidsystemnumericsbigintegersystemuint32)
  * [GetCid(value)](#mvbasecoreutilitiescryptoutilsgetcidsystemstring)
* [ForwarderCommitmentService](#tvbasecoreweb3commitmentserviceforwardercommitmentservice)
* [ICommitmentService](#tvbasecoreicommitmentservice)
  * [DefaultUser](#pvbasecoreicommitmentservicedefaultuser)
  * [AddSet(setCid)](#mvbasecoreicommitmentserviceaddsetvbasecorecid)
  * [AddSetObject(setCid,objectCid)](#mvbasecoreicommitmentserviceaddsetobjectvbasecorecidvbasecorecid)
  * [UserSetExists(user,setCid)](#mvbasecoreicommitmentserviceusersetexistssystemstringvbasecorecid)
  * [VerifyUserObject(user,objectCid,timestamp)](#mvbasecoreicommitmentserviceverifyuserobjectsystemstringvbasecorecidsystemdatetimeoffset)
  * [VerifyUserSetObjects(user,setCid,userSetObjectCidSum)](#mvbasecoreicommitmentserviceverifyusersetobjectssystemstringvbasecorecidsystemnumericsbiginteger)
* [JsonSerializationDto](#tvbasecoredatasetjsonserializationdto)
* [Receipt](#tvbasecorereceipt)
  * [#ctor()](#mvbasecorereceiptctorsystemdatetimeoffset)
* [Utils](#tvbasecoreutilitiesutils)
* [VerificationResult](#tvbasecoredatasetverificationresult)
  * [VerificationFindings](#pvbasecoredatasetverificationresultverificationfindings)
  * [VerificationPassed](#pvbasecoredatasetverificationresultverificationpassed)
  * [AddFinding(finding)](#mvbasecoredatasetverificationresultaddfindingsystemstring)
* [Web3CommitmentService](#tvbasecoreweb3commitmentserviceweb3commitmentservice)
  * [CallContractFunction(function,functionData)](#mvbasecoreweb3commitmentserviceweb3commitmentservicecallcontractfunctionnethereumcontractsfunctionsystemstring)
  * [CallContractFunction(functionName,functionInput)](#mvbasecoreweb3commitmentserviceweb3commitmentservicecallcontractfunctionsystemstringsystemobject)
  * [CallStateVariable\`\`1(stateVariableName,functionInput)](#mvbasecoreweb3commitmentserviceweb3commitmentservicecallstatevariable1systemstringsystemobject)
  * [FetchStateVariable\`\`1(functionData)](#mvbasecoreweb3commitmentserviceweb3commitmentservicefetchstatevariable1systemstring)
* [Web3Receipt](#tvbasecoreweb3commitmentserviceweb3receipt)
  * [#ctor()](#mvbasecoreweb3commitmentserviceweb3receiptctorsystemstringsystemdatetimeoffset)
* [vBaseClient](#tvbasecorevbaseclient)
  * [DefaultUser](#pvbasecorevbaseclientdefaultuser)
  * [AddNamedSet(name)](#mvbasecorevbaseclientaddnamedsetsystemstring)
  * [AddSet(setCid)](#mvbasecorevbaseclientaddsetvbasecorecid)
  * [AddSetObject(setCid,objectCid)](#mvbasecorevbaseclientaddsetobjectvbasecorecidvbasecorecid)
  * [UserNamedSetExists(user,name)](#mvbasecorevbaseclientusernamedsetexistssystemstringsystemstring)
  * [VerifyUserObject(user,objectCid,timestamp)](#mvbasecorevbaseclientverifyuserobjectsystemstringvbasecorecidsystemdatetimeoffset)
  * [VerifyUserSetObjects(user,setCid,userSetObjectsCidSum)](#mvbasecorevbaseclientverifyusersetobjectssystemstringvbasecorecidsystemnumericsbiginteger)
* [vBaseDataset](#tvbasecoredatasetvbasedataset)
  * [#ctor(vBaseClient,name,recordTypeName)](#mvbasecoredatasetvbasedatasetctorvbasecorevbaseclientsystemstringsystemstring)
  * [#ctor(vBaseClient,json)](#mvbasecoredatasetvbasedatasetctorvbasecorevbaseclientsystemstring)
  * [AddRecord(recordData)](#mvbasecoredatasetvbasedatasetaddrecordsystemobject)
  * [Initialize()](#mvbasecoredatasetvbasedatasetinitialize)
  * [ToJson()](#mvbasecoredatasetvbasedatasettojson)
  * [VerifyCommitments()](#mvbasecoredatasetvbasedatasetverifycommitments)
* [vBaseException](#tvbasecoreexceptionsvbaseexception)
* [vBaseObject](#tvbasecoredatasetvbaseobjectsvbaseobject)
  * [Data](#pvbasecoredatasetvbaseobjectsvbaseobjectdata)
  * [StringData](#pvbasecoredatasetvbaseobjectsvbaseobjectstringdata)
  * [GetCid()](#mvbasecoredatasetvbaseobjectsvbaseobjectgetcid)
  * [GetJson()](#mvbasecoredatasetvbaseobjectsvbaseobjectgetjson)
  * [InitFromJson(jData)](#mvbasecoredatasetvbaseobjectsvbaseobjectinitfromjsonnewtonsoftjsonlinqjvalue)
* [vBaseStringObject](#tvbasecoredatasetvbaseobjectsvbasestringobject)
  * [vBaseObjectType](#fvbasecoredatasetvbaseobjectsvbasestringobjectvbaseobjecttype)

## Cid `type` <a href="#tvbasecorecid" id="tvbasecorecid"></a>

**Namespace**

vBase.Core

**Summary**

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

### #ctor() `constructor` <a href="#mvbasecorecidctorsystembyte" id="mvbasecorecidctorsystembyte"></a>

**Summary**

Creates a new CID from the provided byte array.

**Parameters**

This constructor has no parameters.

### #ctor(data) `constructor` <a href="#mvbasecorecidctorsystemstring" id="mvbasecorecidctorsystemstring"></a>

**Summary**

Creates a new CID from the provided hex string.

**Parameters**

| Name | Type                                                                                                      | Description |
| ---- | --------------------------------------------------------------------------------------------------------- | ----------- |
| data | [System.String](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1\&l=EN-US\&k=k:System.String) |             |

### Data `property` <a href="#pvbasecoreciddata" id="pvbasecoreciddata"></a>

**Summary**

The data of the CID.

### Empty `property` <a href="#pvbasecorecidempty" id="pvbasecorecidempty"></a>

**Summary**

Empty CID.

### ToHex() `method` <a href="#mvbasecorecidtohex" id="mvbasecorecidtohex"></a>

**Summary**

Returns the CID as a hex string.

**Returns**

Hex string.

**Parameters**

This method has no parameters.

## Convert `type` <a href="#tvbasecoreutilitiesconvert" id="tvbasecoreutilitiesconvert"></a>

**Namespace**

vBase.Core.Utilities

**Summary**

Provides conversion methods.

## CryptoUtils `type` <a href="#tvbasecoreutilitiescryptoutils" id="tvbasecoreutilitiescryptoutils"></a>

**Namespace**

vBase.Core.Utilities

**Summary**

Provides cryptographic utilities.

### GetCid(value,size) `method` <a href="#mvbasecoreutilitiescryptoutilsgetcidsystemnumericsbigintegersystemuint32" id="mvbasecoreutilitiescryptoutilsgetcidsystemnumericsbigintegersystemuint32"></a>

**Summary**

Get SHA3 256 hash of the input integer.

**Returns**

SHA3 256 hash object.

**Parameters**

| Name  | Type                                                                                                                                | Description    |
| ----- | ----------------------------------------------------------------------------------------------------------------------------------- | -------------- |
| value | [System.Numerics.BigInteger](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1\&l=EN-US\&k=k:System.Numerics.BigInteger) | Integer value. |
| size  | [System.UInt32](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1\&l=EN-US\&k=k:System.UInt32)                           | Size in bits.  |

### GetCid(value) `method` <a href="#mvbasecoreutilitiescryptoutilsgetcidsystemstring" id="mvbasecoreutilitiescryptoutilsgetcidsystemstring"></a>

**Summary**

Get SHA3 256 hash of the input string.

**Returns**

SHA3 256 hash object

**Parameters**

| Name  | Type                                                                                                      | Description  |
| ----- | --------------------------------------------------------------------------------------------------------- | ------------ |
| value | [System.String](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1\&l=EN-US\&k=k:System.String) | input string |

## ForwarderCommitmentService `type` <a href="#tvbasecoreweb3commitmentserviceforwardercommitmentservice" id="tvbasecoreweb3commitmentserviceforwardercommitmentservice"></a>

**Namespace**

vBase.Core.Web3CommitmentService

**Summary**

Provides access to the CommitmentService smart contract over vBase forwarder.

## ICommitmentService `type` <a href="#tvbasecoreicommitmentservice" id="tvbasecoreicommitmentservice"></a>

**Namespace**

vBase.Core

**Summary**

Common interface for commitment services.

### DefaultUser `property` <a href="#pvbasecoreicommitmentservicedefaultuser" id="pvbasecoreicommitmentservicedefaultuser"></a>

**Summary**

Current user identifier.

### AddSet(setCid) `method` <a href="#mvbasecoreicommitmentserviceaddsetvbasecorecid" id="mvbasecoreicommitmentserviceaddsetvbasecorecid"></a>

**Summary**

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

**Parameters**

| Name   | Type                             | Description                  |
| ------ | -------------------------------- | ---------------------------- |
| setCid | [vBase.Core.Cid](#tvbasecorecid) | The CID identifying the set. |

### AddSetObject(setCid,objectCid) `method` <a href="#mvbasecoreicommitmentserviceaddsetobjectvbasecorecidvbasecorecid" id="mvbasecoreicommitmentserviceaddsetobjectvbasecorecidvbasecorecid"></a>

**Summary**

Adds an object CID to the specified set.

**Returns**

Receipt of the operation.

**Parameters**

| Name      | Type                             | Description                                       |
| --------- | -------------------------------- | ------------------------------------------------- |
| setCid    | [vBase.Core.Cid](#tvbasecorecid) | CID of the set where the objectCid will be added. |
| objectCid | [vBase.Core.Cid](#tvbasecorecid) | Object CID to add.                                |

### UserSetExists(user,setCid) `method` <a href="#mvbasecoreicommitmentserviceusersetexistssystemstringvbasecorecid" id="mvbasecoreicommitmentserviceusersetexistssystemstringvbasecorecid"></a>

**Summary**

Checks if the specified object set exists.

**Parameters**

| Name   | Type                                                                                                      | Description     |
| ------ | --------------------------------------------------------------------------------------------------------- | --------------- |
| user   | [System.String](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1\&l=EN-US\&k=k:System.String) | Set owner.      |
| setCid | [vBase.Core.Cid](#tvbasecorecid)                                                                          | CID of the set. |

### VerifyUserObject(user,objectCid,timestamp) `method` <a href="#mvbasecoreicommitmentserviceverifyuserobjectsystemstringvbasecorecidsystemdatetimeoffset" id="mvbasecoreicommitmentserviceverifyuserobjectsystemstringvbasecorecidsystemdatetimeoffset"></a>

**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      | [System.String](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1\&l=EN-US\&k=k:System.String)                 | The address for the user who recorded the commitment. |
| objectCid | [vBase.Core.Cid](#tvbasecorecid)                                                                                          | The CID identifying the object.                       |
| timestamp | [System.DateTimeOffset](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1\&l=EN-US\&k=k:System.DateTimeOffset) | The timestamp of the transaction.                     |

### VerifyUserSetObjects(user,setCid,userSetObjectCidSum) `method` <a href="#mvbasecoreicommitmentserviceverifyusersetobjectssystemstringvbasecorecidsystemnumericsbiginteger" id="mvbasecoreicommitmentserviceverifyusersetobjectssystemstringvbasecorecidsystemnumericsbiginteger"></a>

**Summary**

Verifies an object commitment previously recorded.

**Returns**

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

**Parameters**

| Name                | Type                                                                                                                                | Description                                           |
| ------------------- | ----------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------- |
| user                | [System.String](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1\&l=EN-US\&k=k:System.String)                           | The address for the user who recorded the commitment. |
| setCid              | [vBase.Core.Cid](#tvbasecorecid)                                                                                                    | The CID for the set containing the object.            |
| userSetObjectCidSum | [System.Numerics.BigInteger](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1\&l=EN-US\&k=k:System.Numerics.BigInteger) | The sum of all object hashes for the user set.        |

## JsonSerializationDto `type` <a href="#tvbasecoredatasetjsonserializationdto" id="tvbasecoredatasetjsonserializationdto"></a>

**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` <a href="#tvbasecorereceipt" id="tvbasecorereceipt"></a>

**Namespace**

vBase.Core

**Summary**

Represents a transaction receipt.

### #ctor() `constructor` <a href="#mvbasecorereceiptctorsystemdatetimeoffset" id="mvbasecorereceiptctorsystemdatetimeoffset"></a>

**Summary**

Represents a transaction receipt.

**Parameters**

This constructor has no parameters.

## Utils `type` <a href="#tvbasecoreutilitiesutils" id="tvbasecoreutilitiesutils"></a>

**Namespace**

vBase.Core.Utilities

**Summary**

Provides utility methods.

## VerificationResult `type` <a href="#tvbasecoredatasetverificationresult" id="tvbasecoredatasetverificationresult"></a>

**Namespace**

vBase.Core.Dataset

**Summary**

Contains a list of verification findings. [VerifyCommitments](#mvbasecoredatasetvbasedatasetverifycommitments)

### VerificationFindings `property` <a href="#pvbasecoredatasetverificationresultverificationfindings" id="pvbasecoredatasetverificationresultverificationfindings"></a>

**Summary**

A collection of verification findings.

### VerificationPassed `property` <a href="#pvbasecoredatasetverificationresultverificationpassed" id="pvbasecoredatasetverificationresultverificationpassed"></a>

**Summary**

Indicates whether the verification passed.

### AddFinding(finding) `method` <a href="#mvbasecoredatasetverificationresultaddfindingsystemstring" id="mvbasecoredatasetverificationresultaddfindingsystemstring"></a>

**Summary**

Adds a finding to the verification result.

**Parameters**

| Name    | Type                                                                                                      | Description |
| ------- | --------------------------------------------------------------------------------------------------------- | ----------- |
| finding | [System.String](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1\&l=EN-US\&k=k:System.String) |             |

## Web3CommitmentService `type` <a href="#tvbasecoreweb3commitmentserviceweb3commitmentservice" id="tvbasecoreweb3commitmentserviceweb3commitmentservice"></a>

**Namespace**

vBase.Core.Web3CommitmentService

**Summary**

Provides access to the CommitmentService smart contract.

### CallContractFunction(function,functionData) `method` <a href="#mvbasecoreweb3commitmentserviceweb3commitmentservicecallcontractfunctionnethereumcontractsfunctionsy" id="mvbasecoreweb3commitmentserviceweb3commitmentservicecallcontractfunctionnethereumcontractsfunctionsy"></a>

**Summary**

Executes Smart Contract function.

**Returns**

**Parameters**

| Name         | Type                                                                                                      | Description                                        |
| ------------ | --------------------------------------------------------------------------------------------------------- | -------------------------------------------------- |
| function     | [Nethereum.Contracts.Function](#tnethereumcontractsfunction)                                              | Function descriptor.                               |
| functionData | [System.String](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1\&l=EN-US\&k=k:System.String) | Data which will be passed as a function arguments. |

### CallContractFunction(functionName,functionInput) `method` <a href="#mvbasecoreweb3commitmentserviceweb3commitmentservicecallcontractfunctionsystemstringsystemobject" id="mvbasecoreweb3commitmentserviceweb3commitmentservicecallcontractfunctionsystemstringsystemobject"></a>

**Summary**

Calls the specified contract function.

**Returns**

The result of the contract function execution.

**Parameters**

| Name          | Type                                                                                                             | Description                            |
| ------------- | ---------------------------------------------------------------------------------------------------------------- | -------------------------------------- |
| functionName  | [System.String](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1\&l=EN-US\&k=k:System.String)        | The name of the function to call.      |
| functionInput | [System.Object\[\]](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1\&l=EN-US\&k=k:System.Object\[]) | The input parameters for the function. |

### CallStateVariable\`\`1(stateVariableName,functionInput) `method` <a href="#mvbasecoreweb3commitmentserviceweb3commitmentservicecallstatevariable1systemstringsystemobject" id="mvbasecoreweb3commitmentserviceweb3commitmentservicecallstatevariable1systemstringsystemobject"></a>

**Summary**

Fetches the specified state variable from the contract.

**Returns**

Variable value

**Parameters**

| Name              | Type                                                                                                             | Description                   |
| ----------------- | ---------------------------------------------------------------------------------------------------------------- | ----------------------------- |
| stateVariableName | [System.String](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1\&l=EN-US\&k=k:System.String)        | Name of the variable to fetch |
| functionInput     | [System.Object\[\]](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1\&l=EN-US\&k=k:System.Object\[]) | Context identifying the set   |

**Generic Types**

| Name        | Description            |
| ----------- | ---------------------- |
| TResultType | Expected variable type |

### FetchStateVariable\`\`1(functionData) `method` <a href="#mvbasecoreweb3commitmentserviceweb3commitmentservicefetchstatevariable1systemstring" id="mvbasecoreweb3commitmentserviceweb3commitmentservicefetchstatevariable1systemstring"></a>

**Summary**

Fetches state variable from the Smart Contract.

**Returns**

Variable value

**Parameters**

| Name         | Type                                                                                                      | Description            |
| ------------ | --------------------------------------------------------------------------------------------------------- | ---------------------- |
| functionData | [System.String](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1\&l=EN-US\&k=k:System.String) | Encoded state variable |

**Generic Types**

| Name        | Description          |
| ----------- | -------------------- |
| TResultType | Expected result type |

## Web3Receipt `type` <a href="#tvbasecoreweb3commitmentserviceweb3receipt" id="tvbasecoreweb3commitmentserviceweb3receipt"></a>

**Namespace**

vBase.Core.Web3CommitmentService

**Summary**

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

### #ctor() `constructor` <a href="#mvbasecoreweb3commitmentserviceweb3receiptctorsystemstringsystemdatetimeoffset" id="mvbasecoreweb3commitmentserviceweb3receiptctorsystemstringsystemdatetimeoffset"></a>

**Summary**

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

**Parameters**

This constructor has no parameters.

## vBaseClient `type` <a href="#tvbasecorevbaseclient" id="tvbasecorevbaseclient"></a>

**Namespace**

vBase.Core

**Summary**

Provides Python validityBase (vBase) access.

### DefaultUser `property` <a href="#pvbasecorevbaseclientdefaultuser" id="pvbasecorevbaseclientdefaultuser"></a>

**Summary**

Return the default user address used in vBase transactions.

### AddNamedSet(name) `method` <a href="#mvbasecorevbaseclientaddnamedsetsystemstring" id="mvbasecorevbaseclientaddnamedsetsystemstring"></a>

**Summary**

Adds a new named set.

**Returns**

A task representing the asynchronous operation.

**Parameters**

| Name | Type                                                                                                      | Description                 |
| ---- | --------------------------------------------------------------------------------------------------------- | --------------------------- |
| name | [System.String](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1\&l=EN-US\&k=k:System.String) | The name of the set to add. |

### AddSet(setCid) `method` <a href="#mvbasecorevbaseclientaddsetvbasecorecid" id="mvbasecorevbaseclientaddsetvbasecorecid"></a>

**Summary**

Adds a new set.

**Returns**

A task representing the asynchronous operation.

**Parameters**

| Name   | Type                             | Description                |
| ------ | -------------------------------- | -------------------------- |
| setCid | [vBase.Core.Cid](#tvbasecorecid) | The identifier of the set. |

### AddSetObject(setCid,objectCid) `method` <a href="#mvbasecorevbaseclientaddsetobjectvbasecorecidvbasecorecid" id="mvbasecorevbaseclientaddsetobjectvbasecorecidvbasecorecid"></a>

**Summary**

Adds a new object to the set.

**Returns**

Receipt of the operation.

**Parameters**

| Name      | Type                             | Description        |
| --------- | -------------------------------- | ------------------ |
| setCid    | [vBase.Core.Cid](#tvbasecorecid) | Set CID.           |
| objectCid | [vBase.Core.Cid](#tvbasecorecid) | Object to add CID. |

### UserNamedSetExists(user,name) `method` <a href="#mvbasecorevbaseclientusernamedsetexistssystemstringsystemstring" id="mvbasecorevbaseclientusernamedsetexistssystemstringsystemstring"></a>

**Summary**

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

**Returns**

**Parameters**

| Name | Type                                                                                                      | Description        |
| ---- | --------------------------------------------------------------------------------------------------------- | ------------------ |
| user | [System.String](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1\&l=EN-US\&k=k:System.String) | User's identifier. |
| name | [System.String](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1\&l=EN-US\&k=k:System.String) | Name of the set.   |

### VerifyUserObject(user,objectCid,timestamp) `method` <a href="#mvbasecorevbaseclientverifyuserobjectsystemstringvbasecorecidsystemdatetimeoffset" id="mvbasecorevbaseclientverifyuserobjectsystemstringvbasecorecidsystemdatetimeoffset"></a>

**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      | [System.String](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1\&l=EN-US\&k=k:System.String)                 | The object owner.                     |
| objectCid | [vBase.Core.Cid](#tvbasecorecid)                                                                                          | The object identifier.                |
| timestamp | [System.DateTimeOffset](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1\&l=EN-US\&k=k:System.DateTimeOffset) | The time when the object was stamped. |

### VerifyUserSetObjects(user,setCid,userSetObjectsCidSum) `method` <a href="#mvbasecorevbaseclientverifyusersetobjectssystemstringvbasecorecidsystemnumericsbiginteger" id="mvbasecorevbaseclientverifyusersetobjectssystemstringvbasecorecidsystemnumericsbiginteger"></a>

**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                 | [System.String](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1\&l=EN-US\&k=k:System.String)                           | The set owner.                                           |
| setCid               | [vBase.Core.Cid](#tvbasecorecid)                                                                                                    | The CID of the set.                                      |
| userSetObjectsCidSum | [System.Numerics.BigInteger](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1\&l=EN-US\&k=k:System.Numerics.BigInteger) | The sum of the CIDs of all objects belonging to the set. |

## vBaseDataset `type` <a href="#tvbasecoredatasetvbasedataset" id="tvbasecoredatasetvbasedataset"></a>

**Namespace**

vBase.Core.Dataset

**Summary**

vBase dataset.

### #ctor(vBaseClient,name,recordTypeName) `constructor` <a href="#mvbasecoredatasetvbasedatasetctorvbasecorevbaseclientsystemstringsystemstring" id="mvbasecoredatasetvbasedatasetctorvbasecorevbaseclientsystemstringsystemstring"></a>

**Summary**

Creates a new instance of the vBase dataset.

**Parameters**

| Name           | Type                                                                                                      | Description                                                           |
| -------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------- |
| vBaseClient    | [vBase.Core.vBaseClient](#tvbasecorevbaseclient)                                                          | The vBaseClient used for communication with the vBase smart protocol. |
| name           | [System.String](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1\&l=EN-US\&k=k:System.String) | The name of the dataset.                                              |
| recordTypeName | [System.String](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1\&l=EN-US\&k=k:System.String) | The type of records to be stored in the dataset.                      |

**Exceptions**

| Name                                                                                                                                            | Description                                   |
| ----------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------- |
| [System.InvalidOperationException](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1\&l=EN-US\&k=k:System.InvalidOperationException) | Thrown if an unknown record type is provided. |

### #ctor(vBaseClient,json) `constructor` <a href="#mvbasecoredatasetvbasedatasetctorvbasecorevbaseclientsystemstring" id="mvbasecoredatasetvbasedatasetctorvbasecorevbaseclientsystemstring"></a>

**Summary**

Creates a new instance of the vBase dataset from JSON.

**Parameters**

| Name        | Type                                                                                                      | Description                                                                                                                        |
| ----------- | --------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- |
| vBaseClient | [vBase.Core.vBaseClient](#tvbasecorevbaseclient)                                                          | The vBaseClient used for communication with the vBase smart protocol.                                                              |
| json        | [System.String](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1\&l=EN-US\&k=k:System.String) | 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                                                                                                 |
| --------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- |
| [vBase.Core.Exceptions.vBaseException](#tvbasecoreexceptionsvbaseexception) | Thrown when the current CID generation algorithm does not match the one used to generate the provided JSON. |

### AddRecord(recordData) `method` <a href="#mvbasecoredatasetvbasedatasetaddrecordsystemobject" id="mvbasecoredatasetvbasedatasetaddrecordsystemobject"></a>

**Summary**

Adds a record to the dataset.

**Returns**

A transaction receipt.

**Parameters**

| Name       | Type                                                                                                      | Description                                                     |
| ---------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------- |
| recordData | [System.Object](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1\&l=EN-US\&k=k:System.Object) | The record to add. The record type must match the dataset type. |

### Initialize() `method` <a href="#mvbasecoredatasetvbasedatasetinitialize" id="mvbasecoredatasetvbasedatasetinitialize"></a>

**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` <a href="#mvbasecoredatasetvbasedatasettojson" id="mvbasecoredatasetvbasedatasettojson"></a>

**Summary**

Serializes the dataset into a vBase-compatible JSON representation.

**Returns**

A JSON string.

**Parameters**

This method has no parameters.

### VerifyCommitments() `method` <a href="#mvbasecoredatasetvbasedatasetverifycommitments" id="mvbasecoredatasetvbasedatasetverifycommitments"></a>

**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` <a href="#tvbasecoreexceptionsvbaseexception" id="tvbasecoreexceptionsvbaseexception"></a>

**Namespace**

vBase.Core.Exceptions

**Summary**

Base exception for all vBase exceptions.

## vBaseObject `type` <a href="#tvbasecoredatasetvbaseobjectsvbaseobject" id="tvbasecoredatasetvbaseobjectsvbaseobject"></a>

**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` <a href="#pvbasecoredatasetvbaseobjectsvbaseobjectdata" id="pvbasecoredatasetvbaseobjectsvbaseobjectdata"></a>

**Summary**

The data stored in the object.

### StringData `property` <a href="#pvbasecoredatasetvbaseobjectsvbaseobjectstringdata" id="pvbasecoredatasetvbaseobjectsvbaseobjectstringdata"></a>

**Summary**

String representation of the data.

### GetCid() `method` <a href="#mvbasecoredatasetvbaseobjectsvbaseobjectgetcid" id="mvbasecoredatasetvbaseobjectsvbaseobjectgetcid"></a>

**Summary**

Returns the [Cid](#tvbasecorecid) of the object.

**Returns**

CID (Content Identifiers) for the current object

**Parameters**

This method has no parameters.

### GetJson() `method` <a href="#mvbasecoredatasetvbaseobjectsvbaseobjectgetjson" id="mvbasecoredatasetvbaseobjectsvbaseobjectgetjson"></a>

**Summary**

Serializes the object to a JSON value.

**Returns**

**Parameters**

This method has no parameters.

### InitFromJson(jData) `method` <a href="#mvbasecoredatasetvbaseobjectsvbaseobjectinitfromjsonnewtonsoftjsonlinqjvalue" id="mvbasecoredatasetvbaseobjectsvbaseobjectinitfromjsonnewtonsoftjsonlinqjvalue"></a>

**Summary**

Initializes the object from a JSON object.

**Parameters**

| Name  | Type                                                      | Description |
| ----- | --------------------------------------------------------- | ----------- |
| jData | [Newtonsoft.Json.Linq.JValue](#tnewtonsoftjsonlinqjvalue) | Json value. |

## vBaseStringObject `type` <a href="#tvbasecoredatasetvbaseobjectsvbasestringobject" id="tvbasecoredatasetvbaseobjectsvbasestringobject"></a>

**Namespace**

vBase.Core.Dataset.vBaseObjects

**Summary**

vBase Object representing a string data.

### vBaseObjectType `constants` <a href="#fvbasecoredatasetvbaseobjectsvbasestringobjectvbaseobjecttype" id="fvbasecoredatasetvbaseobjectsvbasestringobjectvbaseobjecttype"></a>

**Summary**

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


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.vbase.com/other-sdks/vbase-core.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
