sdk

package
v0.8.4 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2024 License: Apache-2.0 Imports: 34 Imported by: 72

Documentation

Overview

Package sdk provides a client library for the Catapult REST API.

Index

Constants

View Source
const (
	None nodeRole = 0x00
	Peer nodeRole = 0x01
	Api  nodeRole = 0x02
)
View Source
const (
	DefaultWebsocketReconnectionTimeout = time.Second * 5
	DefaultFeeCalculationStrategy       = MiddleCalculationStrategy
	DefaultMaxFee                       = 75 * 1000000
)
View Source
const (
	AddressSize                              int = 25
	BaseInt64Size                            int = 8
	AmountSize                                   = BaseInt64Size
	KeySize                                  int = 32
	Hash256                                  int = 32
	MosaicIdSize                                 = BaseInt64Size
	NamespaceSize                                = BaseInt64Size
	SizeSize                                 int = 4
	MaxStringSize                            int = 2
	SignerSize                                   = KeySize
	SignatureSize                            int = 64
	AggregateCosignatureSize                     = SignerSize + SignatureSize
	HalfOfSignature                              = SignatureSize / 2
	VersionSize                              int = 4
	TypeSize                                 int = 2
	MaxFeeSize                                   = BaseInt64Size
	DeadLineSize                                 = BaseInt64Size
	DurationSize                                 = BaseInt64Size
	OpinionSizeSize                              = BaseInt64Size
	StorageSizeSize                              = BaseInt64Size
	TransactionHeaderSize                        = SizeSize + SignerSize + SignatureSize + VersionSize + TypeSize + MaxFeeSize + DeadLineSize
	PropertyTypeSize                         int = 2
	PropertyModificationTypeSize             int = 1
	AccountPropertiesAddressModificationSize     = PropertyModificationTypeSize + AddressSize
	AccountPropertiesMosaicModificationSize      = PropertyModificationTypeSize + MosaicIdSize
	AccountPropertiesEntityModificationSize      = PropertyModificationTypeSize + TypeSize
	AccountPropertyAddressHeader                 = TransactionHeaderSize + PropertyTypeSize
	AccountPropertyMosaicHeader                  = TransactionHeaderSize + PropertyTypeSize
	AccountPropertyEntityTypeHeader              = TransactionHeaderSize + PropertyTypeSize
	LinkActionSize                           int = 1
	AccountLinkTransactionSize                   = TransactionHeaderSize + KeySize + LinkActionSize
	AliasActionSize                          int = 1
	AliasTransactionHeaderSize                   = TransactionHeaderSize + NamespaceSize + AliasActionSize
	AggregateBondedHeaderSize                    = TransactionHeaderSize + SizeSize
	NetworkConfigHeaderSize                      = TransactionHeaderSize + BaseInt64Size + MaxStringSize + MaxStringSize
	BlockchainUpgradeTransactionSize             = TransactionHeaderSize + DurationSize + BaseInt64Size
	HashTypeSize                             int = 1
	LockSize                                     = TransactionHeaderSize + MosaicIdSize + AmountSize + DurationSize + Hash256
	MetadataTypeSize                         int = 1
	MetadataHeaderSize                           = TransactionHeaderSize + MetadataTypeSize
	MetadataV2HeaderSize                         = TransactionHeaderSize + KeySize + BaseInt64Size + 2 + 2
	ModificationsSizeSize                    int = 1
	ModifyContractHeaderSize                     = TransactionHeaderSize + DurationSize + Hash256 + 3*ModificationsSizeSize
	MinApprovalSize                          int = 1
	MinRemovalSize                           int = 1
	ModifyMultisigHeaderSize                     = TransactionHeaderSize + MinApprovalSize + MinRemovalSize + ModificationsSizeSize
	MosaicNonceSize                          int = 4
	MosaicPropertiesHeaderSize               int = 3
	MosaicPropertyIdSize                     int = 1
	MosaicOptionalPropertySize                   = MosaicPropertyIdSize + BaseInt64Size
	MosaicDefinitionTransactionHeaderSize        = TransactionHeaderSize + MosaicNonceSize + MosaicIdSize + MosaicPropertiesHeaderSize
	MosaicSupplyDirectionSize                int = 1
	MosaicSupplyChangeTransactionSize            = TransactionHeaderSize + MosaicIdSize + AmountSize + MosaicSupplyDirectionSize
	MosaicLevySize                               = 1 + AddressSize + MosaicIdSize + MaxFeeSize
	MosaicModifyLevyTransactionSize              = TransactionHeaderSize + MosaicLevySize + MosaicIdSize
	MosaicRemoveLevyTransactionSize              = TransactionHeaderSize + MosaicIdSize
	NamespaceTypeSize                        int = 1
	NamespaceNameSizeSize                    int = 1
	RegisterNamespaceHeaderSize                  = TransactionHeaderSize + NamespaceTypeSize + DurationSize + NamespaceSize + NamespaceNameSizeSize
	SecretLockSize                               = TransactionHeaderSize + MosaicIdSize + AmountSize + DurationSize + HashTypeSize + Hash256 + AddressSize
	ProofSizeSize                            int = 2
	SecretProofHeaderSize                        = TransactionHeaderSize + HashTypeSize + Hash256 + AddressSize + ProofSizeSize
	MosaicsSizeSize                          int = 1
	MessageSizeSize                          int = 2
	TransferHeaderSize                           = TransactionHeaderSize + AddressSize + MosaicsSizeSize + MessageSizeSize
	ReplicasSize                                 = 2
	MinReplicatorsSize                           = 2
	PercentApproversSize                         = 1
	PrepareDriveHeaderSize                       = TransactionHeaderSize + KeySize + DurationSize + DurationSize + AmountSize + StorageSizeSize + ReplicasSize + MinReplicatorsSize + PercentApproversSize
	JoinToDriveHeaderSize                        = TransactionHeaderSize + KeySize
	AddActionsSize                               = 2
	RemoveActionsSize                            = 2
	DriveFileSystemHeaderSize                    = TransactionHeaderSize + KeySize + Hash256 + Hash256 + AddActionsSize + RemoveActionsSize
	FilesSizeSize                                = 2
	FilesDepositHeaderSize                       = TransactionHeaderSize + KeySize + FilesSizeSize
	EndDriveHeaderSize                           = TransactionHeaderSize + KeySize
	StartDriveVerificationHeaderSize             = TransactionHeaderSize + KeySize
	OfferTypeSize                                = 1
	OffersCountSize                              = 1
	AddExchangeOfferSize                         = MosaicIdSize + DurationSize + 2*AmountSize + OfferTypeSize
	AddExchangeOfferHeaderSize                   = TransactionHeaderSize + OffersCountSize
	ExchangeOfferSize                            = DurationSize + 2*AmountSize + OfferTypeSize + KeySize
	ExchangeOfferHeaderSize                      = TransactionHeaderSize + OffersCountSize
	RemoveExchangeOfferSize                      = OfferTypeSize + MosaicIdSize
	RemoveExchangeOfferHeaderSize                = TransactionHeaderSize + OffersCountSize
	StartFileDownloadHeaderSize                  = TransactionHeaderSize + 2 + KeySize
	EndFileDownloadHeaderSize                    = TransactionHeaderSize + 2 + KeySize + Hash256
	OperationIdentifyHeaderSize                  = TransactionHeaderSize + Hash256
	EndOperationHeaderSize                       = TransactionHeaderSize + 1 + Hash256 + 2
	DeployHeaderSize                             = TransactionHeaderSize + KeySize + KeySize + Hash256 + BaseInt64Size
	StartExecuteHeaderSize                       = TransactionHeaderSize + KeySize + 1 + 1 + 2
	DeactivateHeaderSize                         = TransactionHeaderSize + KeySize + KeySize
	BlsKeySize                               int = 48
	BlsSignatureSize                         int = 96
	ReplicatorOnboardingHeaderSize               = TransactionHeaderSize + AmountSize + KeySize + Hash256 + SignatureSize
	ReplicatorCountSize                          = 2
	ReplicatorsCleanupHeaderSize                 = TransactionHeaderSize + ReplicatorCountSize
	ReplicatorTreeRebuildHeaderSize              = TransactionHeaderSize + ReplicatorCountSize
	PrepareBcDriveHeaderSize                     = TransactionHeaderSize + StorageSizeSize + AmountSize + 2
	DataModificationHeaderSize                   = TransactionHeaderSize + KeySize + Hash256 + StorageSizeSize + AmountSize
	DataModificationCancelHeaderSize             = TransactionHeaderSize + KeySize + Hash256
	StoragePaymentHeaderSize                     = TransactionHeaderSize + KeySize + AmountSize
	DownloadPaymentHeaderSize                    = TransactionHeaderSize + KeySize + StorageSizeSize + AmountSize
	ListOfPublicKeysSize                         = 2
	DownloadHeaderSize                           = TransactionHeaderSize + KeySize + StorageSizeSize + AmountSize + ListOfPublicKeysSize
	FinishDownloadHeaderSize                     = TransactionHeaderSize + Hash256 + AmountSize
	VerificationPaymentHeaderSize                = TransactionHeaderSize + KeySize + AmountSize
	ShardIdSize                                  = 2
	KeyCountSize                                 = 1
	JudgingKeyCountSize                          = 1
	OverlappingKeyCountSize                      = 1
	JudgedKeyCountSize                           = 1
	OpinionElementCountSize                      = 2
	EndDriveVerificationV2HeaderSize             = TransactionHeaderSize + KeySize + Hash256 + ShardIdSize + KeyCountSize + JudgingKeyCountSize
	DataModificationApprovalHeaderSize           = TransactionHeaderSize + KeySize + Hash256 + Hash256 + 8 + 8 + 8
	DataModificationSingleApprovalHeaderSize     = TransactionHeaderSize + KeySize + Hash256 + 1
	DownloadApprovalHeaderSize                   = TransactionHeaderSize + Hash256 + Hash256 + JudgingKeyCountSize + OverlappingKeyCountSize + JudgedKeyCountSize + OpinionElementCountSize
	DriveClosureHeaderSize                       = TransactionHeaderSize + KeySize
	ReplicatorOffboardingHeaderSize              = TransactionHeaderSize + KeySize
	CreateLiquidityProviderHeaderSize            = TransactionHeaderSize + MosaicIdSize + AmountSize + AmountSize + 4 + 2 + KeySize + 4 + 4
	ManualRateChangeHeaderSize                   = TransactionHeaderSize + MosaicIdSize + 1 + AmountSize + 1 + AmountSize
	HarvesterTransactionSize                     = TransactionHeaderSize + KeySize
	SdaOffersCountSize                           = 1
	PlaceSdaExchangeOfferSize                    = 2*MosaicIdSize + 2*AmountSize + DurationSize
	PlaceSdaExchangeOfferHeaderSize              = TransactionHeaderSize + SdaOffersCountSize
	RemoveSdaExchangeOfferSize                   = 2 * MosaicIdSize
	RemoveSdaExchangeOfferHeaderSize             = TransactionHeaderSize + SdaOffersCountSize
	AutomaticExecutionsNumber                    = 4
	FileNameSize                                 = 2
	FunctionNameSize                             = 2
	ActualArgumentsSize                          = 2
	ServicePaymentsCount                         = 1
	AutomaticExecutionsFileNameSize              = 2
	AutomaticExecutionsFunctionNameSize          = 2
	BatchIdSize                                  = 8
	CosignersNumber                              = 4
	CallsNumber                                  = 4
	PoExVerificationInformationSize              = 32
	AutomaticExecutionsPaymentHeaderSize         = TransactionHeaderSize + KeySize + AutomaticExecutionsNumber
	ManualCallHeaderSize                         = TransactionHeaderSize + KeySize + FileNameSize + FunctionNameSize + ActualArgumentsSize + AmountSize + AmountSize + ServicePaymentsCount
	DeployContractHeaderSize                     = TransactionHeaderSize + KeySize + FileNameSize + FunctionNameSize + ActualArgumentsSize + AmountSize + AmountSize + ServicePaymentsCount + AutomaticExecutionsFileNameSize + AutomaticExecutionsFunctionNameSize + AmountSize + AmountSize + AutomaticExecutionsNumber + KeySize
	SuccessfulEndBatchExecutionHeaderSize        = TransactionHeaderSize + KeySize + BatchIdSize + Hash256 + BaseInt64Size + BaseInt64Size + PoExVerificationInformationSize + DurationSize + CosignersNumber + CallsNumber
	UnsuccessfulEndBatchExecutionHeaderSize      = TransactionHeaderSize + KeySize + BatchIdSize + DurationSize + CosignersNumber + CallsNumber
)
View Source
const ETH2_DST = string("BLS_SIG_BLS12381G2_XMD:SHA-256_SSWU_RO_POP_")
View Source
const EmptyPublicKey = "0000000000000000000000000000000000000000000000000000000000000000"
View Source
const FILECOIN_DST = string("BLS_SIG_BLS12381G2_XMD:SHA-256_SSWU_RO_NUL_")
View Source
const NUM_CHECKSUM_BYTES = 4
View Source
const NamespaceBit uint64 = 1 << 63
View Source
const Supply_Mutable = 0x01
View Source
const TimestampNemesisBlockMilliseconds int64 = 1459468800 * 1000
View Source
const Transferable = 0x02

Variables

View Source
var (
	ErrResourceNotFound              = newRespError("resource is not found")
	ErrArgumentNotValid              = newRespError("argument is not valid")
	ErrInvalidRequest                = newRespError("request is not valid")
	ErrInternalError                 = newRespError("response is nil")
	ErrNotAcceptedResponseStatusCode = newRespError("not accepted response status code")
)

Catapult REST API errors

View Source
var (
	ErrMetadataEmptyAddresses    = errors.New("list adresses ids must not by empty")
	ErrMetadataNilAdress         = errors.New("adress must not be blank")
	ErrMetadataEmptyMosaicIds    = errors.New("list mosaics ids must not by empty")
	ErrMetadataNilMosaicId       = errors.New("mosaicId must not be nil")
	ErrMetadataEmptyNamespaceIds = errors.New("list namespaces ids must not by empty")
	ErrMetadataNilNamespaceId    = errors.New("namespaceId must not be nil")
)

Metadata errors

View Source
var (
	ErrNilAssetId             = errors.New("AssetId should not be nil")
	ErrEmptyAssetIds          = errors.New("AssetId's array should not be empty")
	ErrUnknownBlockchainType  = errors.New("Not supported Blockchain Type")
	ErrInvalidHashLength      = errors.New("The length of Hash is invalid")
	ErrInvalidSignatureLength = errors.New("The length of Signature is invalid")
)

Common errors

View Source
var (
	ErrEmptyMosaicIds        = errors.New("list mosaics ids must not by empty")
	ErrNilMosaicId           = errors.New("mosaicId must not be nil")
	ErrWrongBitMosaicId      = errors.New("mosaicId has 64th bit")
	ErrInvalidOwnerPublicKey = errors.New("public owner key is invalid")
	ErrNilMosaicProperties   = errors.New("mosaic properties must not be nil")
)

Mosaic errors

View Source
var (
	ErrNamespaceTooManyPart = errors.New("too many parts")
	ErrNilNamespaceId       = errors.New("namespaceId is nil or zero")
	ErrWrongBitNamespaceId  = errors.New("namespaceId doesn't have 64th bit")
	ErrEmptyNamespaceIds    = errors.New("list namespace ids must not by empty")
	ErrInvalidNamespaceName = errors.New("namespace name is invalid")
)

Namespace errors

View Source
var (
	ErrNilOrZeroHeight = errors.New("block height should not be nil or zero")
	ErrNilOrZeroLimit  = errors.New("limit should not be nil or zero")
)

Blockchain errors

View Source
var (
	ErrNilSecret = errors.New("Secret should not be nil")
	ErrNilProof  = errors.New("Proof should not be nil")
)

Lock errors

View Source
var (
	ErrEmptyAddressesIds = errors.New("list of addresses should not be empty")
	ErrNilAddress        = errors.New("address is nil")
	ErrNilHash           = errors.New("hash is nil")
	ErrNilHashes         = errors.New("hashes are nil")
	ErrBlankAddress      = errors.New("address is blank")
	ErrNilAccount        = errors.New("account should not be nil")
	ErrInvalidAddress    = errors.New("wrong address")
	ErrNoChanges         = errors.New("transaction should contain changes")
)

plain errors

View Source
var (
	ErrInvalidReputationConfig = errors.New("default reputation should be greater than 0 and less than 1")
)

reputations error

View Source
var StorageNamespaceId, _ = NewNamespaceIdFromName("prx.so")

namespace id for storage mosaic

View Source
var StreamingNamespaceId, _ = NewNamespaceIdFromName("prx.sm")

namespace id for streaming mosaic

View Source
var SuperContractNamespaceId, _ = NewNamespaceIdFromName("prx.sc")

namespace id for suepr contract mosaic

View Source
var XemNamespaceId, _ = NewNamespaceIdFromName("nem.xem")

namespace id for XEM mosaic

View Source
var XpxNamespaceId, _ = NewNamespaceIdFromName("prx.xpx")

namespace id for XPX mosaic

View Source
var ZeroBLSPrivateKey = BLSPrivateKey(make([]byte, 32))
View Source
var ZeroBLSPublicKey = BLSPublicKey(make([]byte, 48))
View Source
var ZeroBLSSignature = BLSSignature(make([]byte, 96))

Functions

func AggregateVerify added in v0.7.3

func AggregateVerify(keys []BLSPublicKey, messages []string, signature BLSSignature) bool

func CompareInnerTransaction added in v0.7.0

func CompareInnerTransaction(left []Transaction, right []Transaction) bool

func FastAggregateVerify added in v0.7.3

func FastAggregateVerify(keys []BLSPublicKey, message string, signature BLSSignature) bool

func GenerateChecksum

func GenerateChecksum(b []byte) ([]byte, error)

func NewReputationConfig

func NewReputationConfig(minInter uint64, defaultRep float64) (*reputationConfig, error)

Types

type AbstractTransaction

type AbstractTransaction struct {
	TransactionInfo
	NetworkType NetworkType    `json:"network_type"`
	Deadline    *Deadline      `json:"deadline"`
	Type        EntityType     `json:"entity_type"`
	Version     EntityVersion  `json:"version"`
	MaxFee      Amount         `json:"max_fee"`
	Signature   string         `json:"signature"`
	Signer      *PublicAccount `json:"signer"`
}

func (*AbstractTransaction) HasMissingSignatures

func (tx *AbstractTransaction) HasMissingSignatures() bool

func (*AbstractTransaction) IsAnnounced added in v0.7.0

func (tx *AbstractTransaction) IsAnnounced() bool

func (*AbstractTransaction) IsConfirmed

func (tx *AbstractTransaction) IsConfirmed() bool

func (*AbstractTransaction) IsUnannounced

func (tx *AbstractTransaction) IsUnannounced() bool

func (*AbstractTransaction) IsUnconfirmed

func (tx *AbstractTransaction) IsUnconfirmed() bool

func (*AbstractTransaction) String

func (tx *AbstractTransaction) String() string

func (*AbstractTransaction) ToAggregate

func (tx *AbstractTransaction) ToAggregate(signer *PublicAccount)

type Account

type Account struct {
	*PublicAccount
	*crypto.KeyPair
	// contains filtered or unexported fields
}

func NewAccount

func NewAccount(networkType NetworkType, generationHash *Hash) (*Account, error)

returns new Account generated for passed NetworkType

func NewAccountFromPrivateKey

func NewAccountFromPrivateKey(pKey string, networkType NetworkType, generationHash *Hash) (*Account, error)

returns new Account from private key for passed NetworkType and generationHash

func (*Account) DecryptMessage

func (a *Account) DecryptMessage(encryptedMessage *SecureMessage, senderPublicAccount *PublicAccount) (*PlainMessage, error)

func (*Account) EncryptMessage

func (a *Account) EncryptMessage(message string, recipientPublicAccount *PublicAccount) (*SecureMessage, error)

func (*Account) Sign

func (a *Account) Sign(tx Transaction) (*SignedTransaction, error)

func (*Account) SignCosignatureTransaction

func (a *Account) SignCosignatureTransaction(tx *CosignatureTransaction) (*CosignatureSignedTransaction, error)

func (*Account) SignData added in v0.8.4

func (a *Account) SignData(data []byte) (*Signature, error)

func (*Account) SignWithCosignatures

func (a *Account) SignWithCosignatures(tx *AggregateTransaction, cosignatories []*Account) (*SignedTransaction, error)

sign AggregateTransaction with current Account and with every passed cosignatory Account's returns announced Aggregate SignedTransaction

type AccountInfo

type AccountInfo struct {
	Address         *Address
	AddressHeight   Height
	PublicKey       string
	PublicKeyHeight Height
	AccountType     AccountType
	LinkedAccount   *PublicAccount
	Mosaics         []*Mosaic
	Reputation      float64
}

func (*AccountInfo) String

func (a *AccountInfo) String() string

type AccountLinkAction

type AccountLinkAction uint8
const (
	AccountLink AccountLinkAction = iota
	AccountUnlink
)

AccountLinkAction enums

type AccountLinkTransaction

type AccountLinkTransaction struct {
	AbstractTransaction
	RemoteAccount *PublicAccount
	LinkAction    AccountLinkAction
}

func NewAccountLinkTransaction

func NewAccountLinkTransaction(deadline *Deadline, remoteAccount *PublicAccount, linkAction AccountLinkAction, networkType NetworkType) (*AccountLinkTransaction, error)

returns AccountLinkTransaction from passed PublicAccount and AccountLinkAction

func (*AccountLinkTransaction) Bytes added in v0.6.0

func (tx *AccountLinkTransaction) Bytes() ([]byte, error)

func (*AccountLinkTransaction) GetAbstractTransaction

func (tx *AccountLinkTransaction) GetAbstractTransaction() *AbstractTransaction

func (*AccountLinkTransaction) Size

func (tx *AccountLinkTransaction) Size() int

func (*AccountLinkTransaction) String

func (tx *AccountLinkTransaction) String() string

type AccountMetadataTransaction added in v0.7.3

type AccountMetadataTransaction struct {
	BasicMetadataTransaction
}

func NewAccountMetadataTransaction added in v0.7.3

func NewAccountMetadataTransaction(deadline *Deadline,
	account *PublicAccount, scopedKey ScopedMetadataKey,
	newValue string, oldValue string, networkType NetworkType) (*AccountMetadataTransaction, error)

func (*AccountMetadataTransaction) Bytes added in v0.7.3

func (tx *AccountMetadataTransaction) Bytes() ([]byte, error)

type AccountName

type AccountName struct {
	Address *Address
	Names   []string
}

func (*AccountName) String

func (a *AccountName) String() string

type AccountProperties

type AccountProperties struct {
	Address            *Address
	AllowedAddresses   []*Address
	AllowedMosaicId    []*MosaicId
	AllowedEntityTypes []EntityType
	BlockedAddresses   []*Address
	BlockedMosaicId    []*MosaicId
	BlockedEntityTypes []EntityType
}

func (*AccountProperties) String

func (a *AccountProperties) String() string

type AccountPropertiesAddressModification

type AccountPropertiesAddressModification struct {
	ModificationType PropertyModificationType
	Address          *Address
}

func (*AccountPropertiesAddressModification) String

type AccountPropertiesAddressTransaction

type AccountPropertiesAddressTransaction struct {
	AbstractTransaction
	PropertyType  PropertyType
	Modifications []*AccountPropertiesAddressModification
}

func NewAccountPropertiesAddressTransaction

func NewAccountPropertiesAddressTransaction(deadline *Deadline, propertyType PropertyType,
	modifications []*AccountPropertiesAddressModification, networkType NetworkType) (*AccountPropertiesAddressTransaction, error)

returns AccountPropertiesAddressTransaction from passed PropertyType and AccountPropertiesAddressModification's

func (*AccountPropertiesAddressTransaction) Bytes added in v0.6.0

func (*AccountPropertiesAddressTransaction) GetAbstractTransaction

func (tx *AccountPropertiesAddressTransaction) GetAbstractTransaction() *AbstractTransaction

func (*AccountPropertiesAddressTransaction) Size

func (*AccountPropertiesAddressTransaction) String

type AccountPropertiesEntityTypeModification

type AccountPropertiesEntityTypeModification struct {
	ModificationType PropertyModificationType
	EntityType       EntityType
}

func (*AccountPropertiesEntityTypeModification) String

type AccountPropertiesEntityTypeTransaction

type AccountPropertiesEntityTypeTransaction struct {
	AbstractTransaction
	PropertyType  PropertyType
	Modifications []*AccountPropertiesEntityTypeModification
}

func NewAccountPropertiesEntityTypeTransaction

func NewAccountPropertiesEntityTypeTransaction(deadline *Deadline, propertyType PropertyType,
	modifications []*AccountPropertiesEntityTypeModification, networkType NetworkType) (*AccountPropertiesEntityTypeTransaction, error)

returns AccountPropertiesEntityTypeTransaction from passed PropertyType and AccountPropertiesEntityTypeModification's

func (*AccountPropertiesEntityTypeTransaction) Bytes added in v0.6.0

func (*AccountPropertiesEntityTypeTransaction) GetAbstractTransaction

func (tx *AccountPropertiesEntityTypeTransaction) GetAbstractTransaction() *AbstractTransaction

func (*AccountPropertiesEntityTypeTransaction) Size

func (*AccountPropertiesEntityTypeTransaction) String

type AccountPropertiesMosaicModification

type AccountPropertiesMosaicModification struct {
	ModificationType PropertyModificationType
	AssetId          AssetId
}

func (*AccountPropertiesMosaicModification) String

type AccountPropertiesMosaicTransaction

type AccountPropertiesMosaicTransaction struct {
	AbstractTransaction
	PropertyType  PropertyType
	Modifications []*AccountPropertiesMosaicModification
}

func NewAccountPropertiesMosaicTransaction

func NewAccountPropertiesMosaicTransaction(deadline *Deadline, propertyType PropertyType,
	modifications []*AccountPropertiesMosaicModification, networkType NetworkType) (*AccountPropertiesMosaicTransaction, error)

returns AccountPropertiesMosaicTransaction from passed PropertyType and AccountPropertiesMosaicModification's

func (*AccountPropertiesMosaicTransaction) Bytes added in v0.6.0

func (*AccountPropertiesMosaicTransaction) GetAbstractTransaction

func (tx *AccountPropertiesMosaicTransaction) GetAbstractTransaction() *AbstractTransaction

func (*AccountPropertiesMosaicTransaction) Size

func (*AccountPropertiesMosaicTransaction) String

type AccountService

type AccountService service

func (*AccountService) GetAccountHarvesting added in v0.8.0

func (a *AccountService) GetAccountHarvesting(ctx context.Context, address *Address) (*Harvester, error)

func (*AccountService) GetAccountInfo

func (a *AccountService) GetAccountInfo(ctx context.Context, address *Address) (*AccountInfo, error)

func (*AccountService) GetAccountNames

func (a *AccountService) GetAccountNames(ctx context.Context, addr ...*Address) ([]*AccountName, error)

GetAccountNames Returns friendly names for accounts. post @/account/names

func (*AccountService) GetAccountProperties

func (a *AccountService) GetAccountProperties(ctx context.Context, address *Address) (*AccountProperties, error)

func (*AccountService) GetAccountsInfo

func (a *AccountService) GetAccountsInfo(ctx context.Context, addresses ...*Address) ([]*AccountInfo, error)

func (*AccountService) GetAccountsProperties

func (a *AccountService) GetAccountsProperties(ctx context.Context, addresses ...*Address) ([]*AccountProperties, error)

func (*AccountService) GetHarvesters added in v0.8.0

func (a *AccountService) GetHarvesters(ctx context.Context, options *PaginationOrderingOptions) (*HarvestersPage, error)

func (*AccountService) GetMultisigAccountGraphInfo

func (a *AccountService) GetMultisigAccountGraphInfo(ctx context.Context, address *Address) (*MultisigAccountGraphInfo, error)

func (*AccountService) GetMultisigAccountInfo

func (a *AccountService) GetMultisigAccountInfo(ctx context.Context, address *Address) (*MultisigAccountInfo, error)

type AccountType

type AccountType uint8
const (
	UnlinkedAccount AccountType = iota
	MainAccount
	RemoteAccount
	RemoteUnlinkedAccount
)

AccountType enums

type Action added in v0.6.0

type Action struct {
	FileHash *Hash
	FileSize StorageSize
}

func (*Action) String added in v0.6.0

func (action *Action) String() string

type ActiveDataModification added in v0.7.5

type ActiveDataModification struct {
	Id                 *Hash
	Owner              *PublicAccount
	DownloadDataCdi    *Hash
	ExpectedUploadSize StorageSize
	ActualUploadSize   StorageSize
	FolderName         string
	ReadyForApproval   bool
}

func (*ActiveDataModification) String added in v0.7.5

func (active *ActiveDataModification) String() string

type AddDbrbProcessTransaction added in v0.8.1

type AddDbrbProcessTransaction struct {
	AbstractTransaction
}

func (*AddDbrbProcessTransaction) Bytes added in v0.8.1

func (a *AddDbrbProcessTransaction) Bytes() ([]byte, error)

func (*AddDbrbProcessTransaction) GetAbstractTransaction added in v0.8.1

func (a *AddDbrbProcessTransaction) GetAbstractTransaction() *AbstractTransaction

func (*AddDbrbProcessTransaction) Size added in v0.8.1

func (a *AddDbrbProcessTransaction) Size() int

type AddExchangeOfferTransaction added in v0.6.0

type AddExchangeOfferTransaction struct {
	AbstractTransaction
	Offers []*AddOffer
}

Add Exchange Offer Transaction

func NewAddExchangeOfferTransaction added in v0.6.0

func NewAddExchangeOfferTransaction(deadline *Deadline, addOffers []*AddOffer, networkType NetworkType) (*AddExchangeOfferTransaction, error)

func (*AddExchangeOfferTransaction) Bytes added in v0.6.0

func (tx *AddExchangeOfferTransaction) Bytes() ([]byte, error)

func (*AddExchangeOfferTransaction) GetAbstractTransaction added in v0.6.0

func (tx *AddExchangeOfferTransaction) GetAbstractTransaction() *AbstractTransaction

func (*AddExchangeOfferTransaction) Size added in v0.6.0

func (tx *AddExchangeOfferTransaction) Size() int

func (*AddExchangeOfferTransaction) String added in v0.6.0

func (tx *AddExchangeOfferTransaction) String() string

type AddOffer added in v0.6.0

type AddOffer struct {
	Offer
	Duration Duration
}

func (*AddOffer) String added in v0.6.0

func (offer *AddOffer) String() string

type AddOrUpdateDbrbProcessTransaction added in v0.8.4

type AddOrUpdateDbrbProcessTransaction struct {
	AbstractTransaction
}

func (*AddOrUpdateDbrbProcessTransaction) Bytes added in v0.8.4

func (*AddOrUpdateDbrbProcessTransaction) GetAbstractTransaction added in v0.8.4

func (a *AddOrUpdateDbrbProcessTransaction) GetAbstractTransaction() *AbstractTransaction

func (*AddOrUpdateDbrbProcessTransaction) Size added in v0.8.4

type Address

type Address struct {
	Type    NetworkType
	Address string
}

func EncodedStringToAddresses

func EncodedStringToAddresses(addresses ...string) ([]*Address, error)

func NewAddress

func NewAddress(address string, networkType NetworkType) *Address

returns Address from passed address string for passed NetworkType

func NewAddressFromBase32

func NewAddressFromBase32(encoded string) (*Address, error)

func NewAddressFromNamespace

func NewAddressFromNamespace(namespaceId *NamespaceId) (*Address, error)

returns new Address from namespace identifier

func NewAddressFromPublicKey

func NewAddressFromPublicKey(pKey string, networkType NetworkType) (*Address, error)

returns an Address from public key for passed NetworkType

func NewAddressFromRaw

func NewAddressFromRaw(address string) (*Address, error)

returns Address from passed address string

func (*Address) Decode added in v0.6.0

func (ad *Address) Decode() ([]byte, error)

func (*Address) Encode added in v0.6.0

func (ad *Address) Encode() ([]byte, error)

func (*Address) Pretty

func (ad *Address) Pretty() string

func (*Address) String

func (ad *Address) String() string

type AddressAliasTransaction

type AddressAliasTransaction struct {
	AliasTransaction
	Address *Address
}

func NewAddressAliasTransaction

func NewAddressAliasTransaction(deadline *Deadline, address *Address, namespaceId *NamespaceId, actionType AliasActionType, networkType NetworkType) (*AddressAliasTransaction, error)

returns AddressAliasTransaction from passed Address, NamespaceId and AliasActionType

func (*AddressAliasTransaction) Bytes added in v0.6.0

func (tx *AddressAliasTransaction) Bytes() ([]byte, error)

func (*AddressAliasTransaction) Size

func (tx *AddressAliasTransaction) Size() int

func (*AddressAliasTransaction) String

func (tx *AddressAliasTransaction) String() string

type AddressMetadataInfo

type AddressMetadataInfo struct {
	MetadataInfo
	Address *Address
}

type AddressMetadataV2Info added in v0.7.4

type AddressMetadataV2Info struct {
	MetadataV2Info
	Address *Address
}

type AggregateTransaction

type AggregateTransaction struct {
	AbstractTransaction
	InnerTransactions []Transaction
	Cosignatures      []*AggregateTransactionCosignature
}

func NewBondedAggregateTransaction

func NewBondedAggregateTransaction(deadline *Deadline, innerTxs []Transaction, networkType NetworkType) (*AggregateTransaction, error)

returns bounded AggregateTransaction from passed array of transactions to be included in

func NewCompleteAggregateTransaction

func NewCompleteAggregateTransaction(deadline *Deadline, innerTxs []Transaction, networkType NetworkType) (*AggregateTransaction, error)

returns complete AggregateTransaction from passed array of own Transaction's to be included in

func (*AggregateTransaction) Bytes added in v0.6.0

func (tx *AggregateTransaction) Bytes() ([]byte, error)

func (*AggregateTransaction) GetAbstractTransaction

func (tx *AggregateTransaction) GetAbstractTransaction() *AbstractTransaction

func (*AggregateTransaction) Size

func (tx *AggregateTransaction) Size() int

func (*AggregateTransaction) String

func (tx *AggregateTransaction) String() string

func (*AggregateTransaction) UpdateUniqueAggregateHash added in v0.7.0

func (tx *AggregateTransaction) UpdateUniqueAggregateHash(generationHash *Hash) (err error)

type AggregateTransactionCosignature

type AggregateTransactionCosignature struct {
	Signature string
	Signer    *PublicAccount
}

func (*AggregateTransactionCosignature) String

type AliasActionType

type AliasActionType uint8
const (
	AliasLink AliasActionType = iota
	AliasUnlink
)

AliasActionType enums

type AliasTransaction

type AliasTransaction struct {
	AbstractTransaction
	ActionType  AliasActionType
	NamespaceId *NamespaceId
}

func (*AliasTransaction) Bytes added in v0.6.0

func (tx *AliasTransaction) Bytes(builder *flatbuffers.Builder, aliasV flatbuffers.UOffsetT, sizeOfAlias int) ([]byte, error)

func (*AliasTransaction) GetAbstractTransaction

func (tx *AliasTransaction) GetAbstractTransaction() *AbstractTransaction

func (*AliasTransaction) Size

func (tx *AliasTransaction) Size() int

func (*AliasTransaction) String

func (tx *AliasTransaction) String() string

type AliasType

type AliasType uint8
const (
	NoneAliasType AliasType = iota
	MosaicAliasType
	AddressAliasType
)

AliasType enums

type Amount

type Amount = baseInt64

func CreateMosaicLevyFeePercentile added in v0.7.3

func CreateMosaicLevyFeePercentile(percent float32) Amount

type AssetId

type AssetId interface {
	fmt.Stringer
	Type() AssetIdType
	Id() uint64
	Equals(AssetId) (bool, error)
	// contains filtered or unexported methods
}

func NewAssetIdFromId added in v0.7.0

func NewAssetIdFromId(id uint64) (AssetId, error)

type AssetIdType

type AssetIdType uint8
const (
	NamespaceAssetIdType AssetIdType = iota
	MosaicAssetIdType
)

AssetIdType enums

type AutomaticExecutionsInfo added in v0.8.0

type AutomaticExecutionsInfo struct {
	AutomaticExecutionFileName              string
	AutomaticExecutionsFunctionName         string
	AutomaticExecutionsNextBlockToCheck     Height
	AutomaticExecutionCallPayment           Amount
	AutomaticDownloadCallPayment            Amount
	AutomatedExecutionsNumber               uint32
	AutomaticExecutionsPrepaidSinceHasValue bool
	AutomaticExecutionsPrepaidSince         Height
}

supercontract entry

func (*AutomaticExecutionsInfo) String added in v0.8.0

func (executionsInfo *AutomaticExecutionsInfo) String() string

type AutomaticExecutionsPaymentTransaction added in v0.8.0

type AutomaticExecutionsPaymentTransaction struct {
	AbstractTransaction
	ContractKey               *PublicAccount
	AutomaticExecutionsNumber uint32
}

Automatic Executions Payment Transaction

func NewAutomaticExecutionsPaymentTransaction added in v0.8.0

func NewAutomaticExecutionsPaymentTransaction(
	deadline *Deadline,
	contractKey *PublicAccount,
	automaticExecutionsNumber uint32,
	networkType NetworkType,
) (*AutomaticExecutionsPaymentTransaction, error)

automatic executions payment transaction

func (*AutomaticExecutionsPaymentTransaction) Bytes added in v0.8.0

func (*AutomaticExecutionsPaymentTransaction) GetAbstractTransaction added in v0.8.0

func (tx *AutomaticExecutionsPaymentTransaction) GetAbstractTransaction() *AbstractTransaction

func (*AutomaticExecutionsPaymentTransaction) Size added in v0.8.0

func (*AutomaticExecutionsPaymentTransaction) String added in v0.8.0

type BLSPrivateKey added in v0.7.3

type BLSPrivateKey string

It must be a 32 byte sequence.

func GeneratePrivateKey added in v0.7.3

func GeneratePrivateKey(seed io.Reader) BLSPrivateKey

func GeneratePrivateKeyFromIKM added in v0.7.3

func GeneratePrivateKeyFromIKM(ikm [32]byte) BLSPrivateKey

func (BLSPrivateKey) HexString added in v0.7.3

func (priv BLSPrivateKey) HexString() string

func (BLSPrivateKey) Public added in v0.7.3

func (priv BLSPrivateKey) Public() BLSPublicKey

func (BLSPrivateKey) Sign added in v0.7.3

func (priv BLSPrivateKey) Sign(msg string) BLSSignature

type BLSPublicKey added in v0.7.3

type BLSPublicKey string

It must be a 48 byte sequence.

func AggregatePublicKeys added in v0.7.3

func AggregatePublicKeys(keys ...BLSPublicKey) (BLSPublicKey, error)

func (BLSPublicKey) HexString added in v0.7.3

func (pub BLSPublicKey) HexString() string

func (BLSPublicKey) Verify added in v0.7.3

func (pub BLSPublicKey) Verify(msg string, signature BLSSignature) bool

type BLSSignature added in v0.7.3

type BLSSignature string

It must be a 96 byte sequence.

func AggregateSignatures added in v0.7.3

func AggregateSignatures(signatures ...BLSSignature) (BLSSignature, error)

func (BLSSignature) HexString added in v0.7.3

func (signature BLSSignature) HexString() string

func (BLSSignature) Verify added in v0.7.3

func (signature BLSSignature) Verify(msg string, pub BLSPublicKey) bool

type BasicMetadataTransaction added in v0.7.3

type BasicMetadataTransaction struct {
	AbstractTransaction
	TargetPublicAccount *PublicAccount
	ScopedMetadataKey   ScopedMetadataKey
	Value               []byte
	ValueDeltaSize      int16
}

func (*BasicMetadataTransaction) Bytes added in v0.7.3

func (tx *BasicMetadataTransaction) Bytes(builder *flatbuffers.Builder, targetIdV flatbuffers.UOffsetT, size int) ([]byte, error)

func (*BasicMetadataTransaction) GetAbstractTransaction added in v0.7.3

func (tx *BasicMetadataTransaction) GetAbstractTransaction() *AbstractTransaction

func (*BasicMetadataTransaction) Size added in v0.7.3

func (tx *BasicMetadataTransaction) Size() int

func (*BasicMetadataTransaction) String added in v0.7.3

func (tx *BasicMetadataTransaction) String() string

type Batch added in v0.8.0

type Batch struct {
	BatchId                     uint64
	Success                     bool
	PoExVerificationInformation []byte
	CompletedCalls              []*CompletedCall
}

func (*Batch) String added in v0.8.0

func (batch *Batch) String() string

type BcDrive added in v0.7.5

type BcDrive struct {
	MultisigAccount            *PublicAccount
	Owner                      *PublicAccount
	RootHash                   *Hash
	Size                       StorageSize
	UsedSizeBytes              StorageSize
	MetaFilesSizeBytes         StorageSize
	ReplicatorCount            uint16
	ActiveDataModifications    []*ActiveDataModification
	CompletedDataModifications []*CompletedDataModification
	ConfirmedUsedSizes         []*ConfirmedUsedSize
	Replicators                []*PublicAccount
	OffboardingReplicators     []*PublicAccount
	Verification               *Verification
	DownloadShards             []*DownloadShard
	DataModificationShards     []*DataModificationShard
}

func (*BcDrive) String added in v0.7.5

func (drive *BcDrive) String() string

type BcDrivesPage added in v0.7.5

type BcDrivesPage struct {
	BcDrives   []*BcDrive
	Pagination Pagination
}

type BcDrivesPageFilters added in v0.7.5

type BcDrivesPageFilters struct {
	Owner string `url:"owner,omitempty"`

	Size     uint64 `url:"size,omitempty"`
	ToSize   uint64 `url:"toSize,omitempty"`
	FromSize uint64 `url:"toSize,omitempty"`

	UsedSize     uint64 `url:"usedSize,omitempty"`
	ToUsedSize   uint64 `url:"toUsedSize,omitempty"`
	FromUsedSize uint64 `url:"toUsedSize,omitempty"`

	MetaFilesSize     uint64 `url:"metaFilesSize,omitempty"`
	ToMetaFilesSize   uint64 `url:"toMetaFilesSize,omitempty"`
	FromMetaFilesSize uint64 `url:"toMetaFilesSize,omitempty"`

	ReplicatorCount     uint64 `url:"replicatorCount,omitempty"`
	ToReplicatorCount   uint64 `url:"toReplicatorCount,omitempty"`
	FromReplicatorCount uint64 `url:"toReplicatorCount,omitempty"`
}

type BcDrivesPageOptions added in v0.7.5

type BcDrivesPageOptions struct {
	BcDrivesPageFilters
	PaginationOrderingOptions
}

type BillingDescription added in v0.6.0

type BillingDescription struct {
	Start    Height
	End      Height
	Payments []*PaymentInformation
}

func (*BillingDescription) String added in v0.6.0

func (desc *BillingDescription) String() string

type BlockChainVersion

type BlockChainVersion uint64

func NewBlockChainVersion

func NewBlockChainVersion(major uint16, minor uint16, revision uint16, build uint16) BlockChainVersion

func (BlockChainVersion) String

func (m BlockChainVersion) String() string

type BlockInfo

type BlockInfo struct {
	NetworkType
	BlockHash              *Hash
	GenerationHash         *Hash
	TotalFee               Amount
	NumTransactions        uint64
	Signature              *Signature
	Signer                 *PublicAccount
	Version                EntityVersion
	Type                   uint64
	Height                 Height
	Timestamp              *Timestamp
	Difficulty             Difficulty
	FeeMultiplier          uint32
	PreviousBlockHash      *Hash
	BlockTransactionsHash  *Hash
	BlockReceiptsHash      *Hash
	StateHash              *Hash
	Beneficiary            *PublicAccount
	FeeInterest            uint32
	FeeInterestDenominator uint32
}

func (*BlockInfo) String

func (b *BlockInfo) String() string

type BlockchainConfig

type BlockchainConfig struct {
	StartedHeight           Height
	NetworkConfig           *NetworkConfig
	SupportedEntityVersions *SupportedEntities
}

func (BlockchainConfig) String

func (nc BlockchainConfig) String() string

type BlockchainService

type BlockchainService service

func (*BlockchainService) GetBlockByHeight

func (b *BlockchainService) GetBlockByHeight(ctx context.Context, height Height) (*BlockInfo, error)

returns BlockInfo for passed block's height

func (*BlockchainService) GetBlockchainHeight

func (b *BlockchainService) GetBlockchainHeight(ctx context.Context) (Height, error)

func (*BlockchainService) GetBlockchainScore

func (b *BlockchainService) GetBlockchainScore(ctx context.Context) (*ChainScore, error)

func (*BlockchainService) GetBlockchainStorage

func (b *BlockchainService) GetBlockchainStorage(ctx context.Context) (*BlockchainStorageInfo, error)

func (*BlockchainService) GetBlocksByHeightWithLimit

func (b *BlockchainService) GetBlocksByHeightWithLimit(ctx context.Context, height Height, limit Amount) ([]*BlockInfo, error)

returns BlockInfo's for range block height - (block height + limit) Example: GetBlocksByHeightWithLimit(ctx, 1, 25) => [BlockInfo25, BlockInfo24, ..., BlockInfo1]

type BlockchainStorageInfo

type BlockchainStorageInfo struct {
	NumBlocks       int `json:"numBlocks"`
	NumTransactions int `json:"numTransactions"`
	NumAccounts     int `json:"numAccounts"`
}

func (*BlockchainStorageInfo) String

func (b *BlockchainStorageInfo) String() string

type BlockchainTimestamp

type BlockchainTimestamp struct {
	// contains filtered or unexported fields
}

func NewBlockchainTimestamp

func NewBlockchainTimestamp(milliseconds int64) *BlockchainTimestamp

returns new BlockchainTimestamp from passed milliseconds value

func (BlockchainTimestamp) String

func (m BlockchainTimestamp) String() string

func (BlockchainTimestamp) ToHexString added in v0.7.4

func (m BlockchainTimestamp) ToHexString() string

func (*BlockchainTimestamp) ToTimestamp

func (t *BlockchainTimestamp) ToTimestamp() *Timestamp

type BlockchainUpgradeTransaction

type BlockchainUpgradeTransaction struct {
	AbstractTransaction
	UpgradePeriod        Duration
	NewBlockChainVersion BlockChainVersion
}

func NewBlockchainUpgradeTransaction

func NewBlockchainUpgradeTransaction(deadline *Deadline, upgradePeriod Duration, newBlockChainVersion BlockChainVersion, networkType NetworkType) (*BlockchainUpgradeTransaction, error)

returns NetworkConfigTransaction from passed ApplyHeightDelta, NetworkConfig and SupportedEntityVersions

func (*BlockchainUpgradeTransaction) Bytes added in v0.6.0

func (tx *BlockchainUpgradeTransaction) Bytes() ([]byte, error)

func (*BlockchainUpgradeTransaction) GetAbstractTransaction

func (tx *BlockchainUpgradeTransaction) GetAbstractTransaction() *AbstractTransaction

func (*BlockchainUpgradeTransaction) Size

func (tx *BlockchainUpgradeTransaction) Size() int

func (*BlockchainUpgradeTransaction) String

func (tx *BlockchainUpgradeTransaction) String() string

type CallPayment added in v0.8.0

type CallPayment struct {
	ExecutionPayment Amount
	DownloadPayment  Amount
}

func (*CallPayment) String added in v0.8.0

func (callPayment *CallPayment) String() string

type ChainScore

type ChainScore [2]uint64

func NewChainScore

func NewChainScore(scoreLow uint64, scoreHigh uint64) *ChainScore

returns new ChainScore from passed low and high score

func (*ChainScore) String

func (m *ChainScore) String() string

type Client

type Client struct {

	// Services for communicating to the Catapult REST APIs
	Blockchain        *BlockchainService
	Exchange          *ExchangeService
	SdaExchange       *SdaExchangeService
	Mosaic            *MosaicService
	Namespace         *NamespaceService
	Node              *NodeService
	Network           *NetworkService
	Transaction       *TransactionService
	Resolve           *ResolverService
	Account           *AccountService
	Storage           *StorageService
	StorageV2         *StorageV2Service
	SuperContract     *SuperContractService
	SuperContractV2   *SuperContractV2Service
	Lock              *LockService
	Contract          *ContractService
	Metadata          *MetadataService
	MetadataV2        *MetadataV2Service
	LiquidityProvider *LiquidityProviderService
	// contains filtered or unexported fields
}

Catapult API Client configuration

func NewClient

func NewClient(httpClient *http.Client, conf *Config) *Client

returns catapult http.Client from passed existing client and configuration if passed client is nil, http.DefaultClient will be used

func (*Client) AdaptAccount

func (c *Client) AdaptAccount(account *Account) (*Account, error)

AdaptAccount returns a new account with the same network type and generation hash like a Client

func (*Client) BlockGenerationTime added in v0.7.0

func (c *Client) BlockGenerationTime(ctx context.Context) (time.Duration, error)

BlockGenerationTime gets value from config. If value not found returns default value - 15s

func (*Client) GenerationHash

func (c *Client) GenerationHash() *Hash

func (*Client) NetworkType

func (c *Client) NetworkType() NetworkType

func (*Client) NewAccount

func (c *Client) NewAccount() (*Account, error)

func (*Client) NewAccountFromPrivateKey

func (c *Client) NewAccountFromPrivateKey(pKey string) (*Account, error)

func (*Client) NewAccountFromPublicKey

func (c *Client) NewAccountFromPublicKey(pKey string) (*PublicAccount, error)

func (*Client) NewAccountLinkTransaction

func (c *Client) NewAccountLinkTransaction(deadline *Deadline, remoteAccount *PublicAccount, linkAction AccountLinkAction) (*AccountLinkTransaction, error)

func (*Client) NewAccountMetadataTransaction added in v0.7.3

func (c *Client) NewAccountMetadataTransaction(deadline *Deadline,
	account *PublicAccount, scopedKey ScopedMetadataKey,
	newValue string, oldValue string) (*AccountMetadataTransaction, error)

func (*Client) NewAccountPropertiesAddressTransaction

func (c *Client) NewAccountPropertiesAddressTransaction(deadline *Deadline, propertyType PropertyType, modifications []*AccountPropertiesAddressModification) (*AccountPropertiesAddressTransaction, error)

func (*Client) NewAccountPropertiesEntityTypeTransaction

func (c *Client) NewAccountPropertiesEntityTypeTransaction(deadline *Deadline, propertyType PropertyType, modifications []*AccountPropertiesEntityTypeModification) (*AccountPropertiesEntityTypeTransaction, error)

func (*Client) NewAccountPropertiesMosaicTransaction

func (c *Client) NewAccountPropertiesMosaicTransaction(deadline *Deadline, propertyType PropertyType, modifications []*AccountPropertiesMosaicModification) (*AccountPropertiesMosaicTransaction, error)

func (*Client) NewAddExchangeOfferTransaction added in v0.6.0

func (c *Client) NewAddExchangeOfferTransaction(deadline *Deadline, addOffers []*AddOffer) (*AddExchangeOfferTransaction, error)

func (*Client) NewAddressAliasTransaction

func (c *Client) NewAddressAliasTransaction(deadline *Deadline, address *Address, namespaceId *NamespaceId, actionType AliasActionType) (*AddressAliasTransaction, error)

func (*Client) NewAutomaticExecutionsPaymentTransaction added in v0.8.0

func (c *Client) NewAutomaticExecutionsPaymentTransaction(
	deadline *Deadline,
	contractKey *PublicAccount,
	automaticExecutionsNumber uint32,
) (*AutomaticExecutionsPaymentTransaction, error)

func (*Client) NewBlockchainUpgradeTransaction

func (c *Client) NewBlockchainUpgradeTransaction(deadline *Deadline, upgradePeriod Duration, newBlockChainVersion BlockChainVersion) (*BlockchainUpgradeTransaction, error)

func (*Client) NewBondedAggregateTransaction

func (c *Client) NewBondedAggregateTransaction(deadline *Deadline, innerTxs []Transaction) (*AggregateTransaction, error)

func (*Client) NewCompleteAggregateTransaction

func (c *Client) NewCompleteAggregateTransaction(deadline *Deadline, innerTxs []Transaction) (*AggregateTransaction, error)

func (*Client) NewCreateLiquidityProviderTransaction added in v0.7.5

func (c *Client) NewCreateLiquidityProviderTransaction(
	deadline *Deadline,
	providerMosaicId *MosaicId,
	currencyDeposit Amount,
	initialMosaicsMinting Amount,
	slashingPeriod uint32,
	windowSize uint16,
	slashingAccount *PublicAccount,
	alpha uint32,
	beta uint32,
) (*CreateLiquidityProviderTransaction, error)

func (*Client) NewDataModificationCancelTransaction added in v0.7.5

func (c *Client) NewDataModificationCancelTransaction(deadline *Deadline, driveKey *PublicAccount, dataModificationId *Hash) (*DataModificationCancelTransaction, error)

func (*Client) NewDataModificationTransaction added in v0.7.5

func (c *Client) NewDataModificationTransaction(deadline *Deadline, driveKey *PublicAccount, downloadDataCdi *Hash, uploadSize StorageSize, feedbackFeeAmount Amount) (*DataModificationTransaction, error)

func (*Client) NewDeactivateTransaction added in v0.7.0

func (c *Client) NewDeactivateTransaction(deadline *Deadline, sc string, driveKey string) (*DeactivateTransaction, error)

func (*Client) NewDeployContractTransaction added in v0.8.0

func (c *Client) NewDeployContractTransaction(
	deadline *Deadline,
	driveKey *PublicAccount,
	executionCallPayment Amount,
	downloadCallPayment Amount,
	automaticExecutionCallPayment Amount,
	automaticDownloadCallPayment Amount,
	automaticExecutionsNumber uint32,
	assignee *PublicAccount,
	fileName string,
	functionName string,
	actualArguments []byte,
	servicePayments []*Mosaic,
	automaticExecutionFileName string,
	automaticExecutionFunctionName string,
) (*DeployContractTransaction, error)

func (*Client) NewDeployTransaction added in v0.7.0

func (c *Client) NewDeployTransaction(deadline *Deadline, drive, owner *PublicAccount, fileHash *Hash, vmVersion uint64) (*DeployTransaction, error)

func (*Client) NewDownloadPaymentTransaction added in v0.7.5

func (c *Client) NewDownloadPaymentTransaction(deadline *Deadline, downloadChannelId *Hash, downloadSize StorageSize, feedbackFeeAmount Amount) (*DownloadPaymentTransaction, error)

func (*Client) NewDownloadTransaction added in v0.7.5

func (c *Client) NewDownloadTransaction(deadline *Deadline, driveKey *PublicAccount, downloadSize StorageSize, feedbackFeeAmount Amount, listOfPublicKeys []*PublicAccount) (*DownloadTransaction, error)

func (*Client) NewDriveClosureTransaction added in v0.7.5

func (c *Client) NewDriveClosureTransaction(deadline *Deadline, driveKey *PublicAccount) (*DriveClosureTransaction, error)

func (*Client) NewDriveFileSystemTransaction added in v0.6.0

func (c *Client) NewDriveFileSystemTransaction(deadline *Deadline, driveKey string, newRootHash *Hash, oldRootHash *Hash, addActions []*Action, removeActions []*Action) (*DriveFileSystemTransaction, error)

func (*Client) NewDriveFilesRewardTransaction added in v0.6.0

func (c *Client) NewDriveFilesRewardTransaction(deadline *Deadline, uploadInfos []*UploadInfo) (*DriveFilesRewardTransaction, error)

func (*Client) NewEndDriveTransaction added in v0.6.0

func (c *Client) NewEndDriveTransaction(deadline *Deadline, driveKey *PublicAccount) (*EndDriveTransaction, error)

func (*Client) NewEndDriveVerificationTransaction added in v0.6.0

func (c *Client) NewEndDriveVerificationTransaction(deadline *Deadline, failures []*FailureVerification) (*EndDriveVerificationTransaction, error)

func (*Client) NewEndDriveVerificationTransactionV2 added in v0.7.5

func (c *Client) NewEndDriveVerificationTransactionV2(deadline *Deadline, driveKey *PublicAccount, verificationTrigger *Hash, shardId uint16, keys []*PublicAccount, signatures []*Signature, opinions uint8) (*EndDriveVerificationTransactionV2, error)

func (*Client) NewEndExecuteTransaction added in v0.7.0

func (c *Client) NewEndExecuteTransaction(deadline *Deadline, mosaics []*Mosaic, token *Hash, status OperationStatus) (*EndExecuteTransaction, error)

func (*Client) NewEndFileDownloadTransaction added in v0.7.0

func (c *Client) NewEndFileDownloadTransaction(deadline *Deadline, recipient *PublicAccount, operationToken *Hash, files []*DownloadFile) (*EndFileDownloadTransaction, error)

func (*Client) NewEndOperationTransaction added in v0.7.0

func (c *Client) NewEndOperationTransaction(deadline *Deadline, mosaics []*Mosaic, token *Hash, status OperationStatus) (*EndOperationTransaction, error)

func (*Client) NewExchangeOfferTransaction added in v0.6.0

func (c *Client) NewExchangeOfferTransaction(deadline *Deadline, confirmations []*ExchangeConfirmation) (*ExchangeOfferTransaction, error)

func (*Client) NewFilesDepositTransaction added in v0.6.0

func (c *Client) NewFilesDepositTransaction(deadline *Deadline, driveKey *PublicAccount, files []*File) (*FilesDepositTransaction, error)

func (*Client) NewFinishDownloadTransaction added in v0.7.5

func (c *Client) NewFinishDownloadTransaction(deadline *Deadline, downloadChannelId *Hash, feedbackFeeAmount Amount) (*FinishDownloadTransaction, error)

func (*Client) NewHarvesterTransaction added in v0.7.3

func (c *Client) NewHarvesterTransaction(deadline *Deadline, htt HarvesterTransactionType, harvesterKey *PublicAccount) (*HarvesterTransaction, error)

func (*Client) NewJoinToDriveTransaction added in v0.6.0

func (c *Client) NewJoinToDriveTransaction(deadline *Deadline, driveKey *PublicAccount) (*JoinToDriveTransaction, error)

func (*Client) NewLockFundsTransaction

func (c *Client) NewLockFundsTransaction(deadline *Deadline, mosaic *Mosaic, duration Duration, signedTx *SignedTransaction) (*LockFundsTransaction, error)

func (*Client) NewManualCallTransaction added in v0.8.0

func (c *Client) NewManualCallTransaction(
	deadline *Deadline,
	contractKey *PublicAccount,
	executionCallPayment Amount,
	downloadCallPayment Amount,
	fileName string,
	functionName string,
	actualArguments []byte,
	servicePayments []*Mosaic,
) (*ManualCallTransaction, error)

func (*Client) NewManualRateChangeTransaction added in v0.7.5

func (c *Client) NewManualRateChangeTransaction(
	deadline *Deadline,
	providerMosaicId *MosaicId,
	currencyBalanceIncrease bool,
	currencyBalanceChange Amount,
	mosaicBalanceIncrease bool,
	mosaicBalanceChange Amount,
) (*ManualRateChangeTransaction, error)

func (*Client) NewModifyContractTransaction

func (c *Client) NewModifyContractTransaction(
	deadline *Deadline, durationDelta Duration, hash *Hash,
	customers []*MultisigCosignatoryModification,
	executors []*MultisigCosignatoryModification,
	verifiers []*MultisigCosignatoryModification) (*ModifyContractTransaction, error)

func (*Client) NewModifyMetadataAddressTransaction

func (c *Client) NewModifyMetadataAddressTransaction(deadline *Deadline, address *Address, modifications []*MetadataModification) (*ModifyMetadataAddressTransaction, error)

func (*Client) NewModifyMetadataMosaicTransaction

func (c *Client) NewModifyMetadataMosaicTransaction(deadline *Deadline, mosaicId *MosaicId, modifications []*MetadataModification) (*ModifyMetadataMosaicTransaction, error)

func (*Client) NewModifyMetadataNamespaceTransaction

func (c *Client) NewModifyMetadataNamespaceTransaction(deadline *Deadline, namespaceId *NamespaceId, modifications []*MetadataModification) (*ModifyMetadataNamespaceTransaction, error)

func (*Client) NewModifyMultisigAccountTransaction

func (c *Client) NewModifyMultisigAccountTransaction(deadline *Deadline, minApprovalDelta int8, minRemovalDelta int8, modifications []*MultisigCosignatoryModification) (*ModifyMultisigAccountTransaction, error)

func (*Client) NewMosaicAliasTransaction

func (c *Client) NewMosaicAliasTransaction(deadline *Deadline, mosaicId *MosaicId, namespaceId *NamespaceId, actionType AliasActionType) (*MosaicAliasTransaction, error)

func (*Client) NewMosaicDefinitionTransaction

func (c *Client) NewMosaicDefinitionTransaction(deadline *Deadline, nonce uint32, ownerPublicKey string, mosaicProps *MosaicProperties) (*MosaicDefinitionTransaction, error)

func (*Client) NewMosaicMetadataTransaction added in v0.7.3

func (c *Client) NewMosaicMetadataTransaction(deadline *Deadline,
	mosaic *MosaicId, account *PublicAccount, scopedKey ScopedMetadataKey,
	newValue string, oldValue string) (*MosaicMetadataTransaction, error)

func (*Client) NewMosaicModifyLevyTransaction added in v0.7.3

func (c *Client) NewMosaicModifyLevyTransaction(deadline *Deadline, mosaicId *MosaicId, levy *MosaicLevy) (*MosaicModifyLevyTransaction, error)

func (*Client) NewMosaicRemoveLevyTransaction added in v0.7.3

func (c *Client) NewMosaicRemoveLevyTransaction(deadline *Deadline, mosaicId *MosaicId) (*MosaicRemoveLevyTransaction, error)

func (*Client) NewMosaicSupplyChangeTransaction

func (c *Client) NewMosaicSupplyChangeTransaction(deadline *Deadline, assetId AssetId, supplyType MosaicSupplyType, delta Amount) (*MosaicSupplyChangeTransaction, error)

func (*Client) NewNamespaceMetadataTransaction added in v0.7.3

func (c *Client) NewNamespaceMetadataTransaction(deadline *Deadline,
	namespace *NamespaceId, account *PublicAccount, scopedKey ScopedMetadataKey,
	newValue string, oldValue string) (*NamespaceMetadataTransaction, error)

func (*Client) NewNetworkConfigTransaction

func (c *Client) NewNetworkConfigTransaction(deadline *Deadline, delta Duration, config *NetworkConfig, entities *SupportedEntities) (*NetworkConfigTransaction, error)

func (*Client) NewOperationIdentifyTransaction added in v0.7.0

func (c *Client) NewOperationIdentifyTransaction(deadline *Deadline, hash *Hash) (*OperationIdentifyTransaction, error)

func (*Client) NewPlaceSdaExchangeOfferTransaction added in v0.7.5

func (c *Client) NewPlaceSdaExchangeOfferTransaction(deadline *Deadline, placeSdaOffers []*PlaceSdaOffer) (*PlaceSdaExchangeOfferTransaction, error)

func (*Client) NewPrepareBcDriveTransaction added in v0.7.5

func (c *Client) NewPrepareBcDriveTransaction(deadline *Deadline, driveSize StorageSize, verificationFeeAmount Amount, replicatorCount uint16) (*PrepareBcDriveTransaction, error)

func (*Client) NewPrepareDriveTransaction added in v0.6.0

func (c *Client) NewPrepareDriveTransaction(deadline *Deadline, owner *PublicAccount,
	duration Duration, billingPeriod Duration, billingPrice Amount, driveSize StorageSize,
	replicas uint16, minReplicators uint16, percentApprovers uint8) (*PrepareDriveTransaction, error)

func (*Client) NewRegisterRootNamespaceTransaction

func (c *Client) NewRegisterRootNamespaceTransaction(deadline *Deadline, namespaceName string, duration Duration) (*RegisterNamespaceTransaction, error)

func (*Client) NewRegisterSubNamespaceTransaction

func (c *Client) NewRegisterSubNamespaceTransaction(deadline *Deadline, namespaceName string, parentId *NamespaceId) (*RegisterNamespaceTransaction, error)

func (*Client) NewRemoveExchangeOfferTransaction added in v0.6.0

func (c *Client) NewRemoveExchangeOfferTransaction(deadline *Deadline, removeOffers []*RemoveOffer) (*RemoveExchangeOfferTransaction, error)

func (*Client) NewRemoveSdaExchangeOfferTransaction added in v0.7.5

func (c *Client) NewRemoveSdaExchangeOfferTransaction(deadline *Deadline, removeSdaOffers []*RemoveSdaOffer) (*RemoveSdaExchangeOfferTransaction, error)

func (*Client) NewReplicatorOffboardingTransaction added in v0.7.5

func (c *Client) NewReplicatorOffboardingTransaction(deadline *Deadline, driveKey *PublicAccount) (*ReplicatorOffboardingTransaction, error)

func (*Client) NewReplicatorOnboardingTransaction added in v0.7.5

func (c *Client) NewReplicatorOnboardingTransaction(deadline *Deadline, capacity Amount, nodeBootKey *PublicAccount, message *Hash, messageSignature *Signature) (*ReplicatorOnboardingTransaction, error)

func (*Client) NewReplicatorTreeRebuildTransaction added in v0.8.4

func (c *Client) NewReplicatorTreeRebuildTransaction(deadline *Deadline, replicatorKeys []*PublicAccount) (*ReplicatorTreeRebuildTransaction, error)

func (*Client) NewReplicatorsCleanupTransaction added in v0.8.4

func (c *Client) NewReplicatorsCleanupTransaction(deadline *Deadline, replicatorKeys []*PublicAccount) (*ReplicatorsCleanupTransaction, error)

func (*Client) NewSecretLockTransaction

func (c *Client) NewSecretLockTransaction(deadline *Deadline, mosaic *Mosaic, duration Duration, secret *Secret, recipient *Address) (*SecretLockTransaction, error)

func (*Client) NewSecretProofTransaction

func (c *Client) NewSecretProofTransaction(deadline *Deadline, hashType HashType, proof *Proof, recipient *Address) (*SecretProofTransaction, error)

func (*Client) NewStartDriveVerificationTransaction added in v0.6.0

func (c *Client) NewStartDriveVerificationTransaction(deadline *Deadline, driveKey *PublicAccount) (*StartDriveVerificationTransaction, error)

func (*Client) NewStartExecuteTransaction added in v0.7.0

func (c *Client) NewStartExecuteTransaction(deadline *Deadline, supercontract *PublicAccount, mosaics []*Mosaic,
	function string, functionParameters []int64) (*StartExecuteTransaction, error)

func (*Client) NewStartFileDownloadTransaction added in v0.7.0

func (c *Client) NewStartFileDownloadTransaction(deadline *Deadline, drive *PublicAccount, files []*DownloadFile) (*StartFileDownloadTransaction, error)

func (*Client) NewStoragePaymentTransaction added in v0.7.5

func (c *Client) NewStoragePaymentTransaction(deadline *Deadline, driveKey *PublicAccount, storageUnits Amount) (*StoragePaymentTransaction, error)

func (*Client) NewSuperContractFileSystemTransaction added in v0.7.0

func (c *Client) NewSuperContractFileSystemTransaction(deadline *Deadline, driveKey string, newRootHash *Hash, oldRootHash *Hash, addActions []*Action, removeActions []*Action) (*SuperContractFileSystemTransaction, error)

func (*Client) NewTransferTransaction

func (c *Client) NewTransferTransaction(deadline *Deadline, recipient *Address, mosaics []*Mosaic, message Message) (*TransferTransaction, error)

func (*Client) NewTransferTransactionWithNamespace

func (c *Client) NewTransferTransactionWithNamespace(deadline *Deadline, recipient *NamespaceId, mosaics []*Mosaic, message Message) (*TransferTransaction, error)

func (*Client) NewVerificationPaymentTransaction added in v0.7.5

func (c *Client) NewVerificationPaymentTransaction(deadline *Deadline, driveKey *PublicAccount, verificationFeeAmount Amount) (*VerificationPaymentTransaction, error)

type CommonLockInfo added in v0.6.0

type CommonLockInfo struct {
	Account  *PublicAccount
	MosaicId *MosaicId
	Amount   Amount
	Height   Height
	Status   LockStatusType
}

type CompletedCall added in v0.8.0

type CompletedCall struct {
	CallId        *Hash
	Caller        *PublicAccount
	Status        uint16
	ExecutionWork Amount
	DownloadWork  Amount
}

func (*CompletedCall) String added in v0.8.0

func (completedCall *CompletedCall) String() string

type CompletedDataModification added in v0.7.5

type CompletedDataModification struct {
	*ActiveDataModification
	State DataModificationState
}

func (*CompletedDataModification) String added in v0.7.5

func (completed *CompletedDataModification) String() string

type Config

type Config struct {
	BaseURLs              []url.URL
	UsedBaseUrl           url.URL
	WsReconnectionTimeout time.Duration
	GenerationHash        *Hash
	NetworkType
	FeeCalculationStrategy
	// contains filtered or unexported fields
}

Provides service configuration

func NewConfig

func NewConfig(ctx context.Context, baseUrls []string) (*Config, error)

returns config for HTTP Client from passed node url, filled by information from remote blockchain node

func NewConfigWithReputation

func NewConfigWithReputation(
	baseUrls []string,
	networkType NetworkType,
	repConf *reputationConfig,
	wsReconnectionTimeout time.Duration,
	generationHash *Hash,
	strategy FeeCalculationStrategy) (*Config, error)

type ConfigBag

type ConfigBag struct {
	Name    string
	Comment string
	Index   int
	Fields  map[string]*Field
}

func NewConfigBag

func NewConfigBag() *ConfigBag

func (ConfigBag) String

func (c ConfigBag) String() string

type ConfirmedUsedSize added in v0.7.5

type ConfirmedUsedSize struct {
	Replicator *PublicAccount
	Size       StorageSize
}

func (*ConfirmedUsedSize) String added in v0.7.5

func (confirmed *ConfirmedUsedSize) String() string

type ContractCall added in v0.8.0

type ContractCall struct {
	CallId               *Hash
	Caller               *PublicAccount
	FileName             string
	FunctionName         string
	ActualArguments      []byte
	ExecutionCallPayment Amount
	DownloadCallPayment  Amount
	ServicePayments      []*Mosaic
	BlockHeight          Height
}

func (*ContractCall) String added in v0.8.0

func (contractCall *ContractCall) String() string

type ContractInfo

type ContractInfo struct {
	Multisig        string
	MultisigAddress *Address
	Start           Height
	Duration        Duration
	Content         *Hash
	Customers       []string
	Executors       []string
	Verifiers       []string
}

func (*ContractInfo) String

func (ref *ContractInfo) String() string

type ContractService

type ContractService service

func (*ContractService) GetContractsByAddress

func (ref *ContractService) GetContractsByAddress(ctx context.Context, address string) ([]*ContractInfo, error)

func (*ContractService) GetContractsInfo

func (ref *ContractService) GetContractsInfo(ctx context.Context, contractPubKeys ...string) ([]*ContractInfo, error)

type CosignatureSignedTransaction

type CosignatureSignedTransaction struct {
	ParentHash *Hash
	Signature  *Signature
	Signer     string
}

type CosignatureTransaction

type CosignatureTransaction struct {
	TransactionToCosign *AggregateTransaction
}

func NewCosignatureTransaction

func NewCosignatureTransaction(txToCosign *AggregateTransaction) (*CosignatureTransaction, error)

returns a CosignatureTransaction from passed AggregateTransaction

func NewCosignatureTransactionFromHash

func NewCosignatureTransactionFromHash(hash *Hash) *CosignatureTransaction

returns a CosignatureTransaction from passed hash of bounded AggregateTransaction

func (*CosignatureTransaction) String

func (tx *CosignatureTransaction) String() string

type CreateLiquidityProviderTransaction added in v0.7.5

type CreateLiquidityProviderTransaction struct {
	AbstractTransaction
	ProviderMosaicId      *MosaicId
	CurrencyDeposit       Amount
	InitialMosaicsMinting Amount
	SlashingPeriod        uint32
	WindowSize            uint16
	SlashingAccount       *PublicAccount
	Alpha                 uint32
	Beta                  uint32
}

func NewCreateLiquidityProviderTransaction added in v0.7.5

func NewCreateLiquidityProviderTransaction(
	deadline *Deadline,
	providerMosaicId *MosaicId,
	currencyDeposit Amount,
	initialMosaicsMinting Amount,
	slashingPeriod uint32,
	windowSize uint16,
	slashingAccount *PublicAccount,
	alpha uint32,
	beta uint32,
	networkType NetworkType,
) (*CreateLiquidityProviderTransaction, error)

func (*CreateLiquidityProviderTransaction) Bytes added in v0.7.5

func (*CreateLiquidityProviderTransaction) GetAbstractTransaction added in v0.7.5

func (tx *CreateLiquidityProviderTransaction) GetAbstractTransaction() *AbstractTransaction

func (*CreateLiquidityProviderTransaction) Size added in v0.7.5

func (*CreateLiquidityProviderTransaction) String added in v0.7.5

type CumulativePayment added in v0.7.5

type CumulativePayment struct {
	Replicator *PublicAccount
	Payment    Amount
}

func (*CumulativePayment) String added in v0.7.5

func (payment *CumulativePayment) String() string

type DataModificationApprovalTransaction added in v0.7.5

type DataModificationApprovalTransaction struct {
	AbstractTransaction
	DriveKey               *PublicAccount
	DataModificationId     *Hash
	FileStructureCdi       *Hash
	FileStructureSizeBytes uint64
	MetaFilesSizeBytes     uint64
	UsedDriveSizeBytes     uint64
	JudgingKeysCount       uint8
	OverlappingKeysCount   uint8
	JudgedKeysCount        uint8
	OpinionElementCount    uint16
	PublicKeys             []*PublicAccount
	Signatures             []*Signature
	PresentOpinions        []uint8
	Opinions               []uint64
}

Data Modification Approval Transaction

func (*DataModificationApprovalTransaction) Bytes added in v0.7.5

func (*DataModificationApprovalTransaction) GetAbstractTransaction added in v0.7.5

func (tx *DataModificationApprovalTransaction) GetAbstractTransaction() *AbstractTransaction

func (*DataModificationApprovalTransaction) Size added in v0.7.5

func (*DataModificationApprovalTransaction) String added in v0.7.5

type DataModificationCancelTransaction added in v0.7.5

type DataModificationCancelTransaction struct {
	AbstractTransaction
	DriveKey           *PublicAccount
	DataModificationId *Hash
}

Data Modification Cancel Transaction

func NewDataModificationCancelTransaction added in v0.7.5

func NewDataModificationCancelTransaction(
	deadline *Deadline,
	driveKey *PublicAccount,
	dataModificationId *Hash,
	networkType NetworkType,
) (*DataModificationCancelTransaction, error)

func (*DataModificationCancelTransaction) Bytes added in v0.7.5

func (tx *DataModificationCancelTransaction) Bytes() ([]byte, error)

func (*DataModificationCancelTransaction) GetAbstractTransaction added in v0.7.5

func (tx *DataModificationCancelTransaction) GetAbstractTransaction() *AbstractTransaction

func (*DataModificationCancelTransaction) Size added in v0.7.5

func (*DataModificationCancelTransaction) String added in v0.7.5

type DataModificationShard added in v0.7.5

type DataModificationShard struct {
	Replicator             *PublicAccount
	ActualShardReplicators []*UploadInfoStorageV2
	FormerShardReplicators []*UploadInfoStorageV2
	OwnerUpload            uint64
}

func (*DataModificationShard) String added in v0.7.5

func (uis *DataModificationShard) String() string

type DataModificationSingleApprovalTransaction added in v0.7.5

type DataModificationSingleApprovalTransaction struct {
	AbstractTransaction
	DriveKey           *PublicAccount
	DataModificationId *Hash
	PublicKeysCount    uint8
	PublicKeys         []*PublicAccount
	Opinions           []uint64
}

func (*DataModificationSingleApprovalTransaction) Bytes added in v0.7.5

func (*DataModificationSingleApprovalTransaction) GetAbstractTransaction added in v0.7.5

func (tx *DataModificationSingleApprovalTransaction) GetAbstractTransaction() *AbstractTransaction

func (*DataModificationSingleApprovalTransaction) Size added in v0.7.5

func (*DataModificationSingleApprovalTransaction) String added in v0.7.5

type DataModificationState added in v0.7.5

type DataModificationState uint8
const (
	Succeeded DataModificationState = iota
	Cancelled
)

type DataModificationTransaction added in v0.7.5

type DataModificationTransaction struct {
	AbstractTransaction
	DriveKey          *PublicAccount
	DownloadDataCdi   *Hash
	UploadSize        StorageSize
	FeedbackFeeAmount Amount
}

Data Modification Transaction

func NewDataModificationTransaction added in v0.7.5

func NewDataModificationTransaction(
	deadline *Deadline,
	driveKey *PublicAccount,
	downloadDataCdi *Hash,
	uploadSize StorageSize,
	feedbackFeeAmount Amount,
	networkType NetworkType,
) (*DataModificationTransaction, error)

func (*DataModificationTransaction) Bytes added in v0.7.5

func (tx *DataModificationTransaction) Bytes() ([]byte, error)

func (*DataModificationTransaction) GetAbstractTransaction added in v0.7.5

func (tx *DataModificationTransaction) GetAbstractTransaction() *AbstractTransaction

func (*DataModificationTransaction) Size added in v0.7.5

func (tx *DataModificationTransaction) Size() int

func (*DataModificationTransaction) String added in v0.7.5

func (tx *DataModificationTransaction) String() string

type DeactivateTransaction added in v0.7.0

type DeactivateTransaction struct {
	AbstractTransaction
	SuperContract string
	DriveKey      string
}

func NewDeactivateTransaction added in v0.7.0

func NewDeactivateTransaction(deadline *Deadline, sc string, driveKey string, networkType NetworkType) (*DeactivateTransaction, error)

func (*DeactivateTransaction) Bytes added in v0.7.0

func (tx *DeactivateTransaction) Bytes() ([]byte, error)

func (*DeactivateTransaction) GetAbstractTransaction added in v0.7.0

func (tx *DeactivateTransaction) GetAbstractTransaction() *AbstractTransaction

func (*DeactivateTransaction) Size added in v0.7.0

func (tx *DeactivateTransaction) Size() int

func (*DeactivateTransaction) String added in v0.7.0

func (tx *DeactivateTransaction) String() string

type Deadline

type Deadline struct {
	Timestamp
}

func NewDeadline

func NewDeadline(delta time.Duration) *Deadline

returns new Deadline from passed duration

func NewDeadlineFromBlockchainTimestamp

func NewDeadlineFromBlockchainTimestamp(timestamp *BlockchainTimestamp) *Deadline

returns new Deadline from passed BlockchainTimestamp

type DeployContractTransaction added in v0.8.0

type DeployContractTransaction struct {
	AbstractTransaction
	DriveKey                       *PublicAccount
	ExecutionCallPayment           Amount
	DownloadCallPayment            Amount
	AutomaticExecutionCallPayment  Amount
	AutomaticDownloadCallPayment   Amount
	AutomaticExecutionsNumber      uint32
	Assignee                       *PublicAccount
	FileName                       string
	FunctionName                   string
	ActualArguments                []byte
	ServicePayments                []*Mosaic
	AutomaticExecutionFileName     string
	AutomaticExecutionFunctionName string
}

Deploy Contract Transaction

func NewDeployContractTransaction added in v0.8.0

func NewDeployContractTransaction(
	deadline *Deadline,
	driveKey *PublicAccount,
	executionCallPayment Amount,
	downloadCallPayment Amount,
	automaticExecutionCallPayment Amount,
	automaticDownloadCallPayment Amount,
	automaticExecutionsNumber uint32,
	assignee *PublicAccount,
	fileName string,
	functionName string,
	actualArguments []byte,
	servicePayments []*Mosaic,
	automaticExecutionFileName string,
	automaticExecutionFunctionName string,
	networkType NetworkType,
) (*DeployContractTransaction, error)

deploy contract transaction

func (*DeployContractTransaction) Bytes added in v0.8.0

func (tx *DeployContractTransaction) Bytes() ([]byte, error)

func (*DeployContractTransaction) GetAbstractTransaction added in v0.8.0

func (tx *DeployContractTransaction) GetAbstractTransaction() *AbstractTransaction

func (*DeployContractTransaction) Size added in v0.8.0

func (tx *DeployContractTransaction) Size() int

type DeployTransaction added in v0.7.0

type DeployTransaction struct {
	AbstractTransaction
	DriveAccount *PublicAccount
	Owner        *PublicAccount
	FileHash     *Hash
	VMVersion    uint64
}

func NewDeployTransaction added in v0.7.0

func NewDeployTransaction(deadline *Deadline, drive, owner *PublicAccount, fileHash *Hash, vmVersion uint64, networkType NetworkType) (*DeployTransaction, error)

func (*DeployTransaction) Bytes added in v0.7.0

func (tx *DeployTransaction) Bytes() ([]byte, error)

func (*DeployTransaction) GetAbstractTransaction added in v0.7.0

func (tx *DeployTransaction) GetAbstractTransaction() *AbstractTransaction

func (*DeployTransaction) Size added in v0.7.0

func (tx *DeployTransaction) Size() int

func (*DeployTransaction) String added in v0.7.0

func (tx *DeployTransaction) String() string

type Difficulty

type Difficulty = baseInt64

type DownloadApprovalTransaction added in v0.7.5

type DownloadApprovalTransaction struct {
	AbstractTransaction
	DownloadChannelId    *Hash
	ApprovalTrigger      *Hash
	JudgingKeysCount     uint8
	OverlappingKeysCount uint8
	JudgedKeysCount      uint8
	OpinionElementCount  uint16
	PublicKeys           []*PublicAccount
	Signatures           []*Signature
	PresentOpinions      []uint8
	Opinions             []uint64
}

Download Approval Transaction

func (*DownloadApprovalTransaction) Bytes added in v0.7.5

func (tx *DownloadApprovalTransaction) Bytes() ([]byte, error)

func (*DownloadApprovalTransaction) GetAbstractTransaction added in v0.7.5

func (tx *DownloadApprovalTransaction) GetAbstractTransaction() *AbstractTransaction

func (*DownloadApprovalTransaction) Size added in v0.7.5

func (tx *DownloadApprovalTransaction) Size() int

func (*DownloadApprovalTransaction) String added in v0.7.5

func (tx *DownloadApprovalTransaction) String() string

type DownloadChannel added in v0.7.5

type DownloadChannel struct {
	Id                    *Hash
	Consumer              *PublicAccount
	Drive                 *PublicAccount
	DownloadSizeMegabytes StorageSize
	DownloadApprovalCount uint16
	Finished              bool
	ListOfPublicKeys      []*PublicAccount
	ShardReplicators      []*PublicAccount
	CumulativePayments    []*CumulativePayment
}

func (*DownloadChannel) String added in v0.7.5

func (downloadChannel *DownloadChannel) String() string

type DownloadChannelsFilters added in v0.7.5

type DownloadChannelsFilters struct {
	Consumer string `url:"consumerKey,omitempty"`

	DownloadSize     uint64 `url:"downloadSize,omitempty"`
	ToDownloadSize   uint32 `url:"toDownloadSize,omitempty"`
	FromDownloadSize uint64 `url:"fromDownloadSize,omitempty"`

	DownloadApprovalCount     uint64 `url:"downloadApprovalCount,omitempty"`
	ToDownloadApprovalCount   uint64 `url:"toDownloadApprovalCount,omitempty"`
	FromDownloadApprovalCount uint64 `url:"fromDownloadApprovalCount,omitempty"`
}

type DownloadChannelsPage added in v0.7.5

type DownloadChannelsPage struct {
	DownloadChannels []*DownloadChannel
	Pagination       Pagination
}

type DownloadChannelsPageOptions added in v0.7.5

type DownloadChannelsPageOptions struct {
	DownloadChannelsFilters
	PaginationOrderingOptions
}

type DownloadFile added in v0.7.0

type DownloadFile = Action

type DownloadInfo added in v0.7.0

type DownloadInfo struct {
	OperationToken *Hash
	DriveAccount   *PublicAccount
	FileRecipient  *PublicAccount
	Height         Height
	Files          []*DownloadFile
}

type DownloadPaymentTransaction added in v0.7.5

type DownloadPaymentTransaction struct {
	AbstractTransaction
	DownloadChannelId *Hash
	DownloadSize      StorageSize
	FeedbackFeeAmount Amount
}

Download Payment Transaction

func NewDownloadPaymentTransaction added in v0.7.5

func NewDownloadPaymentTransaction(
	deadline *Deadline,
	downloadChannelId *Hash,
	downloadSize StorageSize,
	feedbackFeeAmount Amount,
	networkType NetworkType,
) (*DownloadPaymentTransaction, error)

func (*DownloadPaymentTransaction) Bytes added in v0.7.5

func (tx *DownloadPaymentTransaction) Bytes() ([]byte, error)

func (*DownloadPaymentTransaction) GetAbstractTransaction added in v0.7.5

func (tx *DownloadPaymentTransaction) GetAbstractTransaction() *AbstractTransaction

func (*DownloadPaymentTransaction) Size added in v0.7.5

func (tx *DownloadPaymentTransaction) Size() int

func (*DownloadPaymentTransaction) String added in v0.7.5

func (tx *DownloadPaymentTransaction) String() string

type DownloadShard added in v0.7.5

type DownloadShard struct {
	DownloadChannelId *Hash
}

func (*DownloadShard) String added in v0.7.5

func (ds *DownloadShard) String() string

type DownloadTransaction added in v0.7.5

type DownloadTransaction struct {
	AbstractTransaction
	DriveKey          *PublicAccount
	DownloadSize      StorageSize
	FeedbackFeeAmount Amount
	ListOfPublicKeys  []*PublicAccount
}

Download Transaction

func NewDownloadTransaction added in v0.7.5

func NewDownloadTransaction(
	deadline *Deadline,
	driveKey *PublicAccount,
	downloadSize StorageSize,
	feedbackFeeAmount Amount,
	listOfPublicKeys []*PublicAccount,
	networkType NetworkType,
) (*DownloadTransaction, error)

func (*DownloadTransaction) Bytes added in v0.7.5

func (tx *DownloadTransaction) Bytes() ([]byte, error)

func (*DownloadTransaction) GetAbstractTransaction added in v0.7.5

func (tx *DownloadTransaction) GetAbstractTransaction() *AbstractTransaction

func (*DownloadTransaction) Size added in v0.7.5

func (tx *DownloadTransaction) Size() int

func (*DownloadTransaction) String added in v0.7.5

func (tx *DownloadTransaction) String() string

type Drive added in v0.6.0

type Drive struct {
	DriveAccount     *PublicAccount
	Start            Height
	State            DriveState
	OwnerAccount     *PublicAccount
	RootHash         *Hash
	Duration         Duration
	BillingPeriod    Duration
	BillingPrice     Amount
	DriveSize        StorageSize
	OccupiedSpace    StorageSize
	Replicas         uint16
	MinReplicators   uint16
	PercentApprovers uint8
	BillingHistory   []*BillingDescription
	Files            map[Hash]StorageSize
	Replicators      map[string]*ReplicatorInfo
	UploadPayments   []*PaymentInformation
}

func (*Drive) String added in v0.6.0

func (drive *Drive) String() string

type DriveClosureTransaction added in v0.7.5

type DriveClosureTransaction struct {
	AbstractTransaction
	DriveKey *PublicAccount
}

Drive Closure Transaction

func NewDriveClosureTransaction added in v0.7.5

func NewDriveClosureTransaction(
	deadline *Deadline,
	driveKey *PublicAccount,
	networkType NetworkType,
) (*DriveClosureTransaction, error)

func (*DriveClosureTransaction) Bytes added in v0.7.5

func (tx *DriveClosureTransaction) Bytes() ([]byte, error)

func (*DriveClosureTransaction) GetAbstractTransaction added in v0.7.5

func (tx *DriveClosureTransaction) GetAbstractTransaction() *AbstractTransaction

func (*DriveClosureTransaction) Size added in v0.7.5

func (tx *DriveClosureTransaction) Size() int

func (*DriveClosureTransaction) String added in v0.7.5

func (tx *DriveClosureTransaction) String() string

type DriveFileSystemTransaction added in v0.6.0

type DriveFileSystemTransaction struct {
	AbstractTransaction
	DriveKey      string
	NewRootHash   *Hash
	OldRootHash   *Hash
	AddActions    []*Action
	RemoveActions []*Action
}

func NewDriveFileSystemTransaction added in v0.6.0

func NewDriveFileSystemTransaction(
	deadline *Deadline,
	driveKey string,
	newRootHash *Hash,
	oldRootHash *Hash,
	addActions []*Action,
	removeActions []*Action,
	networkType NetworkType,
) (*DriveFileSystemTransaction, error)

func (*DriveFileSystemTransaction) Bytes added in v0.6.0

func (tx *DriveFileSystemTransaction) Bytes() ([]byte, error)

func (*DriveFileSystemTransaction) GetAbstractTransaction added in v0.6.0

func (tx *DriveFileSystemTransaction) GetAbstractTransaction() *AbstractTransaction

func (*DriveFileSystemTransaction) Size added in v0.6.0

func (tx *DriveFileSystemTransaction) Size() int

func (*DriveFileSystemTransaction) String added in v0.6.0

func (tx *DriveFileSystemTransaction) String() string

type DriveFilesRewardTransaction added in v0.6.0

type DriveFilesRewardTransaction struct {
	AbstractTransaction
	UploadInfos []*UploadInfo
}

func NewDriveFilesRewardTransaction added in v0.6.0

func NewDriveFilesRewardTransaction(
	deadline *Deadline,
	infos []*UploadInfo,
	networkType NetworkType,
) (*DriveFilesRewardTransaction, error)

func (*DriveFilesRewardTransaction) Bytes added in v0.6.0

func (tx *DriveFilesRewardTransaction) Bytes() ([]byte, error)

func (*DriveFilesRewardTransaction) GetAbstractTransaction added in v0.6.0

func (tx *DriveFilesRewardTransaction) GetAbstractTransaction() *AbstractTransaction

func (*DriveFilesRewardTransaction) Size added in v0.6.0

func (tx *DriveFilesRewardTransaction) Size() int

func (*DriveFilesRewardTransaction) String added in v0.6.0

func (tx *DriveFilesRewardTransaction) String() string

type DriveInfo added in v0.7.5

type DriveInfo struct {
	DriveKey                            *PublicAccount
	LastApprovedDataModificationId      *Hash
	InitialDownloadWork                 StorageSize
	LastCompletedCumulativeDownloadWork StorageSize
}

func (*DriveInfo) String added in v0.7.5

func (info *DriveInfo) String() string

type DriveParticipantFilter added in v0.6.0

type DriveParticipantFilter string
const (
	AllDriveRoles   DriveParticipantFilter = ""
	OwnerDrive      DriveParticipantFilter = "/owner"
	ReplicatorDrive DriveParticipantFilter = "/replicator"
)

type DriveState added in v0.6.0

type DriveState uint8
const (
	NotStarted DriveState = iota
	Pending
	InProgress
	Finished
)

type DriveStateInfo added in v0.6.0

type DriveStateInfo struct {
	DriveKey string
	State    DriveState
}

type DrivesPage added in v0.7.3

type DrivesPage struct {
	Drives     []*Drive
	Pagination Pagination
}

type DrivesPageFilters added in v0.7.3

type DrivesPageFilters struct {
	Start  StartValue   `url:""`
	States []DriveState `url:"states,omitempty"`
}

type DrivesPageOptions added in v0.7.3

type DrivesPageOptions struct {
	DrivesPageFilters
	PaginationOrderingOptions
}

type Duration

type Duration = baseInt64

type EndBatchExecution added in v0.8.0

type EndBatchExecution struct {
	ContractKey                         *PublicAccount
	BatchId                             uint64
	AutomaticExecutionsNextBlockToCheck Height
	PublicKeys                          []*PublicAccount
	Signatures                          []*Signature
	ProofsOfExecutions                  *RawProofsOfExecution
	CallPayments                        []*CallPayment
}

type EndDriveTransaction added in v0.6.0

type EndDriveTransaction struct {
	AbstractTransaction
	DriveKey *PublicAccount
}

func NewEndDriveTransaction added in v0.6.0

func NewEndDriveTransaction(
	deadline *Deadline,
	driveKey *PublicAccount,
	networkType NetworkType,
) (*EndDriveTransaction, error)

func (*EndDriveTransaction) Bytes added in v0.6.0

func (tx *EndDriveTransaction) Bytes() ([]byte, error)

func (*EndDriveTransaction) GetAbstractTransaction added in v0.6.0

func (tx *EndDriveTransaction) GetAbstractTransaction() *AbstractTransaction

func (*EndDriveTransaction) Size added in v0.6.0

func (tx *EndDriveTransaction) Size() int

func (*EndDriveTransaction) String added in v0.6.0

func (tx *EndDriveTransaction) String() string

type EndDriveVerificationTransaction added in v0.6.0

type EndDriveVerificationTransaction struct {
	AbstractTransaction
	Failures []*FailureVerification
}

func NewEndDriveVerificationTransaction added in v0.6.0

func NewEndDriveVerificationTransaction(
	deadline *Deadline,
	failures []*FailureVerification,
	networkType NetworkType,
) (*EndDriveVerificationTransaction, error)

func (*EndDriveVerificationTransaction) Bytes added in v0.6.0

func (tx *EndDriveVerificationTransaction) Bytes() ([]byte, error)

func (*EndDriveVerificationTransaction) GetAbstractTransaction added in v0.6.0

func (tx *EndDriveVerificationTransaction) GetAbstractTransaction() *AbstractTransaction

func (*EndDriveVerificationTransaction) Size added in v0.6.0

func (*EndDriveVerificationTransaction) String added in v0.6.0

type EndDriveVerificationTransactionV2 added in v0.7.5

type EndDriveVerificationTransactionV2 struct {
	AbstractTransaction
	DriveKey            *PublicAccount
	VerificationTrigger *Hash
	ShardId             uint16
	Keys                []*PublicAccount
	Signatures          []*Signature
	Opinions            uint8
}

End Drive Verification Transaction

func NewEndDriveVerificationTransactionV2 added in v0.7.5

func NewEndDriveVerificationTransactionV2(
	deadline *Deadline,
	driveKey *PublicAccount,
	verificationTrigger *Hash,
	shardId uint16,
	keys []*PublicAccount,
	signatures []*Signature,
	opinions uint8,
	networkType NetworkType,
) (*EndDriveVerificationTransactionV2, error)

func (*EndDriveVerificationTransactionV2) Bytes added in v0.7.5

func (tx *EndDriveVerificationTransactionV2) Bytes() ([]byte, error)

func (*EndDriveVerificationTransactionV2) GetAbstractTransaction added in v0.7.5

func (tx *EndDriveVerificationTransactionV2) GetAbstractTransaction() *AbstractTransaction

func (*EndDriveVerificationTransactionV2) Size added in v0.7.5

func (*EndDriveVerificationTransactionV2) String added in v0.7.5

type EndExecuteTransaction added in v0.7.0

type EndExecuteTransaction = EndOperationTransaction

func NewEndExecuteTransaction added in v0.7.0

func NewEndExecuteTransaction(deadline *Deadline, mosaics []*Mosaic, token *Hash, status OperationStatus, networkType NetworkType) (*EndExecuteTransaction, error)

type EndFileDownloadTransaction added in v0.7.0

type EndFileDownloadTransaction struct {
	AbstractTransaction
	Recipient      *PublicAccount
	OperationToken *Hash
	Files          []*DownloadFile
}

func NewEndFileDownloadTransaction added in v0.7.0

func NewEndFileDownloadTransaction(
	deadline *Deadline,
	recipient *PublicAccount,
	operationToken *Hash,
	files []*DownloadFile,
	networkType NetworkType,
) (*EndFileDownloadTransaction, error)

func (*EndFileDownloadTransaction) Bytes added in v0.7.0

func (tx *EndFileDownloadTransaction) Bytes() ([]byte, error)

func (*EndFileDownloadTransaction) GetAbstractTransaction added in v0.7.0

func (tx *EndFileDownloadTransaction) GetAbstractTransaction() *AbstractTransaction

func (*EndFileDownloadTransaction) Size added in v0.7.0

func (tx *EndFileDownloadTransaction) Size() int

func (*EndFileDownloadTransaction) String added in v0.7.0

func (tx *EndFileDownloadTransaction) String() string

type EndOperationTransaction added in v0.7.0

type EndOperationTransaction struct {
	AbstractTransaction
	UsedMosaics    []*Mosaic
	OperationToken *Hash
	Status         OperationStatus
}

Must be aggregated in AOT

func NewEndOperationTransaction added in v0.7.0

func NewEndOperationTransaction(deadline *Deadline, mosaics []*Mosaic, token *Hash, status OperationStatus, networkType NetworkType) (*EndOperationTransaction, error)

func (*EndOperationTransaction) Bytes added in v0.7.0

func (tx *EndOperationTransaction) Bytes() ([]byte, error)

func (*EndOperationTransaction) GetAbstractTransaction added in v0.7.0

func (tx *EndOperationTransaction) GetAbstractTransaction() *AbstractTransaction

func (*EndOperationTransaction) Size added in v0.7.0

func (tx *EndOperationTransaction) Size() int

func (*EndOperationTransaction) String added in v0.7.0

func (tx *EndOperationTransaction) String() string

type Entity

type Entity struct {
	Name              string
	Type              EntityType
	SupportedVersions []EntityVersion
}

func (Entity) String

func (e Entity) String() string

type EntityType

type EntityType uint16
const (
	AccountPropertyAddress         EntityType = 0x4150
	AccountPropertyMosaic          EntityType = 0x4250
	AccountPropertyEntityType      EntityType = 0x4350
	AddressAlias                   EntityType = 0x424e
	AggregateBonded                EntityType = 0x4241
	AggregateCompleted             EntityType = 0x4141
	AddExchangeOffer               EntityType = 0x415D
	AddHarvesterEntityType         EntityType = 0x4161
	ExchangeOffer                  EntityType = 0x425D
	RemoveExchangeOffer            EntityType = 0x435D
	RemoveHarvesterEntityType      EntityType = 0x4261
	Block                          EntityType = 0x8143
	NemesisBlock                   EntityType = 0x8043
	NetworkConfigEntityType        EntityType = 0x4159
	BlockchainUpgrade              EntityType = 0x4158
	LinkAccount                    EntityType = 0x414c
	Lock                           EntityType = 0x4148
	MetadataAddress                EntityType = 0x413d
	MetadataMosaic                 EntityType = 0x423d
	MetadataNamespace              EntityType = 0x433d
	AccountMetadata                EntityType = 0x413f
	MosaicMetadata                 EntityType = 0x423f
	NamespaceMetadata              EntityType = 0x433f
	ModifyContract                 EntityType = 0x4157
	ModifyMultisig                 EntityType = 0x4155
	MosaicAlias                    EntityType = 0x434e
	MosaicDefinition               EntityType = 0x414d
	MosaicSupplyChange             EntityType = 0x424d
	MosaicModifyLevy               EntityType = 0x434d
	MosaicRemoveLevy               EntityType = 0x444d
	RegisterNamespace              EntityType = 0x414e
	SecretLock                     EntityType = 0x4152
	SecretProof                    EntityType = 0x4252
	Transfer                       EntityType = 0x4154
	PrepareDrive                   EntityType = 0x415A
	JoinToDrive                    EntityType = 0x425A
	DriveFileSystem                EntityType = 0x435A
	FilesDeposit                   EntityType = 0x445A
	EndDrive                       EntityType = 0x455A
	DriveFilesReward               EntityType = 0x465A
	StartDriveVerification         EntityType = 0x475A
	EndDriveVerification           EntityType = 0x485A
	StartFileDownload              EntityType = 0x495A
	EndFileDownload                EntityType = 0x4A5A
	OperationIdentify              EntityType = 0x415F
	StartOperation                 EntityType = 0x425F
	EndOperation                   EntityType = 0x435F
	Deploy                         EntityType = 0x4160
	StartExecute                   EntityType = 0x4260
	EndExecute                     EntityType = 0x4360
	SuperContractFileSystem        EntityType = 0x4460
	Deactivate                     EntityType = 0x4560
	ReplicatorOnboarding           EntityType = 0x4662
	ReplicatorsCleanup             EntityType = 0x4062
	ReplicatorTreeRebuild          EntityType = 0x4167
	PrepareBcDrive                 EntityType = 0x4162
	DataModification               EntityType = 0x4262
	DataModificationApproval       EntityType = 0x4462
	DataModificationSingleApproval EntityType = 0x4B62
	DataModificationCancel         EntityType = 0x4562
	StoragePayment                 EntityType = 0x4A62
	DownloadPayment                EntityType = 0x4962
	Download                       EntityType = 0x4362
	FinishDownload                 EntityType = 0x4862
	VerificationPayment            EntityType = 0x4C62
	EndDriveVerificationV2         EntityType = 0x4F62
	DownloadApproval               EntityType = 0x4D62
	DriveClosure                   EntityType = 0x4E62
	ReplicatorOffboarding          EntityType = 0x4762
	CreateLiquidityProvider        EntityType = 0x4169
	ManualRateChange               EntityType = 0x4269
	PlaceSdaExchangeOffer          EntityType = 0x416A
	RemoveSdaExchangeOffer         EntityType = 0x426A
	DeployContract                 EntityType = 0x416E
	ManualCall                     EntityType = 0x426E
	AutomaticExecutionsPayment     EntityType = 0x436E
	SuccessfulEndBatchExecution    EntityType = 0x446E
	UnsuccessfulEndBatchExecution  EntityType = 0x456E
	AddDbrbProcess                 EntityType = 0x416C
	RemoveDbrbProcess              EntityType = 0x426C
	RemoveDbrbProcessByNetwork     EntityType = 0x436C
	AddOrUpdateDbrbProcess         EntityType = 0x446C
)

func (EntityType) String

func (t EntityType) String() string

type EntityVersion

type EntityVersion uint32
const (
	AccountPropertyAddressVersion        EntityVersion = 1
	AccountPropertyMosaicVersion         EntityVersion = 1
	AccountPropertyEntityTypeVersion     EntityVersion = 1
	AddressAliasVersion                  EntityVersion = 1
	AggregateBondedVersion               EntityVersion = 3
	AggregateCompletedVersion            EntityVersion = 3
	AddExchangeOfferVersion              EntityVersion = 4
	ExchangeOfferVersion                 EntityVersion = 2
	RemoveExchangeOfferVersion           EntityVersion = 2
	NetworkConfigVersion                 EntityVersion = 1
	BlockchainUpgradeVersion             EntityVersion = 1
	LinkAccountVersion                   EntityVersion = 2
	LockVersion                          EntityVersion = 1
	AccountMetadataVersion               EntityVersion = 1
	MosaicMetadataVersion                EntityVersion = 1
	NamespaceMetadataVersion             EntityVersion = 1
	MetadataAddressVersion               EntityVersion = 1
	MetadataMosaicVersion                EntityVersion = 1
	MetadataNamespaceVersion             EntityVersion = 1
	ModifyContractVersion                EntityVersion = 3
	ModifyMultisigVersion                EntityVersion = 3
	MosaicAliasVersion                   EntityVersion = 1
	MosaicDefinitionVersion              EntityVersion = 3
	MosaicSupplyChangeVersion            EntityVersion = 2
	MosaicModifyLevyVersion              EntityVersion = 1
	MosaicRemoveLevyVersion              EntityVersion = 1
	RegisterNamespaceVersion             EntityVersion = 2
	SecretLockVersion                    EntityVersion = 1
	SecretProofVersion                   EntityVersion = 1
	TransferVersion                      EntityVersion = 3
	PrepareDriveVersion                  EntityVersion = 3
	JoinToDriveVersion                   EntityVersion = 1
	DriveFileSystemVersion               EntityVersion = 1
	FilesDepositVersion                  EntityVersion = 1
	EndDriveVersion                      EntityVersion = 1
	DriveFilesRewardVersion              EntityVersion = 1
	StartDriveVerificationVersion        EntityVersion = 1
	EndDriveVerificationVersion          EntityVersion = 1
	StartFileDownloadVersion             EntityVersion = 1
	EndFileDownloadVersion               EntityVersion = 1
	DeployVersion                        EntityVersion = 1
	StartExecuteVersion                  EntityVersion = 1
	EndExecuteVersion                    EntityVersion = 1
	StartOperationVersion                EntityVersion = 1
	EndOperationVersion                  EntityVersion = 1
	HarvesterVersion                     EntityVersion = 1
	OperationIdentifyVersion             EntityVersion = 1
	SuperContractFileSystemVersion       EntityVersion = 1
	DeactivateVersion                    EntityVersion = 1
	ReplicatorOnboardingVersion          EntityVersion = 2
	ReplicatorsCleanupVersion            EntityVersion = 1
	ReplicatorTreeRebuildVersion         EntityVersion = 1
	PrepareBcDriveVersion                EntityVersion = 1
	DataModificationVersion              EntityVersion = 1
	DataModificationApprovalVersion      EntityVersion = 1 // TODO delete?
	DataModificationCancelVersion        EntityVersion = 1
	StoragePaymentVersion                EntityVersion = 1
	DownloadPaymentVersion               EntityVersion = 1
	DownloadVersion                      EntityVersion = 1
	FinishDownloadVersion                EntityVersion = 1
	VerificationPaymentVersion           EntityVersion = 1
	EndDriveVerificationV2Version        EntityVersion = 1
	DownloadApprovalVersion              EntityVersion = 1
	DriveClosureVersion                  EntityVersion = 1
	ReplicatorOffboardingVersion         EntityVersion = 1
	CreateLiquidityProviderVersion       EntityVersion = 1
	ManualRateChangeVersion              EntityVersion = 1
	PlaceSdaExchangeOfferVersion         EntityVersion = 1
	RemoveSdaExchangeOfferVersion        EntityVersion = 1
	AutomaticExecutionsPaymentVersion    EntityVersion = 1
	ManuanCallVersion                    EntityVersion = 1
	DeployContractVersion                EntityVersion = 1
	SuccessfulEndBatchExecutionVersion   EntityVersion = 1
	UnsuccessfulEndBatchExecutionVersion EntityVersion = 1
)

func ExtractVersion

func ExtractVersion(version int64) EntityVersion

type ExchangeConfirmation added in v0.6.0

type ExchangeConfirmation struct {
	Offer
	Owner *PublicAccount
}

func (*ExchangeConfirmation) String added in v0.6.0

func (offer *ExchangeConfirmation) String() string

type ExchangeOfferTransaction added in v0.6.0

type ExchangeOfferTransaction struct {
	AbstractTransaction
	Confirmations []*ExchangeConfirmation
}

Exchange Transaction

func NewExchangeOfferTransaction added in v0.6.0

func NewExchangeOfferTransaction(deadline *Deadline, confirmations []*ExchangeConfirmation, networkType NetworkType) (*ExchangeOfferTransaction, error)

func (*ExchangeOfferTransaction) Bytes added in v0.6.0

func (tx *ExchangeOfferTransaction) Bytes() ([]byte, error)

func (*ExchangeOfferTransaction) GetAbstractTransaction added in v0.6.0

func (tx *ExchangeOfferTransaction) GetAbstractTransaction() *AbstractTransaction

func (*ExchangeOfferTransaction) Size added in v0.6.0

func (tx *ExchangeOfferTransaction) Size() int

func (*ExchangeOfferTransaction) String added in v0.6.0

func (tx *ExchangeOfferTransaction) String() string

type ExchangeService added in v0.6.0

type ExchangeService struct {
	ResolveService *ResolverService
	// contains filtered or unexported fields
}

func (*ExchangeService) GetAccountExchangeInfo added in v0.6.0

func (e *ExchangeService) GetAccountExchangeInfo(ctx context.Context, account *PublicAccount) (*UserExchangeInfo, error)

func (*ExchangeService) GetExchangeOfferByAssetId added in v0.6.0

func (e *ExchangeService) GetExchangeOfferByAssetId(ctx context.Context, assetId AssetId, offerType OfferType) ([]*OfferInfo, error)

Return offers with same operation type and mosaic id. Example: If you want to buy Storage units, you need to call GetExchangeOfferByAssetId(StorageMosaicId, SellOffer)

type ExecutorInfo added in v0.8.0

type ExecutorInfo struct {
	ExecutorKey        *PublicAccount
	NextBatchToApprove uint64
	PoEx               ProofOfExecution
}

func (*ExecutorInfo) String added in v0.8.0

func (executorInfo *ExecutorInfo) String() string

type ExtendedCallDigest added in v0.8.0

type ExtendedCallDigest struct {
	CallId                  *Hash
	Manual                  bool
	Block                   Height
	Status                  uint16
	ReleasedTransactionHash *Hash
}

func (*ExtendedCallDigest) String added in v0.8.0

func (extendedCallDigest *ExtendedCallDigest) String() string

type FailureVerification added in v0.6.0

type FailureVerification struct {
	Replicator  *PublicAccount
	BlochHashes []*Hash
}

func (*FailureVerification) Size added in v0.6.0

func (fail *FailureVerification) Size() int

func (*FailureVerification) String added in v0.6.0

func (fail *FailureVerification) String() string

type FeeCalculationStrategy

type FeeCalculationStrategy uint32
const (
	HighCalculationStrategy   FeeCalculationStrategy = 1500000
	MiddleCalculationStrategy FeeCalculationStrategy = 150000
	LowCalculationStrategy    FeeCalculationStrategy = 15000
)

FeeCalculationStrategy enums

type Field

type Field struct {
	Key     string
	Value   string
	Comment string
	Index   int
}

func NewField

func NewField() *Field

func (Field) String

func (c Field) String() string

type File added in v0.6.0

type File struct {
	FileHash *Hash
}

func (*File) String added in v0.6.0

func (file *File) String() string

type FilesDepositTransaction added in v0.6.0

type FilesDepositTransaction struct {
	AbstractTransaction
	DriveKey *PublicAccount
	Files    []*File
}

Files Deposit Transaction

func NewFilesDepositTransaction added in v0.6.0

func NewFilesDepositTransaction(
	deadline *Deadline,
	driveKey *PublicAccount,
	files []*File,
	networkType NetworkType,
) (*FilesDepositTransaction, error)

func (*FilesDepositTransaction) Bytes added in v0.6.0

func (tx *FilesDepositTransaction) Bytes() ([]byte, error)

func (*FilesDepositTransaction) GetAbstractTransaction added in v0.6.0

func (tx *FilesDepositTransaction) GetAbstractTransaction() *AbstractTransaction

func (*FilesDepositTransaction) Size added in v0.6.0

func (tx *FilesDepositTransaction) Size() int

func (*FilesDepositTransaction) String added in v0.6.0

func (tx *FilesDepositTransaction) String() string

type FinishDownloadTransaction added in v0.7.5

type FinishDownloadTransaction struct {
	AbstractTransaction
	DownloadChannelId *Hash
	FeedbackFeeAmount Amount
}

Finish Download Transaction

func NewFinishDownloadTransaction added in v0.7.5

func NewFinishDownloadTransaction(
	deadline *Deadline,
	downloadChannelId *Hash,
	feedbackFeeAmount Amount,
	networkType NetworkType,
) (*FinishDownloadTransaction, error)

func (*FinishDownloadTransaction) Bytes added in v0.7.5

func (tx *FinishDownloadTransaction) Bytes() ([]byte, error)

func (*FinishDownloadTransaction) GetAbstractTransaction added in v0.7.5

func (tx *FinishDownloadTransaction) GetAbstractTransaction() *AbstractTransaction

func (*FinishDownloadTransaction) Size added in v0.7.5

func (tx *FinishDownloadTransaction) Size() int

func (*FinishDownloadTransaction) String added in v0.7.5

func (tx *FinishDownloadTransaction) String() string

type Harvester added in v0.8.0

type Harvester struct {
	Key                    string
	Owner                  string
	Address                *Address
	DisabledHeight         Height
	LastSigningBlockHeight Height
	EffectiveBalance       Amount
	CanHarvest             bool
	Activity               float64
	Greed                  float64
}

func (*Harvester) String added in v0.8.0

func (h *Harvester) String() string

type HarvesterTransaction added in v0.7.3

type HarvesterTransaction struct {
	AbstractTransaction
	HarvesterKey *PublicAccount
}

func NewHarvesterTransaction added in v0.7.3

func NewHarvesterTransaction(deadline *Deadline, htt HarvesterTransactionType, harvesterKey *PublicAccount, networkType NetworkType) (*HarvesterTransaction, error)

HarvesterTransaction creates new Harvester transaction

func (*HarvesterTransaction) Bytes added in v0.7.3

func (tx *HarvesterTransaction) Bytes() ([]byte, error)

func (*HarvesterTransaction) GetAbstractTransaction added in v0.7.3

func (tx *HarvesterTransaction) GetAbstractTransaction() *AbstractTransaction

func (*HarvesterTransaction) Size added in v0.7.3

func (tx *HarvesterTransaction) Size() int

func (*HarvesterTransaction) String added in v0.7.3

func (tx *HarvesterTransaction) String() string

type HarvesterTransactionType added in v0.7.3

type HarvesterTransactionType EntityType

type HarvestersPage added in v0.8.0

type HarvestersPage struct {
	Harvesters []*Harvester
	Pagination *Pagination
}

func (*HarvestersPage) String added in v0.8.0

func (h *HarvestersPage) String() string

type Hash

type Hash [32]byte

func CalculateCompositeHash added in v0.6.0

func CalculateCompositeHash(secret *Hash, recipient *Address) (*Hash, error)

func CalculateSecretLockInfoHash

func CalculateSecretLockInfoHash(secret *Secret, recipient *Address) (*Hash, error)

func CalculateUniqueAccountMetadataId added in v0.7.3

func CalculateUniqueAccountMetadataId(sourceAddress *Address, targetAccount *PublicAccount, key ScopedMetadataKey) (*Hash, error)

func CalculateUniqueMosaicMetadataId added in v0.7.3

func CalculateUniqueMosaicMetadataId(sourceAddress *Address, targetAccount *PublicAccount, key ScopedMetadataKey, mosaic *MosaicId) (*Hash, error)

func CalculateUniqueNamespaceMetadataId added in v0.7.3

func CalculateUniqueNamespaceMetadataId(sourceAddress *Address, targetAccount *PublicAccount, key ScopedMetadataKey, namespace *NamespaceId) (*Hash, error)

func InnerTransactionHash added in v0.7.0

func InnerTransactionHash(tx Transaction) *Hash

func StringToHash

func StringToHash(hash string) (*Hash, error)

func UniqueAggregateHash added in v0.7.0

func UniqueAggregateHash(aggregateTx *AggregateTransaction, tx Transaction, generationHash *Hash) (*Hash, error)

func (Hash) Empty

func (h Hash) Empty() bool

func (Hash) Equal

func (h Hash) Equal(other *Hash) bool

func (Hash) String

func (h Hash) String() string

func (Hash) Xor added in v0.6.0

func (h Hash) Xor(other *Hash) *Hash

type HashLockInfo added in v0.6.0

type HashLockInfo struct {
	CommonLockInfo
	Hash *Hash
}

type HashType

type HashType uint8
const (
	// / Input is hashed using Sha-3-256.
	SHA3_256 HashType = iota
	// / Input is hashed using Keccak-256.
	KECCAK_256
	// / Input is hashed twice: first with SHA-256 and then with RIPEMD-160.
	HASH_160
	// / Input is hashed twice with SHA-256.
	SHA_256
	// / Internal type inside of blockchain
	Internal_Hash_Type
)

func (HashType) String

func (ht HashType) String() string

type Height

type Height = baseInt64

type HttpError

type HttpError struct {
	StatusCode int
	// contains filtered or unexported fields
}

type JoinToDriveTransaction added in v0.6.0

type JoinToDriveTransaction struct {
	AbstractTransaction
	DriveKey *PublicAccount
}

func NewJoinToDriveTransaction added in v0.6.0

func NewJoinToDriveTransaction(
	deadline *Deadline,
	driveKey *PublicAccount,
	networkType NetworkType,
) (*JoinToDriveTransaction, error)

func (*JoinToDriveTransaction) Bytes added in v0.6.0

func (tx *JoinToDriveTransaction) Bytes() ([]byte, error)

func (*JoinToDriveTransaction) GetAbstractTransaction added in v0.6.0

func (tx *JoinToDriveTransaction) GetAbstractTransaction() *AbstractTransaction

func (*JoinToDriveTransaction) Size added in v0.6.0

func (tx *JoinToDriveTransaction) Size() int

func (*JoinToDriveTransaction) String added in v0.6.0

func (tx *JoinToDriveTransaction) String() string

type KeyPair added in v0.7.3

type KeyPair struct {
	PublicKey  BLSPublicKey
	PrivateKey BLSPrivateKey
}

func GenerateKeyPair added in v0.7.3

func GenerateKeyPair(seed io.Reader) *KeyPair

func GenerateKeyPairFromIKM added in v0.7.3

func GenerateKeyPairFromIKM(ikm [32]byte) *KeyPair

func (*KeyPair) Sign added in v0.7.3

func (p *KeyPair) Sign(msg string) BLSSignature

type LevyType added in v0.7.3

type LevyType uint8

/ region MosaicLevy information

const (
	LevyNone          LevyType = 0x0
	LevyAbsoluteFee   LevyType = 0x1
	LevyPercentileFee LevyType = 0x2

	MosaicLevyDecimalPlace = 100000
)

func (LevyType) String added in v0.7.3

func (lt LevyType) String() string

type LiquidityProvider added in v0.7.5

type LiquidityProvider struct {
	MosaicId           *MosaicId
	ProviderKey        *PublicAccount
	Owner              *PublicAccount
	AdditionallyMinted Amount
	SlashingAccount    *PublicAccount
	SlashingPeriod     uint32
	WindowSize         uint16
	CreationHeight     Height
	Alpha              uint32
	Beta               uint32
	TurnoverHistory    []*Turnover
	RecentTurnover     *Turnover
}

type LiquidityProviderPage added in v0.7.5

type LiquidityProviderPage struct {
	LiquidityProviders []*LiquidityProvider
	Pagination         Pagination
}

type LiquidityProviderPageOptions added in v0.7.5

type LiquidityProviderPageOptions struct {
	PaginationOrderingOptions
	MosaicId        string `url:"mosaicId,omitempty"`
	SlashingAccount string `url:"slashingAccount,omitempty"`
	Owner           string `url:"owner,omitempty"`
}

type LiquidityProviderService added in v0.7.5

type LiquidityProviderService service

func (*LiquidityProviderService) GetLiquidityProvider added in v0.7.5

func (lp *LiquidityProviderService) GetLiquidityProvider(ctx context.Context, provider *PublicAccount) (*LiquidityProvider, error)

func (*LiquidityProviderService) GetLiquidityProviders added in v0.7.5

type LockFundsTransaction

type LockFundsTransaction struct {
	AbstractTransaction
	*Mosaic
	Duration Duration
	*SignedTransaction
}

func NewLockFundsTransaction

func NewLockFundsTransaction(deadline *Deadline, mosaic *Mosaic, duration Duration, signedTx *SignedTransaction, networkType NetworkType) (*LockFundsTransaction, error)

returns a LockFundsTransaction from passed Mosaic, duration in blocks and SignedTransaction

func (*LockFundsTransaction) Bytes added in v0.6.0

func (tx *LockFundsTransaction) Bytes() ([]byte, error)

func (*LockFundsTransaction) GetAbstractTransaction

func (tx *LockFundsTransaction) GetAbstractTransaction() *AbstractTransaction

func (*LockFundsTransaction) Size

func (tx *LockFundsTransaction) Size() int

func (*LockFundsTransaction) String

func (tx *LockFundsTransaction) String() string

type LockService added in v0.6.0

type LockService service

func (*LockService) GetHashLockInfo added in v0.6.0

func (s *LockService) GetHashLockInfo(ctx context.Context, hash *Hash) (*HashLockInfo, error)

func (*LockService) GetHashLockInfosByAccount added in v0.6.0

func (s *LockService) GetHashLockInfosByAccount(ctx context.Context, account *PublicAccount) ([]*HashLockInfo, error)

func (*LockService) GetSecretLockInfo added in v0.6.0

func (s *LockService) GetSecretLockInfo(ctx context.Context, compositeHash *Hash) (*SecretLockInfo, error)

func (*LockService) GetSecretLockInfosByAccount added in v0.6.0

func (s *LockService) GetSecretLockInfosByAccount(ctx context.Context, account *PublicAccount) ([]*SecretLockInfo, error)

func (*LockService) GetSecretLockInfosBySecret added in v0.6.0

func (s *LockService) GetSecretLockInfosBySecret(ctx context.Context, secret *Hash) ([]*SecretLockInfo, error)

type LockStatusType added in v0.6.0

type LockStatusType uint8
const (
	/// Lock is unused.
	Unused LockStatusType = iota

	/// Lock was already used.
	Used
)

type ManualCallTransaction added in v0.8.0

type ManualCallTransaction struct {
	AbstractTransaction
	ContractKey          *PublicAccount
	ExecutionCallPayment Amount
	DownloadCallPayment  Amount
	FileName             string
	FunctionName         string
	ActualArguments      []byte
	ServicePayments      []*Mosaic
}

Manual Call Transaction

func NewManualCallTransaction added in v0.8.0

func NewManualCallTransaction(
	deadline *Deadline,
	contractKey *PublicAccount,
	executionCallPayment Amount,
	downloadCallPayment Amount,
	fileName string,
	functionName string,
	actualArguments []byte,
	servicePayments []*Mosaic,
	networkType NetworkType,
) (*ManualCallTransaction, error)

manual call transaction

func (*ManualCallTransaction) Bytes added in v0.8.0

func (tx *ManualCallTransaction) Bytes() ([]byte, error)

func (*ManualCallTransaction) GetAbstractTransaction added in v0.8.0

func (tx *ManualCallTransaction) GetAbstractTransaction() *AbstractTransaction

func (*ManualCallTransaction) Size added in v0.8.0

func (tx *ManualCallTransaction) Size() int

type ManualRateChangeTransaction added in v0.7.5

type ManualRateChangeTransaction struct {
	AbstractTransaction
	ProviderMosaicId        *MosaicId
	CurrencyBalanceIncrease bool
	CurrencyBalanceChange   Amount
	MosaicBalanceIncrease   bool
	MosaicBalanceChange     Amount
}

func NewManualRateChangeTransaction added in v0.7.5

func NewManualRateChangeTransaction(
	deadline *Deadline,
	providerMosaicId *MosaicId,
	currencyBalanceIncrease bool,
	currencyBalanceChange Amount,
	mosaicBalanceIncrease bool,
	mosaicBalanceChange Amount,
	networkType NetworkType,
) (*ManualRateChangeTransaction, error)

func (*ManualRateChangeTransaction) Bytes added in v0.7.5

func (tx *ManualRateChangeTransaction) Bytes() ([]byte, error)

func (*ManualRateChangeTransaction) GetAbstractTransaction added in v0.7.5

func (tx *ManualRateChangeTransaction) GetAbstractTransaction() *AbstractTransaction

func (*ManualRateChangeTransaction) Size added in v0.7.5

func (tx *ManualRateChangeTransaction) Size() int

func (*ManualRateChangeTransaction) String added in v0.7.5

func (tx *ManualRateChangeTransaction) String() string

type Mapper added in v0.8.4

type Mapper[T any] interface {
	Map([]byte) (T, error)
}

func NewMapper added in v0.8.4

func NewMapper[T any](generationHash *Hash, fn MapperFunc[T]) Mapper[T]

type MapperFunc added in v0.8.4

type MapperFunc[T any] func(generationHash *Hash, payload []byte) (T, error)
var AggregateTransactionMapperFunc MapperFunc[*AggregateTransaction] = func(generationHash *Hash, payload []byte) (*AggregateTransaction, error) {
	buf := bytes.NewBuffer(payload)
	tr, err := MapTransaction(buf, generationHash)
	if err != nil {
		return nil, err
	}

	v, ok := tr.(*AggregateTransaction)
	if !ok {
		return nil, errors.New("error cast types")
	}

	return v, nil
}
var BlockMapperFunc MapperFunc[*BlockInfo] = func(generationHash *Hash, payload []byte) (*BlockInfo, error) {
	dto := &blockInfoDTO{}
	if err := json.Unmarshal(payload, dto); err != nil {
		return nil, err
	}

	return dto.toStruct()
}
var CosignatureMapperFunc MapperFunc[*SignerInfo] = func(generationHash *Hash, payload []byte) (*SignerInfo, error) {
	signerInfoDto := &signerInfoDto{}
	if err := json.Unmarshal(payload, signerInfoDto); err != nil {
		return nil, err
	}

	signature, err := signerInfoDto.Signature.Signature()
	if err != nil {
		return nil, err
	}

	parentHash, err := signerInfoDto.ParentHash.Hash()
	if err != nil {
		return nil, err
	}

	return &SignerInfo{
		signerInfoDto.Signer,
		signature,
		parentHash,
	}, nil
}
var DriveStateMapperFunc MapperFunc[*DriveStateInfo] = func(generationHash *Hash, payload []byte) (*DriveStateInfo, error) {
	driveStateDto := &driveStateDto{}
	if err := json.Unmarshal(payload, driveStateDto); err != nil {
		return nil, err
	}

	return driveStateDto.toStruct()
}
var PartialRemovedMapperFunc MapperFunc[*PartialRemovedInfo] = func(generationHash *Hash, payload []byte) (*PartialRemovedInfo, error) {
	dto := &partialRemovedInfoDTO{}
	if err := json.Unmarshal(payload, dto); err != nil {
		return nil, err
	}

	return dto.toStruct()
}
var StatusMapperFunc MapperFunc[*StatusInfo] = func(generationHash *Hash, payload []byte) (*StatusInfo, error) {
	statusInfoDto := &statusInfoDto{}
	if err := json.Unmarshal(payload, statusInfoDto); err != nil {
		return nil, err
	}

	hash, err := statusInfoDto.Hash.Hash()
	if err != nil {
		return nil, err
	}

	return &StatusInfo{
		statusInfoDto.Status,
		hash,
	}, nil
}
var TransactionMapperFunc MapperFunc[Transaction] = func(generationHash *Hash, payload []byte) (Transaction, error) {
	buf := bytes.NewBuffer(payload)
	return MapTransaction(buf, generationHash)
}
var UnconfirmedRemovedMapperFunc MapperFunc[*UnconfirmedRemoved] = func(generationHash *Hash, payload []byte) (*UnconfirmedRemoved, error) {
	dto := &unconfirmedRemovedDto{}
	if err := json.Unmarshal(payload, dto); err != nil {
		return nil, err
	}

	return dto.toStruct()
}

type Message

type Message interface {
	Type() MessageType
	Payload() []byte
	String() string
}

type MessageType

type MessageType uint8
const (
	PlainMessageType MessageType = iota
	SecureMessageType
)

type MetadataInfo

type MetadataInfo struct {
	MetadataType MetadataType
	Fields       map[string]string
}

type MetadataModification

type MetadataModification struct {
	Type  MetadataModificationType
	Key   string
	Value string
}

func (*MetadataModification) Size

func (m *MetadataModification) Size() int

func (*MetadataModification) String

func (m *MetadataModification) String() string

type MetadataModificationType

type MetadataModificationType uint8
const (
	AddMetadata MetadataModificationType = iota
	RemoveMetadata
)

func (MetadataModificationType) String

func (t MetadataModificationType) String() string

type MetadataService

type MetadataService service

func (*MetadataService) GetAddressMetadatasInfo

func (ref *MetadataService) GetAddressMetadatasInfo(ctx context.Context, addresses ...string) ([]*AddressMetadataInfo, error)

func (*MetadataService) GetMetadataByAddress

func (ref *MetadataService) GetMetadataByAddress(ctx context.Context, address string) (*AddressMetadataInfo, error)

func (*MetadataService) GetMetadataByMosaicId

func (ref *MetadataService) GetMetadataByMosaicId(ctx context.Context, mosaicId *MosaicId) (*MosaicMetadataInfo, error)

func (*MetadataService) GetMetadataByNamespaceId

func (ref *MetadataService) GetMetadataByNamespaceId(ctx context.Context, namespaceId *NamespaceId) (*NamespaceMetadataInfo, error)

func (*MetadataService) GetMosaicMetadatasInfo

func (ref *MetadataService) GetMosaicMetadatasInfo(ctx context.Context, mosaicIds ...*MosaicId) ([]*MosaicMetadataInfo, error)

func (*MetadataService) GetNamespaceMetadatasInfo

func (ref *MetadataService) GetNamespaceMetadatasInfo(ctx context.Context, namespaceIds ...*NamespaceId) ([]*NamespaceMetadataInfo, error)

type MetadataType

type MetadataType uint8
const (
	MetadataNone MetadataType = iota
	MetadataAddressType
	MetadataMosaicType
	MetadataNamespaceType
)

func (MetadataType) String

func (t MetadataType) String() string

type MetadataV2Info added in v0.7.4

type MetadataV2Info struct {
	CompositeHash *Hash
	SourceAddress *Address
	TargetKey     *Hash
	ScopedKey     ScopedMetadataKey
	Type          MetadataV2Type
	Value         []byte
}

type MetadataV2PageOptions added in v0.7.4

type MetadataV2PageOptions struct {
	SourceAddress string `url:"sourceAddress,omitempty"`
	TargetKey     string `url:"targetKey,omitempty"`
	ScopedKey     string `url:"scopedMetadataKey,omitempty"` // uint64 hex
	TargetId      string `url:"targetId,omitempty"`          // uint64 hex
	Type          uint8  `url:"metadataType,omitempty"`
	PaginationOrderingOptions
}

type MetadataV2Service added in v0.7.4

type MetadataV2Service service

func (*MetadataV2Service) GetMetadataV2Info added in v0.7.4

func (ref *MetadataV2Service) GetMetadataV2Info(ctx context.Context, computedHash *Hash) (*MetadataV2TupleInfo, error)

func (*MetadataV2Service) GetMetadataV2Infos added in v0.7.4

func (ref *MetadataV2Service) GetMetadataV2Infos(ctx context.Context, mOpts *MetadataV2PageOptions) (*MetadatasPage, error)

func (*MetadataV2Service) GetMetadataV2InfosByHashes added in v0.7.4

func (ref *MetadataV2Service) GetMetadataV2InfosByHashes(ctx context.Context, hashes []*Hash) ([]*MetadataV2TupleInfo, error)

type MetadataV2TupleInfo added in v0.7.4

type MetadataV2TupleInfo struct {
	Address   *AddressMetadataV2Info
	Mosaic    *MosaicMetadataV2Info
	Namespace *NamespaceMetadataV2Info
}

type MetadataV2Type added in v0.7.4

type MetadataV2Type uint8
const (
	MetadataV2AddressType MetadataV2Type = iota
	MetadataV2MosaicType
	MetadataV2NamespaceType
)

func (MetadataV2Type) String added in v0.7.4

func (t MetadataV2Type) String() string

type MetadatasPage added in v0.7.4

type MetadatasPage struct {
	Metadatas  []*MetadataV2TupleInfo
	Pagination Pagination
}

type ModifyContractTransaction

type ModifyContractTransaction struct {
	AbstractTransaction
	DurationDelta Duration
	Hash          *Hash
	Customers     []*MultisigCosignatoryModification
	Executors     []*MultisigCosignatoryModification
	Verifiers     []*MultisigCosignatoryModification
}

func NewModifyContractTransaction

func NewModifyContractTransaction(
	deadline *Deadline, durationDelta Duration, hash *Hash,
	customers []*MultisigCosignatoryModification,
	executors []*MultisigCosignatoryModification,
	verifiers []*MultisigCosignatoryModification,
	networkType NetworkType) (*ModifyContractTransaction, error)

returns ModifyContractTransaction from passed duration delta in blocks, file hash, arrays of customers, replicators and verificators

func (*ModifyContractTransaction) Bytes added in v0.6.0

func (tx *ModifyContractTransaction) Bytes() ([]byte, error)

func (*ModifyContractTransaction) GetAbstractTransaction

func (tx *ModifyContractTransaction) GetAbstractTransaction() *AbstractTransaction

func (*ModifyContractTransaction) Size

func (tx *ModifyContractTransaction) Size() int

func (*ModifyContractTransaction) String

func (tx *ModifyContractTransaction) String() string

type ModifyMetadataAddressTransaction

type ModifyMetadataAddressTransaction struct {
	ModifyMetadataTransaction
	Address *Address
}

func NewModifyMetadataAddressTransaction

func NewModifyMetadataAddressTransaction(deadline *Deadline, address *Address, modifications []*MetadataModification, networkType NetworkType) (*ModifyMetadataAddressTransaction, error)

returns ModifyMetadataAddressTransaction from passed Address to be modified, and an array of MetadataModification's

func (*ModifyMetadataAddressTransaction) Bytes added in v0.6.0

func (tx *ModifyMetadataAddressTransaction) Bytes() ([]byte, error)

func (*ModifyMetadataAddressTransaction) Size

func (*ModifyMetadataAddressTransaction) String

type ModifyMetadataMosaicTransaction

type ModifyMetadataMosaicTransaction struct {
	ModifyMetadataTransaction
	MosaicId *MosaicId
}

func NewModifyMetadataMosaicTransaction

func NewModifyMetadataMosaicTransaction(deadline *Deadline, mosaicId *MosaicId, modifications []*MetadataModification, networkType NetworkType) (*ModifyMetadataMosaicTransaction, error)

returns ModifyMetadataMosaicTransaction from passed MosaicId to be modified, and an array of MetadataModification's

func (*ModifyMetadataMosaicTransaction) Bytes added in v0.6.0

func (tx *ModifyMetadataMosaicTransaction) Bytes() ([]byte, error)

func (*ModifyMetadataMosaicTransaction) Size

func (*ModifyMetadataMosaicTransaction) String

type ModifyMetadataNamespaceTransaction

type ModifyMetadataNamespaceTransaction struct {
	ModifyMetadataTransaction
	NamespaceId *NamespaceId
}

func NewModifyMetadataNamespaceTransaction

func NewModifyMetadataNamespaceTransaction(deadline *Deadline, namespaceId *NamespaceId, modifications []*MetadataModification, networkType NetworkType) (*ModifyMetadataNamespaceTransaction, error)

returns ModifyMetadataNamespaceTransaction from passed NamespaceId to be modified, and an array of MetadataModification's

func (*ModifyMetadataNamespaceTransaction) Bytes added in v0.6.0

func (*ModifyMetadataNamespaceTransaction) Size

func (*ModifyMetadataNamespaceTransaction) String

type ModifyMetadataTransaction

type ModifyMetadataTransaction struct {
	AbstractTransaction
	MetadataType  MetadataType
	Modifications []*MetadataModification
}

func (*ModifyMetadataTransaction) Bytes added in v0.6.0

func (tx *ModifyMetadataTransaction) Bytes(builder *flatbuffers.Builder, metadataV flatbuffers.UOffsetT, sizeOfMetadata int) ([]byte, error)

func (*ModifyMetadataTransaction) GetAbstractTransaction

func (tx *ModifyMetadataTransaction) GetAbstractTransaction() *AbstractTransaction

func (*ModifyMetadataTransaction) Size

func (tx *ModifyMetadataTransaction) Size() int

func (*ModifyMetadataTransaction) String

func (tx *ModifyMetadataTransaction) String() string

type ModifyMultisigAccountTransaction

type ModifyMultisigAccountTransaction struct {
	AbstractTransaction
	MinApprovalDelta int8
	MinRemovalDelta  int8
	Modifications    []*MultisigCosignatoryModification
}

func NewModifyMultisigAccountTransaction

func NewModifyMultisigAccountTransaction(deadline *Deadline, minApprovalDelta int8, minRemovalDelta int8, modifications []*MultisigCosignatoryModification, networkType NetworkType) (*ModifyMultisigAccountTransaction, error)

returns a ModifyMultisigAccountTransaction from passed min approval and removal deltas and array of MultisigCosignatoryModification's

func (*ModifyMultisigAccountTransaction) Bytes added in v0.6.0

func (tx *ModifyMultisigAccountTransaction) Bytes() ([]byte, error)

func (*ModifyMultisigAccountTransaction) GetAbstractTransaction

func (tx *ModifyMultisigAccountTransaction) GetAbstractTransaction() *AbstractTransaction

func (*ModifyMultisigAccountTransaction) Size

func (*ModifyMultisigAccountTransaction) String

type Mosaic

type Mosaic struct {
	AssetId AssetId
	Amount  Amount
}

func NewMosaic

func NewMosaic(assetId AssetId, amount Amount) (*Mosaic, error)

returns a Mosaic for passed AssetId and amount

func Storage added in v0.6.0

func Storage(amount uint64) *Mosaic

returns storage mosaic with passed amount

func Streaming added in v0.6.0

func Streaming(amount uint64) *Mosaic

returns streaming with actual passed amount

func SuperContractMosaic added in v0.7.0

func SuperContractMosaic(amount uint64) *Mosaic

returns super contract mosaic with passed amount

func Xem

func Xem(amount uint64) *Mosaic

returns XEM mosaic with passed amount

func XemRelative

func XemRelative(amount uint64) *Mosaic

returns XEM with actual passed amount

func Xpx

func Xpx(amount uint64) *Mosaic

returns XPX mosaic with passed amount

func XpxRelative

func XpxRelative(amount uint64) *Mosaic

returns XPX with actual passed amount

func (*Mosaic) String

func (m *Mosaic) String() string

type MosaicAliasTransaction

type MosaicAliasTransaction struct {
	AliasTransaction
	MosaicId *MosaicId
}

func NewMosaicAliasTransaction

func NewMosaicAliasTransaction(deadline *Deadline, mosaicId *MosaicId, namespaceId *NamespaceId, actionType AliasActionType, networkType NetworkType) (*MosaicAliasTransaction, error)

returns MosaicAliasTransaction from passed MosaicId, NamespaceId and AliasActionType

func (*MosaicAliasTransaction) Bytes added in v0.6.0

func (tx *MosaicAliasTransaction) Bytes() ([]byte, error)

func (*MosaicAliasTransaction) Size

func (tx *MosaicAliasTransaction) Size() int

func (*MosaicAliasTransaction) String

func (tx *MosaicAliasTransaction) String() string

type MosaicDefinitionTransaction

type MosaicDefinitionTransaction struct {
	AbstractTransaction
	*MosaicProperties
	MosaicNonce uint32
	*MosaicId
}

func NewMosaicDefinitionTransaction

func NewMosaicDefinitionTransaction(deadline *Deadline, nonce uint32, ownerPublicKey string, mosaicProps *MosaicProperties, networkType NetworkType) (*MosaicDefinitionTransaction, error)

returns MosaicDefinitionTransaction from passed nonce, public key of announcer and MosaicProperties

func (*MosaicDefinitionTransaction) Bytes added in v0.6.0

func (tx *MosaicDefinitionTransaction) Bytes() ([]byte, error)

func (*MosaicDefinitionTransaction) GetAbstractTransaction

func (tx *MosaicDefinitionTransaction) GetAbstractTransaction() *AbstractTransaction

func (*MosaicDefinitionTransaction) Size

func (tx *MosaicDefinitionTransaction) Size() int

func (*MosaicDefinitionTransaction) String

func (tx *MosaicDefinitionTransaction) String() string

func (MosaicDefinitionTransaction) ToHexString added in v0.7.4

func (m MosaicDefinitionTransaction) ToHexString() string

type MosaicId

type MosaicId struct {
	// contains filtered or unexported fields
}

func NewMosaicId

func NewMosaicId(id uint64) (*MosaicId, error)

returns MosaicId for passed mosaic identifier

func NewMosaicIdFromNonceAndOwner

func NewMosaicIdFromNonceAndOwner(nonce uint32, ownerPublicKey string) (*MosaicId, error)

returns MosaicId for passed nonce and public key of mosaic owner

func (*MosaicId) Equals

func (m *MosaicId) Equals(id AssetId) (bool, error)

func (*MosaicId) Id

func (m *MosaicId) Id() uint64

func (*MosaicId) MarshalJSON added in v0.7.0

func (m *MosaicId) MarshalJSON() ([]byte, error)

func (*MosaicId) String

func (m *MosaicId) String() string

func (MosaicId) ToHexString added in v0.7.4

func (m MosaicId) ToHexString() string

func (*MosaicId) Type

func (m *MosaicId) Type() AssetIdType

func (*MosaicId) UnmarshalJSON added in v0.7.0

func (m *MosaicId) UnmarshalJSON(data []byte) error

type MosaicInfo

type MosaicInfo struct {
	MosaicId   *MosaicId
	Supply     Amount
	Height     Height
	Owner      *PublicAccount
	Revision   uint32
	Properties *MosaicProperties
}

func (*MosaicInfo) String

func (m *MosaicInfo) String() string

type MosaicLevy added in v0.7.3

type MosaicLevy struct {
	Type      LevyType
	Recipient *Address
	Fee       Amount
	*MosaicId
}

func (*MosaicLevy) SetBuffers added in v0.7.3

func (levy *MosaicLevy) SetBuffers(builder *flatbuffers.Builder, r []byte) flatbuffers.UOffsetT

func (*MosaicLevy) String added in v0.7.3

func (levy *MosaicLevy) String() string

func (MosaicLevy) ToHexString added in v0.7.4

func (m MosaicLevy) ToHexString() string

type MosaicMetadataInfo

type MosaicMetadataInfo struct {
	MetadataInfo
	MosaicId *MosaicId
}

type MosaicMetadataTransaction added in v0.7.3

type MosaicMetadataTransaction struct {
	BasicMetadataTransaction
	TargetMosaicId *MosaicId
}

func NewMosaicMetadataTransaction added in v0.7.3

func NewMosaicMetadataTransaction(deadline *Deadline,
	mosaic *MosaicId, account *PublicAccount, scopedKey ScopedMetadataKey,
	newValue string, oldValue string, networkType NetworkType) (*MosaicMetadataTransaction, error)

func (*MosaicMetadataTransaction) Bytes added in v0.7.3

func (tx *MosaicMetadataTransaction) Bytes() ([]byte, error)

func (*MosaicMetadataTransaction) Size added in v0.7.3

func (tx *MosaicMetadataTransaction) Size() int

func (*MosaicMetadataTransaction) String added in v0.7.3

func (tx *MosaicMetadataTransaction) String() string

type MosaicMetadataV2Info added in v0.7.4

type MosaicMetadataV2Info struct {
	MetadataV2Info
	MosaicId *MosaicId
}

type MosaicModifyLevyTransaction added in v0.7.3

type MosaicModifyLevyTransaction struct {
	AbstractTransaction
	*MosaicId
	*MosaicLevy
}

/ region modify mosaic levy implementation

func NewMosaicModifyLevyTransaction added in v0.7.3

func NewMosaicModifyLevyTransaction(deadline *Deadline, networkType NetworkType, mosaicId *MosaicId, levy *MosaicLevy) (*MosaicModifyLevyTransaction, error)

func (*MosaicModifyLevyTransaction) Bytes added in v0.7.3

func (tx *MosaicModifyLevyTransaction) Bytes() ([]byte, error)

func (*MosaicModifyLevyTransaction) GetAbstractTransaction added in v0.7.3

func (tx *MosaicModifyLevyTransaction) GetAbstractTransaction() *AbstractTransaction

func (*MosaicModifyLevyTransaction) Size added in v0.7.3

func (tx *MosaicModifyLevyTransaction) Size() int

func (*MosaicModifyLevyTransaction) String added in v0.7.3

func (tx *MosaicModifyLevyTransaction) String() string

func (MosaicModifyLevyTransaction) ToHexString added in v0.7.4

func (m MosaicModifyLevyTransaction) ToHexString() string

type MosaicName

type MosaicName struct {
	MosaicId *MosaicId
	Names    []string
}

func (*MosaicName) String

func (m *MosaicName) String() string

type MosaicProperties

type MosaicProperties struct {
	MosaicPropertiesHeader
	OptionalProperties []MosaicProperty
}

func NewMosaicProperties

func NewMosaicProperties(supplyMutable bool, transferable bool, divisibility uint8, duration Duration) *MosaicProperties

returns MosaicProperties from actual values

func (*MosaicProperties) Duration

func (mp *MosaicProperties) Duration() Duration

func (*MosaicProperties) String

func (mp *MosaicProperties) String() string

type MosaicPropertiesHeader

type MosaicPropertiesHeader struct {
	SupplyMutable bool
	Transferable  bool
	Divisibility  uint8
}

structure which includes several properties for defining mosaic `SupplyMutable` - is supply of defined mosaic can be changed in future `Transferable` - if this property is set to "false", only transfer transactions having the creator as sender or as recipient can transfer mosaics of that type. If set to "true" the mosaics can be transferred to and from arbitrary accounts `Divisibility` - divisibility determines up to what decimal place the mosaic can be divided into `Duration` - duration in blocks mosaic will be available. After the renew mosaic is inactive and can be renewed

type MosaicProperty

type MosaicProperty struct {
	Id    MosaicPropertyId
	Value baseInt64
}

func (*MosaicProperty) String

func (mp *MosaicProperty) String() string

type MosaicPropertyId

type MosaicPropertyId uint8
const (
	MosaicPropertyFlagsId MosaicPropertyId = iota
	MosaicPropertyDivisibilityId
	MosaicPropertyDurationId
)

MosaicPropertyId enums

type MosaicRemoveLevyTransaction added in v0.7.3

type MosaicRemoveLevyTransaction struct {
	AbstractTransaction
	*MosaicId
}

/ region remove mosaic levy

func NewMosaicRemoveLevyTransaction added in v0.7.3

func NewMosaicRemoveLevyTransaction(deadline *Deadline, networkType NetworkType, mosaicId *MosaicId) (*MosaicRemoveLevyTransaction, error)

func (*MosaicRemoveLevyTransaction) Bytes added in v0.7.3

func (tx *MosaicRemoveLevyTransaction) Bytes() ([]byte, error)

func (*MosaicRemoveLevyTransaction) GetAbstractTransaction added in v0.7.3

func (tx *MosaicRemoveLevyTransaction) GetAbstractTransaction() *AbstractTransaction

func (*MosaicRemoveLevyTransaction) Size added in v0.7.3

func (tx *MosaicRemoveLevyTransaction) Size() int

func (*MosaicRemoveLevyTransaction) String added in v0.7.3

func (tx *MosaicRemoveLevyTransaction) String() string

func (MosaicRemoveLevyTransaction) ToHexString added in v0.7.4

func (m MosaicRemoveLevyTransaction) ToHexString() string

type MosaicService

type MosaicService service

func (*MosaicService) GetMosaicInfo

func (ref *MosaicService) GetMosaicInfo(ctx context.Context, mosaicId *MosaicId) (*MosaicInfo, error)

func (*MosaicService) GetMosaicInfos

func (ref *MosaicService) GetMosaicInfos(ctx context.Context, mscIds []*MosaicId) ([]*MosaicInfo, error)

func (*MosaicService) GetMosaicLevy added in v0.7.3

func (ref *MosaicService) GetMosaicLevy(ctx context.Context, mosaicId *MosaicId) (*MosaicLevy, error)

GetMosaicLevy returns mosaic levy get @/mosaic/%s/levy

func (*MosaicService) GetMosaicsNames

func (ref *MosaicService) GetMosaicsNames(ctx context.Context, mscIds ...*MosaicId) ([]*MosaicName, error)

GetMosaicsNames Get readable names for a set of mosaics post @/mosaic/names

type MosaicSupplyChangeTransaction

type MosaicSupplyChangeTransaction struct {
	AbstractTransaction
	MosaicSupplyType
	AssetId
	Delta Amount
}

func NewMosaicSupplyChangeTransaction

func NewMosaicSupplyChangeTransaction(deadline *Deadline, assetId AssetId, supplyType MosaicSupplyType, delta Duration, networkType NetworkType) (*MosaicSupplyChangeTransaction, error)

returns MosaicSupplyChangeTransaction from passed AssetId, MosaicSupplyTypeand supply delta

func (*MosaicSupplyChangeTransaction) Bytes added in v0.6.0

func (tx *MosaicSupplyChangeTransaction) Bytes() ([]byte, error)

func (*MosaicSupplyChangeTransaction) GetAbstractTransaction

func (tx *MosaicSupplyChangeTransaction) GetAbstractTransaction() *AbstractTransaction

func (*MosaicSupplyChangeTransaction) Size

func (*MosaicSupplyChangeTransaction) String

type MosaicSupplyType

type MosaicSupplyType uint8
const (
	Decrease MosaicSupplyType = iota
	Increase
)

func (MosaicSupplyType) String

func (tx MosaicSupplyType) String() string

type MultisigAccountGraphInfo

type MultisigAccountGraphInfo struct {
	MultisigAccounts map[int32][]*MultisigAccountInfo
}

type MultisigAccountInfo

type MultisigAccountInfo struct {
	Account          PublicAccount
	MinApproval      int32
	MinRemoval       int32
	Cosignatories    []*PublicAccount
	MultisigAccounts []*PublicAccount
}

func (*MultisigAccountInfo) String

func (ref *MultisigAccountInfo) String() string

type MultisigCosignatoryModification

type MultisigCosignatoryModification struct {
	Type MultisigCosignatoryModificationType
	*PublicAccount
}

func (*MultisigCosignatoryModification) String

type MultisigCosignatoryModificationType

type MultisigCosignatoryModificationType uint8
const (
	Add MultisigCosignatoryModificationType = iota
	Remove
)

func (MultisigCosignatoryModificationType) String

type NamespaceAlias

type NamespaceAlias struct {
	Type AliasType
	// contains filtered or unexported fields
}

NamespaceAlias contains aliased mosaicId or address and type of alias

func (*NamespaceAlias) Address

func (ref *NamespaceAlias) Address() *Address

func (*NamespaceAlias) MosaicId

func (ref *NamespaceAlias) MosaicId() *MosaicId

func (*NamespaceAlias) String

func (ref *NamespaceAlias) String() string

type NamespaceId

type NamespaceId struct {
	// contains filtered or unexported fields
}

func GenerateNamespacePath

func GenerateNamespacePath(name string) ([]*NamespaceId, error)

returns an array of big ints representation if namespace ids from passed namespace path to create root namespace pass namespace name in format like 'rootname' to create child namespace pass namespace name in format like 'rootname.childname' to create grand child namespace pass namespace name in format like 'rootname.childname.grandchildname'

func NewNamespaceId

func NewNamespaceId(id uint64) (*NamespaceId, error)

returns new NamespaceId from passed namespace identifier

func NewNamespaceIdFromName

func NewNamespaceIdFromName(namespaceName string) (*NamespaceId, error)

returns namespace id from passed namespace name should be used for creating root, child and grandchild namespace ids to create root namespace pass namespace name in format like 'rootname' to create child namespace pass namespace name in format like 'rootname.childname' to create grand child namespace pass namespace name in format like 'rootname.childname.grandchildname'

func (*NamespaceId) Equals

func (m *NamespaceId) Equals(id AssetId) (bool, error)

func (*NamespaceId) Id

func (m *NamespaceId) Id() uint64

func (*NamespaceId) MarshalJSON added in v0.7.0

func (m *NamespaceId) MarshalJSON() ([]byte, error)

func (*NamespaceId) String

func (m *NamespaceId) String() string

func (NamespaceId) ToHexString added in v0.7.4

func (m NamespaceId) ToHexString() string

func (*NamespaceId) Type

func (m *NamespaceId) Type() AssetIdType

func (*NamespaceId) UnmarshalJSON added in v0.7.0

func (m *NamespaceId) UnmarshalJSON(data []byte) error

type NamespaceInfo

type NamespaceInfo struct {
	NamespaceId *NamespaceId
	Active      bool
	TypeSpace   NamespaceType
	Depth       int
	Levels      []*NamespaceId
	Alias       *NamespaceAlias
	Parent      *NamespaceInfo
	Owner       *PublicAccount
	StartHeight Height
	EndHeight   Height
}

func (NamespaceInfo) String

func (info NamespaceInfo) String() string

type NamespaceMetadataInfo

type NamespaceMetadataInfo struct {
	MetadataInfo
	NamespaceId *NamespaceId
}

type NamespaceMetadataTransaction added in v0.7.3

type NamespaceMetadataTransaction struct {
	BasicMetadataTransaction
	TargetNamespaceId *NamespaceId
}

func NewNamespaceMetadataTransaction added in v0.7.3

func NewNamespaceMetadataTransaction(deadline *Deadline,
	namespace *NamespaceId, account *PublicAccount, scopedKey ScopedMetadataKey,
	newValue string, oldValue string, networkType NetworkType) (*NamespaceMetadataTransaction, error)

func (*NamespaceMetadataTransaction) Bytes added in v0.7.3

func (tx *NamespaceMetadataTransaction) Bytes() ([]byte, error)

func (*NamespaceMetadataTransaction) Size added in v0.7.3

func (tx *NamespaceMetadataTransaction) Size() int

func (*NamespaceMetadataTransaction) String added in v0.7.3

func (tx *NamespaceMetadataTransaction) String() string

type NamespaceMetadataV2Info added in v0.7.4

type NamespaceMetadataV2Info struct {
	MetadataV2Info
	NamespaceId *NamespaceId
}

type NamespaceName

type NamespaceName struct {
	NamespaceId *NamespaceId
	FullName    string
}

func (*NamespaceName) String

func (n *NamespaceName) String() string

type NamespaceService

type NamespaceService service

NamespaceService provides a set of methods for obtaining information about the namespace

func (*NamespaceService) GetLinkedAddress

func (ref *NamespaceService) GetLinkedAddress(ctx context.Context, namespaceId *NamespaceId) (*Address, error)

GetLinkedAddress @/namespace/%s

func (*NamespaceService) GetLinkedMosaicId

func (ref *NamespaceService) GetLinkedMosaicId(ctx context.Context, namespaceId *NamespaceId) (*MosaicId, error)

GetLinkedMosaicId @/namespace/%s

func (*NamespaceService) GetNamespaceInfo

func (ref *NamespaceService) GetNamespaceInfo(ctx context.Context, nsId *NamespaceId) (*NamespaceInfo, error)

func (*NamespaceService) GetNamespaceInfosFromAccount

func (ref *NamespaceService) GetNamespaceInfosFromAccount(ctx context.Context, address *Address, nsId *NamespaceId,
	pageSize int) ([]*NamespaceInfo, error)

returns NamespaceInfo's corresponding to passed Address and NamespaceId with maximum limit TODO: fix pagination

func (*NamespaceService) GetNamespaceInfosFromAccounts

func (ref *NamespaceService) GetNamespaceInfosFromAccounts(ctx context.Context, addrs []*Address, nsId *NamespaceId,
	pageSize int) ([]*NamespaceInfo, error)

returns NamespaceInfo's corresponding to passed Address's and NamespaceId with maximum limit TODO: fix pagination

func (*NamespaceService) GetNamespaceNames

func (ref *NamespaceService) GetNamespaceNames(ctx context.Context, nsIds []*NamespaceId) ([]*NamespaceName, error)

type NamespaceType

type NamespaceType uint8
const (
	Root NamespaceType = iota
	Sub
)

type NetworkConfig

type NetworkConfig struct {
	Sections map[string]*ConfigBag
}

func NewNetworkConfig

func NewNetworkConfig() *NetworkConfig

func (*NetworkConfig) MarshalBinary

func (c *NetworkConfig) MarshalBinary() (data []byte, err error)

func (*NetworkConfig) String

func (c *NetworkConfig) String() string

func (*NetworkConfig) UnmarshalBinary

func (c *NetworkConfig) UnmarshalBinary(data []byte) error

type NetworkConfigTransaction

type NetworkConfigTransaction struct {
	AbstractTransaction
	ApplyHeightDelta  Duration
	NetworkConfig     *NetworkConfig
	SupportedEntities *SupportedEntities
}

func NewNetworkConfigTransaction

func NewNetworkConfigTransaction(deadline *Deadline, delta Duration, config *NetworkConfig, entities *SupportedEntities, networkType NetworkType) (*NetworkConfigTransaction, error)

returns NetworkConfigTransaction from passed ApplyHeightDelta, NetworkConfig and SupportedEntities

func (*NetworkConfigTransaction) Bytes added in v0.6.0

func (tx *NetworkConfigTransaction) Bytes() ([]byte, error)

func (*NetworkConfigTransaction) GetAbstractTransaction

func (tx *NetworkConfigTransaction) GetAbstractTransaction() *AbstractTransaction

func (*NetworkConfigTransaction) Size

func (tx *NetworkConfigTransaction) Size() int

func (*NetworkConfigTransaction) String

func (tx *NetworkConfigTransaction) String() string

type NetworkService

type NetworkService struct {
	BlockchainService *BlockchainService
	// contains filtered or unexported fields
}

func (*NetworkService) GetNetworkConfig

func (ref *NetworkService) GetNetworkConfig(ctx context.Context) (*BlockchainConfig, error)

func (*NetworkService) GetNetworkConfigAtHeight

func (ref *NetworkService) GetNetworkConfigAtHeight(ctx context.Context, height Height) (*BlockchainConfig, error)

func (*NetworkService) GetNetworkType

func (ref *NetworkService) GetNetworkType(ctx context.Context) (NetworkType, error)

func (*NetworkService) GetNetworkVersion

func (ref *NetworkService) GetNetworkVersion(ctx context.Context) (*NetworkVersion, error)

func (*NetworkService) GetNetworkVersionAtHeight

func (ref *NetworkService) GetNetworkVersionAtHeight(ctx context.Context, height Height) (*NetworkVersion, error)

type NetworkType

type NetworkType uint8
const (
	Mijin           NetworkType = 96
	MijinTest       NetworkType = 144
	Public          NetworkType = 184
	PublicTest      NetworkType = 168
	Private         NetworkType = 200
	PrivateTest     NetworkType = 176
	NotSupportedNet NetworkType = 0
	AliasAddress    NetworkType = 145
)

func ExtractNetworkType

func ExtractNetworkType(version int64) NetworkType

func NetworkTypeFromString

func NetworkTypeFromString(networkType string) NetworkType

func (NetworkType) String

func (nt NetworkType) String() string

type NetworkVersion

type NetworkVersion struct {
	StartedHeight     Height
	BlockChainVersion BlockChainVersion
}

func (NetworkVersion) String

func (nv NetworkVersion) String() string

type NodeInfo added in v0.7.1

type NodeInfo struct {
	Account      *PublicAccount
	Host         string
	Port         int
	FriendlyName string
	NetworkType  NetworkType
	Roles        int
}

func (*NodeInfo) String added in v0.7.1

func (n *NodeInfo) String() string

type NodeService added in v0.7.1

type NodeService service

func (*NodeService) GetNodeInfo added in v0.7.1

func (s *NodeService) GetNodeInfo(ctx context.Context) (*NodeInfo, error)

func (*NodeService) GetNodePeers added in v0.7.1

func (s *NodeService) GetNodePeers(ctx context.Context) ([]*NodeInfo, error)

func (*NodeService) GetNodeTime added in v0.7.1

func (s *NodeService) GetNodeTime(ctx context.Context) (*BlockchainTimestamp, error)

type Offer added in v0.6.0

type Offer struct {
	Type   OfferType
	Mosaic *Mosaic
	Cost   Amount
}

type OfferInfo added in v0.6.0

type OfferInfo struct {
	Type             OfferType
	Owner            *PublicAccount
	Mosaic           *Mosaic
	PriceNumerator   Amount
	PriceDenominator Amount
	Deadline         Height
}

func (*OfferInfo) ConfirmOffer added in v0.6.0

func (info *OfferInfo) ConfirmOffer(amount Amount) (*ExchangeConfirmation, error)

func (*OfferInfo) Cost added in v0.6.0

func (info *OfferInfo) Cost(amount Amount) (Amount, error)

func (*OfferInfo) String added in v0.6.0

func (info *OfferInfo) String() string

type OfferType added in v0.6.0

type OfferType uint8
const (
	SellOffer OfferType = iota
	BuyOffer
	UnknownType
)

func (OfferType) CounterOffer added in v0.6.0

func (o OfferType) CounterOffer() OfferType

func (OfferType) String added in v0.6.0

func (o OfferType) String() string

type Operation added in v0.7.0

type Operation struct {
	// Token is hash of first transaction which started the operation. In case of aggregate transaction is UniqueAggregateHash
	Token         *Hash
	Initiator     *PublicAccount
	Height        Height
	Status        OperationStatus
	Executors     []*PublicAccount
	LockedMosaics []*Mosaic
	// Aggregate transactions which were sent during operation.
	AggregateHashes []*Hash
}

type OperationIdentifyTransaction added in v0.7.0

type OperationIdentifyTransaction struct {
	AbstractTransaction
	OperationHash *Hash
}

func NewOperationIdentifyTransaction added in v0.7.0

func NewOperationIdentifyTransaction(deadline *Deadline, operationKey *Hash, networkType NetworkType) (*OperationIdentifyTransaction, error)

func (*OperationIdentifyTransaction) Bytes added in v0.7.0

func (tx *OperationIdentifyTransaction) Bytes() ([]byte, error)

func (*OperationIdentifyTransaction) GetAbstractTransaction added in v0.7.0

func (tx *OperationIdentifyTransaction) GetAbstractTransaction() *AbstractTransaction

func (*OperationIdentifyTransaction) Size added in v0.7.0

func (tx *OperationIdentifyTransaction) Size() int

func (*OperationIdentifyTransaction) String added in v0.7.0

func (tx *OperationIdentifyTransaction) String() string

type OperationStatus added in v0.7.0

type OperationStatus uint16
const (
	Unknown OperationStatus = iota
	Started
	Success
	Failure
)

type Opinion added in v0.7.5

type Opinion struct {
	Opinion []OpinionSize
}

type OpinionSize added in v0.7.5

type OpinionSize = baseInt64

type Pagination added in v0.7.3

type Pagination struct {
	TotalEntries uint64
	PageNumber   uint64
	PageSize     uint64
	TotalPages   uint64
}

type PaginationOrderingOptions added in v0.7.3

type PaginationOrderingOptions struct {
	PageSize      uint64 `url:"pageSize,omitempty"`
	PageNumber    uint64 `url:"pageNumber,omitempty"`
	Offset        string `url:"offset,omitempty"`
	SortField     string `url:"sortField,omitempty"`
	SortDirection string `url:"order,omitempty"`
}

type PartialRemovedInfo

type PartialRemovedInfo struct {
	Meta *TransactionInfo
}

type PaymentInformation added in v0.6.0

type PaymentInformation struct {
	Receiver *PublicAccount
	Amount   Amount
	Height   Height
}

func (*PaymentInformation) String added in v0.6.0

func (info *PaymentInformation) String() string

type PlaceSdaExchangeOfferTransaction added in v0.7.5

type PlaceSdaExchangeOfferTransaction struct {
	AbstractTransaction
	Offers []*PlaceSdaOffer
}

Place SDA-SDA Exchange Offer Transaction

func NewPlaceSdaExchangeOfferTransaction added in v0.7.5

func NewPlaceSdaExchangeOfferTransaction(deadline *Deadline, placeSdaOffers []*PlaceSdaOffer, networkType NetworkType) (*PlaceSdaExchangeOfferTransaction, error)

func (*PlaceSdaExchangeOfferTransaction) Bytes added in v0.7.5

func (tx *PlaceSdaExchangeOfferTransaction) Bytes() ([]byte, error)

func (*PlaceSdaExchangeOfferTransaction) GetAbstractTransaction added in v0.7.5

func (tx *PlaceSdaExchangeOfferTransaction) GetAbstractTransaction() *AbstractTransaction

func (*PlaceSdaExchangeOfferTransaction) Size added in v0.7.5

func (*PlaceSdaExchangeOfferTransaction) String added in v0.7.5

type PlaceSdaOffer added in v0.7.5

type PlaceSdaOffer struct {
	SdaOffer
	Duration Duration
}

func (*PlaceSdaOffer) String added in v0.7.5

func (offer *PlaceSdaOffer) String() string

type PlainMessage

type PlainMessage struct {
	// contains filtered or unexported fields
}

func NewPlainMessage

func NewPlainMessage(payload string) *PlainMessage

func NewPlainMessageFromEncodedData

func NewPlainMessageFromEncodedData(encodedData []byte, recipient *xpxcrypto.PrivateKey, sender *xpxcrypto.PublicKey) (*PlainMessage, error)

func (*PlainMessage) Message

func (m *PlainMessage) Message() string

func (*PlainMessage) Payload

func (m *PlainMessage) Payload() []byte

func (*PlainMessage) String

func (m *PlainMessage) String() string

func (*PlainMessage) Type

func (m *PlainMessage) Type() MessageType

type PrepareBcDriveTransaction added in v0.7.5

type PrepareBcDriveTransaction struct {
	AbstractTransaction
	DriveSize             StorageSize
	VerificationFeeAmount Amount
	ReplicatorCount       uint16
}

Prepare Bc Drive Transaction

func NewPrepareBcDriveTransaction added in v0.7.5

func NewPrepareBcDriveTransaction(
	deadline *Deadline,
	driveSize StorageSize,
	verificationFeeAmount Amount,
	replicatorCount uint16,
	networkType NetworkType,
) (*PrepareBcDriveTransaction, error)

func (*PrepareBcDriveTransaction) Bytes added in v0.7.5

func (tx *PrepareBcDriveTransaction) Bytes() ([]byte, error)

func (*PrepareBcDriveTransaction) GetAbstractTransaction added in v0.7.5

func (tx *PrepareBcDriveTransaction) GetAbstractTransaction() *AbstractTransaction

func (*PrepareBcDriveTransaction) Size added in v0.7.5

func (tx *PrepareBcDriveTransaction) Size() int

func (*PrepareBcDriveTransaction) String added in v0.7.5

func (tx *PrepareBcDriveTransaction) String() string

type PrepareDriveTransaction added in v0.6.0

type PrepareDriveTransaction struct {
	AbstractTransaction
	Owner            *PublicAccount
	Duration         Duration
	BillingPeriod    Duration
	BillingPrice     Amount
	DriveSize        StorageSize
	Replicas         uint16
	MinReplicators   uint16
	PercentApprovers uint8
}

Prepare Drive Transaction

func NewPrepareDriveTransaction added in v0.6.0

func NewPrepareDriveTransaction(
	deadline *Deadline,
	owner *PublicAccount,
	duration Duration,
	billingPeriod Duration,
	billingPrice Amount,
	driveSize StorageSize,
	replicas uint16,
	minReplicators uint16,
	percentApprovers uint8,
	networkType NetworkType,
) (*PrepareDriveTransaction, error)

func (*PrepareDriveTransaction) Bytes added in v0.6.0

func (tx *PrepareDriveTransaction) Bytes() ([]byte, error)

func (*PrepareDriveTransaction) GetAbstractTransaction added in v0.6.0

func (tx *PrepareDriveTransaction) GetAbstractTransaction() *AbstractTransaction

func (*PrepareDriveTransaction) Size added in v0.6.0

func (tx *PrepareDriveTransaction) Size() int

func (*PrepareDriveTransaction) String added in v0.6.0

func (tx *PrepareDriveTransaction) String() string

type Proof

type Proof struct {
	Data []byte
}

func NewProofFromBytes

func NewProofFromBytes(proof []byte) *Proof

func NewProofFromHexString

func NewProofFromHexString(hexProof string) (*Proof, error)

func NewProofFromString

func NewProofFromString(proof string) *Proof

func NewProofFromUint16

func NewProofFromUint16(number uint16) *Proof

func NewProofFromUint32

func NewProofFromUint32(number uint32) *Proof

func NewProofFromUint64

func NewProofFromUint64(number uint64) *Proof

func NewProofFromUint8

func NewProofFromUint8(number uint8) *Proof

func (*Proof) ProofString

func (p *Proof) ProofString() string

bytes representation of Proof

func (*Proof) Secret

func (p *Proof) Secret(hashType HashType) (*Secret, error)

returns Secret generated from Proof with passed HashType

func (*Proof) Size

func (p *Proof) Size() int

bytes length of Proof

func (*Proof) String

func (p *Proof) String() string

type ProofOfExecution added in v0.8.0

type ProofOfExecution struct {
	StartBatchId uint64
	T            []byte
	R            []byte
}

func (*ProofOfExecution) String added in v0.8.0

func (proofOfExecution *ProofOfExecution) String() string

type PropertyModificationType

type PropertyModificationType uint8
const (
	AddProperty PropertyModificationType = iota
	RemoveProperty
)

PropertyModificationType enums

type PropertyType

type PropertyType uint8
const (
	AllowAddress     PropertyType = 0x01
	AllowMosaic      PropertyType = 0x02
	AllowTransaction PropertyType = 0x04
	Sentinel         PropertyType = 0x05
	BlockAddress     PropertyType = 0x80 + 0x01
	BlockMosaic      PropertyType = 0x80 + 0x02
	BlockTransaction PropertyType = 0x80 + 0x04
)

Account property type 0x01 The property type is an address. 0x02 The property type is mosaic id. 0x04 The property type is a transaction type. 0x05 Property type sentinel. 0x80 + type The property is interpreted as a blocking operation.

type PublicAccount

type PublicAccount struct {
	Address   *Address
	PublicKey string
}

func NewAccountFromPublicKey

func NewAccountFromPublicKey(pKey string, networkType NetworkType) (*PublicAccount, error)

returns a PublicAccount from public key for passed NetworkType

func (*PublicAccount) String

func (ref *PublicAccount) String() string

type Rate added in v0.7.5

type Rate struct {
	CurrencyAmount Amount
	MosaicAmount   Amount
}

type RawProofsOfExecution added in v0.8.0

type RawProofsOfExecution struct {
	StartBatchId uint64
	T            []byte
	R            []byte
	F            []byte
	K            []byte
}

Successful End Batch Execution Transaction

func (*RawProofsOfExecution) String added in v0.8.0

func (rawPoex *RawProofsOfExecution) String() string

type RegisterNamespaceTransaction

type RegisterNamespaceTransaction struct {
	AbstractTransaction
	*NamespaceId
	NamespaceType
	NamspaceName string
	Duration     Duration
	ParentId     *NamespaceId
}

func NewRegisterRootNamespaceTransaction

func NewRegisterRootNamespaceTransaction(deadline *Deadline, namespaceName string, duration Duration, networkType NetworkType) (*RegisterNamespaceTransaction, error)

returns a RegisterNamespaceTransaction from passed namespace name and duration in blocks

func NewRegisterSubNamespaceTransaction

func NewRegisterSubNamespaceTransaction(deadline *Deadline, namespaceName string, parentId *NamespaceId, networkType NetworkType) (*RegisterNamespaceTransaction, error)

returns a RegisterNamespaceTransaction from passed namespace name and parent NamespaceId

func (*RegisterNamespaceTransaction) Bytes added in v0.6.0

func (tx *RegisterNamespaceTransaction) Bytes() ([]byte, error)

func (*RegisterNamespaceTransaction) GetAbstractTransaction

func (tx *RegisterNamespaceTransaction) GetAbstractTransaction() *AbstractTransaction

func (*RegisterNamespaceTransaction) Size

func (tx *RegisterNamespaceTransaction) Size() int

func (*RegisterNamespaceTransaction) String

func (tx *RegisterNamespaceTransaction) String() string

func (RegisterNamespaceTransaction) ToHexString added in v0.7.4

func (m RegisterNamespaceTransaction) ToHexString() string

type RemoveDbrbProcessByNetworkTransaction added in v0.8.4

type RemoveDbrbProcessByNetworkTransaction struct {
	AbstractTransaction
}

func (*RemoveDbrbProcessByNetworkTransaction) Bytes added in v0.8.4

func (*RemoveDbrbProcessByNetworkTransaction) GetAbstractTransaction added in v0.8.4

func (a *RemoveDbrbProcessByNetworkTransaction) GetAbstractTransaction() *AbstractTransaction

func (*RemoveDbrbProcessByNetworkTransaction) Size added in v0.8.4

type RemoveDbrbProcessTransaction added in v0.8.4

type RemoveDbrbProcessTransaction struct {
	AbstractTransaction
}

func (*RemoveDbrbProcessTransaction) Bytes added in v0.8.4

func (a *RemoveDbrbProcessTransaction) Bytes() ([]byte, error)

func (*RemoveDbrbProcessTransaction) GetAbstractTransaction added in v0.8.4

func (a *RemoveDbrbProcessTransaction) GetAbstractTransaction() *AbstractTransaction

func (*RemoveDbrbProcessTransaction) Size added in v0.8.4

type RemoveExchangeOfferTransaction added in v0.6.0

type RemoveExchangeOfferTransaction struct {
	AbstractTransaction
	Offers []*RemoveOffer
}

Remove Exchange Offer Transaction

func NewRemoveExchangeOfferTransaction added in v0.6.0

func NewRemoveExchangeOfferTransaction(deadline *Deadline, removeOffers []*RemoveOffer, networkType NetworkType) (*RemoveExchangeOfferTransaction, error)

func (*RemoveExchangeOfferTransaction) Bytes added in v0.6.0

func (tx *RemoveExchangeOfferTransaction) Bytes() ([]byte, error)

func (*RemoveExchangeOfferTransaction) GetAbstractTransaction added in v0.6.0

func (tx *RemoveExchangeOfferTransaction) GetAbstractTransaction() *AbstractTransaction

func (*RemoveExchangeOfferTransaction) Size added in v0.6.0

func (*RemoveExchangeOfferTransaction) String added in v0.6.0

type RemoveOffer added in v0.6.0

type RemoveOffer struct {
	Type    OfferType
	AssetId AssetId
}

func (*RemoveOffer) String added in v0.6.0

func (offer *RemoveOffer) String() string

type RemoveSdaExchangeOfferTransaction added in v0.7.5

type RemoveSdaExchangeOfferTransaction struct {
	AbstractTransaction
	Offers []*RemoveSdaOffer
}

Remove SDA-SDA Exchange Offer Transaction

func NewRemoveSdaExchangeOfferTransaction added in v0.7.5

func NewRemoveSdaExchangeOfferTransaction(deadline *Deadline, removeSdaOffers []*RemoveSdaOffer, networkType NetworkType) (*RemoveSdaExchangeOfferTransaction, error)

func (*RemoveSdaExchangeOfferTransaction) Bytes added in v0.7.5

func (tx *RemoveSdaExchangeOfferTransaction) Bytes() ([]byte, error)

func (*RemoveSdaExchangeOfferTransaction) GetAbstractTransaction added in v0.7.5

func (tx *RemoveSdaExchangeOfferTransaction) GetAbstractTransaction() *AbstractTransaction

func (*RemoveSdaExchangeOfferTransaction) Size added in v0.7.5

func (*RemoveSdaExchangeOfferTransaction) String added in v0.7.5

type RemoveSdaOffer added in v0.7.5

type RemoveSdaOffer struct {
	AssetIdGive AssetId
	AssetIdGet  AssetId
}

func (*RemoveSdaOffer) String added in v0.7.5

func (offer *RemoveSdaOffer) String() string

type Replicator added in v0.6.0

type Replicator struct {
	Account          *PublicAccount
	Version          uint32
	NodeBootKey      *PublicAccount
	Drives           []*DriveInfo // TODO make map
	DownloadChannels []*Hash
}

func (*Replicator) String added in v0.7.5

func (replicator *Replicator) String() string

type ReplicatorInfo added in v0.6.0

type ReplicatorInfo struct {
	Account                   *PublicAccount
	Start                     Height
	End                       Height
	Index                     int
	ActiveFilesWithoutDeposit map[Hash]bool
}

func (*ReplicatorInfo) String added in v0.6.0

func (info *ReplicatorInfo) String() string

type ReplicatorOffboardingTransaction added in v0.7.5

type ReplicatorOffboardingTransaction struct {
	AbstractTransaction
	DriveKey *PublicAccount
}

Replicator Offboarding Transaction

func NewReplicatorOffboardingTransaction added in v0.7.5

func NewReplicatorOffboardingTransaction(
	deadline *Deadline,
	driveKey *PublicAccount,
	networkType NetworkType,
) (*ReplicatorOffboardingTransaction, error)

func (*ReplicatorOffboardingTransaction) Bytes added in v0.7.5

func (tx *ReplicatorOffboardingTransaction) Bytes() ([]byte, error)

func (*ReplicatorOffboardingTransaction) GetAbstractTransaction added in v0.7.5

func (tx *ReplicatorOffboardingTransaction) GetAbstractTransaction() *AbstractTransaction

func (*ReplicatorOffboardingTransaction) Size added in v0.7.5

func (*ReplicatorOffboardingTransaction) String added in v0.7.5

type ReplicatorOnboardingTransaction added in v0.7.5

type ReplicatorOnboardingTransaction struct {
	AbstractTransaction
	Capacity         Amount
	NodeBootKey      *PublicAccount
	Message          *Hash
	MessageSignature *Signature
}

Replicator Onboarding Transaction

func NewReplicatorOnboardingTransaction added in v0.7.5

func NewReplicatorOnboardingTransaction(
	deadline *Deadline,
	capacity Amount,
	nodeBootKey *PublicAccount,
	message *Hash,
	messageSignature *Signature,
	networkType NetworkType,
) (*ReplicatorOnboardingTransaction, error)

func (*ReplicatorOnboardingTransaction) Bytes added in v0.7.5

func (tx *ReplicatorOnboardingTransaction) Bytes() ([]byte, error)

func (*ReplicatorOnboardingTransaction) GetAbstractTransaction added in v0.7.5

func (tx *ReplicatorOnboardingTransaction) GetAbstractTransaction() *AbstractTransaction

func (*ReplicatorOnboardingTransaction) Size added in v0.7.5

func (*ReplicatorOnboardingTransaction) String added in v0.7.5

type ReplicatorTreeRebuildTransaction added in v0.8.4

type ReplicatorTreeRebuildTransaction struct {
	AbstractTransaction
	ReplicatorKeys []*PublicAccount
}

Replicator Tree Rebuild Transaction

func NewReplicatorTreeRebuildTransaction added in v0.8.4

func NewReplicatorTreeRebuildTransaction(
	deadline *Deadline,
	replicatorKeys []*PublicAccount,
	networkType NetworkType,
) (*ReplicatorTreeRebuildTransaction, error)

func (*ReplicatorTreeRebuildTransaction) Bytes added in v0.8.4

func (tx *ReplicatorTreeRebuildTransaction) Bytes() ([]byte, error)

func (*ReplicatorTreeRebuildTransaction) GetAbstractTransaction added in v0.8.4

func (tx *ReplicatorTreeRebuildTransaction) GetAbstractTransaction() *AbstractTransaction

func (*ReplicatorTreeRebuildTransaction) Size added in v0.8.4

func (*ReplicatorTreeRebuildTransaction) String added in v0.8.4

type ReplicatorsCleanupTransaction added in v0.8.4

type ReplicatorsCleanupTransaction struct {
	AbstractTransaction
	ReplicatorKeys []*PublicAccount
}

Replicators Cleanup Transaction

func NewReplicatorsCleanupTransaction added in v0.8.4

func NewReplicatorsCleanupTransaction(
	deadline *Deadline,
	replicatorKeys []*PublicAccount,
	networkType NetworkType,
) (*ReplicatorsCleanupTransaction, error)

func (*ReplicatorsCleanupTransaction) Bytes added in v0.8.4

func (tx *ReplicatorsCleanupTransaction) Bytes() ([]byte, error)

func (*ReplicatorsCleanupTransaction) GetAbstractTransaction added in v0.8.4

func (tx *ReplicatorsCleanupTransaction) GetAbstractTransaction() *AbstractTransaction

func (*ReplicatorsCleanupTransaction) Size added in v0.8.4

func (*ReplicatorsCleanupTransaction) String added in v0.8.4

type ReplicatorsPage added in v0.7.5

type ReplicatorsPage struct {
	Replicators []*Replicator
	Pagination  Pagination
}

type ReplicatorsPageFilters added in v0.7.5

type ReplicatorsPageFilters struct {
	Version     uint32 `url:"version,omitempty"`
	ToVersion   uint32 `url:"toVersion,omitempty"`
	FromVersion uint32 `url:"fromVersion,omitempty"`

	Capacity     uint64 `url:"capacity,omitempty"`
	ToCapacity   uint64 `url:"toCapacity,omitempty"`
	FromCapacity uint64 `url:"fromCapacity,omitempty"`
}

type ReplicatorsPageOptions added in v0.7.5

type ReplicatorsPageOptions struct {
	ReplicatorsPageFilters
	PaginationOrderingOptions
}

type ResolverService

type ResolverService struct {
	NamespaceService *NamespaceService
	MosaicService    *MosaicService
	// contains filtered or unexported fields
}

TODO: Implement resolving namespace to account

func (*ResolverService) GetMosaicInfoByAssetId

func (ref *ResolverService) GetMosaicInfoByAssetId(ctx context.Context, assetId AssetId) (*MosaicInfo, error)

func (*ResolverService) GetMosaicInfosByAssetIds

func (ref *ResolverService) GetMosaicInfosByAssetIds(ctx context.Context, assetIds ...AssetId) ([]*MosaicInfo, error)

type RespErr

type RespErr struct {
	// contains filtered or unexported fields
}

func (*RespErr) Error

func (r *RespErr) Error() string

type ScopedMetadataKey added in v0.7.3

type ScopedMetadataKey = baseInt64

type SdaExchangeService added in v0.7.5

type SdaExchangeService struct {
	ResolveService *ResolverService
	// contains filtered or unexported fields
}

func (*SdaExchangeService) GetAccountSdaExchangeInfo added in v0.7.5

func (e *SdaExchangeService) GetAccountSdaExchangeInfo(ctx context.Context, account *PublicAccount) (*UserSdaExchangeInfo, error)

func (*SdaExchangeService) GetSdaExchangeOfferByAssetId added in v0.7.5

func (e *SdaExchangeService) GetSdaExchangeOfferByAssetId(ctx context.Context, assetId AssetId, offerType string) ([]*SdaOfferBalance, error)

Return offers with same mosaic id give or mosaic id get. offerType = give OR offerType = get ONLY

type SdaOffer added in v0.7.5

type SdaOffer struct {
	MosaicGive *Mosaic
	MosaicGet  *Mosaic
}

type SdaOfferBalance added in v0.7.5

type SdaOfferBalance struct {
	Owner             *PublicAccount
	MosaicGive        *Mosaic
	MosaicGet         *Mosaic
	InitialAmountGive Amount
	InitialAmountGet  Amount
	Deadline          Height
}

func (*SdaOfferBalance) String added in v0.7.5

func (info *SdaOfferBalance) String() string

type Secret

type Secret struct {
	Hash Hash     `json:"hash"`
	Type HashType `json:"type"`
}

func NewSecret

func NewSecret(hash []byte, hashType HashType) (*Secret, error)

returns Secret from passed hash and HashType

func NewSecretFromHexString

func NewSecretFromHexString(hash string, hashType HashType) (*Secret, error)

returns Secret from passed hex string hash and HashType

func (*Secret) HashString

func (s *Secret) HashString() string

func (*Secret) String

func (s *Secret) String() string

type SecretLockInfo added in v0.6.0

type SecretLockInfo struct {
	CommonLockInfo
	HashAlgorithm HashType
	CompositeHash *Hash
	Secret        *Hash
	Recipient     *Address
}

type SecretLockTransaction

type SecretLockTransaction struct {
	AbstractTransaction
	*Mosaic
	Duration  Duration
	Secret    *Secret
	Recipient *Address
}

func NewSecretLockTransaction

func NewSecretLockTransaction(deadline *Deadline, mosaic *Mosaic, duration Duration, secret *Secret, recipient *Address, networkType NetworkType) (*SecretLockTransaction, error)

returns a SecretLockTransaction from passed Mosaic, duration in blocks, Secret and mosaic recipient Address

func (*SecretLockTransaction) Bytes added in v0.6.0

func (tx *SecretLockTransaction) Bytes() ([]byte, error)

func (*SecretLockTransaction) GetAbstractTransaction

func (tx *SecretLockTransaction) GetAbstractTransaction() *AbstractTransaction

func (*SecretLockTransaction) Size

func (tx *SecretLockTransaction) Size() int

func (*SecretLockTransaction) String

func (tx *SecretLockTransaction) String() string

type SecretProofTransaction

type SecretProofTransaction struct {
	AbstractTransaction
	HashType
	Proof     *Proof
	Recipient *Address
}

func NewSecretProofTransaction

func NewSecretProofTransaction(deadline *Deadline, hashType HashType, proof *Proof, recipient *Address, networkType NetworkType) (*SecretProofTransaction, error)

returns a SecretProofTransaction from passed HashType and Proof

func (*SecretProofTransaction) Bytes added in v0.6.0

func (tx *SecretProofTransaction) Bytes() ([]byte, error)

func (*SecretProofTransaction) GetAbstractTransaction

func (tx *SecretProofTransaction) GetAbstractTransaction() *AbstractTransaction

func (*SecretProofTransaction) Size

func (tx *SecretProofTransaction) Size() int

func (*SecretProofTransaction) String

func (tx *SecretProofTransaction) String() string

type SecureMessage

type SecureMessage struct {
	// contains filtered or unexported fields
}

func NewSecureMessage

func NewSecureMessage(encodedData []byte) *SecureMessage

func NewSecureMessageFromPlaintText

func NewSecureMessageFromPlaintText(plaintText string, sender *xpxcrypto.PrivateKey, recipient *xpxcrypto.PublicKey) (*SecureMessage, error)

func (*SecureMessage) Payload

func (m *SecureMessage) Payload() []byte

func (*SecureMessage) String

func (m *SecureMessage) String() string

func (*SecureMessage) Type

func (m *SecureMessage) Type() MessageType

type Shard added in v0.7.5

type Shard struct {
	Id          uint32
	Replicators []*PublicAccount
}

type ShortCallDigest added in v0.8.0

type ShortCallDigest struct {
	CallId *Hash
	Manual bool
	Block  Height
}

Unsuccessful End Batch Execution Transaction

func (*ShortCallDigest) String added in v0.8.0

func (shortCallDigest *ShortCallDigest) String() string

type Signature

type Signature [64]byte

func StringToSignature

func StringToSignature(signature string) (*Signature, error)

func (Signature) String

func (s Signature) String() string

type SignedTransaction

type SignedTransaction struct {
	EntityType
	Payload string
	Hash    *Hash
}

func (*SignedTransaction) String added in v0.7.0

func (tx *SignedTransaction) String() string

type SignerInfo

type SignerInfo struct {
	Signer     string
	Signature  *Signature
	ParentHash *Hash
}

type SortDirection added in v0.7.3

type SortDirection string
const (
	ASC  SortDirection = "asc"
	DESC SortDirection = "desc"
)

func (SortDirection) String added in v0.7.3

func (sD SortDirection) String() string

type SortOptions added in v0.7.3

type SortOptions struct {
	SortField string
	Direction SortDirection
}

type StartDriveVerificationTransaction added in v0.6.0

type StartDriveVerificationTransaction struct {
	AbstractTransaction
	DriveKey *PublicAccount
}

func NewStartDriveVerificationTransaction added in v0.6.0

func NewStartDriveVerificationTransaction(
	deadline *Deadline,
	driveKey *PublicAccount,
	networkType NetworkType,
) (*StartDriveVerificationTransaction, error)

func (*StartDriveVerificationTransaction) Bytes added in v0.6.0

func (tx *StartDriveVerificationTransaction) Bytes() ([]byte, error)

func (*StartDriveVerificationTransaction) GetAbstractTransaction added in v0.6.0

func (tx *StartDriveVerificationTransaction) GetAbstractTransaction() *AbstractTransaction

func (*StartDriveVerificationTransaction) Size added in v0.6.0

func (*StartDriveVerificationTransaction) String added in v0.6.0

type StartExecuteTransaction added in v0.7.0

type StartExecuteTransaction struct {
	AbstractTransaction
	SuperContract      *PublicAccount
	Function           string
	LockMosaics        []*Mosaic
	FunctionParameters []int64
}

func NewStartExecuteTransaction added in v0.7.0

func NewStartExecuteTransaction(deadline *Deadline, supercontract *PublicAccount, mosaics []*Mosaic, function string, functionParameters []int64, networkType NetworkType) (*StartExecuteTransaction, error)

func (*StartExecuteTransaction) Bytes added in v0.7.0

func (tx *StartExecuteTransaction) Bytes() ([]byte, error)

func (*StartExecuteTransaction) GetAbstractTransaction added in v0.7.0

func (tx *StartExecuteTransaction) GetAbstractTransaction() *AbstractTransaction

func (*StartExecuteTransaction) Size added in v0.7.0

func (tx *StartExecuteTransaction) Size() int

func (*StartExecuteTransaction) String added in v0.7.0

func (tx *StartExecuteTransaction) String() string

type StartFileDownloadTransaction added in v0.7.0

type StartFileDownloadTransaction struct {
	AbstractTransaction
	Drive *PublicAccount
	Files []*DownloadFile
}

func NewStartFileDownloadTransaction added in v0.7.0

func NewStartFileDownloadTransaction(
	deadline *Deadline,
	drive *PublicAccount,
	files []*DownloadFile,
	networkType NetworkType,
) (*StartFileDownloadTransaction, error)

func (*StartFileDownloadTransaction) Bytes added in v0.7.0

func (tx *StartFileDownloadTransaction) Bytes() ([]byte, error)

func (*StartFileDownloadTransaction) GetAbstractTransaction added in v0.7.0

func (tx *StartFileDownloadTransaction) GetAbstractTransaction() *AbstractTransaction

func (*StartFileDownloadTransaction) Size added in v0.7.0

func (tx *StartFileDownloadTransaction) Size() int

func (*StartFileDownloadTransaction) String added in v0.7.0

func (tx *StartFileDownloadTransaction) String() string

type StartOperationTransaction added in v0.7.0

type StartOperationTransaction struct {
	AbstractTransaction
	OperationExecutors []*PublicAccount
	Mosaics            []*Mosaic
	Duration           Duration
}

type StartValue added in v0.7.3

type StartValue struct {
	Start          uint64
	StartValueType StartValueType
}

func (StartValue) EncodeValues added in v0.7.3

func (sV StartValue) EncodeValues(key string, v *url.Values) error

type StartValueType added in v0.7.3

type StartValueType string
const (
	Start     StartValueType = "start"
	FromStart StartValueType = "fromStart"
	ToStart   StartValueType = "toStart"
)

func (StartValueType) String added in v0.7.3

func (vT StartValueType) String() string

type StatusInfo

type StatusInfo struct {
	Status string
	Hash   *Hash
}

type StoragePaymentTransaction added in v0.7.5

type StoragePaymentTransaction struct {
	AbstractTransaction
	DriveKey     *PublicAccount
	StorageUnits Amount
}

Storage Payment Transaction

func NewStoragePaymentTransaction added in v0.7.5

func NewStoragePaymentTransaction(
	deadline *Deadline,
	driveKey *PublicAccount,
	storageUnits Amount,
	networkType NetworkType,
) (*StoragePaymentTransaction, error)

func (*StoragePaymentTransaction) Bytes added in v0.7.5

func (tx *StoragePaymentTransaction) Bytes() ([]byte, error)

func (*StoragePaymentTransaction) GetAbstractTransaction added in v0.7.5

func (tx *StoragePaymentTransaction) GetAbstractTransaction() *AbstractTransaction

func (*StoragePaymentTransaction) Size added in v0.7.5

func (tx *StoragePaymentTransaction) Size() int

func (*StoragePaymentTransaction) String added in v0.7.5

func (tx *StoragePaymentTransaction) String() string

type StorageService added in v0.6.0

type StorageService struct {
	LockService *LockService
	// contains filtered or unexported fields
}

func (*StorageService) GetAccountDownloadInfos added in v0.7.0

func (s *StorageService) GetAccountDownloadInfos(ctx context.Context, recipient *PublicAccount) ([]*DownloadInfo, error)

func (*StorageService) GetAccountDrives added in v0.6.0

func (s *StorageService) GetAccountDrives(ctx context.Context, driveKey *PublicAccount, filter DriveParticipantFilter) ([]*Drive, error)

func (*StorageService) GetDownloadInfo added in v0.7.0

func (s *StorageService) GetDownloadInfo(ctx context.Context, operationToken *Hash) (*DownloadInfo, error)

func (*StorageService) GetDrive added in v0.6.0

func (s *StorageService) GetDrive(ctx context.Context, driveKey *PublicAccount) (*Drive, error)

func (*StorageService) GetDriveDownloadInfos added in v0.7.0

func (s *StorageService) GetDriveDownloadInfos(ctx context.Context, drive *PublicAccount) ([]*DownloadInfo, error)

func (*StorageService) GetDrives added in v0.7.3

func (s *StorageService) GetDrives(ctx context.Context, dpOpts *DrivesPageOptions) (*DrivesPage, error)

func (*StorageService) GetVerificationStatus added in v0.6.0

func (s *StorageService) GetVerificationStatus(ctx context.Context, driveKey *PublicAccount) (*VerificationStatus, error)

type StorageSize added in v0.6.0

type StorageSize = baseInt64

type StorageV2Service added in v0.7.5

type StorageV2Service service

func (*StorageV2Service) GetDownloadChannelInfo added in v0.7.5

func (s *StorageV2Service) GetDownloadChannelInfo(ctx context.Context, downloadChannelId *Hash) (*DownloadChannel, error)

func (*StorageV2Service) GetDownloadChannels added in v0.7.5

func (s *StorageV2Service) GetDownloadChannels(ctx context.Context, rpOpts *DownloadChannelsPageOptions) (*DownloadChannelsPage, error)

func (*StorageV2Service) GetDrive added in v0.7.5

func (s *StorageV2Service) GetDrive(ctx context.Context, driveKey *PublicAccount) (*BcDrive, error)

func (*StorageV2Service) GetDrives added in v0.7.5

func (s *StorageV2Service) GetDrives(ctx context.Context, bdpOpts *BcDrivesPageOptions) (*BcDrivesPage, error)

func (*StorageV2Service) GetReplicator added in v0.7.5

func (s *StorageV2Service) GetReplicator(ctx context.Context, replicatorKey *PublicAccount) (*Replicator, error)

func (*StorageV2Service) GetReplicators added in v0.7.5

func (s *StorageV2Service) GetReplicators(ctx context.Context, rpOpts *ReplicatorsPageOptions) (*ReplicatorsPage, error)

type SuccessfulEndBatchExecutionTransaction added in v0.8.0

type SuccessfulEndBatchExecutionTransaction struct {
	AbstractTransaction
	EndBatchExecutionInfo                   EndBatchExecution
	StorageHash                             *Hash
	UsedSizedBytes                          uint64
	MetaFilesSizeBytes                      uint64
	ProofOfExecutionVerificationInformation []byte
	CallDigests                             []*ExtendedCallDigest
}

func (*SuccessfulEndBatchExecutionTransaction) Bytes added in v0.8.0

SuccessfulEndBatchExecutionTransaction bytes() is not sent by the client

func (*SuccessfulEndBatchExecutionTransaction) GetAbstractTransaction added in v0.8.0

func (tx *SuccessfulEndBatchExecutionTransaction) GetAbstractTransaction() *AbstractTransaction

func (*SuccessfulEndBatchExecutionTransaction) Size added in v0.8.0

type SuperContract added in v0.7.0

type SuperContract struct {
	Account   *PublicAccount
	Drive     *PublicAccount
	FileHash  *Hash
	VMVersion uint64
	Start     Height
	End       Height
	State     SuperContractState
}

func (*SuperContract) String added in v0.7.0

func (s *SuperContract) String() string

type SuperContractFileSystemTransaction added in v0.7.0

type SuperContractFileSystemTransaction = DriveFileSystemTransaction

func NewSuperContractFileSystemTransaction added in v0.7.0

func NewSuperContractFileSystemTransaction(
	deadline *Deadline,
	driveKey string,
	newRootHash *Hash,
	oldRootHash *Hash,
	addActions []*Action,
	removeActions []*Action,
	networkType NetworkType,
) (*SuperContractFileSystemTransaction, error)

type SuperContractService added in v0.7.0

type SuperContractService service

func (*SuperContractService) GetDriveSuperContracts added in v0.7.0

func (s *SuperContractService) GetDriveSuperContracts(ctx context.Context, driveKey *PublicAccount) ([]*SuperContract, error)

func (*SuperContractService) GetOperation added in v0.7.0

func (s *SuperContractService) GetOperation(ctx context.Context, operationHash *Hash) (*Operation, error)

func (*SuperContractService) GetOperationsByAccount added in v0.7.0

func (s *SuperContractService) GetOperationsByAccount(ctx context.Context, account *PublicAccount) ([]*Operation, error)

func (*SuperContractService) GetSuperContract added in v0.7.0

func (s *SuperContractService) GetSuperContract(ctx context.Context, contractKey *PublicAccount) (*SuperContract, error)

type SuperContractState added in v0.7.1

type SuperContractState uint8
const (
	SuperContractActive                   SuperContractState = 0
	SuperContractDeactivatedByParticipant SuperContractState = 100
	SuperContractDeactivatedByDriveEnd    SuperContractState = 101
)

type SuperContractV2 added in v0.8.0

type SuperContractV2 struct {
	Account                         *PublicAccount
	DriveAccount                    *PublicAccount
	ExecutionPaymentAccount         *PublicAccount
	Assignee                        *PublicAccount
	Creator                         *PublicAccount
	DeploymentBaseModificationsInfo *Hash
	AutomaticExecutionsInfo         *AutomaticExecutionsInfo
	RequestedCalls                  []*ContractCall
	ExecutorsInfo                   []*ExecutorInfo
	Batches                         []*Batch
	ReleasedTransactions            []*Hash
}

func (*SuperContractV2) String added in v0.8.0

func (superContractV2 *SuperContractV2) String() string

type SuperContractV2Service added in v0.8.0

type SuperContractV2Service service

func (*SuperContractV2Service) GetSuperContractV2 added in v0.8.0

func (s *SuperContractV2Service) GetSuperContractV2(ctx context.Context, superContractKey *PublicAccount) (*SuperContractV2, error)

func (*SuperContractV2Service) GetSuperContractsV2 added in v0.8.0

func (s *SuperContractV2Service) GetSuperContractsV2(ctx context.Context, scPageOpts *SuperContractsV2PageOptions) (*SuperContractsV2Page, error)

type SuperContractsV2Page added in v0.8.0

type SuperContractsV2Page struct {
	SuperContractsV2 []*SuperContractV2
	Pagination       Pagination
}

type SuperContractsV2PageFilters added in v0.8.0

type SuperContractsV2PageFilters struct {
	DriveKey string `url:"owner,omitempty"`

	Creator string `url:"owner,omitempty"`
}

type SuperContractsV2PageOptions added in v0.8.0

type SuperContractsV2PageOptions struct {
	SuperContractsV2PageFilters
	PaginationOrderingOptions
}

type SupportedEntities

type SupportedEntities struct {
	Entities map[EntityType]*Entity
}

func NewSupportedEntities

func NewSupportedEntities() *SupportedEntities

func (*SupportedEntities) MarshalBinary

func (s *SupportedEntities) MarshalBinary() (data []byte, err error)

func (*SupportedEntities) String

func (s *SupportedEntities) String() string

func (*SupportedEntities) UnmarshalBinary

func (s *SupportedEntities) UnmarshalBinary(data []byte) error

type Timestamp

type Timestamp struct {
	time.Time
}

func NewTimestamp

func NewTimestamp(milliseconds int64) *Timestamp

returns new Timestamp from passed milliseconds value

func (*Timestamp) ToBlockchainTimestamp

func (t *Timestamp) ToBlockchainTimestamp() *BlockchainTimestamp

type Transaction

type Transaction interface {
	GetAbstractTransaction() *AbstractTransaction
	String() string
	// number of bytes of serialized transaction
	Size() int
	Bytes() ([]byte, error)
}

func MapTransaction

func MapTransaction(b *bytes.Buffer, generationHash *Hash) (Transaction, error)

func MapTransactions

func MapTransactions(b *bytes.Buffer, generationHash *Hash) ([]Transaction, error)

type TransactionGroup added in v0.7.3

type TransactionGroup string
const (
	Confirmed   TransactionGroup = "confirmed"
	Unconfirmed TransactionGroup = "unconfirmed"
	Partial     TransactionGroup = "partial"
)

type TransactionHashesDTO

type TransactionHashesDTO struct {
	Hashes []string `json:"hashes"`
}

type TransactionIdsDTO

type TransactionIdsDTO struct {
	Ids []string `json:"transactionIds"`
}

type TransactionInfo

type TransactionInfo struct {
	Height              Height
	Index               uint32
	Id                  string
	TransactionHash     *Hash
	MerkleComponentHash *Hash
	AggregateHash       *Hash
	UniqueAggregateHash *Hash
	AggregateId         string
}

func (*TransactionInfo) String

func (ti *TransactionInfo) String() string

type TransactionOrder

type TransactionOrder string
const (
	TRANSACTION_ORDER_ASC  TransactionOrder = "id"
	TRANSACTION_ORDER_DESC TransactionOrder = "-id"
)

type TransactionService

type TransactionService struct {
	BlockchainService *BlockchainService
	// contains filtered or unexported fields
}

func (*TransactionService) Announce

func (txs *TransactionService) Announce(ctx context.Context, tx *SignedTransaction) (string, error)

Announce returns transaction hash after announcing passed SignedTransaction

func (*TransactionService) AnnounceAggregateBonded

func (txs *TransactionService) AnnounceAggregateBonded(ctx context.Context, tx *SignedTransaction) (string, error)

AnnounceAggregateBonded returns transaction hash after announcing passed aggregate bounded SignedTransaction

func (*TransactionService) AnnounceAggregateBondedCosignature

func (txs *TransactionService) AnnounceAggregateBondedCosignature(ctx context.Context, c *CosignatureSignedTransaction) (string, error)

AnnounceAggregateBondedCosignature returns transaction hash after announcing passed CosignatureSignedTransaction

func (*TransactionService) GetAnyTransaction added in v0.7.3

func (txs *TransactionService) GetAnyTransaction(ctx context.Context, id string) (Transaction, error)

GetAnyTransaction returns Transaction for passed transaction id or hash

func (*TransactionService) GetTransaction

func (txs *TransactionService) GetTransaction(ctx context.Context, group TransactionGroup, id string) (Transaction, error)

GetTransaction returns Transaction for passed transaction id or hash

func (*TransactionService) GetTransactionEffectiveFee

func (txs *TransactionService) GetTransactionEffectiveFee(ctx context.Context, transactionId string) (int, error)

GetTransactionEffectiveFee gets a transaction's effective paid fee

func (*TransactionService) GetTransactionStatus

func (txs *TransactionService) GetTransactionStatus(ctx context.Context, id string) (*TransactionStatus, error)

GetTransactionStatus returns TransactionStatus for passed transaction id or hash

func (*TransactionService) GetTransactions

func (txs *TransactionService) GetTransactions(ctx context.Context, ids []string) ([]Transaction, error)

GetTransactions returns an array of Transaction's for passed array of transaction ids or hashes with any group

func (*TransactionService) GetTransactionsByGroup added in v0.7.3

func (txs *TransactionService) GetTransactionsByGroup(ctx context.Context, group TransactionGroup, tpOpts *TransactionsPageOptions) (*TransactionsPage, error)

GetTransactionsByGroup returns an array of Transaction's for passed array of transaction ids or hashes

func (*TransactionService) GetTransactionsByIds added in v0.7.3

func (txs *TransactionService) GetTransactionsByIds(ctx context.Context, group TransactionGroup, ids []string, tpOpts *TransactionsPageOptions) ([]Transaction, error)

GetTransactionsByIds returns an array of Transaction's for passed array of transaction ids or hashes

func (*TransactionService) GetTransactionsStatuses added in v0.7.3

func (txs *TransactionService) GetTransactionsStatuses(ctx context.Context, hashes []string) ([]*TransactionStatus, error)

GetTransactionsStatuses returns TransactionsStatuses for passed transactions id or hashes

type TransactionStatus

type TransactionStatus struct {
	Deadline *Deadline
	Group    TransactionGroup
	Status   string
	Hash     *Hash
	Height   Height
}

func (*TransactionStatus) String

func (ts *TransactionStatus) String() string

type TransactionsPage added in v0.7.3

type TransactionsPage struct {
	Transactions []Transaction
	Pagination   Pagination
}

type TransactionsPageOptions added in v0.7.3

type TransactionsPageOptions struct {
	Height           uint   `url:"height,omitempty"`
	FromHeight       uint64 `url:"fromHeight,omitempty"`
	ToHeight         uint64 `url:"toHeight,omitempty"`
	Address          string `url:"address,omitempty"`
	SignerPublicKey  string `url:"signerPublicKey,omitempty"`
	RecipientAddress string `url:"recipientAddress,omitempty"`
	Type             []uint `url:"type[],omitempty"`
	Embedded         bool   `url:"embedded,omitempty"`
	PublicKey        bool   `url:"publicKey,omitempty"`
	FirstLevel       bool   `url:"firstLevel"`
	PaginationOrderingOptions
}

type TransferTransaction

type TransferTransaction struct {
	AbstractTransaction
	Message   Message
	Mosaics   []*Mosaic
	Recipient *Address
}

func NewTransferTransaction

func NewTransferTransaction(deadline *Deadline, recipient *Address, mosaics []*Mosaic, message Message, networkType NetworkType) (*TransferTransaction, error)

returns a TransferTransaction from passed transfer recipient Adderess, array of Mosaic's to transfer and transfer Message

func NewTransferTransactionWithNamespace

func NewTransferTransactionWithNamespace(deadline *Deadline, recipient *NamespaceId, mosaics []*Mosaic, message Message, networkType NetworkType) (*TransferTransaction, error)

returns TransferTransaction from passed recipient NamespaceId, Mosaic's and transfer Message

func (*TransferTransaction) Bytes added in v0.6.0

func (tx *TransferTransaction) Bytes() ([]byte, error)

func (*TransferTransaction) GetAbstractTransaction

func (tx *TransferTransaction) GetAbstractTransaction() *AbstractTransaction

func (*TransferTransaction) MessageSize

func (tx *TransferTransaction) MessageSize() int

func (*TransferTransaction) Size

func (tx *TransferTransaction) Size() int

func (*TransferTransaction) String

func (tx *TransferTransaction) String() string

type Turnover added in v0.7.5

type Turnover struct {
	Rate     *Rate
	Turnover Amount
}

type UnconfirmedRemoved

type UnconfirmedRemoved struct {
	Meta *TransactionInfo
}

type UnsuccessfulEndBatchExecutionTransaction added in v0.8.0

type UnsuccessfulEndBatchExecutionTransaction struct {
	AbstractTransaction
	EndBatchExecution
	CallDigests []*ShortCallDigest
}

func (*UnsuccessfulEndBatchExecutionTransaction) Bytes added in v0.8.0

UnsuccessfulEndBatchExecutionTransaction bytes() is not sent by the client

func (*UnsuccessfulEndBatchExecutionTransaction) GetAbstractTransaction added in v0.8.0

func (tx *UnsuccessfulEndBatchExecutionTransaction) GetAbstractTransaction() *AbstractTransaction

func (*UnsuccessfulEndBatchExecutionTransaction) Size added in v0.8.0

type UploadInfo added in v0.6.0

type UploadInfo struct {
	Participant  *PublicAccount
	UploadedSize Amount
}

func (*UploadInfo) String added in v0.6.0

func (info *UploadInfo) String() string

type UploadInfoStorageV2 added in v0.7.5

type UploadInfoStorageV2 struct {
	Key        *PublicAccount
	UploadSize uint64
}

func (*UploadInfoStorageV2) String added in v0.7.5

func (uis *UploadInfoStorageV2) String() string

type UserExchangeInfo added in v0.6.0

type UserExchangeInfo struct {
	Owner  *PublicAccount
	Offers map[OfferType]map[MosaicId]*OfferInfo
}

func (*UserExchangeInfo) String added in v0.6.0

func (info *UserExchangeInfo) String() string

type UserSdaExchangeInfo added in v0.7.5

type UserSdaExchangeInfo struct {
	Owner            *PublicAccount
	SdaOfferBalances []*SdaOfferBalance
}

func (*UserSdaExchangeInfo) String added in v0.7.5

func (info *UserSdaExchangeInfo) String() string

type VarSize

type VarSize uint32
const (
	ByteSize  VarSize = 1
	ShortSize VarSize = 2
	IntSize   VarSize = 4
)

type Verification added in v0.7.5

type Verification struct {
	VerificationTrigger *Hash
	Expiration          *Timestamp
	Duration            time.Duration
	Shards              []*Shard
}

func (*Verification) String added in v0.7.5

func (verification *Verification) String() string

type VerificationPaymentTransaction added in v0.7.5

type VerificationPaymentTransaction struct {
	AbstractTransaction
	DriveKey              *PublicAccount
	VerificationFeeAmount Amount
}

Verification Payment Transaction

func NewVerificationPaymentTransaction added in v0.7.5

func NewVerificationPaymentTransaction(
	deadline *Deadline,
	driveKey *PublicAccount,
	verificationFeeAmount Amount,
	networkType NetworkType,
) (*VerificationPaymentTransaction, error)

func (*VerificationPaymentTransaction) Bytes added in v0.7.5

func (tx *VerificationPaymentTransaction) Bytes() ([]byte, error)

func (*VerificationPaymentTransaction) GetAbstractTransaction added in v0.7.5

func (tx *VerificationPaymentTransaction) GetAbstractTransaction() *AbstractTransaction

func (*VerificationPaymentTransaction) Size added in v0.7.5

func (*VerificationPaymentTransaction) String added in v0.7.5

type VerificationStatus added in v0.6.0

type VerificationStatus struct {
	Active    bool
	Available bool
}

type WsMessageInfo

type WsMessageInfo struct {
	Address     *Address
	ChannelName string
}

type WsMessageInfoDTO

type WsMessageInfoDTO struct {
	Meta wsMessageInfoMetaDTO `json:"meta"`
}

func (*WsMessageInfoDTO) ToStruct

func (dto *WsMessageInfoDTO) ToStruct() (*WsMessageInfo, error)

Source Files

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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