Documentation ¶
Index ¶
- Constants
- Variables
- func AcmeLiteAddress(pubKey []byte) *url.URL
- func AcmeLiteAddressStdPriv(key ed25519.PrivateKey) *url.URL
- func AcmeLiteAddressTmPriv(key tmcrypto.PrivKey) *url.URL
- func AddCredits(db DB, account *url.URL, credits float64) error
- func BuildTestTokenTxGenTx(sponsor ed25519.PrivateKey, destAddr string, amount uint64) (*protocol.Envelope, error)
- func CreateADI(db DB, key tmed25519.PrivKey, urlStr types.String) error
- func CreateAdiWithCredits(db DB, key tmed25519.PrivKey, urlStr types.String, credits float64) error
- func CreateKeyBook(db DB, urlStr types.String, publicKey ...tmed25519.PubKey) error
- func CreateKeyPage(db DB, bookUrlStr types.String, keys ...tmed25519.PubKey) error
- func CreateLiteTokenAccount(db DB, key tmed25519.PrivKey, tokens float64) error
- func CreateLiteTokenAccountWithCredits(db DB, key tmed25519.PrivKey, tokens, credits float64) error
- func CreateSubADI(db DB, originUrlStr types.String, urlStr types.String) error
- func CreateTestNet(t *testing.T, numBvns, numValidators, numFollowers int) ([]string, map[string][]*accumulated.Daemon)
- func CreateTokenAccount(db DB, accUrl, tokenUrl string, tokens float64, lite bool) error
- func CreateTokenIssuer(db DB, urlStr, symbol string, precision uint64, supplyLimit *big.Int) error
- func DefaultConfig(net config.NetworkType, node config.NodeType, netId string) *config.Config
- func GenerateKey(seed ...interface{}) ed25519.PrivateKey
- func GenerateTmKey(seed ...interface{}) tmed25519.PrivKey
- func GetIP() net.IP
- func GetIPs(n int) []net.IP
- func MustParseUrl(s string) *url.URL
- func RunTestNet(t *testing.T, subnets []string, daemons map[string][]*accumulated.Daemon)
- func SkipCI(t testing.TB, reason string)
- func SkipLong(t testing.TB)
- func SkipPlatform(t testing.TB, goos, reason string)
- func SkipPlatformCI(t testing.TB, goos, reason string)
- func UpdateKeyPage(db DB, account *url.URL, fn func(*protocol.KeyPage)) error
- func WriteStates(db DB, chains ...protocol.Account) error
- type DB
- type FakeTendermint
- func (c *FakeTendermint) ABCIQuery(ctx context.Context, path string, data tmbytes.HexBytes) (*ctypes.ResultABCIQuery, error)
- func (c *FakeTendermint) ABCIQueryWithOptions(ctx context.Context, path string, data tmbytes.HexBytes, ...) (*ctypes.ResultABCIQuery, error)
- func (c *FakeTendermint) App() abci.Application
- func (c *FakeTendermint) BroadcastTxAsync(ctx context.Context, tx types.Tx) (*ctypes.ResultBroadcastTx, error)
- func (c *FakeTendermint) BroadcastTxSync(ctx context.Context, tx types.Tx) (*ctypes.ResultBroadcastTx, error)
- func (c *FakeTendermint) CheckTx(ctx context.Context, tx types.Tx) (*ctypes.ResultCheckTx, error)
- func (c *FakeTendermint) Shutdown()
- func (c *FakeTendermint) SubmitTx(ctx context.Context, tx types.Tx, check bool) *txStatus
- func (c *FakeTendermint) Tx(ctx context.Context, hash []byte, prove bool) (*ctypes.ResultTx, error)
- func (c *FakeTendermint) Validators() []crypto.PubKey
- type NullRouter
- func (NullRouter) Query(ctx context.Context, subnet string, query []byte, opts client.ABCIQueryOptions) (*core.ResultABCIQuery, error)
- func (NullRouter) Route(...*protocol.Envelope) (string, error)
- func (NullRouter) RouteAccount(*url.URL) (string, error)
- func (NullRouter) Submit(ctx context.Context, subnet string, tx []byte, pretend, async bool) (*routing.ResponseSubmit, error)
- type TransactionBuilder
- func (tb TransactionBuilder) Faucet() *protocol.Envelope
- func (tb TransactionBuilder) Initiate(typ protocol.SignatureType, privateKey []byte) *protocol.Envelope
- func (tb TransactionBuilder) InitiateSynthetic(destSubnetUrl *url.URL) TransactionBuilder
- func (tb TransactionBuilder) Sign(typ protocol.SignatureType, privateKey []byte) *protocol.Envelope
- func (tb TransactionBuilder) WithBody(body protocol.TransactionBody) TransactionBuilder
- func (tb TransactionBuilder) WithCurrentTimestamp() TransactionBuilder
- func (tb TransactionBuilder) WithHeader(hdr *protocol.TransactionHeader) TransactionBuilder
- func (tb TransactionBuilder) WithNonceVar(nonce *uint64) TransactionBuilder
- func (tb TransactionBuilder) WithPrincipal(origin *url.URL) TransactionBuilder
- func (tb TransactionBuilder) WithSigner(signer *url.URL, height uint64) TransactionBuilder
- func (tb TransactionBuilder) WithTimestamp(nonce uint64) TransactionBuilder
- func (tb TransactionBuilder) WithTxnHash(hash []byte) TransactionBuilder
Constants ¶
View Source
const LogConsole = true
Variables ¶
View Source
var DefaultLogLevels = config.LogLevel{}. Parse(config.DefaultLogLevels). String()
Functions ¶
func AcmeLiteAddress ¶
AcmeLiteAddress creates an ACME lite address for the given key. FOR TESTING USE ONLY.
func AcmeLiteAddressStdPriv ¶
func AcmeLiteAddressStdPriv(key ed25519.PrivateKey) *url.URL
func BuildTestTokenTxGenTx ¶
func CreateAdiWithCredits ¶
func CreateKeyBook ¶
func CreateKeyPage ¶
func CreateLiteTokenAccount ¶
func CreateSubADI ¶ added in v0.5.1
func CreateTestNet ¶
func CreateTokenAccount ¶
func CreateTokenIssuer ¶
func DefaultConfig ¶
func GenerateKey ¶
func GenerateKey(seed ...interface{}) ed25519.PrivateKey
func GenerateTmKey ¶ added in v0.5.1
func MustParseUrl ¶
func RunTestNet ¶
func SkipPlatform ¶
SkipPlatform skips a test when on a specific GOOS.
func SkipPlatformCI ¶
SkipPlatformCI skips a test when running in CI on a specific GOOS.
func UpdateKeyPage ¶ added in v0.5.1
Types ¶
type FakeTendermint ¶
type FakeTendermint struct {
// contains filtered or unexported fields
}
FakeTendermint is a test harness that facilitates testing the ABCI application without creating an actual Tendermint node.
func NewFakeTendermint ¶
func (*FakeTendermint) ABCIQuery ¶
func (c *FakeTendermint) ABCIQuery(ctx context.Context, path string, data tmbytes.HexBytes) (*ctypes.ResultABCIQuery, error)
func (*FakeTendermint) ABCIQueryWithOptions ¶
func (c *FakeTendermint) ABCIQueryWithOptions(ctx context.Context, path string, data tmbytes.HexBytes, opts rpc.ABCIQueryOptions) (*ctypes.ResultABCIQuery, error)
func (*FakeTendermint) App ¶
func (c *FakeTendermint) App() abci.Application
func (*FakeTendermint) BroadcastTxAsync ¶
func (c *FakeTendermint) BroadcastTxAsync(ctx context.Context, tx types.Tx) (*ctypes.ResultBroadcastTx, error)
func (*FakeTendermint) BroadcastTxSync ¶
func (c *FakeTendermint) BroadcastTxSync(ctx context.Context, tx types.Tx) (*ctypes.ResultBroadcastTx, error)
func (*FakeTendermint) CheckTx ¶
func (c *FakeTendermint) CheckTx(ctx context.Context, tx types.Tx) (*ctypes.ResultCheckTx, error)
func (*FakeTendermint) Shutdown ¶
func (c *FakeTendermint) Shutdown()
func (*FakeTendermint) Validators ¶ added in v0.5.1
func (c *FakeTendermint) Validators() []crypto.PubKey
type NullRouter ¶ added in v0.5.1
type NullRouter struct{}
func (NullRouter) Query ¶ added in v0.5.1
func (NullRouter) Query(ctx context.Context, subnet string, query []byte, opts client.ABCIQueryOptions) (*core.ResultABCIQuery, error)
func (NullRouter) Route ¶ added in v0.5.1
func (NullRouter) Route(...*protocol.Envelope) (string, error)
func (NullRouter) RouteAccount ¶ added in v0.5.1
func (NullRouter) RouteAccount(*url.URL) (string, error)
type TransactionBuilder ¶
func NewTransaction ¶
func NewTransaction() TransactionBuilder
func (TransactionBuilder) Faucet ¶ added in v0.5.1
func (tb TransactionBuilder) Faucet() *protocol.Envelope
func (TransactionBuilder) Initiate ¶ added in v0.5.1
func (tb TransactionBuilder) Initiate(typ protocol.SignatureType, privateKey []byte) *protocol.Envelope
func (TransactionBuilder) InitiateSynthetic ¶ added in v0.5.1
func (tb TransactionBuilder) InitiateSynthetic(destSubnetUrl *url.URL) TransactionBuilder
func (TransactionBuilder) Sign ¶
func (tb TransactionBuilder) Sign(typ protocol.SignatureType, privateKey []byte) *protocol.Envelope
func (TransactionBuilder) WithBody ¶
func (tb TransactionBuilder) WithBody(body protocol.TransactionBody) TransactionBuilder
func (TransactionBuilder) WithCurrentTimestamp ¶ added in v0.5.1
func (tb TransactionBuilder) WithCurrentTimestamp() TransactionBuilder
func (TransactionBuilder) WithHeader ¶
func (tb TransactionBuilder) WithHeader(hdr *protocol.TransactionHeader) TransactionBuilder
func (TransactionBuilder) WithNonceVar ¶
func (tb TransactionBuilder) WithNonceVar(nonce *uint64) TransactionBuilder
func (TransactionBuilder) WithPrincipal ¶ added in v0.5.1
func (tb TransactionBuilder) WithPrincipal(origin *url.URL) TransactionBuilder
func (TransactionBuilder) WithSigner ¶ added in v0.5.1
func (tb TransactionBuilder) WithSigner(signer *url.URL, height uint64) TransactionBuilder
func (TransactionBuilder) WithTimestamp ¶ added in v0.5.1
func (tb TransactionBuilder) WithTimestamp(nonce uint64) TransactionBuilder
func (TransactionBuilder) WithTxnHash ¶
func (tb TransactionBuilder) WithTxnHash(hash []byte) TransactionBuilder
Source Files ¶
Click to show internal directories.
Click to hide internal directories.