multisig

package
v1.6.2 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2023 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	StatusCreated = "created"
	StatusRevoked = "revoked"
	StatusDone    = "done"
)

status

View Source
const (
	RAccountX        = "account"
	RTransactionX    = "transaction"
	RMultiSignatureX = "multi_signature"
)

Support DB record keys

View Source
const (
	MSDBX       = "multisig"
	MSTxDBX     = "sig_tx"
	MSListDBX   = "sig_list"
	DefaultType = "_doc"

	MSTypeLimitX   = "limit"
	MSTypeOwnerX   = "owner"
	MSTypeAccountX = "account"
)

db

View Source
const (
	SigTxTypeOwner    = "owner"
	SigTxTypeAccount  = "account"
	SigTxTypeTransfer = "transfer"
)

Sig Tx Type

Variables

This section is empty.

Functions

func NewConvert

func NewConvert(title, symbol string, supports []string) db.ExecConvert

NewConvert create TODO gen flags 暂时没有用上

Types

type MS

type MS struct {
	CreateAddr     string `json:"create_address"`
	MultiSigAddr   string `json:"multi_signature_address"`
	TxCount        uint64 `json:"tx_count"`
	RequiredWeight uint64 `json:"required_weight"`
	Type           string `json:"type"`
}

MS short for Multi Signature

func (*MS) ID

func (o *MS) ID() string

ID record

type MSLimit

type MSLimit struct {
	MultiSigAddr string `json:"multi_signature_address"`
	Symbol       string `json:"symbol"`
	Execer       string `json:"execer"`
	DailyLimit   uint64 `json:"daily_limit"`
	SpentToday   uint64 `json:"spent_today"`
	LastDay      int64  `json:"last_day"`
	Type         string `json:"type"`
}

MSLimit limit with MS address

func (*MSLimit) ID

func (l *MSLimit) ID() string

ID record

type MSOwner

type MSOwner struct {
	MultiSigAddr string `json:"multi_signature_address"`
	Address      string `json:"address"`
	Weight       uint64 `json:"weight"`
	Type         string `json:"type"`
}

MSOwner owner with MultiSigAddr

func (*MSOwner) ID

func (o *MSOwner) ID() string

ID record

type MSRecord

type MSRecord struct {
	*db.IKey
	*db.Op
	// contains filtered or unexported fields
}

MSRecord db record

func (*MSRecord) Value

func (r *MSRecord) Value() []byte

Value impl

type MSUpdateLimitRecord

type MSUpdateLimitRecord struct {
	*db.IKey
	*db.Op
	// contains filtered or unexported fields
}

MSUpdateLimitRecord MSUpdateLimitRecord

func (*MSUpdateLimitRecord) Value

func (r *MSUpdateLimitRecord) Value() []byte

Value impl

type MSUpdateOwnerRecord

type MSUpdateOwnerRecord struct {
	*db.IKey
	*db.Op
	// contains filtered or unexported fields
}

MSUpdateOwnerRecord MSUpdateOwnerRecord

func (*MSUpdateOwnerRecord) Value

func (r *MSUpdateOwnerRecord) Value() []byte

Value impl

type MSUpdateTxCount

type MSUpdateTxCount struct {
	Address string `json:"multi_signature_address"`
	TxCount uint64 `json:"tx_count"`
}

MSUpdateTxCount MultiSignature Update TxCount

type MSUpdateTxCountRecord

type MSUpdateTxCountRecord struct {
	*db.IKey
	*db.Op
	// contains filtered or unexported fields
}

MSUpdateTxCountRecord MSUpdateTxCountRecord

func (*MSUpdateTxCountRecord) Value

func (r *MSUpdateTxCountRecord) Value() []byte

Value impl

type MSUpdateWeight

type MSUpdateWeight struct {
	Address        string `json:"multi_signature_address"`
	RequiredWeight uint64 `json:"required_weight"`
}

MSUpdateWeight MSUpdateWeight Update weight

type MSUpdateWeightRecord

type MSUpdateWeightRecord struct {
	*db.IKey
	*db.Op
	// contains filtered or unexported fields
}

MSUpdateWeightRecord MSUpdateWeight

func (*MSUpdateWeightRecord) Value

func (r *MSUpdateWeightRecord) Value() []byte

Value impl

type SigList

type SigList struct {
	Address string `json:"multi_signature_address"`
	TxID    uint64 `json:"tx_id"`
	Owner   string `json:"address"`
	Weight  uint64 `json:"weight"`
	// 角色和状态: 是否为创建者,是否是促成交易执行的
	Creator  bool   `json:"creator"`
	Executed bool   `json:"executed"`
	TxHash   string `json:"tx_hash"`
}

SigList 不包括撤销的

func (*SigList) ID

func (s *SigList) ID() string

ID record id

type SigListRecord

type SigListRecord struct {
	*db.IKey
	*db.Op
	// contains filtered or unexported fields
}

SigListRecord SigListRecord

func (*SigListRecord) Value

func (r *SigListRecord) Value() []byte

Value impl

type SigTx

type SigTx struct {
	TxHash string `json:"tx_hash"`
	// 不同类型的多重签名
	Type    string      `json:"type"`
	Address string      `json:"multi_signature_address"`
	TxID    uint64      `json:"tx_id"`
	Detail  interface{} `json:"detail"`
}

SigTx SigTx

func (*SigTx) ID

func (s *SigTx) ID() string

ID record id

type SigTxRecord

type SigTxRecord struct {
	*db.IKey
	*db.Op
	// contains filtered or unexported fields
}

SigTxRecord db record

func (*SigTxRecord) Value

func (r *SigTxRecord) Value() []byte

Value impl

type SymbolLimit

type SymbolLimit struct {
	Symbol     string `json:"symbol"`
	Execer     string `json:"execer"`
	DailyLimit uint64 `json:"daily_limit"`
}

SymbolLimit SymbolLimit

type TxAccountOperate

type TxAccountOperate struct {
	DailyLimit        *SymbolLimit `json:"dailyLimit,omitempty"`
	NewRequiredWeight uint64       `json:"new_required_weight,omitempty"`
	Operate           string       `json:"operate"`
}

TxAccountOperate TxAccountOperate

type TxOwnerOperate

type TxOwnerOperate struct {
	Operate   string `json:"operate"`
	OldOwner  string `json:"old_owner"`
	NewOwner  string `json:"new_owner"`
	NewWeight uint64 `json:"new_weight"`
}

TxOwnerOperate OwnerOperate

type TxTransferOperate

type TxTransferOperate struct {
	Symbol   string `json:"symbol"`
	Amount   int64  `json:"amount"`
	Note     string `json:"note"`
	Execname string `json:"execname"`
	To       string `json:"to"`
	From     string `json:"from"`
}

TxTransferOperate TxTransferOperate

Jump to

Keyboard shortcuts

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