Documentation
¶
Index ¶
- Constants
- Variables
- func TryParse(s string) ([]byte, error)
- type AccessKey
- type AccessKeyPermission
- type AddKeyAct
- type BlockHash
- type CreateAccount
- type DeleteAccountAct
- type DeleteKeyAct
- type DeployContract
- type FullAccessPermission
- type FunctionCall
- type FunctionCallPermission
- type IAction
- type ISerialize
- type PublicKey
- type SignMessagePayload
- type Signature
- type Stake
- type String
- type Transfer
- type U8
- type U32
- type U64
- type U128
Constants ¶
View Source
const ( CreateAccountAction = iota DeployContractAction FunctionCallAction TransferAction StakeAction AddKeyAction DeleteKeyAction DeleteAccountAccount )
Variables ¶
View Source
var ( NearPrefix = "ed25519:" Ed25519Prefix = "ed25519" )
Functions ¶
Types ¶
type AccessKey ¶
type AccessKey struct {
Nonce U64
Permission AccessKeyPermission
}
type AccessKeyPermission ¶
type AccessKeyPermission struct {
FunctionCall *FunctionCallPermission
FullAccess *FullAccessPermission
}
func (*AccessKeyPermission) Serialize ¶
func (s *AccessKeyPermission) Serialize() ([]byte, error)
type AddKeyAct ¶
func CreateAddFullAccessKey ¶
func (*AddKeyAct) GetActionIndex ¶
type CreateAccount ¶
type CreateAccount struct {
Action uint8
}
func CreateCreateAccount ¶
func CreateCreateAccount() (*CreateAccount, error)
func (*CreateAccount) GetActionIndex ¶
func (s *CreateAccount) GetActionIndex() uint8
func (*CreateAccount) Serialize ¶
func (s *CreateAccount) Serialize() ([]byte, error)
type DeleteAccountAct ¶
func CreateDeleteAccount ¶
func CreateDeleteAccount(beneficiaryId string) (*DeleteAccountAct, error)
func (*DeleteAccountAct) GetActionIndex ¶
func (s *DeleteAccountAct) GetActionIndex() uint8
func (*DeleteAccountAct) Serialize ¶
func (s *DeleteAccountAct) Serialize() ([]byte, error)
type DeleteKeyAct ¶
func CreateDeleteKey ¶
func CreateDeleteKey(publicKeyHex string) (*DeleteKeyAct, error)
func (*DeleteKeyAct) GetActionIndex ¶
func (s *DeleteKeyAct) GetActionIndex() uint8
func (*DeleteKeyAct) Serialize ¶
func (s *DeleteKeyAct) Serialize() ([]byte, error)
type DeployContract ¶
func CreateDeployContract ¶
func CreateDeployContract(code []byte) (*DeployContract, error)
func (*DeployContract) GetActionIndex ¶
func (s *DeployContract) GetActionIndex() uint8
func (*DeployContract) Serialize ¶
func (s *DeployContract) Serialize() ([]byte, error)
type FullAccessPermission ¶
type FullAccessPermission struct {
}
func (*FullAccessPermission) Serialize ¶
func (s *FullAccessPermission) Serialize() ([]byte, error)
type FunctionCall ¶
func CreateFunctionCall ¶
func (*FunctionCall) GetActionIndex ¶
func (s *FunctionCall) GetActionIndex() uint8
func (*FunctionCall) Serialize ¶
func (s *FunctionCall) Serialize() ([]byte, error)
type FunctionCallPermission ¶
func (*FunctionCallPermission) Serialize ¶
func (s *FunctionCallPermission) Serialize() ([]byte, error)
type IAction ¶
type IAction interface {
ISerialize
GetActionIndex() uint8
}
type ISerialize ¶
type PublicKey ¶
func TryParsePubKey ¶
type SignMessagePayload ¶
type SignMessagePayload struct {
Message String
Nonce []byte
Recipient String
CallbackUrl *String
// contains filtered or unexported fields
}
func NewSignMessagePayload ¶
func NewSignMessagePayload(message string, nonce []byte, recipient string, callbackUrl string) *SignMessagePayload
func (*SignMessagePayload) Serialize ¶
func (self *SignMessagePayload) Serialize() ([]byte, error)
type Stake ¶
func (*Stake) GetActionIndex ¶
Click to show internal directories.
Click to hide internal directories.