Velo-Protocol
  • Welcome to Velo-Protocol
  • 🏀 GETTING STARTED
  • Prerequisite
  • Architecture
  • 🏀 BASE CONCEPTS
    • DRS Mechanism
    • Setup stable credit
    • Mint stable credit
    • Redeem stable credit
    • Rebalancing the Reserve and Collateral Pool
  • 🏀 USING CLI
    • Using CLI
    • Setup table credit
    • Mint stable credit
    • Redeeming stable credit
    • Rebalancing the Reserve and Collateral Pool
  • 🏀 USING SDK
    • Using SDK
    • Setup stable credit
    • Mint stable credit
    • Redeeming stable credit
    • Rebalancing the Reserve and Collateral Pool
Powered by GitBook
On this page
  1. 🏀 USING SDK

Using SDK

Using Go SDK in your project

PreviousRebalancing the Reserve and Collateral PoolNextSetup stable credit

Last updated 4 years ago

Was this helpful?

CtrlK

Was this helpful?

When using SDK, the client will make a request to Velo Node and response with a Evrynet Transaction. The SDK will then submit it to Evrynet.

At the moment, only have SDK available for Go Lang

Initialisation

Import the SDK into your project path.

github.com/velo-protocol/DRSv2_Evrynet/vclient
package main

import "github.com/velo-protocol/DRSv2_Evrynet/vclient"

func main() {
	// ...

  // Init Velo SDK client
	client, err := vclient.NewClient("<evrynet rpc>", "<account private key>", ContractAddress{
		DrsAddress:   "<drs address>",  
		HeartAddress: "<heart address>", 
	})
	if err != nil {
		log.Println(err)
		return
	}
	defer func() {
		_ = client.Close()
	}()
	
	// ...
}