sendFaucetTx sends a faucet transaction using raw JSON
(rpcURL string, signerKey *keyGroup, recipientAddr string, amount, fee, networkID, chainID, height uint64)
| 332 | |
| 333 | // sendFaucetTx sends a faucet transaction using raw JSON |
| 334 | func sendFaucetTx(rpcURL string, signerKey *keyGroup, recipientAddr string, amount, fee, networkID, chainID, height uint64) (string, error) { |
| 335 | // Create the faucet message as JSON map |
| 336 | // protojson expects base64 for bytes fields |
| 337 | faucetMsg := map[string]interface{}{ |
| 338 | "signerAddress": hexToBase64(signerKey.Address), |
| 339 | "recipientAddress": hexToBase64(recipientAddr), |
| 340 | "amount": float64(amount), |
| 341 | } |
| 342 | |
| 343 | return buildSignAndSendTx(rpcURL, signerKey, "faucet", faucetMsg, fee, networkID, chainID, height) |
| 344 | } |
| 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) { |
no test coverage detected