@totalis/hip4-client 0.123.0 → 0.125.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.
Files changed (41) hide show
  1. package/CHANGELOG.md +391 -0
  2. package/README.md +9 -5
  3. package/dist/api-keys.d.ts +21 -2
  4. package/dist/api-keys.js +12 -10
  5. package/dist/audience-contract.d.ts +1 -2
  6. package/dist/client.d.ts +1 -1
  7. package/dist/client.js +1 -1
  8. package/dist/flow-errors.d.ts +1 -1
  9. package/dist/flow-errors.js +1 -1
  10. package/dist/generated/account-read.d.ts +150 -126
  11. package/dist/generated/api-keys.d.ts +19 -10
  12. package/dist/generated/browse.d.ts +12 -12
  13. package/dist/generated/client.d.ts +5 -2
  14. package/dist/generated/errors.d.ts +15 -8
  15. package/dist/generated/errors.js +47 -35
  16. package/dist/generated/maker.d.ts +3 -4
  17. package/dist/generated/openapi.d.ts +828 -892
  18. package/dist/generated/realtime.d.ts +68 -93
  19. package/dist/generated/vault-abi.d.ts +57 -0
  20. package/dist/generated/vault-abi.js +77 -0
  21. package/dist/generated/version.d.ts +16 -16
  22. package/dist/generated/version.js +20 -18
  23. package/dist/maker.d.ts +134 -54
  24. package/dist/maker.js +257 -147
  25. package/dist/money.d.ts +8 -6
  26. package/dist/money.js +7 -7
  27. package/dist/partner.d.ts +2 -0
  28. package/dist/partner.js +2 -1
  29. package/dist/request.d.ts +11 -2
  30. package/dist/request.js +7 -2
  31. package/dist/totalis.d.ts +147 -232
  32. package/dist/totalis.js +290 -269
  33. package/dist/typed-data.d.ts +6 -0
  34. package/dist/typed-data.js +8 -0
  35. package/dist/ui.d.ts +6 -10
  36. package/dist/ui.js +15 -13
  37. package/dist/vault-reads.d.ts +46 -0
  38. package/dist/vault-reads.js +72 -0
  39. package/examples/browser-wallet.mjs +1 -1
  40. package/examples/node-bot.mjs +15 -12
  41. package/package.json +1 -1
@@ -1,25 +1,25 @@
1
- export declare const sdkVersion = "261.0.0-golden-pause";
2
- export declare const openapiSha256 = "38d117292a0ab74809f3544cd7fba5316d87bb1c1f1db23f282434b409d8e515";
3
- export declare const realtimeSha256 = "7538586f80400a2172547e6d62478c20ac99a3c437345661ffed0b975111413a";
1
+ export declare const sdkVersion = "279.0.0-no-market-history";
2
+ export declare const openapiSha256 = "25e0b136071e6d72f52eb5f7fb4144921fad38680ce1751c989e1e06a6c0c80c";
3
+ export declare const realtimeSha256 = "bde8ada386aaa01c6d6ff7b2a0734916afde1d39e475b3019d6eb71334a48b42";
4
4
  export declare const jsonSchemaSha256: {
5
- readonly "account.schema.json": "e6cd5a75429d074f23bd7f6ffd370fa59d0e3f7dbd6aef6433e5ba0d21b5baeb";
5
+ readonly "account.schema.json": "3120357249f55f8481d5afb7a99112f803c22c6a1cbe3adadca478bb313f8160";
6
6
  readonly "comments.schema.json": "5773471b4442ba9d8af0dc012d71561baaf50d0e1c2571039241780848edb4a4";
7
- readonly "common.schema.json": "04f51deb3cbea448e59195e26ede3212598d58a7940fe67eb2123fd9161c5edb";
8
- readonly "core-exit.schema.json": "c7f617e815225cdcac95c236f8b73fbe288ee5713ff444c3be90eb915fc3a401";
9
- readonly "error.schema.json": "b49fccce0fabcee10090ee88d645335d8476cd78c3c2ed44c3004fd892abbd98";
10
- readonly "hypercore.schema.json": "521372f8980353bcdd90ca3d0292bc6b41c69dbad3164bfd501b1ca99dac4cb8";
11
- readonly "identity.schema.json": "896d975e5f4076cb34ae33f2dcfc41559fd3df1ed39e3d72ac9e342ca1f957fa";
7
+ readonly "common.schema.json": "e7b414609c7eefa2e649882d251290993832aa484eddce41fda472af9b7ca40b";
8
+ readonly "core-exit.schema.json": "6208a8dc775e8a9f858ec802e9b013a3e2363279a7b24ff7dfecf89fe0462eb9";
9
+ readonly "error.schema.json": "72ae55c34aa9e265669cf7f0cc5ad7862906c42918661f2b47c995abe34bd17e";
10
+ readonly "hypercore.schema.json": "38685dc8ee900f9d1c7d1eeda40cc622bc74a10d7dd702163085ab1e0c1437e3";
11
+ readonly "identity.schema.json": "06d5d3f175761af1f96c2367524ee5f736325c78999f471accfd9662bfa85373";
12
12
  readonly "maker-access.schema.json": "49698ee0235e42064aae0397db1e0f646bdc10d9dfa10121714ba06dd69fee3b";
13
- readonly "maker-action.schema.json": "dc41e52c868848e85cdeb918992cb710d34616d2803a63f6d9a658e016744a50";
13
+ readonly "maker-action.schema.json": "07a5cb07976d06315733282d1bb4f1416c23d3e7a8a4e8941228ac559a2f7467";
14
14
  readonly "maker-telemetry.schema.json": "85b111ce0f4935299d1116071b43de12e775bef4e0c283c12f19046d34374a9c";
15
- readonly "market-data.schema.json": "079b8204aa13c9b27a5defb4e7d8d8986f15bd0201e808076464308ad63cf60a";
15
+ readonly "market-data.schema.json": "fd00eaf6524d25019db1dce6c20a3c6f0b9786608583aa6bd1cc14cd2388702f";
16
16
  readonly "product-metadata.schema.json": "7c8ffbde878a0aedaed16814fcfd2e80038054b140886cc8736bb7b508042631";
17
- readonly "quote.schema.json": "52ee1f4708c8b1504e4cd2f2f9279e14c8ec8aeacac1f491441ae0e15ac3c71a";
18
- readonly "realtime.schema.json": "7538586f80400a2172547e6d62478c20ac99a3c437345661ffed0b975111413a";
19
- readonly "social.schema.json": "b94c9169cb9df201b247697f0ebb52e27b441b9b4171a07e0f36a9f02fc58d61";
17
+ readonly "quote.schema.json": "5c16a54c428656a4e8c1042b2057ce8290e6eebcc02b237f5dce7e4c13b7ded0";
18
+ readonly "realtime.schema.json": "bde8ada386aaa01c6d6ff7b2a0734916afde1d39e475b3019d6eb71334a48b42";
19
+ readonly "social.schema.json": "33f48967f8a147809b466717de057c4bf6519eb1067d75ed49fd4c21c93104d4";
20
20
  };
