@uniswap/client-liquidity 1.4.1 → 1.4.2
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/dist/uniswap/liquidity/v2/api-LiquidityService_connectquery.d.ts +85 -1
- package/dist/uniswap/liquidity/v2/api-LiquidityService_connectquery.js +85 -1
- package/dist/uniswap/liquidity/v2/api_connect.d.ts +61 -1
- package/dist/uniswap/liquidity/v2/api_connect.js +61 -1
- package/dist/uniswap/liquidity/v2/api_pb.d.ts +306 -1
- package/dist/uniswap/liquidity/v2/api_pb.js +408 -1
- package/dist/uniswap/liquidity/v2/types_pb.d.ts +356 -0
- package/dist/uniswap/liquidity/v2/types_pb.js +435 -1
- package/package.json +1 -1
|
@@ -43,6 +43,30 @@ export declare enum GasUrgency {
|
|
|
43
43
|
*/
|
|
44
44
|
URGENT = 3
|
|
45
45
|
}
|
|
46
|
+
/**
|
|
47
|
+
* Pool protocol for read endpoints. Unlike v1.Protocols (V2=0), this follows
|
|
48
|
+
* the UNSPECIFIED-at-0 standard so an unset value can't silently mean V2.
|
|
49
|
+
*
|
|
50
|
+
* @generated from enum uniswap.liquidity.v2.PoolProtocol
|
|
51
|
+
*/
|
|
52
|
+
export declare enum PoolProtocol {
|
|
53
|
+
/**
|
|
54
|
+
* @generated from enum value: POOL_PROTOCOL_UNSPECIFIED = 0;
|
|
55
|
+
*/
|
|
56
|
+
UNSPECIFIED = 0,
|
|
57
|
+
/**
|
|
58
|
+
* @generated from enum value: POOL_PROTOCOL_V2 = 1;
|
|
59
|
+
*/
|
|
60
|
+
V2 = 1,
|
|
61
|
+
/**
|
|
62
|
+
* @generated from enum value: POOL_PROTOCOL_V3 = 2;
|
|
63
|
+
*/
|
|
64
|
+
V3 = 2,
|
|
65
|
+
/**
|
|
66
|
+
* @generated from enum value: POOL_PROTOCOL_V4 = 3;
|
|
67
|
+
*/
|
|
68
|
+
V4 = 3
|
|
69
|
+
}
|
|
46
70
|
/**
|
|
47
71
|
* @generated from enum uniswap.liquidity.v2.PoolSortBy
|
|
48
72
|
*/
|
|
@@ -60,6 +84,67 @@ export declare enum PoolSortBy {
|
|
|
60
84
|
*/
|
|
61
85
|
APR = 2
|
|
62
86
|
}
|
|
87
|
+
/**
|
|
88
|
+
* Chart time window. Mirrors data.v2's HistoryDuration (shared data.v2 protos
|
|
89
|
+
* are not importable from this package; duplication is the accepted approach
|
|
90
|
+
* until cross-service proto reuse lands post-stage-4).
|
|
91
|
+
*
|
|
92
|
+
* @generated from enum uniswap.liquidity.v2.HistoryDuration
|
|
93
|
+
*/
|
|
94
|
+
export declare enum HistoryDuration {
|
|
95
|
+
/**
|
|
96
|
+
* server defaults to DAY
|
|
97
|
+
*
|
|
98
|
+
* @generated from enum value: HISTORY_DURATION_UNSPECIFIED = 0;
|
|
99
|
+
*/
|
|
100
|
+
UNSPECIFIED = 0,
|
|
101
|
+
/**
|
|
102
|
+
* @generated from enum value: HISTORY_DURATION_HOUR = 1;
|
|
103
|
+
*/
|
|
104
|
+
HOUR = 1,
|
|
105
|
+
/**
|
|
106
|
+
* @generated from enum value: HISTORY_DURATION_DAY = 2;
|
|
107
|
+
*/
|
|
108
|
+
DAY = 2,
|
|
109
|
+
/**
|
|
110
|
+
* @generated from enum value: HISTORY_DURATION_WEEK = 3;
|
|
111
|
+
*/
|
|
112
|
+
WEEK = 3,
|
|
113
|
+
/**
|
|
114
|
+
* @generated from enum value: HISTORY_DURATION_MONTH = 4;
|
|
115
|
+
*/
|
|
116
|
+
MONTH = 4,
|
|
117
|
+
/**
|
|
118
|
+
* @generated from enum value: HISTORY_DURATION_YEAR = 5;
|
|
119
|
+
*/
|
|
120
|
+
YEAR = 5,
|
|
121
|
+
/**
|
|
122
|
+
* @generated from enum value: HISTORY_DURATION_MAX = 6;
|
|
123
|
+
*/
|
|
124
|
+
MAX = 6
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* Open/closed state of an LP position. CLOSED = fully withdrawn (V3/V4
|
|
128
|
+
* liquidity or the V2 LP-token balance is zero) — the indexer keeps such rows
|
|
129
|
+
* as tombstones. In/out-of-range needs the pool's current tick and is left to
|
|
130
|
+
* read-time derivation.
|
|
131
|
+
*
|
|
132
|
+
* @generated from enum uniswap.liquidity.v2.PositionStatus
|
|
133
|
+
*/
|
|
134
|
+
export declare enum PositionStatus {
|
|
135
|
+
/**
|
|
136
|
+
* @generated from enum value: POSITION_STATUS_UNSPECIFIED = 0;
|
|
137
|
+
*/
|
|
138
|
+
UNSPECIFIED = 0,
|
|
139
|
+
/**
|
|
140
|
+
* @generated from enum value: POSITION_STATUS_OPEN = 1;
|
|
141
|
+
*/
|
|
142
|
+
OPEN = 1,
|
|
143
|
+
/**
|
|
144
|
+
* @generated from enum value: POSITION_STATUS_CLOSED = 2;
|
|
145
|
+
*/
|
|
146
|
+
CLOSED = 2
|
|
147
|
+
}
|
|
63
148
|
/**
|
|
64
149
|
* @generated from message uniswap.liquidity.v2.LPToken
|
|
65
150
|
*/
|
|
@@ -537,6 +622,22 @@ export declare class PoolSummary extends Message<PoolSummary> {
|
|
|
537
622
|
* @generated from field: optional int32 tick_spacing = 16;
|
|
538
623
|
*/
|
|
539
624
|
tickSpacing?: number;
|
|
625
|
+
/**
|
|
626
|
+
* V2 pools only: raw pair reserves and LP token total supply (uint256 as
|
|
627
|
+
* decimal strings), so clients can derive a wallet's underlying token
|
|
628
|
+
* amounts from its lp_shares. Unset for V3/V4.
|
|
629
|
+
*
|
|
630
|
+
* @generated from field: optional string reserve0 = 17;
|
|
631
|
+
*/
|
|
632
|
+
reserve0?: string;
|
|
633
|
+
/**
|
|
634
|
+
* @generated from field: optional string reserve1 = 18;
|
|
635
|
+
*/
|
|
636
|
+
reserve1?: string;
|
|
637
|
+
/**
|
|
638
|
+
* @generated from field: optional string total_supply = 19;
|
|
639
|
+
*/
|
|
640
|
+
totalSupply?: string;
|
|
540
641
|
constructor(data?: PartialMessage<PoolSummary>);
|
|
541
642
|
static readonly runtime: typeof proto3;
|
|
542
643
|
static readonly typeName = "uniswap.liquidity.v2.PoolSummary";
|
|
@@ -571,3 +672,258 @@ export declare class PoolListCursor extends Message<PoolListCursor> {
|
|
|
571
672
|
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): PoolListCursor;
|
|
572
673
|
static equals(a: PoolListCursor | PlainMessage<PoolListCursor> | undefined, b: PoolListCursor | PlainMessage<PoolListCursor> | undefined): boolean;
|
|
573
674
|
}
|
|
675
|
+
/**
|
|
676
|
+
* Identifies one pool. address_or_id is the pair/pool address for V2/V3
|
|
677
|
+
* (0x + 40 hex chars) or the pool id for V4 (0x + 64 hex chars).
|
|
678
|
+
*
|
|
679
|
+
* @generated from message uniswap.liquidity.v2.PoolReference
|
|
680
|
+
*/
|
|
681
|
+
export declare class PoolReference extends Message<PoolReference> {
|
|
682
|
+
/**
|
|
683
|
+
* @generated from field: uniswap.liquidity.v1.ChainId chain_id = 1;
|
|
684
|
+
*/
|
|
685
|
+
chainId: ChainId;
|
|
686
|
+
/**
|
|
687
|
+
* @generated from field: string address_or_id = 2;
|
|
688
|
+
*/
|
|
689
|
+
addressOrId: string;
|
|
690
|
+
/**
|
|
691
|
+
* POOL_PROTOCOL_UNSPECIFIED rejected as invalid_argument
|
|
692
|
+
*
|
|
693
|
+
* @generated from field: uniswap.liquidity.v2.PoolProtocol version = 3;
|
|
694
|
+
*/
|
|
695
|
+
version: PoolProtocol;
|
|
696
|
+
constructor(data?: PartialMessage<PoolReference>);
|
|
697
|
+
static readonly runtime: typeof proto3;
|
|
698
|
+
static readonly typeName = "uniswap.liquidity.v2.PoolReference";
|
|
699
|
+
static readonly fields: FieldList;
|
|
700
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): PoolReference;
|
|
701
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): PoolReference;
|
|
702
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): PoolReference;
|
|
703
|
+
static equals(a: PoolReference | PlainMessage<PoolReference> | undefined, b: PoolReference | PlainMessage<PoolReference> | undefined): boolean;
|
|
704
|
+
}
|
|
705
|
+
/**
|
|
706
|
+
* One point of a pool's relative-price history, in raw pool-token
|
|
707
|
+
* denomination (token1 per token0 and its inverse), not USD.
|
|
708
|
+
* TODO(CONS-2536): whether V2/V3 WETH legs should be presented as ETH (and
|
|
709
|
+
* stats combined with V4 native pools) is pending; prices stay in raw pool
|
|
710
|
+
* token terms until that lands.
|
|
711
|
+
*
|
|
712
|
+
* @generated from message uniswap.liquidity.v2.PoolPricePoint
|
|
713
|
+
*/
|
|
714
|
+
export declare class PoolPricePoint extends Message<PoolPricePoint> {
|
|
715
|
+
/**
|
|
716
|
+
* unix seconds, bucket start (inclusive)
|
|
717
|
+
*
|
|
718
|
+
* @generated from field: int64 timestamp = 1;
|
|
719
|
+
*/
|
|
720
|
+
timestamp: bigint;
|
|
721
|
+
/**
|
|
722
|
+
* @generated from field: double price_token0_in_token1 = 2;
|
|
723
|
+
*/
|
|
724
|
+
priceToken0InToken1: number;
|
|
725
|
+
/**
|
|
726
|
+
* @generated from field: double price_token1_in_token0 = 3;
|
|
727
|
+
*/
|
|
728
|
+
priceToken1InToken0: number;
|
|
729
|
+
constructor(data?: PartialMessage<PoolPricePoint>);
|
|
730
|
+
static readonly runtime: typeof proto3;
|
|
731
|
+
static readonly typeName = "uniswap.liquidity.v2.PoolPricePoint";
|
|
732
|
+
static readonly fields: FieldList;
|
|
733
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): PoolPricePoint;
|
|
734
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): PoolPricePoint;
|
|
735
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): PoolPricePoint;
|
|
736
|
+
static equals(a: PoolPricePoint | PlainMessage<PoolPricePoint> | undefined, b: PoolPricePoint | PlainMessage<PoolPricePoint> | undefined): boolean;
|
|
737
|
+
}
|
|
738
|
+
/**
|
|
739
|
+
* One bucket of a pool's swap-volume history, USD-denominated.
|
|
740
|
+
*
|
|
741
|
+
* @generated from message uniswap.liquidity.v2.PoolVolumeBucket
|
|
742
|
+
*/
|
|
743
|
+
export declare class PoolVolumeBucket extends Message<PoolVolumeBucket> {
|
|
744
|
+
/**
|
|
745
|
+
* unix seconds, bucket start (inclusive)
|
|
746
|
+
*
|
|
747
|
+
* @generated from field: int64 timestamp = 1;
|
|
748
|
+
*/
|
|
749
|
+
timestamp: bigint;
|
|
750
|
+
/**
|
|
751
|
+
* @generated from field: double volume_usd = 2;
|
|
752
|
+
*/
|
|
753
|
+
volumeUsd: number;
|
|
754
|
+
/**
|
|
755
|
+
* @generated from field: double fee_usd = 3;
|
|
756
|
+
*/
|
|
757
|
+
feeUsd: number;
|
|
758
|
+
constructor(data?: PartialMessage<PoolVolumeBucket>);
|
|
759
|
+
static readonly runtime: typeof proto3;
|
|
760
|
+
static readonly typeName = "uniswap.liquidity.v2.PoolVolumeBucket";
|
|
761
|
+
static readonly fields: FieldList;
|
|
762
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): PoolVolumeBucket;
|
|
763
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): PoolVolumeBucket;
|
|
764
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): PoolVolumeBucket;
|
|
765
|
+
static equals(a: PoolVolumeBucket | PlainMessage<PoolVolumeBucket> | undefined, b: PoolVolumeBucket | PlainMessage<PoolVolumeBucket> | undefined): boolean;
|
|
766
|
+
}
|
|
767
|
+
/**
|
|
768
|
+
* One LP position, as indexed from chain events (raw position state).
|
|
769
|
+
* Token amounts, uncollected fees, in-range and USD valuation land with the
|
|
770
|
+
* positions pricing pipeline (data-ingestion position math) as additive
|
|
771
|
+
* optional fields.
|
|
772
|
+
* TODO(CONS-2536): position balances are returned untranslated (V2/V3 pools
|
|
773
|
+
* report WETH as its own ERC-20); whether to present WETH legs as ETH is an
|
|
774
|
+
* open LP/CE decision.
|
|
775
|
+
*
|
|
776
|
+
* @generated from message uniswap.liquidity.v2.Position
|
|
777
|
+
*/
|
|
778
|
+
export declare class Position extends Message<Position> {
|
|
779
|
+
/**
|
|
780
|
+
* @generated from field: uniswap.liquidity.v1.Protocols version = 1;
|
|
781
|
+
*/
|
|
782
|
+
version: Protocols;
|
|
783
|
+
/**
|
|
784
|
+
* @generated from field: int32 chain_id = 2;
|
|
785
|
+
*/
|
|
786
|
+
chainId: number;
|
|
787
|
+
/**
|
|
788
|
+
* @generated from field: string owner = 3;
|
|
789
|
+
*/
|
|
790
|
+
owner: string;
|
|
791
|
+
/**
|
|
792
|
+
* V3/V4 position NFT token id; unset for V2 (pair-share positions).
|
|
793
|
+
*
|
|
794
|
+
* @generated from field: optional string token_id = 4;
|
|
795
|
+
*/
|
|
796
|
+
tokenId?: string;
|
|
797
|
+
/**
|
|
798
|
+
* V2/V3: pair/pool address. V4: pool id (0x + 64 hex).
|
|
799
|
+
*
|
|
800
|
+
* @generated from field: string pool_address_or_id = 5;
|
|
801
|
+
*/
|
|
802
|
+
poolAddressOrId: string;
|
|
803
|
+
/**
|
|
804
|
+
* Fee in pips; unset for V2 (fixed 0.3%).
|
|
805
|
+
*
|
|
806
|
+
* @generated from field: optional int32 fee_tier = 6;
|
|
807
|
+
*/
|
|
808
|
+
feeTier?: number;
|
|
809
|
+
/**
|
|
810
|
+
* @generated from field: optional sint32 tick_lower = 7;
|
|
811
|
+
*/
|
|
812
|
+
tickLower?: number;
|
|
813
|
+
/**
|
|
814
|
+
* @generated from field: optional sint32 tick_upper = 8;
|
|
815
|
+
*/
|
|
816
|
+
tickUpper?: number;
|
|
817
|
+
/**
|
|
818
|
+
* V3/V4 raw position liquidity (uint128 as decimal string).
|
|
819
|
+
*
|
|
820
|
+
* @generated from field: optional string liquidity = 9;
|
|
821
|
+
*/
|
|
822
|
+
liquidity?: string;
|
|
823
|
+
/**
|
|
824
|
+
* V2 LP-token balance (raw, decimal string).
|
|
825
|
+
*
|
|
826
|
+
* @generated from field: optional string lp_shares = 10;
|
|
827
|
+
*/
|
|
828
|
+
lpShares?: string;
|
|
829
|
+
/**
|
|
830
|
+
* V4 only: the PositionManager the token id belongs to.
|
|
831
|
+
*
|
|
832
|
+
* @generated from field: optional string position_manager_address = 11;
|
|
833
|
+
*/
|
|
834
|
+
positionManagerAddress?: string;
|
|
835
|
+
/**
|
|
836
|
+
* Unix seconds of the last indexed event applied to this position.
|
|
837
|
+
*
|
|
838
|
+
* @generated from field: int64 updated_at = 12;
|
|
839
|
+
*/
|
|
840
|
+
updatedAt: bigint;
|
|
841
|
+
/**
|
|
842
|
+
* Unix seconds of the first indexed event that created this position.
|
|
843
|
+
*
|
|
844
|
+
* @generated from field: int64 created_at = 13;
|
|
845
|
+
*/
|
|
846
|
+
createdAt: bigint;
|
|
847
|
+
/**
|
|
848
|
+
* Derived from the raw balance: OPEN while liquidity / lp_shares > 0.
|
|
849
|
+
*
|
|
850
|
+
* @generated from field: uniswap.liquidity.v2.PositionStatus status = 14;
|
|
851
|
+
*/
|
|
852
|
+
status: PositionStatus;
|
|
853
|
+
constructor(data?: PartialMessage<Position>);
|
|
854
|
+
static readonly runtime: typeof proto3;
|
|
855
|
+
static readonly typeName = "uniswap.liquidity.v2.Position";
|
|
856
|
+
static readonly fields: FieldList;
|
|
857
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): Position;
|
|
858
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): Position;
|
|
859
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): Position;
|
|
860
|
+
static equals(a: Position | PlainMessage<Position> | undefined, b: Position | PlainMessage<Position> | undefined): boolean;
|
|
861
|
+
}
|
|
862
|
+
/**
|
|
863
|
+
* Keyset cursor for GetWalletPositions. position_key is the last returned
|
|
864
|
+
* position's key within (chain_id, version): V2 pair address, V3 token id,
|
|
865
|
+
* V4 "<position_manager>:<token_id>".
|
|
866
|
+
*
|
|
867
|
+
* @generated from message uniswap.liquidity.v2.PositionListCursor
|
|
868
|
+
*/
|
|
869
|
+
export declare class PositionListCursor extends Message<PositionListCursor> {
|
|
870
|
+
/**
|
|
871
|
+
* @generated from field: int32 chain_id = 1;
|
|
872
|
+
*/
|
|
873
|
+
chainId: number;
|
|
874
|
+
/**
|
|
875
|
+
* @generated from field: uniswap.liquidity.v1.Protocols version = 2;
|
|
876
|
+
*/
|
|
877
|
+
version: Protocols;
|
|
878
|
+
/**
|
|
879
|
+
* @generated from field: string position_key = 3;
|
|
880
|
+
*/
|
|
881
|
+
positionKey: string;
|
|
882
|
+
constructor(data?: PartialMessage<PositionListCursor>);
|
|
883
|
+
static readonly runtime: typeof proto3;
|
|
884
|
+
static readonly typeName = "uniswap.liquidity.v2.PositionListCursor";
|
|
885
|
+
static readonly fields: FieldList;
|
|
886
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): PositionListCursor;
|
|
887
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): PositionListCursor;
|
|
888
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): PositionListCursor;
|
|
889
|
+
static equals(a: PositionListCursor | PlainMessage<PositionListCursor> | undefined, b: PositionListCursor | PlainMessage<PositionListCursor> | undefined): boolean;
|
|
890
|
+
}
|
|
891
|
+
/**
|
|
892
|
+
* One initialized tick of a V3/V4 pool's liquidity distribution.
|
|
893
|
+
* liquidity_gross/net are raw uint128-scale values serialized as decimal
|
|
894
|
+
* strings (they overflow doubles).
|
|
895
|
+
*
|
|
896
|
+
* @generated from message uniswap.liquidity.v2.PoolTick
|
|
897
|
+
*/
|
|
898
|
+
export declare class PoolTick extends Message<PoolTick> {
|
|
899
|
+
/**
|
|
900
|
+
* @generated from field: int32 tick_idx = 1;
|
|
901
|
+
*/
|
|
902
|
+
tickIdx: number;
|
|
903
|
+
/**
|
|
904
|
+
* @generated from field: string liquidity_gross = 2;
|
|
905
|
+
*/
|
|
906
|
+
liquidityGross: string;
|
|
907
|
+
/**
|
|
908
|
+
* @generated from field: string liquidity_net = 3;
|
|
909
|
+
*/
|
|
910
|
+
liquidityNet: string;
|
|
911
|
+
/**
|
|
912
|
+
* Price of token0 in token1 at this tick (1.0001^tick_idx) and its inverse.
|
|
913
|
+
*
|
|
914
|
+
* @generated from field: double price_token0_in_token1 = 4;
|
|
915
|
+
*/
|
|
916
|
+
priceToken0InToken1: number;
|
|
917
|
+
/**
|
|
918
|
+
* @generated from field: double price_token1_in_token0 = 5;
|
|
919
|
+
*/
|
|
920
|
+
priceToken1InToken0: number;
|
|
921
|
+
constructor(data?: PartialMessage<PoolTick>);
|
|
922
|
+
static readonly runtime: typeof proto3;
|
|
923
|
+
static readonly typeName = "uniswap.liquidity.v2.PoolTick";
|
|
924
|
+
static readonly fields: FieldList;
|
|
925
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): PoolTick;
|
|
926
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): PoolTick;
|
|
927
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): PoolTick;
|
|
928
|
+
static equals(a: PoolTick | PlainMessage<PoolTick> | undefined, b: PoolTick | PlainMessage<PoolTick> | undefined): boolean;
|
|
929
|
+
}
|