@hanamesh/api-contracts 0.22.5 → 0.22.8

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
@@ -15,3 +15,9 @@ Votes use ERC-6372 timestamps (`CLOCK_MODE() == "mode=timestamp"`). Holders must
15
15
  explicitly delegate (including to themselves) before their balance counts as voting
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
+
19
+ API 0.22.8 mirrors the Chain 0.39.9 reader declarations, including anchored
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
+ Balances are raw decimal strings for every requested token/account, including zero;
22
+ this package supplies declarations only. ABI revision 2.3.0 and all contract artifacts
23
+ remain unchanged.
@@ -6,9 +6,9 @@
6
6
  "manifestSHA256": "bf32a54f50ef95853d2ac423dc107fcdbc5d6e5baca8f1d4d1c0640175768b72",
7
7
  "evidence": "SOURCE_BUILD",
8
8
  "providerRepository": "yzsnstotz/hanamesh-server-chain",
9
- "providerCommit": "160756b5324d3fe59d5a65837f426fd9fcdfca6b",
10
- "providerVersion": "0.39.6",
11
- "providerDeclarationsSHA256": "b6adb917f1644c85df7514ea516f29301fae1306d2b94dd4c21a0e16dadbcda1",
9
+ "providerCommit": "64fc58f80699a5873b67be6fb749e8663f4564e1",
10
+ "providerVersion": "0.39.9",
11
+ "providerDeclarationsSHA256": "e4524e049b7f331bc11da727c6f625224c5e83f3088a7bab6732db89d71a5ff8",
12
12
  "gasHandling": {
13
13
  "project": "Uniswap/interface",
14
14
  "tag": "v4.0.0",
@@ -48,7 +48,7 @@ export interface QuoteV2BondFact extends QuoteV2Fact{hanaId:Hex;token:Address;bo
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
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>;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[]}>}
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[]}>}
52
52
  /** One canonical Launcher ReserveWithdrawn event; amounts are decimal strings. */
53
53
  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
54
  /** Same-block reserveState counters plus one page of the selected bucket; every page of a cursor chain has the same asOf block. */
@@ -92,7 +92,7 @@ export interface QuoteV2MarketHistoryPage extends QuoteV2MarketFact{readonly sch
92
92
  readonly phaseBoundary:{readonly migratedAt:string;readonly event:QuoteV2CanonicalEvent;readonly tailState:QuoteV2HistoryState;readonly initialPoolState:QuoteV2HistoryState;readonly initialPoolSync:QuoteV2CanonicalEvent;readonly initialPoolMint:QuoteV2CanonicalEvent}|null}
93
93
  /** Registry market publicFailure: QuoteV2Error only; generic message; null for any other error. */
94
94
  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'>;confirmations:number;fromBlock:bigint;mode:'test-only'|'production'}):Promise<QuoteV2Reader>;
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>;
96
96
 
97
97
  /** Fixed20% gas margin from Uniswap/interface v4.0.0 calculateGasMargin. */
98
98
  export declare function calculateQuoteV2GasMargin(estimate:bigint):bigint;
@@ -133,3 +133,11 @@ export interface QuoteV2ReleasePorts {
133
133
  readonly releaseStartFacts:{readonly protocol:'custody-release-start-v1';readonly deploymentProtocol:'release-quote-v2';readonly evidence:'FIXTURE'|'TRUSTED';readReleaseStart(input:{hanaId:string;campaignId:string;asOf:string}):Promise<QuoteV2CustodyStartFact>};
134
134
  }
135
135
  export declare function createQuoteV2ReleasePorts(options:{reader:QuoteV2Reader;hanaKey:(hanaId:string)=>Hex;now?:()=>Date}):QuoteV2ReleasePorts;
136
+
137
+ /** Exact ERC20 balances over the supplied Issued keys, read by multicall at one explicit anchor. */
138
+ export interface QuoteV2MarketBalances extends QuoteV2MarketFact {readonly account:Address;readonly records:readonly {readonly hanaKey:Hex;readonly token:Address;readonly balance:string}[]}
139
+
140
+ /** Bounded deployed Multicall3 stages over canonical issuances and Bond views at one fixed block. */
141
+ 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
+ /** A single explicit log delta. Indexer owns persistence, pagination and reorg rollback. */
143
+ 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})[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hanamesh/api-contracts",
3
- "version": "0.22.5",
3
+ "version": "0.22.8",
4
4
  "description": "Consumed quote-v2 provider declarations and exact current contract artifacts.",
5
5
  "type": "module",
6
6
  "license": "MIT",