build

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2023 License: MIT Imports: 18 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func UnixTimeNow

func UnixTimeNow() uint64

UnixTimeNow returns the current time as a number of milliseconds since the Unix epoch. This is the recommended timestamp value.

Types

type ActivateProtocolVersionBuilder added in v1.0.2

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

func (ActivateProtocolVersionBuilder) Done added in v1.0.2

func (ActivateProtocolVersionBuilder) FinishTransaction added in v1.1.0

func (b ActivateProtocolVersionBuilder) FinishTransaction() TransactionBuilder

func (ActivateProtocolVersionBuilder) SignWith added in v1.0.2

func (b ActivateProtocolVersionBuilder) SignWith(signer any, path ...string) SignatureBuilder

type AddCreditsBuilder

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

func (AddCreditsBuilder) Done

func (AddCreditsBuilder) FinishTransaction added in v1.1.0

func (b AddCreditsBuilder) FinishTransaction() TransactionBuilder

func (AddCreditsBuilder) Purchase added in v1.0.1

func (b AddCreditsBuilder) Purchase(amount float64) AddCreditsBuilder

func (AddCreditsBuilder) SignWith

func (b AddCreditsBuilder) SignWith(signer any, path ...string) SignatureBuilder

func (AddCreditsBuilder) Spend

func (AddCreditsBuilder) To

func (b AddCreditsBuilder) To(url any, path ...string) AddCreditsBuilder

func (AddCreditsBuilder) WithOracle

func (b AddCreditsBuilder) WithOracle(value float64) AddCreditsBuilder

type AddKeyOperationBuilder

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

func (AddKeyOperationBuilder) Entry

func (AddKeyOperationBuilder) FinishOperation

func (b AddKeyOperationBuilder) FinishOperation() UpdateKeyPageBuilder

type BurnCreditsBuilder added in v1.1.0

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

func (BurnCreditsBuilder) Done added in v1.1.0

func (BurnCreditsBuilder) SignWith added in v1.1.0

func (b BurnCreditsBuilder) SignWith(signer any, path ...string) SignatureBuilder

type BurnTokensBuilder

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

func (BurnTokensBuilder) Done

func (BurnTokensBuilder) FinishTransaction added in v1.1.0

func (b BurnTokensBuilder) FinishTransaction() TransactionBuilder

func (BurnTokensBuilder) SignWith

func (b BurnTokensBuilder) SignWith(signer any, path ...string) SignatureBuilder

type CreateDataAccountBuilder

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

func (CreateDataAccountBuilder) Done

func (CreateDataAccountBuilder) FinishTransaction added in v1.1.0

func (b CreateDataAccountBuilder) FinishTransaction() TransactionBuilder

func (CreateDataAccountBuilder) SignWith

func (b CreateDataAccountBuilder) SignWith(signer any, path ...string) SignatureBuilder

func (CreateDataAccountBuilder) WithAuthority

func (b CreateDataAccountBuilder) WithAuthority(book any, path ...string) CreateDataAccountBuilder

type CreateIdentityBuilder

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

func (CreateIdentityBuilder) Done

func (CreateIdentityBuilder) FinishTransaction added in v1.1.0

func (b CreateIdentityBuilder) FinishTransaction() TransactionBuilder

func (CreateIdentityBuilder) SignWith

func (b CreateIdentityBuilder) SignWith(signer any, path ...string) SignatureBuilder

func (CreateIdentityBuilder) WithAuthority

func (b CreateIdentityBuilder) WithAuthority(book any, path ...string) CreateIdentityBuilder

func (CreateIdentityBuilder) WithKey

func (CreateIdentityBuilder) WithKeyBook

func (b CreateIdentityBuilder) WithKeyBook(book any, path ...string) CreateIdentityBuilder

func (CreateIdentityBuilder) WithKeyHash

func (b CreateIdentityBuilder) WithKeyHash(hash any) CreateIdentityBuilder

type CreateKeyBookBuilder

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

func (CreateKeyBookBuilder) Done

func (CreateKeyBookBuilder) FinishTransaction added in v1.1.0

func (b CreateKeyBookBuilder) FinishTransaction() TransactionBuilder

func (CreateKeyBookBuilder) SignWith

func (b CreateKeyBookBuilder) SignWith(signer any, path ...string) SignatureBuilder

