Documentation ¶
Index ¶
- Constants
- Variables
- func AddTransferOpTransaction(to string, amount int64, op *types.Op) (*types.Op, error)
- func BuildTransaction(op *types.Op, fee int64, key types.Key, opts *CallOptions) error
- func CalculateMinFee(o types.Operation, gas int64, withHeader bool, p *types.Params) int64
- func CompleteTransaction(o *types.Op, key types.Key, opts *CallOptions) error
- func GenerateKeyPair() (string, string, error)
- func GetAddress(publicKey string) (string, error)
- func GetAddressByPrivateKey(privateKey string) (string, error)
- func GetAddressByPublicKey(publicKey string) (string, error)
- func InitOperationSourceBranch(from string, op *types.Op, opts *CallOptions) error
- func NewDelegationTransaction(from, to string, opts *CallOptions) (*types.Op, error)
- func NewDelegationTransactionByOperation(from, to string, op *types.Op, opts *CallOptions) (*types.Op, error)
- func NewJakartanetDelegationTransaction(from, to string, opts *CallOptions) (*types.Op, error)
- func NewJakartanetTransaction(from, to string, amount int64, opts *CallOptions) (*types.Op, error)
- func NewJakartanetUnDelegationTransaction(from string, opts *CallOptions) (*types.Op, error)
- func NewTransaction(from, to string, amount int64, opts *CallOptions) (*types.Op, error)
- func NewTransactionByOperation(from, to string, amount int64, op *types.Op, opts *CallOptions) (*types.Op, error)
- func NewUnDelegationTransaction(from string, opts *CallOptions) (*types.Op, error)
- func NewUnDelegationTransactionByOperation(from string, op *types.Op, opts *CallOptions) (*types.Op, error)
- func SignTransaction(op *types.Op, privateKey string, opts *CallOptions) ([]byte, error)
- func ValidAddress(addr string) (bool, error)
- type CallOptions
Constants ¶
View Source
const GasSafetyMargin int64 = 100
Variables ¶
View Source
var DefaultOptions = CallOptions{
MaxFee: 1_000_000,
}
Functions ¶
func BuildTransaction ¶
func CalculateMinFee ¶
CalculateMinFee returns the minimum fee at/above which bakers will accept this operation under default config settings.
func CompleteTransaction ¶
CompleteTransaction ensures an operation is compatible with the current source account's on-chain state. Sets branch for TTL control, replay counters, and reveals the sender's pubkey if not published yet.
func GenerateKeyPair ¶
func GetAddress ¶
func GetAddressByPrivateKey ¶
func GetAddressByPublicKey ¶
func InitOperationSourceBranch ¶
func InitOperationSourceBranch(from string, op *types.Op, opts *CallOptions) error
func NewDelegationTransaction ¶
func NewDelegationTransaction(from, to string, opts *CallOptions) (*types.Op, error)
func NewJakartanetDelegationTransaction ¶
func NewJakartanetDelegationTransaction(from, to string, opts *CallOptions) (*types.Op, error)
func NewJakartanetUnDelegationTransaction ¶
func NewJakartanetUnDelegationTransaction(from string, opts *CallOptions) (*types.Op, error)
func NewTransaction ¶
func NewUnDelegationTransaction ¶
func NewUnDelegationTransaction(from string, opts *CallOptions) (*types.Op, error)
func SignTransaction ¶
func ValidAddress ¶
Types ¶
type CallOptions ¶
type CallOptions struct { MaxFee int64 // max acceptable fee, optional (default = 0) IgnoreLimits bool // ignore simulated limits and use user-defined limits from op // custom options BlockHash types.BlockHash Counter int64 // number of times counters NeedReveal bool }
func NewCallOptions ¶
func NewCallOptions(blockHash string, counter int64, needReveal bool) *CallOptions
Click to show internal directories.
Click to hide internal directories.