near

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 AccessKey

type AccessKey struct {

	// Nonce
	Nonce uint64 `protobuf:"varint,1,opt,name=nonce,proto3" json:"nonce,omitempty"`
	// Permission
	//
	// Types that are valid to be assigned to Permission:
	//
	//	*AccessKey_FunctionCall
	//	*AccessKey_FullAccess
	Permission isAccessKey_Permission `protobuf_oneof:"permission"`
	// contains filtered or unexported fields
}

Access key: nonce + permission

func (*AccessKey) Descriptor deprecated

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

Deprecated: Use AccessKey.ProtoReflect.Descriptor instead.

func (*AccessKey) GetFullAccess

func (x *AccessKey) GetFullAccess() *FullAccessPermission

func (*AccessKey) GetFunctionCall

func (x *AccessKey) GetFunctionCall() *FunctionCallPermission

func (*AccessKey) GetNonce

func (x *AccessKey) GetNonce() uint64

func (*AccessKey) GetPermission

func (x *AccessKey) GetPermission() isAccessKey_Permission

func (*AccessKey) ProtoMessage

func (*AccessKey) ProtoMessage()

func (*AccessKey) ProtoReflect

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

func (*AccessKey) Reset

func (x *AccessKey) Reset()

func (*AccessKey) String

func (x *AccessKey) String() string

type AccessKey_FullAccess

type AccessKey_FullAccess struct {
	FullAccess *FullAccessPermission `protobuf:"bytes,3,opt,name=full_access,json=fullAccess,proto3,oneof"`
}

type AccessKey_FunctionCall

type AccessKey_FunctionCall struct {
	FunctionCall *FunctionCallPermission `protobuf:"bytes,2,opt,name=function_call,json=functionCall,proto3,oneof"`
}

type Action

type Action struct {

	// Types that are valid to be assigned to Payload:
	//
	//	*Action_CreateAccount
	//	*Action_DeployContract
	//	*Action_FunctionCall
	//	*Action_Transfer
	//	*Action_Stake
	//	*Action_AddKey
	//	*Action_DeleteKey
	//	*Action_DeleteAccount
	//	*Action_TokenTransfer
	Payload isAction_Payload `protobuf_oneof:"payload"`
	// contains filtered or unexported fields
}

Represents an action

func (*Action) Descriptor deprecated

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

Deprecated: Use Action.ProtoReflect.Descriptor instead.

func (*Action) GetAddKey

func (x *Action) GetAddKey() *AddKey

func (*Action) GetCreateAccount

func (x *Action) GetCreateAccount() *CreateAccount

func (*Action) GetDeleteAccount

func (x *Action) GetDeleteAccount() *DeleteAccount

func (*Action) GetDeleteKey

func (x *Action) GetDeleteKey() *DeleteKey

func (*Action) GetDeployContract

func (x *Action) GetDeployContract() *DeployContract

func (*Action) GetFunctionCall

func (x *Action) GetFunctionCall() *FunctionCall

func (*Action) GetPayload

func (x *Action) GetPayload() isAction_Payload

func (*Action) GetStake

func (x *Action) GetStake() *Stake

func (*Action) GetTokenTransfer

func (x *Action) GetTokenTransfer() *TokenTransfer

func (*Action) GetTransfer

func (x *Action) GetTransfer() *Transfer

func (*Action) ProtoMessage

func (*Action) ProtoMessage()

func (*Action) ProtoReflect

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

func (*Action) Reset

func (x *Action) Reset()

func (*Action) String

func (x *Action) String() string

type Action_AddKey

type Action_AddKey struct {
	AddKey *AddKey `protobuf:"bytes,6,opt,name=add_key,json=addKey,proto3,oneof"`
}

type Action_CreateAccount

type Action_CreateAccount struct {
	CreateAccount *CreateAccount `protobuf:"bytes,1,opt,name=create_account,json=createAccount,proto3,oneof"`
}

type Action_DeleteAccount

type Action_DeleteAccount struct {
	DeleteAccount *DeleteAccount `protobuf:"bytes,8,opt,name=delete_account,json=deleteAccount,proto3,oneof"`
}

type Action_DeleteKey

type Action_DeleteKey struct {
	DeleteKey *DeleteKey `protobuf:"bytes,7,opt,name=delete_key,json=deleteKey,proto3,oneof"`
}

type Action_DeployContract

type Action_DeployContract struct {
	DeployContract *DeployContract `protobuf:"bytes,2,opt,name=deploy_contract,json=deployContract,proto3,oneof"`
}

type Action_FunctionCall

type Action_FunctionCall struct {
	FunctionCall *FunctionCall `protobuf:"bytes,3,opt,name=function_call,json=functionCall,proto3,oneof"`
}

