MCPcopy
hub / github.com/canopy-network/canopy / hexToBase64

Function hexToBase64

plugin/go/tutorial/rpc_test.go:328–331  ·  view source on GitHub ↗

hexToBase64 converts a hex string to base64 (for protojson bytes encoding)

(hexStr string)

Source from the content-addressed store, hash-verified

326
327// hexToBase64 converts a hex string to base64 (for protojson bytes encoding)
328func hexToBase64(hexStr string) string {
329 bytes, _ := hex.DecodeString(hexStr)
330 return base64.StdEncoding.EncodeToString(bytes)
331}
332
333// sendFaucetTx sends a faucet transaction using raw JSON
334func sendFaucetTx(rpcURL string, signerKey *keyGroup, recipientAddr string, amount, fee, networkID, chainID, height uint64) (string, error) {

Callers 3

sendFaucetTxFunction · 0.70
sendSendTxFunction · 0.70
sendRewardTxFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected