Documentation ¶
Index ¶
- Constants
- Variables
- func AddLog(t string)
- func AddOne(v interface{}) string
- func BidBuyNFA(scid, bidor string, amt uint64)
- func CancelCloseNFA(scid, c string)
- func CheckForIndex(scid string) interface{}
- func ClaimNFA(scid string)
- func ConfirmTx(txid, tag string, timeout int) bool
- func ConfirmTxRetry(txid, tag string, timeout int) (retry int)
- func DaemonHeight(tag, ep string) uint64
- func DaemonVersion() (version string)
- func DeroAddressFromKey(v interface{}) (address string)
- func DisplayBalance(name string) string
- func EchoWallet(tag string)
- func FetchDapps() (dApps []string)
- func FetchFees()
- func FindStringKey(scid, key, daemon string) interface{}
- func Float64Type(v interface{}) (value float64)
- func FromAtomic(v interface{}, precision int) string
- func GasEstimate(scid, tag string, args rpc.Arguments, t []rpc.Transfer, max uint64) uint64
- func GetAddress(tag string)
- func GetAssetSCIDName(scid string) string
- func GetAssetSCIDforTransfer(amt uint64, assetId string) (transfer rpc.Transfer)
- func GetBalance() uint64
- func GetBlockTime(ep string) float64
- func GetDaemonTx(txid string) *rpc.Tx_Related_Info
- func GetDifficulty(ep string) float64
- func GetDreamsBalances(assets map[string]string)
- func GetG45Collection(scid string) (scids []string)
- func GetSCCode(scid string) string
- func GetWalletHeight(tag string)
- func GetWalletTx(txid string) *rpc.Entry
- func GetdReams(amt uint64)
- func HexToString(h interface{}) string
- func InitBalances()
- func IntType(v interface{}) (value int)
- func IsReady() bool
- func MsToTime(ms string) (time.Time, error)
- func Ping()
- func RateSCID(scid string, amt, pos uint64)
- func SendAsset(scid, dest string, payload bool)
- func SendMessage(dest, msg string, rings uint64)
- func SessionLog() *fyne.Container
- func SetDaemonClient(addr string) (jsonrpc.RPCClient, context.Context, context.CancelFunc)
- func SetHeaders(name, desc, icon, scid string)
- func SetNFAListing(scid, list, char string, dur, amt, perc uint64)
- func SetWalletClient(addr, pass string) (jsonrpc.RPCClient, context.Context, context.CancelFunc)
- func SqfootToSqMeter(sqft float64) float64
- func StringToInt(s string) int
- func StringToUint64(s string) uint64
- func ToAtomic(v interface{}, precision float64) uint64
- func TokenBalance(scid string) uint64
- func TradedReams(amt uint64)
- func Uint64Type(v interface{}) (value uint64)
- func UploadNFAContract(code string) (tx string)
- func VerifySigner(txid string) bool
Constants ¶
const ( DREAMSv = "0.10.0" NameSCID = "0000000000000000000000000000000000000000000000000000000000000001" RatingSCID = "c66a11ddb22912e92b0a7ab777ed0d343632d9e3c6e8a81452396ca84d2decb6" DreamsSCID = "ad2e7b37c380cc1aed3a6b27224ddfc92a2d15962ca1f4d35e530dba0f9575a9" HgcSCID = "e2e45ce26f70cb551951c855e81a12fee0bb6ebe80ef115c3f50f51e119c02f3" // TourneySCID = "c2e1ec16aed6f653aef99a06826b2b6f633349807d01fbb74cc0afb5ff99c3c7" // HolderoSCID = "e3f37573de94560e126a9020c0a5b3dfc7a4f3a4fbbe369fba93fbd219dc5fe9" // pHolderoSCID = "896834d57628d3a65076d3f4d84ddc7c5daf3e86b66a47f018abda6068afe2e6" // HHolderoSCID = "efe646c48977fd776fee73cdd3df147a2668d3b7d965cdb7a187dda4d23005d8" BaccSCID = "8289c6109f41cbe1f6d5f27a419db537bf3bf30a25eff285241a36e1ae3e48a4" // PredictSCID = "eaa62b220fa1c411785f43c0c08ec59c761261cb58a0ccedc5b358e5ed2d2c95" // PPredictSCID = "e5e49c9a6dc1c0dc8a94429a01bf758e705de49487cbd0b3e3550648d2460cdf" // SportsSCID = "ad11377c29a863523c1cc50a33ca13e861cc146a7c0496da58deaa1973e0a39f" // PSportsSCID = "fffdc4ea6d157880841feab335ab4755edcde4e60fec2fff661009b16f44fa94" TarotSCID = "a6fc0033327073dd54e448192af929466596fce4d689302e558bc85ea8734a82" DerBnbSCID = "cfbd566d3678dec6e6dfa3a919feae5306ab12af1485e8bcf9320bd5a122b1d3" TrvlSCID = "efacf71e7b5f849653bfa49bfb9dcf7ad3d372944aef33f1e6f54dc95890e3ba" GnomonSCID = "a05395bb0cf77adc850928b0db00eb5ca7a9ccbafd9a38d021c8d299ad5ce1a4" DevAddress = "dero1qyr8yjnu6cl2c5yqkls0hmxe6rry77kn24nmc5fje6hm9jltyvdd5qq4hn5pn" ArtAddress = "dero1qy0khp9s9yw2h0eu20xmy9lth3zp5cacmx3rwt6k45l568d2mmcf6qgcsevzx" DAEMON_RPC_DEFAULT = "127.0.0.1:10102" DAEMON_RPC_REMOTE1 = "89.38.99.117:10102" DAEMON_RPC_REMOTE2 = "publicrpc1.dero.io:10102" DAEMON_RPC_REMOTE3 = "dero-node.mysrv.cloud:10102" DAEMON_RPC_REMOTE4 = "derostats.io:10102" DAEMON_RPC_REMOTE5 = "85.17.52.28:11012" DAEMON_RPC_REMOTE6 = "node.derofoundation.org:11012" )
Variables ¶
var Daemon daemon
var HighLimitFee = uint64(10000)
var IlumaFee = uint64(9000)
var ListingFee = uint64(10000)
var LowLimitFee = uint64(1320)
var MintingFee = uint64(500)
var SCIDs map[string]string
var Startup bool
var UnlockFee = uint64(300000)
var Wallet wallet
Functions ¶
func CancelCloseNFA ¶
func CancelCloseNFA(scid, c string)
Cancel or close a listed NFA. Can only be canceled within opening buffer period. Can only close listing after expiry
- c defines cancel or close call
func CheckForIndex ¶
func CheckForIndex(scid string) interface{}
Check Gnomon SC for stored contract owner
func ConfirmTx ¶
Watch a sent tx and return true if tx is confirmed
- tag for log print
- timeout is duration of loop in 2sec increment, will break if reached
func ConfirmTxRetry ¶
Watch a sent tx with int return for retry count, failed tx returns 1, timeout returns 2
- tag for log print
- timeout is duration of loop in 2sec increment, will break if reached
func DeroAddressFromKey ¶
func DeroAddressFromKey(v interface{}) (address string)
Get Dero address from keys
func FetchDapps ¶
func FetchDapps() (dApps []string)
Get list of dReams dApps from contract store
- Uses remote daemon if not connected
func FetchFees ¶
func FetchFees()
Get platform fees from on chain store
- Overwrites default fee values with current stored values
func FindStringKey ¶
func FindStringKey(scid, key, daemon string) interface{}
Get single string key result from SCID with daemon input
func Float64Type ¶
func Float64Type(v interface{}) (value float64)
Switch to convert interface to float64
func FromAtomic ¶
Returns atomic string value of v rounded to precision, walletapi.FormatMoneyPrecision()
func GasEstimate ¶
SC call gas estimate
- tag for log print
- Pass args and transfers for call
- If result is > max + 120, then returns max + 120
func GetAssetSCIDforTransfer ¶
Return asset transfer to SCID from Round.AssetID
func GetDaemonTx ¶
func GetDaemonTx(txid string) *rpc.Tx_Related_Info
Get single TX data with GetTransaction
func GetDreamsBalances ¶
Get Dero balance and all tokens used on dReams platform
func GetG45Collection ¶
Get all asset SCIDs from collection
func RateSCID ¶
Rate a SC with dReams rating system. Ratings are weight based on transactions Dero amount
- amt of Dero for rating
- pos defines positive or negative rating
func SendAsset ¶
Send Dero asset to destination address with option to send asset SCID as message to destination as payload
func SendMessage ¶
Send a message to destination address through Dero transaction, with ringsize selection
func SetDaemonClient ¶
func SetDaemonClient(addr string) (jsonrpc.RPCClient, context.Context, context.CancelFunc)
Set daemon rpc client with context and 5 sec cancel
func SetHeaders ¶
func SetHeaders(name, desc, icon, scid string)
Set any SC headers on Gnomon SC
- name, desc and icon are header params
func SetNFAListing ¶
List NFA for auction or sale by SCID
- list defines type of listing
- char sets charity donation address
- dur sets listing duration
- amt sets starting price
- perc sets percentage to go to charity on sale
func SetWalletClient ¶
func SetWalletClient(addr, pass string) (jsonrpc.RPCClient, context.Context, context.CancelFunc)
Set wallet rpc client with auth, context and 5 sec cancel
func SqfootToSqMeter ¶
func StringToUint64 ¶
Convert string to Uint64, returns 0 if err
func Uint64Type ¶
func Uint64Type(v interface{}) (value uint64)
Switch to convert interface to uint64
func UploadNFAContract ¶
Upload a new NFA SC by string
Types ¶
This section is empty.