buildUserOffer
buildUserOffer(
args):UserOffer
makeIntent(desiredInputs, desiredOutputs, {intentId: 'random', payFees: false}):
an offer giving gives and wanting wants, unbalanced by exactly those amounts. Any
unshielded part goes into one intent at a random segment (signed when it spends NIGHT)
and its TTL is the offer's (MIP-0005); a shielded-only offer has no intent, so no TTL.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
args |
{ networkId: string; ttl: Date; shielded: ShieldedWallet; night?: NightSource; gives: OfferPart[]; wants: WantPart[]; } |
args.networkId |
string |
args.ttl |
Date |
args.shielded |
ShieldedWallet |
args.night? |
NightSource |
args.gives |
OfferPart[] |
args.wants |
WantPart[] |
Returns
Section titled “Returns”UserOffer