solana

package
v0.0.0-...-1fb291d Latest Latest
Warning

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

Go to latest
Published: May 25, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ConfirmationLevel_name = map[int32]string{
		0: "PROCESSED",
		1: "CONFIRMED",
		2: "FINALIZED",
	}
	ConfirmationLevel_value = map[string]int32{
		"PROCESSED": 0,
		"CONFIRMED": 1,
		"FINALIZED": 2,
	}
)

Enum value maps for ConfirmationLevel.

View Source
var Broadcast_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "solana.Broadcast",
	HandlerType: (*BroadcastServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "SendTx",
			Handler:    _Broadcast_SendTx_Handler,
		},
		{
			MethodName: "RunGenesis",
			Handler:    _Broadcast_RunGenesis_Handler,
		},
		{
			MethodName: "RunInitializeTokenAccount",
			Handler:    _Broadcast_RunInitializeTokenAccount_Handler,
		},
		{
			MethodName: "RunCreateAccount",
			Handler:    _Broadcast_RunCreateAccount_Handler,
		},
		{
			MethodName: "RunMint",
			Handler:    _Broadcast_RunMint_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "proto/solana.proto",
}

Broadcast_ServiceDesc is the grpc.ServiceDesc for Broadcast service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

View Source
var File_proto_solana_proto protoreflect.FileDescriptor

Functions

func RegisterBroadcastServer

func RegisterBroadcastServer(s grpc.ServiceRegistrar, srv BroadcastServer)

Types

type BroadcastClient

type BroadcastClient interface {
	//rpc SendTx(SendTxRequest) returns (SendTxResponse) {}
	SendTx(ctx context.Context, in *SendBatchRequest, opts ...grpc.CallOption) (*SendBatchResponse, error)
	RunGenesis(ctx context.Context, in *Genesis, opts ...grpc.CallOption) (*basic.Empty, error)
	RunInitializeTokenAccount(ctx context.Context, in *InitializeTokenAccount, opts ...grpc.CallOption) (*basic.Keypair, error)
	RunCreateAccount(ctx context.Context, in *CreateAccount, opts ...grpc.CallOption) (*basic.Keypair, error)
	RunMint(ctx context.Context, in *Mint, opts ...grpc.CallOption) (*basic.Empty, error)
}

BroadcastClient is the client API for Broadcast service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

func NewBroadcastClient

func NewBroadcastClient(cc grpc.ClientConnInterface) BroadcastClient

type BroadcastServer

type BroadcastServer interface {
	//rpc SendTx(SendTxRequest) returns (SendTxResponse) {}
	SendTx(context.Context, *SendBatchRequest) (*SendBatchResponse, error)
	RunGenesis(context.Context, *Genesis) (*basic.Empty, error)
	RunInitializeTokenAccount(context.Context, *InitializeTokenAccount) (*basic.Keypair, error)
	RunCreateAccount(context.Context, *CreateAccount) (*basic.Keypair, error)
	RunMint(context.Context, *Mint) (*basic.Empty, error)
	// contains filtered or unexported methods
}

BroadcastServer is the server API for Broadcast service. All implementations must embed UnimplementedBroadcastServer for forward compatibility

type ConfirmationLevel

type ConfirmationLevel int32
const (
	ConfirmationLevel_PROCESSED ConfirmationLevel = 0
	ConfirmationLevel_CONFIRMED ConfirmationLevel = 1
	ConfirmationLevel_FINALIZED ConfirmationLevel = 2
)

func (ConfirmationLevel) Descriptor

func (ConfirmationLevel) Enum

func (ConfirmationLevel) EnumDescriptor deprecated

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

Deprecated: Use ConfirmationLevel.Descriptor instead.

func (ConfirmationLevel) Number

func (ConfirmationLevel) String

func (x ConfirmationLevel) String() string

func (ConfirmationLevel) Type

type CreateAccount

type CreateAccount struct {

	// mint_pubkey: Pubkey,
	Mint *basic.Pubkey `protobuf:"bytes,1,opt,name=mint,proto3" json:"mint,omitempty"`
	//owner_pubkey: Pubkey,
	Owner *basic.Pubkey `protobuf:"bytes,2,opt,name=owner,proto3" json:"owner,omitempty"`
	//payer: String,
	Payer *basic.Keypair `protobuf:"bytes,3,opt,name=payer,proto3" json:"payer,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateAccount) Descriptor deprecated

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

Deprecated: Use CreateAccount.ProtoReflect.Descriptor instead.

func (*CreateAccount) GetMint

func (x *CreateAccount) GetMint() *basic.Pubkey

func (*CreateAccount) GetOwner

func (x *CreateAccount) GetOwner() *basic.Pubkey

func (*CreateAccount) GetPayer

func (x *CreateAccount) GetPayer() *basic.Keypair

func (*CreateAccount) ProtoMessage

func (*CreateAccount) ProtoMessage()

func (*CreateAccount) ProtoReflect

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

func (*CreateAccount) Reset

func (x *CreateAccount) Reset()

func (*CreateAccount) String

func (x *CreateAccount) String() string

type Genesis

type Genesis struct {
	Payer *basic.Keypair `protobuf:"bytes,1,opt,name=payer,proto3" json:"payer,omitempty"`
	Mint  *basic.Keypair `protobuf:"bytes,2,opt,name=mint,proto3" json:"mint,omitempty"`
	Owner *basic.Pubkey  `protobuf:"bytes,3,opt,name=owner,proto3" json:"owner,omitempty"`
	// u8
	Decimals []byte `protobuf:"bytes,4,opt,name=decimals,proto3" json:"decimals,omitempty"`
	// contains filtered or unexported fields
}

func (*Genesis) Descriptor deprecated

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

Deprecated: Use Genesis.ProtoReflect.Descriptor instead.

func (*Genesis) GetDecimals

func (x *Genesis) GetDecimals() []byte

func (*Genesis) GetMint

func (x *Genesis) GetMint() *basic.Keypair

func (*Genesis) GetOwner

func (x *Genesis) GetOwner() *basic.Pubkey

func (*Genesis) GetPayer

func (x *Genesis) GetPayer() *basic.Keypair

func (*Genesis) ProtoMessage

func (*Genesis) ProtoMessage()

func (*Genesis) ProtoReflect

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

func (*Genesis) Reset

func (x *Genesis) Reset()

func (*Genesis) String

func (x *Genesis) String() string

type InitializeTokenAccount

type InitializeTokenAccount struct {

	//mint: Pubkey,
	Mint *basic.Pubkey `protobuf:"bytes,1,opt,name=mint,proto3" json:"mint,omitempty"`
	//owner_account: String,
	OwnerAccount *basic.Keypair `protobuf:"bytes,2,opt,name=owner_account,json=ownerAccount,proto3" json:"owner_account,omitempty"`
	// contains filtered or unexported fields
}

func (*InitializeTokenAccount) Descriptor deprecated

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

Deprecated: Use InitializeTokenAccount.ProtoReflect.Descriptor instead.

func (*InitializeTokenAccount) GetMint

func (x *InitializeTokenAccount) GetMint() *basic.Pubkey

func (*InitializeTokenAccount) GetOwnerAccount

func (x *InitializeTokenAccount) GetOwnerAccount() *basic.Keypair

func (*InitializeTokenAccount) ProtoMessage

func (*InitializeTokenAccount) ProtoMessage()

func (*InitializeTokenAccount) ProtoReflect

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

func (*InitializeTokenAccount) Reset

func (x *InitializeTokenAccount) Reset()

func (*InitializeTokenAccount) String

func (x *InitializeTokenAccount) String() string

type Mint

type Mint struct {

	//payer: String,
	Payer *basic.Keypair `protobuf:"bytes,1,opt,name=payer,proto3" json:"payer,omitempty"`
	//signer: String,
	Signer *basic.Keypair `protobuf:"bytes,2,opt,name=signer,proto3" json:"signer,omitempty"`
	//mint_pubkey: Pubkey,
	Mint *basic.Pubkey `protobuf:"bytes,3,opt,name=mint,proto3" json:"mint,omitempty"`
	// recipient: Option<Pubkey>,
	Recipient *basic.Pubkey `protobuf:"bytes,4,opt,name=recipient,proto3" json:"recipient,omitempty"`
	//quantity: u64,
	Quantity uint64 `protobuf:"varint,5,opt,name=quantity,proto3" json:"quantity,omitempty"`
	// contains filtered or unexported fields
}

func (*Mint) Descriptor deprecated

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

Deprecated: Use Mint.ProtoReflect.Descriptor instead.

func (*Mint) GetMint

func (x *Mint) GetMint() *basic.Pubkey

func (*Mint) GetPayer

func (x *Mint) GetPayer() *basic.Keypair

func (*Mint) GetQuantity

func (x *Mint) GetQuantity() uint64

func (*Mint) GetRecipient

func (x *Mint) GetRecipient() *basic.Pubkey

func (*Mint) GetSigner

func (x *Mint) GetSigner() *basic.Keypair

func (*Mint) ProtoMessage

func (*Mint) ProtoMessage()

func (*Mint) ProtoReflect

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

func (*Mint) Reset

func (x *Mint) Reset()

func (*Mint) String

func (x *Mint) String() string

type SendBatchRequest

type SendBatchRequest struct {
	Tx                [][]byte          `protobuf:"bytes,1,rep,name=tx,proto3" json:"tx,omitempty"`
	ConfirmationLevel ConfirmationLevel `` /* 143-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*SendBatchRequest) Descriptor deprecated

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

Deprecated: Use SendBatchRequest.ProtoReflect.Descriptor instead.

func (*SendBatchRequest) GetConfirmationLevel

func (x *SendBatchRequest) GetConfirmationLevel() ConfirmationLevel

func (*SendBatchRequest) GetTx

func (x *SendBatchRequest) GetTx() [][]byte

func (*SendBatchRequest) ProtoMessage

func (*SendBatchRequest) ProtoMessage()

func (*SendBatchRequest) ProtoReflect

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

func (*SendBatchRequest) Reset

func (x *SendBatchRequest) Reset()

func (*SendBatchRequest) String

func (x *SendBatchRequest) String() string

type SendBatchResponse

type SendBatchResponse struct {
	Signature [][]byte `protobuf:"bytes,1,rep,name=signature,proto3" json:"signature,omitempty"`
	// contains filtered or unexported fields
}

func (*SendBatchResponse) Descriptor deprecated

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

Deprecated: Use SendBatchResponse.ProtoReflect.Descriptor instead.

func (*SendBatchResponse) GetSignature

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

func (*SendBatchResponse) ProtoMessage

func (*SendBatchResponse) ProtoMessage()

func (*SendBatchResponse) ProtoReflect

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

func (*SendBatchResponse) Reset

func (x *SendBatchResponse) Reset()

func (*SendBatchResponse) String

func (x *SendBatchResponse) String() string

type UnimplementedBroadcastServer

type UnimplementedBroadcastServer struct {
}

UnimplementedBroadcastServer must be embedded to have forward compatible implementations.

func (UnimplementedBroadcastServer) RunCreateAccount

func (UnimplementedBroadcastServer) RunGenesis

func (UnimplementedBroadcastServer) RunInitializeTokenAccount

func (UnimplementedBroadcastServer) RunMint

func (UnimplementedBroadcastServer) SendTx

type UnsafeBroadcastServer

type UnsafeBroadcastServer interface {
	// contains filtered or unexported methods
}

UnsafeBroadcastServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to BroadcastServer will result in compilation errors.

Jump to

Keyboard shortcuts

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