Documentation ¶
Index ¶
- func BroadcastTx(ctx context.Context, conn *grpc.ClientConn, mode tx.BroadcastMode, ...) (*tx.BroadcastTxResponse, error)
- func InheritTxConfig(builder sdkclient.TxBuilder, tx authsigning.Tx) sdkclient.TxBuilder
- func QueryAccount(ctx context.Context, conn *grpc.ClientConn, encCfg encoding.Config, ...) (authtypes.AccountI, error)
- type KeyringSigner
- func (k *KeyringSigner) BuildSignedTx(builder sdkclient.TxBuilder, isSecondary bool, msg ...sdktypes.Msg) (authsigning.Tx, error)
- func (k *KeyringSigner) EncodeTx(tx sdktypes.Tx) ([]byte, error)
- func (k *KeyringSigner) GetSignerData(isSecondary bool) (authsigning.SignerData, error)
- func (k *KeyringSigner) GetSignerInfo() *keyring.Record
- func (k *KeyringSigner) NewTxBuilder(opts ...TxBuilderOption) sdkclient.TxBuilder
- func (k *KeyringSigner) SetAccountNumber(n uint64) error
- func (k *KeyringSigner) SetKeyringAccName(name string)
- func (k *KeyringSigner) SetSecondarySequence(id string, n uint64) error
- func (k *KeyringSigner) SetSequence(n uint64) error
- func (k *KeyringSigner) UpdateAccount(ctx context.Context, conn *grpc.ClientConn) error
- func (k *KeyringSigner) UpdateAccountFromClient(clientCtx client.Context) error
- type TxBuilderOption
- func SetFeeAmount(fees sdk.Coins) TxBuilderOption
- func SetFeeGranter(feeGranter sdk.AccAddress) TxBuilderOption
- func SetFeePayer(feePayer sdk.AccAddress) TxBuilderOption
- func SetGasLimit(limit uint64) TxBuilderOption
- func SetMemo(memo string) TxBuilderOption
- func SetTimeoutHeight(height uint64) TxBuilderOption
- func SetTip(tip *tx.Tip) TxBuilderOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BroadcastTx ¶
func BroadcastTx(ctx context.Context, conn *grpc.ClientConn, mode tx.BroadcastMode, txBytes []byte) (*tx.BroadcastTxResponse, error)
BroadcastTx uses the provided grpc connection to broadcast a signed and encoded transaction
func InheritTxConfig ¶
InheritTxConfig sets all of the accessible configurations from a given tx into a a give client.TxBuilder
Types ¶
type KeyringSigner ¶
type KeyringSigner struct { keyring.Keyring sync.RWMutex // contains filtered or unexported fields }
KeyringSigner uses a keyring to sign and build celestia-app transactions
func NewKeyringSigner ¶
func NewKeyringSigner(encCfg encoding.Config, ring keyring.Keyring, name string, chainID string) *KeyringSigner
NewKeyringSigner returns a new KeyringSigner using the provided keyring
func (*KeyringSigner) BuildSignedTx ¶
func (k *KeyringSigner) BuildSignedTx(builder sdkclient.TxBuilder, isSecondary bool, msg ...sdktypes.Msg) (authsigning.Tx, error)
BuildSignedTx creates and signs a sdk.Tx that contains the provided message. The interal account number must be set by calling k.QueryAccountNumber or by manually setting it via k.SetAccountNumber for the built transactions to be valid.
func (*KeyringSigner) EncodeTx ¶
func (k *KeyringSigner) EncodeTx(tx sdktypes.Tx) ([]byte, error)
EncodeTx uses the keyring signer's encoding config to encode the provided sdk transaction
func (*KeyringSigner) GetSignerData ¶
func (k *KeyringSigner) GetSignerData(isSecondary bool) (authsigning.SignerData, error)
func (*KeyringSigner) GetSignerInfo ¶
func (k *KeyringSigner) GetSignerInfo() *keyring.Record
GetSignerInfo returns the signer info for the KeyringSigner's account. panics if the account in KeyringSigner does not exist.
func (*KeyringSigner) NewTxBuilder ¶
func (k *KeyringSigner) NewTxBuilder(opts ...TxBuilderOption) sdkclient.TxBuilder
NewTxBuilder returns the default sdk Tx builder using the celestia-app encoding config
func (*KeyringSigner) SetAccountNumber ¶
func (k *KeyringSigner) SetAccountNumber(n uint64) error
SetAccountNumber manually sets the underlying account number
func (*KeyringSigner) SetKeyringAccName ¶
func (k *KeyringSigner) SetKeyringAccName(name string)
SetKeyringAccName manually sets the underlying keyring account name
func (*KeyringSigner) SetSecondarySequence ¶
func (k *KeyringSigner) SetSecondarySequence(id string, n uint64) error
SetSecondarySequence manually sets the underlying secondary sequence number
func (*KeyringSigner) SetSequence ¶
func (k *KeyringSigner) SetSequence(n uint64) error
SetSequence manually sets the underlying sequence number
func (*KeyringSigner) UpdateAccount ¶
func (k *KeyringSigner) UpdateAccount(ctx context.Context, conn *grpc.ClientConn) error
Update queries the application to find the latest account number and sequence, updating the respective internal fields. The internal account number must be set by this method or by manually calling k.SetAccountNumber in order for any built transactions to be valid
func (*KeyringSigner) UpdateAccountFromClient ¶
func (k *KeyringSigner) UpdateAccountFromClient(clientCtx client.Context) error
type TxBuilderOption ¶
func SetFeeAmount ¶
func SetFeeAmount(fees sdk.Coins) TxBuilderOption
func SetFeeGranter ¶
func SetFeeGranter(feeGranter sdk.AccAddress) TxBuilderOption
func SetFeePayer ¶
func SetFeePayer(feePayer sdk.AccAddress) TxBuilderOption
func SetGasLimit ¶
func SetGasLimit(limit uint64) TxBuilderOption
func SetMemo ¶
func SetMemo(memo string) TxBuilderOption
func SetTimeoutHeight ¶
func SetTimeoutHeight(height uint64) TxBuilderOption
func SetTip ¶
func SetTip(tip *tx.Tip) TxBuilderOption