type Action_Stake

type Action_Stake struct {
	Stake *Stake `protobuf:"bytes,5,opt,name=stake,proto3,oneof"`
}

type Action_TokenTransfer

type Action_TokenTransfer struct {
	// Gap in field numbering is intentional as it's not a standard NEAR action.
	TokenTransfer *TokenTransfer `protobuf:"bytes,13,opt,name=token_transfer,json=tokenTransfer,proto3,oneof"`
}

type Action_Transfer

type Action_Transfer struct {
	Transfer *Transfer `protobuf:"bytes,4,opt,name=transfer,proto3,oneof"`
}

type AddKey

type AddKey struct {
	PublicKey *PublicKey `protobuf:"bytes,1,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"`
	AccessKey *AccessKey `protobuf:"bytes,2,opt,name=access_key,json=accessKey,proto3" json:"access_key,omitempty"`
	// contains filtered or unexported fields
}

Add a key

func (*AddKey) Descriptor deprecated

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

Deprecated: Use AddKey.ProtoReflect.Descriptor instead.

func (*AddKey) GetAccessKey

func (x *AddKey) GetAccessKey() *AccessKey

func (*AddKey) GetPublicKey

func (x *AddKey) GetPublicKey() *PublicKey

func (*AddKey) ProtoMessage

func (*AddKey) ProtoMessage()

func (*AddKey) ProtoReflect

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

func (*AddKey) Reset

func (x *AddKey) Reset()

func (*AddKey) String

func (x *AddKey) String() string

type CreateAccount

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

Create Account

func (*CreateAccount) Descriptor deprecated

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

Deprecated: Use CreateAccount.ProtoReflect.Descriptor instead.

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 DeleteAccount

type DeleteAccount struct {
	BeneficiaryId string `protobuf:"bytes,1,opt,name=beneficiary_id,json=beneficiaryId,proto3" json:"beneficiary_id,omitempty"`
	// contains filtered or unexported fields
}

Delete account

func (*DeleteAccount) Descriptor deprecated

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

Deprecated: Use DeleteAccount.ProtoReflect.Descriptor instead.

func (*DeleteAccount) GetBeneficiaryId

func (x *DeleteAccount) GetBeneficiaryId() string

func (*DeleteAccount) ProtoMessage

func (*DeleteAccount) ProtoMessage()

func (*DeleteAccount) ProtoReflect

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

func (*DeleteAccount) Reset

func (x *DeleteAccount) Reset()

func (*DeleteAccount) String

func (x *DeleteAccount) String() string

type DeleteKey

type DeleteKey struct {
	PublicKey *PublicKey `protobuf:"bytes,1,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"`
	// contains filtered or unexported fields
}

Delete a key

func (*DeleteKey) Descriptor deprecated

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

Deprecated: Use DeleteKey.ProtoReflect.Descriptor instead.

func (*DeleteKey) GetPublicKey

func (x *DeleteKey) GetPublicKey() *PublicKey

func (*DeleteKey) ProtoMessage

func (*DeleteKey) ProtoMessage()

func (*DeleteKey) ProtoReflect

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

func (*DeleteKey) Reset

func (x *DeleteKey) Reset()

func (*DeleteKey) String

func (x *DeleteKey) String() string

type DeployContract

type DeployContract struct {
	Code []byte `protobuf:"bytes,1,opt,name=code,proto3" json:"code,omitempty"`
	// contains filtered or unexported fields
}

Deploying a contract

func (*DeployContract) Descriptor deprecated

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

Deprecated: Use DeployContract.ProtoReflect.Descriptor instead.

func (*DeployContract) GetCode

func (x *DeployContract) GetCode() []byte

func (*DeployContract) ProtoMessage

func (*DeployContract) ProtoMessage()

func (*DeployContract) ProtoReflect

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

func (*DeployContract) Reset

func (x *DeployContract) Reset()

func (*DeployContract) String

func (x *DeployContract) String() string

type FullAccessPermission

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

Full access

func (*FullAccessPermission) Descriptor deprecated

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

Deprecated: Use FullAccessPermission.ProtoReflect.Descriptor instead.

func (*FullAccessPermission) ProtoMessage

func (*FullAccessPermission) ProtoMessage()

func (*FullAccessPermission) ProtoReflect

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

func (*FullAccessPermission) Reset

func (x *FullAccessPermission) Reset()

func (*FullAccessPermission) String

func (x *FullAccessPermission) String() string

type FunctionCall

