· 4 years ago · Jul 16, 2021, 04:42 AM
1Sun Dec 20 12:12:17 2020
2Luca_S: \lua 96/4
3BlackDragon_B: Luca
4BlackDragon_B: why doesnt https://krist.ceriat.net/ws/start work
5Luca_S: i have no idea
6Luca_S: how are you trying to use it?
7BlackDragon_B: I want to get a wss url
8BlackDragon_B: according to the documentation it should give me one
9BlackDragon_B: and the pkey is optional
10BlackDragon_B: but /ws/start is not available
11Luca_S: works for me
12Luca_S: how did you try to get it
13Luca_S: what is the whole command
14Luca_S: yeah read the docs
15Luca_S: yeah
16Luca_S: read what it says above the URL
17BlackDragon_B: `{"ok":false,"error":"invalid_token","type":"error"}`
18BlackDragon_B: I can try with a pkey
19Luca_S: establsih a websocket connection
20Luca_S: that can be useful if you want to get notified about transactions happening
21Luca_S: e.g. for shop programs
22BlackDragon_B: {"ok":false,"error":"invalid_token","type":"error"} is this ment to happen?
23Luca_S: are you passing any data?
24BlackDragon_B: uhm
25Luca_S: or is this when you try to connect
26BlackDragon_B: yeah
27BlackDragon_B: or cant I connect?
28Luca_S: hmm actually it seems to be a problem with the krist server
29Luca_S: nevermind
30Luca_S: yopu're probably just too slow
31Luca_S: works perfect for me
32BlackDragon_B: slow what
33BlackDragon_B: internet?
34Luca_S: no you take too long from doing the post request to opening the websocket connection
35BlackDragon_B: ooh
36BlackDragon_B: do you only get 30 seconds or so
37BlackDragon_B: what does the 30 even mean
38Luca_S: i assume it's seconds
39Luca_S: it's actually not documented :/
40BlackDragon_B: ur right
41BlackDragon_B: now i can connect fine
42BlackDragon_B: but for programs
43BlackDragon_B: like
44BlackDragon_B: how do they keep connected
45Luca_S: wdym
46BlackDragon_B: they will loose connection after 30 secs right?
47Luca_S: no
48BlackDragon_B: o damn
49Luca_S: it's just the token that expires after 30 seconds
50BlackDragon_B: ooh
51BlackDragon_B: so its only needed for startup
52BlackDragon_B: ok
53Luca_S: so you need to connect within 30 seconds of POSTing /ws/start but after that it will keep connected
54BlackDragon_B: that should be easy when doing it using a script
55BlackDragon_B: xD
56Luca_S: well it is an API
57Luca_S: so it's meant for programs
58BlackDragon_B: yea xD
59BlackDragon_B: and what would be a valid thing to send
60Luca_S: https://krist.ceriat.net/docs/#api-WebsocketGroup+
61Luca_S: https://krist.ceriat.net/docs/#api-WebsocketGroup
62Luca_S: you need to send json
63BlackDragon_B: ooh
64BlackDragon_B: ooh this seems to work: `{ "id": "12222", "type": "get_subscription_level"}`
65BlackDragon_B: i learn shit
66BlackDragon_B: :)
67BlackDragon_B: and then I filter every message till I find the one with id
68BlackDragon_B: the right id
69BlackDragon_B: I figured it out
70BlackDragon_B: every request needs an id and type
71BlackDragon_B: Luca
72BlackDragon_B: I take the wallet key
73BlackDragon_B: from kristweb
74BlackDragon_B: but then I get into another address
75BlackDragon_B: I get logged in as k4o4h2z1f6
76BlackDragon_B: but the address is k2q38nbhpo
77BlackDragon_B: wow
78BlackDragon_B: I made a window
79BlackDragon_B: hi
80Luca_S: hi
81BlackDragon_B: ok so theres a problem
82BlackDragon_B: I try to put the pkey into there
83BlackDragon_B: but then I find out
84BlackDragon_B: It logs into another account
85BlackDragon_B: `{"ok":true,"isGuest":false,"address":{"address":"ky8my43quv","balance":0,"totalin":0,"totalout":0,"firstseen":"2020-12`
86BlackDragon_B: so this happens
87Luca_S: are you sure you're using your private key and not your password?
88BlackDragon_B: iam sure iam using the pkey
89BlackDragon_B: bcuz
90BlackDragon_B: I made a new address
91BlackDragon_B: with the pkey
92BlackDragon_B: and it also didnt login into the right acc
93BlackDragon_B: `a$X;ay^|y+MOCx44i7>{8ifU=4mTdw8[` this is test wallet so theres no point connecting to it.