@@ 269-279 (lines=11) @@ | ||
266 | * |
|
267 | * @return json { object ... } |
|
268 | */ |
|
269 | public function addInput(string $txname, string $address, int $amount) |
|
270 | { |
|
271 | $result = $this->callEndpoint('add-input', 'POST', [ |
|
272 | 'tx-name' => $txname, |
|
273 | 'address' => $address, |
|
274 | 'amount' => $amount, |
|
275 | ]); |
|
276 | ||
277 | // return Result |
|
278 | return $result; |
|
279 | } |
|
280 | ||
281 | /** |
|
282 | * Adds a factoid address output to the transaction. |
|
@@ 288-298 (lines=11) @@ | ||
285 | * |
|
286 | * @return json { object ... } |
|
287 | */ |
|
288 | public function addOutput(string $txname, string $address, int $amount) |
|
289 | { |
|
290 | $result = $this->callEndpoint('add-output', 'POST', [ |
|
291 | 'tx-name' => $txname, |
|
292 | 'address' => $address, |
|
293 | 'amount' => $amount, |
|
294 | ]); |
|
295 | ||
296 | // return Result |
|
297 | return $result; |
|
298 | } |
|
299 | ||
300 | /** |
|
301 | * When adding entry credit outputs, the amount given is in factoshis, not entry credtis. |
|
@@ 307-317 (lines=11) @@ | ||
304 | * |
|
305 | * @return json { object ... } |
|
306 | */ |
|
307 | public function addEcOutput(string $txname, string $address, int $amount) |
|
308 | { |
|
309 | $result = $this->callEndpoint('add-ec-output', 'POST', [ |
|
310 | 'tx-name' => $txname, |
|
311 | 'address' => $address, |
|
312 | 'amount' => $amount, |
|
313 | ]); |
|
314 | ||
315 | // return Result |
|
316 | return $result; |
|
317 | } |
|
318 | ||
319 | /** |
|
320 | * Addfee is a shortcut and safeguard for adding the required additonal factoshis to covert the fee. |