account

package
v1.19.0 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2024 License: MIT Imports: 23 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	IsCodeAccountResponse_Result_name = map[int32]string{
		0: "OK",
		1: "NOT_FOUND",
		2: "UNLOCKED_TIMELOCK_ACCOUNT",
	}
	IsCodeAccountResponse_Result_value = map[string]int32{
		"OK":                        0,
		"NOT_FOUND":                 1,
		"UNLOCKED_TIMELOCK_ACCOUNT": 2,
	}
)

Enum value maps for IsCodeAccountResponse_Result.

View Source
var (
	GetTokenAccountInfosResponse_Result_name = map[int32]string{
		0: "OK",
		1: "NOT_FOUND",
	}
	GetTokenAccountInfosResponse_Result_value = map[string]int32{
		"OK":        0,
		"NOT_FOUND": 1,
	}
)

Enum value maps for GetTokenAccountInfosResponse_Result.

View Source
var (
	LinkAdditionalAccountsResponse_Result_name = map[int32]string{
		0: "OK",
		1: "DENIED",
		2: "INVALID_ACCOUNT",
	}
	LinkAdditionalAccountsResponse_Result_value = map[string]int32{
		"OK":              0,
		"DENIED":          1,
		"INVALID_ACCOUNT": 2,
	}
)

Enum value maps for LinkAdditionalAccountsResponse_Result.

View Source
var (
	TokenAccountInfo_BalanceSource_name = map[int32]string{
		0: "BALANCE_SOURCE_UNKNOWN",
		1: "BALANCE_SOURCE_BLOCKCHAIN",
		2: "BALANCE_SOURCE_CACHE",
	}
	TokenAccountInfo_BalanceSource_value = map[string]int32{
		"BALANCE_SOURCE_UNKNOWN":    0,
		"BALANCE_SOURCE_BLOCKCHAIN": 1,
		"BALANCE_SOURCE_CACHE":      2,
	}
)

Enum value maps for TokenAccountInfo_BalanceSource.

View Source
var (
	TokenAccountInfo_ManagementState_name = map[int32]string{
		0: "MANAGEMENT_STATE_UNKNOWN",
		1: "MANAGEMENT_STATE_NONE",
		2: "MANAGEMENT_STATE_LOCKING",
		3: "MANAGEMENT_STATE_LOCKED",
		4: "MANAGEMENT_STATE_UNLOCKING",
		5: "MANAGEMENT_STATE_UNLOCKED",
		6: "MANAGEMENT_STATE_CLOSING",
		7: "MANAGEMENT_STATE_CLOSED",
	}
	TokenAccountInfo_ManagementState_value = map[string]int32{
		"MANAGEMENT_STATE_UNKNOWN":   0,
		"MANAGEMENT_STATE_NONE":      1,
		"MANAGEMENT_STATE_LOCKING":   2,
		"MANAGEMENT_STATE_LOCKED":    3,
		"MANAGEMENT_STATE_UNLOCKING": 4,
		"MANAGEMENT_STATE_UNLOCKED":  5,
		"MANAGEMENT_STATE_CLOSING":   6,
		"MANAGEMENT_STATE_CLOSED":    7,
	}
)

Enum value maps for TokenAccountInfo_ManagementState.

View Source
var (
	TokenAccountInfo_BlockchainState_name = map[int32]string{
		0: "BLOCKCHAIN_STATE_UNKNOWN",
		1: "BLOCKCHAIN_STATE_DOES_NOT_EXIST",
		2: "BLOCKCHAIN_STATE_EXISTS",
	}
	TokenAccountInfo_BlockchainState_value = map[string]int32{
		"BLOCKCHAIN_STATE_UNKNOWN":        0,
		"BLOCKCHAIN_STATE_DOES_NOT_EXIST": 1,
		"BLOCKCHAIN_STATE_EXISTS":         2,
	}
)

Enum value maps for TokenAccountInfo_BlockchainState.

View Source
var (
	TokenAccountInfo_ClaimState_name = map[int32]string{
		0: "CLAIM_STATE_UNKNOWN",
		1: "CLAIM_STATE_NOT_CLAIMED",
		2: "CLAIM_STATE_CLAIMED",
		3: "CLAIM_STATE_EXPIRED",
	}
	TokenAccountInfo_ClaimState_value = map[string]int32{
		"CLAIM_STATE_UNKNOWN":     0,
		"CLAIM_STATE_NOT_CLAIMED": 1,
		"CLAIM_STATE_CLAIMED":     2,
		"CLAIM_STATE_EXPIRED":     3,
	}
)

Enum value maps for TokenAccountInfo_ClaimState.

