-
Notifications
You must be signed in to change notification settings - Fork 29
Open
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomers
Description
RGB assets are allocated to colorable UTXOs. One UTXO can support more than one allocation, depending on the value of max_allocations_per_utxo
(in WalletData
) provided at wallet instantiation time.
It would be useful to be able to query how many available allocations slots the wallet has. An example use case would be to know if new colorable UTXOs need to be created, in advance rather in response to an error when e.g. calling blind_receive
.
- name:
allocations
- parameters: none
- response: a new
Allocations
struct containingtotal_available
: the number of total available allocationsmap
: a map of UTXOs and the respective allocations (given the current value ofmax_allocations_per_utxo
)- key:
utxo
- value:
used
: the number of currently used allocationsavailable
: the number of currently available allocations
- key:
With this data, the user can easily know:
- if there is at least one available allocation
- the total number of possible new allocations, before having to create more UTXOs
- the number of UTXOs that can support a new allocation
Notes:
- the number of used allocations can be obtained via
get_rgb_allocations
- the number of available allocations corresponds to the value of
max_allocations_per_utxo
minus the currently used allocations
afeezaziz and marionautica
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomers