irisnet / iks

A key management server for IRIS Hub

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

API parameters naming is not standardized

haifengxi opened this issue · comments

API parameters

There are two types of connectors: _ and -
Password has two different names: password and passphrase

Example:

// BankSendBody contains the necessary data to make a send transaction
type BankSendBody struct {
	Sender        sdk.AccAddress `json:"sender"`
	Reciever      sdk.AccAddress `json:"reciever"`
	Amount        string         `json:"amount"`
	ChainID       string         `json:"chain-id"`
	Memo          string         `json:"memo,omitempty"`
	Fees          string         `json:"fees,omitempty"`
	GasAdjustment string         `json:"gas_adjustment,omitempty"`
}
// SignBody is the body for a sign request
type SignBody struct {
	Tx            json.RawMessage `json:"tx"`
	Name          string          `json:"name"`
	Passphrase    string          `json:"passphrase"`
	ChainID       string          `json:"chain_id"`
	AccountNumber string          `json:"account_number"`
	Sequence      string          `json:"sequence"`
}

Releated files:
/irisnet/iks/api/keys
/irisnet/iks/api/result
/irisnet/iks/api/send
/irisnet/iks/api/sign