Skip to content

Instantly share code, notes, and snippets.

@plowsof
plowsof / gen_accounts.sh
Last active February 18, 2023 05:57
benchmark creating 300 accounts with 5k sub addresses each then saving / opening
curl http://localhost:18092/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"create_wallet","params":{"filename":"brb20hours","password":"","language":"English"}}' -H 'Content-Type: application/json'
curl http://localhost:18092/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"open_wallet","params":{"filename":"brb20hours","password":""}}' -H 'Content-Type: application/json'
gen_addresses () {
x=1
while [ $x -le 300 ]
do
curl -s -o /dev/null http://localhost:18092/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"create_account","params":{"label":"account '"${x}"'"}}' -H 'Content-Type: application/json'
curl -s -o /dev/null http://localhost:18092/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"create_address","params":{"account_index":'"${x}"',"label":"new-subs","count":5000}}' -H 'Content-Type: application/json'
((x+=1))
@plowsof
plowsof / exit_on_sync.sh
Last active December 8, 2022 07:04
user chillbruh requests starting monerod - exiting when synced
#!/bin/bash
monerod --detach
while [[ "$status" != "true" ]]; do
REQ=$(curl "http://localhost:18081/json_rpc" -d '{"jsonrpc":"2.0","id":"0","method":"get_info"}' -H 'Content-Type: application/json')
status=$(echo $REQ | jq '.result.synchronized')
sleep 120
done
monerod exit
@plowsof
plowsof / parse_make_uri.py
Created December 7, 2022 02:24
create a uri, then parse the uri and compare the response to the original
from monerorpc.authproxy import AuthServiceProxy, JSONRPCException
import uuid
rpc_url = "http://127.0.0.1:18082/json_rpc"
rpc_connection = AuthServiceProxy(service_url=rpc_url)
payments = []
for x in range(500):
@plowsof
plowsof / info.md
Created November 16, 2022 21:06
Request: tryptych funds to Bp++?
@plowsof
plowsof / get_output_number.py
Created November 3, 2022 23:20
get number of outputs the wrong way
import requests
import json
import pprint
from monerorpc.authproxy import AuthServiceProxy, JSONRPCException
import time
rpc_url = "http://127.0.0.1:18082/json_rpc"
rpc_connection = AuthServiceProxy(service_url=rpc_url)
offset = 100
@plowsof
plowsof / p2pool_hashes.py
Last active November 1, 2022 12:18
verify p2pool hashes
import requests
import pprint as pp
import os
import subprocess
import sys
from urllib.request import urlretrieve
#for git --reset hard origin/master
hard_reset_remote = "origin"
#for pushing
@plowsof
plowsof / scan_tx.py
Created October 29, 2022 22:17
test scan_tx latest / oldest txid
from monerorpc.authproxy import AuthServiceProxy, JSONRPCException
import os
import pprint as pp
import sys
wallet_dir = "/some/dir"
daemon_address = ""
rpc_url = "http://127.0.0.1:18084/json_rpc"
test_wallet = ""
rpc_connection = AuthServiceProxy(service_url=rpc_url)