21
21
  export declare const operations: {
22
- readonly client: readonly ["abandonCoreExit", "acceptQuote", "activeCoreExits", "admitOwnMaker", "admitPartnerWallet", "approveWallet", "bindEmbeddedWallet", "cancelRfq", "claimGoldenLink", "confirmComboCopyAgent", "confirmCoreCopyAgent", "createCashout", "createComment", "createCoreExit", "createDeposit", "createGoldenRfq", "createRfq", "createRunOffClaim", "createWalletChallenge", "createWalletSession", "createWithdrawal", "deleteComment", "editComment", "endWalletSession", "followTrader", "getAcceptance", "getAccountActivity", "getAccountPnl", "getAccountPosition", "getAccountValue", "getBalances", "getChart", "getCopyAgents", "getCopyBudget", "getCopySettings", "getCopySummary", "getCoreExit", "getDeployment", "getGenesis", "getGolden", "getGoldenLinkSuggestions", "getGoldenMarkets", "getGoldenOffer", "getGoldenSuggestions", "getHypercoreBalance", "getHypercorePortfolio", "getHypercoreSettlementCredits", "getIdentity", "getMakerActivity", "getMakerCapital", "getMakerExposure", "getMakerPerformance", "getMakerPosition", "getMakerQuotes", "getMakerTelemetry", "getMakerVaultFundingTransaction", "getMakerWithdrawal", "getMarket", "getMarketDataConfig", "getMarketDefinitions", "getMarketDisplay", "getMarketHistory", "getMarketRecurringRound", "getMarketReferenceCloses", "getMarketRoundHistory", "getMarketScoreTimeline", "getMarketStats", "getMyGenesis", "getMyReferralBonus", "getMyTradingRewards", "getOperation", "getOutcomeMetadata", "getOwnMaker", "getPartnerAccountValue", "getPartnerReport", "getPerpMarks", "getPicture", "getProfitLeaderboard", "getPublicGoldenMarkets", "getQuestion", "getQuestionRecurringRound", "getQuestionScoreTimeline", "getRfq", "getSeries", "getSocialLeaderboard", "getSocialPerson", "getSocialPosition", "getSuggestedCombo", "getTaxonomy", "getTrader", "getTraderPnl", "getUsernameAvailability", "getVaultAgents", "getVolumeLeaderboard", "getWalletApproval", "getWithdrawal", "grantComboCopyAgent", "grantVaultAgent", "likeComment", "listAccountActivity", "listAccountPositions", "listComboCopies", "listComboFeed", "listCommentReplies", "listComments", "listControlledMakers", "listCopiedFills", "listCopyTrades", "listDiscovery", "listFollowers", "listFollowingFeed", "listFollowingPositions", "listFollows", "listMakerActivity", "listMakerPositions", "listMakerQuoteHistory", "listMarketTrades", "listMarkets", "listMyNotifications", "listOperations", "listPartnerFills", "listPartnerWebhookEvents", "listQuotes", "listSocialActivity", "listSocialFeed", "listSocialFollowers", "listSocialFollowing", "listSocialPositions", "listTraderPositions", "listTraderTrades", "markMyNotificationsRead", "placeGolden", "reactComment", "recordAcquisition", "recordCopiedTrade", "recordGoldenTelegramClick", "refreshPicture", "removeUploadedPicture", "requestComboCopyAgent", "requestCoreCopyAgent", "revokeComboCopyAgent", "searchCatalog", "searchTraders", "setAvatar", "setCopyAllocation", "setCopySettings", "setPublicProfile", "setUsername", "setXHandleShown", "setXPictureShown", "signGoldenGift", "stream", "streamMarkets", "switchOffComboCopyAgent", "switchOffCoreCopyAgent", "unfollowTrader", "unlikeComment", "unlockGolden", "unreactComment", "uploadPicture"];
23
- readonly maker: readonly ["cancelQuote", "confirmQuote", "createCollateralReduction", "createQuote", "getAccountActivity", "getAccountPosition", "getChart", "getCollateralReduction", "getDeployment", "getMakerActivity", "getMakerCapital", "getMakerExposure", "getMakerPerformance", "getMakerPosition", "getMakerQuotes", "getMakerTelemetry", "getMakerTelemetryPublication", "getMakerVaultFundingTransaction", "getMakerWithdrawal", "getMarket", "getMarketDisplay", "getMarketHistory", "getMarketRecurringRound", "getMarketReferenceCloses", "getMarketRoundHistory", "getOperation", "getQuestion", "getQuestionRecurringRound", "getRfq", "getSeries", "getTaxonomy", "listAccountActivity", "listAccountPositions", "listDiscovery", "listMakerAcceptances", "listMakerActivity", "listMakerPositions", "listMakerQuoteHistory", "listMarkets", "listOperations", "listRfqs", "publishMakerTelemetry", "releaseQuoteLease", "renewQuoteLease", "searchCatalog", "stream", "submitMakerSelfFundedTransaction"];
22
+ readonly client: readonly ["abandonCoreExit", "acceptQuote", "activeCoreExits", "admitOwnMaker", "admitPartnerWallet", "approveWallet", "bindEmbeddedWallet", "cancelRfq", "claimGoldenLink", "confirmComboCopyAgent", "confirmCoreCopyAgent", "createCashout", "createComment", "createCoreExit", "createDeposit", "createGoldenRfq", "createRfq", "createRunOffClaim", "createWalletChallenge", "createWalletSession", "createWithdrawal", "deleteComment", "editComment", "endWalletSession", "followTrader", "getAcceptance", "getAccountActivity", "getAccountPnl", "getAccountPosition", "getAccountValue", "getBalances", "getChart", "getCopyAgents", "getCopyBudget", "getCopySettings", "getCopySummary", "getCoreExit", "getDeployment", "getGenesis", "getGolden", "getGoldenLinkSuggestions", "getGoldenMarkets", "getGoldenOffer", "getGoldenSuggestions", "getHypercoreBalance", "getHypercoreOrders", "getHypercorePortfolio", "getHypercoreSettlementCredits", "getIdentity", "getLiveMarks", "getMakerActivity", "getMakerCapital", "getMakerExposure", "getMakerPerformance", "getMakerPosition", "getMakerQuotes", "getMakerTelemetry", "getMakerVaultFundingTransaction", "getMakerWithdrawal", "getMarket", "getMarketDataConfig", "getMarketDefinitions", "getMarketDisplay", "getMarketRecurringRound", "getMarketReferenceCloses", "getMarketResults", "getMarketRoundHistory", "getMarketScoreTimeline", "getMarketStats", "getMyGenesis", "getMyReferralBonus", "getMyTradingRewards", "getOperation", "getOutcomeMetadata", "getOwnMaker", "getPartnerAccountValue", "getPartnerReport", "getPerpMarks", "getPicture", "getProfitLeaderboard", "getPublicGoldenMarkets", "getQuestion", "getQuestionRecurringRound", "getQuestionScoreTimeline", "getRfq", "getSeries", "getSocialLeaderboard", "getSocialPerson", "getSocialPosition", "getSuggestedCombo", "getTaxonomy", "getTrader", "getTraderPnl", "getUsernameAvailability", "getVaultAgents", "getVolumeLeaderboard", "getWalletApproval", "getWithdrawal", "grantComboCopyAgent", "grantVaultAgent", "likeComment", "listAccountActivity", "listAccountPositions", "listComboCopies", "listComboFeed", "listCommentReplies", "listComments", "listControlledMakers", "listCopiedFills", "listCopyTrades", "listDiscovery", "listFollowers", "listFollowingFeed", "listFollowingPositions", "listFollows", "listHypercorePositions", "listMakerActivity", "listMakerPositions", "listMakerQuoteHistory", "listMarketTrades", "listMarkets", "listMyNotifications", "listOperations", "listPartnerFills", "listPartnerWebhookEvents", "listQuotes", "listSocialActivity", "listSocialFeed", "listSocialFollowers", "listSocialFollowing", "listSocialPositions", "listTraderPositions", "listTraderTrades", "markMyNotificationsRead", "placeGolden", "reactComment", "recordAcquisition", "recordCopiedTrade", "recordGoldenTelegramClick", "refreshPicture", "removeUploadedPicture", "requestComboCopyAgent", "requestCoreCopyAgent", "revokeComboCopyAgent", "searchCatalog", "searchTraders", "setAvatar", "setCopyAllocation", "setCopySettings", "setPublicProfile", "setUsername", "setXHandleShown", "setXPictureShown", "signGoldenGift", "stream", "streamMarkets", "switchOffComboCopyAgent", "switchOffCoreCopyAgent", "unfollowTrader", "unlikeComment", "unlockGolden", "unreactComment", "uploadPicture"];
23
+ readonly maker: readonly ["cancelAllQuotes", "cancelQuote", "confirmQuote", "createCollateralReduction", "createQuote", "getAccountActivity", "getAccountPosition", "getChart", "getCollateralReduction", "getDeployment", "getMakerActivity", "getMakerCapital", "getMakerExposure", "getMakerPerformance", "getMakerPosition", "getMakerQuotes", "getMakerTelemetry", "getMakerTelemetryPublication", "getMakerVaultFundingTransaction", "getMakerWithdrawal", "getMarket", "getMarketDisplay", "getMarketRecurringRound", "getMarketReferenceCloses", "getMarketResults", "getMarketRoundHistory", "getOperation", "getQuestion", "getQuestionRecurringRound", "getRfq", "getSeries", "getTaxonomy", "listAccountActivity", "listAccountPositions", "listDiscovery", "listMakerAcceptances", "listMakerActivity", "listMakerPositions", "listMakerQuoteHistory", "listMarkets", "listOperations", "listRfqs", "publishMakerTelemetry", "searchCatalog", "stream", "submitMakerSelfFundedTransaction"];
24
24
  readonly operator: readonly ["live", "ready"];
25
25
  };
