You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
consider how to enable taproot-like contracts as data (related to 2026 functions proposal) #348
With the 2026 functions proposal taproot-like constructions become possible where people have MAST constructions and have to provide the contract as unlocking argument because only the hash of a contract spending path would be stored in the MAST leaves
It's a feature which would likely touch both the compiler and SDK.
@mainnet-pat did some interesting work on a similar feature in the Nexscript fork of CashScript which is designed for the nexa blockchain
In the SDK usage of subcontracts in a MAST like construction looks like this:
import{ElectrumNetworkProvider,McpContract,}from'@nexscript/nexscript';constprovider=newElectrumNetworkProvider();constmcp=newMcpContract(mcpArtifact,[1n,2n,3n],{ provider });// send some satoshis to contract address in order to "deploy" it on chain// await fund(mcp.address, 10000);awaitmcp.execute({contractName: 'A',functionName: 'funcA',parameters: ['A',1n],}).to(aliceAddress,1000n).withoutChange().send();
so a contract object is provided here as unlocking argument to an execute unlocking call on a MAST-like contract
Activity