Balance Object

balance_claim_operation

Claim a balance in a balance_object.
This operation is used to claim the balance in a given balance_object. If the balance object contains a vesting balance, total_claimed must not exceed available vasting balance to withdraw at the time of evaluation. If the object contains a non-vesting balance, total_claimed must be the full balance of the object.
1
struct balance_claim_operation : public base_operation
2
{
3
struct fee_parameters_type {};
4
5
asset fee;
6
account_id_type deposit_to_account;
7
balance_id_type balance_to_claim;
8
eddsa::public_key_t balance_owner_key;
9
asset total_claimed;
10
11
extensions_type extensions;
12
13
account_id_type fee_payer()const { return deposit_to_account; }
14
share_type calculate_fee(const fee_parameters_type& )const { return 0; }
15
void validate()const;
16
void get_required_authorities( vector<authority>& a )const
17
{
18
a.push_back( authority( 1, balance_owner_key, 1 ) );
19
}
20
};
Copied!
asset
authority

JSON Example

1
[
2
28,
3
{
4
"fee": {
5
"amount": 0,
6
"asset_id": "1.3.0"
7
},
8
"deposit_to_account": "1.2.0",
9
"balance_to_claim": "1.8.0",
10
"balance_owner_key": "ECHODaQencDTLD5u6LGk9JNaMoJBh6sAkGchMnZPjtJXdvG3",
11
"total_claimed": {
12
"amount": 0,
13
"asset_id": "1.3.0"
14
},
15
"extensions": []
16
}
17
]
Copied!

balance_freeze_operation

Freeze balance to get more reward during fee distribution.
Duration is indicated in days. For the selected duration, the balance modifier must be specified in the chain parameters.
1
struct balance_freeze_operation : public base_operation {
2
struct fee_parameters_type {
3
uint64_t fee = 1000;
4
};
5
6
asset fee;
7
account_id_type account;
8
asset amount;
9
uint16_t duration;
10
11
extensions_type extensions;
12
13
account_id_type fee_payer() const { return account; }
14
};
Copied!
asset

JSON Example

1
[
2
29,
3
{
4
"fee": {
5
"amount": 0,
6
"asset_id": "1.3.0"
7
},
8
"account": "1.2.0",
9
"amount": {
10
"amount": 0,
11
"asset_id": "1.3.0"
12
},
13
"duration": 0,
14
"extensions": []
15
}
16
]
Copied!

balance_unfreeze_operation

Unfreeze balance.
This operation is used to unfreeze frozen balance so you can use this balance in transactions.
1
struct balance_unfreeze_operation : public balance_freeze_operation {
2
account_id_type account;
3
asset amount;
4
extensions_type extensions;
5
6
account_id_type fee_payer() const { return ECHO_NULL_ACCOUNT; }
7
};
Copied!
asset

JSON Example

1
[
2
30,
3
{
4
"account": "1.2.0",
5
"amount": {
6
"amount": 0,
7
"asset_id": "1.3.0"
8
},
9
"extensions": []
10
}
11
]
Copied!

request_balance_unfreeze_operation

Request to unfreeze balance.
This operation is used to unfreeze frozen balance so you can use this balance in transactions.
1
struct request_balance_unfreeze_operation : public base_operation
2
{
3
asset fee;
4
account_id_type account;
5
std::vector<frozen_balance_id_type> objects_to_unfreeze;
6
extensions_type extensions;
7
8
account_id_type fee_payer() const { return account; }
9
};
Copied!
asset

JSON Example

1
[
2
31,
3
{
4
"fee": {
5
"amount": 0,
6
"asset_id": "1.3.0"
7
},
8
"account": "1.2.0",
9
10
"objects_to_unfreeze": ["1.9.1", "1.9.2"],
11
"extensions": []
12
}
13
]
Copied!
Last modified 1yr ago