DefaultSignProvider

class EosSharp::Core::Providers::DefaultSignProvider
  : public ISignProvider

Signature provider default implementation that stores private keys in memory.

Summary

Members
Descriptions

Create provider with single private key.

Create provider with list of private keys.

Create provider with dictionary of encoded key pairs.

Create provider with dictionary of key pair with private key as byte array.

Get available public keys from signature provider.

Sign bytes using the signature provider.

Sign bytes using the signature provider.

Members

public DefaultSignProvider(string privateKey)

Create provider with single private key.

Parameters

  • privateKey

public DefaultSignProvider()

public DefaultSignProvider(List< string > privateKeys)

Create provider with list of private keys.

Parameters

  • privateKeys

public DefaultSignProvider(Dictionary< string, string > encodedKeys)

Create provider with dictionary of encoded key pairs.

Parameters

  • encodedKeys

public DefaultSignProvider(Dictionary< string, byte[]> keys)

Create provider with dictionary of key pair with private key as byte array.

Parameters

  • keys

public Task< IEnumerable< string > > GetAvailableKeys()

Get available public keys from signature provider.

Returns

List of public keys

public Task< IEnumerable< string > > Sign(string chainId, IEnumerable< string > requiredKeys, byte[] signBytes, IEnumerable< string > abiNames)

Sign bytes using the signature provider.

Parameters

  • chainId EOSIO Chain id

  • requiredKeys required public keys for signing this bytes

  • signBytes signature bytes

  • abiNames abi contract names to get abi information from

Returns

List of signatures per required keys

public string Sign(string chainId, byte[] signBytes)

Sign bytes using the signature provider.

Parameters

  • key key used for signing

  • signBytes signature bytes

  • abiNames abi contract names to get abi information from

Returns

List of signatures per required keys

public Dictionary< string, string > Sign()

private readonly byte[] KeyTypeBytes= Encoding.UTF8.GetBytes("K1")

private readonly Dictionary< string, byte[]> Keys= new Dictionary<string, byte[]>()

Last updated