Coder Social home page Coder Social logo

Comments (4)

yanue avatar yanue commented on June 15, 2024

just see readme

from starkex.

Danielhodali avatar Danielhodali commented on June 15, 2024

package main

import "fmt"

func main() {

const MOCK_PRIVATE_KEY = "58c7d5a90b1776bde86ebac077e053ed85b0f7164f53b080304a531947f46e3"
param := OrderSignParam{
	NetworkId:  NETWORK_ID_ROPSTEN,
	Market:     "ETH-USD",
	Side:       "BUY",
	PositionId: 12345,
	HumanSize:  "145.0005",
	HumanPrice: "350.00067",
	LimitFee:   "0.125",
	ClientId:   "This is an ID that the client came up with to describe this order",
	Expiration: "2020-09-17T04:15:55.028Z",
}
sign, err := OrderSign(MOCK_PRIVATE_KEY, param)
// 00cecbe513ecdbf782cd02b2a5efb03e58d5f63d15f2b840e9bc0029af04e8dd0090b822b16f50b2120e4ea9852b340f7936ff6069d02acca02f2ed03029ace5
fmt.Println("sign,err", sign, err)

}

OderSign is unknown

from starkex.

Danielhodali avatar Danielhodali commented on June 15, 2024

I seems that I have an issue with importing the signature generator library. Can you help?

from starkex.

yanue avatar yanue commented on June 15, 2024

you need add:

import "github.com/yanue/starkex"

also you can see how to use in :

https://github.com/go-numb/go-dydx/blob/master/private/request.go#L44C1-L45C1

from starkex.

Related Issues (8)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.