curation API
Version: Pre-alpha
Squad's curation market package is an automated token market generator built on Ethereum.
Create a new "curved bond" (a token with an automatic buy/sell mechanism).
Inputs:
-
addressOfCurve
: string (Ethereum address of the curve function to control price of the token, defaults to a simple linear "curve") -
bondId
: string (the string that will identify the token/market, usually derived from the metastore address) -
initialBuyNumber
: integer >= 0 (number of tokens to buy initially) -
opts
: web3 transaction object (this includes the tokens used to buy theinitialBuyUnits
)
Outputs: Ethereum transaction object
Check the number of tokens of a certain bondId that are in circulation.
Inputs: bondId
(string)
Outputs: number of tokens in circulation
Check the number of a specific token an address holds.
Inputs:
-
bondId
: string -
holderAddress
: Ethereum address
Outputs: number of tokens held by the address
Check the cost of buying X of a specific token.
Inputs:
-
units
: number of tokens to check the buy price of - `bondId: string
Outputs: Price of buying the tokens in Gwei
Check the sell price for X of a specific token.
Inputs:
-
units
: number of tokens to check the buy price of - `bondId: string
Outputs: Amount that would be received for selling the tokens
Buy X of a specific token.
Inputs:
-
units
: number of tokens to check the buy price of - `bondId: string
-
opts
: web3 transaction object (this includes the payment for the tokens)
Outputs: Ethereum transaction object
Sell X of a specific token.
Inputs:
-
units
: number of tokens to check the buy price of - `bondId: string
-
opts
: web3 transaction object
Outputs: Ethereum transaction object
.