Documentation
¶
Index ¶
- Variables
- func AttachToBlocks(ctx context.Context, fields []Field, blocks []*model.Block) error
- func AttachToInputs(ctx context.Context, fields []Field, inputs []*model.TxInput) error
- func AttachToLocks(ctx context.Context, fields []Field, locks []*model.Lock) error
- func AttachToMemoFollows(ctx context.Context, fields []Field, follows []*model.Follow) error
- func AttachToMemoRoomFollows(ctx context.Context, fields []Field, roomFollows []*model.RoomFollow) error
- func AttachToMemoRooms(ctx context.Context, fields []Field, rooms []*model.Room) error
- func AttachToOutputs(ctx context.Context, fields Fields, outputs []*model.TxOutput) error
- func AttachToSlpBatons(ctx context.Context, fields []Field, slpBatons []*model.SlpBaton) error
- func AttachToSlpGeneses(ctx context.Context, fields []Field, slpGeneses []*model.SlpGenesis) error
- func AttachToSlpOutputs(ctx context.Context, fields []Field, slpOutputs []*model.SlpOutput) error
- func AttachToTxs(ctx context.Context, fields []Field, txs []*model.Tx) error
- func GetLock(ctx context.Context, address model.Address) (*model.Lock, error)
- func GetProfile(ctx context.Context, address [25]byte) (*model.Profile, error)
- func GetTx(ctx context.Context, txHash [32]byte) (*model.Tx, error)
- func GetTxByString(ctx context.Context, txHash string) (*model.Tx, error)
- func IsPostNotFoundError(err error) bool
- func PrintFields(fields []Field, layer int)
- type Blocks
- type Field
- type Fields
- type Inputs
- type Lock
- type MemoFollowAttach
- type MemoRoomAttach
- type MemoRoomFollowAttach
- type Outputs
- func (b *Outputs) AddError(err error)
- func (o *Outputs) AttachInfo()
- func (o *Outputs) AttachLocks()
- func (o *Outputs) AttachSlpBatons()
- func (o *Outputs) AttachSlps()
- func (o *Outputs) AttachSpends()
- func (o *Outputs) AttachTxs()
- func (o *Outputs) GetOuts(checkScript bool) []memo.Out
- func (b *Outputs) HasField(checks []string) bool
- type SlpBatons
- type SlpGeneses
- type SlpOutputs
- type Tx
- func (b *Tx) AddError(err error)
- func (t *Tx) AttachBlocks()
- func (t *Tx) AttachInfo()
- func (t *Tx) AttachInputs()
- func (t *Tx) AttachOutputs()
- func (t *Tx) AttachRaws()
- func (t *Tx) AttachSeens()
- func (t *Tx) AttachToOutputs()
- func (t *Tx) GetTxHashes(checkVersion, checkSeen bool) [][32]byte
- func (b *Tx) HasField(checks []string) bool
Constants ¶
This section is empty.
Variables ¶
View Source
var Post = dataloader.NewPostLoader(dataloader.PostLoaderConfig{ Wait: defaultWait, Fetch: func(txHashStrings []string) ([]*model.Post, []error) { var posts = make([]*model.Post, len(txHashStrings)) var errors = make([]error, len(txHashStrings)) ctx, cancel := context.WithTimeout(context.Background(), time.Second) defer cancel() for i, txHashString := range txHashStrings { txHash, err := chainhash.NewHashFromStr(txHashString) if err != nil { errors[i] = fmt.Errorf("error getting tx hash from string; %w", err) continue } memoPost, err := memo.GetPost(ctx, *txHash) if err != nil && !client.IsEntryNotFoundError(err) { errors[i] = fmt.Errorf("error getting lock memo post; %w", err) continue } if memoPost == nil { errors[i] = fmt.Errorf("error post not found: %s; %w", txHashString, postNotFoundError) continue } posts[i] = &model.Post{ TxHash: model.Hash(*txHash), Address: memoPost.Addr, Text: memoPost.Post, } } return posts, errors }, })
View Source
var TxMissingError = fmt.Errorf("error tx missing")
Functions ¶
func AttachToBlocks ¶
func AttachToInputs ¶
func AttachToLocks ¶
func AttachToMemoFollows ¶
func AttachToMemoRoomFollows ¶
func AttachToMemoRooms ¶
func AttachToOutputs ¶
func AttachToSlpBatons ¶
func AttachToSlpGeneses ¶
func AttachToSlpOutputs ¶
func IsPostNotFoundError ¶
func PrintFields ¶
Types ¶
type Blocks ¶
func (*Blocks) AttachHeights ¶
func (b *Blocks) AttachHeights()
func (*Blocks) AttachInfos ¶
func (b *Blocks) AttachInfos()
func (*Blocks) AttachRaws ¶
func (b *Blocks) AttachRaws()
func (*Blocks) GetBlockHashes ¶
type Field ¶
func GetPrefixFields ¶
type Inputs ¶
func (*Inputs) AttachScriptSequence ¶
func (i *Inputs) AttachScriptSequence()
func (*Inputs) AttachTxOutputs ¶
func (i *Inputs) AttachTxOutputs()
type Lock ¶
func (*Lock) AttachProfiles ¶
func (l *Lock) AttachProfiles()
func (*Lock) GetLockAddrs ¶
type MemoFollowAttach ¶
func (*MemoFollowAttach) AttachFollowLocks ¶
func (a *MemoFollowAttach) AttachFollowLocks()
func (*MemoFollowAttach) AttachLocks ¶
func (a *MemoFollowAttach) AttachLocks()
func (*MemoFollowAttach) AttachTxs ¶
func (a *MemoFollowAttach) AttachTxs()
type MemoRoomAttach ¶
func (*MemoRoomAttach) AttachFollowers ¶
func (o *MemoRoomAttach) AttachFollowers()
func (*MemoRoomAttach) AttachPosts ¶
func (o *MemoRoomAttach) AttachPosts()
func (*MemoRoomAttach) GetRoomNames ¶
func (o *MemoRoomAttach) GetRoomNames() []string
type MemoRoomFollowAttach ¶
type MemoRoomFollowAttach struct { RoomFollows []*model.RoomFollow // contains filtered or unexported fields }
func (*MemoRoomFollowAttach) AttachLocks ¶
func (a *MemoRoomFollowAttach) AttachLocks()
func (*MemoRoomFollowAttach) AttachRooms ¶
func (a *MemoRoomFollowAttach) AttachRooms()
func (*MemoRoomFollowAttach) AttachTxs ¶
func (a *MemoRoomFollowAttach) AttachTxs()
type Outputs ¶
type Outputs struct { Outputs []*model.TxOutput DetailsWait sync.WaitGroup // contains filtered or unexported fields }
func (*Outputs) AttachInfo ¶
func (o *Outputs) AttachInfo()
func (*Outputs) AttachLocks ¶
func (o *Outputs) AttachLocks()
func (*Outputs) AttachSlpBatons ¶
func (o *Outputs) AttachSlpBatons()
func (*Outputs) AttachSlps ¶
func (o *Outputs) AttachSlps()
func (*Outputs) AttachSpends ¶
func (o *Outputs) AttachSpends()
type SlpBatons ¶
func (*SlpBatons) AttachGeneses ¶
func (o *SlpBatons) AttachGeneses()
func (*SlpBatons) AttachOutputs ¶
func (o *SlpBatons) AttachOutputs()
func (*SlpBatons) GetTokenHashes ¶
type SlpGeneses ¶
type SlpGeneses struct { SlpGeneses []*model.SlpGenesis // contains filtered or unexported fields }
func (*SlpGeneses) AttachSlpBatons ¶
func (o *SlpGeneses) AttachSlpBatons()
func (*SlpGeneses) AttachSlpOutputs ¶
func (o *SlpGeneses) AttachSlpOutputs()
func (*SlpGeneses) AttachTxs ¶
func (o *SlpGeneses) AttachTxs()
func (*SlpGeneses) GetBatonOuts ¶
func (o *SlpGeneses) GetBatonOuts() []memo.Out
func (*SlpGeneses) GetTokenOuts ¶
func (o *SlpGeneses) GetTokenOuts() []memo.Out
type SlpOutputs ¶
func (*SlpOutputs) AttachGeneses ¶
func (o *SlpOutputs) AttachGeneses()
func (*SlpOutputs) AttachOutputs ¶
func (o *SlpOutputs) AttachOutputs()
func (*SlpOutputs) GetOuts ¶
func (o *SlpOutputs) GetOuts() []memo.Out
func (*SlpOutputs) GetTokenHashes ¶
func (o *SlpOutputs) GetTokenHashes() [][32]byte
type Tx ¶
type Tx struct { Txs []*model.Tx DetailsWait sync.WaitGroup // contains filtered or unexported fields }
func (*Tx) AttachBlocks ¶
func (t *Tx) AttachBlocks()
func (*Tx) AttachInfo ¶
func (t *Tx) AttachInfo()
func (*Tx) AttachInputs ¶
func (t *Tx) AttachInputs()
func (*Tx) AttachOutputs ¶
func (t *Tx) AttachOutputs()
func (*Tx) AttachRaws ¶
func (t *Tx) AttachRaws()
func (*Tx) AttachSeens ¶
func (t *Tx) AttachSeens()
func (*Tx) AttachToOutputs ¶
func (t *Tx) AttachToOutputs()
func (*Tx) GetTxHashes ¶
Source Files
¶
Click to show internal directories.
Click to hide internal directories.