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 CreateAccount(db DB, account protocol.FullAccount) 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 CreateLiteIdentity(db DB, accUrl string, credits float64) 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.TB, numBvns, numValidators, numFollowers int, withFactomAddress bool) ([]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(networkName string, net config.NetworkType, node config.NodeType, netId string) *config.Config
- func DirectJrpcClient(jrpc *api.JrpcMethods) *client.Client
- func DisableDebugFeatures()
- func EnableDebugFeatures()
- func GenerateKey(seed ...interface{}) ed25519.PrivateKey
- func GenerateTmKey(seed ...interface{}) tmed25519.PrivKey
- func GetIP() net.IP
- func GetIPs(n int) []net.IP
- func NewTestLogger(t testing.TB) log.Logger
- func ParseUrl(s string) (*url.URL, error)
- func RunTestNet(t testing.TB, partitions []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 UpdateAccount[T protocol.Account](db DB, accountUrl *url.URL, fn func(T)) error
- func UpdateKeyPage(db DB, account *url.URL, fn func(*protocol.KeyPage)) error
- func WriteStates(db DB, chains ...protocol.Account) error
- type BatchTest
- func (t *BatchTest) AddSignature(txnHash []byte, keyEntryIndex uint64, sig protocol.Signature)
- func (t *BatchTest) GetSignatures(txnHash []byte, signer *url.URL) *database.SignatureSet
- func (t *BatchTest) GetTxnStatus(txnHash []byte) *protocol.TransactionStatus
- func (t *BatchTest) PutAccount(account protocol.Account)
- func (t *BatchTest) PutAccountCopy(account protocol.Account) protocol.Account
- func (t BatchTest) Run(name string, run func(t BatchTest))
- type DB
- type DbBeginner
- type FakeAccount
- func (v *FakeAccount) Copy() *FakeAccount
- func (v *FakeAccount) CopyAsInterface() interface{}
- func (v *FakeAccount) Equal(u *FakeAccount) bool
- func (f *FakeAccount) GetAuth() *protocol.AccountAuth
- func (v *FakeAccount) IsValid() error
- func (v *FakeAccount) MarshalBinary() ([]byte, error)
- func (v *FakeAccount) UnmarshalBinary(data []byte) error
- func (v *FakeAccount) UnmarshalBinaryFrom(rd io.Reader) error
- type FakeAuthority
- func (v *FakeAuthority) Copy() *FakeAuthority
- func (v *FakeAuthority) CopyAsInterface() interface{}
- func (v *FakeAuthority) Equal(u *FakeAuthority) bool
- func (v *FakeAuthority) IsValid() error
- func (v *FakeAuthority) MarshalBinary() ([]byte, error)
- func (v *FakeAuthority) UnmarshalBinary(data []byte) error
- func (v *FakeAuthority) UnmarshalBinaryFrom(rd io.Reader) error
- type FakeLiteAccount
- func (v *FakeLiteAccount) Copy() *FakeLiteAccount
- func (v *FakeLiteAccount) CopyAsInterface() interface{}
- func (v *FakeLiteAccount) Equal(u *FakeLiteAccount) bool
- func (f *FakeLiteAccount) GetUrl() *url.URL
- func (v *FakeLiteAccount) IsValid() error
- func (v *FakeLiteAccount) MarshalBinary() ([]byte, error)
- func (f *FakeLiteAccount) Type() protocol.AccountType
- func (v *FakeLiteAccount) UnmarshalBinary(data []byte) error
- func (v *FakeLiteAccount) UnmarshalBinaryFrom(rd io.Reader) error
- type FakeSignature
- func (v *FakeSignature) Copy() *FakeSignature
- func (v *FakeSignature) CopyAsInterface() interface{}
- func (v *FakeSignature) Equal(u *FakeSignature) bool
- func (f *FakeSignature) GetPublicKey() []byte
- func (f *FakeSignature) GetPublicKeyHash() []byte
- func (f *FakeSignature) GetSignature() []byte
- func (f *FakeSignature) GetSigner() *url.URL
- func (f *FakeSignature) GetSignerVersion() uint64
- func (f *FakeSignature) GetTimestamp() uint64
- func (f *FakeSignature) GetTransactionHash() [32]byte
- func (f *FakeSignature) GetVote() protocol.VoteType
- func (f *FakeSignature) Hash() []byte
- func (f *FakeSignature) Initiator() (hash.Hasher, error)
- func (v *FakeSignature) IsValid() error
- func (v *FakeSignature) MarshalBinary() ([]byte, error)
- func (v *FakeSignature) MarshalJSON() ([]byte, error)
- func (f *FakeSignature) Metadata() protocol.Signature
- func (f *FakeSignature) RoutingLocation() *url.URL
- func (f *FakeSignature) Type() protocol.SignatureType
- func (v *FakeSignature) UnmarshalBinary(data []byte) error
- func (v *FakeSignature) UnmarshalBinaryFrom(rd io.Reader) error
- func (v *FakeSignature) UnmarshalJSON(data []byte) error
- func (f *FakeSignature) Verify(hash []byte) bool
- type FakeSigner
- func (f *FakeSigner) CanDebitCredits(amount uint64) bool
- func (v *FakeSigner) Copy() *FakeSigner
- func (v *FakeSigner) CopyAsInterface() interface{}
- func (f *FakeSigner) CreditCredits(amount uint64)
- func (f *FakeSigner) DebitCredits(amount uint64) bool
- func (f *FakeSigner) EntryByDelegate(owner *url.URL) (int, protocol.KeyEntry, bool)
- func (f *FakeSigner) EntryByKey(key []byte) (int, protocol.KeyEntry, bool)
- func (f *FakeSigner) EntryByKeyHash(keyHash []byte) (int, protocol.KeyEntry, bool)
- func (v *FakeSigner) Equal(u *FakeSigner) bool
- func (f *FakeSigner) GetCreditBalance() uint64
- func (f *FakeSigner) GetSignatureThreshold() uint64
- func (f *FakeSigner) GetVersion() uint64
- func (v *FakeSigner) IsValid() error
- func (v *FakeSigner) MarshalBinary() ([]byte, error)
- func (v *FakeSigner) MarshalJSON() ([]byte, error)
- func (v *FakeSigner) UnmarshalBinary(data []byte) error
- func (v *FakeSigner) UnmarshalBinaryFrom(rd io.Reader) error
- func (v *FakeSigner) UnmarshalJSON(data []byte) error
- 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 FakeTransactionBody
- func (v *FakeTransactionBody) Copy() *FakeTransactionBody
- func (v *FakeTransactionBody) CopyAsInterface() interface{}
- func (v *FakeTransactionBody) Equal(u *FakeTransactionBody) bool
- func (v *FakeTransactionBody) IsValid() error
- func (v *FakeTransactionBody) MarshalBinary() ([]byte, error)
- func (f *FakeTransactionBody) Type() protocol.TransactionType
- func (v *FakeTransactionBody) UnmarshalBinary(data []byte) error
- func (v *FakeTransactionBody) UnmarshalBinaryFrom(rd io.Reader) error
- type MerkleTestCase
- type NullRouter
- func (NullRouter) Query(ctx context.Context, partition string, query []byte, ...) (*core.ResultABCIQuery, error)
- func (NullRouter) RequestAPIv2(ctx context.Context, partitionId, method string, params, result interface{}) error
- func (NullRouter) Route(...*protocol.Envelope) (string, error)
- func (NullRouter) RouteAccount(*url.URL) (string, error)
- func (NullRouter) Submit(ctx context.Context, partition string, tx *protocol.Envelope, ...) (*routing.ResponseSubmit, error)
- type TransactionBuilder
- func (tb TransactionBuilder) Build() *protocol.Envelope
- func (tb TransactionBuilder) BuildDelivery() *chain.Delivery
- func (tb TransactionBuilder) Faucet() *protocol.Envelope
- func (tb TransactionBuilder) Initiate(typ protocol.SignatureType, privateKey []byte) TransactionBuilder
- func (tb TransactionBuilder) InitiateSynthetic(destPartitionUrl *url.URL) TransactionBuilder
- func (tb TransactionBuilder) SetSigner(s *signing.Builder) TransactionBuilder
- func (tb TransactionBuilder) Sign(typ protocol.SignatureType, privateKey []byte) TransactionBuilder
- func (tb TransactionBuilder) SignFunc(fn func(txn *protocol.Transaction) protocol.Signature) TransactionBuilder
- func (tb TransactionBuilder) WithBody(body protocol.TransactionBody) TransactionBuilder
- func (tb TransactionBuilder) WithCurrentTimestamp() TransactionBuilder
- func (tb TransactionBuilder) WithDelegator(delegator *url.URL) TransactionBuilder
- func (tb TransactionBuilder) WithHeader(hdr *protocol.TransactionHeader) 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) WithTimestampVar(nonce *uint64) TransactionBuilder
- func (tb TransactionBuilder) WithTxnHash(hash []byte) TransactionBuilder
- type YamlHexString
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 CreateAccount ¶ added in v0.6.0
func CreateAccount(db DB, account protocol.FullAccount) error
func CreateAdiWithCredits ¶
func CreateKeyBook ¶
func CreateKeyPage ¶
func CreateLiteIdentity ¶ added in v0.6.0
func CreateLiteTokenAccount ¶
func CreateSubADI ¶ added in v0.5.1
func CreateTestNet ¶
func CreateTokenAccount ¶
func CreateTokenIssuer ¶
func DefaultConfig ¶
func DirectJrpcClient ¶ added in v1.0.0
DirectJrpcClient returns a client that executes HTTP requests directly without going through a TCP connection.
func DisableDebugFeatures ¶ added in v1.0.0
func DisableDebugFeatures()
func EnableDebugFeatures ¶ added in v0.6.0
func EnableDebugFeatures()
func GenerateKey ¶
func GenerateKey(seed ...interface{}) ed25519.PrivateKey
func GenerateTmKey ¶ added in v0.5.1
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 UpdateAccount ¶ added in v0.6.0
func UpdateKeyPage ¶ added in v0.5.1
Types ¶
type BatchTest ¶ added in v0.6.0
func NewBatchTest ¶ added in v0.6.0
func NewBatchTest(t *testing.T, beginner DbBeginner) BatchTest
func (*BatchTest) AddSignature ¶ added in v0.6.0
func (*BatchTest) GetSignatures ¶ added in v0.6.0
func (*BatchTest) GetTxnStatus ¶ added in v0.6.0
func (t *BatchTest) GetTxnStatus(txnHash []byte) *protocol.TransactionStatus
func (*BatchTest) PutAccount ¶ added in v0.6.0
func (*BatchTest) PutAccountCopy ¶ added in v0.6.0
type DbBeginner ¶ added in v0.6.0
type FakeAccount ¶ added in v0.6.0
type FakeAccount struct { FakeLiteAccount protocol.AccountAuth // contains filtered or unexported fields }
func (*FakeAccount) Copy ¶ added in v0.6.0
func (v *FakeAccount) Copy() *FakeAccount
func (*FakeAccount) CopyAsInterface ¶ added in v0.6.0
func (v *FakeAccount) CopyAsInterface() interface{}
func (*FakeAccount) Equal ¶ added in v0.6.0
func (v *FakeAccount) Equal(u *FakeAccount) bool
func (*FakeAccount) GetAuth ¶ added in v0.6.0
func (f *FakeAccount) GetAuth() *protocol.AccountAuth
func (*FakeAccount) IsValid ¶ added in v0.6.0
func (v *FakeAccount) IsValid() error
func (*FakeAccount) MarshalBinary ¶ added in v0.6.0
func (v *FakeAccount) MarshalBinary() ([]byte, error)
func (*FakeAccount) UnmarshalBinary ¶ added in v0.6.0
func (v *FakeAccount) UnmarshalBinary(data []byte) error
func (*FakeAccount) UnmarshalBinaryFrom ¶ added in v0.6.0
func (v *FakeAccount) UnmarshalBinaryFrom(rd io.Reader) error
type FakeAuthority ¶ added in v0.6.0
type FakeAuthority struct { FakeAccount Signers *url.URL `json:"signers,omitempty" form:"signers" query:"signers" validate:"required"` // contains filtered or unexported fields }
func (*FakeAuthority) Copy ¶ added in v0.6.0
func (v *FakeAuthority) Copy() *FakeAuthority
func (*FakeAuthority) CopyAsInterface ¶ added in v0.6.0
func (v *FakeAuthority) CopyAsInterface() interface{}
func (*FakeAuthority) Equal ¶ added in v0.6.0
func (v *FakeAuthority) Equal(u *FakeAuthority) bool
func (*FakeAuthority) IsValid ¶ added in v0.6.0
func (v *FakeAuthority) IsValid() error
func (*FakeAuthority) MarshalBinary ¶ added in v0.6.0
func (v *FakeAuthority) MarshalBinary() ([]byte, error)
func (*FakeAuthority) UnmarshalBinary ¶ added in v0.6.0
func (v *FakeAuthority) UnmarshalBinary(data []byte) error
func (*FakeAuthority) UnmarshalBinaryFrom ¶ added in v0.6.0
func (v *FakeAuthority) UnmarshalBinaryFrom(rd io.Reader) error
type FakeLiteAccount ¶ added in v0.6.0
type FakeLiteAccount struct { TheType protocol.AccountType `json:"theType,omitempty" form:"theType" query:"theType" validate:"required"` Url *url.URL `json:"url,omitempty" form:"url" query:"url" validate:"required"` // contains filtered or unexported fields }
func (*FakeLiteAccount) Copy ¶ added in v0.6.0
func (v *FakeLiteAccount) Copy() *FakeLiteAccount
func (*FakeLiteAccount) CopyAsInterface ¶ added in v0.6.0
func (v *FakeLiteAccount) CopyAsInterface() interface{}
func (*FakeLiteAccount) Equal ¶ added in v0.6.0
func (v *FakeLiteAccount) Equal(u *FakeLiteAccount) bool
func (*FakeLiteAccount) GetUrl ¶ added in v0.6.0
func (f *FakeLiteAccount) GetUrl() *url.URL
func (*FakeLiteAccount) IsValid ¶ added in v0.6.0
func (v *FakeLiteAccount) IsValid() error
func (*FakeLiteAccount) MarshalBinary ¶ added in v0.6.0
func (v *FakeLiteAccount) MarshalBinary() ([]byte, error)
func (*FakeLiteAccount) Type ¶ added in v0.6.0
func (f *FakeLiteAccount) Type() protocol.AccountType
func (*FakeLiteAccount) UnmarshalBinary ¶ added in v0.6.0
func (v *FakeLiteAccount) UnmarshalBinary(data []byte) error
func (*FakeLiteAccount) UnmarshalBinaryFrom ¶ added in v0.6.0
func (v *FakeLiteAccount) UnmarshalBinaryFrom(rd io.Reader) error
type FakeSignature ¶ added in v0.6.0
type FakeSignature struct { TheType protocol.SignatureType `json:"theType,omitempty" form:"theType" query:"theType" validate:"required"` Vote protocol.VoteType `json:"vote,omitempty" form:"vote" query:"vote" validate:"required"` PublicKey []byte `json:"publicKey,omitempty" form:"publicKey" query:"publicKey" validate:"required"` Signer *url.URL `json:"signer,omitempty" form:"signer" query:"signer" validate:"required"` SignerVersion uint64 `json:"signerVersion,omitempty" form:"signerVersion" query:"signerVersion" validate:"required"` Timestamp uint64 `json:"timestamp,omitempty" form:"timestamp" query:"timestamp"` // contains filtered or unexported fields }
func (*FakeSignature) Copy ¶ added in v0.6.0
func (v *FakeSignature) Copy() *FakeSignature
func (*FakeSignature) CopyAsInterface ¶ added in v0.6.0
func (v *FakeSignature) CopyAsInterface() interface{}
func (*FakeSignature) Equal ¶ added in v0.6.0
func (v *FakeSignature) Equal(u *FakeSignature) bool
func (*FakeSignature) GetPublicKey ¶ added in v0.6.0
func (f *FakeSignature) GetPublicKey() []byte
func (*FakeSignature) GetPublicKeyHash ¶ added in v0.6.0
func (f *FakeSignature) GetPublicKeyHash() []byte
func (*FakeSignature) GetSignature ¶ added in v0.6.0
func (f *FakeSignature) GetSignature() []byte
func (*FakeSignature) GetSigner ¶ added in v0.6.0
func (f *FakeSignature) GetSigner() *url.URL
func (*FakeSignature) GetSignerVersion ¶ added in v0.6.0
func (f *FakeSignature) GetSignerVersion() uint64
func (*FakeSignature) GetTimestamp ¶ added in v0.6.0
func (f *FakeSignature) GetTimestamp() uint64
func (*FakeSignature) GetTransactionHash ¶ added in v0.6.0
func (f *FakeSignature) GetTransactionHash() [32]byte
func (*FakeSignature) GetVote ¶ added in v0.6.0
func (f *FakeSignature) GetVote() protocol.VoteType
func (*FakeSignature) Hash ¶ added in v0.6.0
func (f *FakeSignature) Hash() []byte
func (*FakeSignature) Initiator ¶ added in v0.6.0
func (f *FakeSignature) Initiator() (hash.Hasher, error)
func (*FakeSignature) IsValid ¶ added in v0.6.0
func (v *FakeSignature) IsValid() error
func (*FakeSignature) MarshalBinary ¶ added in v0.6.0
func (v *FakeSignature) MarshalBinary() ([]byte, error)
func (*FakeSignature) MarshalJSON ¶ added in v0.6.0
func (v *FakeSignature) MarshalJSON() ([]byte, error)
func (*FakeSignature) Metadata ¶ added in v0.6.0
func (f *FakeSignature) Metadata() protocol.Signature
func (*FakeSignature) RoutingLocation ¶ added in v0.6.0
func (f *FakeSignature) RoutingLocation() *url.URL
func (*FakeSignature) Type ¶ added in v0.6.0
func (f *FakeSignature) Type() protocol.SignatureType
func (*FakeSignature) UnmarshalBinary ¶ added in v0.6.0
func (v *FakeSignature) UnmarshalBinary(data []byte) error
func (*FakeSignature) UnmarshalBinaryFrom ¶ added in v0.6.0
func (v *FakeSignature) UnmarshalBinaryFrom(rd io.Reader) error
func (*FakeSignature) UnmarshalJSON ¶ added in v0.6.0
func (v *FakeSignature) UnmarshalJSON(data []byte) error
func (*FakeSignature) Verify ¶ added in v0.6.0
func (f *FakeSignature) Verify(hash []byte) bool
type FakeSigner ¶ added in v0.6.0
type FakeSigner struct { FakeLiteAccount CreditBalance uint64 `json:"creditBalance,omitempty" form:"creditBalance" query:"creditBalance" validate:"required"` Threshold uint64 `json:"threshold,omitempty" form:"threshold" query:"threshold" validate:"required"` Version uint64 `json:"version,omitempty" form:"version" query:"version" validate:"required"` Keys []*protocol.KeySpec `json:"keys,omitempty" form:"keys" query:"keys" validate:"required"` // contains filtered or unexported fields }
func (*FakeSigner) CanDebitCredits ¶ added in v0.6.0
func (f *FakeSigner) CanDebitCredits(amount uint64) bool
func (*FakeSigner) Copy ¶ added in v0.6.0
func (v *FakeSigner) Copy() *FakeSigner
func (*FakeSigner) CopyAsInterface ¶ added in v0.6.0
func (v *FakeSigner) CopyAsInterface() interface{}
func (*FakeSigner) CreditCredits ¶ added in v0.6.0
func (f *FakeSigner) CreditCredits(amount uint64)
func (*FakeSigner) DebitCredits ¶ added in v0.6.0
func (f *FakeSigner) DebitCredits(amount uint64) bool
func (*FakeSigner) EntryByDelegate ¶ added in v0.6.0
func (*FakeSigner) EntryByKey ¶ added in v0.6.0
func (*FakeSigner) EntryByKeyHash ¶ added in v0.6.0
func (*FakeSigner) Equal ¶ added in v0.6.0
func (v *FakeSigner) Equal(u *FakeSigner) bool
func (*FakeSigner) GetCreditBalance ¶ added in v0.6.0
func (f *FakeSigner) GetCreditBalance() uint64
func (*FakeSigner) GetSignatureThreshold ¶ added in v0.6.0
func (f *FakeSigner) GetSignatureThreshold() uint64
func (*FakeSigner) GetVersion ¶ added in v0.6.0
func (f *FakeSigner) GetVersion() uint64
func (*FakeSigner) IsValid ¶ added in v0.6.0
func (v *FakeSigner) IsValid() error
func (*FakeSigner) MarshalBinary ¶ added in v0.6.0
func (v *FakeSigner) MarshalBinary() ([]byte, error)
func (*FakeSigner) MarshalJSON ¶ added in v0.6.0
func (v *FakeSigner) MarshalJSON() ([]byte, error)
func (*FakeSigner) UnmarshalBinary ¶ added in v0.6.0
func (v *FakeSigner) UnmarshalBinary(data []byte) error
func (*FakeSigner) UnmarshalBinaryFrom ¶ added in v0.6.0
func (v *FakeSigner) UnmarshalBinaryFrom(rd io.Reader) error
func (*FakeSigner) UnmarshalJSON ¶ added in v0.6.0
func (v *FakeSigner) UnmarshalJSON(data []byte) error
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 FakeTransactionBody ¶ added in v0.6.0
type FakeTransactionBody struct { TheType protocol.TransactionType `json:"theType,omitempty" form:"theType" query:"theType" validate:"required"` // contains filtered or unexported fields }
func (*FakeTransactionBody) Copy ¶ added in v0.6.0
func (v *FakeTransactionBody) Copy() *FakeTransactionBody
func (*FakeTransactionBody) CopyAsInterface ¶ added in v0.6.0
func (v *FakeTransactionBody) CopyAsInterface() interface{}
func (*FakeTransactionBody) Equal ¶ added in v0.6.0
func (v *FakeTransactionBody) Equal(u *FakeTransactionBody) bool
func (*FakeTransactionBody) IsValid ¶ added in v0.6.0
func (v *FakeTransactionBody) IsValid() error
func (*FakeTransactionBody) MarshalBinary ¶ added in v0.6.0
func (v *FakeTransactionBody) MarshalBinary() ([]byte, error)
func (*FakeTransactionBody) Type ¶ added in v0.6.0
func (f *FakeTransactionBody) Type() protocol.TransactionType
func (*FakeTransactionBody) UnmarshalBinary ¶ added in v0.6.0
func (v *FakeTransactionBody) UnmarshalBinary(data []byte) error
func (*FakeTransactionBody) UnmarshalBinaryFrom ¶ added in v0.6.0
func (v *FakeTransactionBody) UnmarshalBinaryFrom(rd io.Reader) error
type MerkleTestCase ¶ added in v1.0.0
type MerkleTestCase struct { Root YamlHexString Entries []YamlHexString Cascade []YamlHexString }
type NullRouter ¶ added in v0.5.1
type NullRouter struct{}
func (NullRouter) Query ¶ added in v0.5.1
func (NullRouter) Query(ctx context.Context, partition string, query []byte, opts client.ABCIQueryOptions) (*core.ResultABCIQuery, error)
func (NullRouter) RequestAPIv2 ¶ added in v1.0.0
func (NullRouter) RequestAPIv2(ctx context.Context, partitionId, method string, params, result interface{}) 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) Build ¶ added in v0.6.0
func (tb TransactionBuilder) Build() *protocol.Envelope
func (TransactionBuilder) BuildDelivery ¶ added in v1.0.0
func (tb TransactionBuilder) BuildDelivery() *chain.Delivery
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) TransactionBuilder
func (TransactionBuilder) InitiateSynthetic ¶ added in v0.5.1
func (tb TransactionBuilder) InitiateSynthetic(destPartitionUrl *url.URL) TransactionBuilder
func (TransactionBuilder) SetSigner ¶ added in v1.0.0
func (tb TransactionBuilder) SetSigner(s *signing.Builder) TransactionBuilder
func (TransactionBuilder) Sign ¶
func (tb TransactionBuilder) Sign(typ protocol.SignatureType, privateKey []byte) TransactionBuilder
func (TransactionBuilder) SignFunc ¶ added in v1.0.0
func (tb TransactionBuilder) SignFunc(fn func(txn *protocol.Transaction) protocol.Signature) TransactionBuilder
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) WithDelegator ¶ added in v0.6.0
func (tb TransactionBuilder) WithDelegator(delegator *url.URL) TransactionBuilder
func (TransactionBuilder) WithHeader ¶
func (tb TransactionBuilder) WithHeader(hdr *protocol.TransactionHeader) 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) WithTimestampVar ¶ added in v0.6.0
func (tb TransactionBuilder) WithTimestampVar(nonce *uint64) TransactionBuilder
func (TransactionBuilder) WithTxnHash ¶
func (tb TransactionBuilder) WithTxnHash(hash []byte) TransactionBuilder
type YamlHexString ¶ added in v1.0.0
type YamlHexString []byte
func (*YamlHexString) UnmarshalYAML ¶ added in v1.0.0
func (s *YamlHexString) UnmarshalYAML(value *yaml.Node) error
Source Files ¶
Click to show internal directories.
Click to hide internal directories.