{"id":24755219,"url":"https://github.com/ranjbar-dev/ethereum-wallet","last_synced_at":"2026-05-18T05:47:29.047Z","repository":{"id":64300592,"uuid":"571608051","full_name":"ranjbar-dev/ethereum-wallet","owner":"ranjbar-dev","description":"ethereum wallet package for creating and generating wallet, transferring ETH, getting wallet balance and crawling blocks to find wallet transactions","archived":false,"fork":false,"pushed_at":"2022-12-05T09:33:34.000Z","size":32,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-01-28T12:41:10.339Z","etag":null,"topics":["address","eth","ethereum","sign","transaction","wallet"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ranjbar-dev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-11-28T13:55:18.000Z","updated_at":"2023-02-19T05:50:47.000Z","dependencies_parsed_at":"2023-01-15T09:15:55.000Z","dependency_job_id":null,"html_url":"https://github.com/ranjbar-dev/ethereum-wallet","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ranjbar-dev%2Fethereum-wallet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ranjbar-dev%2Fethereum-wallet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ranjbar-dev%2Fethereum-wallet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ranjbar-dev%2Fethereum-wallet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ranjbar-dev","download_url":"https://codeload.github.com/ranjbar-dev/ethereum-wallet/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245061379,"owners_count":20554563,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["address","eth","ethereum","sign","transaction","wallet"],"created_at":"2025-01-28T12:37:25.876Z","updated_at":"2025-10-28T21:39:21.679Z","avatar_url":"https://github.com/ranjbar-dev.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ethereum-wallet\nethereum wallet package for creating and generating wallet, transferring ETH, getting wallet balance and crawling blocks to find wallet transactions\n\n\n### Installation\n```\ngo get github.com/ranjbar-dev/ethereum-wallet@v1.0.6\n```\n\n### Test\ntest for `Crawler`, `EthereumWallet` and `Token` located at /test\n```\ngo test ./test\n```\n\n\n### Nodes \nusing infura nodes in this repository \nregister at infura and get your http and ws node on mainnet, goerli or sepolia network and set it here \n```\nnode := ethereumWallet.Node{\n\t\tHttp: \"https://goerli.infura.io/v3/89aae5ec52f9450ebe4fc58cbb8138fd\",\n\t\tWs:   \"wss://goerli.infura.io/ws/v3/89aae5ec52f9450ebe4fc58cbb8138fd\",\n}\n```\n\n### Wallet methods\n- generating ethereum wallet\n```\nw := GenerateEthereumWallet(node)\nw.Address // strnig \nw.PrivateKey // strnig \nw.PublicKey // strnig \n```\n- creating ethereum wallet from private key\n```\nw := CreateEthereumWallet(node,privateKeyHex)\nw.Address // strnig \nw.PrivateKey // strnig \nw.PublicKey // strnig \n```\n- getting wallet ETH balance\n```\nbalanceInWei,err := w.Balance()\nbalanceInWei // int64 \n```\n- getting wallet ERC20 balance\n```\nbalanceInTokenSubAmount,err := w.BalanceERC20(token)\nbalanceInTokenSubAmount // int64 \n```\n- crawl blocks for addresses transactions\n```\n\nc := \u0026Crawler{\n\t\tNode: node, \n\t\tAddresses: []string{\n\t\t\t\"0x5A2187B6d76a09F649CDC5d69F182697cFBA126B\", // list of your addresses\n\t\t},\n\t}\n\t\nres, err := c.ScanBlocks(40) // scan latest 40 block on block chain and extract addressess transactions \n\nExample \n// *\n{\n    {\n        \"address\": \"TY3PJu3VY8xVUc5BjYwJtyRgP7TfivV666\",\n        \"tranasctions\": {\n            {\n                \"tx_id\": \"0xa1d76647e2c9ff4ceeda382137e7af9bb2879fce96cfc743d7138a8d54e532db\",\n                \"from_address\": \"0x5a2187b6d76a09f649cdc5d69f182697cfba126b\",\n                \"to_address\": \"0x75c07e7207bb00cf60c77f2506d7ce2b8d18bf0f\",\n                \"amount\": \"21000000000\",\n                \"confirmations\": 2,\n            }\n        }\n    },\n    ...\n}\n* // \n\t\n```\n\nEstimate transfer eth fee\n```\nfeeInWei,err := w.EstimateTransferFee(\"tb1q0r23g66m9rhhak8aahsg53wfp5egt2huuc4tnu\")\nfeeInWei // int64\n```\n\nEstimate transfer erc20 fee\n```\nfeeInWei,err := w.EstimateTransferERC20Fee(token)\nfeeInWei // int64\n```\n\n- transfer ETH from wallet\n```\ntxId, err := w.Transfer(toAddressHex, amount)\ntxId // string \n```\n- transfer ERC20 from wallet\n```\ntxId, err := w.TransferERC20(token, toAddressHex, amount)\ntxId // string \n```\n\n\n### Token methods\n- declaring token\n```\ntoken := \u0026ethereumWallet.Token{\n    ContractAddress: enums.GOERLI_USDC\n}\n```\n- Getting token name\n```\ntoken.GetName(w.Node, w.AddressHex) // return string,error\n``` \n- Getting token symbol\n```\ntoken.GetSymbol(w.Node, w.AddressHex) // return string,error\n```\n- Getting token decimals\n```\ntoken.GetDecimals(w.Node, w.AddressHex) // return int64,error\n```\n\n```\nI simplified this repository github.com/ethereum/go-ethereum to create this package\nYou can check go it for better examples and functionalities\n```\n\n### Supported contracts\ncheck enums/contracts file alternatively you can create your own contract\n```\ncontractAddress := enums.CreateContractAddress(\"0x509Ee0d083DdF8AC028f2a56731412edD63223B9\")\n```\n\n### ETH goerli Faucet\ncheck this link https://goerlifaucet.com\n\n### USDC goerli Faucet\ncheck this link https://usdcfaucet.com/\n \n### Important\nI simplified this repository github.com/ethereum/go-ethereum repository to create this package You can check go it for better examples and functionalities and do not use this package in production, I created this package for education purposes.\n\n### Donation\nAddress `0xe342C7ff6a91dF208Fb4bE6Eca02e19D624188C1`","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Franjbar-dev%2Fethereum-wallet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Franjbar-dev%2Fethereum-wallet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Franjbar-dev%2Fethereum-wallet/lists"}