@oddmaki-protocol/sdk 1.1.0 → 1.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/dist/index.d.mts +7 -1
- package/dist/index.d.ts +7 -1
- package/dist/index.js +16 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +16 -4
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -8962,14 +8962,19 @@ declare class PublicModule extends BaseModule {
|
|
|
8962
8962
|
*/
|
|
8963
8963
|
getMarkets(params: {
|
|
8964
8964
|
venueId?: bigint;
|
|
8965
|
+
search?: string;
|
|
8965
8966
|
first?: number;
|
|
8966
8967
|
skip?: number;
|
|
8967
8968
|
}): Promise<unknown>;
|
|
8968
8969
|
/**
|
|
8969
8970
|
* Get markets with pricing data (last trade prices + statistics)
|
|
8971
|
+
*
|
|
8972
|
+
* @param params.search Optional case-insensitive substring match against the
|
|
8973
|
+
* market `question` field. Empty string matches all markets.
|
|
8970
8974
|
*/
|
|
8971
8975
|
getMarketsWithPricing(params: {
|
|
8972
8976
|
venueId?: bigint;
|
|
8977
|
+
search?: string;
|
|
8973
8978
|
first?: number;
|
|
8974
8979
|
skip?: number;
|
|
8975
8980
|
}): Promise<unknown>;
|
|
@@ -9590,7 +9595,8 @@ declare const CONTRACT_ADDRESSES: {
|
|
|
9590
9595
|
};
|
|
9591
9596
|
};
|
|
9592
9597
|
declare const SUBGRAPH_IDS: {
|
|
9593
|
-
readonly 8453: "
|
|
9598
|
+
readonly 8453: "CxoYVjELrNCMLopAmVshnfVAie7yH6QZyCSKD3r41XSQ";
|
|
9599
|
+
readonly 84532: "DCnd3ozSyvYxRg7kmZYiDWGBiJCe6QHwu8M93jMN1Q3b";
|
|
9594
9600
|
};
|
|
9595
9601
|
declare function buildSubgraphGatewayUrl(chainId: number, apiKey: string): string | undefined;
|
|
9596
9602
|
declare const DEFAULT_CHAIN: {
|
package/dist/index.d.ts
CHANGED
|
@@ -8962,14 +8962,19 @@ declare class PublicModule extends BaseModule {
|
|
|
8962
8962
|
*/
|
|
8963
8963
|
getMarkets(params: {
|
|
8964
8964
|
venueId?: bigint;
|
|
8965
|
+
search?: string;
|
|
8965
8966
|
first?: number;
|
|
8966
8967
|
skip?: number;
|
|
8967
8968
|
}): Promise<unknown>;
|
|
8968
8969
|
/**
|
|
8969
8970
|
* Get markets with pricing data (last trade prices + statistics)
|
|
8971
|
+
*
|
|
8972
|
+
* @param params.search Optional case-insensitive substring match against the
|
|
8973
|
+
* market `question` field. Empty string matches all markets.
|
|
8970
8974
|
*/
|
|
8971
8975
|
getMarketsWithPricing(params: {
|
|
8972
8976
|
venueId?: bigint;
|
|
8977
|
+
search?: string;
|
|
8973
8978
|
first?: number;
|
|
8974
8979
|
skip?: number;
|
|
8975
8980
|
}): Promise<unknown>;
|
|
@@ -9590,7 +9595,8 @@ declare const CONTRACT_ADDRESSES: {
|
|
|
9590
9595
|
};
|
|
9591
9596
|
};
|
|
9592
9597
|
declare const SUBGRAPH_IDS: {
|
|
9593
|
-
readonly 8453: "
|
|
9598
|
+
readonly 8453: "CxoYVjELrNCMLopAmVshnfVAie7yH6QZyCSKD3r41XSQ";
|
|
9599
|
+
readonly 84532: "DCnd3ozSyvYxRg7kmZYiDWGBiJCe6QHwu8M93jMN1Q3b";
|
|
9594
9600
|
};
|
|
9595
9601
|
declare function buildSubgraphGatewayUrl(chainId: number, apiKey: string): string | undefined;
|
|
9596
9602
|
declare const DEFAULT_CHAIN: {
|
package/dist/index.js
CHANGED
|
@@ -20,7 +20,8 @@ var CONTRACT_ADDRESSES = {
|
|
|
20
20
|
}
|
|
21
21
|
};
|
|
22
22
|
var SUBGRAPH_IDS = {
|
|
23
|
-
[chains.base.id]: "
|
|
23
|
+
[chains.base.id]: "CxoYVjELrNCMLopAmVshnfVAie7yH6QZyCSKD3r41XSQ",
|
|
24
|
+
[chains.baseSepolia.id]: "DCnd3ozSyvYxRg7kmZYiDWGBiJCe6QHwu8M93jMN1Q3b"
|
|
24
25
|
};
|
|
25
26
|
function buildSubgraphGatewayUrl(chainId, apiKey) {
|
|
26
27
|
const id = SUBGRAPH_IDS[chainId];
|
|
@@ -8768,9 +8769,14 @@ var GET_VENUES = graphqlRequest.gql`
|
|
|
8768
8769
|
}
|
|
8769
8770
|
`;
|
|
8770
8771
|
var GET_MARKETS = graphqlRequest.gql`
|
|
8771
|
-
query GetMarkets(
|
|
8772
|
+
query GetMarkets(
|
|
8773
|
+
$venueId: BigInt
|
|
8774
|
+
$search: String = ""
|
|
8775
|
+
$first: Int = 100
|
|
8776
|
+
$skip: Int = 0
|
|
8777
|
+
) {
|
|
8772
8778
|
markets(
|
|
8773
|
-
where: { venue_: { venueId: $venueId } }
|
|
8779
|
+
where: { venue_: { venueId: $venueId }, question_contains_nocase: $search }
|
|
8774
8780
|
first: $first
|
|
8775
8781
|
skip: $skip
|
|
8776
8782
|
orderBy: createdAt
|
|
@@ -8802,11 +8808,12 @@ var GET_MARKETS = graphqlRequest.gql`
|
|
|
8802
8808
|
var GET_MARKETS_WITH_PRICING = graphqlRequest.gql`
|
|
8803
8809
|
query GetMarketsWithPricing(
|
|
8804
8810
|
$venueId: BigInt
|
|
8811
|
+
$search: String = ""
|
|
8805
8812
|
$first: Int = 100
|
|
8806
8813
|
$skip: Int = 0
|
|
8807
8814
|
) {
|
|
8808
8815
|
markets(
|
|
8809
|
-
where: { venue_: { venueId: $venueId } }
|
|
8816
|
+
where: { venue_: { venueId: $venueId }, question_contains_nocase: $search }
|
|
8810
8817
|
first: $first
|
|
8811
8818
|
skip: $skip
|
|
8812
8819
|
orderBy: createdAt
|
|
@@ -9872,16 +9879,21 @@ var PublicModule = class extends BaseModule {
|
|
|
9872
9879
|
async getMarkets(params) {
|
|
9873
9880
|
return this.subgraph.request(GET_MARKETS, {
|
|
9874
9881
|
venueId: params.venueId?.toString(),
|
|
9882
|
+
search: params.search ?? "",
|
|
9875
9883
|
first: params.first || 100,
|
|
9876
9884
|
skip: params.skip || 0
|
|
9877
9885
|
});
|
|
9878
9886
|
}
|
|
9879
9887
|
/**
|
|
9880
9888
|
* Get markets with pricing data (last trade prices + statistics)
|
|
9889
|
+
*
|
|
9890
|
+
* @param params.search Optional case-insensitive substring match against the
|
|
9891
|
+
* market `question` field. Empty string matches all markets.
|
|
9881
9892
|
*/
|
|
9882
9893
|
async getMarketsWithPricing(params) {
|
|
9883
9894
|
return this.subgraph.request(GET_MARKETS_WITH_PRICING, {
|
|
9884
9895
|
venueId: params.venueId?.toString(),
|
|
9896
|
+
search: params.search ?? "",
|
|
9885
9897
|
first: params.first || 100,
|
|
9886
9898
|
skip: params.skip || 0
|
|
9887
9899
|
});
|