Clients - TezosLive.io Endpoint or Azure Functions
If you are using TezosLive.io Endpoint or Azure Functions.

Sample Client

For reference please take a look at AgileVentures.TezPusher.SampleClient. Or you can check out deployed version of this app available at https://client-staging.tezoslive.io/.

1. Getting the url and accessToken from the /api/negotiate

2. Connecting to the SignalR Hub

You need a SignalR client library. In this sample we are using https://www.npmjs.com/package/@aspnet/signalr.
Your usage may vary depending on your programming language and used client library.
Using the data from the /api/negotiate response we can now connect to a SignalR hub, where
  • response.url is the url parameter from /api/negotiate response call
  • response.accessToken is the accessToken parameter from/api/negotiate response call.
1
this.hubConnection = new signalR.HubConnectionBuilder()
2
.withUrl(response.url, { accessTokenFactory: () => response.accessToken })
3
.configureLogging(signalR.LogLevel.Information)
4
.build();
5
6
this.hubConnection.start().catch(err => console.error(err.toString()));
Copied!
You can also check our Sample Client source code and SignalR Client Documentation.

3. Subscribing to updates

4. Unsubscribe from updates