Documentation
¶
Index ¶
- Variables
- type AccessKey
- func (*AccessKey) Descriptor() ([]byte, []int)deprecated
- func (x *AccessKey) GetFullAccess() *FullAccessPermission
- func (x *AccessKey) GetFunctionCall() *FunctionCallPermission
- func (x *AccessKey) GetNonce() uint64
- func (x *AccessKey) GetPermission() isAccessKey_Permission
- func (*AccessKey) ProtoMessage()
- func (x *AccessKey) ProtoReflect() protoreflect.Message
- func (x *AccessKey) Reset()
- func (x *AccessKey) String() string
- type AccessKey_FullAccess
- type AccessKey_FunctionCall
- type Action
- func (*Action) Descriptor() ([]byte, []int)deprecated
- func (x *Action) GetAddKey() *AddKey
- func (x *Action) GetCreateAccount() *CreateAccount
- func (x *Action) GetDeleteAccount() *DeleteAccount
- func (x *Action) GetDeleteKey() *DeleteKey
- func (x *Action) GetDeployContract() *DeployContract
- func (x *Action) GetFunctionCall() *FunctionCall
- func (x *Action) GetPayload() isAction_Payload
- func (x *Action) GetStake() *Stake
- func (x *Action) GetTokenTransfer() *TokenTransfer
- func (x *Action) GetTransfer() *Transfer
- func (*Action) ProtoMessage()
- func (x *Action) ProtoReflect() protoreflect.Message
- func (x *Action) Reset()
- func (x *Action) String() string
- type Action_AddKey
- type Action_CreateAccount
- type Action_DeleteAccount
- type Action_DeleteKey
- type Action_DeployContract
- type Action_FunctionCall
- type Action_Stake
- type Action_TokenTransfer
- type Action_Transfer
- type AddKey
- type CreateAccount
- type DeleteAccount
- type DeleteKey
- type DeployContract
- type FullAccessPermission
- type FunctionCall
- func (*FunctionCall) Descriptor() ([]byte, []int)deprecated
- func (x *FunctionCall) GetArgs() []byte
- func (x *FunctionCall) GetDeposit() []byte
- func (x *FunctionCall) GetGas() uint64
- func (x *FunctionCall) GetMethodName() string
- func (*FunctionCall) ProtoMessage()
- func (x *FunctionCall) ProtoReflect() protoreflect.Message
- func (x *FunctionCall) Reset()
- func (x *FunctionCall) String() string
- type FunctionCallPermission
- func (*FunctionCallPermission) Descriptor() ([]byte, []int)deprecated
- func (x *FunctionCallPermission) GetAllowance() []byte
- func (x *FunctionCallPermission) GetMethodNames() []string
- func (x *FunctionCallPermission) GetReceiverId() string
- func (*FunctionCallPermission) ProtoMessage()
- func (x *FunctionCallPermission) ProtoReflect() protoreflect.Message
- func (x *FunctionCallPermission) Reset()
- func (x *FunctionCallPermission) String() string
- type PublicKey
- type SigningInput
- func (*SigningInput) Descriptor() ([]byte, []int)deprecated
- func (x *SigningInput) GetActions() []*Action
- func (x *SigningInput) GetBlockHash() []byte
- func (x *SigningInput) GetNonce() uint64
- func (x *SigningInput) GetPrivateKey() []byte
- func (x *SigningInput) GetPublicKey() []byte
- func (x *SigningInput) GetReceiverId() string
- func (x *SigningInput) GetSignerId() string
- func (*SigningInput) ProtoMessage()
- func (x *SigningInput) ProtoReflect() protoreflect.Message
- func (x *SigningInput) Reset()
- func (x *SigningInput) String() string
- type SigningOutput
- func (*SigningOutput) Descriptor() ([]byte, []int)deprecated
- func (x *SigningOutput) GetError() common.SigningError
- func (x *SigningOutput) GetErrorMessage() string
- func (x *SigningOutput) GetHash() []byte
- func (x *SigningOutput) GetSignedTransaction() []byte
- func (*SigningOutput) ProtoMessage()
- func (x *SigningOutput) ProtoReflect() protoreflect.Message
- func (x *SigningOutput) Reset()
- func (x *SigningOutput) String() string
- type Stake
- type TokenTransfer
- func (*TokenTransfer) Descriptor() ([]byte, []int)deprecated
- func (x *TokenTransfer) GetDeposit() []byte
- func (x *TokenTransfer) GetGas() uint64
- func (x *TokenTransfer) GetReceiverId() string
- func (x *TokenTransfer) GetTokenAmount() string
- func (*TokenTransfer) ProtoMessage()
- func (x *TokenTransfer) ProtoReflect() protoreflect.Message
- func (x *TokenTransfer) Reset()
- func (x *TokenTransfer) String() string
- type Transfer
Constants ¶
This section is empty.
Variables ¶
var File_NEAR_proto protoreflect.FileDescriptor
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) GetFullAccess ¶
func (x *AccessKey) GetFullAccess() *FullAccessPermission
func (*AccessKey) GetFunctionCall ¶
func (x *AccessKey) GetFunctionCall() *FunctionCallPermission
func (*AccessKey) GetPermission ¶
func (x *AccessKey) GetPermission() isAccessKey_Permission
func (*AccessKey) ProtoMessage ¶
func (*AccessKey) ProtoMessage()
func (*AccessKey) ProtoReflect ¶
func (x *AccessKey) ProtoReflect() protoreflect.Message
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) GetCreateAccount ¶
func (x *Action) GetCreateAccount() *CreateAccount
func (*Action) GetDeleteAccount ¶
func (x *Action) GetDeleteAccount() *DeleteAccount
func (*Action) GetDeleteKey ¶
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) GetTokenTransfer ¶
func (x *Action) GetTokenTransfer() *TokenTransfer
func (*Action) GetTransfer ¶
func (*Action) ProtoMessage ¶
func (*Action) ProtoMessage()
func (*Action) ProtoReflect ¶
func (x *Action) ProtoReflect() protoreflect.Message
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) GetAccessKey ¶
func (*AddKey) GetPublicKey ¶
func (*AddKey) ProtoMessage ¶
func (*AddKey) ProtoMessage()
func (*AddKey) ProtoReflect ¶
func (x *AddKey) ProtoReflect() protoreflect.Message
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) GetPublicKey ¶
func (*DeleteKey) ProtoMessage ¶
func (*DeleteKey) ProtoMessage()
func (*DeleteKey) ProtoReflect ¶
func (x *DeleteKey) ProtoReflect() protoreflect.Message
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) GetKeyType ¶
func (*PublicKey) ProtoMessage ¶
func (*PublicKey) ProtoMessage()
func (*PublicKey) ProtoReflect ¶
func (x *PublicKey) ProtoReflect() protoreflect.Message
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) GetPublicKey ¶
func (*Stake) ProtoMessage ¶
func (*Stake) ProtoMessage()
func (*Stake) ProtoReflect ¶
func (x *Stake) ProtoReflect() protoreflect.Message
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) GetDeposit ¶
func (*Transfer) ProtoMessage ¶
func (*Transfer) ProtoMessage()
func (*Transfer) ProtoReflect ¶
func (x *Transfer) ProtoReflect() protoreflect.Message