Skip to content

Instantly share code, notes, and snippets.

@rodkeys
rodkeys / App.js
Created September 18, 2020 01:51
import React, { Component } from "react";
import "./App.css";
import Box from "3box";
import { BrowserRouter as Router, Switch, Route } from "react-router-dom";
import "bootstrap/dist/css/bootstrap.min.css";
import Nav from "./components/Nav";
import { BounceLoader } from "react-spinners";
// import ChatBox from "3box-chatbox-react";
import MyStore from "./pages/MyStore";
@rodkeys
rodkeys / sign_test.go
Last active December 19, 2019 01:51
Verify that AddWatchedAddress should never add a script which already represents a key from the appropriate wallet
func TestBitcoinCashWallet_verifyWatchScriptPut(t *testing.T) {
// Verify that AddWatchedAddress should never add a script which already represents a key from the appropriate wallet
w, err := newMockWallet()
if err != nil {
t.Error(err)
}
keys := w.km.GetKeys()
addr, err := w.km.KeyToAddress(keys[0])
if err != nil {
@rodkeys
rodkeys / wallet_service_test.go
Created December 19, 2019 00:45
TestWalletService_AddWatchedScript
func TestWalletService_AddWatchedScript(t *testing.T) {
ws, err := mockWalletService()
if err != nil {
t.Fatal(err)
}
keys := ws.km.GetKeys()
addr, err := ws.km.KeyToAddress(keys[0])
if err != nil {
t.Fatal(err)
@rodkeys
rodkeys / wallet_service_test.go
Created December 19, 2019 00:45
TestWalletService_AddWatchedScript
func TestWalletService_AddWatchedScript(t *testing.T) {
ws, err := mockWalletService()
if err != nil {
t.Fatal(err)
}
keys := ws.km.GetKeys()
addr, err := ws.km.KeyToAddress(keys[0])
if err != nil {
t.Fatal(err)
@rodkeys
rodkeys / Message_OFFLINE_RELAY.go
Created October 16, 2019 19:24
Shows how to generate an OFFLINE_RELAY message in go
package webrelay
import (
"context"
"fmt"
"github.com/OpenBazaar/openbazaar-go/core"
"github.com/OpenBazaar/openbazaar-go/pb"
"github.com/golang/protobuf/proto"
"github.com/golang/protobuf/ptypes/any"
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
I am QmY1rgTAYwvXALRoKRSrVCsd67JaN2A5S9NZufiupATkm3
-----BEGIN PGP SIGNATURE-----
Version: Keybase OpenPGP v2.1.0
Comment: https://keybase.io/crypto
wsFcBAABCgAGBQJcy/hxAAoJEFHB+qe8qmXU6+gQAL7II0GmWelq89dH657BeA0a
zbJqoo3hHELaeS3A64ioHuuVAW3DPTP81ochORzzICOjmGUGq1TSE6saqqeZooNb

Keybase proof

I hereby claim:

  • I am rodkeys on github.
  • I am zokos_ob (https://keybase.io/zokos_ob) on keybase.
  • I have a public key ASBmpZAy1K6Zic0tmOwY3P1LKX89vmSPR_kAPSuSD18Vqgo

To claim this, I am signing this object: