common

package
v0.28.0 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2021 License: MIT Imports: 14 Imported by: 8

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Commitment_name = map[int32]string{
	0: "RECENT",
	1: "SINGLE",
	2: "ROOT",
	3: "MAX",
}
View Source
var Commitment_value = map[string]int32{
	"RECENT": 0,
	"SINGLE": 1,
	"ROOT":   2,
	"MAX":    3,
}
View Source
var TransactionError_Reason_name = map[int32]string{
	0: "NONE",
	1: "UNKNOWN",
	2: "UNAUTHORIZED",
	3: "BAD_NONCE",
	4: "INSUFFICIENT_FUNDS",
	5: "INVALID_ACCOUNT",
}
View Source
var TransactionError_Reason_value = map[string]int32{
	"NONE":               0,
	"UNKNOWN":            1,
	"UNAUTHORIZED":       2,
	"BAD_NONCE":          3,
	"INSUFFICIENT_FUNDS": 4,
	"INVALID_ACCOUNT":    5,
}

Functions

This section is empty.

Types

type Blockhash

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

func (*Blockhash) Descriptor

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

func (*Blockhash) GetValue

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

func (*Blockhash) ProtoMessage

func (*Blockhash) ProtoMessage()

func (*Blockhash) Reset

func (m *Blockhash) Reset()

func (*Blockhash) String

func (m *Blockhash) String() string

func (*Blockhash) Validate

func (m *Blockhash) Validate() error

Validate checks the field values on Blockhash with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

func (*Blockhash) XXX_DiscardUnknown

func (m *Blockhash) XXX_DiscardUnknown()

func (*Blockhash) XXX_Marshal

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

func (*Blockhash) XXX_Merge

func (m *Blockhash) XXX_Merge(src proto.Message)

func (*Blockhash) XXX_Size

func (m *Blockhash) XXX_Size() int

func (*Blockhash) XXX_Unmarshal

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

type BlockhashValidationError

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

BlockhashValidationError is the validation error returned by Blockhash.Validate if the designated constraints aren't met.

func (BlockhashValidationError) Cause

func (e BlockhashValidationError) Cause() error

Cause function returns cause value.

func (BlockhashValidationError) Error

func (e BlockhashValidationError) Error() string

Error satisfies the builtin error interface

func (BlockhashValidationError) ErrorName

func (e BlockhashValidationError) ErrorName() string

ErrorName returns error name.

func (BlockhashValidationError) Field

func (e BlockhashValidationError) Field() string

Field function returns field value.

func (BlockhashValidationError) Key

Key function returns key value.

func (BlockhashValidationError) Reason

func (e BlockhashValidationError) Reason() string

Reason function returns reason value.

type Commitment

type Commitment int32

Reference: https://docs.solana.com/apps/jsonrpc-api#configuring-state-commitment

const (
	// The node will query its most recent bank.
	Commitment_RECENT Commitment = 0
	// The node will query the most recent bank having reached 1 confirmation.
	Commitment_SINGLE Commitment = 1
	// The node will query the most recent bank having reached `MAX_LOCKOUT_HISTORY`
	// confirmations on 'this' node.
	Commitment_ROOT Commitment = 2
	// The node will query the most recent bank confirmed by the clsuter as having
	// reached `MAX_LOCKOUT_HISTORY`.
	Commitment_MAX Commitment = 3
)

func (Commitment) EnumDescriptor

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

func (Commitment) String

func (x Commitment) String() string

type SolanaAccountId

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

func (*SolanaAccountId) Descriptor

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

func (*SolanaAccountId) GetValue

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

func (*SolanaAccountId) ProtoMessage

func (*SolanaAccountId) ProtoMessage()

func (*SolanaAccountId) Reset

func (m *SolanaAccountId) Reset()

func (*SolanaAccountId) String

func (m *SolanaAccountId) String() string

func (*SolanaAccountId) Validate

func (m *SolanaAccountId) Validate() error

Validate checks the field values on SolanaAccountId with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

func (*SolanaAccountId) XXX_DiscardUnknown

func (m *SolanaAccountId) XXX_DiscardUnknown()

func (*SolanaAccountId) XXX_Marshal

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

func (*SolanaAccountId) XXX_Merge

func (m *SolanaAccountId) XXX_Merge(src proto.Message)

func (*SolanaAccountId) XXX_Size

func (m *SolanaAccountId) XXX_Size() int

func (*SolanaAccountId) XXX_Unmarshal

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

type SolanaAccountIdValidationError

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

SolanaAccountIdValidationError is the validation error returned by SolanaAccountId.Validate if the designated constraints aren't met.

func (SolanaAccountIdValidationError) Cause

Cause function returns cause value.

func (SolanaAccountIdValidationError) Error

Error satisfies the builtin error interface

func (SolanaAccountIdValidationError) ErrorName

func (e SolanaAccountIdValidationError) ErrorName() string

ErrorName returns error name.

func (SolanaAccountIdValidationError) Field

Field function returns field value.

func (SolanaAccountIdValidationError) Key

Key function returns key value.

func (SolanaAccountIdValidationError) Reason

Reason function returns reason value.

type StellarTransaction

type StellarTransaction struct {
	// Contains the transaction result from when the transaction was submitted
	ResultXdr []byte `protobuf:"bytes,1,opt,name=result_xdr,json=resultXdr,proto3" json:"result_xdr,omitempty"`
	// Contains the transaction envelope for the transaction.
	EnvelopeXdr          []byte   `protobuf:"bytes,2,opt,name=envelope_xdr,json=envelopeXdr,proto3" json:"envelope_xdr,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*StellarTransaction) Descriptor

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

func (*StellarTransaction) GetEnvelopeXdr

func (m *StellarTransaction) GetEnvelopeXdr() []byte

func (*StellarTransaction) GetResultXdr

func (m *StellarTransaction) GetResultXdr() []byte

func (*StellarTransaction) ProtoMessage

func (*StellarTransaction) ProtoMessage()

func (*StellarTransaction) Reset

func (m *StellarTransaction) Reset()

func (*StellarTransaction) String

func (m *StellarTransaction) String() string

func (*StellarTransaction) Validate

func (m *StellarTransaction) Validate() error

Validate checks the field values on StellarTransaction with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

func (*StellarTransaction) XXX_DiscardUnknown

func (m *StellarTransaction) XXX_DiscardUnknown()

func (*StellarTransaction) XXX_Marshal

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

func (*StellarTransaction) XXX_Merge

func (m *StellarTransaction) XXX_Merge(src proto.Message)

func (*StellarTransaction) XXX_Size

func (m *StellarTransaction) XXX_Size() int

func (*StellarTransaction) XXX_Unmarshal

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

type StellarTransactionValidationError

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

StellarTransactionValidationError is the validation error returned by StellarTransaction.Validate if the designated constraints aren't met.

func (StellarTransactionValidationError) Cause

Cause function returns cause value.

func (StellarTransactionValidationError) Error

Error satisfies the builtin error interface

func (StellarTransactionValidationError) ErrorName

ErrorName returns error name.

func (StellarTransactionValidationError) Field

Field function returns field value.

func (StellarTransactionValidationError) Key

Key function returns key value.

func (StellarTransactionValidationError) Reason

Reason function returns reason value.

type Transaction

type Transaction struct {
	// Maximum size taken from: https://github.com/solana-labs/solana/blob/39b3ac6a8d29e14faa1de73d8b46d390ad41797b/sdk/src/packet.rs#L9-L13
	Value                []byte   `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Transaction) Descriptor

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

func (*Transaction) GetValue

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

func (*Transaction) ProtoMessage

func (*Transaction) ProtoMessage()

func (*Transaction) Reset

func (m *Transaction) Reset()

func (*Transaction) String

func (m *Transaction) String() string

func (*Transaction) Validate

func (m *Transaction) Validate() error

Validate checks the field values on Transaction with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

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 (m *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 TransactionError

type TransactionError struct {
	Reason TransactionError_Reason `protobuf:"varint,1,opt,name=reason,proto3,enum=kin.agora.common.v4.TransactionError_Reason" json:"reason,omitempty"`
	// If the transaction failed due to an instruction, the
	// instruction_index will be >= 0, corresponding to the
	// instruction that failed the transaction.
	//
	// Otherwise, the instruction_index will be negative.
	InstructionIndex int32 `protobuf:"varint,2,opt,name=instruction_index,json=instructionIndex,proto3" json:"instruction_index,omitempty"`
	// Raw is the raw error returned from the underlying RPC
	// mechanisms with Solana. There are no stability guarantees
	// for the contents of this field.
	Raw                  []byte   `protobuf:"bytes,3,opt,name=raw,proto3" json:"raw,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*TransactionError) Descriptor

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

func (*TransactionError) GetInstructionIndex

func (m *TransactionError) GetInstructionIndex() int32

func (*TransactionError) GetRaw

func (m *TransactionError) GetRaw() []byte

func (*TransactionError) GetReason

func (*TransactionError) ProtoMessage

func (*TransactionError) ProtoMessage()

func (*TransactionError) Reset

func (m *TransactionError) Reset()

func (*TransactionError) String

func (m *TransactionError) String() string

func (*TransactionError) Validate

func (m *TransactionError) Validate() error

Validate checks the field values on TransactionError with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

func (*TransactionError) XXX_DiscardUnknown

func (m *TransactionError) XXX_DiscardUnknown()

func (*TransactionError) XXX_Marshal

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

func (*TransactionError) XXX_Merge

func (m *TransactionError) XXX_Merge(src proto.Message)

func (*TransactionError) XXX_Size

func (m *TransactionError) XXX_Size() int

func (*TransactionError) XXX_Unmarshal

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

type TransactionErrorValidationError

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

TransactionErrorValidationError is the validation error returned by TransactionError.Validate if the designated constraints aren't met.

func (TransactionErrorValidationError) Cause

Cause function returns cause value.

func (TransactionErrorValidationError) Error

Error satisfies the builtin error interface

func (TransactionErrorValidationError) ErrorName

ErrorName returns error name.

func (TransactionErrorValidationError) Field

Field function returns field value.

func (TransactionErrorValidationError) Key

Key function returns key value.

func (TransactionErrorValidationError) Reason

Reason function returns reason value.

type TransactionError_Reason

type TransactionError_Reason int32
const (
	TransactionError_NONE TransactionError_Reason = 0
	// The error could not be mapped by the service.
	//
	// In this situation, the error may be propagated out
	// of band (i.e. via error status), or be looked up using
	// low level RPCs.
	TransactionError_UNKNOWN TransactionError_Reason = 1
	// The transaction was missing a required signature.
	TransactionError_UNAUTHORIZED TransactionError_Reason = 2
	// Corresponds to an invalid sequence number in stellar,
	// or a bad / expired blockhash in solana.
	TransactionError_BAD_NONCE TransactionError_Reason = 3
	// Source did not have sufficient kin.
	TransactionError_INSUFFICIENT_FUNDS TransactionError_Reason = 4
	// Indicates one of the accounts in the transaction is
	// invalid. Some possible reasons are be:
	//
	//   1. Account does not exist
	//   2. Account exists, but is not a token account
	//   3. Account exists, but is for the wrong token.
	TransactionError_INVALID_ACCOUNT TransactionError_Reason = 5
)

func (TransactionError_Reason) EnumDescriptor

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

func (TransactionError_Reason) String

func (x TransactionError_Reason) String() string

type TransactionId

type TransactionId struct {
	// Value is either a 32-byte transaction hash, or a 64-byte transaction signature.
	// Values that are neither 32 nor 64 bytes are considered invalid.
	Value                []byte   `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*TransactionId) Descriptor

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

func (*TransactionId) GetValue

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

func (*TransactionId) ProtoMessage

func (*TransactionId) ProtoMessage()

func (*TransactionId) Reset

func (m *TransactionId) Reset()

func (*TransactionId) String

func (m *TransactionId) String() string

func (*TransactionId) Validate

func (m *TransactionId) Validate() error

Validate checks the field values on TransactionId with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

func (*TransactionId) XXX_DiscardUnknown

func (m *TransactionId) XXX_DiscardUnknown()

func (*TransactionId) XXX_Marshal

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

func (*TransactionId) XXX_Merge

func (m *TransactionId) XXX_Merge(src proto.Message)

func (*TransactionId) XXX_Size

func (m *TransactionId) XXX_Size() int

func (*TransactionId) XXX_Unmarshal

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

type TransactionIdValidationError

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

TransactionIdValidationError is the validation error returned by TransactionId.Validate if the designated constraints aren't met.

func (TransactionIdValidationError) Cause

Cause function returns cause value.

func (TransactionIdValidationError) Error

Error satisfies the builtin error interface

func (TransactionIdValidationError) ErrorName

func (e TransactionIdValidationError) ErrorName() string

ErrorName returns error name.

func (TransactionIdValidationError) Field

Field function returns field value.

func (TransactionIdValidationError) Key

Key function returns key value.

func (TransactionIdValidationError) Reason

Reason function returns reason value.

type TransactionSignature

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

func (*TransactionSignature) Descriptor

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

func (*TransactionSignature) GetValue

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

func (*TransactionSignature) ProtoMessage

func (*TransactionSignature) ProtoMessage()

func (*TransactionSignature) Reset

func (m *TransactionSignature) Reset()

func (*TransactionSignature) String

func (m *TransactionSignature) String() string

func (*TransactionSignature) Validate

func (m *TransactionSignature) Validate() error

Validate checks the field values on TransactionSignature with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

func (*TransactionSignature) XXX_DiscardUnknown

func (m *TransactionSignature) XXX_DiscardUnknown()

func (*TransactionSignature) XXX_Marshal

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

func (*TransactionSignature) XXX_Merge

func (m *TransactionSignature) XXX_Merge(src proto.Message)

func (*TransactionSignature) XXX_Size

func (m *TransactionSignature) XXX_Size() int

func (*TransactionSignature) XXX_Unmarshal

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

type TransactionSignatureValidationError

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

TransactionSignatureValidationError is the validation error returned by TransactionSignature.Validate if the designated constraints aren't met.

func (TransactionSignatureValidationError) Cause

Cause function returns cause value.

func (TransactionSignatureValidationError) Error

Error satisfies the builtin error interface

func (TransactionSignatureValidationError) ErrorName

ErrorName returns error name.

func (TransactionSignatureValidationError) Field

Field function returns field value.

func (TransactionSignatureValidationError) Key

Key function returns key value.

func (TransactionSignatureValidationError) Reason

Reason function returns reason value.

type TransactionValidationError

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

TransactionValidationError is the validation error returned by Transaction.Validate if the designated constraints aren't met.

func (TransactionValidationError) Cause

Cause function returns cause value.

func (TransactionValidationError) Error

Error satisfies the builtin error interface

func (TransactionValidationError) ErrorName

func (e TransactionValidationError) ErrorName() string

ErrorName returns error name.

func (TransactionValidationError) Field

Field function returns field value.

func (TransactionValidationError) Key

Key function returns key value.

func (TransactionValidationError) Reason

Reason function returns reason value.

Jump to

Keyboard shortcuts

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