gondi 0.53.0 → 0.58.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.
@@ -73,17 +73,40 @@ type TransactionStep = TransactionStepBase & ({
73
73
  transactionHash: Hash;
74
74
  /** Hash the wallet broadcast; equals `transactionHash` unless it was replaced. */
75
75
  originalTransactionHash: Hash;
76
+ } | {
77
+ /**
78
+ * The wallet refused to send the transaction, or it was sent and then
79
+ * reverted, was cancelled or was replaced by a different call.
80
+ */
81
+ status: 'error';
82
+ /** Hash the wallet broadcast; absent when the wallet never sent it. */
83
+ transactionHash?: Hash;
84
+ /** What the SDK call rejects with. */
85
+ error: unknown;
76
86
  });
77
- type Step = {
87
+ /** A step that failed; the SDK call rejects with `error` right after reporting it. */
88
+ type FailedStep = {
89
+ status: 'error';
90
+ error: unknown;
91
+ };
92
+ type Step = ({
78
93
  type: 'signature';
79
94
  primaryType: string;
95
+ } & ({
80
96
  status: 'waiting' | 'success';
81
- } | TransactionStep | {
97
+ } | FailedStep)) | TransactionStep | ({
82
98
  type: 'api';
83
- status: 'waiting' | 'success';
84
99
  mutationName: string;
85
100
  variables?: OperationVariables;
86
- };
101
+ } & ({
102
+ status: 'waiting' | 'success';
103
+ } | FailedStep));
104
+ /**
105
+ * Reports each signature, transaction and API mutation as it moves from
106
+ * `waiting` to `success`, or to `error` when it fails. The SDK awaits every call.
107
+ * An error the callback itself throws is not a failed step: the SDK call
108
+ * rejects with it and no `error` step follows.
109
+ */
87
110
  export type OnStepChange = (step: Step) => Promise<void>;