@@ -1,23 +1,23 @@
1
1
  // Generated by scripts/generate.mjs; do not edit.
2
- export const sdkVersion = "261.0.0-golden-pause";
3
- export const openapiSha256 = "38d117292a0ab74809f3544cd7fba5316d87bb1c1f1db23f282434b409d8e515";
4
- export const realtimeSha256 = "7538586f80400a2172547e6d62478c20ac99a3c437345661ffed0b975111413a";
2
+ export const sdkVersion = "279.0.0-no-market-history";
3
+ export const openapiSha256 = "25e0b136071e6d72f52eb5f7fb4144921fad38680ce1751c989e1e06a6c0c80c";
4
+ export const realtimeSha256 = "bde8ada386aaa01c6d6ff7b2a0734916afde1d39e475b3019d6eb71334a48b42";
5
5
  export const jsonSchemaSha256 = {
6
- "account.schema.json": "e6cd5a75429d074f23bd7f6ffd370fa59d0e3f7dbd6aef6433e5ba0d21b5baeb",
6
+ "account.schema.json": "3120357249f55f8481d5afb7a99112f803c22c6a1cbe3adadca478bb313f8160",
7
7
  "comments.schema.json": "5773471b4442ba9d8af0dc012d71561baaf50d0e1c2571039241780848edb4a4",
8
- "common.schema.json": "04f51deb3cbea448e59195e26ede3212598d58a7940fe67eb2123fd9161c5edb",
9
- "core-exit.schema.json": "c7f617e815225cdcac95c236f8b73fbe288ee5713ff444c3be90eb915fc3a401",
10
- "error.schema.json": "b49fccce0fabcee10090ee88d645335d8476cd78c3c2ed44c3004fd892abbd98",
11
- "hypercore.schema.json": "521372f8980353bcdd90ca3d0292bc6b41c69dbad3164bfd501b1ca99dac4cb8",
12
- "identity.schema.json": "896d975e5f4076cb34ae33f2dcfc41559fd3df1ed39e3d72ac9e342ca1f957fa",
8
+ "common.schema.json": "e7b414609c7eefa2e649882d251290993832aa484eddce41fda472af9b7ca40b",
9
+ "core-exit.schema.json": "6208a8dc775e8a9f858ec802e9b013a3e2363279a7b24ff7dfecf89fe0462eb9",
10
+ "error.schema.json": "72ae55c34aa9e265669cf7f0cc5ad7862906c42918661f2b47c995abe34bd17e",
11
+ "hypercore.schema.json": "38685dc8ee900f9d1c7d1eeda40cc622bc74a10d7dd702163085ab1e0c1437e3",
12
+ "identity.schema.json": "06d5d3f175761af1f96c2367524ee5f736325c78999f471accfd9662bfa85373",
13
13
  "maker-access.schema.json": "49698ee0235e42064aae0397db1e0f646bdc10d9dfa10121714ba06dd69fee3b",
14
- "maker-action.schema.json": "dc41e52c868848e85cdeb918992cb710d34616d2803a63f6d9a658e016744a50",
14
+ "maker-action.schema.json": "07a5cb07976d06315733282d1bb4f1416c23d3e7a8a4e8941228ac559a2f7467",
15
15
  "maker-telemetry.schema.json": "85b111ce0f4935299d1116071b43de12e775bef4e0c283c12f19046d34374a9c",
16
- "market-data.schema.json": "079b8204aa13c9b27a5defb4e7d8d8986f15bd0201e808076464308ad63cf60a",
16
+ "market-data.schema.json": "fd00eaf6524d25019db1dce6c20a3c6f0b9786608583aa6bd1cc14cd2388702f",
17
17
  "product-metadata.schema.json": "7c8ffbde878a0aedaed16814fcfd2e80038054b140886cc8736bb7b508042631",
18
- "quote.schema.json": "52ee1f4708c8b1504e4cd2f2f9279e14c8ec8aeacac1f491441ae0e15ac3c71a",
19
- "realtime.schema.json": "7538586f80400a2172547e6d62478c20ac99a3c437345661ffed0b975111413a",
20
- "social.schema.json": "b94c9169cb9df201b247697f0ebb52e27b441b9b4171a07e0f36a9f02fc58d61"
18
+ "quote.schema.json": "5c16a54c428656a4e8c1042b2057ce8290e6eebcc02b237f5dce7e4c13b7ded0",
19
+ "realtime.schema.json": "bde8ada386aaa01c6d6ff7b2a0734916afde1d39e475b3019d6eb71334a48b42",
20
+ "social.schema.json": "33f48967f8a147809b466717de057c4bf6519eb1067d75ed49fd4c21c93104d4"
21
21
  };
22
22
  export const operations = {
23
23
  "client": [
@@ -66,9 +66,11 @@ export const operations = {
66
66
  "getGoldenOffer",
67
67
  "getGoldenSuggestions",
68
68
  "getHypercoreBalance",
69
+ "getHypercoreOrders",
69
70
  "getHypercorePortfolio",
70
71
  "getHypercoreSettlementCredits",
71
72
  "getIdentity",
73
+ "getLiveMarks",
72
74
  "getMakerActivity",
73
75
  "getMakerCapital",
74
76
  "getMakerExposure",
@@ -82,9 +84,9 @@ export const operations = {
82
84
  "getMarketDataConfig",
83
85
  "getMarketDefinitions",
84
86
  "getMarketDisplay",
85
- "getMarketHistory",
86
87
  "getMarketRecurringRound",
87
88
  "getMarketReferenceCloses",
89
+ "getMarketResults",
88
90
  "getMarketRoundHistory",
89
91
  "getMarketScoreTimeline",
90
92
  "getMarketStats",
@@ -134,6 +136,7 @@ export const operations = {
134
136
  "listFollowingFeed",
135
137
  "listFollowingPositions",
136
138
  "listFollows",
139
+ "listHypercorePositions",
137
140
  "listMakerActivity",
138
141
  "listMakerPositions",
139
142
  "listMakerQuoteHistory",
@@ -183,6 +186,7 @@ export const operations = {
183
186
  "uploadPicture"
184
187
  ],
185
188
  "maker": [
189
+ "cancelAllQuotes",
186
190
  "cancelQuote",
187
191
  "confirmQuote",
188
192
  "createCollateralReduction",
@@ -204,9 +208,9 @@ export const operations = {
204
208
  "getMakerWithdrawal",
205
209
  "getMarket",
206
210
  "getMarketDisplay",
207
- "getMarketHistory",
208
211
  "getMarketRecurringRound",
209
212
  "getMarketReferenceCloses",
213
+ "getMarketResults",
210
214
  "getMarketRoundHistory",
211
215
  "getOperation",
212
216
  "getQuestion",
@@ -225,8 +229,6 @@ export const operations = {
225
229
  "listOperations",
226
230
  "listRfqs",
227
231
  "publishMakerTelemetry",
228
- "releaseQuoteLease",
229
- "renewQuoteLease",
230
232
  "searchCatalog",
231
233
  "stream",
232
234
  "submitMakerSelfFundedTransaction"
package/dist/maker.d.ts CHANGED
@@ -3,10 +3,13 @@ import type { paths } from "./generated/maker.js";
3
3
  import type { paths as ClientPaths } from "./generated/client.js";
4
4
  import { type SignerInput } from "./signer.js";
5
5
  import { TotalisStream, type StreamEventOf, type StreamOptions, type StreamSubscription } from "./stream.js";
6
- import { type ResponseOf } from "./totalis.js";
6
+ import { type MarketFilters, type ResponseOf } from "./totalis.js";
7
7
  import { type TransactionCall } from "./controller.js";
8
+ import { type ChainReader } from "./vault-reads.js";
8
9
  export type { components, operations, paths } from "./generated/maker.js";
9
10
  export { controllerTransactions, encodeCall, openMakerVaultTransaction, type ControllerTransactions, type TransactionCall } from "./controller.js";
11
+ export { legsHash } from "./typed-data.js";
12
+ export { legStateOfCall, legStateReadGas, readCashoutPosition, readLegState, readTicket, ticketsCall, type CashoutPosition, type ChainReader, type VaultTicket, } from "./vault-reads.js";
10
13
  export declare function createMakerClient(environment: PublicEnvironment, options?: ApiClientOptions): import("openapi-fetch").Client<paths, `${string}/${string}`>;
11
14
  type Ok<P extends keyof paths, M extends keyof paths[P], S extends number = 200> = ResponseOf<paths, P, M, S>;
12
15
  export type Rfq = Ok<"/v1/rfqs/{rfq_id}", "get">;
@@ -26,43 +29,51 @@ export type SelfFundedAccepted = Ok<"/v1/makers/{maker_id}/operations/{operation
26
29
  export type Decision = "CONFIRM" | "DECLINE";
27
30
  /** An RFQ as `onRfq` delivers it: open, as `GET /v1/rfqs/{rfq_id}` reads it. */
28
31
  export type OpenedRfq = Rfq;
29
- /**
30
- * `quote` or `bid` on an RFQ where a taker's acceptance of this maker's quote
31
- * awaits its answer. Publishing would replace that quote, which the venue
32
- * refuses with 409 `STATE_CONFLICT`. Nothing was published: answer the
33
- * acceptance (`confirm`, or `onAcceptance`) first, or let its deadline pass.
34
- */
35
- export declare class AcceptancePendingError extends Error {
36
- readonly rfqId: string;
37
- readonly quoteId: string;
38
- readonly deadline: string;
39
- readonly name = "AcceptancePendingError";
40
- readonly code = "ACCEPTANCE_PENDING";
41
- constructor(rfqId: string, quoteId: string, deadline: string);
42
- }
32
+ /** The last look: whether to sign an acceptance's terms, which are already checked against what this maker published. */
33
+ export type LastLook = (acceptance: MakerAcceptance) => Decision | Promise<Decision>;
43
34
  export type MakerOptions = Omit<ApiClientOptions, "accessToken"> & {
44
35
  readonly environment: PublicEnvironment;
45
36
  /** The WebSocket origin for the stream. Defaults to `baseUrl` if set, else the environment's stream host (`wss://hip4-ws.totalis.trade` in production). */
46
37
  readonly streamBaseUrl?: string;
47
38
  /** The maker's scoped `ttk_` key. */
48
39
  readonly apiKey: AccessToken;
40
+ /** A HyperEVM JSON-RPC URL or EIP-1193 provider for `readCashoutPosition`; only `eth_call` is sent. */
41
+ readonly chain?: ChainReader;
49
42
  readonly makerId: string;
50
43
  /** The maker's current quote signer (`signer` in GET /v1/makers/{maker_id}/capital). Never stored. */
51
44
  readonly signer: SignerInput;
52
45
  /**
53
- * Where this maker records the digests it publishes: the only terms its quote
54
- * signer will sign. Defaults to memory; pass a durable store so a restarted or
55
- * separate confirming process can answer quotes published elsewhere.
46
+ * Where this maker records what it publishes: the only terms its quote signer
47
+ * will sign: each quote and bid by its priced terms, everything but the
48
+ * expiry and salt the venue fills in.
49
+ * Defaults to memory; pass a durable store so a restarted or separate
50
+ * confirming process can answer quotes published elsewhere.
56
51
  */
57
52
  readonly published?: PublishedStore;
53
+ /**
54
+ * The SDK confirms every acceptance of a quote this instance's `published`
55
+ * store holds, and leaves any other to the process that published it.
56
+ * `lastLook` may decline it instead, for example because the price moved.
57
+ * An `onAcceptance` handler, while attached, answers in place of this.
58
+ */
59
+ readonly lastLook?: LastLook;
60
+ /**
61
+ * Default true. Pass false when another process answers this maker's
62
+ * acceptances, such as a quoter sharing its `published` store with a
63
+ * separate confirmer: this instance then answers only through
64
+ * `onAcceptance` or `confirm`.
65
+ */
66
+ readonly autoConfirm?: boolean;
67
+ /** Where an answer the SDK sent on its own failed, or reading the pending acceptances failed (no acceptance). */
68
+ readonly onConfirmError?: (error: unknown, acceptance?: MakerAcceptance) => void;
58
69
  /** Resume the maker stream after this cursor: the stream replays the events after it. Persist `stream.cursor` to use it. */
59
70
  readonly stream?: Omit<StreamOptions, "subscription" | "accessToken" | "environment" | "baseUrl" | "streamBaseUrl"> & {
60
71
  readonly subscription?: Omit<Extract<StreamSubscription, {
61
- readonly type: "maker";
62
- }>, "type" | "maker_id">;
72
+ readonly kind: "maker";
73
+ }>, "kind" | "maker_id">;
63
74
  };
64
75
  };
65
- /** The maker-owned record of published digests and their expiry (unix seconds). */
76
+ /** The maker-owned record of published quotes, by key, and until when they may be signed (unix seconds). */
66
77
  export type PublishedStore = {
67
78
  record(digest: string, expiry: number): void | Promise<void>;
68
79
  forget(digest: string): void | Promise<void>;
@@ -72,8 +83,8 @@ export type PublishedStore = {
72
83
  export declare function memoryPublished(): PublishedStore;
73
84
  /**
74
85
  * The maker SDK over the public maker surface (the one Totalis MM uses):
75
- * publish unsigned entry and cash-out quotes on one route, then confirm the
76
- * exact terms a taker accepted when QUOTE_ACCEPTED arrives.
86
+ * publish a price on entry and cash-out RFQs, and the SDK confirms the exact
87
+ * terms a taker accepts when QUOTE_ACCEPTED arrives.
77
88
  */
78
89
  export declare function createMaker(options: MakerOptions): {
79
90
  client: import("openapi-fetch").Client<paths, `${string}/${string}`>;
@@ -95,49 +106,109 @@ export declare function createMaker(options: MakerOptions): {
95
106
  };
96
107
  };
97
108
  }>;
109
+ listMarkets: (filters?: MarketFilters, limit?: number) => AsyncGenerator<{
110
+ readonly outcome_id: import("./generated/openapi.js").components["schemas"]["UInt32String"];
111
+ readonly native_question_id: import("./generated/openapi.js").components["schemas"]["RealQuestionId"] | null;
112
+ readonly title: string;
113
+ readonly status: import("./generated/openapi.js").components["schemas"]["MarketState"];
114
+ readonly result: {
115
+ readonly availability: "AVAILABLE";
116
+ readonly result_state: "UNRESOLVED";
117
+ } | {
118
+ readonly availability: "AVAILABLE";
119
+ readonly result_state: "NUMERIC_RECORDED";
120
+ readonly yes_factor_numerator: import("./generated/openapi.js").components["schemas"]["FactorNumerator"];
121
+ readonly factor_scale: "100000000";
122
+ readonly recorded_at_block: import("./generated/openapi.js").components["schemas"]["PositiveInt64"];
123
+ readonly evidence_digest: import("./generated/openapi.js").components["schemas"]["NonZeroBytes32"];
124
+ } | {
125
+ readonly availability: "AVAILABLE";
126
+ readonly result_state: "RECOGNIZED_NONNUMERIC_OBSERVED";
127
+ readonly recorded_at_block: import("./generated/openapi.js").components["schemas"]["PositiveInt64"];
128
+ readonly evidence_digest: import("./generated/openapi.js").components["schemas"]["NonZeroBytes32"];
129
+ } | {
130
+ readonly availability: "UNAVAILABLE";
131
+ readonly reason: "NOT_QUERIED" | "NATIVE_READ_FAILED" | "RPC_UNAVAILABLE" | "MALFORMED_RETURN" | "PROVIDER_DISAGREEMENT" | "UNSUPPORTED_PROTOCOL_VERSION";
132
+ };
133
+ readonly metadata_revision: import("./generated/openapi.js").components["schemas"]["PositiveInt64"];
134
+ readonly eligibility: {
135
+ readonly status: "ENABLED";
136
+ } | {
137
+ readonly status: "DISABLED";
138
+ readonly reason: "UNSUPPORTED_PROTOCOL_VERSION" | "UNSUPPORTED_QUOTE_ASSET" | "IDENTITY_CONFLICT" | "DEADLINE_UNAVAILABLE" | "SOURCE_UNQUALIFIED" | "FINANCIAL_PROFILE_DISABLED" | "MARKET_NOT_ACTIVE" | "NATIVE_STATE_UNAVAILABLE" | "NATIVE_STATE_STALE" | "DEADLINE_BUFFER_ENTERED" | "REFERENCE_UNAVAILABLE" | "REFERENCE_STALE" | "SOURCE_GENERATION_MISMATCH";
139
+ };
140
+ readonly combo: {
141
+ readonly status: "OPEN";
142
+ } | {
143
+ readonly status: "CLOSED";
144
+ readonly reason: "EXCLUDED" | "UNLISTED_DEPLOYER" | "OUTSIDE_WINDOW" | "EVENT_PASSED";
145
+ readonly opens_at: import("./generated/openapi.js").components["schemas"]["PositiveInt64"] | null;
146
+ };
147
+ readonly deployer: {
148
+ readonly name: string | null;
149
+ readonly address: string | null;
150
+ };
151
+ readonly category: import("./generated/openapi.js").components["schemas"]["Category"];
152
+ readonly subcategory: import("./generated/openapi.js").components["schemas"]["Subcategory"];
153
+ readonly sides: readonly {
154
+ readonly side: import("./generated/openapi.js").components["schemas"]["Side"];
155
+ readonly coin: string;
156
+ readonly reference: {
157
+ readonly availability: "AVAILABLE";
158
+ readonly quality: import("./generated/openapi.js").components["schemas"]["Quality"];
159
+ readonly value: import("./generated/openapi.js").components["schemas"]["IntegerValue"];
160
+ readonly best_bid?: import("./generated/openapi.js").components["schemas"]["IntegerValue"] | null;
161
+ readonly best_ask?: import("./generated/openapi.js").components["schemas"]["IntegerValue"] | null;
162
+ readonly last_trade?: import("./generated/openapi.js").components["schemas"]["IntegerValue"] | null;
163
+ readonly last_trade_at?: import("./generated/openapi.js").components["schemas"]["$defs-Timestamp"] | null;
164
+ readonly chance?: import("./generated/openapi.js").components["schemas"]["IntegerValue"] | null;
165
+ readonly chance_basis?: ("MID" | "LAST_TRADE" | "HELD") | null;
166
+ readonly mark?: import("./generated/openapi.js").components["schemas"]["IntegerValue"] | null;
167
+ readonly scale: import("./generated/openapi.js").components["schemas"]["Scale"];
168
+ readonly freshness: "FRESH" | "STALE";
169
+ readonly received_at: import("./generated/openapi.js").components["schemas"]["$defs-Timestamp"];
170
+ } | {
171
+ readonly availability: "UNAVAILABLE";
172
+ readonly reason: "NOT_OBSERVED" | "AMBIGUOUS_SOURCE" | "STALE_GENERATION" | "UNSUPPORTED_MARKET" | "SOURCE_UNQUALIFIED";
173
+ readonly freshness: "UNKNOWN";
174
+ readonly received_at: import("./generated/openapi.js").components["schemas"]["$defs-Timestamp"];
175
+ };
176
+ readonly last_chance?: import("./generated/openapi.js").components["schemas"]["IntegerValue"] | null;
177
+ }[];
178
+ readonly dates: {
179
+ readonly event: {
180
+ readonly kind: "START" | "DECISION" | "DEADLINE";
181
+ readonly at: import("./generated/openapi.js").components["schemas"]["PositiveInt64"];
182
+ } | null;
183
+ readonly result_by: import("./generated/openapi.js").components["schemas"]["PositiveInt64"] | null;
184
+ readonly resolves_after: import("./generated/openapi.js").components["schemas"]["PositiveInt64"] | null;
185
+ readonly scheduled_event_at: import("./generated/openapi.js").components["schemas"]["PositiveInt64"] | null;
186
+ readonly observation_ends_at: import("./generated/openapi.js").components["schemas"]["PositiveInt64"] | null;
187
+ readonly market_class: string | null;
188
+ } | null;
189
+ readonly awaiting_result?: boolean | null;
190
+ }, void, any>;
98
191
  quote: (rfq: Pick<EntryRfq, "rfq_id" | "taker" | "stake" | "legs">, terms: {
99
192
  readonly payout: bigint | string;
100
- readonly lifetimeSeconds?: number;
101
- readonly salt?: string;
102
193
  }) => Promise<{
103
- quoteId: `0x${string}`;
104
- entry: {
105
- maker_id: string;
106
- legs: {
107
- readonly outcome_id: import("./generated/openapi.js").components["schemas"]["UInt32String"];
108
- readonly side: import("./generated/openapi.js").components["schemas"]["Side"];
109
- }[];
110
- stake: string;
111
- payout: string;
112
- fee_bps: number;
113
- taker_fee_bps: number;
114
- taker: string;
115
- expiry: string;
116
- salt: string;
117
- };
194
+ quoteId: string;
118
195
  }>;
119
- bid: (rfq: Pick<CashoutRfq, "rfq_id" | "position_id" | "owner" | "leg_state">, terms: {
196
+ bid: (rfq: Pick<CashoutRfq, "rfq_id" | "position_id" | "taker">, terms: {
120
197
  readonly price: bigint | string;
121
- readonly lifetimeSeconds?: number;
122
- readonly salt?: string;
198
+ readonly legState?: string;
123
199
  }) => Promise<{
124
- quote_id: import("./generated/openapi.js").components["schemas"]["Bytes32"];
125
- sell_back: import("./generated/openapi.js").components["schemas"]["schemas-SellBackTerms"];
126
200
  quoteId: string;
127
201
  }>;
202
+ readCashoutPosition: (rfq: Pick<CashoutRfq, "position_id" | "legs">) => Promise<import("./vault-reads.js").CashoutPosition>;
128
203
  cancelQuote: (quoteId: string) => Promise<{
129
204
  readonly status: "CANCELLED" | "REPLACED" | "ACCEPTED";
130
205
  }>;
131
- renewQuoteLease: (leaseMs: number) => Promise<{
132
- readonly lease_ms: number;
133
- readonly expires_at: import("./generated/openapi.js").components["schemas"]["$defs-Timestamp"];
134
- }>;
135
- releaseQuoteLease: () => Promise<{
136
- readonly released: boolean;
206
+ cancelAllQuotes: () => Promise<{
207
+ readonly cancelled: number;
208
+ readonly pending: number;
137
209
  }>;
138
- keepQuoteLease: (leaseMs: number, onError?: (error: unknown) => void) => () => void;
139
210
  confirm: (acceptance: MakerAcceptance, decision?: Decision) => Promise<Acceptance>;
140
- onAcceptance: (handler: (acceptance: MakerAcceptance) => Decision | Promise<Decision>, onError?: (error: unknown, acceptance?: MakerAcceptance) => void) => () => void;
211
+ onAcceptance: (handler: LastLook, onError?: (error: unknown, acceptance?: MakerAcceptance) => void) => () => void;
141
212
  onRfq: (handler: (rfq: OpenedRfq) => unknown, onError?: (error: unknown) => void) => () => void;
142
213
  controller: () => Promise<{
143
214
  approveUsdc: (amount: string | bigint) => TransactionCall;
@@ -157,7 +228,16 @@ export declare function createMaker(options: MakerOptions): {
157
228
  readonly idempotencyKey: string;
158
229
  readonly submitted?: SelfFundedAccepted;
159
230
  }>;
160
- close: () => void;
231
+ /**
232
+ * Stop quoting: cancel all open quotes and close the stream. Await it
233
+ * before exiting. It never rejects: it resolves to `cancelAllQuotes()`'s
234
+ * result, or undefined if that failed, and then a missed confirm
235
+ * withdraws what is left.
236
+ */
237
+ close: () => Promise<Awaited<ReturnType<() => Promise<{
238
+ readonly cancelled: number;
239
+ readonly pending: number;
240
+ }>>> | undefined>;
161
241
  };
162
242
  export type Maker = ReturnType<typeof createMaker>;
163
243
  /** `GET /v1/me/maker`'s `ownership`: the account's maker as the venue has indexed it. */