Documentation ¶
Index ¶
- type AccessKey
- type AccessKeyPermission
- type Action
- func AddKeyAction(publicKey keys.PublicKey, accessKey AccessKey) Action
- func CreateAccountAction() Action
- func DeleteAccountAction(beneficiaryID string) Action
- func DeleteKeyAction(publicKey keys.PublicKey) Action
- func DeployContractAction(code []byte) Action
- func FunctionCallAction(methodName string, opts ...FunctionCallOpton) (*Action, error)
- func StakeAction(stake big.Int, publicKey keys.PublicKey) Action
- func TransferAction(deposit big.Int) Action
- type AddKey
- type CreateAccount
- type DeleteAccount
- type DeleteKey
- type DeployContract
- type FullAccessPermission
- type FunctionCall
- type FunctionCallOpton
- type FunctionCallPermission
- type PublicKey
- type Signature
- type SignedTransaction
- type Stake
- type Transaction
- type Transfer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccessKey ¶
type AccessKey struct { Nonce uint64 Permission AccessKeyPermission }
AccessKey asdf.
type AccessKeyPermission ¶
type AccessKeyPermission struct { Enum borsh.Enum `borsh_enum:"true"` FunctionCall FunctionCallPermission FullAccess FullAccessPermission }
AccessKeyPermission asdf.
type Action ¶
type Action struct { Enum borsh.Enum `borsh_enum:"true"` CreateAccount CreateAccount DeployContract DeployContract FunctionCall FunctionCall Transfer Transfer Stake Stake AddKey AddKey DeleteKey DeleteKey DeleteAccount DeleteAccount }
Action asdf.
func AddKeyAction ¶
AddKeyAction is a helper to create a AddKey action.
func CreateAccountAction ¶
func CreateAccountAction() Action
CreateAccountAction is a helper to create a CreateAccount action.
func DeleteAccountAction ¶
DeleteAccountAction is a helper to create a DeleteAccount action.
func DeleteKeyAction ¶
DeleteKeyAction is a helper to create a DeleteKey action.
func DeployContractAction ¶
DeployContractAction is a helper to create a DeployContract action.
func FunctionCallAction ¶
func FunctionCallAction(methodName string, opts ...FunctionCallOpton) (*Action, error)
FunctionCallAction is a helper to create a FunctionCall action.
func StakeAction ¶
StakeAction is a helper to create a Stake action.
func TransferAction ¶
TransferAction is a helper to create a Transfer action.
type FunctionCall ¶
FunctionCall asdf.
type FunctionCallOpton ¶
type FunctionCallOpton func(*FunctionCall) error
FunctionCallOpton controls the behavior of a FunctionCall action.
func FunctionCallWithArgs ¶
func FunctionCallWithArgs(args interface{}) FunctionCallOpton
FunctionCallWithArgs allows you to pass JSON encodable args.
func FunctionCallWithDeposit ¶
func FunctionCallWithDeposit(deposit big.Int) FunctionCallOpton
FunctionCallWithDeposit allows you to attach a deposit.
func FunctionCallWithGas ¶
func FunctionCallWithGas(gas uint64) FunctionCallOpton
FunctionCallWithGas allows you to specify a gas amount.
type FunctionCallPermission ¶
FunctionCallPermission asdf.
type SignedTransaction ¶
type SignedTransaction struct { Transaction Transaction Signature Signature }
SignedTransaction asdf.
func SignTransaction ¶
func SignTransaction( transaction Transaction, signer keys.KeyPair, accountID string, networkID string, ) ([]byte, *SignedTransaction, error)
SignTransaction serializes and signs a Transaction using the provided signer.
type Transaction ¶
type Transaction struct { SignerID string PublicKey PublicKey Nonce uint64 ReceiverID string BlockHash [32]byte Actions []Action }
Transaction asdf.
func NewTransaction ¶
func NewTransaction( signerID string, publicKey PublicKey, nonce uint64, receiverID string, blockHash []byte, actions []Action, ) *Transaction
NewTransaction creates a new Transaction.