Show / Hide Table of Contents

Class MptCommand

Inheritance
Object
MptCommand
Inherited Members
Object.Equals(Object)
Object.Equals(Object, Object)
Object.GetHashCode()
Object.GetType()
Object.MemberwiseClone()
Object.ReferenceEquals(Object, Object)
Object.ToString()
Namespace: Libplanet.Extensions.Cocona.Commands
Assembly: Libplanet.Extensions.Cocona.dll
Syntax
public class MptCommand

Methods

| Improve this Doc View Source

Add(String, String, IConfigurationService<ToolConfiguration>)

Declaration
[Command(Description = "Register an alias name to refer to a key-value store.")]
public void Add([Argument(Name = "ALIAS", Description = "The alias to refer to the fully qualified key-value store URI.")] string alias, [Argument(Name = "KV-STORE-URI", Description = "<kv-store-type>://<kv-store-path> (e.g., rocksdb:///path/to/kv-store)")] string uri, [FromService] IConfigurationService<ToolConfiguration> configurationService)
Parameters
Type Name Description
String alias
String uri
IConfigurationService<ToolConfiguration> configurationService
| Improve this Doc View Source

Diff(String, String, String, String, IConfigurationService<ToolConfiguration>)

Declaration
[Command(Description = "Compare two trees via root hash.")]
public void Diff([Argument(Name = "KV-STORE", Description = "The alias name registered through `planet mpt add' command or the URI included the type of IKeyValueStore implementation and the path where it was used at. <kv-store-type>://<kv-store-path> (e.g., rocksdb:///path/to/kv-store)")] string kvStoreUri, [Argument(Name = "STATE-ROOT-HASH", Description = "The state root hash to compare.")] string stateRootHashHex, [Argument(Name = "OTHER-KV-STORE", Description = "The alias name registered through `planet mpt add' command or the URI included the type of IKeyValueStore implementation and the path where it was used at. <kv-store-type>://<kv-store-path> (e.g., rocksdb:///path/to/kv-store)")] string otherKvStoreUri, [Argument(Name = "OTHER-STATE-ROOT-HASH", Description = "Another state root hash to compare.")] string otherStateRootHashHex, [FromService] IConfigurationService<ToolConfiguration> configurationService)
Parameters
Type Name Description
String kvStoreUri
String stateRootHashHex
String otherKvStoreUri
String otherStateRootHashHex
IConfigurationService<ToolConfiguration> configurationService
| Improve this Doc View Source

Export(String, String, IConfigurationService<ToolConfiguration>)

Declaration
[Command(Description = "Export all states of the state root hash as JSON.")]
public void Export([Argument(Name = "KV-STORE", Description = "The alias name registered through `planet mpt add' command or the URI included the type of IKeyValueStore implementation and the path where it was used at. <kv-store-type>://<kv-store-path> (e.g., rocksdb:///path/to/kv-store)")] string kvStoreUri, [Argument(Name = "STATE-ROOT-HASH", Description = "The state root hash to compare.")] string stateRootHashHex, [FromService] IConfigurationService<ToolConfiguration> configurationService)
Parameters
Type Name Description
String kvStoreUri
String stateRootHashHex
IConfigurationService<ToolConfiguration> configurationService
| Improve this Doc View Source

Help(ICoconaHelpMessageBuilder)

Declaration
[PrimaryCommand]
public void Help([FromService] ICoconaHelpMessageBuilder helpMessageBuilder)
Parameters
Type Name Description
Cocona.Help.ICoconaHelpMessageBuilder helpMessageBuilder
| Improve this Doc View Source

List(IConfigurationService<ToolConfiguration>)

Declaration
[Command(Description = "List all aliases stored.")]
public void List([FromService] IConfigurationService<ToolConfiguration> configurationService)
Parameters
Type Name Description
IConfigurationService<ToolConfiguration> configurationService
| Improve this Doc View Source

Query(String, String, String, IConfigurationService<ToolConfiguration>)

Declaration
[Command(Description = "Query a state of the state key at the state root hash.  It will print the state as hexadecimal bytes string into stdout.  If it doesn't exist, it will not print anything.")]
public void Query([Argument(Name = "KV-STORE", Description = "The alias name registered through `planet mpt add' command or the URI included the type of IKeyValueStore implementation and the path where it was used at. <kv-store-type>://<kv-store-path> (e.g., rocksdb:///path/to/kv-store)")] string kvStoreUri, [Argument(Name = "STATE-ROOT-HASH", Description = "The state root hash to compare.")] string stateRootHashHex, [Argument(Name = "STATE-KEY", Description = "The key of the state to query.")] string stateKey, [FromService] IConfigurationService<ToolConfiguration> configurationService)
Parameters
Type Name Description
String kvStoreUri
String stateRootHashHex
String stateKey
IConfigurationService<ToolConfiguration> configurationService
| Improve this Doc View Source

Remove(String, IConfigurationService<ToolConfiguration>)

Declaration
[Command(Description = "Deregister an alias to a key-value store.")]
public void Remove([Argument(Name = "ALIAS", Description = "The alias name to deregister.")] string alias, [FromService] IConfigurationService<ToolConfiguration> configurationService)
Parameters
Type Name Description
String alias
IConfigurationService<ToolConfiguration> configurationService
  • Improve this Doc
  • View Source
In This Article
Back to top Copyright © 2018–2023 Planetarium