Skip to content

Transaction class

Transaction collects operations and handles preparation, signing, and optional broadcast.

export function createUnsignedTransaction(provider = new Provider(MAINNET_RPC)) {
  return new Transaction({ provider });
}

View complete file · Run example

This example creates an empty unsigned transaction only. State-changing examples elsewhere in these docs default to testnet and require an explicit broadcast flag.