All Projects → bonustrack → Libra Grpc

bonustrack / Libra Grpc

Licence: mit
A lightweight JavaScript library for Libra

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Libra Grpc

Openapi Sdk Php Client
Official repository of the Alibaba Cloud Client for PHP
Stars: ✭ 206 (+198.55%)
Mutual labels:  sdk, client
Aliyun Cli
Alibaba Cloud CLI
Stars: ✭ 561 (+713.04%)
Mutual labels:  sdk, client
Terraform Plugin Sdk
Terraform Plugin SDK enables building plugins (providers) to manage any service providers or custom in-house solutions
Stars: ✭ 201 (+191.3%)
Mutual labels:  grpc, sdk
Open62541
Open source implementation of OPC UA (OPC Unified Architecture) aka IEC 62541 licensed under Mozilla Public License v2.0
Stars: ✭ 1,643 (+2281.16%)
Mutual labels:  sdk, client
Gentleman
Full-featured, plugin-driven, extensible HTTP client toolkit for Go
Stars: ✭ 886 (+1184.06%)
Mutual labels:  sdk, client
Meilisearch Js
Javascript client for the MeiliSearch API
Stars: ✭ 183 (+165.22%)
Mutual labels:  sdk, client
Polyglot
A universal grpc command line client
Stars: ✭ 488 (+607.25%)
Mutual labels:  grpc, client
Aliyun Openapi Java Sdk
Alibaba Cloud SDK for Java
Stars: ✭ 1,170 (+1595.65%)
Mutual labels:  sdk, client
Libra Sdk Go
Go SDK for the Libra cryptocurrency
Stars: ✭ 23 (-66.67%)
Mutual labels:  grpc, sdk
Graphql
Simple low-level GraphQL HTTP client for Go
Stars: ✭ 682 (+888.41%)
Mutual labels:  sdk, client
Flickr Sdk
Almost certainly the best Flickr API client in the world for node and the browser
Stars: ✭ 104 (+50.72%)
Mutual labels:  sdk, client
Grpc Auth Example
Examples of client authentication with gRPC
Stars: ✭ 65 (-5.8%)
Mutual labels:  grpc, client
Uploadcare Php
PHP API client that handles uploads and further operations with files by wrapping Uploadcare Upload and REST APIs.
Stars: ✭ 77 (+11.59%)
Mutual labels:  sdk, client
Sdk
Library for using Grafana' structures in Go programs and client for Grafana REST API.
Stars: ✭ 193 (+179.71%)
Mutual labels:  sdk, client
Meilisearch Python
Python wrapper for the MeiliSearch API
Stars: ✭ 75 (+8.7%)
Mutual labels:  sdk, client
Aliyun Openapi Net Sdk
Alibaba Cloud SDK for .NET
Stars: ✭ 467 (+576.81%)
Mutual labels:  sdk, client
Milo
Eclipse Milo™ - an open source implementation of OPC UA (IEC 62541).
Stars: ✭ 587 (+750.72%)
Mutual labels:  sdk, client
Openapi Core Ruby Sdk
Alibaba Cloud Core SDK for Ruby
Stars: ✭ 29 (-57.97%)
Mutual labels:  sdk, client
Vainglory
(*DEPRECATED*: The API no longer exists, so this will no longer work) A Javascript API Client wrapper for Vainglory
Stars: ✭ 32 (-53.62%)
Mutual labels:  sdk, client
Ultimatemrz Sdk
Machine-readable zone/travel document (MRZ / MRTD) detector and recognizer using deep learning
Stars: ✭ 66 (-4.35%)
Mutual labels:  sdk

npm Join the chat

Libra gRPC

A lightweight JavaScript library for Libra

Node.js

To install Libra gRPC on Node.js, open your terminal and run:

npm install libra-grpc --save

Usage

var libra = require('libra-grpc');

// Init gRPC client
var client = new libra.Client('ac.testnet.libra.org:8000');

// Get account state
var params = {
  address: Buffer.from('435fc8fc85510cf38a5b0cd6595cbb8fbb10aa7bb3fe9ad9820913ba867f79d4', 'hex')
};
client.request('get_account_state', params, function(err, result) {
  console.log(err, result);
});

// If a callback is not provided, a Promise is returned
client.request('get_account_state', params).then(function(result) {
  console.log(result);
});

See more examples

API

Get account state

Get the latest state for an account.

var params = {
  address: Buffer.from('435fc8fc85510cf38a5b0cd6595cbb8fbb10aa7bb3fe9ad9820913ba867f79d4', 'hex')
};
client.request('get_account_state', params, function(err, result) {
  console.log(err, result);
});

Get account transaction

Get the committed transaction by account and sequence number.

var params = {
  account: Buffer.from('435fc8fc85510cf38a5b0cd6595cbb8fbb10aa7bb3fe9ad9820913ba867f79d4', 'hex'),
  sequence_number: 1,
  fetch_events: true
};
client.request('get_account_transaction_by_sequence_number', params, function(err, result) {
  console.log(err, result);
});

Get events

Get event by account and path.

var params = {
  access_path: {
    address: Buffer.from('435fc8fc85510cf38a5b0cd6595cbb8fbb10aa7bb3fe9ad9820913ba867f79d4', 'hex')
  },
  start_event_seq_num: 2,
  ascending: true,
  limit: 10
};
client.request('get_events_by_event_access_path', params, function(err, result) {
  console.log(err, result);
});

Get transactions

Get the committed transaction by range

var params = {
  start_version: 1,
  limit: 10,
  fetch_events: true
};
client.request('get_transactions', params, function(err, result) {
  console.log(err, result);
});

Getting help

If you believe you're experiencing a bug with or want to report incorrect documentation, open an issue on our issue tracker. For a more real-time avenue of communication, check out the Discord or Telegram servers. There you'll find community members who can help answer about development questions.

License

MIT.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].