View Source
var Account_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "code.account.v1.Account",
	HandlerType: (*AccountServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "IsCodeAccount",
			Handler:    _Account_IsCodeAccount_Handler,
		},
		{
			MethodName: "GetTokenAccountInfos",
			Handler:    _Account_GetTokenAccountInfos_Handler,
		},
		{
			MethodName: "LinkAdditionalAccounts",
			Handler:    _Account_LinkAdditionalAccounts_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "account/v1/account_service.proto",
}

Account_ServiceDesc is the grpc.ServiceDesc for Account 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_account_v1_account_service_proto protoreflect.FileDescriptor

Functions

func RegisterAccountServer

func RegisterAccountServer(s grpc.ServiceRegistrar, srv AccountServer)

Types

type AccountClient

type AccountClient interface {
	// IsCodeAccount returns whether an owner account is a Code account. This hints
	// to the client whether the account can be logged in, used for making payments,
	// etc.
	IsCodeAccount(ctx context.Context, in *IsCodeAccountRequest, opts ...grpc.CallOption) (*IsCodeAccountResponse, error)
	// GetTokenAccountInfos returns token account metadata relevant to the Code owner
	// account.
	GetTokenAccountInfos(ctx context.Context, in *GetTokenAccountInfosRequest, opts ...grpc.CallOption) (*GetTokenAccountInfosResponse, error)
	// LinkAdditionalAccounts allows a client to declare additional accounts to
	// be tracked and used within Code. The accounts declared in this RPC are not
	// managed by Code (ie. not a Timelock account), created externally and cannot
	// be linked automatically (ie. authority derived off user 12 words).
	LinkAdditionalAccounts(ctx context.Context, in *LinkAdditionalAccountsRequest, opts ...grpc.CallOption) (*LinkAdditionalAccountsResponse, error)
}

AccountClient is the client API for Account 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 NewAccountClient

func NewAccountClient(cc grpc.ClientConnInterface) AccountClient

type AccountServer

type AccountServer interface {
	// IsCodeAccount returns whether an owner account is a Code account. This hints
	// to the client whether the account can be logged in, used for making payments,
	// etc.
	IsCodeAccount(context.Context, *IsCodeAccountRequest) (*IsCodeAccountResponse, error)
	// GetTokenAccountInfos returns token account metadata relevant to the Code owner
	// account.
	GetTokenAccountInfos(context.Context, *GetTokenAccountInfosRequest) (*GetTokenAccountInfosResponse, error)
	// LinkAdditionalAccounts allows a client to declare additional accounts to
	// be tracked and used within Code. The accounts declared in this RPC are not
	// managed by Code (ie. not a Timelock account), created externally and cannot
	// be linked automatically (ie. authority derived off user 12 words).
	LinkAdditionalAccounts(context.Context, *LinkAdditionalAccountsRequest) (*LinkAdditionalAccountsResponse, error)
	// contains filtered or unexported methods
}

AccountServer is the server API for Account service. All implementations must embed UnimplementedAccountServer for forward compatibility

type GetTokenAccountInfosRequest

type GetTokenAccountInfosRequest struct {

	// The owner account, which can also be thought of as a parent account for this
	// RPC that links to one or more token accounts.
	Owner *v1.SolanaAccountId `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner,omitempty"`
	// The signature is of serialize(GetTokenAccountInfosRequest) without this field set
	// using the private key of the owner account. This provides an authentication
	// mechanism to the RPC.
	Signature *v1.Signature `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"`
	// contains filtered or unexported fields
}

func (*GetTokenAccountInfosRequest) Descriptor deprecated

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

Deprecated: Use GetTokenAccountInfosRequest.ProtoReflect.Descriptor instead.

func (*GetTokenAccountInfosRequest) GetOwner

func (*GetTokenAccountInfosRequest) GetSignature

func (x *GetTokenAccountInfosRequest) GetSignature() *v1.Signature

func (*GetTokenAccountInfosRequest) ProtoMessage

func (*GetTokenAccountInfosRequest) ProtoMessage()

func (*GetTokenAccountInfosRequest) ProtoReflect

func (*GetTokenAccountInfosRequest) Reset

func (x *GetTokenAccountInfosRequest) Reset()

func (*GetTokenAccountInfosRequest) String

func (x *GetTokenAccountInfosRequest) String() string

func (*GetTokenAccountInfosRequest) Validate

func (m *GetTokenAccountInfosRequest) Validate() error

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

type GetTokenAccountInfosRequestValidationError

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

GetTokenAccountInfosRequestValidationError is the validation error returned by GetTokenAccountInfosRequest.Validate if the designated constraints aren't met.

