java

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: May 24, 2023 License: Apache-2.0 Imports: 10 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

View Source
var InvalidTransactionRecord_ErrType_name = map[int32]string{
	0: "OUTOFBALANCE",
	1: "SIGFAILED",
	2: "INVOKE_CONTRACT_FAILED",
	3: "DEPLOY_CONTRACT_FAILED",
	4: "INVALID_PERMISSION",
}
View Source
var InvalidTransactionRecord_ErrType_value = map[string]int32{
	"OUTOFBALANCE":           0,
	"SIGFAILED":              1,
	"INVOKE_CONTRACT_FAILED": 2,
	"DEPLOY_CONTRACT_FAILED": 3,
	"INVALID_PERMISSION":     4,
}
View Source
var TransactionValue_Opcode_name = map[int32]string{
	0:   "NORMAL",
	1:   "UPDATE",
	2:   "FREEZE",
	3:   "UNFREEZE",
	4:   "SKIPVM",
	100: "ARCHIVE",
}
View Source
var TransactionValue_Opcode_value = map[string]int32{
	"NORMAL":   0,
	"UPDATE":   1,
	"FREEZE":   2,
	"UNFREEZE": 3,
	"SKIPVM":   4,
	"ARCHIVE":  100,
}
View Source
var TransactionValue_VmType_name = map[int32]string{
	0: "EVM",
	1: "JVM",
}
View Source
var TransactionValue_VmType_value = map[string]int32{
	"EVM": 0,
	"JVM": 1,
}

Functions

func DecodeJavaLog

func DecodeJavaLog(data string) (string, error)

DecodeJavaLog decode the log value of a contract to string

func DecodeJavaResult

func DecodeJavaResult(ret string) string

DecodeJavaResult decodes the return value of a java contract to string

func EncodeJavaFunc

func EncodeJavaFunc(methodName string, params ...string) []byte

EncodeJavaFunc encodes method and params to invoke contract

func ReadJavaContract

func ReadJavaContract(path string, params ...string) (string, error)

ReadJavaContract read compiled java contract from the given path and return the payload used to deploy params indicates the constructor params

Types

type InvalidTransactionRecord

type InvalidTransactionRecord struct {
	Tx                   *Transaction                     `protobuf:"bytes,1,opt,name=tx,proto3" json:"tx,omitempty"`
	ErrType              InvalidTransactionRecord_ErrType `protobuf:"varint,2,opt,name=errType,proto3,enum=proto.InvalidTransactionRecord_ErrType" json:"errType,omitempty"`
	ErrMsg               []byte                           `protobuf:"bytes,3,opt,name=errMsg,proto3" json:"errMsg,omitempty"`
	XXX_NoUnkeyedLiteral struct{}                         `json:"-"`
	XXX_unrecognized     []byte                           `json:"-"`
	XXX_sizecache        int32                            `json:"-"`
}

func (*InvalidTransactionRecord) Descriptor

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

func (*InvalidTransactionRecord) GetErrMsg

func (m *InvalidTransactionRecord) GetErrMsg() []byte

func (*InvalidTransactionRecord) GetErrType

func (*InvalidTransactionRecord) GetTx

func (*InvalidTransactionRecord) ProtoMessage

func (*InvalidTransactionRecord) ProtoMessage()

func (*InvalidTransactionRecord) Reset

func (m *InvalidTransactionRecord) Reset()

func (*InvalidTransactionRecord) String

func (m *InvalidTransactionRecord) String() string

func (*InvalidTransactionRecord) XXX_DiscardUnknown

func (m *InvalidTransactionRecord) XXX_DiscardUnknown()

func (*InvalidTransactionRecord) XXX_Marshal

func (m *InvalidTransactionRecord) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*InvalidTransactionRecord) XXX_Merge

func (dst *InvalidTransactionRecord) XXX_Merge(src proto.Message)

func (*InvalidTransactionRecord) XXX_Size

func (m *InvalidTransactionRecord) XXX_Size() int

func (*InvalidTransactionRecord) XXX_Unmarshal

func (m *InvalidTransactionRecord) XXX_Unmarshal(b []byte) error

type InvalidTransactionRecord_ErrType

type InvalidTransactionRecord_ErrType int32
const (
	InvalidTransactionRecord_OUTOFBALANCE           InvalidTransactionRecord_ErrType = 0
	InvalidTransactionRecord_SIGFAILED              InvalidTransactionRecord_ErrType = 1
	InvalidTransactionRecord_INVOKE_CONTRACT_FAILED InvalidTransactionRecord_ErrType = 2
	InvalidTransactionRecord_DEPLOY_CONTRACT_FAILED InvalidTransactionRecord_ErrType = 3
	InvalidTransactionRecord_INVALID_PERMISSION     InvalidTransactionRecord_ErrType = 4
)

