neo

package
v0.0.1-gowrapper-test Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2025 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

This section is empty.

Types

type OutputAddress

type OutputAddress struct {

	// Amount (as string)
	Amount int64 `protobuf:"zigzag64,1,opt,name=amount,proto3" json:"amount,omitempty"`
	// destination address
	ToAddress string `protobuf:"bytes,2,opt,name=to_address,json=toAddress,proto3" json:"to_address,omitempty"`
	// contains filtered or unexported fields
}

extra address of Output

func (*OutputAddress) Descriptor deprecated

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

Deprecated: Use OutputAddress.ProtoReflect.Descriptor instead.

func (*OutputAddress) GetAmount

func (x *OutputAddress) GetAmount() int64

func (*OutputAddress) GetToAddress

func (x *OutputAddress) GetToAddress() string

func (*OutputAddress) ProtoMessage

func (*OutputAddress) ProtoMessage()

func (*OutputAddress) ProtoReflect

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

func (*OutputAddress) Reset

func (x *OutputAddress) Reset()

func (*OutputAddress) String

func (x *OutputAddress) String() string

type SigningInput

type SigningInput struct {

	// Available transaction inputs
	Inputs []*TransactionInput `protobuf:"bytes,1,rep,name=inputs,proto3" json:"inputs,omitempty"`
	// Transaction outputs
	Outputs []*TransactionOutput `protobuf:"bytes,2,rep,name=outputs,proto3" json:"outputs,omitempty"`
	// The secret private key used for signing (32 bytes).
	PrivateKey []byte `protobuf:"bytes,3,opt,name=private_key,json=privateKey,proto3" json:"private_key,omitempty"`
	// Fee
	Fee int64 `protobuf:"varint,4,opt,name=fee,proto3" json:"fee,omitempty"`
	// Asset ID for gas
	GasAssetId string `protobuf:"bytes,5,opt,name=gas_asset_id,json=gasAssetId,proto3" json:"gas_asset_id,omitempty"`
	// Address for the change
	GasChangeAddress string `protobuf:"bytes,6,opt,name=gas_change_address,json=gasChangeAddress,proto3" json:"gas_change_address,omitempty"`
	// Optional transaction plan (if missing it will be computed)
	Plan        *TransactionPlan `protobuf:"bytes,7,opt,name=plan,proto3" json:"plan,omitempty"`
	Transaction *Transaction     `protobuf:"bytes,8,opt,name=transaction,proto3" json:"transaction,omitempty"`
	// contains filtered or unexported fields
}

Input data necessary to create a signed transaction.

func (*SigningInput) Descriptor deprecated

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

Deprecated: Use SigningInput.ProtoReflect.Descriptor instead.

func (*SigningInput) GetFee

func (x *SigningInput) GetFee() int64

func (*SigningInput) GetGasAssetId

func (x *SigningInput) GetGasAssetId() string

func (*SigningInput) GetGasChangeAddress

func (x *SigningInput) GetGasChangeAddress() string

func (*SigningInput) GetInputs

func (x *SigningInput) GetInputs() []*TransactionInput

func (*SigningInput) GetOutputs

func (x *SigningInput) GetOutputs() []*TransactionOutput

func (*SigningInput) GetPlan

func (x *SigningInput) GetPlan() *TransactionPlan

func (*SigningInput) GetPrivateKey

func (x *SigningInput) GetPrivateKey() []byte

func (*SigningInput) GetTransaction

func (x *SigningInput) GetTransaction() *Transaction

func (*SigningInput) ProtoMessage

func (*SigningInput) ProtoMessage()

func (*SigningInput) ProtoReflect

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

func (*SigningInput) Reset

func (x *SigningInput) Reset()

func (*SigningInput) String

func (x *SigningInput) String() string

type SigningOutput

type SigningOutput struct {

	// Signed and encoded transaction bytes.
	Encoded []byte `protobuf:"bytes,1,opt,name=encoded,proto3" json:"encoded,omitempty"`
	// Optional error
	Error common.SigningError `protobuf:"varint,2,opt,name=error,proto3,enum=TW.Common.Proto.SigningError" json:"error,omitempty"`
	// error code description
	ErrorMessage string `protobuf:"bytes,3,opt,name=error_message,json=errorMessage,proto3" json:"error_message,omitempty"`
	// contains filtered or unexported fields
}

Result containing the signed and encoded transaction.

func (*SigningOutput) Descriptor deprecated

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

Deprecated: Use SigningOutput.ProtoReflect.Descriptor instead.

func (*SigningOutput) GetEncoded

func (x *SigningOutput) GetEncoded() []byte

func (*SigningOutput) GetError

func (x *SigningOutput) GetError() common.SigningError

func (*SigningOutput) GetErrorMessage

func (x *SigningOutput) GetErrorMessage() string

func (*SigningOutput) ProtoMessage

func (*SigningOutput) ProtoMessage()

func (*SigningOutput) ProtoReflect

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

func (*SigningOutput) Reset

func (x *SigningOutput) Reset()

func (*SigningOutput) String

func (x *SigningOutput) String() string

type Transaction

type Transaction struct {

	// Types that are valid to be assigned to TransactionOneof:
	//
	//	*Transaction_Nep5Transfer_
	//	*Transaction_InvocationGeneric_
	TransactionOneof isTransaction_TransactionOneof `protobuf_oneof:"transaction_oneof"`
	// contains filtered or unexported fields
}

Transaction

func (*Transaction) Descriptor deprecated

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

Deprecated: Use Transaction.ProtoReflect.Descriptor instead.

func (*Transaction) GetInvocationGeneric

func (x *Transaction) GetInvocationGeneric() *Transaction_InvocationGeneric

func (*Transaction) GetNep5Transfer

func (x *Transaction) GetNep5Transfer() *Transaction_Nep5Transfer

func (*Transaction) GetTransactionOneof

func (x *Transaction) GetTransactionOneof() isTransaction_TransactionOneof

func (*Transaction) ProtoMessage

func (*Transaction) ProtoMessage()

func (*Transaction) ProtoReflect

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

func (*Transaction) Reset

func (x *Transaction) Reset()

func (*Transaction) String

func (x *Transaction) String() string

type TransactionAttributePlan

type TransactionAttributePlan struct {
	Usage int32  `protobuf:"varint,1,opt,name=usage,proto3" json:"usage,omitempty"`
	Data  []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
	// contains filtered or unexported fields
}

func (*TransactionAttributePlan) Descriptor deprecated

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

Deprecated: Use TransactionAttributePlan.ProtoReflect.Descriptor instead.

func (*TransactionAttributePlan) GetData

func (x *TransactionAttributePlan) GetData() []byte

func (*TransactionAttributePlan) GetUsage

func (x *TransactionAttributePlan) GetUsage() int32

func (*TransactionAttributePlan) ProtoMessage

func (*TransactionAttributePlan) ProtoMessage()

func (*TransactionAttributePlan) ProtoReflect

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

func (*TransactionAttributePlan) Reset

func (x *TransactionAttributePlan) Reset()

func (*TransactionAttributePlan) String

func (x *TransactionAttributePlan) String() string

type TransactionInput

type TransactionInput struct {

	// Previous tx hash
	PrevHash []byte `protobuf:"bytes,1,opt,name=prev_hash,json=prevHash,proto3" json:"prev_hash,omitempty"`
	// Output index
	PrevIndex uint32 `protobuf:"fixed32,2,opt,name=prev_index,json=prevIndex,proto3" json:"prev_index,omitempty"`
	// unspent value of UTXO
	Value int64 `protobuf:"varint,3,opt,name=value,proto3" json:"value,omitempty"`
	// Asset
	AssetId string `protobuf:"bytes,4,opt,name=asset_id,json=assetId,proto3" json:"asset_id,omitempty"`
	// contains filtered or unexported fields
}

Input for a transaction (output of a prev tx)

func (*TransactionInput) Descriptor deprecated

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

Deprecated: Use TransactionInput.ProtoReflect.Descriptor instead.

func (*TransactionInput) GetAssetId

func (x *TransactionInput) GetAssetId() string

func (*TransactionInput) GetPrevHash

func (x *TransactionInput) GetPrevHash() []byte

func (*TransactionInput) GetPrevIndex

func (x *TransactionInput) GetPrevIndex() uint32

func (*TransactionInput) GetValue

func (x *TransactionInput) GetValue() int64

func (*TransactionInput) ProtoMessage

func (*TransactionInput) ProtoMessage()

func (*TransactionInput) ProtoReflect

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

func (*TransactionInput) Reset

func (x *TransactionInput) Reset()

func (*TransactionInput) String

func (x *TransactionInput) String() string

type TransactionOutput

type TransactionOutput struct {

	// Asset
	AssetId string `protobuf:"bytes,1,opt,name=asset_id,json=assetId,proto3" json:"asset_id,omitempty"`
	// Amount (as string)
	Amount int64 `protobuf:"zigzag64,2,opt,name=amount,proto3" json:"amount,omitempty"`
	// destination address
	ToAddress string `protobuf:"bytes,3,opt,name=to_address,json=toAddress,proto3" json:"to_address,omitempty"`
	// change address
	ChangeAddress string `protobuf:"bytes,4,opt,name=change_address,json=changeAddress,proto3" json:"change_address,omitempty"`
	// extra output
	ExtraOutputs []*OutputAddress `protobuf:"bytes,5,rep,name=extra_outputs,json=extraOutputs,proto3" json:"extra_outputs,omitempty"`
	// contains filtered or unexported fields
}

Output of a transaction

func (*TransactionOutput) Descriptor deprecated

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

Deprecated: Use TransactionOutput.ProtoReflect.Descriptor instead.

func (*TransactionOutput) GetAmount

func (x *TransactionOutput) GetAmount() int64

func (*TransactionOutput) GetAssetId

func (x *TransactionOutput) GetAssetId() string

func (*TransactionOutput) GetChangeAddress

func (x *TransactionOutput) GetChangeAddress() string

func (*TransactionOutput) GetExtraOutputs

func (x *TransactionOutput) GetExtraOutputs() []*OutputAddress

func (*TransactionOutput) GetToAddress

func (x *TransactionOutput) GetToAddress() string

func (*TransactionOutput) ProtoMessage

func (*TransactionOutput) ProtoMessage()

func (*TransactionOutput) ProtoReflect

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

func (*TransactionOutput) Reset

func (x *TransactionOutput) Reset()

func (*TransactionOutput) String

func (x *TransactionOutput) String() string

type TransactionOutputPlan

type TransactionOutputPlan struct {

	// Amount to be received at the other end.
	Amount int64 `protobuf:"varint,1,opt,name=amount,proto3" json:"amount,omitempty"`
	// Maximum available amount.
	AvailableAmount int64 `protobuf:"varint,2,opt,name=available_amount,json=availableAmount,proto3" json:"available_amount,omitempty"`
	// Amount that is left as change
	Change int64 `protobuf:"varint,3,opt,name=change,proto3" json:"change,omitempty"`
	// Asset
	AssetId string `protobuf:"bytes,4,opt,name=asset_id,json=assetId,proto3" json:"asset_id,omitempty"`
	// Destination address
	ToAddress string `protobuf:"bytes,5,opt,name=to_address,json=toAddress,proto3" json:"to_address,omitempty"`
	// Address for the change
	ChangeAddress string `protobuf:"bytes,6,opt,name=change_address,json=changeAddress,proto3" json:"change_address,omitempty"`
	// extra output
	ExtraOutputs []*OutputAddress `protobuf:"bytes,7,rep,name=extra_outputs,json=extraOutputs,proto3" json:"extra_outputs,omitempty"`
	// contains filtered or unexported fields
}

Describes a preliminary transaction output plan.

func (*TransactionOutputPlan) Descriptor deprecated

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

Deprecated: Use TransactionOutputPlan.ProtoReflect.Descriptor instead.

func (*TransactionOutputPlan) GetAmount

func (x *TransactionOutputPlan) GetAmount() int64

func (*TransactionOutputPlan) GetAssetId

func (x *TransactionOutputPlan) GetAssetId() string

func (*TransactionOutputPlan) GetAvailableAmount

func (x *TransactionOutputPlan) GetAvailableAmount() int64

func (*TransactionOutputPlan) GetChange

func (x *TransactionOutputPlan) GetChange() int64

func (*TransactionOutputPlan) GetChangeAddress

func (x *TransactionOutputPlan) GetChangeAddress() string

func (*TransactionOutputPlan) GetExtraOutputs

func (x *TransactionOutputPlan) GetExtraOutputs() []*OutputAddress

func (*TransactionOutputPlan) GetToAddress

func (x *TransactionOutputPlan) GetToAddress() string

func (*TransactionOutputPlan) ProtoMessage

func (*TransactionOutputPlan) ProtoMessage()

func (*TransactionOutputPlan) ProtoReflect

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

func (*TransactionOutputPlan) Reset

func (x *TransactionOutputPlan) Reset()

func (*TransactionOutputPlan) String

func (x *TransactionOutputPlan) String() string

type TransactionPlan

type TransactionPlan struct {

	// Used assets
	Outputs []*TransactionOutputPlan `protobuf:"bytes,1,rep,name=outputs,proto3" json:"outputs,omitempty"`
	// Selected unspent transaction outputs.
	Inputs []*TransactionInput `protobuf:"bytes,2,rep,name=inputs,proto3" json:"inputs,omitempty"`
	// GAS used
	Fee int64 `protobuf:"varint,3,opt,name=fee,proto3" json:"fee,omitempty"`
	// Optional error
	Error common.SigningError `protobuf:"varint,4,opt,name=error,proto3,enum=TW.Common.Proto.SigningError" json:"error,omitempty"`
	// Attribute
	Attributes []*TransactionAttributePlan `protobuf:"bytes,5,rep,name=attributes,proto3" json:"attributes,omitempty"`
	// contains filtered or unexported fields
}

Describes a preliminary transaction plan.

func (*TransactionPlan) Descriptor deprecated

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

Deprecated: Use TransactionPlan.ProtoReflect.Descriptor instead.

func (*TransactionPlan) GetAttributes

func (x *TransactionPlan) GetAttributes() []*TransactionAttributePlan

func (*TransactionPlan) GetError

func (x *TransactionPlan) GetError() common.SigningError

func (*TransactionPlan) GetFee

func (x *TransactionPlan) GetFee() int64

func (*TransactionPlan) GetInputs

func (x *TransactionPlan) GetInputs() []*TransactionInput

func (*TransactionPlan) GetOutputs

func (x *TransactionPlan) GetOutputs() []*TransactionOutputPlan

func (*TransactionPlan) ProtoMessage

func (*TransactionPlan) ProtoMessage()

func (*TransactionPlan) ProtoReflect

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

func (*TransactionPlan) Reset

func (x *TransactionPlan) Reset()

func (*TransactionPlan) String

func (x *TransactionPlan) String() string

type Transaction_InvocationGeneric

type Transaction_InvocationGeneric struct {

	// gas to use
	Gas uint64 `protobuf:"varint,1,opt,name=gas,proto3" json:"gas,omitempty"`
	// Contract call payload data
	Script []byte `protobuf:"bytes,2,opt,name=script,proto3" json:"script,omitempty"`
	// contains filtered or unexported fields
}

Generic invocation transaction

func (*Transaction_InvocationGeneric) Descriptor deprecated

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

Deprecated: Use Transaction_InvocationGeneric.ProtoReflect.Descriptor instead.

func (*Transaction_InvocationGeneric) GetGas

func (*Transaction_InvocationGeneric) GetScript

func (x *Transaction_InvocationGeneric) GetScript() []byte

func (*Transaction_InvocationGeneric) ProtoMessage

func (*Transaction_InvocationGeneric) ProtoMessage()

func (*Transaction_InvocationGeneric) ProtoReflect

func (*Transaction_InvocationGeneric) Reset

func (x *Transaction_InvocationGeneric) Reset()

func (*Transaction_InvocationGeneric) String

type Transaction_InvocationGeneric_

type Transaction_InvocationGeneric_ struct {
	InvocationGeneric *Transaction_InvocationGeneric `protobuf:"bytes,2,opt,name=invocation_generic,json=invocationGeneric,proto3,oneof"`
}

type Transaction_Nep5Transfer

type Transaction_Nep5Transfer struct {
	AssetId string `protobuf:"bytes,1,opt,name=asset_id,json=assetId,proto3" json:"asset_id,omitempty"`
	From    string `protobuf:"bytes,2,opt,name=from,proto3" json:"from,omitempty"`
	To      string `protobuf:"bytes,3,opt,name=to,proto3" json:"to,omitempty"`
	// Amount to send (256-bit number)
	Amount []byte `protobuf:"bytes,4,opt,name=amount,proto3" json:"amount,omitempty"`
	// determine if putting THROWIFNOT & RET instructions
	ScriptWithRet bool `protobuf:"varint,5,opt,name=script_with_ret,json=scriptWithRet,proto3" json:"script_with_ret,omitempty"`
	// contains filtered or unexported fields
}

nep5 token transfer transaction

func (*Transaction_Nep5Transfer) Descriptor deprecated

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

Deprecated: Use Transaction_Nep5Transfer.ProtoReflect.Descriptor instead.

func (*Transaction_Nep5Transfer) GetAmount

func (x *Transaction_Nep5Transfer) GetAmount() []byte

func (*Transaction_Nep5Transfer) GetAssetId

func (x *Transaction_Nep5Transfer) GetAssetId() string

func (*Transaction_Nep5Transfer) GetFrom

func (x *Transaction_Nep5Transfer) GetFrom() string

func (*Transaction_Nep5Transfer) GetScriptWithRet

func (x *Transaction_Nep5Transfer) GetScriptWithRet() bool

func (*Transaction_Nep5Transfer) GetTo

func (x *Transaction_Nep5Transfer) GetTo() string

func (*Transaction_Nep5Transfer) ProtoMessage

func (*Transaction_Nep5Transfer) ProtoMessage()

func (*Transaction_Nep5Transfer) ProtoReflect

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

func (*Transaction_Nep5Transfer) Reset

func (x *Transaction_Nep5Transfer) Reset()

func (*Transaction_Nep5Transfer) String

func (x *Transaction_Nep5Transfer) String() string

type Transaction_Nep5Transfer_

type Transaction_Nep5Transfer_ struct {
	Nep5Transfer *Transaction_Nep5Transfer `protobuf:"bytes,1,opt,name=nep5_transfer,json=nep5Transfer,proto3,oneof"`
}

Jump to

Keyboard shortcuts

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