func (GetTokenAccountInfosRequestValidationError) Cause

Cause function returns cause value.

func (GetTokenAccountInfosRequestValidationError) Error

Error satisfies the builtin error interface

func (GetTokenAccountInfosRequestValidationError) ErrorName

ErrorName returns error name.

func (GetTokenAccountInfosRequestValidationError) Field

Field function returns field value.

func (GetTokenAccountInfosRequestValidationError) Key

Key function returns key value.

func (GetTokenAccountInfosRequestValidationError) Reason

Reason function returns reason value.

type GetTokenAccountInfosResponse

type GetTokenAccountInfosResponse struct {
	Result            GetTokenAccountInfosResponse_Result `protobuf:"varint,1,opt,name=result,proto3,enum=code.account.v1.GetTokenAccountInfosResponse_Result" json:"result,omitempty"`
	TokenAccountInfos map[string]*TokenAccountInfo        `` /* 202-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*GetTokenAccountInfosResponse) Descriptor deprecated

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

Deprecated: Use GetTokenAccountInfosResponse.ProtoReflect.Descriptor instead.

func (*GetTokenAccountInfosResponse) GetResult

func (*GetTokenAccountInfosResponse) GetTokenAccountInfos

func (x *GetTokenAccountInfosResponse) GetTokenAccountInfos() map[string]*TokenAccountInfo

func (*GetTokenAccountInfosResponse) ProtoMessage

func (*GetTokenAccountInfosResponse) ProtoMessage()

func (*GetTokenAccountInfosResponse) ProtoReflect

func (*GetTokenAccountInfosResponse) Reset

func (x *GetTokenAccountInfosResponse) Reset()

func (*GetTokenAccountInfosResponse) String

func (*GetTokenAccountInfosResponse) Validate

func (m *GetTokenAccountInfosResponse) Validate() error

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

type GetTokenAccountInfosResponseValidationError

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

GetTokenAccountInfosResponseValidationError is the validation error returned by GetTokenAccountInfosResponse.Validate if the designated constraints aren't met.

func (GetTokenAccountInfosResponseValidationError) Cause

Cause function returns cause value.

func (GetTokenAccountInfosResponseValidationError) Error

Error satisfies the builtin error interface

func (GetTokenAccountInfosResponseValidationError) ErrorName

ErrorName returns error name.

func (GetTokenAccountInfosResponseValidationError) Field

Field function returns field value.

func (GetTokenAccountInfosResponseValidationError) Key

Key function returns key value.

func (GetTokenAccountInfosResponseValidationError) Reason

Reason function returns reason value.

type GetTokenAccountInfosResponse_Result

type GetTokenAccountInfosResponse_Result int32
const (
	GetTokenAccountInfosResponse_OK        GetTokenAccountInfosResponse_Result = 0
	GetTokenAccountInfosResponse_NOT_FOUND GetTokenAccountInfosResponse_Result = 1
)

func (GetTokenAccountInfosResponse_Result) Descriptor

func (GetTokenAccountInfosResponse_Result) Enum

func (GetTokenAccountInfosResponse_Result) EnumDescriptor deprecated

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

Deprecated: Use GetTokenAccountInfosResponse_Result.Descriptor instead.

func (GetTokenAccountInfosResponse_Result) Number

func (GetTokenAccountInfosResponse_Result) String

func (GetTokenAccountInfosResponse_Result) Type

type IsCodeAccountRequest

type IsCodeAccountRequest struct {

	// The owner account to check against.
	Owner *v1.SolanaAccountId `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner,omitempty"`
	// The signature is of serialize(IsCodeAccountRequest) without this field set
	// using the private key of the owner account. This provides an authentication
	// mechanism to the RPC.
	Signature *v1.Signature `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"`
	// contains filtered or unexported fields
}

func (*IsCodeAccountRequest) Descriptor deprecated

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

Deprecated: Use IsCodeAccountRequest.ProtoReflect.Descriptor instead.

func (*IsCodeAccountRequest) GetOwner

func (x *IsCodeAccountRequest) GetOwner() *v1.SolanaAccountId

func (*IsCodeAccountRequest) GetSignature

func (x *IsCodeAccountRequest) GetSignature() *v1.Signature

func (*IsCodeAccountRequest) ProtoMessage

func (*IsCodeAccountRequest) ProtoMessage()

func (*IsCodeAccountRequest) ProtoReflect

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

func (*IsCodeAccountRequest) Reset

func (x *IsCodeAccountRequest) Reset()

func (*IsCodeAccountRequest) String

func (x *IsCodeAccountRequest) String() string

func (*IsCodeAccountRequest) Validate

func (m *IsCodeAccountRequest) Validate() error

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

type IsCodeAccountRequestValidationError

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

IsCodeAccountRequestValidationError is the validation error returned by IsCodeAccountRequest.Validate if the designated constraints aren't met.

func (IsCodeAccountRequestValidationError) Cause

Cause function returns cause value.

func (IsCodeAccountRequestValidationError) Error

Error satisfies the builtin error interface

func (IsCodeAccountRequestValidationError) ErrorName

ErrorName returns error name.

func (IsCodeAccountRequestValidationError) Field

Field function returns field value.

func (IsCodeAccountRequestValidationError) Key

Key function returns key value.

func (IsCodeAccountRequestValidationError) Reason

Reason function returns reason value.

type IsCodeAccountResponse

type IsCodeAccountResponse struct {
	Result IsCodeAccountResponse_Result `protobuf:"varint,1,opt,name=result,proto3,enum=code.account.v1.IsCodeAccountResponse_Result" json:"result,omitempty"`
	// contains filtered or unexported fields
}

func (*IsCodeAccountResponse) Descriptor deprecated

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

Deprecated: Use IsCodeAccountResponse.ProtoReflect.Descriptor instead.

func (*IsCodeAccountResponse) GetResult

func (*IsCodeAccountResponse) ProtoMessage

func (*IsCodeAccountResponse) ProtoMessage()

func (*IsCodeAccountResponse) ProtoReflect

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

func (*IsCodeAccountResponse) Reset

func (x *IsCodeAccountResponse) Reset()

func (*IsCodeAccountResponse) String

func (x *IsCodeAccountResponse) String() string

func (*IsCodeAccountResponse) Validate

func (m *IsCodeAccountResponse) Validate() error

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

type IsCodeAccountResponseValidationError

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

IsCodeAccountResponseValidationError is the validation error returned by IsCodeAccountResponse.Validate if the designated constraints aren't met.

func (IsCodeAccountResponseValidationError) Cause

Cause function returns cause value.

func (IsCodeAccountResponseValidationError) Error

Error satisfies the builtin error interface

func (IsCodeAccountResponseValidationError) ErrorName

ErrorName returns error name.

func (IsCodeAccountResponseValidationError) Field

Field function returns field value.

func (IsCodeAccountResponseValidationError) Key

Key function returns key value.

func (IsCodeAccountResponseValidationError) Reason

Reason function returns reason value.

type IsCodeAccountResponse_Result

type IsCodeAccountResponse_Result int32
const (
	// The account is a Code account.
	IsCodeAccountResponse_OK IsCodeAccountResponse_Result = 0
	// The account is not a Code account.
	IsCodeAccountResponse_NOT_FOUND IsCodeAccountResponse_Result = 1
	// The account exists, but at least one timelock account is unlocked.
	IsCodeAccountResponse_UNLOCKED_TIMELOCK_ACCOUNT IsCodeAccountResponse_Result = 2
)

func (IsCodeAccountResponse_Result) Descriptor

func (IsCodeAccountResponse_Result) Enum

func (IsCodeAccountResponse_Result) EnumDescriptor deprecated

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

Deprecated: Use IsCodeAccountResponse_Result.Descriptor instead.

func (IsCodeAccountResponse_Result) Number

func (IsCodeAccountResponse_Result) String

func (IsCodeAccountResponse_Result) Type

type LinkAdditionalAccountsRequest added in v1.9.0

type LinkAdditionalAccountsRequest struct {

	// The owner account to link to
	Owner *v1.SolanaAccountId `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner,omitempty"`
	// The authority account derived off the user's 12 words, which contains
	// the USDC ATA (and potentially others in the future) that will be used
	// in swaps.
	SwapAuthority *v1.SolanaAccountId `protobuf:"bytes,2,opt,name=swap_authority,json=swapAuthority,proto3" json:"swap_authority,omitempty"`
	// Signature values for each account provided in this request. Each signature
	// must be generated without this array set. The expected ordering of signatures:
	//  1. owner
	//  2. swap_authority
	Signatures []*v1.Signature `protobuf:"bytes,3,rep,name=signatures,proto3" json:"signatures,omitempty"`
	// contains filtered or unexported fields
}

func (*LinkAdditionalAccountsRequest) Descriptor deprecated added in v1.9.0

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

Deprecated: Use LinkAdditionalAccountsRequest.ProtoReflect.Descriptor instead.

func (*LinkAdditionalAccountsRequest) GetOwner added in v1.9.0

func (*LinkAdditionalAccountsRequest) GetSignatures added in v1.9.0

func (x *LinkAdditionalAccountsRequest) GetSignatures() []*v1.Signature

func (*LinkAdditionalAccountsRequest) GetSwapAuthority added in v1.9.0

func (x *LinkAdditionalAccountsRequest) GetSwapAuthority() *v1.SolanaAccountId

func (*LinkAdditionalAccountsRequest) ProtoMessage added in v1.9.0

func (*LinkAdditionalAccountsRequest) ProtoMessage()

func (*LinkAdditionalAccountsRequest) ProtoReflect added in v1.9.0

func (*LinkAdditionalAccountsRequest) Reset added in v1.9.0

func (x *LinkAdditionalAccountsRequest) Reset()

func (*LinkAdditionalAccountsRequest) String added in v1.9.0

func (*LinkAdditionalAccountsRequest) Validate added in v1.9.0

func (m *LinkAdditionalAccountsRequest) Validate() error

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

type LinkAdditionalAccountsRequestValidationError added in v1.9.0

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

LinkAdditionalAccountsRequestValidationError is the validation error returned by LinkAdditionalAccountsRequest.Validate if the designated constraints aren't met.

func (LinkAdditionalAccountsRequestValidationError) Cause added in v1.9.0

Cause function returns cause value.

func (LinkAdditionalAccountsRequestValidationError) Error added in v1.9.0

Error satisfies the builtin error interface

func (LinkAdditionalAccountsRequestValidationError) ErrorName added in v1.9.0

ErrorName returns error name.

func (LinkAdditionalAccountsRequestValidationError) Field added in v1.9.0

Field function returns field value.

func (LinkAdditionalAccountsRequestValidationError) Key added in v1.9.0

Key function returns key value.

func (LinkAdditionalAccountsRequestValidationError) Reason added in v1.9.0

Reason function returns reason value.

type LinkAdditionalAccountsResponse added in v1.9.0

type LinkAdditionalAccountsResponse struct {
	Result LinkAdditionalAccountsResponse_Result `protobuf:"varint,1,opt,name=result,proto3,enum=code.account.v1.LinkAdditionalAccountsResponse_Result" json:"result,omitempty"`
	// contains filtered or unexported fields
}

func (*LinkAdditionalAccountsResponse) Descriptor deprecated added in v1.9.0

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

Deprecated: Use LinkAdditionalAccountsResponse.ProtoReflect.Descriptor instead.

func (*LinkAdditionalAccountsResponse) GetResult added in v1.9.0

func (*LinkAdditionalAccountsResponse) ProtoMessage added in v1.9.0

func (*LinkAdditionalAccountsResponse) ProtoMessage()

func (*LinkAdditionalAccountsResponse) ProtoReflect added in v1.9.0

func (*LinkAdditionalAccountsResponse) Reset added in v1.9.0

func (x *LinkAdditionalAccountsResponse) Reset()

func (*LinkAdditionalAccountsResponse) String added in v1.9.0

func (*LinkAdditionalAccountsResponse) Validate added in v1.9.0

func (m *LinkAdditionalAccountsResponse) Validate() error

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

type LinkAdditionalAccountsResponseValidationError added in v1.9.0

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

LinkAdditionalAccountsResponseValidationError is the validation error returned by LinkAdditionalAccountsResponse.Validate if the designated constraints aren't met.

func (LinkAdditionalAccountsResponseValidationError) Cause added in v1.9.0

Cause function returns cause value.

func (LinkAdditionalAccountsResponseValidationError) Error added in v1.9.0

Error satisfies the builtin error interface

func (LinkAdditionalAccountsResponseValidationError) ErrorName added in v1.9.0

ErrorName returns error name.

func (LinkAdditionalAccountsResponseValidationError) Field added in v1.9.0

Field function returns field value.

func (LinkAdditionalAccountsResponseValidationError) Key added in v1.9.0

Key function returns key value.

func (LinkAdditionalAccountsResponseValidationError) Reason added in v1.9.0

Reason function returns reason value.

type LinkAdditionalAccountsResponse_Result added in v1.9.0

type LinkAdditionalAccountsResponse_Result int32
const (
	// Supports idempotency, and will be returned as long as the request exactly
	// matches a previous execution.
	LinkAdditionalAccountsResponse_OK LinkAdditionalAccountsResponse_Result = 0
	// The action has been denied (eg. owner account not phone verified)
	LinkAdditionalAccountsResponse_DENIED LinkAdditionalAccountsResponse_Result = 1
	// An account being linked is not valid
	LinkAdditionalAccountsResponse_INVALID_ACCOUNT LinkAdditionalAccountsResponse_Result = 2
)

func (LinkAdditionalAccountsResponse_Result) Descriptor added in v1.9.0

func (LinkAdditionalAccountsResponse_Result) Enum added in v1.9.0

func (LinkAdditionalAccountsResponse_Result) EnumDescriptor deprecated added in v1.9.0

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

Deprecated: Use LinkAdditionalAccountsResponse_Result.Descriptor instead.

func (LinkAdditionalAccountsResponse_Result) Number added in v1.9.0

func (LinkAdditionalAccountsResponse_Result) String added in v1.9.0

func (LinkAdditionalAccountsResponse_Result) Type added in v1.9.0

type TokenAccountInfo

type TokenAccountInfo struct {

	// The token account's address
	Address *v1.SolanaAccountId `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
	// The owner of the token account, which can also be thought of as a parent
	// account that links to one or more token accounts. This is provided when
	// available.
	Owner *v1.SolanaAccountId `protobuf:"bytes,2,opt,name=owner,proto3" json:"owner,omitempty"`
	// The token account's authority, which has access to moving funds for the
	// account. This can be the owner account under certain circumstances (eg.
	// ATA, primary account). This is provided when available.
	Authority *v1.SolanaAccountId `protobuf:"bytes,3,opt,name=authority,proto3" json:"authority,omitempty"`
	// The type of token account, which infers its intended use.
	AccountType v1.AccountType `` /* 127-byte string literal not displayed */
	// The account's derivation index for applicable account types. When this field
	// doesn't apply, a zero value is provided.
	Index uint64 `protobuf:"varint,5,opt,name=index,proto3" json:"index,omitempty"`
	// The source of truth for the balance calculation.
	BalanceSource TokenAccountInfo_BalanceSource `` /* 153-byte string literal not displayed */
	// The balance in quarks, as observed by Code. This may not reflect the value
	// on the blockchain and could be non-zero even if the account hasn't been created.
	// Use balance_source to determine how this value was calculated.
	Balance uint64 `protobuf:"varint,7,opt,name=balance,proto3" json:"balance,omitempty"`
	// The state of the account as it pertains to Code's ability to manage funds.
	ManagementState TokenAccountInfo_ManagementState `` /* 161-byte string literal not displayed */
	// The state of the account on the blockchain.
	BlockchainState TokenAccountInfo_BlockchainState `` /* 161-byte string literal not displayed */
	// For temporary incoming accounts only. Flag indicates whether client must
	// actively try rotating it by issuing a ReceivePaymentsPrivately intent. In
	// general, clients should wait as long as possible until this flag is true
	// or requiring the funds to send their next payment.
	MustRotate bool `protobuf:"varint,10,opt,name=must_rotate,json=mustRotate,proto3" json:"must_rotate,omitempty"`
	// Whether an account is claimed. This only applies to relevant account types
	// (eg. REMOTE_SEND_GIFT_CARD).
	ClaimState TokenAccountInfo_ClaimState `` /* 142-byte string literal not displayed */
	// For account types used as an intermediary for sending money between two
	// users (eg. REMOTE_SEND_GIFT_CARD), this represents the original exchange
	// data used to fund the account. Over time, this value will become stale:
	//  1. Exchange rates will fluctuate, so the total fiat amount will differ.
	//  2. External entities can deposit additional funds into the account, so
	//     the balance, in quarks, may be greater than the original quark value.
	//  3. The balance could have been received, so the total balance can show
	//     as zero.
	OriginalExchangeData *v2.ExchangeData `protobuf:"bytes,12,opt,name=original_exchange_data,json=originalExchangeData,proto3" json:"original_exchange_data,omitempty"`
	// The token account's mint
	Mint *v1.SolanaAccountId `protobuf:"bytes,13,opt,name=mint,proto3" json:"mint,omitempty"`
	// The relationship with a third party that this account has established with.
	// This only applies to relevant account types (eg. RELATIONSHIP).
	Relationship *v1.Relationship `protobuf:"bytes,16,opt,name=relationship,proto3" json:"relationship,omitempty"`
	// Time the account was created, if available. For Code accounts, this is
	// the time of intent submission. Otherwise, for external accounts, it is
	// the tiem created on the blockchain.
	CreatedAt *timestamppb.Timestamp `protobuf:"bytes,17,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
	// contains filtered or unexported fields
}

func (*TokenAccountInfo) Descriptor deprecated

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

Deprecated: Use TokenAccountInfo.ProtoReflect.Descriptor instead.

func (*TokenAccountInfo) GetAccountType

func (x *TokenAccountInfo) GetAccountType() v1.AccountType

func (*TokenAccountInfo) GetAddress

func (x *TokenAccountInfo) GetAddress() *v1.SolanaAccountId

func (*TokenAccountInfo) GetAuthority

func (x *TokenAccountInfo) GetAuthority() *v1.SolanaAccountId

func (*TokenAccountInfo) GetBalance

func (x *TokenAccountInfo) GetBalance() uint64

func (*TokenAccountInfo) GetBalanceSource

func (x *TokenAccountInfo) GetBalanceSource() TokenAccountInfo_BalanceSource

func (*TokenAccountInfo) GetBlockchainState

func (x *TokenAccountInfo) GetBlockchainState() TokenAccountInfo_BlockchainState

func (*TokenAccountInfo) GetClaimState

func (x *TokenAccountInfo) GetClaimState() TokenAccountInfo_ClaimState

func (*TokenAccountInfo) GetCreatedAt added in v1.16.6

func (x *TokenAccountInfo) GetCreatedAt() *timestamppb.Timestamp

func (*TokenAccountInfo) GetIndex

func (x *TokenAccountInfo) GetIndex() uint64

func (*TokenAccountInfo) GetManagementState

func (x *TokenAccountInfo) GetManagementState() TokenAccountInfo_ManagementState

func (*TokenAccountInfo) GetMint added in v1.2.0

func (x *TokenAccountInfo) GetMint() *v1.SolanaAccountId

func (*TokenAccountInfo) GetMustRotate

func (x *TokenAccountInfo) GetMustRotate() bool

func (*TokenAccountInfo) GetOriginalExchangeData

func (x *TokenAccountInfo) GetOriginalExchangeData() *v2.ExchangeData

func (*TokenAccountInfo) GetOwner

func (x *TokenAccountInfo) GetOwner() *v1.SolanaAccountId

func (*TokenAccountInfo) GetRelationship added in v1.4.0

func (x *TokenAccountInfo) GetRelationship() *v1.Relationship

func (*TokenAccountInfo) ProtoMessage

func (*TokenAccountInfo) ProtoMessage()

func (*TokenAccountInfo) ProtoReflect

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

func (*TokenAccountInfo) Reset

func (x *TokenAccountInfo) Reset()

func (*TokenAccountInfo) String

func (x *TokenAccountInfo) String() string

func (*TokenAccountInfo) Validate

func (m *TokenAccountInfo) Validate() error

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

type TokenAccountInfoValidationError

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

TokenAccountInfoValidationError is the validation error returned by TokenAccountInfo.Validate if the designated constraints aren't met.

func (TokenAccountInfoValidationError) Cause

Cause function returns cause value.

func (TokenAccountInfoValidationError) Error

Error satisfies the builtin error interface

func (TokenAccountInfoValidationError) ErrorName

ErrorName returns error name.

func (TokenAccountInfoValidationError) Field

Field function returns field value.

func (TokenAccountInfoValidationError) Key

Key function returns key value.

func (TokenAccountInfoValidationError) Reason

Reason function returns reason value.

type TokenAccountInfo_BalanceSource

type TokenAccountInfo_BalanceSource int32
const (
	// The account's balance could not be determined. This may be returned when
	// the data source is unstable and a reliable balance cannot be determined.
	TokenAccountInfo_BALANCE_SOURCE_UNKNOWN TokenAccountInfo_BalanceSource = 0
	// The account's balance was fetched directly from a finalized state on the
	// blockchain.
	TokenAccountInfo_BALANCE_SOURCE_BLOCKCHAIN TokenAccountInfo_BalanceSource = 1
	// The account's balance was calculated using cached values in Code. Accuracy
	// is only guaranteed when management_state is LOCKED.
	TokenAccountInfo_BALANCE_SOURCE_CACHE TokenAccountInfo_BalanceSource = 2
)

func (TokenAccountInfo_BalanceSource) Descriptor

func (TokenAccountInfo_BalanceSource) Enum

func (TokenAccountInfo_BalanceSource) EnumDescriptor deprecated

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

Deprecated: Use TokenAccountInfo_BalanceSource.Descriptor instead.

func (TokenAccountInfo_BalanceSource) Number

func (TokenAccountInfo_BalanceSource) String

func (TokenAccountInfo_BalanceSource) Type

type TokenAccountInfo_BlockchainState

type TokenAccountInfo_BlockchainState int32
const (
	// The state of the account is unknown. This may be returned when the
	// data source is unstable and a reliable state cannot be determined.
	TokenAccountInfo_BLOCKCHAIN_STATE_UNKNOWN TokenAccountInfo_BlockchainState = 0
	// The account does not exist on the blockchain.
	TokenAccountInfo_BLOCKCHAIN_STATE_DOES_NOT_EXIST TokenAccountInfo_BlockchainState = 1
	// The account is created and exists on the blockchain.
	TokenAccountInfo_BLOCKCHAIN_STATE_EXISTS TokenAccountInfo_BlockchainState = 2
)

func (TokenAccountInfo_BlockchainState) Descriptor

func (TokenAccountInfo_BlockchainState) Enum

func (TokenAccountInfo_BlockchainState) EnumDescriptor deprecated

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

Deprecated: Use TokenAccountInfo_BlockchainState.Descriptor instead.

func (TokenAccountInfo_BlockchainState) Number

func (TokenAccountInfo_BlockchainState) String

func (TokenAccountInfo_BlockchainState) Type

type TokenAccountInfo_ClaimState

type TokenAccountInfo_ClaimState int32
const (
	// The account doesn't have a concept of being claimed, or the state
	// could not be fetched by server.
	TokenAccountInfo_CLAIM_STATE_UNKNOWN TokenAccountInfo_ClaimState = 0
	// The account has not yet been claimed.
	TokenAccountInfo_CLAIM_STATE_NOT_CLAIMED TokenAccountInfo_ClaimState = 1
	// The account is claimed. Attempting to claim it will fail.
	TokenAccountInfo_CLAIM_STATE_CLAIMED TokenAccountInfo_ClaimState = 2
	// The account hasn't been claimed, but is expired. Funds will move
	// back to the issuer. Attempting to claim it will fail.
	TokenAccountInfo_CLAIM_STATE_EXPIRED TokenAccountInfo_ClaimState = 3
)

func (TokenAccountInfo_ClaimState) Descriptor

func (TokenAccountInfo_ClaimState) Enum

func (TokenAccountInfo_ClaimState) EnumDescriptor deprecated

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

Deprecated: Use TokenAccountInfo_ClaimState.Descriptor instead.

func (TokenAccountInfo_ClaimState) Number

func (TokenAccountInfo_ClaimState) String

func (TokenAccountInfo_ClaimState) Type

type TokenAccountInfo_ManagementState

type TokenAccountInfo_ManagementState int32
const (
	// The state of the account is unknown. This may be returned when the
	// data source is unstable and a reliable state cannot be determined.
	TokenAccountInfo_MANAGEMENT_STATE_UNKNOWN TokenAccountInfo_ManagementState = 0
	// Code does not maintain a management state and won't move funds for this
	// account.
	TokenAccountInfo_MANAGEMENT_STATE_NONE TokenAccountInfo_ManagementState = 1
	// The account is in the process of transitioning to the LOCKED state.
	TokenAccountInfo_MANAGEMENT_STATE_LOCKING TokenAccountInfo_ManagementState = 2
	// The account's funds are locked and Code has co-signing authority.
	TokenAccountInfo_MANAGEMENT_STATE_LOCKED TokenAccountInfo_ManagementState = 3
	// The account is in the process of transitioning to the UNLOCKED state.
	TokenAccountInfo_MANAGEMENT_STATE_UNLOCKING TokenAccountInfo_ManagementState = 4
	// The account's funds are unlocked and Code no longer has co-signing
	// authority. The account must transition to the LOCKED state to have
	// management capabilities.
	TokenAccountInfo_MANAGEMENT_STATE_UNLOCKED TokenAccountInfo_ManagementState = 5
	// The account is in the process of transitioning to the CLOSED state.
	TokenAccountInfo_MANAGEMENT_STATE_CLOSING TokenAccountInfo_ManagementState = 6
	// The account has been closed and doesn't exist on the blockchain.
	// Subsequently, it also has a zero balance.
	TokenAccountInfo_MANAGEMENT_STATE_CLOSED TokenAccountInfo_ManagementState = 7
)

func (TokenAccountInfo_ManagementState) Descriptor

func (TokenAccountInfo_ManagementState) Enum

func (TokenAccountInfo_ManagementState) EnumDescriptor deprecated

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

Deprecated: Use TokenAccountInfo_ManagementState.Descriptor instead.

func (TokenAccountInfo_ManagementState) Number

func (TokenAccountInfo_ManagementState) String

func (TokenAccountInfo_ManagementState) Type

type UnimplementedAccountServer

type UnimplementedAccountServer struct {
}

UnimplementedAccountServer must be embedded to have forward compatible implementations.

func (UnimplementedAccountServer) IsCodeAccount

func (UnimplementedAccountServer) LinkAdditionalAccounts added in v1.9.0

type UnsafeAccountServer

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

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

Jump to

Keyboard shortcuts

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