func (InvalidTransactionRecord_ErrType) EnumDescriptor

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

func (InvalidTransactionRecord_ErrType) String

type InvalidTransactionRecords

type InvalidTransactionRecords struct {
	Records              []*InvalidTransactionRecord `protobuf:"bytes,1,rep,name=records,proto3" json:"records,omitempty"`
	XXX_NoUnkeyedLiteral struct{}                    `json:"-"`
	XXX_unrecognized     []byte                      `json:"-"`
	XXX_sizecache        int32                       `json:"-"`
}

func (*InvalidTransactionRecords) Descriptor

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

func (*InvalidTransactionRecords) GetRecords

func (*InvalidTransactionRecords) ProtoMessage

func (*InvalidTransactionRecords) ProtoMessage()

func (*InvalidTransactionRecords) Reset

func (m *InvalidTransactionRecords) Reset()

func (*InvalidTransactionRecords) String

func (m *InvalidTransactionRecords) String() string

func (*InvalidTransactionRecords) XXX_DiscardUnknown

func (m *InvalidTransactionRecords) XXX_DiscardUnknown()

func (*InvalidTransactionRecords) XXX_Marshal

func (m *InvalidTransactionRecords) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*InvalidTransactionRecords) XXX_Merge

func (dst *InvalidTransactionRecords) XXX_Merge(src proto.Message)

func (*InvalidTransactionRecords) XXX_Size

func (m *InvalidTransactionRecords) XXX_Size() int

func (*InvalidTransactionRecords) XXX_Unmarshal

func (m *InvalidTransactionRecords) XXX_Unmarshal(b []byte) error

type InvokeArgs

type InvokeArgs struct {
	Code                 []byte   `protobuf:"bytes,1,opt,name=code,proto3" json:"code,omitempty"`
	MethodName           string   `protobuf:"bytes,2,opt,name=methodName,proto3" json:"methodName,omitempty"`
	Args                 [][]byte `protobuf:"bytes,3,rep,name=args,proto3" json:"args,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*InvokeArgs) Descriptor

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

func (*InvokeArgs) GetArgs

func (m *InvokeArgs) GetArgs() [][]byte

func (*InvokeArgs) GetCode

func (m *InvokeArgs) GetCode() []byte

func (*InvokeArgs) GetMethodName

func (m *InvokeArgs) GetMethodName() string

func (*InvokeArgs) ProtoMessage

func (*InvokeArgs) ProtoMessage()

func (*InvokeArgs) Reset

func (m *InvokeArgs) Reset()

func (*InvokeArgs) String

func (m *InvokeArgs) String() string

func (*InvokeArgs) XXX_DiscardUnknown

func (m *InvokeArgs) XXX_DiscardUnknown()

func (*InvokeArgs) XXX_Marshal

func (m *InvokeArgs) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*InvokeArgs) XXX_Merge

func (dst *InvokeArgs) XXX_Merge(src proto.Message)

func (*InvokeArgs) XXX_Size

func (m *InvokeArgs) XXX_Size() int

func (*InvokeArgs) XXX_Unmarshal

func (m *InvokeArgs) XXX_Unmarshal(b []byte) error

type NonHash

type NonHash struct {
	NodeHash             []byte   `protobuf:"bytes,1,opt,name=nodeHash,proto3" json:"nodeHash,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*NonHash) Descriptor

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

func (*NonHash) GetNodeHash

func (m *NonHash) GetNodeHash() []byte

func (*NonHash) ProtoMessage

func (*NonHash) ProtoMessage()

func (*NonHash) Reset

func (m *NonHash) Reset()

func (*NonHash) String

func (m *NonHash) String() string

func (*NonHash) XXX_DiscardUnknown

func (m *NonHash) XXX_DiscardUnknown()

func (*NonHash) XXX_Marshal

func (m *NonHash) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*NonHash) XXX_Merge

func (dst *NonHash) XXX_Merge(src proto.Message)

func (*NonHash) XXX_Size

func (m *NonHash) XXX_Size() int

func (*NonHash) XXX_Unmarshal

func (m *NonHash) XXX_Unmarshal(b []byte) error

type Transaction

type Transaction struct {
	Version              []byte   `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"`
	From                 []byte   `protobuf:"bytes,2,opt,name=from,proto3" json:"from,omitempty"`
	To                   []byte   `protobuf:"bytes,3,opt,name=to,proto3" json:"to,omitempty"`
	Value                []byte   `protobuf:"bytes,4,opt,name=value,proto3" json:"value,omitempty"`
	Timestamp            int64    `protobuf:"varint,5,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	Signature            []byte   `protobuf:"bytes,6,opt,name=signature,proto3" json:"signature,omitempty"`
	Id                   uint64   `protobuf:"varint,7,opt,name=id,proto3" json:"id,omitempty"`
	TransactionHash      []byte   `protobuf:"bytes,8,opt,name=transactionHash,proto3" json:"transactionHash,omitempty"`
	Nonce                int64    `protobuf:"varint,9,opt,name=nonce,proto3" json:"nonce,omitempty"`
	Other                *NonHash `protobuf:"bytes,10,opt,name=other,proto3" json:"other,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Transaction) Descriptor

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

func (*Transaction) GetFrom

func (m *Transaction) GetFrom() []byte

func (*Transaction) GetId

func (m *Transaction) GetId() uint64

func (*Transaction) GetNonce

func (m *Transaction) GetNonce() int64

func (*Transaction) GetOther

func (m *Transaction) GetOther() *NonHash

func (*Transaction) GetSignature

func (m *Transaction) GetSignature() []byte

func (*Transaction) GetTimestamp

func (m *Transaction) GetTimestamp() int64

func (*Transaction) GetTo

func (m *Transaction) GetTo() []byte

func (*Transaction) GetTransactionHash

func (m *Transaction) GetTransactionHash() []byte

func (*Transaction) GetValue

func (m *Transaction) GetValue() []byte

func (*Transaction) GetVersion

func (m *Transaction) GetVersion() []byte

func (*Transaction) ProtoMessage

func (*Transaction) ProtoMessage()

func (*Transaction) Reset

func (m *Transaction) Reset()

func (*Transaction) String

func (m *Transaction) String() string

func (*Transaction) XXX_DiscardUnknown

func (m *Transaction) XXX_DiscardUnknown()

func (*Transaction) XXX_Marshal

func (m *Transaction) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Transaction) XXX_Merge

func (dst *Transaction) XXX_Merge(src proto.Message)

func (*Transaction) XXX_Size

func (m *Transaction) XXX_Size() int

func (*Transaction) XXX_Unmarshal

func (m *Transaction) XXX_Unmarshal(b []byte) error

type TransactionMeta

