MCPcopy Index your code
hub / github.com/chain/Core / createTxFeed

Method createTxFeed

core/txfeeds.go:15–27  ·  view source on GitHub ↗

POST /create-txfeed

(ctx context.Context, in struct {
	Alias  string
	Filter string

	// ClientToken is the application's unique token for the txfeed. Every txfeed
	// should have a unique client token. The client token is used to ensure
	// idempotency of create txfeed requests. Duplicate create txfeed requests
	// with the same client_token will only create one txfeed.
	ClientToken string `json:"client_token"`
})

Source from the content-addressed store, hash-verified

13
14// POST /create-txfeed
15func (a *API) createTxFeed(ctx context.Context, in struct {
16 Alias string
17 Filter string
18
19 // ClientToken is the application's unique token for the txfeed. Every txfeed
20 // should have a unique client token. The client token is used to ensure
21 // idempotency of create txfeed requests. Duplicate create txfeed requests
22 // with the same client_token will only create one txfeed.
23 ClientToken string `json:"client_token"`
24}) (*txfeed.TxFeed, error) {
25 after := fmt.Sprintf("%d:%d-%d", a.chain.Height(), math.MaxInt32, uint64(math.MaxInt64))
26 return a.txFeeds.Create(ctx, in.Alias, in.Filter, after, in.ClientToken)
27}
28
29// POST /get-transaction-feed
30func (a *API) getTxFeed(ctx context.Context, in struct {

Callers

nothing calls this directly

Calls 2

HeightMethod · 0.65
CreateMethod · 0.45

Tested by

no test coverage detected