@oddmaki-protocol/sdk 0.5.1 → 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/LICENSE +1 -1
- package/README.md +7 -1
- package/dist/index.d.mts +284 -24
- package/dist/index.d.ts +284 -24
- package/dist/index.js +282 -17
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +283 -19
- package/dist/index.mjs.map +1 -1
- package/package.json +6 -3
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
|
/**
|
|
@@ -16925,6 +16930,261 @@ var ERC20 = [
|
|
|
16925
16930
|
}
|
|
16926
16931
|
];
|
|
16927
16932
|
|
|
16933
|
+
var UmaOracle = [
|
|
16934
|
+
{
|
|
16935
|
+
type: "function",
|
|
16936
|
+
name: "assertTruth",
|
|
16937
|
+
inputs: [
|
|
16938
|
+
{
|
|
16939
|
+
name: "claim",
|
|
16940
|
+
type: "bytes",
|
|
16941
|
+
internalType: "bytes"
|
|
16942
|
+
},
|
|
16943
|
+
{
|
|
16944
|
+
name: "asserter",
|
|
16945
|
+
type: "address",
|
|
16946
|
+
internalType: "address"
|
|
16947
|
+
},
|
|
16948
|
+
{
|
|
16949
|
+
name: "callbackRecipient",
|
|
16950
|
+
type: "address",
|
|
16951
|
+
internalType: "address"
|
|
16952
|
+
},
|
|
16953
|
+
{
|
|
16954
|
+
name: "escalationManager",
|
|
16955
|
+
type: "address",
|
|
16956
|
+
internalType: "address"
|
|
16957
|
+
},
|
|
16958
|
+
{
|
|
16959
|
+
name: "liveness",
|
|
16960
|
+
type: "uint64",
|
|
16961
|
+
internalType: "uint64"
|
|
16962
|
+
},
|
|
16963
|
+
{
|
|
16964
|
+
name: "currency",
|
|
16965
|
+
type: "address",
|
|
16966
|
+
internalType: "contract IERC20"
|
|
16967
|
+
},
|
|
16968
|
+
{
|
|
16969
|
+
name: "bond",
|
|
16970
|
+
type: "uint256",
|
|
16971
|
+
internalType: "uint256"
|
|
16972
|
+
},
|
|
16973
|
+
{
|
|
16974
|
+
name: "identifier",
|
|
16975
|
+
type: "bytes32",
|
|
16976
|
+
internalType: "bytes32"
|
|
16977
|
+
},
|
|
16978
|
+
{
|
|
16979
|
+
name: "domainId",
|
|
16980
|
+
type: "bytes32",
|
|
16981
|
+
internalType: "bytes32"
|
|
16982
|
+
}
|
|
16983
|
+
],
|
|
16984
|
+
outputs: [
|
|
16985
|
+
{
|
|
16986
|
+
name: "",
|
|
16987
|
+
type: "bytes32",
|
|
16988
|
+
internalType: "bytes32"
|
|
16989
|
+
}
|
|
16990
|
+
],
|
|
16991
|
+
stateMutability: "nonpayable"
|
|
16992
|
+
},
|
|
16993
|
+
{
|
|
16994
|
+
type: "function",
|
|
16995
|
+
name: "defaultIdentifier",
|
|
16996
|
+
inputs: [
|
|
16997
|
+
],
|
|
16998
|
+
outputs: [
|
|
16999
|
+
{
|
|
17000
|
+
name: "",
|
|
17001
|
+
type: "bytes32",
|
|
17002
|
+
internalType: "bytes32"
|
|
17003
|
+
}
|
|
17004
|
+
],
|
|
17005
|
+
stateMutability: "view"
|
|
17006
|
+
},
|
|
17007
|
+
{
|
|
17008
|
+
type: "function",
|
|
17009
|
+
name: "getAssertion",
|
|
17010
|
+
inputs: [
|
|
17011
|
+
{
|
|
17012
|
+
name: "assertionId",
|
|
17013
|
+
type: "bytes32",
|
|
17014
|
+
internalType: "bytes32"
|
|
17015
|
+
}
|
|
17016
|
+
],
|
|
17017
|
+
outputs: [
|
|
17018
|
+
{
|
|
17019
|
+
name: "",
|
|
17020
|
+
type: "tuple",
|
|
17021
|
+
internalType: "struct OptimisticOracleV3Interface.Assertion",
|
|
17022
|
+
components: [
|
|
17023
|
+
{
|
|
17024
|
+
name: "escalationManagerSettings",
|
|
17025
|
+
type: "tuple",
|
|
17026
|
+
internalType: "struct OptimisticOracleV3Interface.EscalationManagerSettings",
|
|
17027
|
+
components: [
|
|
17028
|
+
{
|
|
17029
|
+
name: "arbitrateViaEscalationManager",
|
|
17030
|
+
type: "bool",
|
|
17031
|
+
internalType: "bool"
|
|
17032
|
+
},
|
|
17033
|
+
{
|
|
17034
|
+
name: "discardOracle",
|
|
17035
|
+
type: "bool",
|
|
17036
|
+
internalType: "bool"
|
|
17037
|
+
},
|
|
17038
|
+
{
|
|
17039
|
+
name: "validateDisputers",
|
|
17040
|
+
type: "bool",
|
|
17041
|
+
internalType: "bool"
|
|
17042
|
+
},
|
|
17043
|
+
{
|
|
17044
|
+
name: "assertingCaller",
|
|
17045
|
+
type: "address",
|
|
17046
|
+
internalType: "address"
|
|
17047
|
+
},
|
|
17048
|
+
{
|
|
17049
|
+
name: "escalationManager",
|
|
17050
|
+
type: "address",
|
|
17051
|
+
internalType: "address"
|
|
17052
|
+
}
|
|
17053
|
+
]
|
|
17054
|
+
},
|
|
17055
|
+
{
|
|
17056
|
+
name: "asserter",
|
|
17057
|
+
type: "address",
|
|
17058
|
+
internalType: "address"
|
|
17059
|
+
},
|
|
17060
|
+
{
|
|
17061
|
+
name: "assertionTime",
|
|
17062
|
+
type: "uint64",
|
|
17063
|
+
internalType: "uint64"
|
|
17064
|
+
},
|
|
17065
|
+
{
|
|
17066
|
+
name: "settled",
|
|
17067
|
+
type: "bool",
|
|
17068
|
+
internalType: "bool"
|
|
17069
|
+
},
|
|
17070
|
+
{
|
|
17071
|
+
name: "currency",
|
|
17072
|
+
type: "address",
|
|
17073
|
+
internalType: "contract IERC20"
|
|
17074
|
+
},
|
|
17075
|
+
{
|
|
17076
|
+
name: "expirationTime",
|
|
17077
|
+
type: "uint64",
|
|
17078
|
+
internalType: "uint64"
|
|
17079
|
+
},
|
|
17080
|
+
{
|
|
17081
|
+
name: "settlementResolution",
|
|
17082
|
+
type: "bool",
|
|
17083
|
+
internalType: "bool"
|
|
17084
|
+
},
|
|
17085
|
+
{
|
|
17086
|
+
name: "domainId",
|
|
17087
|
+
type: "bytes32",
|
|
17088
|
+
internalType: "bytes32"
|
|
17089
|
+
},
|
|
17090
|
+
{
|
|
17091
|
+
name: "identifier",
|
|
17092
|
+
type: "bytes32",
|
|
17093
|
+
internalType: "bytes32"
|
|
17094
|
+
},
|
|
17095
|
+
{
|
|
17096
|
+
name: "bond",
|
|
17097
|
+
type: "uint256",
|
|
17098
|
+
internalType: "uint256"
|
|
17099
|
+
},
|
|
17100
|
+
{
|
|
17101
|
+
name: "callbackRecipient",
|
|
17102
|
+
type: "address",
|
|
17103
|
+
internalType: "address"
|
|
17104
|
+
},
|
|
17105
|
+
{
|
|
17106
|
+
name: "disputer",
|
|
17107
|
+
type: "address",
|
|
17108
|
+
internalType: "address"
|
|
17109
|
+
}
|
|
17110
|
+
]
|
|
17111
|
+
}
|
|
17112
|
+
],
|
|
17113
|
+
stateMutability: "view"
|
|
17114
|
+
},
|
|
17115
|
+
{
|
|
17116
|
+
type: "function",
|
|
17117
|
+
name: "getAssertionResult",
|
|
17118
|
+
inputs: [
|
|
17119
|
+
{
|
|
17120
|
+
name: "assertionId",
|
|
17121
|
+
type: "bytes32",
|
|
17122
|
+
internalType: "bytes32"
|
|
17123
|
+
}
|
|
17124
|
+
],
|
|
17125
|
+
outputs: [
|
|
17126
|
+
{
|
|
17127
|
+
name: "",
|
|
17128
|
+
type: "bool",
|
|
17129
|
+
internalType: "bool"
|
|
17130
|
+
}
|
|
17131
|
+
],
|
|
17132
|
+
stateMutability: "view"
|
|
17133
|
+
},
|
|
17134
|
+
{
|
|
17135
|
+
type: "function",
|
|
17136
|
+
name: "getMinimumBond",
|
|
17137
|
+
inputs: [
|
|
17138
|
+
{
|
|
17139
|
+
name: "currency",
|
|
17140
|
+
type: "address",
|
|
17141
|
+
internalType: "address"
|
|
17142
|
+
}
|
|
17143
|
+
],
|
|
17144
|
+
outputs: [
|
|
17145
|
+
{
|
|
17146
|
+
name: "",
|
|
17147
|
+
type: "uint256",
|
|
17148
|
+
internalType: "uint256"
|
|
17149
|
+
}
|
|
17150
|
+
],
|
|
17151
|
+
stateMutability: "view"
|
|
17152
|
+
},
|
|
17153
|
+
{
|
|
17154
|
+
type: "function",
|
|
17155
|
+
name: "isSettled",
|
|
17156
|
+
inputs: [
|
|
17157
|
+
{
|
|
17158
|
+
name: "assertionId",
|
|
17159
|
+
type: "bytes32",
|
|
17160
|
+
internalType: "bytes32"
|
|
17161
|
+
}
|
|
17162
|
+
],
|
|
17163
|
+
outputs: [
|
|
17164
|
+
{
|
|
17165
|
+
name: "settled",
|
|
17166
|
+
type: "bool",
|
|
17167
|
+
internalType: "bool"
|
|
17168
|
+
}
|
|
17169
|
+
],
|
|
17170
|
+
stateMutability: "view"
|
|
17171
|
+
},
|
|
17172
|
+
{
|
|
17173
|
+
type: "function",
|
|
17174
|
+
name: "settleAssertion",
|
|
17175
|
+
inputs: [
|
|
17176
|
+
{
|
|
17177
|
+
name: "assertionId",
|
|
17178
|
+
type: "bytes32",
|
|
17179
|
+
internalType: "bytes32"
|
|
17180
|
+
}
|
|
17181
|
+
],
|
|
17182
|
+
outputs: [
|
|
17183
|
+
],
|
|
17184
|
+
stateMutability: "nonpayable"
|
|
17185
|
+
}
|
|
17186
|
+
];
|
|
17187
|
+
|
|
16928
17188
|
declare const GET_VENUES: string;
|
|
16929
17189
|
declare const GET_MARKETS: string;
|
|
16930
17190
|
declare const GET_MARKETS_WITH_PRICING: string;
|
|
@@ -17063,4 +17323,4 @@ declare function parseMetadata<T extends {
|
|
|
17063
17323
|
|
|
17064
17324
|
declare const version = "0.1.0";
|
|
17065
17325
|
|
|
17066
|
-
export { AccessControlFacet as AccessControlFacetABI, AccessControlModule, BatchOrdersFacet as BatchOrdersFacetABI, CONTRACT_ADDRESSES, type ChancePercentInput, ConditionalTokens as ConditionalTokensABI, DEFAULT_CHAIN, ERC20 as ERC20ABI, FeedProvider, GET_ALL_MARKETS_FEED, GET_ALL_MARKETS_FEED_BY_VOLUME, GET_CHART_TRADES, GET_CHART_TRADES_ALL, GET_GROUP_MARKETS, GET_LEADERBOARD, GET_MARKET, GET_MARKETS, GET_MARKETS_WITH_PRICING, GET_MARKET_GROUP, GET_MARKET_GROUPS, GET_MARKET_GROUP_ITEM, GET_MARKET_TOP_HOLDERS, GET_ORDERS, GET_PROTOCOL_STATS, GET_QUESTION, GET_QUESTIONS, GET_RECENT_MARKETS, GET_RECENT_TRADES, GET_TOP_OF_BOOK, GET_TRADER_CLOSED_POSITIONS, GET_TRADER_FILLS, GET_TRADER_POSITIONS, GET_TRADER_PROFILE, GET_TRADES, GET_UNIFIED_MARKET_FEED, GET_UNIFIED_MARKET_FEED_BY_VOLUME, GET_USER, GET_VENUES, LimitOrdersFacet as LimitOrdersFacetABI, MarketGroupFacet as MarketGroupFacetABI, type MarketMetadata, MarketModule, MarketOrdersFacet as MarketOrdersFacetABI, type MarketQuestion, MarketsFacet as MarketsFacetABI, MatchingFacet as MatchingFacetABI, MetadataFacet as MetadataFacetABI, NegRiskFacet as NegRiskFacetABI, OddMakiClient, type OddMakiClientConfig, type OddMakiConfig, OrderBookFacet as OrderBookFacetABI, PROTOCOL_FEES, type PriceMarketData, PriceMarketFacet as PriceMarketFacetABI, PriceMarketModule, ProtocolFacet as ProtocolFacetABI, PublicModule, PythResolutionFacet as PythResolutionFacetABI, type PythUpdate, ResolutionFacet as ResolutionFacetABI, SubgraphClient, type SubgraphMarketPriceData, TICK_SIZE_FINE, TICK_SIZE_STANDARD, TagsFacet as TagsFacetABI, TokenModule, type TopOfBookEntry, TradeModule, UMA_DEFAULTS, UmaModule, VALID_TICK_SIZES, VaultFacet as VaultFacetABI, VenueFacet as VenueFacetABI, type VenueMetadata, VenueModule, WhitelistAccessControl as WhitelistAccessControlABI, calculateChancePercent, clearDecimalsCache, createExpiry, createOddMakiClient, formatAmount, formatAncillaryData, formatTimestamp, getCachedTokenDecimals, getOutcomePrice, getTokenDecimals, isValidTickSize, parseAmount, parseAncillaryData, parseMetadata, parseTokenAmount, priceToTick, resolveIPFSUri, tickToPercentage, tickToPrice, version };
|
|
17326
|
+
export { AccessControlFacet as AccessControlFacetABI, AccessControlModule, BatchOrdersFacet as BatchOrdersFacetABI, CONTRACT_ADDRESSES, type ChancePercentInput, ConditionalTokens as ConditionalTokensABI, DEFAULT_CHAIN, ERC20 as ERC20ABI, FeedProvider, GET_ALL_MARKETS_FEED, GET_ALL_MARKETS_FEED_BY_VOLUME, GET_CHART_TRADES, GET_CHART_TRADES_ALL, GET_GROUP_MARKETS, GET_LEADERBOARD, GET_MARKET, GET_MARKETS, GET_MARKETS_WITH_PRICING, GET_MARKET_GROUP, GET_MARKET_GROUPS, GET_MARKET_GROUP_ITEM, GET_MARKET_TOP_HOLDERS, GET_ORDERS, GET_PROTOCOL_STATS, GET_QUESTION, GET_QUESTIONS, GET_RECENT_MARKETS, GET_RECENT_TRADES, GET_TOP_OF_BOOK, GET_TRADER_CLOSED_POSITIONS, GET_TRADER_FILLS, GET_TRADER_POSITIONS, GET_TRADER_PROFILE, GET_TRADES, GET_UNIFIED_MARKET_FEED, GET_UNIFIED_MARKET_FEED_BY_VOLUME, GET_USER, GET_VENUES, LimitOrdersFacet as LimitOrdersFacetABI, MarketGroupFacet as MarketGroupFacetABI, type MarketMetadata, MarketModule, MarketOrdersFacet as MarketOrdersFacetABI, type MarketQuestion, MarketsFacet as MarketsFacetABI, MatchingFacet as MatchingFacetABI, MetadataFacet as MetadataFacetABI, NegRiskFacet as NegRiskFacetABI, OddMakiClient, type OddMakiClientConfig, type OddMakiConfig, OrderBookFacet as OrderBookFacetABI, PROTOCOL_FEES, type PriceMarketData, PriceMarketFacet as PriceMarketFacetABI, PriceMarketModule, ProtocolFacet as ProtocolFacetABI, PublicModule, PythResolutionFacet as PythResolutionFacetABI, type PythUpdate, ResolutionFacet as ResolutionFacetABI, SubgraphClient, type SubgraphMarketPriceData, TICK_SIZE_FINE, TICK_SIZE_STANDARD, TagsFacet as TagsFacetABI, TokenModule, type TopOfBookEntry, TradeModule, UMA_DEFAULTS, UmaModule, UmaOracle as UmaOracleABI, VALID_TICK_SIZES, VaultFacet as VaultFacetABI, VenueFacet as VenueFacetABI, type VenueMetadata, VenueModule, WhitelistAccessControl as WhitelistAccessControlABI, calculateChancePercent, clearDecimalsCache, createExpiry, createOddMakiClient, formatAmount, formatAncillaryData, formatTimestamp, getCachedTokenDecimals, getOutcomePrice, getTokenDecimals, isValidTickSize, parseAmount, parseAncillaryData, parseMetadata, parseTokenAmount, priceToTick, resolveIPFSUri, tickToPercentage, tickToPrice, version };
|