type TransactionMeta struct {
	BlockIndex           uint64   `protobuf:"varint,1,opt,name=BlockIndex,proto3" json:"BlockIndex,omitempty"`
	Index                int64    `protobuf:"varint,2,opt,name=Index,proto3" json:"Index,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*TransactionMeta) Descriptor

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

func (*TransactionMeta) GetBlockIndex

func (m *TransactionMeta) GetBlockIndex() uint64

func (*TransactionMeta) GetIndex

func (m *TransactionMeta) GetIndex() int64

func (*TransactionMeta) ProtoMessage

func (*TransactionMeta) ProtoMessage()

func (*TransactionMeta) Reset

func (m *TransactionMeta) Reset()

func (*TransactionMeta) String

func (m *TransactionMeta) String() string

func (*TransactionMeta) XXX_DiscardUnknown

func (m *TransactionMeta) XXX_DiscardUnknown()

func (*TransactionMeta) XXX_Marshal

func (m *TransactionMeta) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*TransactionMeta) XXX_Merge

func (dst *TransactionMeta) XXX_Merge(src proto.Message)

func (*TransactionMeta) XXX_Size

func (m *TransactionMeta) XXX_Size() int

func (*TransactionMeta) XXX_Unmarshal

func (m *TransactionMeta) XXX_Unmarshal(b []byte) error

type TransactionValue

type TransactionValue struct {
	Price                int64                   `protobuf:"varint,1,opt,name=price,proto3" json:"price,omitempty"`
	GasLimit             int64                   `protobuf:"varint,2,opt,name=gasLimit,proto3" json:"gasLimit,omitempty"`
	Amount               int64                   `protobuf:"varint,3,opt,name=amount,proto3" json:"amount,omitempty"`
	Payload              []byte                  `protobuf:"bytes,4,opt,name=payload,proto3" json:"payload,omitempty"`
	EncryptedAmount      []byte                  `protobuf:"bytes,5,opt,name=encryptedAmount,proto3" json:"encryptedAmount,omitempty"`
	HomomorphicAmount    []byte                  `protobuf:"bytes,6,opt,name=homomorphicAmount,proto3" json:"homomorphicAmount,omitempty"`
	HomomorphicBalance   []byte                  `protobuf:"bytes,7,opt,name=homomorphicBalance,proto3" json:"homomorphicBalance,omitempty"`
	Op                   TransactionValue_Opcode `protobuf:"varint,8,opt,name=op,proto3,enum=proto.TransactionValue_Opcode" json:"op,omitempty"`
	Extra                []byte                  `protobuf:"bytes,9,opt,name=extra,proto3" json:"extra,omitempty"`
	VmType               TransactionValue_VmType `protobuf:"varint,10,opt,name=vmType,proto3,enum=proto.TransactionValue_VmType" json:"vmType,omitempty"`
	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
	XXX_unrecognized     []byte                  `json:"-"`
	XXX_sizecache        int32                   `json:"-"`
}

func (*TransactionValue) Descriptor

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

func (*TransactionValue) GetAmount

func (m *TransactionValue) GetAmount() int64

func (*TransactionValue) GetEncryptedAmount

func (m *TransactionValue) GetEncryptedAmount() []byte

func (*TransactionValue) GetExtra

func (m *TransactionValue) GetExtra() []byte

func (*TransactionValue) GetGasLimit

func (m *TransactionValue) GetGasLimit() int64

func (*TransactionValue) GetHomomorphicAmount

func (m *TransactionValue) GetHomomorphicAmount() []byte

func (*TransactionValue) GetHomomorphicBalance

func (m *TransactionValue) GetHomomorphicBalance() []byte

func (*TransactionValue) GetOp

func (*TransactionValue) GetPayload

func (m *TransactionValue) GetPayload() []byte

func (*TransactionValue) GetPrice

func (m *TransactionValue) GetPrice() int64

func (*TransactionValue) GetVmType

func (*TransactionValue) ProtoMessage

func (*TransactionValue) ProtoMessage()

func (*TransactionValue) Reset

func (m *TransactionValue) Reset()

func (*TransactionValue) String

func (m *TransactionValue) String() string

func (*TransactionValue) XXX_DiscardUnknown

func (m *TransactionValue) XXX_DiscardUnknown()

func (*TransactionValue) XXX_Marshal

func (m *TransactionValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*TransactionValue) XXX_Merge

func (dst *TransactionValue) XXX_Merge(src proto.Message)

func (*TransactionValue) XXX_Size

func (m *TransactionValue) XXX_Size() int

func (*TransactionValue) XXX_Unmarshal

func (m *TransactionValue) XXX_Unmarshal(b []byte) error

type TransactionValue_Opcode

type TransactionValue_Opcode int32
const (
	TransactionValue_NORMAL   TransactionValue_Opcode = 0
	TransactionValue_UPDATE   TransactionValue_Opcode = 1
	TransactionValue_FREEZE   TransactionValue_Opcode = 2
	TransactionValue_UNFREEZE TransactionValue_Opcode = 3
	TransactionValue_SKIPVM   TransactionValue_Opcode = 4
	TransactionValue_ARCHIVE  TransactionValue_Opcode = 100
)

func (TransactionValue_Opcode) EnumDescriptor

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

func (TransactionValue_Opcode) String

func (x TransactionValue_Opcode) String() string

type TransactionValue_VmType

type TransactionValue_VmType int32
const (
	TransactionValue_EVM TransactionValue_VmType = 0
	TransactionValue_JVM TransactionValue_VmType = 1
)

func (TransactionValue_VmType) EnumDescriptor

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

func (TransactionValue_VmType) String

func (x TransactionValue_VmType) String() string

type TransactionWrapper

type TransactionWrapper struct {
	TransactionVersion   []byte   `protobuf:"bytes,1,opt,name=transactionVersion,proto3" json:"transactionVersion,omitempty"`
	Transaction          []byte   `protobuf:"bytes,2,opt,name=transaction,proto3" json:"transaction,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*TransactionWrapper) Descriptor

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

func (*TransactionWrapper) GetTransaction

func (m *TransactionWrapper) GetTransaction() []byte

func (*TransactionWrapper) GetTransactionVersion

func (m *TransactionWrapper) GetTransactionVersion() []byte

func (*TransactionWrapper) ProtoMessage

func (*TransactionWrapper) ProtoMessage()

func (*TransactionWrapper) Reset

func (m *TransactionWrapper) Reset()

func (*TransactionWrapper) String

func (m *TransactionWrapper) String() string

func (*TransactionWrapper) XXX_DiscardUnknown

func (m *TransactionWrapper) XXX_DiscardUnknown()

func (*TransactionWrapper) XXX_Marshal

func (m *TransactionWrapper) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*TransactionWrapper) XXX_Merge

func (dst *TransactionWrapper) XXX_Merge(src proto.Message)

func (*TransactionWrapper) XXX_Size

func (m *TransactionWrapper) XXX_Size() int

func (*TransactionWrapper) XXX_Unmarshal

func (m *TransactionWrapper) XXX_Unmarshal(b []byte) error

Jump to

Keyboard shortcuts

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