Type synonym for a collection of tokens represented using Coll
Ensures that all tokens have strictly positive value.
Ensures that all tokens have strictly positive value.
the original tokens
collection (passes the argument through to the result)
IllegalArgumentException
when any token have value <= 0
Decodes this base16 string to byte array.
Decodes this base16 string to byte array and wrap it as Coll[Byte].
Decodes this base16 string to byte array and parse it using ErgoTreeSerializer.deserializeErgoTree().
Decodes this base16 string to byte array and parse it using GroupElementSerializer.
Creates a new EIP-3 derivation parent path.
Creates a new EIP-3 derivation parent path.
The resulting path is the m/44'/429'/0'/0
path.
Creates a new EIP-3 derivation path with the given last index.
Creates a new EIP-3 derivation path with the given last index.
The resulting path corresponds to m/44'/429'/0'/0/index
path.
Extracts a mapping (assets -> total amount) from a set of boxes passed as a parameter.
Extracts a mapping (assets -> total amount) from a set of boxes passed as a parameter. That is, the method is checking amounts of assets in the boxes(i.e. that a box contains positive amount for an asset) and then summarize and group their corresponding amounts.
- boxes to check and extract assets from
a mapping from asset id to to balance and total assets number
Converts mnemonic phrase to seed it was derived from.
Converts mnemonic phrase to seed it was derived from. This method should be equivalent to Mnemonic.toSeed().
Create an extended secret key from mnemonic
Create an extended secret key from mnemonic
secret seed phrase to be used in prover for generating proofs.
password to protect secret seed phrase.
use incorrect(previous) BIP32 derivation, expected to be false for new wallets, and true for old pre-1627 wallets (see https://github.com/ergoplatform/ergo/issues/1627 for details)
Compute the difference between reducedTokens
collection and subtractedTokens
collection.
Compute the difference between reducedTokens
collection and subtractedTokens
collection.
It can be thought as reducedTokens - subtractedTokens
operation.
Each collection can have many (tokenId, amount)
pairs with the same tokenId
.
The method works by first combining all the pairs with the same tokenId and then
computing the difference.
The resulting collection contain a single pair for each tokenId and those token ids
form a subset of tokens from the argument collections.
One concrete use case to think of is subtractTokenColls(outputTokens, inputTokens)
.
In this case the resulting collection of (tokenId, amount) pairs can be interpreted as:
- when amount < 0
then it is to be burnt
- when amount > 0
then it is to be minted
the tokens to be subracted from
the tokens which amounts will be subtracted from the
corresponding tokens from reducedTokens
the differences between token amounts (matched by token ids)
Compute the difference between reducedTokens
collection and subtractedTokens
collection.
Compute the difference between reducedTokens
collection and subtractedTokens
collection.
subtractTokenColls for details