Documentation
¶
Overview ¶
Package teztool is an operation injection helper
Index ¶
- func FillAll(a *fillAttrs)
- func FillCounter(a *fillAttrs)
- func FillFee(a *fillAttrs)
- func FillGasLimit(a *fillAttrs)
- func FillStorageLimit(a *fillAttrs)
- func Sign(ctx context.Context, signer Signer, grp *latest.UnsignedOperation) (*latest.SignedOperation, error)
- type FillAttr
- type LocalSigner
- type Signer
- type Tool
- func (t *Tool) Fill(ctx context.Context, group *latest.UnsignedOperation, attributes ...FillAttr) error
- func (t *Tool) FillSignAndInject(ctx context.Context, signer Signer, ops []latest.OperationContents, ...) (*tz.OperationHash, error)
- func (t *Tool) FillSignAndInjectWait(ctx context.Context, signer Signer, ops []latest.OperationContents, ...) (core.OperationsGroup, error)
- func (t *Tool) InjectAndWait(ctx context.Context, req *client.InjectOperationRequest, ...) (core.OperationsGroup, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FillCounter ¶
func FillCounter(a *fillAttrs)
func FillGasLimit ¶
func FillGasLimit(a *fillAttrs)
func FillStorageLimit ¶
func FillStorageLimit(a *fillAttrs)
func Sign ¶
func Sign(ctx context.Context, signer Signer, grp *latest.UnsignedOperation) (*latest.SignedOperation, error)
Types ¶
type LocalSigner ¶
type LocalSigner struct {
crypt.PrivateKey
}
func NewLocalSigner ¶
func NewLocalSigner(priv crypt.PrivateKey) LocalSigner
type Tool ¶
func (*Tool) Fill ¶
func (t *Tool) Fill(ctx context.Context, group *latest.UnsignedOperation, attributes ...FillAttr) error
Fill fills requested missed fields like fee, counter, gas_limit, and storage_limit based on protocol constants, source contract state and the result of operation dry run
func (*Tool) FillSignAndInject ¶
func (t *Tool) FillSignAndInject(ctx context.Context, signer Signer, ops []latest.OperationContents, attributes ...FillAttr) (*tz.OperationHash, error)
FillSignAndInject is an all in one function which fills missing fields and injects the operation without waiting
func (*Tool) FillSignAndInjectWait ¶
func (t *Tool) FillSignAndInjectWait(ctx context.Context, signer Signer, ops []latest.OperationContents, meta client.MetadataMode, attributes ...FillAttr) (core.OperationsGroup, error)
FillSignAndInjectWait is an all in one function which fills missing fields, injects the operation and waits for it to appear on chain
func (*Tool) InjectAndWait ¶
func (t *Tool) InjectAndWait(ctx context.Context, req *client.InjectOperationRequest, meta client.MetadataMode) (core.OperationsGroup, error)
InjectAndWait injects the operation and waits for it to appear on chain
Click to show internal directories.
Click to hide internal directories.