golem-base-sdk
    Preparing search index...

    Type Alias GolemBaseWalletActions

    Type definition for GolemBase wallet actions that enable writing operations to the blockchain. These methods handle transaction creation and submission.

    type GolemBaseWalletActions = {
        createRawStorageTransaction(
            payload: `0x${string}`,
            gas: undefined | bigint,
            maxFeePerGas: undefined | bigint,
            maxPriorityFeePerGas: undefined | bigint,
        ): Promise<`0x${string}`>;
        sendGolemBaseTransaction(
            creates?: GolemBaseCreate[],
            updates?: GolemBaseUpdate[],
            deletes?: `0x${string}`[],
            extensions?: GolemBaseExtend[],
            gas?: bigint,
            maxFeePerGas?: bigint,
            maxPriorityFeePerGas?: bigint,
        ): Promise<`0x${string}`>;
        sendGolemBaseTransactionAndWaitForReceipt(
            creates?: GolemBaseCreate[],
            updates?: GolemBaseUpdate[],
            deletes?: `0x${string}`[],
            extensions?: GolemBaseExtend[],
            args?: {
                gas?: bigint;
                maxFeePerGas?: bigint;
                maxPriorityFeePerGas?: bigint;
                txHashCallback?: (txHash: Hex) => void;
            },
        ): Promise<TransactionReceipt>;
    }
    Index

    Methods

    • Create and submit a raw storage transaction with pre-encoded payload. This is a low-level method used internally by higher-level operations.

      Parameters

      • payload: `0x${string}`
      • gas: undefined | bigint
      • maxFeePerGas: undefined | bigint
      • maxPriorityFeePerGas: undefined | bigint

      Returns Promise<`0x${string}`>

    • Send a GolemBase transaction with entity operations and return the transaction hash. This method submits the transaction but doesn't wait for confirmation.

      Parameters

      Returns Promise<`0x${string}`>

    • Send a GolemBase transaction and wait for the blockchain receipt. This method provides complete transaction lifecycle handling with error reporting.

      Parameters

      • Optionalcreates: GolemBaseCreate[]
      • Optionalupdates: GolemBaseUpdate[]
      • Optionaldeletes: `0x${string}`[]
      • Optionalextensions: GolemBaseExtend[]
      • Optionalargs: {
            gas?: bigint;
            maxFeePerGas?: bigint;
            maxPriorityFeePerGas?: bigint;
            txHashCallback?: (txHash: Hex) => void;
        }

      Returns Promise<TransactionReceipt>