The following subsections describe the smart contract api for both the brokerage/aggregation contract as well as for abstract account contracts.