transactions

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2023 License: MIT Imports: 9 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	MintTransaction_AssetType_name = map[int32]string{
		0: "FIXED_SUPPLY",
		1: "VARIABLE_SUPPLY",
	}
	MintTransaction_AssetType_value = map[string]int32{
		"FIXED_SUPPLY":    0,
		"VARIABLE_SUPPLY": 1,
	}
)

Enum value maps for MintTransaction_AssetType.

View Source
var File_transactions_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type CoinbaseTransaction

type CoinbaseTransaction struct {
	Validator_ID []byte    `protobuf:"bytes,1,opt,name=validator_ID,json=validatorID,proto3" json:"validator_ID,omitempty"`
	NewCoins     uint64    `protobuf:"varint,2,opt,name=new_coins,json=newCoins,proto3" json:"new_coins,omitempty"`
	Outputs      []*Output `protobuf:"bytes,3,rep,name=outputs,proto3" json:"outputs,omitempty"`
	Signature    []byte    `protobuf:"bytes,4,opt,name=signature,proto3" json:"signature,omitempty"`
	Proof        []byte    `protobuf:"bytes,5,opt,name=proof,proto3" json:"proof,omitempty"`
	// contains filtered or unexported fields
}

func (*CoinbaseTransaction) Descriptor deprecated

func (*CoinbaseTransaction) Descriptor() ([]byte, []int)

Deprecated: Use CoinbaseTransaction.ProtoReflect.Descriptor instead.

func (*CoinbaseTransaction) Deserialize

func (tx *CoinbaseTransaction) Deserialize(data []byte) error

func (*CoinbaseTransaction) GetNewCoins

func (x *CoinbaseTransaction) GetNewCoins() uint64

func (*CoinbaseTransaction) GetOutputs

func (x *CoinbaseTransaction) GetOutputs() []*Output

func (*CoinbaseTransaction) GetProof

func (x *CoinbaseTransaction) GetProof() []byte

func (*CoinbaseTransaction) GetSignature

func (x *CoinbaseTransaction) GetSignature() []byte

func (*CoinbaseTransaction) GetValidator_ID

func (x *CoinbaseTransaction) GetValidator_ID() []byte

func (*CoinbaseTransaction) ID

func (tx *CoinbaseTransaction) ID() types.ID

func (*CoinbaseTransaction) MarshalJSON

func (tx *CoinbaseTransaction) MarshalJSON() ([]byte, error)

func (*CoinbaseTransaction) ProtoMessage

func (*CoinbaseTransaction) ProtoMessage()

func (*CoinbaseTransaction) ProtoReflect

func (x *CoinbaseTransaction) ProtoReflect() protoreflect.Message

func (*CoinbaseTransaction) Reset

func (x *CoinbaseTransaction) Reset()

func (*CoinbaseTransaction) Serialize

func (tx *CoinbaseTransaction) Serialize() ([]byte, error)

func (*CoinbaseTransaction) SigHash

func (tx *CoinbaseTransaction) SigHash() ([]byte, error)

func (*CoinbaseTransaction) String

func (x *CoinbaseTransaction) String() string

func (*CoinbaseTransaction) UnmarshalJSON

func (tx *CoinbaseTransaction) UnmarshalJSON(data []byte) error

type MintTransaction

type MintTransaction struct {
	Type         MintTransaction_AssetType `protobuf:"varint,1,opt,name=type,proto3,enum=MintTransaction_AssetType" json:"type,omitempty"`
	Asset_ID     []byte                    `protobuf:"bytes,2,opt,name=asset_ID,json=assetID,proto3" json:"asset_ID,omitempty"`
	DocumentHash []byte                    `protobuf:"bytes,3,opt,name=document_hash,json=documentHash,proto3" json:"document_hash,omitempty"`
	NewTokens    uint64                    `protobuf:"varint,4,opt,name=new_tokens,json=newTokens,proto3" json:"new_tokens,omitempty"`
	Outputs      []*Output                 `protobuf:"bytes,5,rep,name=outputs,proto3" json:"outputs,omitempty"`
	Fee          uint64                    `protobuf:"varint,6,opt,name=fee,proto3" json:"fee,omitempty"`
	Nullifiers   [][]byte                  `protobuf:"bytes,7,rep,name=nullifiers,proto3" json:"nullifiers,omitempty"`
	TxoRoot      []byte                    `protobuf:"bytes,8,opt,name=txo_root,json=txoRoot,proto3" json:"txo_root,omitempty"`
	MintKey      []byte                    `protobuf:"bytes,9,opt,name=mint_key,json=mintKey,proto3" json:"mint_key,omitempty"`
	Locktime     int64                     `protobuf:"varint,10,opt,name=locktime,proto3" json:"locktime,omitempty"`
	Signature    []byte                    `protobuf:"bytes,11,opt,name=signature,proto3" json:"signature,omitempty"`
	Proof        []byte                    `protobuf:"bytes,12,opt,name=proof,proto3" json:"proof,omitempty"`
	// contains filtered or unexported fields
}

func (*MintTransaction) Descriptor deprecated

func (*MintTransaction) Descriptor() ([]byte, []int)

Deprecated: Use MintTransaction.ProtoReflect.Descriptor instead.

func (*MintTransaction) Deserialize

func (tx *MintTransaction) Deserialize(data []byte) error

func (*MintTransaction) GetAsset_ID

func (x *MintTransaction) GetAsset_ID() []byte

func (*MintTransaction) GetDocumentHash

func (x *MintTransaction) GetDocumentHash() []byte

func (*MintTransaction) GetFee

func (x *MintTransaction) GetFee() uint64

func (*MintTransaction) GetLocktime

func (x *MintTransaction) GetLocktime() int64

func (*MintTransaction) GetMintKey

func (x *MintTransaction) GetMintKey() []byte

func (*MintTransaction) GetNewTokens

func (x *MintTransaction) GetNewTokens() uint64

func (*MintTransaction) GetNullifiers

func (x *MintTransaction) GetNullifiers() [][]byte

func (*MintTransaction) GetOutputs

func (x *MintTransaction) GetOutputs() []*Output

func (*MintTransaction) GetProof

func (x *MintTransaction) GetProof() []byte

func (*MintTransaction) GetSignature

func (x *MintTransaction) GetSignature() []byte

func (*MintTransaction) GetTxoRoot

func (x *MintTransaction) GetTxoRoot() []byte

func (*MintTransaction) GetType

func (*MintTransaction) ID

func (tx *MintTransaction) ID() types.ID

func (*MintTransaction) MarshalJSON

func (tx *MintTransaction) MarshalJSON() ([]byte, error)

func (*MintTransaction) ProtoMessage

func (*MintTransaction) ProtoMessage()

func (*MintTransaction) ProtoReflect

func (x *MintTransaction) ProtoReflect() protoreflect.Message

func (*MintTransaction) Reset

func (x *MintTransaction) Reset()

func (*MintTransaction) Serialize

func (tx *MintTransaction) Serialize() ([]byte, error)

func (*MintTransaction) SigHash

func (tx *MintTransaction) SigHash() ([]byte, error)

func (*MintTransaction) String

func (x *MintTransaction) String() string

func (*MintTransaction) UnmarshalJSON

func (tx *MintTransaction) UnmarshalJSON(data []byte) error

type MintTransaction_AssetType

type MintTransaction_AssetType int32
const (
	MintTransaction_FIXED_SUPPLY    MintTransaction_AssetType = 0
	MintTransaction_VARIABLE_SUPPLY MintTransaction_AssetType = 1
)

func (MintTransaction_AssetType) Descriptor

func (MintTransaction_AssetType) Enum

func (MintTransaction_AssetType) EnumDescriptor deprecated

func (MintTransaction_AssetType) EnumDescriptor() ([]byte, []int)

Deprecated: Use MintTransaction_AssetType.Descriptor instead.

func (MintTransaction_AssetType) Number

func (MintTransaction_AssetType) String

func (x MintTransaction_AssetType) String() string

func (MintTransaction_AssetType) Type

type Output

type Output struct {
	Commitment []byte `protobuf:"bytes,1,opt,name=commitment,proto3" json:"commitment,omitempty"`
	Ciphertext []byte `protobuf:"bytes,2,opt,name=ciphertext,proto3" json:"ciphertext,omitempty"`
	// contains filtered or unexported fields
}

func (*Output) Descriptor deprecated

func (*Output) Descriptor() ([]byte, []int)

Deprecated: Use Output.ProtoReflect.Descriptor instead.

func (*Output) GetCiphertext

func (x *Output) GetCiphertext() []byte

func (*Output) GetCommitment

func (x *Output) GetCommitment() []byte

func (*Output) MarshalJSON

func (out *Output) MarshalJSON() ([]byte, error)

func (*Output) ProtoMessage

func (*Output) ProtoMessage()

func (*Output) ProtoReflect

func (x *Output) ProtoReflect() protoreflect.Message

func (*Output) Reset

func (x *Output) Reset()

func (*Output) String

func (x *Output) String() string

func (*Output) UnmarshalJSON

func (out *Output) UnmarshalJSON(data []byte) error

type StakeTransaction

type StakeTransaction struct {
	Validator_ID []byte `protobuf:"bytes,1,opt,name=validator_ID,json=validatorID,proto3" json:"validator_ID,omitempty"`
	Amount       uint64 `protobuf:"varint,2,opt,name=amount,proto3" json:"amount,omitempty"`
	Nullifier    []byte `protobuf:"bytes,3,opt,name=nullifier,proto3" json:"nullifier,omitempty"`
	TxoRoot      []byte `protobuf:"bytes,4,opt,name=txo_root,json=txoRoot,proto3" json:"txo_root,omitempty"`
	Locktime     int64  `protobuf:"varint,5,opt,name=locktime,proto3" json:"locktime,omitempty"`
	Signature    []byte `protobuf:"bytes,6,opt,name=signature,proto3" json:"signature,omitempty"`
	Proof        []byte `protobuf:"bytes,7,opt,name=proof,proto3" json:"proof,omitempty"`
	// contains filtered or unexported fields
}

func (*StakeTransaction) Descriptor deprecated

func (*StakeTransaction) Descriptor() ([]byte, []int)

Deprecated: Use StakeTransaction.ProtoReflect.Descriptor instead.

func (*StakeTransaction) Deserialize

func (tx *StakeTransaction) Deserialize(data []byte) error

func (*StakeTransaction) GetAmount

func (x *StakeTransaction) GetAmount() uint64

func (*StakeTransaction) GetLocktime

func (x *StakeTransaction) GetLocktime() int64

func (*StakeTransaction) GetNullifier

func (x *StakeTransaction) GetNullifier() []byte

func (*StakeTransaction) GetProof

func (x *StakeTransaction) GetProof() []byte

func (*StakeTransaction) GetSignature

func (x *StakeTransaction) GetSignature() []byte

func (*StakeTransaction) GetTxoRoot

func (x *StakeTransaction) GetTxoRoot() []byte

func (*StakeTransaction) GetValidator_ID

func (x *StakeTransaction) GetValidator_ID() []byte

func (*StakeTransaction) ID

func (tx *StakeTransaction) ID() types.ID

func (*StakeTransaction) MarshalJSON

func (tx *StakeTransaction) MarshalJSON() ([]byte, error)

func (*StakeTransaction) ProtoMessage

func (*StakeTransaction) ProtoMessage()

func (*StakeTransaction) ProtoReflect

func (x *StakeTransaction) ProtoReflect() protoreflect.Message

func (*StakeTransaction) Reset

func (x *StakeTransaction) Reset()

func (*StakeTransaction) Serialize

func (tx *StakeTransaction) Serialize() ([]byte, error)

func (*StakeTransaction) SigHash

func (tx *StakeTransaction) SigHash() ([]byte, error)

func (*StakeTransaction) String

func (x *StakeTransaction) String() string

func (*StakeTransaction) UnmarshalJSON

func (tx *StakeTransaction) UnmarshalJSON(data []byte) error

type StandardTransaction

type StandardTransaction struct {
	Outputs    []*Output `protobuf:"bytes,1,rep,name=outputs,proto3" json:"outputs,omitempty"`
	Nullifiers [][]byte  `protobuf:"bytes,2,rep,name=nullifiers,proto3" json:"nullifiers,omitempty"`
	TxoRoot    []byte    `protobuf:"bytes,3,opt,name=txo_root,json=txoRoot,proto3" json:"txo_root,omitempty"`
	Locktime   int64     `protobuf:"varint,4,opt,name=locktime,proto3" json:"locktime,omitempty"`
	Fee        uint64    `protobuf:"varint,5,opt,name=fee,proto3" json:"fee,omitempty"`
	Proof      []byte    `protobuf:"bytes,6,opt,name=proof,proto3" json:"proof,omitempty"`
	// contains filtered or unexported fields
}

func (*StandardTransaction) Descriptor deprecated

func (*StandardTransaction) Descriptor() ([]byte, []int)

Deprecated: Use StandardTransaction.ProtoReflect.Descriptor instead.

func (*StandardTransaction) Deserialize

func (tx *StandardTransaction) Deserialize(data []byte) error

func (*StandardTransaction) GetFee

func (x *StandardTransaction) GetFee() uint64

func (*StandardTransaction) GetLocktime

func (x *StandardTransaction) GetLocktime() int64

func (*StandardTransaction) GetNullifiers

func (x *StandardTransaction) GetNullifiers() [][]byte

func (*StandardTransaction) GetOutputs

func (x *StandardTransaction) GetOutputs() []*Output

func (*StandardTransaction) GetProof

func (x *StandardTransaction) GetProof() []byte

func (*StandardTransaction) GetTxoRoot

func (x *StandardTransaction) GetTxoRoot() []byte

func (*StandardTransaction) ID

func (tx *StandardTransaction) ID() types.ID

func (*StandardTransaction) MarshalJSON

func (tx *StandardTransaction) MarshalJSON() ([]byte, error)

func (*StandardTransaction) ProtoMessage

func (*StandardTransaction) ProtoMessage()

func (*StandardTransaction) ProtoReflect

func (x *StandardTransaction) ProtoReflect() protoreflect.Message

func (*StandardTransaction) Reset

func (x *StandardTransaction) Reset()

func (*StandardTransaction) Serialize

func (tx *StandardTransaction) Serialize() ([]byte, error)

func (*StandardTransaction) SigHash

func (tx *StandardTransaction) SigHash() ([]byte, error)

func (*StandardTransaction) String

func (x *StandardTransaction) String() string

func (*StandardTransaction) UnmarshalJSON

func (tx *StandardTransaction) UnmarshalJSON(data []byte) error

type Transaction

type Transaction struct {

	// Types that are assignable to Tx:
	//	*Transaction_StandardTransaction
	//	*Transaction_CoinbaseTransaction
	//	*Transaction_StakeTransaction
	//	*Transaction_TreasuryTransaction
	//	*Transaction_MintTransaction
	Tx isTransaction_Tx `protobuf_oneof:"Tx"`
	// contains filtered or unexported fields
}

func WrapTransaction

func WrapTransaction(tx interface{}) *Transaction

func (*Transaction) Descriptor deprecated

func (*Transaction) Descriptor() ([]byte, []int)

Deprecated: Use Transaction.ProtoReflect.Descriptor instead.

func (*Transaction) Deserialize

func (tx *Transaction) Deserialize(data []byte) error

func (*Transaction) GetCoinbaseTransaction

func (x *Transaction) GetCoinbaseTransaction() *CoinbaseTransaction

func (*Transaction) GetMintTransaction

func (x *Transaction) GetMintTransaction() *MintTransaction

func (*Transaction) GetStakeTransaction

func (x *Transaction) GetStakeTransaction() *StakeTransaction

func (*Transaction) GetStandardTransaction

func (x *Transaction) GetStandardTransaction() *StandardTransaction

func (*Transaction) GetTreasuryTransaction

func (x *Transaction) GetTreasuryTransaction() *TreasuryTransaction

func (*Transaction) GetTx

func (m *Transaction) GetTx() isTransaction_Tx

func (*Transaction) ID

func (tx *Transaction) ID() types.ID

func (*Transaction) MarshalJSON

func (tx *Transaction) MarshalJSON() ([]byte, error)

func (*Transaction) Nullifiers

func (tx *Transaction) Nullifiers() []types.Nullifier

func (*Transaction) Outputs

func (tx *Transaction) Outputs() []*Output

func (*Transaction) ProtoMessage

func (*Transaction) ProtoMessage()

func (*Transaction) ProtoReflect

func (x *Transaction) ProtoReflect() protoreflect.Message

func (*Transaction) Reset

func (x *Transaction) Reset()

func (*Transaction) Serialize

func (tx *Transaction) Serialize() ([]byte, error)

func (*Transaction) SerializedSize

func (tx *Transaction) SerializedSize() (int, error)

func (*Transaction) String

func (x *Transaction) String() string

func (*Transaction) UID

func (tx *Transaction) UID() types.ID

func (*Transaction) UnmarshalJSON

func (tx *Transaction) UnmarshalJSON(data []byte) error

func (*Transaction) WID

func (tx *Transaction) WID() types.ID

type Transaction_CoinbaseTransaction

type Transaction_CoinbaseTransaction struct {
	CoinbaseTransaction *CoinbaseTransaction `protobuf:"bytes,2,opt,name=coinbase_transaction,json=coinbaseTransaction,proto3,oneof"`
}

type Transaction_MintTransaction

type Transaction_MintTransaction struct {
	MintTransaction *MintTransaction `protobuf:"bytes,5,opt,name=mint_transaction,json=mintTransaction,proto3,oneof"`
}

type Transaction_StakeTransaction

type Transaction_StakeTransaction struct {
	StakeTransaction *StakeTransaction `protobuf:"bytes,3,opt,name=stake_transaction,json=stakeTransaction,proto3,oneof"`
}

type Transaction_StandardTransaction

type Transaction_StandardTransaction struct {
	StandardTransaction *StandardTransaction `protobuf:"bytes,1,opt,name=standard_transaction,json=standardTransaction,proto3,oneof"`
}

type Transaction_TreasuryTransaction

type Transaction_TreasuryTransaction struct {
	TreasuryTransaction *TreasuryTransaction `protobuf:"bytes,4,opt,name=treasury_transaction,json=treasuryTransaction,proto3,oneof"`
}

type TreasuryTransaction

type TreasuryTransaction struct {
	Amount       uint64    `protobuf:"varint,1,opt,name=amount,proto3" json:"amount,omitempty"`
	Outputs      []*Output `protobuf:"bytes,2,rep,name=outputs,proto3" json:"outputs,omitempty"`
	ProposalHash []byte    `protobuf:"bytes,3,opt,name=proposal_hash,json=proposalHash,proto3" json:"proposal_hash,omitempty"`
	Proof        []byte    `protobuf:"bytes,4,opt,name=proof,proto3" json:"proof,omitempty"`
	// contains filtered or unexported fields
}

func (*TreasuryTransaction) Descriptor deprecated

func (*TreasuryTransaction) Descriptor() ([]byte, []int)

Deprecated: Use TreasuryTransaction.ProtoReflect.Descriptor instead.

func (*TreasuryTransaction) Deserialize

func (tx *TreasuryTransaction) Deserialize(data []byte) error

func (*TreasuryTransaction) GetAmount

func (x *TreasuryTransaction) GetAmount() uint64

func (*TreasuryTransaction) GetOutputs

func (x *TreasuryTransaction) GetOutputs() []*Output

func (*TreasuryTransaction) GetProof

func (x *TreasuryTransaction) GetProof() []byte

func (*TreasuryTransaction) GetProposalHash

func (x *TreasuryTransaction) GetProposalHash() []byte

func (*TreasuryTransaction) ID

func (tx *TreasuryTransaction) ID() types.ID

func (*TreasuryTransaction) MarshalJSON

func (tx *TreasuryTransaction) MarshalJSON() ([]byte, error)

func (*TreasuryTransaction) ProtoMessage

func (*TreasuryTransaction) ProtoMessage()

func (*TreasuryTransaction) ProtoReflect

func (x *TreasuryTransaction) ProtoReflect() protoreflect.Message

func (*TreasuryTransaction) Reset

func (x *TreasuryTransaction) Reset()

func (*TreasuryTransaction) Serialize

func (tx *TreasuryTransaction) Serialize() ([]byte, error)

func (*TreasuryTransaction) SigHash

func (tx *TreasuryTransaction) SigHash() ([]byte, error)

func (*TreasuryTransaction) String

func (x *TreasuryTransaction) String() string

func (*TreasuryTransaction) UnmarshalJSON

func (tx *TreasuryTransaction) UnmarshalJSON(data []byte) error

Jump to

Keyboard shortcuts

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