depositcalculator

package
v1.0.0-alpha.14 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 16, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MinDeposit

func MinDeposit(protocolParams iotago.ProtocolParameters, outputType iotago.OutputType, opts ...options.Option[Options]) (iotago.BaseToken, error)

func WithAddress

func WithAddress(address iotago.Address) options.Option[Options]

WithAddress sets the address for the address unlock condition.

func WithBlockIssuerKeys

func WithBlockIssuerKeys(keys int) options.Option[Options]

WithBlockIssuerKeys adds a block issuer feature and adds the given amount of dummy keys.

func WithExpirationAddress

func WithExpirationAddress(address iotago.Address) options.Option[Options]

WithExpirationAddress adds a expiration unlock condition and sets the address.

func WithGovernorAddress

func WithGovernorAddress(address iotago.Address) options.Option[Options]

WithGovernorAddress sets the address for the governor address unlock condition.

func WithHasNativeToken

func WithHasNativeToken() options.Option[Options]

WithHasNativeToken adds a native token feature.

func WithHasTimelock

func WithHasTimelock() options.Option[Options]

WithHasTimelock adds a timelock unlock condition.

func WithImmutableIssuerAddress

func WithImmutableIssuerAddress(address iotago.Address) options.Option[Options]

WithImmutableIssuerAddress adds an immutable issuer feature and sets the address.

func WithImmutableMetadataSerializedSize

func WithImmutableMetadataSerializedSize(size int) options.Option[Options]

WithImmutableMetadataSerializedSize adds an immutable metadata feature and adds an entry with an empty key and a dummy value of the given length minus the length of the map length prefix, key length prefix and value length prefix.

func WithIssuerAddress

func WithIssuerAddress(address iotago.Address) options.Option[Options]

WithIssuerAddress adds a issuer feature and sets the address.

func WithMetadataSerializedSize

func WithMetadataSerializedSize(size int) options.Option[Options]

WithMetadataSerializedSize adds a metadata feature and adds an entry with an empty key and a dummy value of the given length minus the length of the map length prefix, key length prefix and value length prefix.

func WithSenderAddress

func WithSenderAddress(address iotago.Address) options.Option[Options]

WithSenderAddress adds a sender feature and sets the address.

func WithStakedAmount

func WithStakedAmount(amount iotago.BaseToken) options.Option[Options]

WithStakedAmount adds a staking feature and sets the staked amount.

func WithStateControllerAddress

func WithStateControllerAddress(address iotago.Address) options.Option[Options]

WithStateControllerAddress sets the address for the state controller address unlock condition.

func WithStateMetadataSerializedSize

func WithStateMetadataSerializedSize(size int) options.Option[Options]

WithStateMetadataSerializedSize adds a state metadata feature and adds an entry with an empty key and a dummy value of the given length minus the length of the map length prefix, key length prefix and value length prefix.

func WithStorageDepositReturnAddress

func WithStorageDepositReturnAddress(address iotago.Address) options.Option[Options]

WithStorageDepositReturnAddress adds a storage deposit return unlock condition and sets the address.

func WithTagLength

func WithTagLength(length int) options.Option[Options]

WithTagLength adds a tag feature and sets a dummy tag with the given length.

Types

type Options

type Options struct {
	// UnlockConditions
	Address                     iotago.Address
	StorageDepositReturnAddress iotago.Address
	HasTimelock                 bool
	ExpirationAddress           iotago.Address
	StateControllerAddress      iotago.Address
	GovernorAddress             iotago.Address

	// Features
	SenderAddress               iotago.Address
	IssuerAddress               iotago.Address
	MetadataSerializedSize      int
	StateMetadataSerializedSize int
	TagLength                   int
	HasNativeToken              bool
	BlockIssuerKeys             int
	StakedAmount                iotago.BaseToken

	// Immutable Features
	ImmutableIssuerAddress          iotago.Address
	ImmutableMetadataSerializedSize int
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL