#api-token #risk #token #api #smart-contracts #api-bindings #go-plus

goplus_rs

This repository contains a Rust API wrapper for interacting with GoPlusLabs services for risk metrics and analysis on tokens, smart contracts, and wallets across different chain ecosystems

2 releases (1 stable)

1.0.0 May 13, 2024
0.1.0 May 12, 2024

#22 in #risk

Download history 18/week @ 2024-09-20 2/week @ 2024-09-27

58 downloads per month

MIT/Apache

31KB
608 lines

This repository contains a Rust API wrapper for interacting with GoPlusLabs services for risk metrics and analysis on tokens, smart contracts, and wallets across different chain ecosystems.

Requirements

  • Rust Programming Language
  • reqwest and serde_json crates for HTTP requests and JSON handling, respectively.

Getting Started

  1. Add crate: cargo add goplus_rs

  2. Set app keys as enviornment variables to get access code. (Currently doesn't affect usage but may in the future.)

    export GP_PUBLIC = $APP_PUBLIC_KEY$
    export GP_PUBLIC = $APP_PRIVATE_KEY$
    
  3. Create and use persistant session

     // Tracing initialization
     tracing_subscriber::fmt()
         .with_max_level(Level::INFO) 
         .init();
    
     use goplus_rs;
     let instance = goplus_rs::Session::new();
     let res = instance.supported_chains();
    

Dependencies

~7–23MB
~278K SLoC