88
111
  export declare class Gondi {
89
112
  private pendingSingleNftPublications;
@@ -288,12 +311,16 @@ export declare class Gondi {
288
311
  * `nftIds` for a set bid that fills with any of the listed NFTs of
289
312
  * `collectionId` (2 to 1,000), `condition.anyTraitIds` for an OR trait bid that
290
313
  * fills with any NFT of `collectionId` carrying one of those values of a trait
291
- * key, and `collectionId` alone for a collection bid.
314
+ * key, `condition.expression` for a condition bid that fills with any NFT of
315
+ * `collectionId` an all/any/not tree of traits and NFTs matches, and
316
+ * `collectionId` alone for a collection bid.
292
317
  * A trait, set or collection bid fills up to `maxExecutions` times.
293
318
  */
294
319
  makeOrder(orderInput: OrderInput): Promise<{
295
320
  amount?: import("./generated/graphql").InputMaybe<import("./generated/graphql").Scalars["BigInt"]>;
321
+ budgetId?: import("./generated/graphql").InputMaybe<import("./generated/graphql").Scalars["Int64"]>;
296
322
  contractAddress: import("./generated/graphql").Scalars["Address"];
323
+ counter?: import("./generated/graphql").InputMaybe<import("./generated/graphql").Scalars["BigInt"]>;
297
324
  currencyAddress: import("./generated/graphql").Scalars["Address"];
298
325
  expirationTime: import("./generated/graphql").Scalars["BigInt"];
299
326
  fees?: import("./generated/graphql").InputMaybe<Array<import("./generated/graphql").OrderFee>>;
@@ -310,7 +337,9 @@ export declare class Gondi {
310
337
  marketPlaceAddress: Address;
311
338
  } | {
312
339
  amount?: import("./generated/graphql").InputMaybe<import("./generated/graphql").Scalars["BigInt"]>;
340
+ budgetId?: import("./generated/graphql").InputMaybe<import("./generated/graphql").Scalars["Int64"]>;
313
341
  collectionId: import("./generated/graphql").Scalars["Int"];
342
+ counter?: import("./generated/graphql").InputMaybe<import("./generated/graphql").Scalars["BigInt"]>;
314
343
  currencyAddress: import("./generated/graphql").Scalars["Address"];
315
344
  expirationTime: import("./generated/graphql").Scalars["BigInt"];
316
345
  fees?: import("./generated/graphql").InputMaybe<Array<import("./generated/graphql").OrderFee>>;
@@ -327,6 +356,8 @@ export declare class Gondi {
327
356
  marketPlaceAddress: Address;
328
357
  } | {
329
358
  amount?: import("./generated/graphql").InputMaybe<import("./generated/graphql").Scalars["BigInt"]>;
359
+ budgetId?: import("./generated/graphql").InputMaybe<import("./generated/graphql").Scalars["Int64"]>;
360
+ counter?: import("./generated/graphql").InputMaybe<import("./generated/graphql").Scalars["BigInt"]>;
330
361
  currencyAddress: import("./generated/graphql").Scalars["Address"];
331
362
  expirationTime: import("./generated/graphql").Scalars["BigInt"];
332
363
  fees?: import("./generated/graphql").InputMaybe<Array<import("./generated/graphql").OrderFee>>;
@@ -344,8 +375,10 @@ export declare class Gondi {
344
375
  marketPlaceAddress: Address;
345
376
  } | {
346
377
  amount?: import("./generated/graphql").InputMaybe<import("./generated/graphql").Scalars["BigInt"]>;
378
+ budgetId?: import("./generated/graphql").InputMaybe<import("./generated/graphql").Scalars["Int64"]>;
347
379
  collectionId: import("./generated/graphql").Scalars["Int"];
348
380
  condition?: import("./generated/graphql").InputMaybe<import("./generated/graphql").NftSetConditionInput>;
381
+ counter?: import("./generated/graphql").InputMaybe<import("./generated/graphql").Scalars["BigInt"]>;
349
382
  currencyAddress: import("./generated/graphql").Scalars["Address"];
350
383
  expirationTime: import("./generated/graphql").Scalars["BigInt"];
351
384
  fees?: import("./generated/graphql").InputMaybe<Array<import("./generated/graphql").OrderFee>>;
@@ -363,7 +396,9 @@ export declare class Gondi {
363
396
  marketPlaceAddress: Address;
364
397
  } | {
365
398
  amount?: import("./generated/graphql").InputMaybe<import("./generated/graphql").Scalars["BigInt"]>;
399
+ budgetId?: import("./generated/graphql").InputMaybe<import("./generated/graphql").Scalars["Int64"]>;
366
400
  contractAddress: import("./generated/graphql").Scalars["Address"];
401
+ counter?: import("./generated/graphql").InputMaybe<import("./generated/graphql").Scalars["BigInt"]>;
367
402
  currencyAddress: import("./generated/graphql").Scalars["Address"];
368
403
  expirationTime: import("./generated/graphql").Scalars["BigInt"];
369
404
  fees?: import("./generated/graphql").InputMaybe<Array<import("./generated/graphql").OrderFee>>;
@@ -380,7 +415,9 @@ export declare class Gondi {
380
415
  marketPlaceAddress: Address;
381
416
  } | {
382
417
  amount?: import("./generated/graphql").InputMaybe<import("./generated/graphql").Scalars["BigInt"]>;
418
+ budgetId?: import("./generated/graphql").InputMaybe<import("./generated/graphql").Scalars["Int64"]>;
383
419
  collectionId: import("./generated/graphql").Scalars["Int"];
420
+ counter?: import("./generated/graphql").InputMaybe<import("./generated/graphql").Scalars["BigInt"]>;
384
421
  currencyAddress: import("./generated/graphql").Scalars["Address"];
385
422
  expirationTime: import("./generated/graphql").Scalars["BigInt"];
386
423
  fees?: import("./generated/graphql").InputMaybe<Array<import("./generated/graphql").OrderFee>>;
@@ -397,6 +434,8 @@ export declare class Gondi {
397
434
  marketPlaceAddress: Address;
398
435
  } | {
399
436
  amount?: import("./generated/graphql").InputMaybe<import("./generated/graphql").Scalars["BigInt"]>;
437
+ budgetId?: import("./generated/graphql").InputMaybe<import("./generated/graphql").Scalars["Int64"]>;
438
+ counter?: import("./generated/graphql").InputMaybe<import("./generated/graphql").Scalars["BigInt"]>;
400
439
  currencyAddress: import("./generated/graphql").Scalars["Address"];
401
440
  expirationTime: import("./generated/graphql").Scalars["BigInt"];
402
441
  fees?: import("./generated/graphql").InputMaybe<Array<import("./generated/graphql").OrderFee>>;
@@ -414,8 +453,10 @@ export declare class Gondi {
414
453
  marketPlaceAddress: Address;
415
454
  } | {
416
455
  amount?: import("./generated/graphql").InputMaybe<import("./generated/graphql").Scalars["BigInt"]>;
456
+ budgetId?: import("./generated/graphql").InputMaybe<import("./generated/graphql").Scalars["Int64"]>;
417
457
  collectionId: import("./generated/graphql").Scalars["Int"];
418
458
  condition?: import("./generated/graphql").InputMaybe<import("./generated/graphql").NftSetConditionInput>;
459
+ counter?: import("./generated/graphql").InputMaybe<import("./generated/graphql").Scalars["BigInt"]>;
419
460
  currencyAddress: import("./generated/graphql").Scalars["Address"];
420
461
  expirationTime: import("./generated/graphql").Scalars["BigInt"];
421
462
  fees?: import("./generated/graphql").InputMaybe<Array<import("./generated/graphql").OrderFee>>;
@@ -433,7 +474,9 @@ export declare class Gondi {
433
474
  marketPlaceAddress: Address;
434
475
  } | {
435
476
  amount?: import("./generated/graphql").InputMaybe<import("./generated/graphql").Scalars["BigInt"]>;
477
+ budgetId?: import("./generated/graphql").InputMaybe<import("./generated/graphql").Scalars["Int64"]>;
436
478
  contractAddress: import("./generated/graphql").Scalars["Address"];
479
+ counter?: import("./generated/graphql").InputMaybe<import("./generated/graphql").Scalars["BigInt"]>;
437
480
  currencyAddress: import("./generated/graphql").Scalars["Address"];
438
481
  expirationTime: import("./generated/graphql").Scalars["BigInt"];
439
482
  fees?: import("./generated/graphql").InputMaybe<Array<import("./generated/graphql").OrderFee>>;
@@ -450,7 +493,9 @@ export declare class Gondi {
450
493
  marketPlaceAddress: Address;
451
494
  } | {
452
495
  amount?: import("./generated/graphql").InputMaybe<import("./generated/graphql").Scalars["BigInt"]>;
496
+ budgetId?: import("./generated/graphql").InputMaybe<import("./generated/graphql").Scalars["Int64"]>;
453
497
  collectionId: import("./generated/graphql").Scalars["Int"];
498
+ counter?: import("./generated/graphql").InputMaybe<import("./generated/graphql").Scalars["BigInt"]>;
454
499
  currencyAddress: import("./generated/graphql").Scalars["Address"];
455
500
  expirationTime: import("./generated/graphql").Scalars["BigInt"];
456
501
  fees?: import("./generated/graphql").InputMaybe<Array<import("./generated/graphql").OrderFee>>;
@@ -467,6 +512,8 @@ export declare class Gondi {
467
512
  marketPlaceAddress: Address;
468
513
  } | {
469
514
  amount?: import("./generated/graphql").InputMaybe<import("./generated/graphql").Scalars["BigInt"]>;
515
+ budgetId?: import("./generated/graphql").InputMaybe<import("./generated/graphql").Scalars["Int64"]>;
516
+ counter?: import("./generated/graphql").InputMaybe<import("./generated/graphql").Scalars["BigInt"]>;
470
517
  currencyAddress: import("./generated/graphql").Scalars["Address"];
471
518
  expirationTime: import("./generated/graphql").Scalars["BigInt"];
472
519
  fees?: import("./generated/graphql").InputMaybe<Array<import("./generated/graphql").OrderFee>>;
@@ -484,8 +531,10 @@ export declare class Gondi {
484
531
  marketPlaceAddress: Address;
485
532
  } | {
486
533
  amount?: import("./generated/graphql").InputMaybe<import("./generated/graphql").Scalars["BigInt"]>;
534
+ budgetId?: import("./generated/graphql").InputMaybe<import("./generated/graphql").Scalars["Int64"]>;
487
535
  collectionId: import("./generated/graphql").Scalars["Int"];
488
536
  condition?: import("./generated/graphql").InputMaybe<import("./generated/graphql").NftSetConditionInput>;
537
+ counter?: import("./generated/graphql").InputMaybe<import("./generated/graphql").Scalars["BigInt"]>;
489
538
  currencyAddress: import("./generated/graphql").Scalars["Address"];
490
539
  expirationTime: import("./generated/graphql").Scalars["BigInt"];
491
540
  fees?: import("./generated/graphql").InputMaybe<Array<import("./generated/graphql").OrderFee>>;
@@ -503,7 +552,9 @@ export declare class Gondi {
503
552
  marketPlaceAddress: Address;
504
553
  } | {
505
554
  amount?: import("./generated/graphql").InputMaybe<import("./generated/graphql").Scalars["BigInt"]>;
555
+ budgetId?: import("./generated/graphql").InputMaybe<import("./generated/graphql").Scalars["Int64"]>;
506
556
  contractAddress: import("./generated/graphql").Scalars["Address"];
557
+ counter?: import("./generated/graphql").InputMaybe<import("./generated/graphql").Scalars["BigInt"]>;
507
558
  currencyAddress: import("./generated/graphql").Scalars["Address"];
508
559
  expirationTime: import("./generated/graphql").Scalars["BigInt"];
509
560
  fees?: import("./generated/graphql").InputMaybe<Array<import("./generated/graphql").OrderFee>>;
@@ -520,7 +571,9 @@ export declare class Gondi {
520
571
  marketPlaceAddress: Address;
521
572
  } | {
522
573
  amount?: import("./generated/graphql").InputMaybe<import("./generated/graphql").Scalars["BigInt"]>;
574
+ budgetId?: import("./generated/graphql").InputMaybe<import("./generated/graphql").Scalars["Int64"]>;
523
575
  collectionId: import("./generated/graphql").Scalars["Int"];
576
+ counter?: import("./generated/graphql").InputMaybe<import("./generated/graphql").Scalars["BigInt"]>;
524
577
  currencyAddress: import("./generated/graphql").Scalars["Address"];
525
578
  expirationTime: import("./generated/graphql").Scalars["BigInt"];
526
579
  fees?: import("./generated/graphql").InputMaybe<Array<import("./generated/graphql").OrderFee>>;
@@ -537,6 +590,8 @@ export declare class Gondi {
537
590
  marketPlaceAddress: Address;
538
591
  } | {
539
592
  amount?: import("./generated/graphql").InputMaybe<import("./generated/graphql").Scalars["BigInt"]>;
593
+ budgetId?: import("./generated/graphql").InputMaybe<import("./generated/graphql").Scalars["Int64"]>;
594
+ counter?: import("./generated/graphql").InputMaybe<import("./generated/graphql").Scalars["BigInt"]>;
540
595
  currencyAddress: import("./generated/graphql").Scalars["Address"];
541
596
  expirationTime: import("./generated/graphql").Scalars["BigInt"];
542
597
  fees?: import("./generated/graphql").InputMaybe<Array<import("./generated/graphql").OrderFee>>;
@@ -554,8 +609,10 @@ export declare class Gondi {
554
609
  marketPlaceAddress: Address;
555
610
  } | {
556
611
  amount?: import("./generated/graphql").InputMaybe<import("./generated/graphql").Scalars["BigInt"]>;
612
+ budgetId?: import("./generated/graphql").InputMaybe<import("./generated/graphql").Scalars["Int64"]>;
557
613
  collectionId: import("./generated/graphql").Scalars["Int"];
558
614
  condition?: import("./generated/graphql").InputMaybe<import("./generated/graphql").NftSetConditionInput>;
615
+ counter?: import("./generated/graphql").InputMaybe<import("./generated/graphql").Scalars["BigInt"]>;
559
616
  currencyAddress: import("./generated/graphql").Scalars["Address"];
560
617
  expirationTime: import("./generated/graphql").Scalars["BigInt"];
561
618
  fees?: import("./generated/graphql").InputMaybe<Array<import("./generated/graphql").OrderFee>>;
@@ -573,7 +630,9 @@ export declare class Gondi {
573
630
  marketPlaceAddress: Address;
574
631
  } | {
575
632
  amount?: import("./generated/graphql").InputMaybe<import("./generated/graphql").Scalars["BigInt"]>;
633
+ budgetId?: import("./generated/graphql").InputMaybe<import("./generated/graphql").Scalars["Int64"]>;
576
634
  contractAddress: import("./generated/graphql").Scalars["Address"];
635
+ counter?: import("./generated/graphql").InputMaybe<import("./generated/graphql").Scalars["BigInt"]>;
577
636
  currencyAddress: import("./generated/graphql").Scalars["Address"];
578
637
  expirationTime: import("./generated/graphql").Scalars["BigInt"];
579
638
  fees?: import("./generated/graphql").InputMaybe<Array<import("./generated/graphql").OrderFee>>;
@@ -590,7 +649,9 @@ export declare class Gondi {
590
649
  marketPlaceAddress: Address;
591
650
  } | {
592
651
  amount?: import("./generated/graphql").InputMaybe<import("./generated/graphql").Scalars["BigInt"]>;
652
+ budgetId?: import("./generated/graphql").InputMaybe<import("./generated/graphql").Scalars["Int64"]>;
593
653
  collectionId: import("./generated/graphql").Scalars["Int"];
654
+ counter?: import("./generated/graphql").InputMaybe<import("./generated/graphql").Scalars["BigInt"]>;
594
655
  currencyAddress: import("./generated/graphql").Scalars["Address"];
595
656
  expirationTime: import("./generated/graphql").Scalars["BigInt"];
596
657
  fees?: import("./generated/graphql").InputMaybe<Array<import("./generated/graphql").OrderFee>>;
@@ -607,6 +668,8 @@ export declare class Gondi {
607
668
  marketPlaceAddress: Address;
608
669
  } | {
609
670
  amount?: import("./generated/graphql").InputMaybe<import("./generated/graphql").Scalars["BigInt"]>;
671
+ budgetId?: import("./generated/graphql").InputMaybe<import("./generated/graphql").Scalars["Int64"]>;
672
+ counter?: import("./generated/graphql").InputMaybe<import("./generated/graphql").Scalars["BigInt"]>;
610
673
  currencyAddress: import("./generated/graphql").Scalars["Address"];
611
674
  expirationTime: import("./generated/graphql").Scalars["BigInt"];
612
675
  fees?: import("./generated/graphql").InputMaybe<Array<import("./generated/graphql").OrderFee>>;
@@ -624,8 +687,10 @@ export declare class Gondi {
624
687
  marketPlaceAddress: Address;
625
688
  } | {
626
689
  amount?: import("./generated/graphql").InputMaybe<import("./generated/graphql").Scalars["BigInt"]>;
690
+ budgetId?: import("./generated/graphql").InputMaybe<import("./generated/graphql").Scalars["Int64"]>;
627
691
  collectionId: import("./generated/graphql").Scalars["Int"];
628
692
  condition?: import("./generated/graphql").InputMaybe<import("./generated/graphql").NftSetConditionInput>;
693
+ counter?: import("./generated/graphql").InputMaybe<import("./generated/graphql").Scalars["BigInt"]>;
629
694
  currencyAddress: import("./generated/graphql").Scalars["Address"];
630
695
  expirationTime: import("./generated/graphql").Scalars["BigInt"];
631
696
  fees?: import("./generated/graphql").InputMaybe<Array<import("./generated/graphql").OrderFee>>;
@@ -664,6 +729,46 @@ export declare class Gondi {
664
729
  id: string;
665
730
  };
666
731
  }[]>;
732
+ /**
733
+ * Publishes `orders` like `makeOrders` and lists each one on OpenSea too, under the same
734
+ * signature. Public asks on Ethereum only; the owner must have approved OpenSea's conduit for
735
+ * each collection. A refusal never touches the GONDI ask: `openSeaListings` holds one entry per
736
+ * ask, with its `orderHash` once OpenSea took it, or the `error` saying why it did not.
737
+ */
738
+ makeOrdersOnOpenSea(orders: SingleNftOrderInput[]): Promise<{
739
+ __typename?: "BulkNFTOrdersResult";
740
+ orders: Array<{
741
+ __typename?: "SingleNFTOrder";
742
+ id: string;
743
+ price: bigint;
744
+ fees: bigint;
745
+ currencyAddress: Address;
746
+ marketPlace: string;
747
+ status: string;
748
+ startTime: Date;
749
+ expiration: Date;
750
+ maker: Address;
751
+ isAsk: boolean;
752
+ nonce: bigint;
753
+ taker: Address;
754
+ signature: Hex;
755
+ marketPlaceAddress: Address;
756
+ evmOrder?: object | null;
757
+ nft: {
758
+ __typename?: "NFT";
759
+ id: string;
760
+ };
761
+ }>;
762
+ openSeaListings: Array<{
763
+ __typename?: "OpenSeaListingResult";
764
+ contractAddress: Address;
765
+ tokenId: bigint;
766
+ orderHash?: Hash | null;
767
+ error?: string | null;
768
+ }>;
769
+ }>;
770
+ /** Publishes the batch, signing the typed data the API answers with when it asks for it. */
771
+ private publishBulkOrders;
667
772
  makeDeal(dealInput: DealInput): Promise<{
668
773
  blockchain: import("./generated/graphql").BlockchainEnum;
669
774
  counterOfferForId?: import("./generated/graphql").InputMaybe<import("./generated/graphql").Scalars["Int"]>;
@@ -2423,6 +2528,477 @@ export declare class Gondi {
2423
2528
  slug?: never;
2424
2529
  contractAddress: Address;
2425
2530
  }): Promise<number[]>;
2531
+ /**
2532
+ * Lists trade orders — bids and listings — across the marketplaces GONDI indexes, newest first
2533
+ * unless `sortBy` says otherwise. Only active orders unless `statuses` is given.
2534
+ *
2535
+ * @returns One page of orders, with the cursor of the next one.
2536
+ */
2537
+ orders({ side, collections, traits, nfts, makers, excludeMakers, currencies, statuses, matchMode, orderTypes, sortBy, limit, cursor, }: model.ListOrdersProps): Promise<{
2538
+ orders: ({
2539
+ __typename: "BuyNowPayLaterOrder";
2540
+ id: string;
2541
+ price: bigint;
2542
+ steppedPrice?: bigint | null;
2543
+ currencyAddress: Address;
2544
+ maker: Address;
2545
+ isAsk: boolean;
2546
+ status: string;
2547
+ startTime: Date;
2548
+ expiration: Date;
2549
+ executions: number;
2550
+ maxExecutions: number;
2551
+ cancelsOffChain: boolean;
2552
+ marketPlace: string;
2553
+ marketPlaceAddress: Address;
2554
+ } | {
2555
+ __typename: "CollectionOrder";
2556
+ collectionId: number;
2557
+ id: string;
2558
+ price: bigint;
2559
+ steppedPrice?: bigint | null;
2560
+ currencyAddress: Address;
2561
+ maker: Address;
2562
+ isAsk: boolean;
2563
+ status: string;
2564
+ startTime: Date;
2565
+ expiration: Date;
2566
+ executions: number;
2567
+ maxExecutions: number;
2568
+ cancelsOffChain: boolean;
2569
+ marketPlace: string;
2570
+ marketPlaceAddress: Address;
2571
+ } | {
2572
+ __typename: "MultipleTraitOrder";
2573
+ collectionId: number;
2574
+ id: string;
2575
+ price: bigint;
2576
+ steppedPrice?: bigint | null;
2577
+ currencyAddress: Address;
2578
+ maker: Address;
2579
+ isAsk: boolean;
2580
+ status: string;
2581
+ startTime: Date;
2582
+ expiration: Date;
2583
+ executions: number;
2584
+ maxExecutions: number;
2585
+ cancelsOffChain: boolean;
2586
+ marketPlace: string;
2587
+ marketPlaceAddress: Address;
2588
+ } | {
2589
+ __typename: "SellAndRepayOrder";
2590
+ id: string;
2591
+ price: bigint;
2592
+ steppedPrice?: bigint | null;
2593
+ currencyAddress: Address;
2594
+ maker: Address;
2595
+ isAsk: boolean;
2596
+ status: string;
2597
+ startTime: Date;
2598
+ expiration: Date;
2599
+ executions: number;
2600
+ maxExecutions: number;
2601
+ cancelsOffChain: boolean;
2602
+ marketPlace: string;
2603
+ marketPlaceAddress: Address;
2604
+ } | {
2605
+ __typename: "SetBidOrder";
2606
+ collectionId: number;
2607
+ id: string;
2608
+ price: bigint;
2609
+ steppedPrice?: bigint | null;
2610
+ currencyAddress: Address;
2611
+ maker: Address;
2612
+ isAsk: boolean;
2613
+ status: string;
2614
+ startTime: Date;
2615
+ expiration: Date;
2616
+ executions: number;
2617
+ maxExecutions: number;
2618
+ cancelsOffChain: boolean;
2619
+ marketPlace: string;
2620
+ marketPlaceAddress: Address;
2621
+ } | {
2622
+ __typename: "SingleNFTOrder";
2623
+ id: string;
2624
+ price: bigint;
2625
+ steppedPrice?: bigint | null;
2626
+ currencyAddress: Address;
2627
+ maker: Address;
2628
+ isAsk: boolean;
2629
+ status: string;
2630
+ startTime: Date;
2631
+ expiration: Date;
2632
+ executions: number;
2633
+ maxExecutions: number;
2634
+ cancelsOffChain: boolean;
2635
+ marketPlace: string;
2636
+ marketPlaceAddress: Address;
2637
+ nft: {
2638
+ __typename?: "NFT";
2639
+ id: string;
2640
+ tokenId: bigint;
2641
+ collection?: {
2642
+ __typename?: "Collection";
2643
+ id: string;
2644
+ } | null;
2645
+ };
2646
+ } | {
2647
+ __typename: "StealthMaskedOrder";
2648
+ id: string;
2649
+ price: bigint;
2650
+ steppedPrice?: bigint | null;
2651
+ currencyAddress: Address;
2652
+ maker: Address;
2653
+ isAsk: boolean;
2654
+ status: string;
2655
+ startTime: Date;
2656
+ expiration: Date;
2657
+ executions: number;
2658
+ maxExecutions: number;
2659
+ cancelsOffChain: boolean;
2660
+ marketPlace: string;
2661
+ marketPlaceAddress: Address;
2662
+ } | {
2663
+ __typename: "TraitOrder";
2664
+ collectionId: number;
2665
+ id: string;
2666
+ price: bigint;
2667
+ steppedPrice?: bigint | null;
2668
+ currencyAddress: Address;
2669
+ maker: Address;
2670
+ isAsk: boolean;
2671
+ status: string;
2672
+ startTime: Date;
2673
+ expiration: Date;
2674
+ executions: number;
2675
+ maxExecutions: number;
2676
+ cancelsOffChain: boolean;
2677
+ marketPlace: string;
2678
+ marketPlaceAddress: Address;
2679
+ })[];
2680
+ hasNextPage: true;
2681
+ cursor: string;
2682
+ } | {
2683
+ orders: ({
2684
+ __typename: "BuyNowPayLaterOrder";
2685
+ id: string;
2686
+ price: bigint;
2687
+ steppedPrice?: bigint | null;
2688
+ currencyAddress: Address;
2689
+ maker: Address;
2690
+ isAsk: boolean;
2691
+ status: string;
2692
+ startTime: Date;
2693
+ expiration: Date;
2694
+ executions: number;
2695
+ maxExecutions: number;
2696
+ cancelsOffChain: boolean;
2697
+ marketPlace: string;
2698
+ marketPlaceAddress: Address;
2699
+ } | {
2700
+ __typename: "CollectionOrder";
2701
+ collectionId: number;
2702
+ id: string;
2703
+ price: bigint;
2704
+ steppedPrice?: bigint | null;
2705
+ currencyAddress: Address;
2706
+ maker: Address;
2707
+ isAsk: boolean;
2708
+ status: string;
2709
+ startTime: Date;
2710
+ expiration: Date;
2711
+ executions: number;
2712
+ maxExecutions: number;
2713
+ cancelsOffChain: boolean;
2714
+ marketPlace: string;
2715
+ marketPlaceAddress: Address;
2716
+ } | {
2717
+ __typename: "MultipleTraitOrder";
2718
+ collectionId: number;
2719
+ id: string;
2720
+ price: bigint;
2721
+ steppedPrice?: bigint | null;
2722
+ currencyAddress: Address;
2723
+ maker: Address;
2724
+ isAsk: boolean;
2725
+ status: string;
2726
+ startTime: Date;
2727
+ expiration: Date;
2728
+ executions: number;
2729
+ maxExecutions: number;
2730
+ cancelsOffChain: boolean;
2731
+ marketPlace: string;
2732
+ marketPlaceAddress: Address;
2733
+ } | {
2734
+ __typename: "SellAndRepayOrder";
2735
+ id: string;
2736
+ price: bigint;
2737
+ steppedPrice?: bigint | null;
2738
+ currencyAddress: Address;
2739
+ maker: Address;
2740
+ isAsk: boolean;
2741
+ status: string;
2742
+ startTime: Date;
2743
+ expiration: Date;
2744
+ executions: number;
2745
+ maxExecutions: number;
2746
+ cancelsOffChain: boolean;
2747
+ marketPlace: string;
2748
+ marketPlaceAddress: Address;
2749
+ } | {
2750
+ __typename: "SetBidOrder";
2751
+ collectionId: number;
2752
+ id: string;
2753
+ price: bigint;
2754
+ steppedPrice?: bigint | null;
2755
+ currencyAddress: Address;
2756
+ maker: Address;
2757
+ isAsk: boolean;
2758
+ status: string;
2759
+ startTime: Date;
2760
+ expiration: Date;
2761
+ executions: number;
2762
+ maxExecutions: number;
2763
+ cancelsOffChain: boolean;
2764
+ marketPlace: string;
2765
+ marketPlaceAddress: Address;
2766
+ } | {
2767
+ __typename: "SingleNFTOrder";
2768
+ id: string;
2769
+ price: bigint;
2770
+ steppedPrice?: bigint | null;
2771
+ currencyAddress: Address;
2772
+ maker: Address;
2773
+ isAsk: boolean;
2774
+ status: string;
2775
+ startTime: Date;
2776
+ expiration: Date;
2777
+ executions: number;
2778
+ maxExecutions: number;
2779
+ cancelsOffChain: boolean;
2780
+ marketPlace: string;
2781
+ marketPlaceAddress: Address;
2782
+ nft: {
2783
+ __typename?: "NFT";
2784
+ id: string;
2785
+ tokenId: bigint;
2786
+ collection?: {
2787
+ __typename?: "Collection";
2788
+ id: string;
2789
+ } | null;
2790
+ };
2791
+ } | {
2792
+ __typename: "StealthMaskedOrder";
2793
+ id: string;
2794
+ price: bigint;
2795
+ steppedPrice?: bigint | null;
2796
+ currencyAddress: Address;
2797
+ maker: Address;
2798
+ isAsk: boolean;
2799
+ status: string;
2800
+ startTime: Date;
2801
+ expiration: Date;
2802
+ executions: number;
2803
+ maxExecutions: number;
2804
+ cancelsOffChain: boolean;
2805
+ marketPlace: string;
2806
+ marketPlaceAddress: Address;
2807
+ } | {
2808
+ __typename: "TraitOrder";
2809
+ collectionId: number;
2810
+ id: string;
2811
+ price: bigint;
2812
+ steppedPrice?: bigint | null;
2813
+ currencyAddress: Address;
2814
+ maker: Address;
2815
+ isAsk: boolean;
2816
+ status: string;
2817
+ startTime: Date;
2818
+ expiration: Date;
2819
+ executions: number;
2820
+ maxExecutions: number;
2821
+ cancelsOffChain: boolean;
2822
+ marketPlace: string;
2823
+ marketPlaceAddress: Address;
2824
+ })[];
2825
+ hasNextPage: false;
2826
+ cursor: null;
2827
+ }>;
2828
+ /**
2829
+ * Reads what pricing and placing a bid or a listing on a collection needs: its id and contract
2830
+ * address, the Seaport conduit key its listings are approved through (zero for Seaport itself),
2831
+ * its floor (the cheapest active listing in `currencies`, any currency when omitted), its highest
2832
+ * bid that any item can fill, and its royalties (`required` ones must be paid as listing fees).
2833
+ *
2834
+ * Looks the collection up by slug, the lookup the API answers fastest.
2835
+ *
2836
+ * @throws Error when no collection has `slug`.
2837
+ */
2838
+ collectionMarket({ slug, currencies }: {
2839
+ slug: string;
2840
+ currencies?: Address[];
2841
+ }): Promise<{
2842
+ collectionId: number;
2843
+ contractAddress: `0x${string}`;
2844
+ seaportConduitKey: `0x${string}`;
2845
+ floorPrice: {
2846
+ __typename?: "BigIntCurrencyAmount";
2847
+ amount: bigint;
2848
+ currency: {
2849
+ __typename?: "Currency";
2850
+ address: Address;
2851
+ };
2852
+ } | null;
2853
+ highestBid: {
2854
+ __typename: "BuyNowPayLaterOrder";
2855
+ id: string;
2856
+ price: bigint;
2857
+ steppedPrice?: bigint | null;
2858
+ currencyAddress: Address;
2859
+ maker: Address;
2860
+ isAsk: boolean;
2861
+ status: string;
2862
+ startTime: Date;
2863
+ expiration: Date;
2864
+ executions: number;
2865
+ maxExecutions: number;
2866
+ cancelsOffChain: boolean;
2867
+ marketPlace: string;
2868
+ marketPlaceAddress: Address;
2869
+ } | {
2870
+ __typename: "CollectionOrder";
2871
+ collectionId: number;
2872
+ id: string;
2873
+ price: bigint;
2874
+ steppedPrice?: bigint | null;
2875
+ currencyAddress: Address;
2876
+ maker: Address;
2877
+ isAsk: boolean;
2878
+ status: string;
2879
+ startTime: Date;
2880
+ expiration: Date;
2881
+ executions: number;
2882
+ maxExecutions: number;
2883
+ cancelsOffChain: boolean;
2884
+ marketPlace: string;
2885
+ marketPlaceAddress: Address;
2886
+ } | {
2887
+ __typename: "MultipleTraitOrder";
2888
+ collectionId: number;
2889
+ id: string;
2890
+ price: bigint;
2891
+ steppedPrice?: bigint | null;
2892
+ currencyAddress: Address;
2893
+ maker: Address;
2894
+ isAsk: boolean;
2895
+ status: string;
2896
+ startTime: Date;
2897
+ expiration: Date;
2898
+ executions: number;
2899
+ maxExecutions: number;
2900
+ cancelsOffChain: boolean;
2901
+ marketPlace: string;
2902
+ marketPlaceAddress: Address;
2903
+ } | {
2904
+ __typename: "SellAndRepayOrder";
2905
+ id: string;
2906
+ price: bigint;
2907
+ steppedPrice?: bigint | null;
2908
+ currencyAddress: Address;
2909
+ maker: Address;
2910
+ isAsk: boolean;
2911
+ status: string;
2912
+ startTime: Date;
2913
+ expiration: Date;
2914
+ executions: number;
2915
+ maxExecutions: number;
2916
+ cancelsOffChain: boolean;
2917
+ marketPlace: string;
2918
+ marketPlaceAddress: Address;
2919
+ } | {
2920
+ __typename: "SetBidOrder";
2921
+ collectionId: number;
2922
+ id: string;
2923
+ price: bigint;
2924
+ steppedPrice?: bigint | null;
2925
+ currencyAddress: Address;
2926
+ maker: Address;
2927
+ isAsk: boolean;
2928
+ status: string;
2929
+ startTime: Date;
2930
+ expiration: Date;
2931
+ executions: number;
2932
+ maxExecutions: number;
2933
+ cancelsOffChain: boolean;
2934
+ marketPlace: string;
2935
+ marketPlaceAddress: Address;
2936
+ } | {
2937
+ __typename: "SingleNFTOrder";
2938
+ id: string;
2939
+ price: bigint;
2940
+ steppedPrice?: bigint | null;
2941
+ currencyAddress: Address;
2942
+ maker: Address;
2943
+ isAsk: boolean;
2944
+ status: string;
2945
+ startTime: Date;
2946
+ expiration: Date;
2947
+ executions: number;
2948
+ maxExecutions: number;
2949
+ cancelsOffChain: boolean;
2950
+ marketPlace: string;
2951
+ marketPlaceAddress: Address;
2952
+ nft: {
2953
+ __typename?: "NFT";
2954
+ id: string;
2955
+ tokenId: bigint;
2956
+ collection?: {
2957
+ __typename?: "Collection";
2958
+ id: string;
2959
+ } | null;
2960
+ };
2961
+ } | {
2962
+ __typename: "StealthMaskedOrder";
2963
+ id: string;
2964
+ price: bigint;
2965
+ steppedPrice?: bigint | null;
2966
+ currencyAddress: Address;
2967
+ maker: Address;
2968
+ isAsk: boolean;
2969
+ status: string;
2970
+ startTime: Date;
2971
+ expiration: Date;
2972
+ executions: number;
2973
+ maxExecutions: number;
2974
+ cancelsOffChain: boolean;
2975
+ marketPlace: string;
2976
+ marketPlaceAddress: Address;
2977
+ } | {
2978
+ __typename: "TraitOrder";
2979
+ collectionId: number;
2980
+ id: string;
2981
+ price: bigint;
2982
+ steppedPrice?: bigint | null;
2983
+ currencyAddress: Address;
2984
+ maker: Address;
2985
+ isAsk: boolean;
2986
+ status: string;
2987
+ startTime: Date;
2988
+ expiration: Date;
2989
+ executions: number;
2990
+ maxExecutions: number;
2991
+ cancelsOffChain: boolean;
2992
+ marketPlace: string;
2993
+ marketPlaceAddress: Address;
2994
+ } | null;
2995
+ royalties: {
2996
+ __typename?: "Royalty";
2997
+ beneficiary: Address;
2998
+ percentage: number;
2999
+ required: boolean;
3000
+ }[];
3001
+ }>;
2426
3002
  collectionStepsById(props: {
2427
3003
  collectionId: number;
2428
3004
  }): Promise<{
@@ -2551,6 +3127,12 @@ export declare class Gondi {
2551
3127
  durationFromRenegotiationOrStart: bigint;
2552
3128
  };
2553
3129
  }): Promise<boolean>;
3130
+ /**
3131
+ * The MultiSourceLoan address `makeSingleNftOffer`, `makeCollectionOffer` and
3132
+ * `makeTraitOffer` sign for on the wallet's chain: the `to` a lender approves
3133
+ * the principal for before publishing those offers.
3134
+ */
3135
+ offerContractAddress(): `0x${string}`;
2554
3136
  private getDefaults;
2555
3137
  refinanceFullLoan({ offer, loan, loanId, }: {
2556
3138
  offer: model.RenegotiationOffer;
@@ -3538,15 +4120,17 @@ export declare class Gondi {
3538
4120
  nftAddress: Address;
3539
4121
  tokenId: bigint;
3540
4122
  }): Promise<bigint>;
3541
- isApprovedNFTForAll({ nftAddress, standard, to: externalTo, }: {
4123
+ /** Whether the wallet has approved `to` as operator for every NFT of `nftAddress`. */
4124
+ isApprovedNFTForAll({ nftAddress, standard, to, }: {
3542
4125
  nftAddress: Address;
3543
4126
  standard: Parameters<Contracts['Nft']>[1];
3544
- to?: Address;
4127
+ to: Address;
3545
4128
  }): Promise<boolean>;
3546
- approveNFTForAll({ nftAddress, standard, to: externalTo, }: {
4129
+ /** Approves `to`, the contract that will pull the NFT, as operator for all of `nftAddress`. */
4130
+ approveNFTForAll({ nftAddress, standard, to, }: {
3547
4131
  nftAddress: Address;
3548
4132
  standard: Parameters<Contracts['Nft']>[1];
3549
- to?: Address;
4133
+ to: Address;
3550
4134
  }): Promise<{
3551
4135
  txHash: `0x${string}`;
3552
4136
  waitTxInBlock: () => Promise<{
@@ -3628,15 +4212,17 @@ export declare class Gondi {
3628
4212
  id: bigint;
3629
4213
  } & TransactionReceipt>;
3630
4214
  }>;
3631
- isApprovedToken({ tokenAddress, amount, to: externalTo, }: {
4215
+ /** Whether the wallet's allowance of `tokenAddress` to `to` covers `amount`. */
4216
+ isApprovedToken({ tokenAddress, amount, to, }: {
3632
4217
  tokenAddress: Address;
3633
4218
  amount: bigint;
3634
- to?: Address;
4219
+ to: Address;
3635
4220
  }): Promise<boolean>;
3636
- approveToken({ tokenAddress, amount, to: externalTo, }: {
4221
+ /** Approves `to`, the contract that will pull it, to spend `amount` (default unlimited). */
4222
+ approveToken({ tokenAddress, amount, to, }: {
3637
4223
  tokenAddress: Address;
3638
4224
  amount?: bigint;
3639
- to?: Address;
4225
+ to: Address;
3640
4226
  }): Promise<{
3641
4227
  txHash: `0x${string}`;
3642
4228
  waitTxInBlock: () => Promise<{
@@ -3663,9 +4249,10 @@ export declare class Gondi {
3663
4249
  amount: bigint;
3664
4250
  }>;
3665
4251
  }>;
3666
- currencyAllowance({ tokenAddress, to: externalTo, }: {
4252
+ /** The wallet's allowance of `tokenAddress` to `to`. */
4253
+ currencyAllowance({ tokenAddress, to }: {
3667
4254
  tokenAddress: Address;
3668
- to?: Address;
4255
+ to: Address;
3669
4256
  }): Promise<bigint>;
3670
4257
  currencyBalance({ tokenAddress }: {
3671
4258
  tokenAddress: Address;