While a stream is proposed, stakeholders exercise approval, the payer starts by locking Amulet funds (LockFundsInput), or either side may edit, withdraw, or run change party flows. Most builders return Command except approve and start, which return CommandWithDisclosedContracts with an empty disclosed list—pair with validator-built disclosure from utils when your submission requires it.
Receiver
ocp.PaymentStreams.proposedPaymentStream
buildApproveCommand
proposedPaymentStreamContractId(required)actor(required)
Returns: CommandWithDisclosedContracts — ProposedPaymentStream_Approve.
buildStartPaymentStreamCommand
proposedPaymentStreamContractId(required)lockFundsInput(required) —LockFundsInput:amuletInputs—string[]contract idsamountToLock— decimal stringpaymentContext—{ amuletRulesCid, openMiningRoundCid, featuredAppRight: string | null }(useutils.buildPaymentContext/buildPaymentContextWithAmulets)
Returns: CommandWithDisclosedContracts — ProposedPaymentStream_StartPaymentStream.
buildEditPaymentStreamProposalCommand
proposedPaymentStreamContractId(required)actor(required)changes(required) —PaymentStreamProposalChanges: optional partial updates (payer,recipient,recipientProvider, amounts, times,prepayWindow,observers, etc.—see source).description(optional)
Returns: Command.
buildChangePartyCommand
proposedPaymentStreamContractId(required)partyType(required) —'Payer' | 'Recipient' | 'Processor'oldParty,newParty(required)
Returns: Command — ProposedPaymentStream_ChangeParty.
buildWithdrawCommand
proposedPaymentStreamContractId(required)actor(required)description(optional) — passed asnullif omitted
Returns: Command — ProposedPaymentStream_Withdraw.
Errors
These builders are thin wrappers; ledger errors apply at submit. For payment context assembly see OcpValidationError on buildPaymentContextWithAmulets when the payer has no amulets or insufficient balance (utils).