This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Connect connects node to remote server via TCP | |
func (nd *Node) Connect() bool { | |
// connect to this socket | |
nd.ws = js.Global().Get("WebSocket").New(fmt.Sprintf("ws://%s:%d/ws", nd.toIP, nd.toPort)) | |
nd.ws.Call("addEventListener", "open", js.FuncOf(func(this js.Value, args []js.Value) interface{} { | |
return nil | |
})) | |
nd.ws.Call("addEventListener", "message", js.FuncOf(func(this js.Value, args []js.Value) interface{} { | |
message := args[0].Get("data").String() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Verifying my Blockstack ID is secured with the address 1DkrieQuUHrV4WZdNYqi1nCk7NVgwhh5V6 https://explorer.blockstack.org/address/1DkrieQuUHrV4WZdNYqi1nCk7NVgwhh5V6 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func RegisterCallbacks() { | |
js.Global().Set("reward", js.FuncOf(reward)) | |
js.Global().Set("buyCommodity", js.FuncOf(buyCommodity)) | |
js.Global().Set("networth", js.FuncOf(networth)) | |
js.Global().Set("changeUser", js.FuncOf(changeUser)) | |
js.Global().Set("sendSliderValToWasm", js.FuncOf(sendSliderValToWasm)) | |
} | |
var ( | |
merchant string |
OlderNewer