deploy
@opcat-labs/scrypt-ts-opcat v1.0.4
@opcat-labs/scrypt-ts-opcat / deploy
Function: deploy()
deploy(
signer,provider,contract,satoshis):Promise\<ExtPsbt>
Defined in: packages/scrypt-ts-opcat/src/features/deploy.ts:24
Deploys a smart contract to the blockchain.
Parameters
signer
The signer used to sign the transaction
provider
The provider for UTXO and chain operations
contract
SmartContract\<StructObject>
The smart contract instance to deploy
satoshis
number = 1
The amount of satoshis to lock in the contract (default: 1)
Returns
Promise\<ExtPsbt>
The finalized PSBT containing the deployment transaction
Remarks
This function handles the complete deployment flow:
- Collects UTXOs from the signer's address
- Creates and signs a PSBT with contract deployment output
- Broadcasts the transaction
- Manages UTXO updates (spent UTXOs and change)