sendSendTx sends a send transaction using raw JSON
(rpcURL string, senderKey *keyGroup, fromAddr, toAddr string, amount, fee, networkID, chainID, height uint64)
| 345 | |
| 346 | // sendSendTx sends a send transaction using raw JSON |
| 347 | func sendSendTx(rpcURL string, senderKey *keyGroup, fromAddr, toAddr string, amount, fee, networkID, chainID, height uint64) (string, error) { |
| 348 | // Create the send message as JSON map |
| 349 | // protojson expects base64 for bytes fields |
| 350 | sendMsg := map[string]interface{}{ |
| 351 | "fromAddress": hexToBase64(fromAddr), |
| 352 | "toAddress": hexToBase64(toAddr), |
| 353 | "amount": float64(amount), |
| 354 | } |
| 355 | |
| 356 | return buildSignAndSendTx(rpcURL, senderKey, "send", sendMsg, fee, networkID, chainID, height) |
| 357 | } |
| 358 | |
| 359 | // sendRewardTx sends a reward transaction using raw JSON |
| 360 | func sendRewardTx(rpcURL string, adminKey *keyGroup, adminAddr, recipientAddr string, amount, fee, networkID, chainID, height uint64) (string, error) { |
no test coverage detected