Documentation ¶
Index ¶
- func CreateInitialBillTransferTx(accountKey *account.AccountKey, billID, fcrID types.UnitID, billValue uint64, ...) (*types.TransactionOrder, error)
- func MoneyGenesisState(t *testing.T, config *MoneyGenesisConfig) *state.State
- func NewMoneyBill(unitIDPart []byte, billData *money.BillData) *api.Bill
- func NewMoneyFCR(pubKeyHash []byte, fcrData *unit.FeeCreditRecord) *api.FeeCreditBill
- type MoneyGenesisConfig
- type Option
- type Options
- type RpcClientMock
- func (c *RpcClientMock) GetBill(ctx context.Context, unitID types.UnitID, includeStateProof bool) (*api.Bill, error)
- func (c *RpcClientMock) GetBlock(ctx context.Context, blockNumber uint64) (*types.Block, error)
- func (c *RpcClientMock) GetFeeCreditRecord(ctx context.Context, unitID types.UnitID, includeStateProof bool) (*api.FeeCreditBill, error)
- func (c *RpcClientMock) GetRoundNumber(ctx context.Context) (uint64, error)
- func (c *RpcClientMock) GetTransactionProof(ctx context.Context, txHash types.Bytes) (*types.TransactionRecord, *types.TxProof, error)
- func (c *RpcClientMock) GetUnitsByOwnerID(ctx context.Context, ownerID types.Bytes) ([]types.UnitID, error)
- func (c *RpcClientMock) SendTransaction(ctx context.Context, tx *types.TransactionOrder) ([]byte, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateInitialBillTransferTx ¶
func CreateInitialBillTransferTx(accountKey *account.AccountKey, billID, fcrID types.UnitID, billValue uint64, timeout uint64, backlink []byte) (*types.TransactionOrder, error)
func MoneyGenesisState ¶
func MoneyGenesisState(t *testing.T, config *MoneyGenesisConfig) *state.State
func NewMoneyBill ¶ added in v0.4.0
func NewMoneyFCR ¶ added in v0.4.0
func NewMoneyFCR(pubKeyHash []byte, fcrData *unit.FeeCreditRecord) *api.FeeCreditBill
Types ¶
type MoneyGenesisConfig ¶
type MoneyGenesisConfig struct { InitialBillID types.UnitID InitialBillValue uint64 InitialBillOwner types.PredicateBytes DCMoneySupplyValue uint64 SDRs []*genesis.SystemDescriptionRecord }
type Option ¶ added in v0.4.0
type Option func(*Options)
func WithOwnerBill ¶ added in v0.4.0
func WithOwnerFeeCreditBill ¶ added in v0.4.0
func WithOwnerFeeCreditBill(fcb *api.FeeCreditBill) Option
func WithRoundNumber ¶ added in v0.4.0
type RpcClientMock ¶ added in v0.4.0
type RpcClientMock struct { Err error Bills map[string]*api.Bill FeeCreditBills map[string]*api.FeeCreditBill OwnerUnits []types.UnitID RoundNumber uint64 TxProofs map[string]*wallet.Proof RecordedTxs []*types.TransactionOrder }
func NewRpcClientMock ¶ added in v0.4.0
func NewRpcClientMock(opts ...Option) *RpcClientMock
func (*RpcClientMock) GetFeeCreditRecord ¶ added in v0.4.0
func (c *RpcClientMock) GetFeeCreditRecord(ctx context.Context, unitID types.UnitID, includeStateProof bool) (*api.FeeCreditBill, error)
func (*RpcClientMock) GetRoundNumber ¶ added in v0.4.0
func (c *RpcClientMock) GetRoundNumber(ctx context.Context) (uint64, error)
func (*RpcClientMock) GetTransactionProof ¶ added in v0.4.0
func (c *RpcClientMock) GetTransactionProof(ctx context.Context, txHash types.Bytes) (*types.TransactionRecord, *types.TxProof, error)
func (*RpcClientMock) GetUnitsByOwnerID ¶ added in v0.4.0
func (*RpcClientMock) SendTransaction ¶ added in v0.4.0
func (c *RpcClientMock) SendTransaction(ctx context.Context, tx *types.TransactionOrder) ([]byte, error)
Click to show internal directories.
Click to hide internal directories.