@hanamesh/api-contracts 0.22.0 → 0.22.2
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.
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
"manifestSHA256": "918790fd46272d591b45465780dc4747f5d16c5f2b5250f3db268c5e7e006820",
|
|
7
7
|
"evidence": "SOURCE_BUILD",
|
|
8
8
|
"providerRepository": "yzsnstotz/hanamesh-server-chain",
|
|
9
|
-
"providerCommit": "
|
|
10
|
-
"providerVersion": "0.
|
|
11
|
-
"providerDeclarationsSHA256": "
|
|
9
|
+
"providerCommit": "a862a558e5eedb725d480735f31244aa6abfa164",
|
|
10
|
+
"providerVersion": "0.39.2",
|
|
11
|
+
"providerDeclarationsSHA256": "8f3aa68f135f511cb09cf9de767add686155133433615b290069293db09d0dce",
|
|
12
12
|
"gasHandling": {
|
|
13
13
|
"project": "Uniswap/interface",
|
|
14
14
|
"tag": "v4.0.0",
|
|
@@ -42,11 +42,21 @@ export type QuoteV2MigrationState='open'|'pending'|'completed';
|
|
|
42
42
|
export declare function quoteV2MigrationState(status:Pick<QuoteV2MigrationStatus,'closed'|'completed'>):QuoteV2MigrationState;
|
|
43
43
|
export interface QuoteV2Fact{protocol:'release-quote-v2';chainId:number;evidence:'FIXTURE'|'READ_ONLY_RPC';blockNumber:string;blockHash:Hex;blockTimestamp:string;sourceCommit:string;confirmations:number;requiredConfirmations:number}
|
|
44
44
|
export interface QuoteV2Issuance extends QuoteV2Fact{hanaId:Hex;token:Address;bond:Address;pool:Address;payer:Address;hanaTreasury:Address;requestId:Hex;authorizationHash:Hex;quote:Address;virtualQuote:string;launchFeeWei:string;pointsBps:string;pointsAmount:string;earlyReleaseAllowed:boolean;treasuryReserve:string;creatorReserve:string}
|
|
45
|
+
/** readIssuance: phase is 'bond' until the Bond's migrated flag; migratedAt is the Bond view (Unix seconds) or null before migration. */
|
|
46
|
+
export interface QuoteV2IssuanceFact extends QuoteV2Issuance{phase:'bond'|'migrated';migratedAt:string|null}
|
|
45
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}
|
|
46
48
|
export interface QuoteV2MigrationEvent{eventName:'BondClosed'|'MigrationDeferred'|'Migrated';args:Readonly<Record<string,string|number|boolean>>;blockNumber:string;blockHash:Hex;transactionHash:Hex;logIndex:number}
|
|
47
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}
|
|
48
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}
|
|
49
|
-
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<
|
|
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>;readBond(input:{hanaId:Hex;account:Address}):Promise<QuoteV2BondFact>;readMigrationEvents(input:{hanaId:Hex}):Promise<QuoteV2Fact&{hanaId:Hex;bond:Address;events:readonly QuoteV2MigrationEvent[]}>}
|
|
52
|
+
/** One canonical Launcher ReserveWithdrawn event; amounts are decimal strings. */
|
|
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
|
+
/** Same-block reserveState counters plus one page of the selected bucket; every page of a cursor chain has the same asOf block. */
|
|
55
|
+
export interface QuoteV2ReserveHistoryPage extends QuoteV2Fact{readonly mode:'test-only'|'production';readonly hanaKey:Hex;readonly token:Address;readonly platformAuthority:Address;readonly treasuryInitial:string;readonly treasuryWithdrawn:string;readonly treasuryRemaining:string;readonly creatorInitial:string;readonly creatorWithdrawn:string;readonly creatorRemaining:string;readonly bucket:0|1;readonly totalRecords:number;readonly records:readonly QuoteV2ReserveRecord[];readonly nextCursor:string|null}
|
|
56
|
+
/** Launcher reserveProposalUsed at the confirmed block. */
|
|
57
|
+
export interface QuoteV2ReserveProposalFact extends QuoteV2Fact{readonly proposalId:Hex;readonly used:boolean}
|
|
58
|
+
/** Snapshot block plus the original canonical Issued event; issuedAt equals issuance.blockTimestamp. */
|
|
59
|
+
export interface QuoteV2IssuedAtFact extends QuoteV2Fact{readonly mode:'test-only'|'production';readonly hanaKey:Hex;readonly token:Address;readonly bond:Address;readonly requestId:Hex;readonly authorizationHash:Hex;readonly issuedAt:string;readonly issuance:{readonly transactionHash:Hex;readonly transactionIndex:number;readonly logIndex:number;readonly blockNumber:string;readonly blockHash:Hex;readonly blockTimestamp:string}}
|
|
50
60
|
export declare function createQuoteV2Reader(options:{deployment:QuoteV2Deployment;publicClient:Pick<PublicClient,'getChainId'|'getBlock'|'getCode'|'readContract'|'getLogs'>;confirmations:number;fromBlock:bigint;mode:'test-only'|'production'}):Promise<QuoteV2Reader>;
|
|
51
61
|
|
|
52
62
|
/** Fixed20% gas margin from Uniswap/interface v4.0.0 calculateGasMargin. */
|
|
@@ -54,6 +64,8 @@ export declare function calculateQuoteV2GasMargin(estimate:bigint):bigint;
|
|
|
54
64
|
|
|
55
65
|
/** Chain-owned issuance range and frozen inventory formula; used by custody. */
|
|
56
66
|
export declare function isValidPointsBps(value:unknown):boolean;
|
|
67
|
+
/** Chain-owned launch fee rule (Launcher uint256: 0 allowed, no other cap); bigint or canonical decimal wei string; used by custody. */
|
|
68
|
+
export declare function isLaunchFeeWei(value:unknown):boolean;
|
|
57
69
|
export declare function quoteV2SupplySplit(pointsBps:number|bigint):Readonly<{pointsAmount:bigint;treasuryReserve:bigint;creatorReserve:bigint;bondAmount:bigint}>;
|
|
58
70
|
|
|
59
71
|
export interface QuoteV2CampaignParams {campaignId:Hex;token:Address;bond:Address;rightsRoot:Hex;budget:bigint}
|