| Crates.io | sunspot |
| lib.rs | sunspot |
| version | 0.1.3 |
| created_at | 2023-09-09 22:08:52.039283+00 |
| updated_at | 2023-09-29 22:32:25.305418+00 |
| description | Proxy server for Solflare Wallet to re-enable custom RPC endpoints |
| homepage | |
| repository | https://github.com/staratlasmeta/sunspot/ |
| max_upload_size | |
| id | 968412 |
| size | 159,386 |
Sunspot is a proxy server that enables custom RPC urls and custom token metadata lists for the Solflare Solana wallet.
cargo install sunspot
chmod +x generate-cert.sh
./generate-cert.sh
mkdir -p ./certs
openssl genrsa -out ./certs/sunspot.key 2048
openssl req -x509 -new -nodes -key ./certs/sunspot.key -sha256 -days 1825 -out ./certs/sunspot.pem
Authorities tab and then Importsunspot.pem file from the certs directoryTrust this certificate for identifying websites and click OKCertificatesView Certificates, go to the Authorities tab, and then click Importsunspot.pem file from the certs directoryTrust this CA to identify websites. and click OKRestore from fileOmegaOptions.bak file from the switchy-omega-proxy directoryApply Changes and enable the auto switch option through the extension iconUsing the Testnet RPC option for Solflare is recommended. This will cause Solflare to route transactions through Testnet nodes, so if an API changes unexpectedly, real transactions won't be routed to Mainnet-Beta. Testnet also disables some features, which is what we want since Sunspot can't support everything (yet)!
sunspot --help
sunspot -k ./certs/sunspot.key -c ./certs/sunspot.pem http://localhost:8899
Sunspot allows you to provide a custom token-list JSON file, which is used to add custom names, symbols, and imageURIs to tokens in both the wallet view and during simulations.
{
"<Token Mint String>": {
"name": "<Token Name>",
"symbol": "<Token Symbol>",
"imageUri": "<Token Image URI>"
},
// USD Coin Example
"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v": {
"name": "USD Coin",
"symbol": "USDC",
"imageUri": "https://assets.coingecko.com/coins/images/6319/large/USD_Coin_icon.png?1547042389"
}
}
You can pass this file to Sunspot using the --token-list (-t) flag.
sunspot -k ./certs/sunspot.key -c ./certs/sunspot.pem -t ./tokens.json http://localhost:8899
Special thanks to the Hudsucker crate for the MITM HTTP/S proxy implementation