type FunctionCall struct {

	// Method/function name
	MethodName string `protobuf:"bytes,1,opt,name=method_name,json=methodName,proto3" json:"method_name,omitempty"`
	// input arguments
	Args []byte `protobuf:"bytes,2,opt,name=args,proto3" json:"args,omitempty"`
	// gas
	Gas uint64 `protobuf:"varint,3,opt,name=gas,proto3" json:"gas,omitempty"`
	// uint128 / big endian byte order
	Deposit []byte `protobuf:"bytes,4,opt,name=deposit,proto3" json:"deposit,omitempty"`
	// contains filtered or unexported fields
}

A method/function call

func (*FunctionCall) Descriptor deprecated

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

Deprecated: Use FunctionCall.ProtoReflect.Descriptor instead.

func (*FunctionCall) GetArgs

func (x *FunctionCall) GetArgs() []byte

func (*FunctionCall) GetDeposit

func (x *FunctionCall) GetDeposit() []byte

func (*FunctionCall) GetGas

func (x *FunctionCall) GetGas() uint64

func (*FunctionCall) GetMethodName

func (x *FunctionCall) GetMethodName() string

func (*FunctionCall) ProtoMessage

func (*FunctionCall) ProtoMessage()

func (*FunctionCall) ProtoReflect

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

func (*FunctionCall) Reset

func (x *FunctionCall) Reset()

func (*FunctionCall) String

func (x *FunctionCall) String() string

type FunctionCallPermission

type FunctionCallPermission struct {

	// uint128 / big endian byte order
	Allowance   []byte   `protobuf:"bytes,1,opt,name=allowance,proto3" json:"allowance,omitempty"`
	ReceiverId  string   `protobuf:"bytes,2,opt,name=receiver_id,json=receiverId,proto3" json:"receiver_id,omitempty"`
	MethodNames []string `protobuf:"bytes,3,rep,name=method_names,json=methodNames,proto3" json:"method_names,omitempty"`
	// contains filtered or unexported fields
}

Permissions for a function call

func (*FunctionCallPermission) Descriptor deprecated

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

Deprecated: Use FunctionCallPermission.ProtoReflect.Descriptor instead.

func (*FunctionCallPermission) GetAllowance

func (x *FunctionCallPermission) GetAllowance() []byte

func (*FunctionCallPermission) GetMethodNames

func (x *FunctionCallPermission) GetMethodNames() []string

func (*FunctionCallPermission) GetReceiverId

func (x *FunctionCallPermission) GetReceiverId() string

func (*FunctionCallPermission) ProtoMessage

func (*FunctionCallPermission) ProtoMessage()

func (*FunctionCallPermission) ProtoReflect

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

func (*FunctionCallPermission) Reset

func (x *FunctionCallPermission) Reset()

func (*FunctionCallPermission) String

func (x *FunctionCallPermission) String() string

type PublicKey

type PublicKey struct {

	// Key type
	KeyType uint32 `protobuf:"varint,1,opt,name=key_type,json=keyType,proto3" json:"key_type,omitempty"`
	// The public key data
	Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
	// contains filtered or unexported fields
}

Public key with type

func (*PublicKey) Descriptor deprecated

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

Deprecated: Use PublicKey.ProtoReflect.Descriptor instead.

func (*PublicKey) GetData

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

func (*PublicKey) GetKeyType

func (x *PublicKey) GetKeyType() uint32

func (*PublicKey) ProtoMessage

func (*PublicKey) ProtoMessage()

func (*PublicKey) ProtoReflect

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

func (*PublicKey) Reset

func (x *PublicKey) Reset()

func (*PublicKey) String

func (x *PublicKey) String() string

type SigningInput

type SigningInput struct {

	// ID of the sender
	SignerId string `protobuf:"bytes,1,opt,name=signer_id,json=signerId,proto3" json:"signer_id,omitempty"`
	// Nonce (should be larger than in the last transaction of the account)
	Nonce uint64 `protobuf:"varint,2,opt,name=nonce,proto3" json:"nonce,omitempty"`
	// ID of the receiver
	ReceiverId string `protobuf:"bytes,3,opt,name=receiver_id,json=receiverId,proto3" json:"receiver_id,omitempty"`
	// Recent block hash
	BlockHash []byte `protobuf:"bytes,4,opt,name=block_hash,json=blockHash,proto3" json:"block_hash,omitempty"`
	// Payload action(s)
	Actions []*Action `protobuf:"bytes,5,rep,name=actions,proto3" json:"actions,omitempty"`
	// The secret private key used for signing (32 bytes).
	PrivateKey []byte `protobuf:"bytes,6,opt,name=private_key,json=privateKey,proto3" json:"private_key,omitempty"`
	// The public key used for compiling a transaction with a signature.
	PublicKey []byte `protobuf:"bytes,7,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"`
	// contains filtered or unexported fields
}

Input data necessary to create a signed order.

func (*SigningInput) Descriptor deprecated

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

Deprecated: Use SigningInput.ProtoReflect.Descriptor instead.

func (*SigningInput) GetActions

func (x *SigningInput) GetActions() []*Action

func (*SigningInput) GetBlockHash

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

func (*SigningInput) GetNonce

func (x *SigningInput) GetNonce() uint64

func (*SigningInput) GetPrivateKey

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

func (*SigningInput) GetPublicKey

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

func (*SigningInput) GetReceiverId

func (x *SigningInput) GetReceiverId() string

func (*SigningInput) GetSignerId

func (x *SigningInput) GetSignerId() string

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 transaction blob
	SignedTransaction []byte `protobuf:"bytes,1,opt,name=signed_transaction,json=signedTransaction,proto3" json:"signed_transaction,omitempty"`
	// error code, 0 is ok, other codes will be treated as errors
	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"`
	// Hash of the transaction
	Hash []byte `protobuf:"bytes,4,opt,name=hash,proto3" json:"hash,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) GetError

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

func (*SigningOutput) GetErrorMessage

func (x *SigningOutput) GetErrorMessage() string

func (*SigningOutput) GetHash

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

func (*SigningOutput) GetSignedTransaction

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

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 Stake

type Stake struct {

	// amount; uint128 / big endian byte order
	Stake []byte `protobuf:"bytes,1,opt,name=stake,proto3" json:"stake,omitempty"`
	// owner public key
	PublicKey *PublicKey `protobuf:"bytes,2,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"`
	// contains filtered or unexported fields
}

Stake

func (*Stake) Descriptor deprecated

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

Deprecated: Use Stake.ProtoReflect.Descriptor instead.

func (*Stake) GetPublicKey

func (x *Stake) GetPublicKey() *PublicKey

func (*Stake) GetStake

func (x *Stake) GetStake() []byte

func (*Stake) ProtoMessage

func (*Stake) ProtoMessage()

func (*Stake) ProtoReflect

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

func (*Stake) Reset

func (x *Stake) Reset()

func (*Stake) String

func (x *Stake) String() string

type TokenTransfer

type TokenTransfer struct {

	// Token amount. Base-10 decimal string.
	TokenAmount string `protobuf:"bytes,1,opt,name=token_amount,json=tokenAmount,proto3" json:"token_amount,omitempty"`
	// ID of the receiver.
	ReceiverId string `protobuf:"bytes,2,opt,name=receiver_id,json=receiverId,proto3" json:"receiver_id,omitempty"`
	// Gas.
	Gas uint64 `protobuf:"varint,3,opt,name=gas,proto3" json:"gas,omitempty"`
	// NEAR deposit amount; uint128 / big endian byte order.
	Deposit []byte `protobuf:"bytes,4,opt,name=deposit,proto3" json:"deposit,omitempty"`
	// contains filtered or unexported fields
}

Fungible token transfer

func (*TokenTransfer) Descriptor deprecated

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

Deprecated: Use TokenTransfer.ProtoReflect.Descriptor instead.

func (*TokenTransfer) GetDeposit

func (x *TokenTransfer) GetDeposit() []byte

func (*TokenTransfer) GetGas

func (x *TokenTransfer) GetGas() uint64

func (*TokenTransfer) GetReceiverId

func (x *TokenTransfer) GetReceiverId() string

func (*TokenTransfer) GetTokenAmount

func (x *TokenTransfer) GetTokenAmount() string

func (*TokenTransfer) ProtoMessage

func (*TokenTransfer) ProtoMessage()

func (*TokenTransfer) ProtoReflect

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

func (*TokenTransfer) Reset

func (x *TokenTransfer) Reset()

func (*TokenTransfer) String

func (x *TokenTransfer) String() string

type Transfer

type Transfer struct {

	// amount; uint128 / big endian byte order
	Deposit []byte `protobuf:"bytes,1,opt,name=deposit,proto3" json:"deposit,omitempty"`
	// contains filtered or unexported fields
}

Transfer

func (*Transfer) Descriptor deprecated

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

Deprecated: Use Transfer.ProtoReflect.Descriptor instead.

func (*Transfer) GetDeposit

func (x *Transfer) GetDeposit() []byte

func (*Transfer) ProtoMessage

func (*Transfer) ProtoMessage()

func (*Transfer) ProtoReflect

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

func (*Transfer) Reset

func (x *Transfer) Reset()

func (*Transfer) String

func (x *Transfer) String() string

Jump to

Keyboard shortcuts

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