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"`
})
| 13 | |
| 14 | // POST /create-txfeed |
| 15 | func (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 |
| 30 | func (a *API) getTxFeed(ctx context.Context, in struct { |