pub trait GeneralTransactionMetadataInfo {
    // Required methods
    fn to_json_string(
        &self,
        schema: MetadataJsonSchema
    ) -> Result<String, JsonConversionError>;
    fn from_json_string(
        json: &str,
        schema: MetadataJsonSchema
    ) -> Result<Self, JsonConversionError>
       where Self: Sized;
    fn from_jsons(
        reg_metadata: Value,
        signature_metadata: Value,
        schema: MetadataJsonSchema
    ) -> Result<Self, JsonConversionError>
       where Self: Sized;
    fn delegations(&self) -> Vec<u8> ;
    fn stake_public_key(&self) -> PublicKey;
    fn reward_address(&self) -> Address;
    fn signature(&self) -> Ed25519Signature;
    fn registration_blake_256_hash(&self) -> Blake2b256;
    fn nonce(&self) -> i32;
}
Expand description

Extension for GeneralTransactionMetadata tailored for Catalyst purposes

Required Methods§

source

fn to_json_string( &self, schema: MetadataJsonSchema ) -> Result<String, JsonConversionError>

Converts metadata to json

Errors

On json conversion error

source

fn from_json_string( json: &str, schema: MetadataJsonSchema ) -> Result<Self, JsonConversionError>where Self: Sized,

Converts json to metadata

Errors

On json conversion error

source

fn from_jsons( reg_metadata: Value, signature_metadata: Value, schema: MetadataJsonSchema ) -> Result<Self, JsonConversionError>where Self: Sized,

Converts combined jsons to registration and registration metadata

Errors

On json conversion error

source

fn delegations(&self) -> Vec<u8>

Get delegations part as bytes

source

fn stake_public_key(&self) -> PublicKey

Stake public key

source

fn reward_address(&self) -> Address

Reward address

source

fn signature(&self) -> Ed25519Signature

metadata signature

source

fn registration_blake_256_hash(&self) -> Blake2b256

registration metadata hash

source

fn nonce(&self) -> i32

nonce

Implementations on Foreign Types§

source§

impl GeneralTransactionMetadataInfo for GeneralTransactionMetadata

source§

fn to_json_string( &self, schema: MetadataJsonSchema ) -> Result<String, JsonConversionError>

source§

fn from_json_string( json: &str, schema: MetadataJsonSchema ) -> Result<Self, JsonConversionError>

source§

fn from_jsons( reg_metadata: Value, signature_metadata: Value, schema: MetadataJsonSchema ) -> Result<Self, JsonConversionError>where Self: Sized,

source§

fn delegations(&self) -> Vec<u8>

source§

fn stake_public_key(&self) -> PublicKey

source§

fn reward_address(&self) -> Address

source§

fn signature(&self) -> Ed25519Signature

source§

fn registration_blake_256_hash(&self) -> Blake2b256

source§

fn nonce(&self) -> i32

Implementors§