@hanamesh/api-contracts 0.22.8 → 0.22.11

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/README.md CHANGED
@@ -16,8 +16,13 @@ explicitly delegate (including to themselves) before their balance counts as vot
16
16
  power. No application automatically delegates. Permit uses the token name, version
17
17
  `1`, chain ID and token address as its EIP-712 domain, with the OZ shared nonce.
18
18
 
19
- API 0.22.8 mirrors the Chain 0.39.9 reader declarations, including anchored
19
+ API 0.22.11 mirrors the Chain 0.39.12 reader declarations, including anchored
20
20
  `readMarketBalances`, `readMarketPhases`, `readMarketIssuedWindow`, and the native multicall capability of its explicit public client. Optional `multicall3Address` selects the deployed Multicall3 transport; all bounded chunks share one explicit anchor.
21
21
  Balances are raw decimal strings for every requested token/account, including zero;
22
22
  this package supplies declarations only. ABI revision 2.3.0 and all contract artifacts
23
23
  remain unchanged.
24
+
25
+ The account-free `reader.previewSell({hanaId,amount})` declaration exposes canonical
26
+ principal, both fees and receive. Personal account/sellable fields are exclusive to quoteSell.
27
+
28
+ The candidate additionally mirrors same-anchor `readMarketHistoryBatch`, `withMarketHistoryBatch` and the explicit `createQuoteV2ReadRpcBatch` factory byte-for-byte from the provider commit and SHA256 recorded in `contracts/chain/quote-v2/provenance.json`. It keeps the public sell preview. Provider review, main/tag and publication remain pending.
@@ -6,9 +6,9 @@
6
6
  "manifestSHA256": "bf32a54f50ef95853d2ac423dc107fcdbc5d6e5baca8f1d4d1c0640175768b72",
7
7
  "evidence": "SOURCE_BUILD",
8
8
  "providerRepository": "yzsnstotz/hanamesh-server-chain",
