dandelion

package
v1.0.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 26, 2019 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AccountCreate

func AccountCreate(creator, account string, owner *prototype.PublicKeyType, fee uint64, jsonMeta string) *prototype.Operation

func AccountUpdate

func AccountUpdate(name string, pubkey *prototype.PublicKeyType) *prototype.Operation

func AcquireTicket

func AcquireTicket(name string, count uint64) *prototype.Operation

func BpDisable

func BpDisable(name string) *prototype.Operation

func BpEnable

func BpEnable(name string) *prototype.Operation

func BpRegister

func BpRegister(name, url, desc string, signingKey *prototype.PublicKeyType, props *prototype.ChainProperties) *prototype.Operation

func BpUpdate

func BpUpdate(name string, props *prototype.ChainProperties) *prototype.Operation

func BpVote

func BpVote(voter, bp string, cancel bool) *prototype.Operation

func ContractApply

func ContractApply(caller, owner, contract, method, jsonParams string, coins uint64) *prototype.Operation

func ContractDeploy

func ContractDeploy(owner, contract string, abi, code []byte, upgradable bool, url, desc string) *prototype.Operation

func ContractDeployUncompressed

func ContractDeployUncompressed(owner, contract string, abi, code []byte, upgradable bool, url, desc string) *prototype.Operation

func ConvertVest

func ConvertVest(name string, vests uint64) *prototype.Operation

func Follow

func Follow(follower, followee string, cancel bool) *prototype.Operation

func NewDandelionTest

func NewDandelionTest(f DandelionTestFunc, actors int) func(*testing.T)

func NewDandelionTestWithPlugins

func NewDandelionTestWithPlugins(enablePlugins bool, sqlPlugins []string, f DandelionTestFunc, actors int) func(*testing.T)

func Post

func Post(postId uint64, author, title, content string, tags []string, beneficiaries []map[string]int) *prototype.Operation

func Reply

func Reply(postId, parentId uint64, author, content string, beneficiaries []map[string]int) *prototype.Operation

func Stake

func Stake(from, to string, coins uint64) *prototype.Operation

func Transfer

func Transfer(from, to string, amount uint64, memo string) *prototype.Operation

func TransferToVest

func TransferToVest(from, to string, amount uint64, memo string) *prototype.Operation

func UnStake

func UnStake(creditor, debtor string, coins uint64) *prototype.Operation

func Vote

func Vote(voter string, postId uint64) *prototype.Operation

func VoteByTicket

func VoteByTicket(name string, idx, count uint64) *prototype.Operation

Types

type Dandelion

type Dandelion struct {
	*core.DandelionCore
}

func NewDandelion

func NewDandelion(logger *logrus.Logger) *Dandelion

func NewDandelionWithPlugins

func NewDandelionWithPlugins(logger *logrus.Logger, enablePlugins bool, sqlPlugins []string) *Dandelion

func (*Dandelion) Account

func (d *Dandelion) Account(name string) *DandelionAccount

func (*Dandelion) BlockProducer

func (d *Dandelion) BlockProducer(owner string) *table.SoBlockProducerWrap

func (*Dandelion) BlockProducerVote

func (d *Dandelion) BlockProducerVote(voter string, blockProducer string) *table.SoBlockProducerVoteWrap

func (*Dandelion) BlockSummaryObject

func (d *Dandelion) BlockSummaryObject(id uint32) *table.SoBlockSummaryObjectWrap

func (*Dandelion) Blocktrxs

func (d *Dandelion) Blocktrxs(block uint64) *table.SoBlocktrxsWrap

func (*Dandelion) CalculateUserMaxStamina

func (d *Dandelion) CalculateUserMaxStamina(name string) uint64

func (*Dandelion) Contract

func (d *Dandelion) Contract(owner string, cname string) *table.SoContractWrap

func (*Dandelion) ContractTables

func (d *Dandelion) ContractTables(owner, contract string) *table2.ContractTables

Contract tables

func (*Dandelion) CreateAndFund

func (d *Dandelion) CreateAndFund(prefix string, n int, coins uint64, fee uint64) error

func (*Dandelion) CreateAndFundUser

func (d *Dandelion) CreateAndFundUser(name string, coins uint64, fee uint64) error

func (*Dandelion) ExtDailyTrx

func (d *Dandelion) ExtDailyTrx(date uint32) *table.SoExtDailyTrxWrap

func (*Dandelion) ExtFollowCount

func (d *Dandelion) ExtFollowCount(account string) *table.SoExtFollowCountWrap

func (*Dandelion) ExtFollower

func (d *Dandelion) ExtFollower(account string, follower string) *table.SoExtFollowerWrap

func (*Dandelion) ExtFollowing

func (d *Dandelion) ExtFollowing(account string, following string) *table.SoExtFollowingWrap

func (*Dandelion) ExtHourTrx

func (d *Dandelion) ExtHourTrx(hour uint32) *table.SoExtHourTrxWrap

func (*Dandelion) ExtPostCreated

func (d *Dandelion) ExtPostCreated(postId uint64) *table.SoExtPostCreatedWrap

func (*Dandelion) ExtReplyCreated

func (d *Dandelion) ExtReplyCreated(postId uint64) *table.SoExtReplyCreatedWrap

func (*Dandelion) ExtTrx

func (d *Dandelion) ExtTrx(trxId *prototype.Sha256) *table.SoExtTrxWrap

func (*Dandelion) ExtUserPost

func (d *Dandelion) ExtUserPost(postId uint64) *table.SoExtUserPostWrap

func (*Dandelion) GetBlockProducerTopN

func (d *Dandelion) GetBlockProducerTopN(n uint32) ([]string, []*prototype.PublicKeyType)

func (*Dandelion) GiftTicket

func (*Dandelion) GlobalProps

func (d *Dandelion) GlobalProps() *prototype.DynamicProperties

func (*Dandelion) ModifyProps

func (d *Dandelion) ModifyProps(modifier func(oldProps *prototype.DynamicProperties)) (err error)

func (*Dandelion) Post

func (d *Dandelion) Post(postId uint64) *table.SoPostWrap

func (*Dandelion) ReportList

func (d *Dandelion) ReportList(uuid uint64) *table.SoReportListWrap

func (*Dandelion) StakeRecord

func (d *Dandelion) StakeRecord(from string, to string) *table.SoStakeRecordWrap

func (*Dandelion) Test

func (d *Dandelion) Test(f DandelionTestFunc) func(*testing.T)

func (*Dandelion) TransactionObject

func (d *Dandelion) TransactionObject(trxId *prototype.Sha256) *table.SoTransactionObjectWrap

func (*Dandelion) Vote

func (d *Dandelion) Vote(voter string, postId uint64) *table.SoVoteWrap

type DandelionAccount

type DandelionAccount struct {
	*table.SoAccountWrap
	D    *Dandelion
	Name string
}

func NewDandelionAccount

func NewDandelionAccount(name string, d *Dandelion) *DandelionAccount

func (*DandelionAccount) SendTrx

func (acc *DandelionAccount) SendTrx(operations ...*prototype.Operation) error

func (*DandelionAccount) SendTrxAndProduceBlock

func (acc *DandelionAccount) SendTrxAndProduceBlock(operations ...*prototype.Operation) error

func (*DandelionAccount) SendTrxEx

func (*DandelionAccount) TrxReceipt

func (acc *DandelionAccount) TrxReceipt(operations ...*prototype.Operation) *prototype.TransactionReceiptWithInfo

type DandelionTestFunc

type DandelionTestFunc func(*testing.T, *Dandelion)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL