@oddmaki-protocol/sdk 0.6.0 → 1.0.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 +28 -23
- package/dist/index.d.ts +28 -23
- package/dist/index.js +9 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +10 -4
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -9581,43 +9581,49 @@ declare const CONTRACT_ADDRESSES: {
|
|
|
9581
9581
|
readonly usdc: Address;
|
|
9582
9582
|
readonly subgraph: "https://api.studio.thegraph.com/query/1716020/oddmaki/version/latest";
|
|
9583
9583
|
};
|
|
9584
|
+
readonly 8453: {
|
|
9585
|
+
readonly diamond: Address;
|
|
9586
|
+
readonly conditionalTokens: Address;
|
|
9587
|
+
readonly usdc: Address;
|
|
9588
|
+
readonly subgraph: "https://api.studio.thegraph.com/query/1716020/oddmaki-base/version/latest";
|
|
9589
|
+
};
|
|
9584
9590
|
};
|
|
9585
9591
|
declare const DEFAULT_CHAIN: {
|
|
9586
9592
|
blockExplorers: {
|
|
9587
9593
|
readonly default: {
|
|
9588
9594
|
readonly name: "Basescan";
|
|
9589
|
-
readonly url: "https://
|
|
9590
|
-
readonly apiUrl: "https://api
|
|
9595
|
+
readonly url: "https://basescan.org";
|
|
9596
|
+
readonly apiUrl: "https://api.basescan.org/api";
|
|
9591
9597
|
};
|
|
9592
9598
|
};
|
|
9593
9599
|
blockTime: 2000;
|
|
9594
9600
|
contracts: {
|
|
9595
9601
|
readonly disputeGameFactory: {
|
|
9596
|
-
readonly
|
|
9597
|
-
readonly address: "
|
|
9602
|
+
readonly 1: {
|
|
9603
|
+
readonly address: "0x43edB88C4B80fDD2AdFF2412A7BebF9dF42cB40e";
|
|
9598
9604
|
};
|
|
9599
9605
|
};
|
|
9600
9606
|
readonly l2OutputOracle: {
|
|
9601
|
-
readonly
|
|
9602
|
-
readonly address: "
|
|
9607
|
+
readonly 1: {
|
|
9608
|
+
readonly address: "0x56315b90c40730925ec5485cf004d835058518A0";
|
|
9603
9609
|
};
|
|
9604
9610
|
};
|
|
9611
|
+
readonly multicall3: {
|
|
9612
|
+
readonly address: "0xca11bde05977b3631167028862be2a173976ca11";
|
|
9613
|
+
readonly blockCreated: 5022;
|
|
9614
|
+
};
|
|
9605
9615
|
readonly portal: {
|
|
9606
|
-
readonly
|
|
9607
|
-
readonly address: "
|
|
9608
|
-
readonly blockCreated:
|
|
9616
|
+
readonly 1: {
|
|
9617
|
+
readonly address: "0x49048044D57e1C92A77f79988d21Fa8fAF74E97e";
|
|
9618
|
+
readonly blockCreated: 17482143;
|
|
9609
9619
|
};
|
|
9610
9620
|
};
|
|
9611
9621
|
readonly l1StandardBridge: {
|
|
9612
|
-
readonly
|
|
9613
|
-
readonly address: "
|
|
9614
|
-
readonly blockCreated:
|
|
9622
|
+
readonly 1: {
|
|
9623
|
+
readonly address: "0x3154Cf16ccdb4C6d922629664174b904d80F2C35";
|
|
9624
|
+
readonly blockCreated: 17482143;
|
|
9615
9625
|
};
|
|
9616
9626
|
};
|
|
9617
|
-
readonly multicall3: {
|
|
9618
|
-
readonly address: "0xca11bde05977b3631167028862be2a173976ca11";
|
|
9619
|
-
readonly blockCreated: 1059647;
|
|
9620
|
-
};
|
|
9621
9627
|
readonly gasPriceOracle: {
|
|
9622
9628
|
readonly address: "0x420000000000000000000000000000000000000F";
|
|
9623
9629
|
};
|
|
@@ -9638,21 +9644,21 @@ declare const DEFAULT_CHAIN: {
|
|
|
9638
9644
|
};
|
|
9639
9645
|
};
|
|
9640
9646
|
ensTlds?: readonly string[] | undefined;
|
|
9641
|
-
id:
|
|
9642
|
-
name: "Base
|
|
9647
|
+
id: 8453;
|
|
9648
|
+
name: "Base";
|
|
9643
9649
|
nativeCurrency: {
|
|
9644
|
-
readonly name: "
|
|
9650
|
+
readonly name: "Ether";
|
|
9645
9651
|
readonly symbol: "ETH";
|
|
9646
9652
|
readonly decimals: 18;
|
|
9647
9653
|
};
|
|
9648
9654
|
experimental_preconfirmationTime?: number | undefined | undefined;
|
|
9649
9655
|
rpcUrls: {
|
|
9650
9656
|
readonly default: {
|
|
9651
|
-
readonly http: readonly ["https://
|
|
9657
|
+
readonly http: readonly ["https://mainnet.base.org"];
|
|
9652
9658
|
};
|
|
9653
9659
|
};
|
|
9654
|
-
sourceId:
|
|
9655
|
-
testnet
|
|
9660
|
+
sourceId: 1;
|
|
9661
|
+
testnet?: boolean | undefined | undefined;
|
|
9656
9662
|
custom?: Record<string, unknown> | undefined;
|
|
9657
9663
|
fees?: viem.ChainFees<undefined> | undefined;
|
|
9658
9664
|
formatters: {
|
|
@@ -9889,7 +9895,6 @@ declare const DEFAULT_CHAIN: {
|
|
|
9889
9895
|
serializers: {
|
|
9890
9896
|
readonly transaction: typeof viem_chains.serializeTransactionOpStack;
|
|
9891
9897
|
};
|
|
9892
|
-
readonly network: "base-sepolia";
|
|
9893
9898
|
};
|
|
9894
9899
|
|
|
9895
9900
|
/**
|
package/dist/index.d.ts
CHANGED
|
@@ -9581,43 +9581,49 @@ declare const CONTRACT_ADDRESSES: {
|
|
|
9581
9581
|
readonly usdc: Address;
|
|
9582
9582
|
readonly subgraph: "https://api.studio.thegraph.com/query/1716020/oddmaki/version/latest";
|
|
9583
9583
|
};
|
|
9584
|
+
readonly 8453: {
|
|
9585
|
+
readonly diamond: Address;
|
|
9586
|
+
readonly conditionalTokens: Address;
|
|
9587
|
+
readonly usdc: Address;
|
|
9588
|
+
readonly subgraph: "https://api.studio.thegraph.com/query/1716020/oddmaki-base/version/latest";
|
|
9589
|
+
};
|
|
9584
9590
|
};
|
|
9585
9591
|
declare const DEFAULT_CHAIN: {
|
|
9586
9592
|
blockExplorers: {
|
|
9587
9593
|
readonly default: {
|
|
9588
9594
|
readonly name: "Basescan";
|
|
9589
|
-
readonly url: "https://
|
|
9590
|
-
readonly apiUrl: "https://api
|
|
9595
|
+
readonly url: "https://basescan.org";
|
|
9596
|
+
readonly apiUrl: "https://api.basescan.org/api";
|
|
9591
9597
|
};
|
|
9592
9598
|
};
|
|
9593
9599
|
blockTime: 2000;
|
|
9594
9600
|
contracts: {
|
|
9595
9601
|
readonly disputeGameFactory: {
|
|
9596
|
-
readonly
|
|
9597
|
-
readonly address: "
|
|
9602
|
+
readonly 1: {
|
|
9603
|
+
readonly address: "0x43edB88C4B80fDD2AdFF2412A7BebF9dF42cB40e";
|
|
9598
9604
|
};
|
|
9599
9605
|
};
|
|
9600
9606
|
readonly l2OutputOracle: {
|
|
9601
|
-
readonly
|
|
9602
|
-
readonly address: "
|
|
9607
|
+
readonly 1: {
|
|
9608
|
+
readonly address: "0x56315b90c40730925ec5485cf004d835058518A0";
|
|
9603
9609
|
};
|
|
9604
9610
|
};
|
|
9611
|
+
readonly multicall3: {
|
|
9612
|
+
readonly address: "0xca11bde05977b3631167028862be2a173976ca11";
|
|
9613
|
+
readonly blockCreated: 5022;
|
|
9614
|
+
};
|
|
9605
9615
|
readonly portal: {
|
|
9606
|
-
readonly
|
|
9607
|
-
readonly address: "
|
|
9608
|
-
readonly blockCreated:
|
|
9616
|
+
readonly 1: {
|
|
9617
|
+
readonly address: "0x49048044D57e1C92A77f79988d21Fa8fAF74E97e";
|
|
9618
|
+
readonly blockCreated: 17482143;
|
|
9609
9619
|
};
|
|
9610
9620
|
};
|
|
9611
9621
|
readonly l1StandardBridge: {
|
|
9612
|
-
readonly
|
|
9613
|
-
readonly address: "
|
|
9614
|
-
readonly blockCreated:
|
|
9622
|
+
readonly 1: {
|
|
9623
|
+
readonly address: "0x3154Cf16ccdb4C6d922629664174b904d80F2C35";
|
|
9624
|
+
readonly blockCreated: 17482143;
|
|
9615
9625
|
};
|
|
9616
9626
|
};
|
|
9617
|
-
readonly multicall3: {
|
|
9618
|
-
readonly address: "0xca11bde05977b3631167028862be2a173976ca11";
|
|
9619
|
-
readonly blockCreated: 1059647;
|
|
9620
|
-
};
|
|
9621
9627
|
readonly gasPriceOracle: {
|
|
9622
9628
|
readonly address: "0x420000000000000000000000000000000000000F";
|
|
9623
9629
|
};
|
|
@@ -9638,21 +9644,21 @@ declare const DEFAULT_CHAIN: {
|
|
|
9638
9644
|
};
|
|
9639
9645
|
};
|
|
9640
9646
|
ensTlds?: readonly string[] | undefined;
|
|
9641
|
-
id:
|
|
9642
|
-
name: "Base
|
|
9647
|
+
id: 8453;
|
|
9648
|
+
name: "Base";
|
|
9643
9649
|
nativeCurrency: {
|
|
9644
|
-
readonly name: "
|
|
9650
|
+
readonly name: "Ether";
|
|
9645
9651
|
readonly symbol: "ETH";
|
|
9646
9652
|
readonly decimals: 18;
|
|
9647
9653
|
};
|
|
9648
9654
|
experimental_preconfirmationTime?: number | undefined | undefined;
|
|
9649
9655
|
rpcUrls: {
|
|
9650
9656
|
readonly default: {
|
|
9651
|
-
readonly http: readonly ["https://
|
|
9657
|
+
readonly http: readonly ["https://mainnet.base.org"];
|
|
9652
9658
|
};
|
|
9653
9659
|
};
|
|
9654
|
-
sourceId:
|
|
9655
|
-
testnet
|
|
9660
|
+
sourceId: 1;
|
|
9661
|
+
testnet?: boolean | undefined | undefined;
|
|
9656
9662
|
custom?: Record<string, unknown> | undefined;
|
|
9657
9663
|
fees?: viem.ChainFees<undefined> | undefined;
|
|
9658
9664
|
formatters: {
|
|
@@ -9889,7 +9895,6 @@ declare const DEFAULT_CHAIN: {
|
|
|
9889
9895
|
serializers: {
|
|
9890
9896
|
readonly transaction: typeof viem_chains.serializeTransactionOpStack;
|
|
9891
9897
|
};
|
|
9892
|
-
readonly network: "base-sepolia";
|
|
9893
9898
|
};
|
|
9894
9899
|
|
|
9895
9900
|
/**
|
package/dist/index.js
CHANGED
|
@@ -11,9 +11,15 @@ var CONTRACT_ADDRESSES = {
|
|
|
11
11
|
conditionalTokens: "0x7364747372Ac4a175B5326f5B2C9CB1C271d32e8",
|
|
12
12
|
usdc: "0x1d3caa0156e8e573814b78766ba7958d7e11488b",
|
|
13
13
|
subgraph: "https://api.studio.thegraph.com/query/1716020/oddmaki/version/latest"
|
|
14
|
+
},
|
|
15
|
+
[chains.base.id]: {
|
|
16
|
+
diamond: "0x025d086a62d93e24f3cb3f161612ca8e9530127d",
|
|
17
|
+
conditionalTokens: "0x3e2ae408ca03f27849edff32d107c7b8ea5c87b4",
|
|
18
|
+
usdc: "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
|
|
19
|
+
subgraph: "https://api.studio.thegraph.com/query/1716020/oddmaki-base/version/latest"
|
|
14
20
|
}
|
|
15
21
|
};
|
|
16
|
-
var DEFAULT_CHAIN = chains.
|
|
22
|
+
var DEFAULT_CHAIN = chains.base;
|
|
17
23
|
var SubgraphClient = class {
|
|
18
24
|
constructor(endpoint) {
|
|
19
25
|
this.client = new graphqlRequest.GraphQLClient(endpoint);
|
|
@@ -11296,8 +11302,8 @@ function resolveIPFSUri(uri, gateway) {
|
|
|
11296
11302
|
if (!uri) return "";
|
|
11297
11303
|
const gw = gateway || DEFAULT_IPFS_GATEWAY;
|
|
11298
11304
|
if (uri.startsWith("ipfs://")) {
|
|
11299
|
-
const
|
|
11300
|
-
const gateway2 =
|
|
11305
|
+
const base2 = gw.endsWith("/") ? gw : `${gw}/`;
|
|
11306
|
+
const gateway2 = base2.includes("/ipfs/") ? base2 : `${base2}ipfs/`;
|
|
11301
11307
|
return `${gateway2}${uri.slice(7)}`;
|
|
11302
11308
|
}
|
|
11303
11309
|
return uri;
|