9
- "providerCommit": "64fc58f80699a5873b67be6fb749e8663f4564e1",
10
- "providerVersion": "0.39.9",
11
- "providerDeclarationsSHA256": "e4524e049b7f331bc11da727c6f625224c5e83f3088a7bab6732db89d71a5ff8",
9
+ "providerCommit": "eb5efca4e23e92ad6dc40d5d36307d22787e2065",
10
+ "providerVersion": "0.39.12",
11
+ "providerDeclarationsSHA256": "f4c7090207b60bbd243d0c57a64235fe03800225dfe1033fc1c95feba0aba1e0",
12
12
  "gasHandling": {
13
13
  "project": "Uniswap/interface",
14
14
  "tag": "v4.0.0",
@@ -47,8 +47,10 @@ export interface QuoteV2IssuanceFact extends QuoteV2Issuance{phase:'bond'|'migra
47
47
  export interface QuoteV2BondFact extends QuoteV2Fact{hanaId:Hex;token:Address;bond:Address;pool:Address;quote:Address;virtualQuote:string;account:Address;active:boolean;sold:string;netReserve:string;sellQuota:string;sellable:string;releaseStartedAt:string;migrationStatus:QuoteV2MigrationStatus;migrationState:QuoteV2MigrationState;migrationHana:string;migrationQuote:string;migrationPoolHana:string;migrationPoolQuote:string}
48
48
  export interface QuoteV2MigrationEvent{eventName:'BondClosed'|'MigrationDeferred'|'Migrated';args:Readonly<Record<string,string|number|boolean>>;blockNumber:string;blockHash:Hex;transactionHash:Hex;logIndex:number}
49
49
  export interface QuoteV2BuyQuote extends QuoteV2Fact{hanaId:Hex;bond:Address;quote:Address;kind:'exact'|'budget';hana:string;principal:string;hanaFee:string;meshFee:string;total:string;nativePaymentAvailable:boolean}
50
- export interface QuoteV2SellQuote extends QuoteV2Fact{hanaId:Hex;bond:Address;quote:Address;account:Address;amount:string;principal:string;hanaFee:string;meshFee:string;receive:string;sellable:string;nativeProceeds:boolean}
51
- export interface QuoteV2Reader{readonly deployment:QuoteV2Deployment;readonly mode:'test-only'|'production';readonly evidence:'FIXTURE'|'READ_ONLY_RPC';readReleaseState(input:QuoteV2ReleaseStateQuery):Promise<QuoteV2ReleaseStateFact>;readReleaseStart(input:{hanaId:Hex}):Promise<QuoteV2ReleaseStartFact>;quoteBuy(input:{hanaId:Hex;kind:'exact'|'budget';amount:bigint}):Promise<QuoteV2BuyQuote>;quoteSell(input:{hanaId:Hex;amount:bigint;account:Address}):Promise<QuoteV2SellQuote>;verifyDeployment():Promise<QuoteV2Fact&{deployment:QuoteV2Deployment}>;readQuoteConfig(input:{quote:Address}):Promise<QuoteV2Fact&{quote:Address;virtualQuote:string;enabled:boolean}>;readIssuance(input:{hanaId:Hex}):Promise<QuoteV2IssuanceFact>;readReserveHistory(input:{hanaKey:Hex;bucket:0|1;limit:number;scanBlockSpan:number;cursor?:string}):Promise<QuoteV2ReserveHistoryPage>;readReserveProposal(input:{proposalId:Hex}):Promise<QuoteV2ReserveProposalFact>;readIssuedAt(input:{hanaKey:Hex;scanBlockSpan:number}):Promise<QuoteV2IssuedAtFact>;listQuotes(input:{scanBlockSpan:number}):Promise<QuoteV2QuoteList>;readMarketPhases(input:{hanaKeys:readonly Hex[];anchor?:QuoteV2MarketAnchor}):Promise<QuoteV2MarketPhases>;readMarketIssuedWindow(input:{fromBlock:string;scanBlockSpan:number;anchor:QuoteV2MarketAnchor}):Promise<QuoteV2IssuedWindow>;readMarketBalances(input:{hanaKeys:readonly Hex[];account:Address;anchor:QuoteV2MarketAnchor}):Promise<QuoteV2MarketBalances>;readMarketFacts(input:{hanaKey:Hex;anchor?:QuoteV2MarketAnchor}):Promise<QuoteV2MarketFacts>;listIssuedHanaKeys(input:{limit:number;scanBlockSpan:number;cursor?:string;anchor?:QuoteV2MarketAnchor}):Promise<QuoteV2IssuedHanaKeysPage>;readHoldersAllocation(input:QuoteV2MarketPageQuery):Promise<QuoteV2HoldersPage>;readTimeline(input:QuoteV2MarketPageQuery):Promise<QuoteV2TimelinePage>;readMarketHistory(input:QuoteV2MarketHistoryQuery):Promise<QuoteV2MarketHistoryPage>;readBond(input:{hanaId:Hex;account:Address}):Promise<QuoteV2BondFact>;readMigrationEvents(input:{hanaId:Hex}):Promise<QuoteV2Fact&{hanaId:Hex;bond:Address;events:readonly QuoteV2MigrationEvent[]}>}
50
+ /** Public reference only; no account or personal sell-back quota. */
51
+ export interface QuoteV2SellPreview extends QuoteV2Fact{hanaId:Hex;bond:Address;quote:Address;amount:string;principal:string;hanaFee:string;meshFee:string;receive:string;nativeProceeds:boolean}
52
+ export interface QuoteV2SellQuote extends QuoteV2SellPreview{account:Address;sellable:string}
53
+ export interface QuoteV2Reader{readonly deployment:QuoteV2Deployment;readonly mode:'test-only'|'production';readonly evidence:'FIXTURE'|'READ_ONLY_RPC';readReleaseState(input:QuoteV2ReleaseStateQuery):Promise<QuoteV2ReleaseStateFact>;readReleaseStart(input:{hanaId:Hex}):Promise<QuoteV2ReleaseStartFact>;quoteBuy(input:{hanaId:Hex;kind:'exact'|'budget';amount:bigint}):Promise<QuoteV2BuyQuote>;previewSell(input:{hanaId:Hex;amount:bigint}):Promise<QuoteV2SellPreview>;quoteSell(input:{hanaId:Hex;amount:bigint;account:Address}):Promise<QuoteV2SellQuote>;verifyDeployment():Promise<QuoteV2Fact&{deployment:QuoteV2Deployment}>;readQuoteConfig(input:{quote:Address}):Promise<QuoteV2Fact&{quote:Address;virtualQuote:string;enabled:boolean}>;readIssuance(input:{hanaId:Hex}):Promise<QuoteV2IssuanceFact>;readReserveHistory(input:{hanaKey:Hex;bucket:0|1;limit:number;scanBlockSpan:number;cursor?:string}):Promise<QuoteV2ReserveHistoryPage>;readReserveProposal(input:{proposalId:Hex}):Promise<QuoteV2ReserveProposalFact>;readIssuedAt(input:{hanaKey:Hex;scanBlockSpan:number}):Promise<QuoteV2IssuedAtFact>;listQuotes(input:{scanBlockSpan:number}):Promise<QuoteV2QuoteList>;readMarketPhases(input:{hanaKeys:readonly Hex[];anchor?:QuoteV2MarketAnchor}):Promise<QuoteV2MarketPhases>;readMarketIssuedWindow(input:{fromBlock:string;scanBlockSpan:number;anchor:QuoteV2MarketAnchor}):Promise<QuoteV2IssuedWindow>;readMarketBalances(input:{hanaKeys:readonly Hex[];account:Address;anchor:QuoteV2MarketAnchor}):Promise<QuoteV2MarketBalances>;readMarketFacts(input:{hanaKey:Hex;anchor?:QuoteV2MarketAnchor}):Promise<QuoteV2MarketFacts>;listIssuedHanaKeys(input:{limit:number;scanBlockSpan:number;cursor?:string;anchor?:QuoteV2MarketAnchor}):Promise<QuoteV2IssuedHanaKeysPage>;readHoldersAllocation(input:QuoteV2MarketPageQuery):Promise<QuoteV2HoldersPage>;readTimeline(input:QuoteV2MarketPageQuery):Promise<QuoteV2TimelinePage>;readMarketHistory(input:QuoteV2MarketHistoryQuery):Promise<QuoteV2MarketHistoryPage>;readMarketHistoryBatch(input:QuoteV2MarketHistoryBatchQuery):Promise<QuoteV2MarketHistoryBatchPage>;withMarketHistoryBatch<T>(input:{readonly anchor:QuoteV2MarketAnchor;readonly scanBlockSpan:number},consume:(read:(queries:QuoteV2MarketHistoryBatchQuery['queries'])=>Promise<QuoteV2MarketHistoryBatchPage>)=>Promise<T>):Promise<T>;readBond(input:{hanaId:Hex;account:Address}):Promise<QuoteV2BondFact>;readMigrationEvents(input:{hanaId:Hex}):Promise<QuoteV2Fact&{hanaId:Hex;bond:Address;events:readonly QuoteV2MigrationEvent[]}>}
52
54
  /** One canonical Launcher ReserveWithdrawn event; amounts are decimal strings. */
53
55
  export interface QuoteV2ReserveRecord{readonly proposalId:Hex;readonly expectedRemaining:string;readonly bucket:0|1;readonly to:Address;readonly token:Address;readonly amount:string;readonly remaining:string;readonly transactionHash:Hex;readonly transactionIndex:number;readonly logIndex:number;readonly blockNumber:string;readonly blockHash:Hex;readonly blockTimestamp:string}
54
56
  /** Same-block reserveState counters plus one page of the selected bucket; every page of a cursor chain has the same asOf block. */
@@ -92,7 +94,7 @@ export interface QuoteV2MarketHistoryPage extends QuoteV2MarketFact{readonly sch
92
94
  readonly phaseBoundary:{readonly migratedAt:string;readonly event:QuoteV2CanonicalEvent;readonly tailState:QuoteV2HistoryState;readonly initialPoolState:QuoteV2HistoryState;readonly initialPoolSync:QuoteV2CanonicalEvent;readonly initialPoolMint:QuoteV2CanonicalEvent}|null}
93
95
  /** Registry market publicFailure: QuoteV2Error only; generic message; null for any other error. */
94
96
  export declare function publicQuoteV2ReadError(error:unknown):{readonly statusCode:400|404|503;readonly code:string;readonly message:string;readonly need:{readonly action:string}}|null;
95
- export declare function createQuoteV2Reader(options:{deployment:QuoteV2Deployment;publicClient:Pick<PublicClient,'getChainId'|'getBlock'|'getCode'|'readContract'|'getLogs'|'getTransaction'|'multicall'>;confirmations:number;fromBlock:bigint;mode:'test-only'|'production';multicall3Address?:`0x${string}`}):Promise<QuoteV2Reader>;
97
+ export declare function createQuoteV2Reader(options:{deployment:QuoteV2Deployment;publicClient:Pick<PublicClient,'getChainId'|'getBlock'|'getCode'|'readContract'|'getLogs'|'getTransaction'|'multicall'>;confirmations:number;fromBlock:bigint;mode:'test-only'|'production';multicall3Address?:`0x${string}`;readRpcBatch?:QuoteV2ReadRpcBatch}):Promise<QuoteV2Reader>;
96
98
 
97
99
  /** Fixed20% gas margin from Uniswap/interface v4.0.0 calculateGasMargin. */
98
100
  export declare function calculateQuoteV2GasMargin(estimate:bigint):bigint;
@@ -141,3 +143,12 @@ export interface QuoteV2MarketBalances extends QuoteV2MarketFact {readonly accou
141
143
  export interface QuoteV2MarketPhases extends QuoteV2MarketFact {readonly launcher:Address;readonly fromBlock:string;readonly records:readonly {readonly hanaKey:Hex;readonly token:Address;readonly bond:Address;readonly phase:'bond'|'migrated'|'inactive';readonly sold:string;readonly sales:string}[]}
142
144
  /** A single explicit log delta. Indexer owns persistence, pagination and reorg rollback. */
143
145
  export interface QuoteV2IssuedWindow extends QuoteV2MarketFact {readonly schema:'quote-v2-issued-window-v1';readonly launcher:Address;readonly fromBlock:string;readonly scanFromBlock:string;readonly scanToBlock:string;readonly throughBlockHash:Hex;readonly records:readonly (Omit<QuoteV2CanonicalEvent,'event'|'address'|'args'>&{readonly hanaKey:Hex})[]}
146
+
147
+ /** Same canonical event history, coalesced within a single explicit block anchor. Member failure rejects the complete batch. */
148
+ export interface QuoteV2MarketHistoryBatchQuery {readonly anchor:QuoteV2MarketAnchor;readonly queries:readonly Omit<QuoteV2MarketHistoryQuery,'anchor'>[]}
149
+ export interface QuoteV2MarketHistoryBatchPage extends QuoteV2MarketFact {readonly schema:'hanamesh-chain-market-history-batch-v1';readonly records:readonly QuoteV2MarketHistoryPage[]}
150
+
151
+ export interface QuoteV2ReadRpcQuery {readonly method:'eth_getCode'|'eth_getBlockByNumber'|'eth_getTransactionByHash';readonly params:readonly unknown[]}
152
+ export type QuoteV2ReadRpcBatch=(queries:readonly QuoteV2ReadRpcQuery[])=>Promise<readonly unknown[]>;
153
+ /** Compose the existing explicit viem HTTP client; no provider URL or credential inference. */
154
+ export declare function createQuoteV2ReadRpcBatch(rpc:Pick<ReturnType<typeof import('viem/utils').getHttpRpcClient>,'request'>):QuoteV2ReadRpcBatch;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hanamesh/api-contracts",
3
- "version": "0.22.8",
3
+ "version": "0.22.11",
4
4
  "description": "Consumed quote-v2 provider declarations and exact current contract artifacts.",
5
5
  "type": "module",
6
6
  "license": "MIT",