@highlightxyz/sdk 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.d.ts +1 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +1 -0
- package/lib/v1/gen/sdk.gen.d.ts +202 -28
- package/lib/v1/gen/sdk.gen.d.ts.map +1 -1
- package/lib/v1/gen/sdk.gen.js +389 -34
- package/lib/v1/gen/types.gen.d.ts +1072 -254
- package/lib/v1/gen/types.gen.d.ts.map +1 -1
- package/lib/v1/gen/types.gen.js +100 -33
- package/lib/v1/media.d.ts +31 -0
- package/lib/v1/media.d.ts.map +1 -0
- package/lib/v1/media.js +76 -0
- package/package.json +9 -33
package/lib/v1/gen/sdk.gen.js
CHANGED
|
@@ -81,10 +81,51 @@ export class Collection extends HeyApiClient {
|
|
|
81
81
|
},
|
|
82
82
|
});
|
|
83
83
|
}
|
|
84
|
+
/**
|
|
85
|
+
* Trending collections
|
|
86
|
+
*
|
|
87
|
+
* Public leaderboard of collections ranked by units minted within a rolling time window (24h / 7d / 28d), computed live from the mint ledger.
|
|
88
|
+
*/
|
|
89
|
+
trending(parameters, options) {
|
|
90
|
+
const params = buildClientParams([parameters], [
|
|
91
|
+
{
|
|
92
|
+
args: [
|
|
93
|
+
{ in: "query", key: "window" },
|
|
94
|
+
{ in: "query", key: "chainId" },
|
|
95
|
+
{ in: "query", key: "limit" },
|
|
96
|
+
],
|
|
97
|
+
},
|
|
98
|
+
]);
|
|
99
|
+
return (options?.client ?? this.client).get({
|
|
100
|
+
url: "/collection/trending",
|
|
101
|
+
...options,
|
|
102
|
+
...params,
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* Featured collections
|
|
107
|
+
*
|
|
108
|
+
* Public curated showcase of collections for the home page, ordered by editorial position and paginated by cursor.
|
|
109
|
+
*/
|
|
110
|
+
featured(parameters, options) {
|
|
111
|
+
const params = buildClientParams([parameters], [
|
|
112
|
+
{
|
|
113
|
+
args: [
|
|
114
|
+
{ in: "query", key: "limit" },
|
|
115
|
+
{ in: "query", key: "cursor" },
|
|
116
|
+
],
|
|
117
|
+
},
|
|
118
|
+
]);
|
|
119
|
+
return (options?.client ?? this.client).get({
|
|
120
|
+
url: "/collection/featured",
|
|
121
|
+
...options,
|
|
122
|
+
...params,
|
|
123
|
+
});
|
|
124
|
+
}
|
|
84
125
|
/**
|
|
85
126
|
* Get collection
|
|
86
127
|
*
|
|
87
|
-
* Get a collection by its highlight ID.
|
|
128
|
+
* Get a collection by its highlight ID, or by a contract reference of the form `<chain>:<contractAddress>[:<editionId>]` (chain slug or numeric chainId; editionId defaults to 0), e.g. `ethereum:0x0c3dd3c403b6B5c0CCe2a97F15820a4Eae347FE7:0`.
|
|
88
129
|
*/
|
|
89
130
|
get(parameters, options) {
|
|
90
131
|
const params = buildClientParams([parameters], [{ args: [{ in: "path", key: "highlightId" }] }]);
|
|
@@ -94,6 +135,26 @@ export class Collection extends HeyApiClient {
|
|
|
94
135
|
...params,
|
|
95
136
|
});
|
|
96
137
|
}
|
|
138
|
+
/**
|
|
139
|
+
* List series previews
|
|
140
|
+
*
|
|
141
|
+
* List sample artwork for a series collection, resolved from its uploaded assets. Returns an empty list for non-series collections or when assets are not ready. Available for public collections without authentication.
|
|
142
|
+
*/
|
|
143
|
+
listPreviews(parameters, options) {
|
|
144
|
+
const params = buildClientParams([parameters], [
|
|
145
|
+
{
|
|
146
|
+
args: [
|
|
147
|
+
{ in: "path", key: "highlightId" },
|
|
148
|
+
{ in: "query", key: "limit" },
|
|
149
|
+
],
|
|
150
|
+
},
|
|
151
|
+
]);
|
|
152
|
+
return (options?.client ?? this.client).get({
|
|
153
|
+
url: "/collection/{highlightId}/previews",
|
|
154
|
+
...options,
|
|
155
|
+
...params,
|
|
156
|
+
});
|
|
157
|
+
}
|
|
97
158
|
/**
|
|
98
159
|
* Finalize collection base URI to Arweave
|
|
99
160
|
*
|
|
@@ -158,9 +219,9 @@ export class Collection extends HeyApiClient {
|
|
|
158
219
|
});
|
|
159
220
|
}
|
|
160
221
|
/**
|
|
161
|
-
* Update edition
|
|
222
|
+
* Update edition details
|
|
162
223
|
*
|
|
163
|
-
* Update edition-specific details
|
|
224
|
+
* Update edition-specific details (name, description, image, animation, attributes). For a draft collection the change is saved directly. For a live collection it returns a `setEditionURI` transaction to sign — once confirmed on-chain, the backend re-derives the edition and refreshes every token.
|
|
164
225
|
*/
|
|
165
226
|
updateEditionDetails(parameters, options) {
|
|
166
227
|
const params = buildClientParams([parameters], [
|
|
@@ -321,9 +382,9 @@ export class Collection extends HeyApiClient {
|
|
|
321
382
|
});
|
|
322
383
|
}
|
|
323
384
|
/**
|
|
324
|
-
* Bid on
|
|
385
|
+
* Bid on an auction sale
|
|
325
386
|
*
|
|
326
|
-
* Build a bid transaction configuration for
|
|
387
|
+
* Build a bid transaction configuration for an auction sale. For ranked auctions, places or updates an on-chain bid. For English auctions, returns an executor-signed bid claim plus the `AuctionManager.bid` call (with `value` = the bid amount); the optional `preferredNftRecipient` sets where the NFT is delivered if this bidder wins.
|
|
327
388
|
*/
|
|
328
389
|
bidSale(parameters, options) {
|
|
329
390
|
const params = buildClientParams([parameters], [
|
|
@@ -333,6 +394,7 @@ export class Collection extends HeyApiClient {
|
|
|
333
394
|
{ in: "body", key: "saleId" },
|
|
334
395
|
{ in: "body", key: "bidAmount" },
|
|
335
396
|
{ in: "body", key: "bidId" },
|
|
397
|
+
{ in: "body", key: "preferredNftRecipient" },
|
|
336
398
|
],
|
|
337
399
|
},
|
|
338
400
|
]);
|
|
@@ -348,22 +410,22 @@ export class Collection extends HeyApiClient {
|
|
|
348
410
|
});
|
|
349
411
|
}
|
|
350
412
|
/**
|
|
351
|
-
*
|
|
413
|
+
* Reclaim a non-winning ranked-auction bid
|
|
352
414
|
*
|
|
353
|
-
*
|
|
415
|
+
* Build a transaction to reclaim the funds locked in a non-winning ranked-auction bid after the auction has ended.
|
|
354
416
|
*/
|
|
355
|
-
|
|
417
|
+
reclaimBid(parameters, options) {
|
|
356
418
|
const params = buildClientParams([parameters], [
|
|
357
419
|
{
|
|
358
420
|
args: [
|
|
359
421
|
{ in: "path", key: "highlightId" },
|
|
360
422
|
{ in: "body", key: "saleId" },
|
|
361
|
-
{ in: "body", key: "
|
|
423
|
+
{ in: "body", key: "bidId" },
|
|
362
424
|
],
|
|
363
425
|
},
|
|
364
426
|
]);
|
|
365
427
|
return (options?.client ?? this.client).post({
|
|
366
|
-
url: "/collection/{highlightId}/sales/
|
|
428
|
+
url: "/collection/{highlightId}/sales/reclaim",
|
|
367
429
|
...options,
|
|
368
430
|
...params,
|
|
369
431
|
headers: {
|
|
@@ -374,22 +436,66 @@ export class Collection extends HeyApiClient {
|
|
|
374
436
|
});
|
|
375
437
|
}
|
|
376
438
|
/**
|
|
377
|
-
*
|
|
439
|
+
* Withdraw ranked-auction earnings
|
|
378
440
|
*
|
|
379
|
-
*
|
|
441
|
+
* Build a transaction to withdraw a ranked auction's cumulative earnings to the payment recipient after the auction has ended. Native-currency auctions only.
|
|
380
442
|
*/
|
|
381
|
-
|
|
443
|
+
claimAuctionEarnings(parameters, options) {
|
|
444
|
+
const params = buildClientParams([parameters], [
|
|
445
|
+
{
|
|
446
|
+
args: [
|
|
447
|
+
{ in: "path", key: "highlightId" },
|
|
448
|
+
{ in: "body", key: "saleId" },
|
|
449
|
+
],
|
|
450
|
+
},
|
|
451
|
+
]);
|
|
452
|
+
return (options?.client ?? this.client).post({
|
|
453
|
+
url: "/collection/{highlightId}/sales/earnings",
|
|
454
|
+
...options,
|
|
455
|
+
...params,
|
|
456
|
+
headers: {
|
|
457
|
+
"Content-Type": "application/json",
|
|
458
|
+
...options?.headers,
|
|
459
|
+
...params.headers,
|
|
460
|
+
},
|
|
461
|
+
});
|
|
462
|
+
}
|
|
463
|
+
/**
|
|
464
|
+
* Get ranked-auction live standings
|
|
465
|
+
*
|
|
466
|
+
* Public read-model for a ranked auction: the current clearing price and each bid's winning/losing status (provisional while live, frozen once settled). Includes the authenticated viewer's winning-bid count and tokens left to claim when a bearer token is supplied.
|
|
467
|
+
*/
|
|
468
|
+
rankedAuctionStandings(parameters, options) {
|
|
382
469
|
const params = buildClientParams([parameters], [
|
|
383
470
|
{
|
|
384
471
|
args: [
|
|
385
472
|
{ in: "path", key: "highlightId" },
|
|
386
473
|
{ in: "path", key: "saleId" },
|
|
387
|
-
|
|
474
|
+
],
|
|
475
|
+
},
|
|
476
|
+
]);
|
|
477
|
+
return (options?.client ?? this.client).get({
|
|
478
|
+
url: "/collection/{highlightId}/sales/{saleId}/standings",
|
|
479
|
+
...options,
|
|
480
|
+
...params,
|
|
481
|
+
});
|
|
482
|
+
}
|
|
483
|
+
/**
|
|
484
|
+
* Fulfill (settle) an English auction
|
|
485
|
+
*
|
|
486
|
+
* Build the permissionless `AuctionManager.fulfillAuction` transaction. After the auction's end time anyone may settle it: the contract delivers the escrowed NFT to the winner's preferred recipient and splits the proceeds (95% recipient / 5% platform).
|
|
487
|
+
*/
|
|
488
|
+
fulfillEnglishAuction(parameters, options) {
|
|
489
|
+
const params = buildClientParams([parameters], [
|
|
490
|
+
{
|
|
491
|
+
args: [
|
|
492
|
+
{ in: "path", key: "highlightId" },
|
|
493
|
+
{ in: "body", key: "saleId" },
|
|
388
494
|
],
|
|
389
495
|
},
|
|
390
496
|
]);
|
|
391
497
|
return (options?.client ?? this.client).post({
|
|
392
|
-
url: "/collection/{highlightId}/sales/
|
|
498
|
+
url: "/collection/{highlightId}/sales/auction/fulfill",
|
|
393
499
|
...options,
|
|
394
500
|
...params,
|
|
395
501
|
headers: {
|
|
@@ -399,6 +505,71 @@ export class Collection extends HeyApiClient {
|
|
|
399
505
|
},
|
|
400
506
|
});
|
|
401
507
|
}
|
|
508
|
+
/**
|
|
509
|
+
* Cancel an English auction
|
|
510
|
+
*
|
|
511
|
+
* Build the `AuctionManager.cancelAuctionOnChain` transaction. The contract enforces owner-only and that no reserve-meeting bid has landed; any escrowed NFT is returned to the owner. Creator only.
|
|
512
|
+
*/
|
|
513
|
+
cancelEnglishAuction(parameters, options) {
|
|
514
|
+
const params = buildClientParams([parameters], [
|
|
515
|
+
{
|
|
516
|
+
args: [
|
|
517
|
+
{ in: "path", key: "highlightId" },
|
|
518
|
+
{ in: "body", key: "saleId" },
|
|
519
|
+
],
|
|
520
|
+
},
|
|
521
|
+
]);
|
|
522
|
+
return (options?.client ?? this.client).post({
|
|
523
|
+
url: "/collection/{highlightId}/sales/auction/cancel",
|
|
524
|
+
...options,
|
|
525
|
+
...params,
|
|
526
|
+
headers: {
|
|
527
|
+
"Content-Type": "application/json",
|
|
528
|
+
...options?.headers,
|
|
529
|
+
...params.headers,
|
|
530
|
+
},
|
|
531
|
+
});
|
|
532
|
+
}
|
|
533
|
+
/**
|
|
534
|
+
* Get English auction standings
|
|
535
|
+
*
|
|
536
|
+
* Public read-model for an English auction: lifecycle state, reserve, current highest bid/bidder, end time, escrowed token, and creator earnings — served from the chain-reconciled projection. Includes whether the authenticated viewer is the current highest bidder when a bearer token is supplied.
|
|
537
|
+
*/
|
|
538
|
+
englishAuctionStanding(parameters, options) {
|
|
539
|
+
const params = buildClientParams([parameters], [
|
|
540
|
+
{
|
|
541
|
+
args: [
|
|
542
|
+
{ in: "path", key: "highlightId" },
|
|
543
|
+
{ in: "path", key: "saleId" },
|
|
544
|
+
],
|
|
545
|
+
},
|
|
546
|
+
]);
|
|
547
|
+
return (options?.client ?? this.client).get({
|
|
548
|
+
url: "/collection/{highlightId}/sales/{saleId}/auction",
|
|
549
|
+
...options,
|
|
550
|
+
...params,
|
|
551
|
+
});
|
|
552
|
+
}
|
|
553
|
+
/**
|
|
554
|
+
* Get English auction bid history
|
|
555
|
+
*
|
|
556
|
+
* Public read-model: the English auction's bid history (newest first), sourced from the indexer's `Bid`-event ledger. Amounts are raw on-chain base units (wei) in the sale's currency.
|
|
557
|
+
*/
|
|
558
|
+
englishAuctionBids(parameters, options) {
|
|
559
|
+
const params = buildClientParams([parameters], [
|
|
560
|
+
{
|
|
561
|
+
args: [
|
|
562
|
+
{ in: "path", key: "highlightId" },
|
|
563
|
+
{ in: "path", key: "saleId" },
|
|
564
|
+
],
|
|
565
|
+
},
|
|
566
|
+
]);
|
|
567
|
+
return (options?.client ?? this.client).get({
|
|
568
|
+
url: "/collection/{highlightId}/sales/{saleId}/auction/bids",
|
|
569
|
+
...options,
|
|
570
|
+
...params,
|
|
571
|
+
});
|
|
572
|
+
}
|
|
402
573
|
/**
|
|
403
574
|
* Initiate collection deployment
|
|
404
575
|
*
|
|
@@ -426,28 +597,16 @@ export class Collection extends HeyApiClient {
|
|
|
426
597
|
});
|
|
427
598
|
}
|
|
428
599
|
/**
|
|
429
|
-
*
|
|
600
|
+
* Cancel a deployment
|
|
430
601
|
*
|
|
431
|
-
*
|
|
602
|
+
* Cancel a deployment that has not yet completed. Terminates the running workflow, deletes the deployment row, and rolls the collection back to Draft. On contracts shared with other collections the contract is left unchanged; otherwise it is reset to Draft. After cancelling, the collection can be re-deployed from scratch.
|
|
432
603
|
*/
|
|
433
|
-
|
|
434
|
-
const params = buildClientParams([parameters], [
|
|
435
|
-
{
|
|
436
|
-
args: [
|
|
437
|
-
{ in: "path", key: "highlightId" },
|
|
438
|
-
{ in: "body", key: "txHash" },
|
|
439
|
-
],
|
|
440
|
-
},
|
|
441
|
-
]);
|
|
604
|
+
deployCancel(parameters, options) {
|
|
605
|
+
const params = buildClientParams([parameters], [{ args: [{ in: "path", key: "highlightId" }] }]);
|
|
442
606
|
return (options?.client ?? this.client).post({
|
|
443
|
-
url: "/collection/{highlightId}/deploy/
|
|
607
|
+
url: "/collection/{highlightId}/deploy/cancel",
|
|
444
608
|
...options,
|
|
445
609
|
...params,
|
|
446
|
-
headers: {
|
|
447
|
-
"Content-Type": "application/json",
|
|
448
|
-
...options?.headers,
|
|
449
|
-
...params.headers,
|
|
450
|
-
},
|
|
451
610
|
});
|
|
452
611
|
}
|
|
453
612
|
}
|
|
@@ -455,7 +614,7 @@ export class Token extends HeyApiClient {
|
|
|
455
614
|
/**
|
|
456
615
|
* List tokens
|
|
457
616
|
*
|
|
458
|
-
* Get a paginated list of minted tokens for a collection. Returns tokens for public collections without authentication. Supports filtering by owner address.
|
|
617
|
+
* Get a paginated list of minted tokens for a collection. Returns tokens for public collections without authentication. Supports filtering by owner address and by trait attributes.
|
|
459
618
|
*/
|
|
460
619
|
list(parameters, options) {
|
|
461
620
|
const params = buildClientParams([parameters], [
|
|
@@ -468,6 +627,7 @@ export class Token extends HeyApiClient {
|
|
|
468
627
|
{ in: "query", key: "order" },
|
|
469
628
|
{ in: "query", key: "ownerAddress" },
|
|
470
629
|
{ in: "query", key: "search" },
|
|
630
|
+
{ in: "query", key: "attributes" },
|
|
471
631
|
],
|
|
472
632
|
},
|
|
473
633
|
]);
|
|
@@ -477,6 +637,19 @@ export class Token extends HeyApiClient {
|
|
|
477
637
|
...params,
|
|
478
638
|
});
|
|
479
639
|
}
|
|
640
|
+
/**
|
|
641
|
+
* List token attribute facets
|
|
642
|
+
*
|
|
643
|
+
* Get the trait/value facets with token counts for a collection — the data a filter sidebar renders. Available for public collections without authentication.
|
|
644
|
+
*/
|
|
645
|
+
attributeFacets(parameters, options) {
|
|
646
|
+
const params = buildClientParams([parameters], [{ args: [{ in: "path", key: "highlightId" }] }]);
|
|
647
|
+
return (options?.client ?? this.client).get({
|
|
648
|
+
url: "/collection/{highlightId}/tokens/attributes",
|
|
649
|
+
...options,
|
|
650
|
+
...params,
|
|
651
|
+
});
|
|
652
|
+
}
|
|
480
653
|
/**
|
|
481
654
|
* Get token
|
|
482
655
|
*
|
|
@@ -497,6 +670,26 @@ export class Token extends HeyApiClient {
|
|
|
497
670
|
...params,
|
|
498
671
|
});
|
|
499
672
|
}
|
|
673
|
+
/**
|
|
674
|
+
* List token owners
|
|
675
|
+
*
|
|
676
|
+
* Get the current owners of a minted token with their balances. A single entry for ERC721 tokens; ERC1155 tokens can have many. Available for public collections without authentication.
|
|
677
|
+
*/
|
|
678
|
+
listOwners(parameters, options) {
|
|
679
|
+
const params = buildClientParams([parameters], [
|
|
680
|
+
{
|
|
681
|
+
args: [
|
|
682
|
+
{ in: "path", key: "highlightId" },
|
|
683
|
+
{ in: "path", key: "tokenId" },
|
|
684
|
+
],
|
|
685
|
+
},
|
|
686
|
+
]);
|
|
687
|
+
return (options?.client ?? this.client).get({
|
|
688
|
+
url: "/collection/{highlightId}/tokens/{tokenId}/owners",
|
|
689
|
+
...options,
|
|
690
|
+
...params,
|
|
691
|
+
});
|
|
692
|
+
}
|
|
500
693
|
}
|
|
501
694
|
export class Config extends HeyApiClient {
|
|
502
695
|
/**
|
|
@@ -657,6 +850,122 @@ export class Gate extends HeyApiClient {
|
|
|
657
850
|
},
|
|
658
851
|
});
|
|
659
852
|
}
|
|
853
|
+
/**
|
|
854
|
+
* Preview a collection
|
|
855
|
+
*
|
|
856
|
+
* Resolve an NFT contract for the gate builder — a Highlight collection if we host it, otherwise external NFT data.
|
|
857
|
+
*/
|
|
858
|
+
previewCollection(parameters, options) {
|
|
859
|
+
const params = buildClientParams([parameters], [
|
|
860
|
+
{
|
|
861
|
+
args: [
|
|
862
|
+
{ in: "path", key: "chainId" },
|
|
863
|
+
{ in: "path", key: "address" },
|
|
864
|
+
],
|
|
865
|
+
},
|
|
866
|
+
]);
|
|
867
|
+
return (options?.client ?? this.client).get({
|
|
868
|
+
url: "/gate/preview/collection/{chainId}/{address}",
|
|
869
|
+
...options,
|
|
870
|
+
...params,
|
|
871
|
+
});
|
|
872
|
+
}
|
|
873
|
+
/**
|
|
874
|
+
* Preview collection attributes
|
|
875
|
+
*
|
|
876
|
+
* List a collection's trait types and values for the TOKEN_ATTRIBUTE builder.
|
|
877
|
+
*/
|
|
878
|
+
previewAttributes(parameters, options) {
|
|
879
|
+
const params = buildClientParams([parameters], [
|
|
880
|
+
{
|
|
881
|
+
args: [
|
|
882
|
+
{ in: "path", key: "chainId" },
|
|
883
|
+
{ in: "path", key: "address" },
|
|
884
|
+
],
|
|
885
|
+
},
|
|
886
|
+
]);
|
|
887
|
+
return (options?.client ?? this.client).get({
|
|
888
|
+
url: "/gate/preview/collection/{chainId}/{address}/attributes",
|
|
889
|
+
...options,
|
|
890
|
+
...params,
|
|
891
|
+
});
|
|
892
|
+
}
|
|
893
|
+
/**
|
|
894
|
+
* Preview collection tokens
|
|
895
|
+
*
|
|
896
|
+
* Page through a collection's tokens for the SPECIFIC_TOKEN builder.
|
|
897
|
+
*/
|
|
898
|
+
previewTokens(parameters, options) {
|
|
899
|
+
const params = buildClientParams([parameters], [
|
|
900
|
+
{
|
|
901
|
+
args: [
|
|
902
|
+
{ in: "path", key: "chainId" },
|
|
903
|
+
{ in: "path", key: "address" },
|
|
904
|
+
{ in: "query", key: "cursor" },
|
|
905
|
+
{ in: "query", key: "limit" },
|
|
906
|
+
],
|
|
907
|
+
},
|
|
908
|
+
]);
|
|
909
|
+
return (options?.client ?? this.client).get({
|
|
910
|
+
url: "/gate/preview/collection/{chainId}/{address}/tokens",
|
|
911
|
+
...options,
|
|
912
|
+
...params,
|
|
913
|
+
});
|
|
914
|
+
}
|
|
915
|
+
/**
|
|
916
|
+
* Preview a token
|
|
917
|
+
*
|
|
918
|
+
* Resolve a single token to confirm a SPECIFIC_TOKEN condition.
|
|
919
|
+
*/
|
|
920
|
+
previewToken(parameters, options) {
|
|
921
|
+
const params = buildClientParams([parameters], [
|
|
922
|
+
{
|
|
923
|
+
args: [
|
|
924
|
+
{ in: "path", key: "chainId" },
|
|
925
|
+
{ in: "path", key: "address" },
|
|
926
|
+
{ in: "path", key: "tokenId" },
|
|
927
|
+
],
|
|
928
|
+
},
|
|
929
|
+
]);
|
|
930
|
+
return (options?.client ?? this.client).get({
|
|
931
|
+
url: "/gate/preview/collection/{chainId}/{address}/token/{tokenId}",
|
|
932
|
+
...options,
|
|
933
|
+
...params,
|
|
934
|
+
});
|
|
935
|
+
}
|
|
936
|
+
/**
|
|
937
|
+
* Preview a currency
|
|
938
|
+
*
|
|
939
|
+
* Resolve the native gas token (no contractAddress) or an ERC-20 for the CURRENCY_BALANCE builder.
|
|
940
|
+
*/
|
|
941
|
+
previewCurrency(parameters, options) {
|
|
942
|
+
const params = buildClientParams([parameters], [
|
|
943
|
+
{
|
|
944
|
+
args: [
|
|
945
|
+
{ in: "path", key: "chainId" },
|
|
946
|
+
{ in: "query", key: "contractAddress" },
|
|
947
|
+
],
|
|
948
|
+
},
|
|
949
|
+
]);
|
|
950
|
+
return (options?.client ?? this.client).get({
|
|
951
|
+
url: "/gate/preview/currency/{chainId}",
|
|
952
|
+
...options,
|
|
953
|
+
...params,
|
|
954
|
+
});
|
|
955
|
+
}
|
|
956
|
+
/**
|
|
957
|
+
* Preview a Farcaster user
|
|
958
|
+
*
|
|
959
|
+
* Resolve a numeric fid or @handle to a Farcaster user for the FARCASTER_FOLLOW builder.
|
|
960
|
+
*/
|
|
961
|
+
previewFarcaster(parameters, options) {
|
|
962
|
+
const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "query" }] }]);
|
|
963
|
+
return (options?.client ?? this.client).get({
|
|
964
|
+
url: "/gate/preview/farcaster/user",
|
|
965
|
+
...options,
|
|
966
|
+
...params,
|
|
967
|
+
});
|
|
968
|
+
}
|
|
660
969
|
}
|
|
661
970
|
export class Mechanic extends HeyApiClient {
|
|
662
971
|
/**
|
|
@@ -918,7 +1227,7 @@ export class Media extends HeyApiClient {
|
|
|
918
1227
|
/**
|
|
919
1228
|
* Get a child File Entity by path
|
|
920
1229
|
*
|
|
921
|
-
* Returns the child File's full Entity (with locations and status). Use `
|
|
1230
|
+
* Returns the child File's full Entity (with locations and status). Use a location's `url` to fetch bytes directly from the storage provider.
|
|
922
1231
|
*/
|
|
923
1232
|
getChild(parameters, options) {
|
|
924
1233
|
const params = buildClientParams([parameters], [
|
|
@@ -936,6 +1245,48 @@ export class Media extends HeyApiClient {
|
|
|
936
1245
|
});
|
|
937
1246
|
}
|
|
938
1247
|
}
|
|
1248
|
+
export class Tx extends HeyApiClient {
|
|
1249
|
+
/**
|
|
1250
|
+
* Get transaction finalization status
|
|
1251
|
+
*
|
|
1252
|
+
* Returns the current finalization status for a transaction: the set of domain milestones (e.g. collection going live, sale going live) it must complete, and whether each is done. Overall is `Ready` only when every expected milestone is done. Use the `/ws` variant for live push updates instead of polling.
|
|
1253
|
+
*/
|
|
1254
|
+
status(parameters, options) {
|
|
1255
|
+
const params = buildClientParams([parameters], [
|
|
1256
|
+
{
|
|
1257
|
+
args: [
|
|
1258
|
+
{ in: "path", key: "chainId" },
|
|
1259
|
+
{ in: "path", key: "txHash" },
|
|
1260
|
+
],
|
|
1261
|
+
},
|
|
1262
|
+
]);
|
|
1263
|
+
return (options?.client ?? this.client).get({
|
|
1264
|
+
url: "/tx/{chainId}/{txHash}",
|
|
1265
|
+
...options,
|
|
1266
|
+
...params,
|
|
1267
|
+
});
|
|
1268
|
+
}
|
|
1269
|
+
/**
|
|
1270
|
+
* Submit a transaction for tracking
|
|
1271
|
+
*
|
|
1272
|
+
* Hand a broadcast transaction hash to the backend so it is processed end-to-end (collection/sale/bid/mint effects) and its finalization milestones become available. Returns the current status snapshot; subscribe to the `/ws` variant to await finalization.
|
|
1273
|
+
*/
|
|
1274
|
+
submit(parameters, options) {
|
|
1275
|
+
const params = buildClientParams([parameters], [
|
|
1276
|
+
{
|
|
1277
|
+
args: [
|
|
1278
|
+
{ in: "path", key: "chainId" },
|
|
1279
|
+
{ in: "path", key: "txHash" },
|
|
1280
|
+
],
|
|
1281
|
+
},
|
|
1282
|
+
]);
|
|
1283
|
+
return (options?.client ?? this.client).post({
|
|
1284
|
+
url: "/tx/{chainId}/{txHash}",
|
|
1285
|
+
...options,
|
|
1286
|
+
...params,
|
|
1287
|
+
});
|
|
1288
|
+
}
|
|
1289
|
+
}
|
|
939
1290
|
export class Siwe extends HeyApiClient {
|
|
940
1291
|
/**
|
|
941
1292
|
* Issue a SIWE nonce
|
|
@@ -1101,6 +1452,10 @@ export class HighlightClient extends HeyApiClient {
|
|
|
1101
1452
|
get media() {
|
|
1102
1453
|
return (this._media ??= new Media({ client: this.client }));
|
|
1103
1454
|
}
|
|
1455
|
+
_tx;
|
|
1456
|
+
get tx() {
|
|
1457
|
+
return (this._tx ??= new Tx({ client: this.client }));
|
|
1458
|
+
}
|
|
1104
1459
|
_user;
|
|
1105
1460
|
get user() {
|
|
1106
1461
|
return (this._user ??= new User({ client: this.client }));
|