@hanamesh/api-contracts 0.22.10 → 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,7 +16,7 @@ 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.
|
|
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
|
|
@@ -24,3 +24,5 @@ remain unchanged.
|
|
|
24
24
|
|
|
25
25
|
The account-free `reader.previewSell({hanaId,amount})` declaration exposes canonical
|
|
26
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": "
|
|
10
|
-
"providerVersion": "0.39.
|
|
11
|
-
"providerDeclarationsSHA256": "
|
|
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",
|
|
@@ -50,7 +50,7 @@ export interface QuoteV2BuyQuote extends QuoteV2Fact{hanaId:Hex;bond:Address;quo
|
|
|
50
50
|
/** Public reference only; no account or personal sell-back quota. */
|
|
51
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
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>;readBond(input:{hanaId:Hex;account:Address}):Promise<QuoteV2BondFact>;readMigrationEvents(input:{hanaId:Hex}):Promise<QuoteV2Fact&{hanaId:Hex;bond:Address;events:readonly QuoteV2MigrationEvent[]}>}
|
|
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[]}>}
|
|
54
54
|
/** One canonical Launcher ReserveWithdrawn event; amounts are decimal strings. */
|
|
55
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}
|
|
56
56
|
/** Same-block reserveState counters plus one page of the selected bucket; every page of a cursor chain has the same asOf block. */
|
|
@@ -94,7 +94,7 @@ export interface QuoteV2MarketHistoryPage extends QuoteV2MarketFact{readonly sch
|
|
|
94
94
|
readonly phaseBoundary:{readonly migratedAt:string;readonly event:QuoteV2CanonicalEvent;readonly tailState:QuoteV2HistoryState;readonly initialPoolState:QuoteV2HistoryState;readonly initialPoolSync:QuoteV2CanonicalEvent;readonly initialPoolMint:QuoteV2CanonicalEvent}|null}
|
|
95
95
|
/** Registry market publicFailure: QuoteV2Error only; generic message; null for any other error. */
|
|
96
96
|
export declare function publicQuoteV2ReadError(error:unknown):{readonly statusCode:400|404|503;readonly code:string;readonly message:string;readonly need:{readonly action:string}}|null;
|
|
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}
|
|
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>;
|
|
98
98
|
|
|
99
99
|
/** Fixed20% gas margin from Uniswap/interface v4.0.0 calculateGasMargin. */
|
|
100
100
|
export declare function calculateQuoteV2GasMargin(estimate:bigint):bigint;
|
|
@@ -143,3 +143,12 @@ export interface QuoteV2MarketBalances extends QuoteV2MarketFact {readonly accou
|
|
|
143
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}[]}
|
|
144
144
|
/** A single explicit log delta. Indexer owns persistence, pagination and reorg rollback. */
|
|
145
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;
|