All Downloads are FREE. Search and download functionalities are using the official Maven repository.

waves.events.events.proto Maven / Gradle / Ivy

There is a newer version: 1.5.2
Show newest version
syntax = "proto3";
package waves.events;
option java_package = "com.wavesplatform.events.protobuf";
option go_package = "github.com/wavesplatform/gowaves/pkg/grpc/generated/waves/events";

import "waves/block.proto";
import "waves/amount.proto";
import "waves/transaction.proto";
import "waves/invoke_script_result.proto";

message BlockchainUpdated {
    bytes id = 1;
    int32 height = 2;

    message Append {
        message BlockAppend {
            Block block = 1;
            int64 updated_waves_amount = 2;
        }

        message MicroBlockAppend {
            SignedMicroBlock micro_block = 1;
            bytes updated_transactions_root = 2;
        }

        oneof body {
            BlockAppend block = 1;
            MicroBlockAppend micro_block = 2;
        }

        repeated bytes transaction_ids = 3;
        repeated TransactionMetadata transactions_metadata = 4;

        StateUpdate state_update = 11;
        repeated StateUpdate transaction_state_updates = 12;
    }

    message Rollback {
        enum RollbackType {
            BLOCK = 0;
            MICROBLOCK = 1;
        }

        RollbackType type = 1;
        repeated bytes removed_transaction_ids = 2;
        repeated Block removed_blocks = 3;
        StateUpdate rollback_state_update = 4;
    }

    oneof update {
        Append append = 11;
        Rollback rollback = 12;
    }

    repeated StateUpdate.AssetInfo referenced_assets = 21;
}

message StateUpdate {
    repeated BalanceUpdate balances = 1;
    repeated LeasingUpdate leasing_for_address = 2;
    repeated DataEntryUpdate data_entries = 3;
    repeated AssetStateUpdate assets = 4;
    repeated LeaseUpdate individual_leases = 5;

    message BalanceUpdate {
        bytes address = 1;
        Amount amount_after = 2;
        int64 amount_before = 3;
    }

    message LeasingUpdate {
        bytes address = 1;
        int64 in_after = 2;
        int64 out_after = 3;
        int64 in_before = 4;
        int64 out_before = 5;
    }

    message LeaseUpdate {
        enum LeaseStatus {
            INACTIVE = 0;
            ACTIVE = 1;
        }

        bytes lease_id = 1;
        LeaseStatus status_after = 2;
        int64 amount = 10;
        bytes sender = 11;
        bytes recipient = 12;
        bytes origin_transaction_id = 13;
    }

    message DataEntryUpdate {
        bytes address = 1;
        DataTransactionData.DataEntry data_entry = 2;
        DataTransactionData.DataEntry data_entry_before = 10;
    }

    message AssetStateUpdate {
        AssetDetails before = 1;
        AssetDetails after = 2;
    }

    message AssetDetails {
        message AssetScriptInfo {
            bytes script = 1;
            int64 complexity = 2;
        }

        bytes asset_id = 1;
        bytes issuer = 2;
        int32 decimals = 3;
        string name = 4;
        string description = 5;
        bool reissuable = 6;
        int64 volume = 7;
        AssetScriptInfo script_info = 8;
        int64 sponsorship = 9;
        bool nft = 10;
        int32 last_updated = 11;

        /*
                Related to a past behavior in the blockchain when it was possible to reissue
                assets so that the total volume became more then int64 max value.
                This field represents accurate volume even for those assets.
                Can be ignored if the target system does not need such accuracy.
                Encoding: like Java BigInteger, https://docs.oracle.com/javase/7/docs/api/java/math/BigInteger.html#toByteArray()
            */
        bytes safe_volume = 20;
    }

    message AssetInfo {
        bytes id = 1;
        int32 decimals = 2;
        string name = 3;
    }
}

message TransactionMetadata {
    oneof metadata {
        // Metadata  = 1
        TransferMetadata transfer = 104;
        MassTransferMetadata mass_transfer = 111;
        InvokeScriptMetadata invoke_script = 116;
        LeaseMetadata lease_meta = 117;
    };

    // message Metadata { ... }
    message TransferMetadata {
        bytes recipient_address = 1;
    }

    message MassTransferMetadata {
        repeated bytes recipients_addresses = 1;
    }

    message InvokeScriptMetadata {
        bytes d_app_address = 1;
        string function_name = 2;
        repeated InvokeScriptResult.Call.Argument arguments = 3;
        repeated Amount payments = 4;
        InvokeScriptResult result = 5;
    }

    message LeaseMetadata {
        bytes recipient_address = 1;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy