SecretNetwork icon indicating copy to clipboard operation
SecretNetwork copied to clipboard

secretcli for new comers...

Open Subfortytwo opened this issue 4 years ago • 18 comments

Hi, I would like to use secretcli/secretd instead of Keplr, so I don't need a browser. I found this resource: https://build.scrt.network/light-client-mainnet.html but the node tcp://secret-2.node.enigma.co:26657 is dead. Where can I connect to? Can you recommend a resource that is a bit more up to date, for total noobs that don't want to use the browser anymore?

Thank you very much.

Subfortytwo avatar Nov 26 '21 16:11 Subfortytwo

https://docs.scrt.network/cli/install-cli.html

Cc @moonstash @dylanschultzie

assafmo avatar Dec 12 '21 20:12 assafmo

How do you use secretcli now? I am no more able to.

$ ./secretcli  q account  secret15958gnfqayr3eunp6vljkgp3mdf55pnuwgjlhc 
Error: error unmarshalling: invalid character '<' looking for beginning of value

Ty

Subfortytwo avatar Jan 14 '22 16:01 Subfortytwo

@Subfortytwo please do secretcli q bank balances {account}

dylanschultzie avatar Jan 14 '22 16:01 dylanschultzie

Also please use: https://docs.scrt.network/, alongside api.scrt.network:26657

dylanschultzie avatar Jan 14 '22 16:01 dylanschultzie

Thanks for your quick answer.

$ ./secretcli  q bank balances  secret15958gnfqayr3eunp6vljkgp3mdf55pnuwgjlhc 
Error: error unmarshalling: invalid character '<' looking for beginning of value

Error is the same. Here is a HTTP dumpu:

POST / HTTP/1.1
Host: api.scrt.network:26657
User-Agent: Go-http-client/1.1
Content-Length: 244
Content-Type: application/json

{"jsonrpc":"2.0","id":0,"method":"abci_query","params":{"data":"0A2D7365637265743135393538676E66716179723365756E7036766C6A6B6770336D64663535706E7577676A6C686312021864","height":"0","path":"/cosmos.bank.v1beta1.Query/AllBalances","prove":false}}HTTP/1.1 404 Not Found
Server: nginx
Date: Fri, 14 Jan 2022 16:29:57 GMT
Content-Type: text/html
Content-Length: 162
Connection: keep-alive

<html>
<head><title>404 Not Found</title></head>
<body bgcolor="white">
<center><h1>404 Not Found</h1></center>
<hr><center>nginx</center>
</body>
</html>


Subfortytwo avatar Jan 14 '22 16:01 Subfortytwo

Screen Shot 2022-01-14 at 8 35 35 AM

dylanschultzie avatar Jan 14 '22 16:01 dylanschultzie

@Subfortytwo what version are you running?

dylanschultzie avatar Jan 14 '22 16:01 dylanschultzie

Can you do secretcli config and show the output?

dylanschultzie avatar Jan 14 '22 16:01 dylanschultzie

$ ./secretcli config
{
	"chain-id": "secret-4",
	"keyring-backend": "os",
	"output": "json",
	"node": "http://api.scrt.network:26657",
	"broadcast-mode": "sync"
}

$ ./secretcli version
0.0.02

Subfortytwo avatar Jan 14 '22 16:01 Subfortytwo

AH. Don't use 0.0.02. It's a test release - use 1.2.0. @Subfortytwo

@assafmo can we have 0.0.02 and 0.0.01 removed/not marked as latest somehow?

dylanschultzie avatar Jan 14 '22 16:01 dylanschultzie

I do have the same with version 1.2.0 and 1.2.2. With 1.2.0-12-g4bd4ebe3:

POST / HTTP/1.1
Host: api.scrt.network:26657
User-Agent: Go-http-client/1.1
Content-Length: 244
Content-Type: application/json

{"jsonrpc":"2.0","id":0,"method":"abci_query","params":{"data":"0A2D7365637265743135393538676E66716179723365756E7036766C6A6B6770336D64663535706E7577676A6C686312021864","height":"0","path":"/cosmos.bank.v1beta1.Query/AllBalances","prove":false}}

I am guessing: /cosmos.bank.v1beta1.Query/AllBalances is wrong?

Subfortytwo avatar Jan 14 '22 16:01 Subfortytwo

Btw it used to work.

Subfortytwo avatar Jan 14 '22 16:01 Subfortytwo

@Subfortytwo ah. it appears the community api is down.

dylanschultzie avatar Jan 14 '22 16:01 dylanschultzie

So which one are you using in the previous screenshot? Is it available for us?

Subfortytwo avatar Jan 14 '22 16:01 Subfortytwo

@Subfortytwo that's my node, @assafmo is there one other than the community api that's available?

dylanschultzie avatar Jan 14 '22 17:01 dylanschultzie

The community api works fine for me from cli

api.scrt.network:26657

PrivatePixels avatar Jan 14 '22 17:01 PrivatePixels

Do you mind pasting a HTTP trace?

Connecting with the browser on http://api.scrt.network:26657/ is working on my side. I am just getting a 404 from the balance query.

Subfortytwo avatar Jan 14 '22 17:01 Subfortytwo

Same behavior as @Subfortytwo here

dylanschultzie avatar Jan 14 '22 17:01 dylanschultzie