func (CreateKeyBookBuilder) WithAuthority

func (b CreateKeyBookBuilder) WithAuthority(book any, path ...string) CreateKeyBookBuilder

func (CreateKeyBookBuilder) WithKey

func (CreateKeyBookBuilder) WithKeyHash

func (b CreateKeyBookBuilder) WithKeyHash(hash any) CreateKeyBookBuilder

type CreateKeyPageBuilder

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

func (CreateKeyPageBuilder) Done

func (CreateKeyPageBuilder) FinishTransaction added in v1.1.0

func (b CreateKeyPageBuilder) FinishTransaction() TransactionBuilder

func (CreateKeyPageBuilder) SignWith

func (b CreateKeyPageBuilder) SignWith(signer any, path ...string) SignatureBuilder

func (CreateKeyPageBuilder) WithEntry

type CreateLiteTokenAccountBuilder added in v1.1.0

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

func (CreateLiteTokenAccountBuilder) Done added in v1.1.0

func (CreateLiteTokenAccountBuilder) FinishTransaction added in v1.1.0

func (b CreateLiteTokenAccountBuilder) FinishTransaction() TransactionBuilder

func (CreateLiteTokenAccountBuilder) SignWith added in v1.1.0

func (b CreateLiteTokenAccountBuilder) SignWith(signer any, path ...string) SignatureBuilder

type CreateTokenAccountBuilder

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

func (CreateTokenAccountBuilder) Done

func (CreateTokenAccountBuilder) FinishTransaction added in v1.1.0

func (b CreateTokenAccountBuilder) FinishTransaction() TransactionBuilder

func (CreateTokenAccountBuilder) ForToken

func (CreateTokenAccountBuilder) SignWith

func (b CreateTokenAccountBuilder) SignWith(signer any, path ...string) SignatureBuilder

func (CreateTokenAccountBuilder) WithAuthority

func (b CreateTokenAccountBuilder) WithAuthority(book any, path ...string) CreateTokenAccountBuilder

type CreateTokenBuilder

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

func (CreateTokenBuilder) Done

func (CreateTokenBuilder) FinishTransaction added in v1.1.0

func (b CreateTokenBuilder) FinishTransaction() TransactionBuilder

func (CreateTokenBuilder) SignWith

func (b CreateTokenBuilder) SignWith(signer any, path ...string) SignatureBuilder

func (CreateTokenBuilder) WithAuthority

func (b CreateTokenBuilder) WithAuthority(book any, path ...string) CreateTokenBuilder

func (CreateTokenBuilder) WithPrecision

func (b CreateTokenBuilder) WithPrecision(precision any) CreateTokenBuilder

func (CreateTokenBuilder) WithSupplyLimit

func (b CreateTokenBuilder) WithSupplyLimit(limit any) CreateTokenBuilder

func (CreateTokenBuilder) WithSymbol

func (b CreateTokenBuilder) WithSymbol(symbol string) CreateTokenBuilder

type ED25519PrivateKey added in v1.1.0

type ED25519PrivateKey []byte

ED25519PrivateKey is an ED25519 private key used as a Signer.

func (ED25519PrivateKey) Address added in v1.1.0

func (sk ED25519PrivateKey) Address() address.Address

func (ED25519PrivateKey) Sign added in v1.1.0

func (sk ED25519PrivateKey) Sign(message []byte) ([]byte, error)

type Errors

type Errors []error

func (Errors) Error

func (e Errors) Error() string

type IssueTokensBuilder

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

func (IssueTokensBuilder) And

func (b IssueTokensBuilder) And(amount any, precision uint64) IssueTokensBuilder

func (IssueTokensBuilder) Done

func (IssueTokensBuilder) FinishTransaction added in v1.1.0

func (b IssueTokensBuilder) FinishTransaction() TransactionBuilder

func (IssueTokensBuilder) SignWith

func (b IssueTokensBuilder) SignWith(signer any, path ...string) SignatureBuilder

func (IssueTokensBuilder) To

func (b IssueTokensBuilder) To(recipient any, path ...string) IssueTokensBuilder

type KeyPageEntryBuilder

type KeyPageEntryBuilder[T keyPageEntryBuilderArg[T]] struct {
	// contains filtered or unexported fields
}

func (KeyPageEntryBuilder[T]) FinishEntry

func (b KeyPageEntryBuilder[T]) FinishEntry() T

func (KeyPageEntryBuilder[T]) Hash

func (b KeyPageEntryBuilder[T]) Hash(hash any) KeyPageEntryBuilder[T]

func (KeyPageEntryBuilder[T]) Key

func (KeyPageEntryBuilder[T]) Owner

func (b KeyPageEntryBuilder[T]) Owner(owner any, path ...string) KeyPageEntryBuilder[T]

type LockAccountBuilder added in v1.1.0

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

func (LockAccountBuilder) Done added in v1.1.0

func (LockAccountBuilder) FinishTransaction added in v1.1.0

func (b LockAccountBuilder) FinishTransaction() TransactionBuilder

func (LockAccountBuilder) SignWith added in v1.1.0

func (b LockAccountBuilder) SignWith(signer any, path ...string) SignatureBuilder

type RemoveKeyOperationBuilder

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

func (RemoveKeyOperationBuilder) Entry

func (RemoveKeyOperationBuilder) FinishOperation

func (b RemoveKeyOperationBuilder) FinishOperation() UpdateKeyPageBuilder

type SendTokensBuilder

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

func (SendTokensBuilder) And

func (b SendTokensBuilder) And(amount any, precision uint64) SendTokensBuilder

func (SendTokensBuilder) Done

func (SendTokensBuilder) FinishTransaction added in v1.1.0

func (b SendTokensBuilder) FinishTransaction() TransactionBuilder

func (SendTokensBuilder) SignWith

func (b SendTokensBuilder) SignWith(signer any, path ...string) SignatureBuilder

func (SendTokensBuilder) To

func (b SendTokensBuilder) To(recipient any, path ...string) SendTokensBuilder

type SignatureBuilder

type SignatureBuilder struct {

	// Ignore64Byte (when set) stops the signature builder from automatically
	// correcting a transaction header or body that marshals to 64 bytes.
	Ignore64Byte bool
	// contains filtered or unexported fields
}

SignatureBuilder builds a signature. SignatureBuilder should not be constructed directly.

func Faucet added in v1.1.0

func Faucet(recipient any, path ...string) SignatureBuilder

func SignatureForHash

func SignatureForHash(hash []byte) SignatureBuilder

func SignatureForMessage added in v1.1.0

func SignatureForMessage(msg messaging.Message) SignatureBuilder

func SignatureForTransaction

func SignatureForTransaction(txn *protocol.Transaction) SignatureBuilder

func SignatureForTxID added in v1.0.1

func SignatureForTxID(txid *url.TxID) SignatureBuilder

func (SignatureBuilder) Abstain added in v1.2.0

func (b SignatureBuilder) Abstain() SignatureBuilder

func (SignatureBuilder) Accept added in v1.2.0

func (SignatureBuilder) Delegator

func (b SignatureBuilder) Delegator(delegator any, path ...string) SignatureBuilder

func (SignatureBuilder) Done

func (SignatureBuilder) Load added in v1.1.0

func (b SignatureBuilder) Load(q api.Querier) SignatureBuilder

Load loads the transaction using the querier. Load panics if the existing transaction is not remote.

func (SignatureBuilder) NoInitiator added in v1.2.0

func (b SignatureBuilder) NoInitiator() SignatureBuilder

NoInitiator tells the signature builder not to initiate the transaction, even if the initiator hash is not set.

func (SignatureBuilder) PrivateKey

func (b SignatureBuilder) PrivateKey(key []byte) SignatureBuilder

func (SignatureBuilder) Reject added in v1.2.0

func (SignatureBuilder) SignWith

func (b SignatureBuilder) SignWith(signer any, path ...string) SignatureBuilder

func (SignatureBuilder) Signer

func (b SignatureBuilder) Signer(signer any) SignatureBuilder

func (SignatureBuilder) Timestamp

func (b SignatureBuilder) Timestamp(timestamp any) SignatureBuilder

func (SignatureBuilder) Type

func (SignatureBuilder) Url

func (b SignatureBuilder) Url(signer any, path ...string) SignatureBuilder

func (SignatureBuilder) Version

func (b SignatureBuilder) Version(version any) SignatureBuilder

func (SignatureBuilder) Vote added in v1.2.0

type Signer added in v1.1.0

type Signer interface {
	Address() address.Address
	Sign(message []byte) ([]byte, error)
}

A Signer signs messages and has an address.

type TransactionBuilder

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

func Transaction

func Transaction() TransactionBuilder

func (TransactionBuilder) ActivateProtocolVersion added in v1.0.2

func (TransactionBuilder) AddCredits

func (b TransactionBuilder) AddCredits() AddCreditsBuilder

func (TransactionBuilder) Body

func (TransactionBuilder) BurnCredits added in v1.1.0

func (b TransactionBuilder) BurnCredits(amount any) BurnCreditsBuilder

func (TransactionBuilder) BurnTokens

func (b TransactionBuilder) BurnTokens(amount any, precision uint64) BurnTokensBuilder

func (TransactionBuilder) CreateDataAccount

func (b TransactionBuilder) CreateDataAccount(url any, path ...string) CreateDataAccountBuilder

func (TransactionBuilder) CreateIdentity

func (b TransactionBuilder) CreateIdentity(url any, path ...string) CreateIdentityBuilder

func (TransactionBuilder) CreateKeyBook

func (b TransactionBuilder) CreateKeyBook(url any, path ...string) CreateKeyBookBuilder

func (TransactionBuilder) CreateKeyPage

func (b TransactionBuilder) CreateKeyPage() CreateKeyPageBuilder

func (TransactionBuilder) CreateLiteTokenAccount added in v1.1.0

func (b TransactionBuilder) CreateLiteTokenAccount() CreateLiteTokenAccountBuilder

func (TransactionBuilder) CreateToken

func (b TransactionBuilder) CreateToken(url any, path ...string) CreateTokenBuilder

func (TransactionBuilder) CreateTokenAccount

func (b TransactionBuilder) CreateTokenAccount(url any, path ...string) CreateTokenAccountBuilder

func (TransactionBuilder) Done

func (TransactionBuilder) For

func (b TransactionBuilder) For(principal any, path ...string) TransactionBuilder

func (TransactionBuilder) HoldUntil added in v1.2.0

func (TransactionBuilder) Initiator

func (b TransactionBuilder) Initiator(init any) TransactionBuilder

func (TransactionBuilder) IssueTokens

func (b TransactionBuilder) IssueTokens(amount any, precision uint64) IssueTokensBuilder

func (TransactionBuilder) LockAccount added in v1.1.0

func (b TransactionBuilder) LockAccount(height uint64) LockAccountBuilder

func (TransactionBuilder) Memo

func (TransactionBuilder) Metadata

func (b TransactionBuilder) Metadata(metadata []byte) TransactionBuilder

func (TransactionBuilder) SendTokens

func (b TransactionBuilder) SendTokens(amount any, precision uint64) SendTokensBuilder

func (TransactionBuilder) SignWith

func (b TransactionBuilder) SignWith(signer any, path ...string) SignatureBuilder

func (TransactionBuilder) TransferCredits added in v1.1.0

func (b TransactionBuilder) TransferCredits(amount any) TransferCreditsBuilder

func (TransactionBuilder) UpdateAccountAuth

func (b TransactionBuilder) UpdateAccountAuth() UpdateAccountAuthBuilder

func (TransactionBuilder) UpdateKey

func (TransactionBuilder) UpdateKeyPage

func (b TransactionBuilder) UpdateKeyPage() UpdateKeyPageBuilder

func (TransactionBuilder) WriteData

func (b TransactionBuilder) WriteData(data ...any) WriteDataBuilder

type TransferCreditsBuilder added in v1.1.0

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

func (TransferCreditsBuilder) And added in v1.1.0

func (TransferCreditsBuilder) Done added in v1.1.0

func (TransferCreditsBuilder) SignWith added in v1.1.0

func (b TransferCreditsBuilder) SignWith(signer any, path ...string) SignatureBuilder

func (TransferCreditsBuilder) To added in v1.1.0

func (b TransferCreditsBuilder) To(recipient any, path ...string) TransferCreditsBuilder

type UpdateAccountAuthBuilder

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

func (UpdateAccountAuthBuilder) Add

func (b UpdateAccountAuthBuilder) Add(authority any, path ...string) UpdateAccountAuthBuilder

func (UpdateAccountAuthBuilder) Disable

func (b UpdateAccountAuthBuilder) Disable(authority any, path ...string) UpdateAccountAuthBuilder

func (UpdateAccountAuthBuilder) Done

func (UpdateAccountAuthBuilder) Enable

func (b UpdateAccountAuthBuilder) Enable(authority any, path ...string) UpdateAccountAuthBuilder

func (UpdateAccountAuthBuilder) FinishTransaction added in v1.1.0

func (b UpdateAccountAuthBuilder) FinishTransaction() TransactionBuilder

func (UpdateAccountAuthBuilder) Remove

func (b UpdateAccountAuthBuilder) Remove(authority any, path ...string) UpdateAccountAuthBuilder

func (UpdateAccountAuthBuilder) SignWith

func (b UpdateAccountAuthBuilder) SignWith(signer any, path ...string) SignatureBuilder

type UpdateAllowedKeyPageOperationBuilder

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

func (UpdateAllowedKeyPageOperationBuilder) Allow

func (UpdateAllowedKeyPageOperationBuilder) Deny

func (UpdateAllowedKeyPageOperationBuilder) FinishOperation

type UpdateKeyBuilder

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

func (UpdateKeyBuilder) Done

func (UpdateKeyBuilder) FinishTransaction added in v1.1.0

func (b UpdateKeyBuilder) FinishTransaction() TransactionBuilder

func (UpdateKeyBuilder) SignWith

func (b UpdateKeyBuilder) SignWith(signer any, path ...string) SignatureBuilder

type UpdateKeyOperationBuilder

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

func (UpdateKeyOperationBuilder) Entry

func (UpdateKeyOperationBuilder) FinishOperation

func (b UpdateKeyOperationBuilder) FinishOperation() UpdateKeyPageBuilder

func (UpdateKeyOperationBuilder) To

type UpdateKeyPageBuilder

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

func (UpdateKeyPageBuilder) Add

func (UpdateKeyPageBuilder) Done

func (UpdateKeyPageBuilder) FinishTransaction added in v1.1.0

func (b UpdateKeyPageBuilder) FinishTransaction() TransactionBuilder

func (UpdateKeyPageBuilder) Remove

func (UpdateKeyPageBuilder) SetRejectThreshold added in v1.2.0

func (b UpdateKeyPageBuilder) SetRejectThreshold(v uint64) UpdateKeyPageBuilder

func (UpdateKeyPageBuilder) SetResponseThreshold added in v1.2.0

func (b UpdateKeyPageBuilder) SetResponseThreshold(v uint64) UpdateKeyPageBuilder

func (UpdateKeyPageBuilder) SetThreshold

func (UpdateKeyPageBuilder) SignWith

func (b UpdateKeyPageBuilder) SignWith(signer any, path ...string) SignatureBuilder

func (UpdateKeyPageBuilder) Update

func (UpdateKeyPageBuilder) UpdateAllowed

type WriteDataBuilder

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

func (WriteDataBuilder) Accumulate added in v1.1.1

func (b WriteDataBuilder) Accumulate(data ...any) WriteDataBuilder

func (WriteDataBuilder) Done

func (WriteDataBuilder) DoubleHash added in v1.1.1

func (b WriteDataBuilder) DoubleHash(data ...any) WriteDataBuilder

func (WriteDataBuilder) Entry added in v1.1.0

func (WriteDataBuilder) FinishTransaction added in v1.1.0

func (b WriteDataBuilder) FinishTransaction() TransactionBuilder

func (WriteDataBuilder) Scratch

func (b WriteDataBuilder) Scratch() WriteDataBuilder

func (WriteDataBuilder) SignWith

func (b WriteDataBuilder) SignWith(signer any, path ...string) SignatureBuilder

func (WriteDataBuilder) To

func (b WriteDataBuilder) To(recipient any, path ...string) WriteDataToBuilder

func (WriteDataBuilder) ToState

func (b WriteDataBuilder) ToState() WriteDataBuilder

type WriteDataToBuilder

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

func (WriteDataToBuilder) Done

func (WriteDataToBuilder) FinishTransaction added in v1.1.0

func (b WriteDataToBuilder) FinishTransaction() TransactionBuilder

func (WriteDataToBuilder) SignWith

func (b WriteDataToBuilder) SignWith(signer any, path ...string) SignatureBuilder

Jump to

Keyboard shortcuts

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