ClientWithTransactionSigning
Represents a client that can sign transactions without submitting them to the network.
Transaction signing accepts the same flexible inputs as ClientWithTransactionSending — instructions, instruction plans, transaction messages or transaction plans — but stops short of sending the resulting transactions. Use it to hand transactions off to another party, such as an authority wallet signing a transaction that a relayer will pay for and submit later.
Example
See
Type Parameters
| Type Parameter | Default type | Description |
|---|---|---|
TContext extends TransactionPlanResultContext | TransactionPlanResultContext | The context attached to the results. The interface makes no claim about what that context contains: it is entirely decided by the plugin providing the capability, which would typically guarantee a context.transaction on successful results. Note that this differs from ClientWithTransactionSending, whose default context preserves the context.signature guarantee that predates configurable contexts. |
Properties
signTransaction
Signs a single transaction without sending it.
Accepts flexible input: instructions, instruction plans, a single transaction message or a single transaction plan.
Parameters
| Parameter | Type | Description |
|---|---|---|
input | | InstructionPlanInput | SingleTransactionPlan | SingleTransactionPlan["message"] | Instructions, a transaction plan, or a transaction message. |
config? | Config | Optional configuration including an abort signal. |
Returns
Promise<SuccessfulSingleTransactionPlanResult<TContext>>
A promise resolving to the successful transaction result, carrying the
TContext the client was parameterised with.
See
- InstructionPlanInput
- SingleTransactionPlan
signTransactions
Signs one or more transactions without sending them.
Accepts flexible input: instructions, instruction plans, transaction messages or transaction plans.
Parameters
| Parameter | Type | Description |
|---|---|---|
input | InstructionPlanInput | TransactionPlanInput | Any instruction or a transaction plan input. |
config? | Config | Optional configuration including an abort signal. |
Returns
Promise<TransactionPlanResult<TContext>>
A promise resolving to the results for all transactions. Successful leaves carry
the TContext the client was parameterised with.
See
- InstructionPlanInput
- TransactionPlanInput