Skip to content

Generated schema for tokenization/balances.proto: 3 messages in the x/tokenization module.

Proto package tokenization, part of the x/tokenization module. It declares 3 messages. Read the raw source.

Messages

Balance

Balance represents the balance of a token for a specific user. The user amounts xAmount of a token specified for the time ranges specified.

Example: User A owns x10 of token IDs 1-10 from 1/1/2020 to 1/1/2021.

If times or tokenIDs have len > 1, then the user owns all token IDs specified for all time ranges specified.

Field#TypeRuleDescription
amount1stringsingularThe amount of the token owned by the user.
ownershipTimes2UintRangerepeatedThe time ranges during which the user owns the token.
tokenIds3UintRangerepeatedThe token IDs for which the user owns the token.

PrecalculationOptions

PrecalculationOptions defines the options for precalculating the balances.

Field#TypeRuleDescription
overrideTimestamp1stringsingularThe timestamp to override with when calculating the balances.
tokenIdsOverride2UintRangerepeatedThe IDs to override for the transfer. Only applicable if using this option in precalculation.
scalingMultiplier3stringsingularWhen > 0 and allowAmountScaling is true on the approval, all precalculated balance amounts are multiplied by this value. Must be <= maxScalingMultiplier. 0 means no scaling (returns 1x base).

UintRange

The UintRange is a range of IDs from some start to some end (inclusive). uintRanges are one of the core types used.

They are used for everything from token IDs to time ranges to min/max balance amounts.

See the BitBadges documentation for more information.

Field#TypeRuleDescription
start1stringsingularThe starting value of the range (inclusive).
end2stringsingularThe ending value of the range (inclusive).

Edit this page on GitHub