Minimal EventEmitter interface that is molded against the Node.js EventEmitter interface.

Hierarchy (view full)

Implementation

  • Initializes a new instance of the Aptos client with the provided configuration settings. This allows you to interact with the Aptos blockchain using the specified network and options.

    Parameters

    • config: AptosConfig

      The configuration settings for the Aptos client.

    Returns TransactionManagement

    import { Aptos, AptosConfig, Network } from "@aptos-labs/ts-sdk";

    async function runExample() {
    // Create a configuration for the Aptos client
    const config = new AptosConfig({
    network: Network.TESTNET, // specify the network to use
    nodeUrl: "https://testnet.aptos.dev" // replace with your node URL
    });

    // Initialize the Aptos client with the configuration
    const aptos = new Aptos(config);

    console.log("Aptos client initialized successfully.");
    }
    runExample().catch(console.error);

Methods

  • Return the number of listeners listening to a given event.

    Parameters

    Returns number

  • Remove all listeners, or those of the specified event.

    Parameters

    • Optionalevent: keyof TransactionWorkerEvents

    Returns this

Properties

account: Account
config: AptosConfig
transactionWorker: TransactionWorker
prefixed: string | boolean
MMNEPVFCICPMFPCPTTAAATR