Skip to main content

call

scrypt-ts-opcat v1.0.1


scrypt-ts-opcat / call

Function: call()

call\<Contract>(signer, provider, contract, contractCall, options?): Promise\<ExtPsbt>

Defined in: packages/scrypt-ts-opcat/src/features/call.ts:53

Calls a smart contract method and broadcasts the transaction.

Type Parameters

Contract extends SmartContract\<StructObject>

Parameters

signer

Signer

The signer to sign the transaction

provider

UtxoProvider & ChainProvider

The provider to interact with the blockchain

contract

Contract

The smart contract instance to call

contractCall

ContractCall\<Contract>

The contract method call details

options?

CallOptions

Optional call configuration (fee rate, change address, etc.)

Returns

Promise\<ExtPsbt>

A promise resolving to the signed PSBT (Partially Signed Bitcoin Transaction)

Remarks

  • Automatically handles UTXO selection and change calculation
  • Supports contract outputs if specified in options
  • Can include backtrace information if enabled
  • Broadcasts the transaction by default (can be disabled with unfinalize option)