syntax = "proto3";
package pending_props_pb;

enum BalanceType {
    USER = 0;
    WALLET =1;
}

enum UpdateType {
    PENDING_PROPS_BALANCE = 0;
    PROPS_BALANCE = 1;
    WALLET_LINK_BALANCE = 2;
}

message BalanceDetails {
    string pending = 1; // big.Int => specific app
    string total_pending = 2; // big.Int => all apps
    string transferable = 3; //big.Int ==> regular onchain balance
    string bonded = 4; //big.Int ==> locked tokens by this address
    string delegated = 5; //big.Int ==> sum of locked tokens delegated to this address
    string delegatedTo = 6; //walletAddress which bonded balance is dedicated to
    int64 timestamp = 7;
    int64 last_eth_block_id = 8;
    UpdateType last_update_type = 9;
}

message Balance {
    string user_id = 1;
    string application_id = 2;
    BalanceDetails balance_details = 3;
    BalanceDetails pre_cutoff_details = 4;
    BalanceType type = 5;
    string linked_wallet = 6;
    int64 balance_update_index = 7;
}