digest

package
v0.0.0-...-583991b Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2026 License: GPL-3.0 Imports: 21 Imported by: 0

Documentation

Overview

Package digest provides api features.

Index

Constants

This section is empty.

Variables

View Source
var (
	DefaultColNamePayment        = "digest_pmt"
	DefaultColNamePaymentAccount = "digest_pmt_ac"
)
View Source
var (
	AccountInfoValueHint = hint.MustNewHint("mitum-payment-account-info-value-v0.0.1")
)
View Source
var DefaultIndexes = cdigest.DefaultIndexes
View Source
var PaymentAccountRecordIndexModels = []mongo.IndexModel{
	{
		Keys: bson.D{
			bson.E{Key: "contract", Value: 1},
			bson.E{Key: "address", Value: 1},
			bson.E{Key: "height", Value: -1}},
		Options: options.Index().
			SetName(cdigest.IndexPrefix + "payment_contract_address_height"),
	},
}
View Source
var PaymentIndexModels = []mongo.IndexModel{
	{
		Keys: bson.D{
			bson.E{Key: "contract", Value: 1},
			bson.E{Key: "height", Value: -1}},
		Options: options.Index().
			SetName(cdigest.IndexPrefix + "payment_contract_height"),
	},
}

Functions

func PaymentDesign

func PaymentDesign(db *cdigest.Database, contract string) (*types.Design, base.State, error)

func PreparePayment

func PreparePayment(bs *cdigest.BlockSession, st base.State) (string, []mongo.WriteModel, error)

func ProcessDigester

func ProcessDigester(ctx context.Context) (context.Context, error)

Types

type AccountInfoValue

type AccountInfoValue struct {
	hint.BaseHinter
	// contains filtered or unexported fields
}

func AccountInfo

func AccountInfo(db *cdigest.Database, contract, account string) (*AccountInfoValue, error)

func NewAccountInfoValue

func NewAccountInfoValue(
	setting types.Setting,
	record types.DepositRecord,
) AccountInfoValue

func (AccountInfoValue) AccountInfo

func (ai AccountInfoValue) AccountInfo() types.Setting

func (AccountInfoValue) AccountRecord

func (ai AccountInfoValue) AccountRecord() types.DepositRecord

func (AccountInfoValue) Hint

func (ai AccountInfoValue) Hint() hint.Hint

func (AccountInfoValue) MarshalJSON

func (ai AccountInfoValue) MarshalJSON() ([]byte, error)

type AccountInfoValueJSONMarshaler

type AccountInfoValueJSONMarshaler struct {
	hint.BaseHinter
	Setting types.Setting       `json:"transfer_setting"`
	Record  types.DepositRecord `json:"deposit_record"`
}

type DepositRecordDoc

type DepositRecordDoc struct {
	mongodb.BaseDoc
	// contains filtered or unexported fields
}

func NewDepositRecordDoc

func NewDepositRecordDoc(st base.State, enc encoder.Encoder) (*DepositRecordDoc, error)

func (DepositRecordDoc) MarshalBSON

func (doc DepositRecordDoc) MarshalBSON() ([]byte, error)

type DesignDoc

type DesignDoc struct {
	mongodb.BaseDoc
	// contains filtered or unexported fields
}

func NewDesignDoc

func NewDesignDoc(st base.State, enc encoder.Encoder) (DesignDoc, error)

NewDesignDoc get the State of TimeStamp Design

func (DesignDoc) MarshalBSON

func (doc DesignDoc) MarshalBSON() ([]byte, error)

Jump to

Keyboard shortcuts

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