@monolythium/core-sdk 0.1.0 → 0.2.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.
- package/README.md +115 -24
- package/dist/crypto/index.cjs +62 -12
- package/dist/crypto/index.cjs.map +1 -1
- package/dist/crypto/index.d.cts +4 -115
- package/dist/crypto/index.d.ts +4 -115
- package/dist/crypto/index.js +61 -13
- package/dist/crypto/index.js.map +1 -1
- package/dist/ethers/index.cjs +2116 -0
- package/dist/ethers/index.cjs.map +1 -0
- package/dist/ethers/index.d.cts +300 -0
- package/dist/ethers/index.d.ts +300 -0
- package/dist/ethers/index.js +2107 -0
- package/dist/ethers/index.js.map +1 -0
- package/dist/index.cjs +7435 -1555
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1555 -346
- package/dist/index.d.ts +1555 -346
- package/dist/index.js +7193 -1548
- package/dist/index.js.map +1 -1
- package/dist/native-events-BEkkGoak.d.cts +3708 -0
- package/dist/native-events-BEkkGoak.d.ts +3708 -0
- package/dist/network-BK2u9br2.d.cts +31 -0
- package/dist/network-BK2u9br2.d.ts +31 -0
- package/dist/submission-BrsftNSl.d.cts +131 -0
- package/dist/submission-CelGfDRQ.d.ts +131 -0
- package/package.json +8 -2
- package/dist/client-CpnpVkrR.d.cts +0 -2237
- package/dist/client-CpnpVkrR.d.ts +0 -2237
package/dist/index.d.cts
CHANGED
|
@@ -1,6 +1,580 @@
|
|
|
1
|
-
import { O as OperatorCapabilitiesResponse, R as RuntimeBuildProvenance, a as RuntimeUpgradeStatus, S as SearchResponse, C as ChainStatsResponse, B as BlockSelector,
|
|
2
|
-
export {
|
|
3
|
-
import {
|
|
1
|
+
import { N as NativeReceiptFee, O as OperatorCapabilitiesResponse, R as RuntimeBuildProvenance, a as RuntimeUpgradeStatus, S as SearchResponse, C as ChainStatsResponse, B as BlockSelector, A as ApiStreamsIndexResponse, T as TxFeedResponse, b as NativeReceiptResponse, c as NativeDecodedEvent, d as NativeEventFilter, e as TypedNativeReceiptEvent, f as NativeEventsFilter, g as NativeEventsResponse, h as NativeAgentStateFilter, i as NativeAgentStateResponse, j as NativeMarketStateFilter, k as NativeMarketStateResponse, l as NativeMarketOrderBookDeltasRequest, m as NativeMarketOrderBookDeltasResponse, n as AddressProfileResponse, o as AddressFlowResponse, P as PendingRewardsResponse, p as RedemptionQueueResponse, M as MrcMetadataResponse, q as MrcAccountResponse, r as MrcHoldersResponse, s as BridgeRoutesRequest, t as BridgeRoutesResponse, u as ServiceProbeResponse, v as ClobMarketsResponse, w as ClobMarketResponse, x as ClobTradesResponse, y as ClobOhlcResponse, z as ClobOrderBookResponse, D as RpcClient } from './native-events-BEkkGoak.cjs';
|
|
2
|
+
export { E as API_STREAM_TOPICS, F as AccountPolicy, G as AccountProofResponse, H as Address, I as AddressActivityArchiveRedirect, J as AddressActivityEntry, K as AddressActivityKind, L as AddressActivityKindResponse, Q as AddressActivityKindRetention, U as AddressLabelRecord, V as AgentReputationCategoryScope, W as AgentReputationRecord, X as AgentReputationResponse, Y as ApiStreamTopic, Z as ApiStreamTopicMetadata, _ as ApiStreamTopicRetention, $ as AssetPolicy, a0 as AttestationWindow, a1 as BRIDGE_QUOTE_API_BLOCKED_REASON, a2 as BRIDGE_REVERT_TAGS, a3 as BRIDGE_SELECTORS, a4 as BRIDGE_SUBMIT_API_BLOCKED_REASON, a5 as BlockHeader, a6 as BlockTag, a7 as BlsCertificateResponse, a8 as BridgeAdminControl, a9 as BridgeBytesInput, aa as BridgeCircuitBreakerState, ab as BridgePrecompileError, ac as BridgeQuoteSubmitReadiness, ad as BridgeRiskTier, ae as BridgeRouteAssessment, af as BridgeRouteCandidate, ag as BridgeRouteCatalogue, ah as BridgeRouteCatalogueError, ai as BridgeRouteCatalogueJsonOptions, aj as BridgeRouteCataloguePayload, ak as BridgeRouteCatalogueRoute, al as BridgeRouteCatalogueValidation, am as BridgeRouteDisclosure, an as BridgeRouteSelection, ao as BridgeRoutesSource, ap as BridgeTransferIntent, aq as BridgeTransferRequest, ar as BridgeVerifierDisclosure, as as CHAIN_REGISTRY, at as CHAIN_REGISTRY_RAW_BASE, au as CallRequest, av as CapabilitiesResponse, aw as CapabilityDescriptor, ax as ChainInfo, ay as ChainRegistry, az as CheckpointRecord, aA as ClobMarketRecord, aB as ClobMarketSummary, aC as ClobTrade, aD as ClusterDelegatorsResponse, aE as ClusterDirectoryEntryResponse, aF as ClusterDirectoryPageResponse, aG as ClusterEntityResponse, aH as ClusterMemberResponse, aI as ClusterResignationRow, aJ as ClusterResignationsResponse, aK as ClusterStatusResponse, aL as DagParent, aM as DagParentsResponse, aN as DagSyncStatus, aO as DecodeTxExtension, aP as DecodeTxLog, aQ as DecodeTxPqAttestation, aR as DecodeTxResponse, aS as DelegationCapResponse, aT as DelegationHistoryRecord, aU as DelegationRow, aV as DelegationsResponse, aW as DutyAbsence, aX as EncryptionKeyResponse, aY as EntityRatchetResponse, aZ as ExplorerEndpoint, a_ as FeeHistoryResponse, a$ as GapRange, b0 as GapRecord, b1 as GapRecordsResponse, b2 as Hash, b3 as Hex, b4 as IndexerStatus, b5 as JailStatusWindow, b6 as KeyRotationWindow, b7 as LythUpgradePlanStatus, b8 as LythUpgradeStatusResponse, b9 as MAX_NATIVE_RECEIPT_EVENTS, ba as MempoolSnapshot, bb as MeshDecodedTx, bc as MeshSignedTxResponse, bd as MeshTxIntent, be as MeshUnsignedTxResponse, bf as MetricsRangeResponse, bg as MetricsRangeSample, bh as MetricsRangeSeries, bi as MetricsRangeStatus, bj as MrcAccountRecord, bk as MrcMetadataRecord, bl as MrcPolicyRecord, bm as MrcPolicySpendRecord, bn as NATIVE_MARKET_EVENT_FAMILY, bo as NATIVE_MARKET_ORDER_BOOK_STREAM_TOPIC, bp as NO_EVM_ARCHIVE_PROOF_SCHEMA, bq as NO_EVM_ARCHIVE_SIGNATURE_SCHEME, br as NO_EVM_FINALITY_EVIDENCE_SCHEMA, bs as NO_EVM_FINALITY_EVIDENCE_SOURCE, bt as NO_EVM_RECEIPTS_ROOT_DOMAIN, bu as NO_EVM_RECEIPT_CODEC, bv as NO_EVM_RECEIPT_PROOF_SCHEMA, bw as NO_EVM_RECEIPT_PROOF_TYPE, bx as NO_EVM_RECEIPT_ROOT_ALGORITHM, by as NativeAgentArbiterStateRecord, bz as NativeAgentAttestationStateRecord, bA as NativeAgentAvailabilityStateRecord, bB as NativeAgentConsentStateRecord, bC as NativeAgentEscrowStateRecord, bD as NativeAgentIssuerStateRecord, bE as NativeAgentPolicySpendStateRecord, bF as NativeAgentPolicyStateRecord, bG as NativeAgentReputationReviewStateRecord, bH as NativeAgentServiceStateRecord, bI as NativeAgentStateFilterParamValue, bJ as NativeAgentStateResponseFilters, bK as NativeAgentStateSource, bL as NativeCollectionRoyaltyStateRecord, bM as NativeEventConsumer, bN as NativeEventProjection, bO as NativeEventsResponseFilters, bP as NativeEventsSource, bQ as NativeMarketOrderBookDelta, bR as NativeMarketOrderBookDeltasResponseFilters, bS as NativeMarketOrderBookDeltasSource, bT as NativeMarketOrderBookStreamAction, bU as NativeMarketOrderBookStreamPayload, bV as NativeMarketStateFilterParamValue, bW as NativeMarketStateResponseFilters, bX as NativeMarketStateSource, bY as NativeModuleForwarderDescriptor, bZ as NativeMrcPolicyProjection, b_ as NativeNftListingStateRecord, b$ as NativeReceiptCounters, c0 as NativeReceiptEvent, c1 as NativeReceiptSource, c2 as NativeSpotMarketStateRecord, c3 as NativeSpotOrderStateRecord, c4 as NetworkClientOptions, c5 as NetworkSlug, c6 as NoEvmArchiveCoveringSnapshot, c7 as NoEvmArchiveProof, c8 as NoEvmArchiveSignatureVerification, c9 as NoEvmArchiveSignatureVerificationIssue, ca as NoEvmArchiveSignatureVerificationIssueCode, cb as NoEvmArchiveTrustedSigner, cc as NoEvmBlockBlsFinalityVerification, cd as NoEvmBlsFinalityVerification, ce as NoEvmFinalityBlockReference, cf as NoEvmFinalityCertificate, cg as NoEvmFinalityEvidence, ch as NoEvmReceiptFinalityTrustPolicy, ci as NoEvmReceiptProof, cj as NoEvmReceiptProofError, ck as NoEvmReceiptProofErrorCode, cl as NoEvmReceiptProofVerification, cm as NoEvmReceiptTrustIssue, cn as NoEvmReceiptTrustIssueCode, co as NoEvmReceiptTrustPolicy, cp as NoEvmReceiptTrustVerification, cq as NoEvmReceiptTrustedBlsSigner, cr as OperatorAuthorityResponse, cs as OperatorInfoResponse, ct as OperatorRiskResponse, cu as OperatorSigningActivityResponse, cv as OperatorSigningEntry, cw as OperatorSurfaceCapability, cx as OperatorSurfaceStatus, cy as P2pSeed, cz as PeerSummary, cA as PeerSummaryAggregate, cB as PendingRewardsRow, cC as PendingTxSummary, cD as PrecompileCatalogueResponse, cE as PrecompileDescriptor, cF as Quantity, cG as RankedBridgeRoute, cH as ReceiptProofTrustArchivePolicy, cI as ReceiptProofTrustArchiveSigner, cJ as ReceiptProofTrustFinalityPolicy, cK as ReceiptProofTrustFinalitySigner, cL as ReceiptProofTrustPolicy, cM as RedemptionQueueTicket, cN as RegistryRecord, cO as ReportServiceProbeRequest, cP as ReportServiceProbeResponse, cQ as RichListHolder, cR as RichListResponse, cS as RoundInfo, cT as RpcClientOptions, cU as RpcEndpoint, cV as RuntimeProvenanceResponse, cW as SearchHit, cX as ServiceProbeStatusLabel, cY as SigningEntryStatus, cZ as StorageProofBatch, c_ as SyncStatus, c$ as TESTNET_69420, d0 as TokenBalanceMrcIdentity, d1 as TokenBalanceRecord, d2 as TpmAttestationResponse, d3 as TransactionReceipt, d4 as TransactionView, d5 as TxFeedReceipt, d6 as TxFeedTransaction, d7 as TxStatusFoundResponse, d8 as TxStatusNotFoundResponse, d9 as TxStatusResponse, da as UpcomingDutiesResponse, db as UpcomingDutyMap, dc as UserAddressInput, dd as VertexAtRound, de as VerticesAtRoundResponse, df as assertNativeMarketOrderBookStreamPayload, dg as assessBridgeRoute, dh as bridgeAddressHex, di as bridgeQuoteSubmitReadiness, dj as bridgeRoutesReadiness, dk as bridgeTransferCandidates, dl as buildBridgeRouteCatalogue, dm as computeNoEvmDacFinalityMessage, dn as computeNoEvmLeaderFinalityMessage, dp as computeNoEvmReceiptsRoot, dq as computeNoEvmRoundFinalityMessage, dr as computeNoEvmTargetReceiptHash, ds as consumeNativeEvents, dt as decodeNativeAgentStateResponse, du as decodeNativeMarketOrderBookDeltasResponse, dv as decodeNativeReceiptResponse, dw as decodeNoEvmReceiptTranscript, dx as decodeTxFeedResponse, dy as encodeBlockSelector, dz as encodeLockBridgeConfigCalldata, dA as encodeSetBridgeResumeCooldownCalldata, dB as encodeSetBridgeRouteFinalityCalldata, dC as exportBridgeRouteCatalogueJson, dD as fetchChainInfoLatest, dE as fetchChainRegistryLatest, dF as getChainInfo, dG as getNoEvmReceiptTrustPolicy, dH as getP2pSeeds, dI as getRpcEndpoints, dJ as isBridgeAdminLockedRevert, dK as isBridgeCooldownZeroRevert, dL as isBridgeFinalityZeroRevert, dM as isBridgeResumeCooldownActiveRevert, dN as isNativeDecodedEvent, dO as isNativeMarketOrderBookStreamPayload, dP as nativeAgentStateFilterParams, dQ as nativeEventMatches, dR as nativeEventsFilterParams, dS as nativeEventsFromHistory, dT as nativeEventsFromReceipt, dU as nativeMarketEventFilter, dV as nativeMarketEventsFromHistory, dW as nativeMarketEventsFromReceipt, dX as nativeMarketStateFilterParams, dY as noEvmReceiptTrustPolicyFromChainInfo, dZ as normalizeBridgeRouteCatalogue, d_ as parseBridgeRouteCatalogueJson, d$ as parseChainRegistryToml, e0 as parseNativeDecodedEvent, e1 as parseQuantity, e2 as parseQuantityBig, e3 as rankBridgeRoutes, e4 as selectBridgeTransferRoute, e5 as validateBridgeRouteCatalogue, e6 as verifyNoEvmArchiveProofSignatures, e7 as verifyNoEvmBlockFinalityEvidenceMultisig, e8 as verifyNoEvmBlockFinalityEvidenceThreshold, e9 as verifyNoEvmFinalityEvidenceMultisig, ea as verifyNoEvmFinalityEvidenceThreshold, eb as verifyNoEvmReceiptProof, ec as verifyNoEvmReceiptProofTrust } from './native-events-BEkkGoak.cjs';
|
|
3
|
+
import { N as NativeEvmTxFields, E as EncryptionKey, M as MempoolClass, a as MlDsa65Backend } from './submission-BrsftNSl.cjs';
|
|
4
|
+
export { M as MONOLYTHIUM_TESTNET_CHAIN_ID, a as MONOLYTHIUM_TESTNET_NETWORK_NAME, b as MonolythiumNetworkConfig } from './network-BK2u9br2.cjs';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Aggregate gossip-mesh health bands in `lyth_peerSummary`.
|
|
8
|
+
*/
|
|
9
|
+
type HealthSummary = {
|
|
10
|
+
synced: bigint;
|
|
11
|
+
lagging: bigint;
|
|
12
|
+
stale: bigint;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Ping-RTT histogram bands in `lyth_peerSummary`.
|
|
17
|
+
*/
|
|
18
|
+
type LatencyBands = {
|
|
19
|
+
lt_50ms: bigint;
|
|
20
|
+
lt_200ms: bigint;
|
|
21
|
+
lt_1s: bigint;
|
|
22
|
+
ge_1s: bigint;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Request parameters for `lyth_mrcAccount` and `/api/v1/mrc/accounts/{account}`.
|
|
27
|
+
*/
|
|
28
|
+
type MrcAccountRequest = {
|
|
29
|
+
/**
|
|
30
|
+
* Account address to inspect.
|
|
31
|
+
*/
|
|
32
|
+
account: string;
|
|
33
|
+
/**
|
|
34
|
+
* Optional spend-row limit.
|
|
35
|
+
*/
|
|
36
|
+
spendLimit?: number;
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Request parameters for `lyth_mrcHolders` and `/api/v1/mrc/.../holders`.
|
|
41
|
+
*/
|
|
42
|
+
type MrcHoldersRequest = {
|
|
43
|
+
/**
|
|
44
|
+
* MRC standard, for example `mrc20`, `mrc721`, `mrc1155`, or `mrc4626`.
|
|
45
|
+
*/
|
|
46
|
+
standard: string;
|
|
47
|
+
/**
|
|
48
|
+
* MRC asset id, collection id, or MRC-4626 vault id.
|
|
49
|
+
*/
|
|
50
|
+
assetId: string;
|
|
51
|
+
/**
|
|
52
|
+
* Token id inside the MRC holder namespace; `null`/omitted for MRC-4626 vault scope.
|
|
53
|
+
*/
|
|
54
|
+
tokenId?: string | null;
|
|
55
|
+
/**
|
|
56
|
+
* Optional result limit.
|
|
57
|
+
*/
|
|
58
|
+
limit?: number;
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* ABI value type.
|
|
63
|
+
*/
|
|
64
|
+
type MrvAbiType = {
|
|
65
|
+
"kind": "unit";
|
|
66
|
+
} | {
|
|
67
|
+
"kind": "bool";
|
|
68
|
+
} | {
|
|
69
|
+
"kind": "u8";
|
|
70
|
+
} | {
|
|
71
|
+
"kind": "u32";
|
|
72
|
+
} | {
|
|
73
|
+
"kind": "u64";
|
|
74
|
+
} | {
|
|
75
|
+
"kind": "u128";
|
|
76
|
+
} | {
|
|
77
|
+
"kind": "bytes";
|
|
78
|
+
} | {
|
|
79
|
+
"kind": "fixedBytes";
|
|
80
|
+
/**
|
|
81
|
+
* Fixed byte length.
|
|
82
|
+
*/
|
|
83
|
+
len: number;
|
|
84
|
+
} | {
|
|
85
|
+
"kind": "string";
|
|
86
|
+
} | {
|
|
87
|
+
"kind": "address";
|
|
88
|
+
} | {
|
|
89
|
+
"kind": "hash";
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* ABI parameter.
|
|
94
|
+
*/
|
|
95
|
+
type MrvAbiParam = {
|
|
96
|
+
/**
|
|
97
|
+
* Stable parameter name.
|
|
98
|
+
*/
|
|
99
|
+
name: string;
|
|
100
|
+
/**
|
|
101
|
+
* Parameter type.
|
|
102
|
+
*/
|
|
103
|
+
ty: MrvAbiType;
|
|
104
|
+
};
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* ABI symbol kind.
|
|
108
|
+
*/
|
|
109
|
+
type MrvAbiSymbolKind = "constructor" | "function" | "event";
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* ABI symbol exposed by a contract.
|
|
113
|
+
*/
|
|
114
|
+
type MrvAbiSymbol = {
|
|
115
|
+
/**
|
|
116
|
+
* Stable symbol name.
|
|
117
|
+
*/
|
|
118
|
+
name: string;
|
|
119
|
+
/**
|
|
120
|
+
* Symbol kind.
|
|
121
|
+
*/
|
|
122
|
+
kind: MrvAbiSymbolKind;
|
|
123
|
+
/**
|
|
124
|
+
* Typed input parameters.
|
|
125
|
+
*/
|
|
126
|
+
inputs: Array<MrvAbiParam>;
|
|
127
|
+
/**
|
|
128
|
+
* Typed output parameters.
|
|
129
|
+
*/
|
|
130
|
+
outputs: Array<MrvAbiParam>;
|
|
131
|
+
};
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* Contract ABI manifest.
|
|
135
|
+
*/
|
|
136
|
+
type MrvAbiManifest = {
|
|
137
|
+
/**
|
|
138
|
+
* ABI symbols exposed by this artifact.
|
|
139
|
+
*/
|
|
140
|
+
symbols: Array<MrvAbiSymbol>;
|
|
141
|
+
};
|
|
142
|
+
|
|
143
|
+
/**
|
|
144
|
+
* Typed address discriminator from ADR-0038.
|
|
145
|
+
*/
|
|
146
|
+
type MrvAddressKind = "user" | "smartAccount" | "contract" | "cluster" | "multisig" | "systemModule";
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* Build metadata recorded in an MRV artifact.
|
|
150
|
+
*/
|
|
151
|
+
type MrvBuildMetadata = {
|
|
152
|
+
/**
|
|
153
|
+
* Toolchain identifier.
|
|
154
|
+
*/
|
|
155
|
+
toolchain: string;
|
|
156
|
+
/**
|
|
157
|
+
* `0x`-prefixed source or build-input digest.
|
|
158
|
+
*/
|
|
159
|
+
sourceDigest: string;
|
|
160
|
+
/**
|
|
161
|
+
* Reproducible build profile label.
|
|
162
|
+
*/
|
|
163
|
+
profile: string;
|
|
164
|
+
};
|
|
165
|
+
|
|
166
|
+
/**
|
|
167
|
+
* Bounded memory declaration for an MRV artifact.
|
|
168
|
+
*/
|
|
169
|
+
type MrvMemoryLimits = {
|
|
170
|
+
/**
|
|
171
|
+
* Initial memory pages available at contract start.
|
|
172
|
+
*/
|
|
173
|
+
initialPages: number;
|
|
174
|
+
/**
|
|
175
|
+
* Maximum memory pages the contract may grow to.
|
|
176
|
+
*/
|
|
177
|
+
maxPages: number;
|
|
178
|
+
/**
|
|
179
|
+
* Stack reservation in bytes.
|
|
180
|
+
*/
|
|
181
|
+
stackBytes: number;
|
|
182
|
+
};
|
|
183
|
+
|
|
184
|
+
/**
|
|
185
|
+
* Approved MRV RISC-V profile.
|
|
186
|
+
*/
|
|
187
|
+
type MrvRiscvProfile = "mono_rv32im_v1";
|
|
188
|
+
|
|
189
|
+
/**
|
|
190
|
+
* Stable storage namespace declaration.
|
|
191
|
+
*/
|
|
192
|
+
type MrvStorageNamespace = {
|
|
193
|
+
/**
|
|
194
|
+
* Lowercase namespace name.
|
|
195
|
+
*/
|
|
196
|
+
name: string;
|
|
197
|
+
/**
|
|
198
|
+
* Namespace schema version.
|
|
199
|
+
*/
|
|
200
|
+
version: number;
|
|
201
|
+
};
|
|
202
|
+
|
|
203
|
+
/**
|
|
204
|
+
* Host syscall import declared by an artifact.
|
|
205
|
+
*/
|
|
206
|
+
type MrvSyscallImport = {
|
|
207
|
+
/**
|
|
208
|
+
* Host module name. Must be `mono`.
|
|
209
|
+
*/
|
|
210
|
+
module: string;
|
|
211
|
+
/**
|
|
212
|
+
* Stable syscall import name.
|
|
213
|
+
*/
|
|
214
|
+
name: string;
|
|
215
|
+
/**
|
|
216
|
+
* Stable numeric syscall identifier.
|
|
217
|
+
*/
|
|
218
|
+
id: number;
|
|
219
|
+
};
|
|
220
|
+
|
|
221
|
+
/**
|
|
222
|
+
* SDK JSON metadata for an MRV artifact.
|
|
223
|
+
*/
|
|
224
|
+
type MrvArtifactMetadata = {
|
|
225
|
+
/**
|
|
226
|
+
* MRV format version.
|
|
227
|
+
*/
|
|
228
|
+
formatVersion: number;
|
|
229
|
+
/**
|
|
230
|
+
* Approved RISC-V profile.
|
|
231
|
+
*/
|
|
232
|
+
profile: MrvRiscvProfile;
|
|
233
|
+
/**
|
|
234
|
+
* BLAKE3 hash of the code section.
|
|
235
|
+
*/
|
|
236
|
+
codeHash: string;
|
|
237
|
+
/**
|
|
238
|
+
* Code byte count expected by this metadata.
|
|
239
|
+
*/
|
|
240
|
+
codeBytes: bigint;
|
|
241
|
+
/**
|
|
242
|
+
* Optional debug byte count. Debug bytes are excluded from consensus hash.
|
|
243
|
+
*/
|
|
244
|
+
debugBytes: bigint;
|
|
245
|
+
/**
|
|
246
|
+
* Contract ABI manifest.
|
|
247
|
+
*/
|
|
248
|
+
abi: MrvAbiManifest;
|
|
249
|
+
/**
|
|
250
|
+
* Host syscall imports declared by the artifact.
|
|
251
|
+
*/
|
|
252
|
+
imports: Array<MrvSyscallImport>;
|
|
253
|
+
/**
|
|
254
|
+
* Bounded memory declaration.
|
|
255
|
+
*/
|
|
256
|
+
memory: MrvMemoryLimits;
|
|
257
|
+
/**
|
|
258
|
+
* Contract storage namespace.
|
|
259
|
+
*/
|
|
260
|
+
storageNamespace: MrvStorageNamespace;
|
|
261
|
+
/**
|
|
262
|
+
* Build metadata.
|
|
263
|
+
*/
|
|
264
|
+
build: MrvBuildMetadata;
|
|
265
|
+
};
|
|
266
|
+
|
|
267
|
+
/**
|
|
268
|
+
* Native MRV contract call request model.
|
|
269
|
+
*/
|
|
270
|
+
type MrvCallRequest = {
|
|
271
|
+
/**
|
|
272
|
+
* Optional typed user address that signs the call.
|
|
273
|
+
*/
|
|
274
|
+
from?: string;
|
|
275
|
+
/**
|
|
276
|
+
* Destination typed contract address (`monoc1...`).
|
|
277
|
+
*/
|
|
278
|
+
contractAddress: string;
|
|
279
|
+
/**
|
|
280
|
+
* Call input bytes as `0x`-hex.
|
|
281
|
+
*/
|
|
282
|
+
input: string;
|
|
283
|
+
/**
|
|
284
|
+
* Native value sent with the call, in lythoshi.
|
|
285
|
+
*/
|
|
286
|
+
valueLythoshi: string;
|
|
287
|
+
/**
|
|
288
|
+
* Optional execution-unit ceiling for transaction admission.
|
|
289
|
+
*/
|
|
290
|
+
executionUnitLimit?: bigint;
|
|
291
|
+
/**
|
|
292
|
+
* Optional max execution fee in lythoshi.
|
|
293
|
+
*/
|
|
294
|
+
maxExecutionFeeLythoshi?: string;
|
|
295
|
+
/**
|
|
296
|
+
* Optional priority tip in lythoshi.
|
|
297
|
+
*/
|
|
298
|
+
priorityTipLythoshi?: string;
|
|
299
|
+
/**
|
|
300
|
+
* Optional signer nonce.
|
|
301
|
+
*/
|
|
302
|
+
nonce?: bigint;
|
|
303
|
+
};
|
|
304
|
+
|
|
305
|
+
/**
|
|
306
|
+
* Native MRV call status.
|
|
307
|
+
*/
|
|
308
|
+
type MrvCallStatus = "success" | "reverted" | "halted";
|
|
309
|
+
|
|
310
|
+
/**
|
|
311
|
+
* Typed event payload emitted by a contract or native module.
|
|
312
|
+
*/
|
|
313
|
+
type MrvEventRecord = {
|
|
314
|
+
/**
|
|
315
|
+
* Domain-separated event topic as `0x`-hex.
|
|
316
|
+
*/
|
|
317
|
+
topic: string;
|
|
318
|
+
/**
|
|
319
|
+
* Event payload bytes as `0x`-hex.
|
|
320
|
+
*/
|
|
321
|
+
data: string;
|
|
322
|
+
};
|
|
323
|
+
|
|
324
|
+
/**
|
|
325
|
+
* Independent counters reported by MRV execution.
|
|
326
|
+
*/
|
|
327
|
+
type MrvMeterCounters = {
|
|
328
|
+
/**
|
|
329
|
+
* Deterministic instruction-cycle count.
|
|
330
|
+
*/
|
|
331
|
+
cycles: bigint;
|
|
332
|
+
/**
|
|
333
|
+
* Units consumed by host syscalls.
|
|
334
|
+
*/
|
|
335
|
+
syscallUnits: bigint;
|
|
336
|
+
/**
|
|
337
|
+
* Units consumed by authenticated state reads and writes.
|
|
338
|
+
*/
|
|
339
|
+
stateIoUnits: bigint;
|
|
340
|
+
};
|
|
341
|
+
|
|
342
|
+
/**
|
|
343
|
+
* Typed native-module state delta for receipts and indexers.
|
|
344
|
+
*/
|
|
345
|
+
type MrvNativeStateDelta = {
|
|
346
|
+
/**
|
|
347
|
+
* Native module namespace that changed.
|
|
348
|
+
*/
|
|
349
|
+
namespace: MrvStorageNamespace;
|
|
350
|
+
/**
|
|
351
|
+
* State key inside the namespace as `0x`-hex.
|
|
352
|
+
*/
|
|
353
|
+
key: string;
|
|
354
|
+
/**
|
|
355
|
+
* Hash of the new value, or absent when the key was deleted.
|
|
356
|
+
*/
|
|
357
|
+
valueHash?: string;
|
|
358
|
+
};
|
|
359
|
+
|
|
360
|
+
/**
|
|
361
|
+
* Typed revert payload.
|
|
362
|
+
*/
|
|
363
|
+
type MrvRevertPayload = {
|
|
364
|
+
/**
|
|
365
|
+
* Stable contract-defined revert code.
|
|
366
|
+
*/
|
|
367
|
+
code: number;
|
|
368
|
+
/**
|
|
369
|
+
* Opaque revert data as `0x`-hex.
|
|
370
|
+
*/
|
|
371
|
+
data: string;
|
|
372
|
+
};
|
|
373
|
+
|
|
374
|
+
/**
|
|
375
|
+
* Typed RISC-V execution receipt.
|
|
376
|
+
*/
|
|
377
|
+
type MrvExecutionReceipt = {
|
|
378
|
+
/**
|
|
379
|
+
* Consensus hash of the validated MRV artifact as `0x`-hex.
|
|
380
|
+
*/
|
|
381
|
+
artifactHash: string;
|
|
382
|
+
/**
|
|
383
|
+
* Execution counters.
|
|
384
|
+
*/
|
|
385
|
+
counters: MrvMeterCounters;
|
|
386
|
+
/**
|
|
387
|
+
* Typed events emitted by the call.
|
|
388
|
+
*/
|
|
389
|
+
events: Array<MrvEventRecord>;
|
|
390
|
+
/**
|
|
391
|
+
* Native module deltas produced by the call.
|
|
392
|
+
*/
|
|
393
|
+
nativeDeltas: Array<MrvNativeStateDelta>;
|
|
394
|
+
/**
|
|
395
|
+
* Revert payload when execution failed through the typed revert path.
|
|
396
|
+
*/
|
|
397
|
+
reverted?: MrvRevertPayload;
|
|
398
|
+
};
|
|
399
|
+
|
|
400
|
+
/**
|
|
401
|
+
* Native MRV call response model.
|
|
402
|
+
*/
|
|
403
|
+
type MrvCallResponse = {
|
|
404
|
+
/**
|
|
405
|
+
* Transaction hash.
|
|
406
|
+
*/
|
|
407
|
+
txHash: string;
|
|
408
|
+
/**
|
|
409
|
+
* Execution status.
|
|
410
|
+
*/
|
|
411
|
+
status: MrvCallStatus;
|
|
412
|
+
/**
|
|
413
|
+
* Returned bytes as `0x`-hex when available.
|
|
414
|
+
*/
|
|
415
|
+
returnData: string;
|
|
416
|
+
/**
|
|
417
|
+
* Typed RISC-V receipt when available.
|
|
418
|
+
*/
|
|
419
|
+
receipt?: MrvExecutionReceipt;
|
|
420
|
+
};
|
|
421
|
+
|
|
422
|
+
/**
|
|
423
|
+
* Versioned MRV deploy payload envelope.
|
|
424
|
+
*
|
|
425
|
+
* Raw artifact deploys remain valid. This envelope is only needed when a
|
|
426
|
+
* deploy carries optional constructor input alongside the canonical artifact.
|
|
427
|
+
*/
|
|
428
|
+
type MrvDeployPayload = {
|
|
429
|
+
/**
|
|
430
|
+
* Payload schema version.
|
|
431
|
+
*/
|
|
432
|
+
version: number;
|
|
433
|
+
/**
|
|
434
|
+
* Canonical MRV artifact bytes.
|
|
435
|
+
*/
|
|
436
|
+
artifact: Array<number>;
|
|
437
|
+
/**
|
|
438
|
+
* Optional constructor input already encoded with the artifact ABI.
|
|
439
|
+
*/
|
|
440
|
+
constructor: Array<number> | null;
|
|
441
|
+
};
|
|
442
|
+
|
|
443
|
+
/**
|
|
444
|
+
* Native MRV deploy request model.
|
|
445
|
+
*/
|
|
446
|
+
type MrvDeployRequest = {
|
|
447
|
+
/**
|
|
448
|
+
* Optional typed user address that signs the deploy.
|
|
449
|
+
*/
|
|
450
|
+
from?: string;
|
|
451
|
+
/**
|
|
452
|
+
* Deploy input bytes as `0x`-hex.
|
|
453
|
+
*
|
|
454
|
+
* Raw bincode MRV artifact bytes remain accepted. Constructor-bearing
|
|
455
|
+
* deploys use [`encode_mrv_deploy_payload`] to place a versioned payload
|
|
456
|
+
* envelope in this field.
|
|
457
|
+
*/
|
|
458
|
+
artifactBytes: string;
|
|
459
|
+
/**
|
|
460
|
+
* Native value to endow the contract with, in lythoshi.
|
|
461
|
+
*/
|
|
462
|
+
valueLythoshi: string;
|
|
463
|
+
/**
|
|
464
|
+
* Optional execution-unit ceiling for transaction admission.
|
|
465
|
+
*/
|
|
466
|
+
executionUnitLimit?: bigint;
|
|
467
|
+
/**
|
|
468
|
+
* Optional max execution fee in lythoshi.
|
|
469
|
+
*/
|
|
470
|
+
maxExecutionFeeLythoshi?: string;
|
|
471
|
+
/**
|
|
472
|
+
* Optional priority tip in lythoshi.
|
|
473
|
+
*/
|
|
474
|
+
priorityTipLythoshi?: string;
|
|
475
|
+
/**
|
|
476
|
+
* Optional signer nonce.
|
|
477
|
+
*/
|
|
478
|
+
nonce?: bigint;
|
|
479
|
+
};
|
|
480
|
+
|
|
481
|
+
/**
|
|
482
|
+
* Native MRV deploy response model.
|
|
483
|
+
*/
|
|
484
|
+
type MrvDeployResponse = {
|
|
485
|
+
/**
|
|
486
|
+
* Transaction hash.
|
|
487
|
+
*/
|
|
488
|
+
txHash: string;
|
|
489
|
+
/**
|
|
490
|
+
* Deployed typed contract address (`monoc1...`).
|
|
491
|
+
*/
|
|
492
|
+
contractAddress: string;
|
|
493
|
+
/**
|
|
494
|
+
* Artifact hash when supplied by the node/indexer.
|
|
495
|
+
*/
|
|
496
|
+
artifactHash?: string;
|
|
497
|
+
/**
|
|
498
|
+
* Receipt when the caller requested a confirmed response.
|
|
499
|
+
*/
|
|
500
|
+
receipt?: MrvExecutionReceipt;
|
|
501
|
+
};
|
|
502
|
+
|
|
503
|
+
/**
|
|
504
|
+
* Resolved syscall import.
|
|
505
|
+
*/
|
|
506
|
+
type MrvResolvedSyscall = {
|
|
507
|
+
/**
|
|
508
|
+
* Stable numeric syscall identifier.
|
|
509
|
+
*/
|
|
510
|
+
id: number;
|
|
511
|
+
/**
|
|
512
|
+
* Stable syscall import name.
|
|
513
|
+
*/
|
|
514
|
+
name: string;
|
|
515
|
+
};
|
|
516
|
+
|
|
517
|
+
/**
|
|
518
|
+
* Typed MRV transaction extension descriptor.
|
|
519
|
+
*/
|
|
520
|
+
type MrvTransactionExtension = {
|
|
521
|
+
/**
|
|
522
|
+
* Extension kind byte.
|
|
523
|
+
*/
|
|
524
|
+
kind: number;
|
|
525
|
+
/**
|
|
526
|
+
* Extension body bytes as `0x`-hex.
|
|
527
|
+
*/
|
|
528
|
+
bodyHex: string;
|
|
529
|
+
};
|
|
530
|
+
|
|
531
|
+
/**
|
|
532
|
+
* Decoded typed bech32m address.
|
|
533
|
+
*/
|
|
534
|
+
type MrvTypedAddress = {
|
|
535
|
+
/**
|
|
536
|
+
* ADR-0038 address kind.
|
|
537
|
+
*/
|
|
538
|
+
kind: MrvAddressKind;
|
|
539
|
+
/**
|
|
540
|
+
* Typed bech32m address string.
|
|
541
|
+
*/
|
|
542
|
+
address: string;
|
|
543
|
+
};
|
|
544
|
+
|
|
545
|
+
/**
|
|
546
|
+
* Validated artifact metadata summary.
|
|
547
|
+
*/
|
|
548
|
+
type MrvValidatedArtifactMetadata = {
|
|
549
|
+
/**
|
|
550
|
+
* Verified code hash.
|
|
551
|
+
*/
|
|
552
|
+
codeHash: string;
|
|
553
|
+
/**
|
|
554
|
+
* Approved profile.
|
|
555
|
+
*/
|
|
556
|
+
profile: MrvRiscvProfile;
|
|
557
|
+
/**
|
|
558
|
+
* Bounded memory declaration.
|
|
559
|
+
*/
|
|
560
|
+
memory: MrvMemoryLimits;
|
|
561
|
+
/**
|
|
562
|
+
* Contract storage namespace.
|
|
563
|
+
*/
|
|
564
|
+
storageNamespace: MrvStorageNamespace;
|
|
565
|
+
/**
|
|
566
|
+
* Resolved syscall imports in declared order.
|
|
567
|
+
*/
|
|
568
|
+
syscalls: Array<MrvResolvedSyscall>;
|
|
569
|
+
/**
|
|
570
|
+
* Number of ABI symbols.
|
|
571
|
+
*/
|
|
572
|
+
abiSymbolCount: bigint;
|
|
573
|
+
/**
|
|
574
|
+
* Verified code byte count.
|
|
575
|
+
*/
|
|
576
|
+
codeBytes: bigint;
|
|
577
|
+
};
|
|
4
578
|
|
|
5
579
|
/**
|
|
6
580
|
* Typed HTTP client for the explorer-facing `/api/v1` surface served by
|
|
@@ -132,9 +706,9 @@ interface ApiBlockHeader {
|
|
|
132
706
|
parentHash: string;
|
|
133
707
|
stateRoot: string;
|
|
134
708
|
timestamp: number;
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
709
|
+
executionUnitsUsed: number;
|
|
710
|
+
executionUnitLimit: number;
|
|
711
|
+
basePricePerCycleLythoshi: string;
|
|
138
712
|
}
|
|
139
713
|
interface ApiLogEntry {
|
|
140
714
|
address: string;
|
|
@@ -149,10 +723,11 @@ interface ApiTransactionView {
|
|
|
149
723
|
from: string;
|
|
150
724
|
to: string | null;
|
|
151
725
|
nonce: number;
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
726
|
+
valueLythoshi: string;
|
|
727
|
+
maxExecutionFeeLythoshi: string;
|
|
728
|
+
priorityTipLythoshi: string;
|
|
729
|
+
executionUnitLimit: number;
|
|
730
|
+
fee: NativeReceiptFee;
|
|
156
731
|
input: string;
|
|
157
732
|
signedEnvelope: string;
|
|
158
733
|
}
|
|
@@ -162,7 +737,7 @@ interface ApiTransactionReceipt {
|
|
|
162
737
|
blockHeight: number;
|
|
163
738
|
txIndex: number;
|
|
164
739
|
status: number;
|
|
165
|
-
|
|
740
|
+
executionUnitsUsed: number;
|
|
166
741
|
logs: ApiLogEntry[];
|
|
167
742
|
}
|
|
168
743
|
interface ApiAddressActivityEntry {
|
|
@@ -209,6 +784,7 @@ interface ApiTransactionReceiptData {
|
|
|
209
784
|
chainProvider: string;
|
|
210
785
|
};
|
|
211
786
|
}
|
|
787
|
+
type ApiTransactionNativeReceiptData<TDecoded = unknown> = NativeReceiptResponse<TDecoded>;
|
|
212
788
|
interface ApiAddressActivityData {
|
|
213
789
|
address: string;
|
|
214
790
|
limit: number;
|
|
@@ -347,13 +923,50 @@ declare class ApiClient {
|
|
|
347
923
|
stats(): Promise<ApiEnvelope<ChainStatsResponse>>;
|
|
348
924
|
block(block?: BlockSelector): Promise<ApiEnvelope<ApiBlockData>>;
|
|
349
925
|
blockTransactions(block?: BlockSelector, page?: number, limit?: number): Promise<ApiEnvelope<ApiBlockTransactionsData>>;
|
|
926
|
+
streams(): Promise<ApiStreamsIndexResponse>;
|
|
350
927
|
transactions(limit?: number, cursor?: string | null): Promise<ApiEnvelope<TxFeedResponse>>;
|
|
351
928
|
transaction(hash: string): Promise<ApiEnvelope<ApiTransactionData>>;
|
|
352
929
|
transactionReceipt(hash: string): Promise<ApiEnvelope<ApiTransactionReceiptData>>;
|
|
930
|
+
transactionNativeReceipt<TDecoded = unknown>(hash: string): Promise<ApiEnvelope<ApiTransactionNativeReceiptData<TDecoded>>>;
|
|
931
|
+
/**
|
|
932
|
+
* Typed native event rows from `/transactions/{hash}/native-receipt`.
|
|
933
|
+
*
|
|
934
|
+
* This helper consumes the existing native receipt API route and returns
|
|
935
|
+
* its envelope metadata with `data` replaced by the filtered event rows.
|
|
936
|
+
*/
|
|
937
|
+
transactionNativeReceiptEvents<TDecoded extends NativeDecodedEvent = NativeDecodedEvent>(hash: string, filter?: NativeEventFilter): Promise<ApiEnvelope<Array<TypedNativeReceiptEvent<TDecoded>>>>;
|
|
938
|
+
transactionNativeReceiptMarketEvents<TDecoded extends NativeDecodedEvent = NativeDecodedEvent>(hash: string, filter?: NativeEventFilter): Promise<ApiEnvelope<Array<TypedNativeReceiptEvent<TDecoded>>>>;
|
|
939
|
+
nativeEvents<TDecoded = unknown>(filter: NativeEventsFilter): Promise<ApiEnvelope<NativeEventsResponse<TDecoded>>>;
|
|
940
|
+
nativeEventsTyped<TDecoded extends NativeDecodedEvent = NativeDecodedEvent>(filter: NativeEventsFilter): Promise<ApiEnvelope<NativeEventsResponse<TDecoded>>>;
|
|
941
|
+
nativeMarketEvents<TDecoded = unknown>(filter: NativeEventsFilter): Promise<ApiEnvelope<NativeEventsResponse<TDecoded>>>;
|
|
942
|
+
nativeMarketEventsTyped<TDecoded extends NativeDecodedEvent = NativeDecodedEvent>(filter: NativeEventsFilter): Promise<ApiEnvelope<NativeEventsResponse<TDecoded>>>;
|
|
943
|
+
nativeAgentState(filter?: NativeAgentStateFilter): Promise<ApiEnvelope<NativeAgentStateResponse>>;
|
|
944
|
+
nativeMarketState(filter?: NativeMarketStateFilter): Promise<ApiEnvelope<NativeMarketStateResponse>>;
|
|
945
|
+
nativeMarketOrderBookDeltas(filter: NativeMarketOrderBookDeltasRequest): Promise<ApiEnvelope<NativeMarketOrderBookDeltasResponse>>;
|
|
353
946
|
addressProfile(address: string): Promise<ApiEnvelope<AddressProfileResponse>>;
|
|
354
947
|
addressFlow(address: string, limit?: number): Promise<ApiEnvelope<AddressFlowResponse>>;
|
|
355
948
|
addressActivity(address: string, limit?: number, cursor?: string | null): Promise<ApiEnvelope<ApiAddressActivityData>>;
|
|
356
949
|
addressActivityKind(address: string): Promise<ApiEnvelope<ApiAddressActivityKindData>>;
|
|
950
|
+
addressPendingRewards(address: string, block?: BlockSelector | null): Promise<ApiEnvelope<PendingRewardsResponse>>;
|
|
951
|
+
addressRedemptionQueue(address: string, block?: BlockSelector | null): Promise<ApiEnvelope<RedemptionQueueResponse>>;
|
|
952
|
+
assetMrcMetadata(assetId: string, mrcTokenId?: string | null): Promise<ApiEnvelope<MrcMetadataResponse>>;
|
|
953
|
+
mrcAccount(account: string, limit?: number | null): Promise<ApiEnvelope<MrcAccountResponse>>;
|
|
954
|
+
mrcHolders(standard: string, assetId: string, tokenId: string, limit?: number | null): Promise<ApiEnvelope<MrcHoldersResponse>>;
|
|
955
|
+
/**
|
|
956
|
+
* Asset-scoped `/api/v1/mrc/{standard}/{assetId}/holders`.
|
|
957
|
+
*
|
|
958
|
+
* This is the REST form used by MRC-4626 vault share balances.
|
|
959
|
+
*/
|
|
960
|
+
mrcAssetHolders(standard: string, assetId: string, limit?: number | null): Promise<ApiEnvelope<MrcHoldersResponse>>;
|
|
961
|
+
/** `/api/v1/mrc/mrc4626/{vaultId}/holders`. */
|
|
962
|
+
mrc4626Holders(vaultId: string, limit?: number | null): Promise<ApiEnvelope<MrcHoldersResponse>>;
|
|
963
|
+
/**
|
|
964
|
+
* `/api/v1/bridge/routes`.
|
|
965
|
+
*
|
|
966
|
+
* The forthcoming route is read-only `GET`, so the typed request is encoded
|
|
967
|
+
* as a single JSON query value named `request`.
|
|
968
|
+
*/
|
|
969
|
+
bridgeRoutes(request: BridgeRoutesRequest): Promise<ApiEnvelope<BridgeRoutesResponse>>;
|
|
357
970
|
clusters(page?: number, limit?: number): Promise<ApiEnvelope<ApiClustersData>>;
|
|
358
971
|
cluster(clusterId: number): Promise<ApiEnvelope<ApiClusterData>>;
|
|
359
972
|
operator(operatorId: string): Promise<ApiEnvelope<ApiOperatorData>>;
|
|
@@ -366,6 +979,425 @@ declare class ApiClient {
|
|
|
366
979
|
upgradeStatus(height?: BlockSelector | null): Promise<ApiEnvelope<ApiUpgradeStatusData>>;
|
|
367
980
|
}
|
|
368
981
|
|
|
982
|
+
declare const NATIVE_DEV_HOST_API_VERSION: "0.1.0";
|
|
983
|
+
declare const NATIVE_DEV_MANIFEST_SCHEMA_VERSION: 1;
|
|
984
|
+
declare const NATIVE_DEV_IPC_PROTOCOL_VERSION: "mono.native-dev.ipc.v1";
|
|
985
|
+
type NativeDevkitChannel = "stable" | "testnet" | "local";
|
|
986
|
+
type NativeDevkitSidecarStatus = "missing" | "stopped" | "starting" | "running" | "unhealthy";
|
|
987
|
+
type NativeDevkitCompatibility = "compatible" | "too_old_for_host" | "too_new_for_host" | "invalid_manifest";
|
|
988
|
+
type StudioHostState = "disabled" | "missing_devkit" | "incompatible_devkit" | "ready";
|
|
989
|
+
type NativeDevRiskSeverity = "info" | "warning" | "critical";
|
|
990
|
+
interface NativeDevRiskLabel {
|
|
991
|
+
id: string;
|
|
992
|
+
title: string;
|
|
993
|
+
severity: NativeDevRiskSeverity;
|
|
994
|
+
detail: string;
|
|
995
|
+
}
|
|
996
|
+
interface NativeDevkitArchive {
|
|
997
|
+
url: string;
|
|
998
|
+
sha256: string;
|
|
999
|
+
signature: string;
|
|
1000
|
+
signatureScheme?: "ed25519";
|
|
1001
|
+
signingKeyId?: string;
|
|
1002
|
+
trustRoot?: string;
|
|
1003
|
+
signingPublicKey?: string;
|
|
1004
|
+
sizeBytes?: number;
|
|
1005
|
+
}
|
|
1006
|
+
interface NativeDevkitSidecarManifest {
|
|
1007
|
+
binaryName: string;
|
|
1008
|
+
ipcProtocolVersion: string;
|
|
1009
|
+
}
|
|
1010
|
+
interface NativeDevkitManifest {
|
|
1011
|
+
schemaVersion: typeof NATIVE_DEV_MANIFEST_SCHEMA_VERSION;
|
|
1012
|
+
devkitVersion: string;
|
|
1013
|
+
channel: NativeDevkitChannel;
|
|
1014
|
+
minimumWalletHostApi: string;
|
|
1015
|
+
maximumWalletHostApi: string;
|
|
1016
|
+
monoCoreCommit: string;
|
|
1017
|
+
monoCoreSdkCommit: string;
|
|
1018
|
+
archive: NativeDevkitArchive;
|
|
1019
|
+
sidecar: NativeDevkitSidecarManifest;
|
|
1020
|
+
releaseNotesUrl?: string;
|
|
1021
|
+
}
|
|
1022
|
+
interface NativeDevkitStatus {
|
|
1023
|
+
installedVersion?: string;
|
|
1024
|
+
channel: NativeDevkitChannel;
|
|
1025
|
+
hostApiVersion: string;
|
|
1026
|
+
installPath?: string;
|
|
1027
|
+
sidecarStatus: NativeDevkitSidecarStatus;
|
|
1028
|
+
manifest?: NativeDevkitManifest;
|
|
1029
|
+
compatibility: NativeDevkitCompatibility;
|
|
1030
|
+
message: string;
|
|
1031
|
+
}
|
|
1032
|
+
interface StudioHostStatus {
|
|
1033
|
+
state: StudioHostState;
|
|
1034
|
+
developerModeEnabled: boolean;
|
|
1035
|
+
hostApiVersion: string;
|
|
1036
|
+
devkit: NativeDevkitStatus;
|
|
1037
|
+
}
|
|
1038
|
+
interface NativeDevSidecarReadyMessage {
|
|
1039
|
+
direction: "sidecar_to_host";
|
|
1040
|
+
kind: "ready";
|
|
1041
|
+
protocolVersion: string;
|
|
1042
|
+
devkitVersion: string;
|
|
1043
|
+
workspaceRoot?: string;
|
|
1044
|
+
}
|
|
1045
|
+
interface NativeDevSidecarProjectEventMessage {
|
|
1046
|
+
direction: "sidecar_to_host";
|
|
1047
|
+
kind: "project_event";
|
|
1048
|
+
protocolVersion?: string;
|
|
1049
|
+
projectId: string;
|
|
1050
|
+
event: "created" | "opened" | "build_started" | "build_finished" | "test_finished" | "simulation_finished";
|
|
1051
|
+
summary: string;
|
|
1052
|
+
}
|
|
1053
|
+
interface NativeDevSidecarApprovalRequestMessage {
|
|
1054
|
+
direction: "sidecar_to_host";
|
|
1055
|
+
kind: "approval_request";
|
|
1056
|
+
protocolVersion?: string;
|
|
1057
|
+
request: NativeDevWalletApprovalRequest;
|
|
1058
|
+
}
|
|
1059
|
+
type NativeDevCommandName = "readiness" | "build" | "validate" | "test" | "simulate" | "trace" | "deploy_plan";
|
|
1060
|
+
interface NativeDevSidecarCommandResultMessage {
|
|
1061
|
+
direction: "sidecar_to_host";
|
|
1062
|
+
kind: "command_result";
|
|
1063
|
+
protocolVersion?: string;
|
|
1064
|
+
command: NativeDevCommandName;
|
|
1065
|
+
requestId: string;
|
|
1066
|
+
ok: boolean;
|
|
1067
|
+
preview: boolean;
|
|
1068
|
+
output?: unknown;
|
|
1069
|
+
error?: string;
|
|
1070
|
+
}
|
|
1071
|
+
interface NativeDevHostContextMessage {
|
|
1072
|
+
direction: "host_to_sidecar";
|
|
1073
|
+
kind: "host_context";
|
|
1074
|
+
selectedProjectRoot?: string;
|
|
1075
|
+
activeNetwork: {
|
|
1076
|
+
networkId: string;
|
|
1077
|
+
name: string;
|
|
1078
|
+
};
|
|
1079
|
+
readOnlyWalletAddress?: string;
|
|
1080
|
+
}
|
|
1081
|
+
interface NativeDevHostApprovalResultMessage {
|
|
1082
|
+
direction: "host_to_sidecar";
|
|
1083
|
+
kind: "approval_result";
|
|
1084
|
+
protocolVersion?: string;
|
|
1085
|
+
requestId: string;
|
|
1086
|
+
approved: boolean;
|
|
1087
|
+
reason?: string;
|
|
1088
|
+
}
|
|
1089
|
+
interface NativeDevHostCommandMessage {
|
|
1090
|
+
direction: "host_to_sidecar";
|
|
1091
|
+
kind: "devkit_command";
|
|
1092
|
+
protocolVersion?: string;
|
|
1093
|
+
requestId: string;
|
|
1094
|
+
command: NativeDevCommandName;
|
|
1095
|
+
selectedProjectRoot?: string;
|
|
1096
|
+
authorityAddress?: string;
|
|
1097
|
+
networkId?: string;
|
|
1098
|
+
}
|
|
1099
|
+
type NativeDevIpcMessage = NativeDevSidecarReadyMessage | NativeDevSidecarProjectEventMessage | NativeDevSidecarApprovalRequestMessage | NativeDevSidecarCommandResultMessage | NativeDevHostContextMessage | NativeDevHostApprovalResultMessage | NativeDevHostCommandMessage;
|
|
1100
|
+
type NativeDevApprovalKind = "mrv_deploy" | "mrv_call" | "mrc_token_create" | "verification_publish";
|
|
1101
|
+
interface NativeDevWalletApprovalRequest {
|
|
1102
|
+
id: string;
|
|
1103
|
+
kind: NativeDevApprovalKind;
|
|
1104
|
+
createdAt: string;
|
|
1105
|
+
origin: "mono_studio_host" | "mono_devkit" | "lyth_dev_mcp";
|
|
1106
|
+
networkId: string;
|
|
1107
|
+
authorityAddress: string;
|
|
1108
|
+
title: string;
|
|
1109
|
+
summary: string;
|
|
1110
|
+
riskLabels: NativeDevRiskLabel[];
|
|
1111
|
+
payload: Record<string, unknown>;
|
|
1112
|
+
}
|
|
1113
|
+
interface NativeDevMrvDeployPlan {
|
|
1114
|
+
networkId: string;
|
|
1115
|
+
authorityAddress: string;
|
|
1116
|
+
expectedContractAddress: string;
|
|
1117
|
+
artifactHash: string;
|
|
1118
|
+
abiHash: string;
|
|
1119
|
+
valueLythoshi: string;
|
|
1120
|
+
executionUnitLimit: string;
|
|
1121
|
+
maxExecutionFeeLythoshi: string;
|
|
1122
|
+
constructorInput: string;
|
|
1123
|
+
riskLabels: NativeDevRiskLabel[];
|
|
1124
|
+
abiManifest?: MrvAbiManifest;
|
|
1125
|
+
walletApprovalRequest: NativeDevWalletApprovalRequest;
|
|
1126
|
+
}
|
|
1127
|
+
type NativeDevMrcAssetKind = "mrc20_fixed_supply" | "mrc20_capped_mint" | "mrc721_collection" | "mrc1155_collection" | "mrc4626_vault";
|
|
1128
|
+
interface NativeDevMrcAllocation {
|
|
1129
|
+
address: string;
|
|
1130
|
+
amount: string;
|
|
1131
|
+
}
|
|
1132
|
+
interface NativeDevMrcTokenPlan {
|
|
1133
|
+
assetKind: NativeDevMrcAssetKind;
|
|
1134
|
+
name: string;
|
|
1135
|
+
symbol: string;
|
|
1136
|
+
decimals: number;
|
|
1137
|
+
supplyPolicy: "fixed" | "capped" | "collection" | "vault";
|
|
1138
|
+
mintPolicy: "none" | "issuer" | "role";
|
|
1139
|
+
transferPolicy: "open" | "restricted";
|
|
1140
|
+
metadataPolicy: "immutable" | "mutable";
|
|
1141
|
+
adminRoles: string[];
|
|
1142
|
+
issuerAddress: string;
|
|
1143
|
+
initialAllocations: NativeDevMrcAllocation[];
|
|
1144
|
+
riskLabels: NativeDevRiskLabel[];
|
|
1145
|
+
walletApprovalRequest: NativeDevWalletApprovalRequest;
|
|
1146
|
+
}
|
|
1147
|
+
interface NativeDevVerificationBundle {
|
|
1148
|
+
bundleHash: string;
|
|
1149
|
+
contractPassport: NativeDevContractPassport;
|
|
1150
|
+
artifact: {
|
|
1151
|
+
artifactHash: string;
|
|
1152
|
+
sourceBundleHash: string;
|
|
1153
|
+
abiHash: string;
|
|
1154
|
+
};
|
|
1155
|
+
files: Array<{
|
|
1156
|
+
path: string;
|
|
1157
|
+
hash: string;
|
|
1158
|
+
}>;
|
|
1159
|
+
walletApprovalRequest?: NativeDevWalletApprovalRequest;
|
|
1160
|
+
}
|
|
1161
|
+
interface NativeDevContractPassport {
|
|
1162
|
+
address: string;
|
|
1163
|
+
artifactHash: string;
|
|
1164
|
+
sourceBundleHash: string;
|
|
1165
|
+
abiHash: string;
|
|
1166
|
+
compilerVersion: string;
|
|
1167
|
+
sdkVersion: string;
|
|
1168
|
+
templateId?: string;
|
|
1169
|
+
verificationStatus: "draft" | "submitted" | "verified" | "rejected";
|
|
1170
|
+
riskLabels: NativeDevRiskLabel[];
|
|
1171
|
+
deployTx?: string;
|
|
1172
|
+
issuer: string;
|
|
1173
|
+
}
|
|
1174
|
+
declare function compareNativeDevVersions(left: string, right: string): number;
|
|
1175
|
+
declare function checkNativeDevkitCompatibility(manifest: NativeDevkitManifest | undefined, hostApiVersion?: string): NativeDevkitCompatibility;
|
|
1176
|
+
declare function resolveStudioHostStatus(args: {
|
|
1177
|
+
developerModeEnabled: boolean;
|
|
1178
|
+
channel: NativeDevkitChannel;
|
|
1179
|
+
hostApiVersion?: string;
|
|
1180
|
+
installPath?: string;
|
|
1181
|
+
manifest?: NativeDevkitManifest;
|
|
1182
|
+
sidecarStatus?: NativeDevkitSidecarStatus;
|
|
1183
|
+
}): StudioHostStatus;
|
|
1184
|
+
declare function assertNativeDevWalletApprovalRequest(request: NativeDevWalletApprovalRequest): void;
|
|
1185
|
+
declare function assertNativeDevMrvDeployPlan(plan: NativeDevMrvDeployPlan): void;
|
|
1186
|
+
declare function assertNativeDevMrcTokenPlan(plan: NativeDevMrcTokenPlan): void;
|
|
1187
|
+
declare function nativeDevUiStrings(): readonly string[];
|
|
1188
|
+
declare function nativeDevSchemaFieldNames(): readonly string[];
|
|
1189
|
+
|
|
1190
|
+
/**
|
|
1191
|
+
* Address display helpers.
|
|
1192
|
+
*
|
|
1193
|
+
* Monolythium keeps 20-byte account identifiers on the wire, but
|
|
1194
|
+
* user-facing surfaces display them as `mono1...` bech32m strings.
|
|
1195
|
+
*/
|
|
1196
|
+
declare const ADDRESS_HRP: "mono";
|
|
1197
|
+
declare const ADDRESS_KIND_HRPS: {
|
|
1198
|
+
readonly user: "mono";
|
|
1199
|
+
readonly smartAccount: "monos";
|
|
1200
|
+
readonly contract: "monoc";
|
|
1201
|
+
readonly cluster: "monok";
|
|
1202
|
+
readonly multisig: "monom";
|
|
1203
|
+
readonly systemModule: "monox";
|
|
1204
|
+
};
|
|
1205
|
+
declare const RESERVED_ADDRESS_HRPS: readonly ["monor", "monop", "monoi", "monoa"];
|
|
1206
|
+
type AddressKind = keyof typeof ADDRESS_KIND_HRPS;
|
|
1207
|
+
interface TypedAddress {
|
|
1208
|
+
kind: AddressKind;
|
|
1209
|
+
address: string;
|
|
1210
|
+
bytes: Uint8Array;
|
|
1211
|
+
hex: string;
|
|
1212
|
+
}
|
|
1213
|
+
declare class AddressError extends Error {
|
|
1214
|
+
constructor(message: string);
|
|
1215
|
+
}
|
|
1216
|
+
declare function hexToAddressBytes(address: string): Uint8Array;
|
|
1217
|
+
declare function addressBytesToHex(address: Uint8Array | readonly number[]): string;
|
|
1218
|
+
declare function addressToBech32(address: string | Uint8Array | readonly number[]): string;
|
|
1219
|
+
declare function addressToTypedBech32(kind: AddressKind, address: string | Uint8Array | readonly number[]): string;
|
|
1220
|
+
declare function bech32ToAddressBytes(address: string): Uint8Array;
|
|
1221
|
+
declare function bech32ToAddress(address: string): string;
|
|
1222
|
+
declare function typedBech32ToAddress(address: string, expectedKind?: AddressKind): TypedAddress;
|
|
1223
|
+
declare function requireTypedAddress(address: string, expectedKind: AddressKind, label?: string): string;
|
|
1224
|
+
declare function parseAddress(address: string): Uint8Array;
|
|
1225
|
+
declare function normalizeAddressHex(address: string): string;
|
|
1226
|
+
|
|
1227
|
+
type MrvBytesLike = string | Uint8Array | readonly number[];
|
|
1228
|
+
type MrvDecimalLike = string | number | bigint;
|
|
1229
|
+
interface MrvRequestBuildOptions {
|
|
1230
|
+
from?: string;
|
|
1231
|
+
valueLythoshi?: MrvDecimalLike;
|
|
1232
|
+
executionUnitLimit?: number | bigint;
|
|
1233
|
+
maxExecutionFeeLythoshi?: MrvDecimalLike;
|
|
1234
|
+
priorityTipLythoshi?: MrvDecimalLike;
|
|
1235
|
+
nonce?: number | bigint;
|
|
1236
|
+
}
|
|
1237
|
+
interface MrvDeployPlanOptions extends MrvRequestBuildOptions {
|
|
1238
|
+
artifactHash?: string;
|
|
1239
|
+
}
|
|
1240
|
+
interface MrvDeployPayloadRequestOptions extends MrvRequestBuildOptions {
|
|
1241
|
+
constructorInput?: MrvBytesLike | null;
|
|
1242
|
+
}
|
|
1243
|
+
interface MrvDeployPayloadPlanOptions extends MrvDeployPayloadRequestOptions {
|
|
1244
|
+
artifactHash?: string;
|
|
1245
|
+
}
|
|
1246
|
+
interface MrvDeployPlan {
|
|
1247
|
+
request: MrvDeployRequest;
|
|
1248
|
+
extension: MrvTransactionExtension;
|
|
1249
|
+
expectedContractAddress?: string;
|
|
1250
|
+
}
|
|
1251
|
+
interface MrvCallPlan {
|
|
1252
|
+
request: MrvCallRequest;
|
|
1253
|
+
extension: MrvTransactionExtension;
|
|
1254
|
+
}
|
|
1255
|
+
type MrvDeployNativeTxOptions = Omit<MrvDeployPlanOptions, "executionUnitLimit" | "maxExecutionFeeLythoshi" | "nonce"> & {
|
|
1256
|
+
chainId: number | bigint;
|
|
1257
|
+
nonce: number | bigint;
|
|
1258
|
+
executionUnitLimit: number | bigint;
|
|
1259
|
+
maxExecutionFeeLythoshi: MrvDecimalLike;
|
|
1260
|
+
};
|
|
1261
|
+
type MrvDeployPayloadNativeTxOptions = Omit<MrvDeployPayloadPlanOptions, "executionUnitLimit" | "maxExecutionFeeLythoshi" | "nonce"> & {
|
|
1262
|
+
chainId: number | bigint;
|
|
1263
|
+
nonce: number | bigint;
|
|
1264
|
+
executionUnitLimit: number | bigint;
|
|
1265
|
+
maxExecutionFeeLythoshi: MrvDecimalLike;
|
|
1266
|
+
};
|
|
1267
|
+
type MrvCallNativeTxOptions = Omit<MrvRequestBuildOptions, "executionUnitLimit" | "maxExecutionFeeLythoshi" | "nonce"> & {
|
|
1268
|
+
chainId: number | bigint;
|
|
1269
|
+
nonce: number | bigint;
|
|
1270
|
+
executionUnitLimit: number | bigint;
|
|
1271
|
+
maxExecutionFeeLythoshi: MrvDecimalLike;
|
|
1272
|
+
};
|
|
1273
|
+
interface MrvNativeTxFacade {
|
|
1274
|
+
chainId: bigint;
|
|
1275
|
+
nonce: bigint;
|
|
1276
|
+
valueLythoshi: string;
|
|
1277
|
+
executionUnitLimit: bigint;
|
|
1278
|
+
maxExecutionFeeLythoshi: string;
|
|
1279
|
+
priorityTipLythoshi: string;
|
|
1280
|
+
}
|
|
1281
|
+
interface MrvNativeFeePreview {
|
|
1282
|
+
totalLythoshi: string;
|
|
1283
|
+
totalLyth: string;
|
|
1284
|
+
cyclesUsed: bigint;
|
|
1285
|
+
executionUnitLimit: bigint;
|
|
1286
|
+
maxExecutionFeeLythoshi: string;
|
|
1287
|
+
priorityTipLythoshi: string;
|
|
1288
|
+
}
|
|
1289
|
+
interface MrvDeployNativeTxPlan extends MrvDeployPlan {
|
|
1290
|
+
nativeTx: MrvNativeTxFacade;
|
|
1291
|
+
feePreview: MrvNativeFeePreview;
|
|
1292
|
+
tx: NativeEvmTxFields;
|
|
1293
|
+
}
|
|
1294
|
+
interface MrvCallNativeTxPlan extends MrvCallPlan {
|
|
1295
|
+
nativeTx: MrvNativeTxFacade;
|
|
1296
|
+
feePreview: MrvNativeFeePreview;
|
|
1297
|
+
tx: NativeEvmTxFields;
|
|
1298
|
+
}
|
|
1299
|
+
interface MrvEncryptedSubmissionResult {
|
|
1300
|
+
envelopeWireHex: string;
|
|
1301
|
+
innerSighashHex: string;
|
|
1302
|
+
innerTxHashHex: string;
|
|
1303
|
+
innerWireBytes: number;
|
|
1304
|
+
txHash: string;
|
|
1305
|
+
}
|
|
1306
|
+
type MrvDeploySubmitOptions = MrvDeployNativeTxOptions & {
|
|
1307
|
+
encryptionKey?: EncryptionKey;
|
|
1308
|
+
class?: MempoolClass;
|
|
1309
|
+
};
|
|
1310
|
+
type MrvDeployPayloadSubmitOptions = MrvDeployPayloadNativeTxOptions & {
|
|
1311
|
+
encryptionKey?: EncryptionKey;
|
|
1312
|
+
class?: MempoolClass;
|
|
1313
|
+
};
|
|
1314
|
+
type MrvCallSubmitOptions = MrvCallNativeTxOptions & {
|
|
1315
|
+
encryptionKey?: EncryptionKey;
|
|
1316
|
+
class?: MempoolClass;
|
|
1317
|
+
};
|
|
1318
|
+
type MrvDeploySubmission = MrvDeployNativeTxPlan & MrvEncryptedSubmissionResult;
|
|
1319
|
+
type MrvDeployPayloadSubmission = MrvDeployNativeTxPlan & MrvEncryptedSubmissionResult;
|
|
1320
|
+
type MrvCallSubmission = MrvCallNativeTxPlan & MrvEncryptedSubmissionResult;
|
|
1321
|
+
declare const MRV_FORMAT_VERSION: 1;
|
|
1322
|
+
declare const MRV_DEPLOY_PAYLOAD_VERSION: 1;
|
|
1323
|
+
declare const MRV_PROFILE_MONO_RV32IM_V1: "mono_rv32im_v1";
|
|
1324
|
+
declare const MRV_MEMORY_PAGE_BYTES: 65536;
|
|
1325
|
+
declare const MRV_MAX_CODE_BYTES: number;
|
|
1326
|
+
declare const MRV_MAX_DEBUG_BYTES: number;
|
|
1327
|
+
declare const MRV_MAX_MEMORY_PAGES: 1024;
|
|
1328
|
+
declare const MRV_MAX_ABI_SYMBOLS: 1024;
|
|
1329
|
+
declare const MRV_MAX_STORAGE_NAMESPACE_BYTES: 64;
|
|
1330
|
+
declare const LYTH_DECIMALS: 8;
|
|
1331
|
+
declare const NATIVE_LYTH_DECIMALS: 8;
|
|
1332
|
+
declare const LYTHOSHI_PER_LYTH = 100000000n;
|
|
1333
|
+
declare const MRV_TX_EXTENSION_KIND: 48;
|
|
1334
|
+
declare const MRV_TX_EXTENSION_V1: 1;
|
|
1335
|
+
declare class MrvValidationError extends Error {
|
|
1336
|
+
constructor(message: string);
|
|
1337
|
+
}
|
|
1338
|
+
interface LythFormatOptions {
|
|
1339
|
+
includeUnit?: boolean;
|
|
1340
|
+
}
|
|
1341
|
+
declare const MRV_STRUCTURED_FEE_FIELDS: readonly ["total_lythoshi", "cycles_used", "base_price_per_cycle_lythoshi", "state_io_units", "state_io_price_per_unit_lythoshi", "priority_tip_lythoshi"];
|
|
1342
|
+
interface MrvFeeDisplayConformanceInput {
|
|
1343
|
+
expectedTotalLythoshi: MrvDecimalLike;
|
|
1344
|
+
defaultFeeText: string;
|
|
1345
|
+
detailTexts?: readonly string[];
|
|
1346
|
+
structuredFee?: unknown;
|
|
1347
|
+
customFeeInputVisible?: boolean;
|
|
1348
|
+
speedUpCancelVisible?: boolean;
|
|
1349
|
+
}
|
|
1350
|
+
interface MrvFeeDisplayConformanceReport {
|
|
1351
|
+
passed: boolean;
|
|
1352
|
+
failures: string[];
|
|
1353
|
+
expectedDefaultFeeText: string;
|
|
1354
|
+
}
|
|
1355
|
+
interface MrvStructuredFeeConformanceOptions {
|
|
1356
|
+
expectedTotalLythoshi?: MrvDecimalLike;
|
|
1357
|
+
label?: string;
|
|
1358
|
+
}
|
|
1359
|
+
interface MrvStructuredFeeConformanceReport {
|
|
1360
|
+
passed: boolean;
|
|
1361
|
+
failures: string[];
|
|
1362
|
+
}
|
|
1363
|
+
interface NativeReceiptFeeDisplay {
|
|
1364
|
+
defaultFeeText: string;
|
|
1365
|
+
detailTexts: string[];
|
|
1366
|
+
totalLythoshi: string;
|
|
1367
|
+
totalLyth: string;
|
|
1368
|
+
}
|
|
1369
|
+
declare function formatLyth(lythoshi: MrvDecimalLike, options?: LythFormatOptions): string;
|
|
1370
|
+
declare function formatLythoshi(lythoshi: MrvDecimalLike, options?: LythFormatOptions): string;
|
|
1371
|
+
declare function parseLythToLythoshi(input: string): bigint;
|
|
1372
|
+
declare function checkMrvFeeDisplayConformance(input: MrvFeeDisplayConformanceInput): MrvFeeDisplayConformanceReport;
|
|
1373
|
+
declare function checkMrvStructuredFeeConformance(value: unknown, options?: MrvStructuredFeeConformanceOptions): MrvStructuredFeeConformanceReport;
|
|
1374
|
+
declare function assertMrvStructuredFeeConformance(value: unknown, options?: MrvStructuredFeeConformanceOptions): asserts value is NativeReceiptFee;
|
|
1375
|
+
declare function assertMrvFeeDisplayConformance(input: MrvFeeDisplayConformanceInput): void;
|
|
1376
|
+
declare function formatNativeReceiptFeeDisplay(fee: Pick<NativeReceiptFee, "total_lythoshi" | "cycles_used" | "state_io_units" | "base_price_per_cycle_lythoshi" | "state_io_price_per_unit_lythoshi" | "priority_tip_lythoshi">): NativeReceiptFeeDisplay;
|
|
1377
|
+
declare function mrvCodeHashHex(code: MrvBytesLike): string;
|
|
1378
|
+
declare function mrvV1TransactionExtension(): MrvTransactionExtension;
|
|
1379
|
+
declare function encodeMrvDeployPayload(artifactBytes: MrvBytesLike, constructorInput?: MrvBytesLike | null): string;
|
|
1380
|
+
declare function mrvAddressToBech32(kind: MrvAddressKind, bytes: MrvBytesLike): string;
|
|
1381
|
+
declare function mrvBech32ToAddress(address: string, expectedKind?: MrvAddressKind): TypedAddress;
|
|
1382
|
+
declare function deriveMrvContractAddress(deployerAddress: string, deployerNonce: number | bigint, artifactHashHex: string): string;
|
|
1383
|
+
declare function validateMrvArtifactMetadata(metadata: MrvArtifactMetadata, code: MrvBytesLike): MrvValidatedArtifactMetadata;
|
|
1384
|
+
declare function validateMrvDeployRequest(request: MrvDeployRequest): void;
|
|
1385
|
+
declare function validateMrvCallRequest(request: MrvCallRequest): void;
|
|
1386
|
+
declare function buildMrvDeployRequest(artifactBytes: MrvBytesLike, options?: MrvRequestBuildOptions): MrvDeployRequest;
|
|
1387
|
+
declare function buildMrvDeployPayloadRequest(artifactBytes: MrvBytesLike, options?: MrvDeployPayloadRequestOptions): MrvDeployRequest;
|
|
1388
|
+
declare function buildMrvCallRequest(contractAddress: string, input?: MrvBytesLike, options?: MrvRequestBuildOptions): MrvCallRequest;
|
|
1389
|
+
declare function buildMrvDeployPlan(artifactBytes: MrvBytesLike, options?: MrvDeployPlanOptions): MrvDeployPlan;
|
|
1390
|
+
declare function buildMrvDeployPayloadPlan(artifactBytes: MrvBytesLike, options?: MrvDeployPayloadPlanOptions): MrvDeployPlan;
|
|
1391
|
+
declare function buildMrvCallPlan(contractAddress: string, input?: MrvBytesLike, options?: MrvRequestBuildOptions): MrvCallPlan;
|
|
1392
|
+
declare function buildMrvDeployNativeTxPlan(artifactBytes: MrvBytesLike, options: MrvDeployNativeTxOptions): MrvDeployNativeTxPlan;
|
|
1393
|
+
declare function buildMrvDeployPayloadNativeTxPlan(artifactBytes: MrvBytesLike, options: MrvDeployPayloadNativeTxOptions): MrvDeployNativeTxPlan;
|
|
1394
|
+
declare function buildMrvCallNativeTxPlan(contractAddress: string, input: MrvBytesLike, options: MrvCallNativeTxOptions): MrvCallNativeTxPlan;
|
|
1395
|
+
declare function assertMrvDeployNativeSubmissionPlan(plan: MrvDeployNativeTxPlan): void;
|
|
1396
|
+
declare function assertMrvCallNativeSubmissionPlan(plan: MrvCallNativeTxPlan): void;
|
|
1397
|
+
declare function submitMrvDeployNativeTx(client: RpcClient, backend: MlDsa65Backend, artifactBytes: MrvBytesLike, options: MrvDeploySubmitOptions): Promise<MrvDeploySubmission>;
|
|
1398
|
+
declare function submitMrvDeployPayloadNativeTx(client: RpcClient, backend: MlDsa65Backend, artifactBytes: MrvBytesLike, options: MrvDeployPayloadSubmitOptions): Promise<MrvDeployPayloadSubmission>;
|
|
1399
|
+
declare function submitMrvCallNativeTx(client: RpcClient, backend: MlDsa65Backend, contractAddress: string, input: MrvBytesLike, options: MrvCallSubmitOptions): Promise<MrvCallSubmission>;
|
|
1400
|
+
|
|
369
1401
|
/**
|
|
370
1402
|
* Error surfaced by `RpcClient`. Distinguishes transport failures
|
|
371
1403
|
* (HTTP errors, network), protocol errors (JSON-RPC `error` envelopes),
|
|
@@ -407,14 +1439,15 @@ declare class SdkError extends Error {
|
|
|
407
1439
|
*/
|
|
408
1440
|
declare const BURN_ADDR: "0x0000000000000000000000000000000000000000";
|
|
409
1441
|
/**
|
|
410
|
-
* SDK-exposed precompile address map
|
|
1442
|
+
* SDK-exposed native/precompile address map for the current v4.1 surface.
|
|
411
1443
|
*
|
|
412
1444
|
* Sourced from `mono-core` runtime/precompile constants and pinned here
|
|
413
1445
|
* so surfaces can render precompile traffic by name without
|
|
414
1446
|
* re-defining low-band address literals.
|
|
415
1447
|
*
|
|
416
1448
|
* `0x1002` and `0x1006` are intentionally absent from the SDK surface
|
|
417
|
-
* because
|
|
1449
|
+
* because the current v4.1 launch surface does not define those application
|
|
1450
|
+
* modules.
|
|
418
1451
|
*/
|
|
419
1452
|
declare const PRECOMPILE_ADDRESSES: {
|
|
420
1453
|
/** Native fungible-token factory — non-gateable, foundational. */
|
|
@@ -519,22 +1552,27 @@ declare function serviceProbeStatusLabel(status: number): string;
|
|
|
519
1552
|
declare function encodeReportServiceProbeCalldata(args: ReportServiceProbeCalldataArgs): string;
|
|
520
1553
|
|
|
521
1554
|
/**
|
|
522
|
-
*
|
|
1555
|
+
* Delegation precompile ABI helpers.
|
|
523
1556
|
*
|
|
524
|
-
*
|
|
525
|
-
*
|
|
1557
|
+
* The V4.1 redemption completion call prunes a matured redemption
|
|
1558
|
+
* queue ticket. It does not imply principal payout until mono-core adds
|
|
1559
|
+
* stake-vault/redemption-escrow accounting.
|
|
526
1560
|
*/
|
|
527
|
-
declare const
|
|
528
|
-
|
|
1561
|
+
declare const DELEGATION_SELECTORS: {
|
|
1562
|
+
readonly completeRedemption: "0x26169d0a";
|
|
1563
|
+
};
|
|
1564
|
+
declare const DELEGATION_REVERT_TAGS: {
|
|
1565
|
+
readonly redemptionQueueFull: "0x020e";
|
|
1566
|
+
readonly redemptionTicketNotFound: "0x020f";
|
|
1567
|
+
readonly redemptionNotMature: "0x0210";
|
|
1568
|
+
readonly redemptionPrincipalUnavailable: "0x0211";
|
|
1569
|
+
};
|
|
1570
|
+
declare class DelegationPrecompileError extends Error {
|
|
529
1571
|
constructor(message: string);
|
|
530
1572
|
}
|
|
531
|
-
declare function
|
|
532
|
-
declare function
|
|
533
|
-
declare function
|
|
534
|
-
declare function bech32ToAddressBytes(address: string): Uint8Array;
|
|
535
|
-
declare function bech32ToAddress(address: string): string;
|
|
536
|
-
declare function parseAddress(address: string): Uint8Array;
|
|
537
|
-
declare function normalizeAddressHex(address: string): string;
|
|
1573
|
+
declare function delegationAddressHex(): string;
|
|
1574
|
+
declare function encodeCompleteRedemptionCalldata(index: bigint | number | string): string;
|
|
1575
|
+
declare function isRedemptionPrincipalUnavailableRevert(data: string | Uint8Array | readonly number[]): boolean;
|
|
538
1576
|
|
|
539
1577
|
/**
|
|
540
1578
|
* Spending-policy precompile ABI helpers.
|
|
@@ -558,10 +1596,12 @@ declare const SPENDING_POLICY_SELECTORS: {
|
|
|
558
1596
|
readonly recordSpend: "0xdca04292";
|
|
559
1597
|
};
|
|
560
1598
|
interface SpendingPolicyArgs {
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
1599
|
+
/** Typed `mono` bech32m sub-account address. */
|
|
1600
|
+
subAccount: string;
|
|
1601
|
+
/** Typed `mono` bech32m principal address. */
|
|
1602
|
+
principal: string;
|
|
1603
|
+
dailyCapLythoshi: bigint | number | string;
|
|
1604
|
+
perTxCapLythoshi: bigint | number | string;
|
|
565
1605
|
allowRoot: string | Uint8Array | readonly number[];
|
|
566
1606
|
denyRoot: string | Uint8Array | readonly number[];
|
|
567
1607
|
}
|
|
@@ -576,8 +1616,8 @@ declare function composeClaimBoundMessage(chainId: bigint | number | string, arg
|
|
|
576
1616
|
declare function encodeSetPolicyCalldata(args: SpendingPolicyArgs): string;
|
|
577
1617
|
declare function encodeSetPolicyClaimCalldata(args: SpendingPolicyArgs, subAccountPubkey: Uint8Array | readonly number[] | string, subAccountSig: Uint8Array | readonly number[] | string): string;
|
|
578
1618
|
declare function encodeClaimPolicyByAddressCalldata(args: SpendingPolicyArgs, subAccountSig: Uint8Array | readonly number[] | string): string;
|
|
579
|
-
declare function encodeEnableCalldata(subAccount: string
|
|
580
|
-
declare function encodeDisableCalldata(subAccount: string
|
|
1619
|
+
declare function encodeEnableCalldata(subAccount: string): string;
|
|
1620
|
+
declare function encodeDisableCalldata(subAccount: string): string;
|
|
581
1621
|
|
|
582
1622
|
/**
|
|
583
1623
|
* Pubkey-registry precompile ABI helpers.
|
|
@@ -601,349 +1641,518 @@ declare class PubkeyRegistryError extends Error {
|
|
|
601
1641
|
}
|
|
602
1642
|
declare function pubkeyRegistryAddressHex(): string;
|
|
603
1643
|
declare function encodeRegisterPubkeyCalldata(pubkey: Uint8Array | readonly number[] | string): string;
|
|
604
|
-
declare function encodeLookupPubkeyCalldata(address: string
|
|
605
|
-
declare function encodeHasPubkeyCalldata(address: string
|
|
1644
|
+
declare function encodeLookupPubkeyCalldata(address: string): string;
|
|
1645
|
+
declare function encodeHasPubkeyCalldata(address: string): string;
|
|
606
1646
|
declare function decodeLookupPubkeyReturn(data: Uint8Array | readonly number[] | string): PubkeyLookup;
|
|
607
1647
|
declare function decodeHasPubkeyReturn(data: Uint8Array | readonly number[] | string): boolean;
|
|
608
1648
|
|
|
609
1649
|
/**
|
|
610
|
-
*
|
|
611
|
-
*
|
|
612
|
-
* Per whitepaper v4.0, Monolythium testnet `chain_id` is **`69420`**.
|
|
613
|
-
* Mainnet chain id is reserved for the genesis ceremony and not yet
|
|
614
|
-
* exported.
|
|
615
|
-
*/
|
|
616
|
-
/** Monolythium v4.0 testnet chain id. */
|
|
617
|
-
declare const MONOLYTHIUM_TESTNET_CHAIN_ID = 69420n;
|
|
618
|
-
/** Network name surfaced to ethers `Network` instances. */
|
|
619
|
-
declare const MONOLYTHIUM_TESTNET_NETWORK_NAME = "monolythium-testnet";
|
|
620
|
-
/**
|
|
621
|
-
* Built-in network presets for the ethers shim. Callers that point at a
|
|
622
|
-
* different chain id (e.g. a local dev node) construct `MonolythiumProvider`
|
|
623
|
-
* with an explicit `network` option instead.
|
|
624
|
-
*/
|
|
625
|
-
declare const MONOLYTHIUM_NETWORKS: {
|
|
626
|
-
readonly testnet: {
|
|
627
|
-
readonly chainId: 69420n;
|
|
628
|
-
readonly name: "monolythium-testnet";
|
|
629
|
-
};
|
|
630
|
-
};
|
|
631
|
-
/** Configuration object accepted by the ethers shim factory functions. */
|
|
632
|
-
interface MonolythiumNetworkConfig {
|
|
633
|
-
/** Numeric chain id (e.g. `69420n`). */
|
|
634
|
-
chainId: bigint;
|
|
635
|
-
/** Human-readable network name. */
|
|
636
|
-
name: string;
|
|
637
|
-
}
|
|
638
|
-
|
|
639
|
-
/**
|
|
640
|
-
* `MonolythiumProvider` — ethers v6 `JsonRpcApiProvider` that routes
|
|
641
|
-
* every call through the native `RpcClient`.
|
|
642
|
-
*
|
|
643
|
-
* `JsonRpcApiProvider` already knows how to translate the rich
|
|
644
|
-
* `_perform(req)` surface into the standard `eth_*` JSON-RPC calls,
|
|
645
|
-
* so we only need to override `_send`: instead of opening its own
|
|
646
|
-
* fetch transport, we reuse the SDK's transport and `lyth_*`-aware
|
|
647
|
-
* error handling.
|
|
648
|
-
*
|
|
649
|
-
* That keeps a single transport in the process — no double-counted
|
|
650
|
-
* connection pools, no duplicated retry/backoff logic, and any
|
|
651
|
-
* future SDK-side feature (auth headers, ws upgrade, registry-based
|
|
652
|
-
* routing) lights up for ethers callers automatically.
|
|
1650
|
+
* Native market transaction-plan builders.
|
|
653
1651
|
*
|
|
654
|
-
*
|
|
655
|
-
*
|
|
656
|
-
* existing `eth_*` namespace in ethers' interface so existing
|
|
657
|
-
* Solidity tooling (Hardhat, Foundry, ethers-based dApps) can target
|
|
658
|
-
* Monolythium without code rewrites.
|
|
1652
|
+
* These helpers only build signer-ready transaction requests or native module
|
|
1653
|
+
* call material. They do not predict fills, trades, or execution success.
|
|
659
1654
|
*/
|
|
660
1655
|
|
|
661
|
-
|
|
662
|
-
|
|
1656
|
+
declare const CLOB_MARKET_ID_DOMAIN_TAG: 193;
|
|
1657
|
+
declare const NATIVE_MARKET_MODULE_ADDRESS_BYTES: "0x4d41524b45545f4e41544956455f4d4f445f5631";
|
|
1658
|
+
declare const NATIVE_MARKET_MODULE_ADDRESS: string;
|
|
1659
|
+
declare const NATIVE_CALL_FORWARDER_ARTIFACT_PROFILE: "native-call-forwarder-v1";
|
|
1660
|
+
declare const NATIVE_CALL_FORWARDER_RESPONSE_OFFSET: 768;
|
|
1661
|
+
declare const NATIVE_CALL_FORWARDER_RESPONSE_CAPACITY: 256;
|
|
1662
|
+
declare const MAX_NATIVE_CALL_FORWARDER_REQUEST_BYTES: 2047;
|
|
1663
|
+
declare const CLOB_SELECTORS: {
|
|
663
1664
|
/**
|
|
664
|
-
*
|
|
665
|
-
*
|
|
666
|
-
* `
|
|
1665
|
+
* `placeLimitOrder(bytes32,bytes32,uint8,uint256,uint256,uint64)`
|
|
1666
|
+
*
|
|
1667
|
+
* Args: `baseTokenId, quoteTokenId, side, price, amount, expiresAtBlock`.
|
|
667
1668
|
*/
|
|
668
|
-
|
|
669
|
-
}
|
|
670
|
-
/**
|
|
671
|
-
* `MonolythiumProvider` adapts `mono-core`'s JSON-RPC surface to
|
|
672
|
-
* ethers v6.
|
|
673
|
-
*
|
|
674
|
-
* Use it the same way you'd use any ethers provider:
|
|
675
|
-
*
|
|
676
|
-
* ```ts
|
|
677
|
-
* import { MonolythiumProvider } from "@monolythium/core-sdk";
|
|
678
|
-
*
|
|
679
|
-
* const provider = new MonolythiumProvider("https://rpc.testnet.monolythium.com");
|
|
680
|
-
* const block = await provider.getBlockNumber();
|
|
681
|
-
* ```
|
|
682
|
-
*
|
|
683
|
-
* Anything ethers normally does — `getBlockNumber`, `getBalance`,
|
|
684
|
-
* `getTransactionReceipt`, `call`, `estimateGas`, `broadcastTransaction`
|
|
685
|
-
* — flows through `RpcClient.call` (which already handles JSON-RPC
|
|
686
|
-
* error envelopes via `SdkError`).
|
|
687
|
-
*/
|
|
688
|
-
declare class MonolythiumProvider extends JsonRpcApiProvider {
|
|
689
|
-
#private;
|
|
690
|
-
/** Underlying SDK client. Exposed for callers that want native types. */
|
|
691
|
-
readonly rpcClient: RpcClient;
|
|
692
|
-
constructor(endpointOrClient: string | RpcClient, options?: MonolythiumProviderOptions);
|
|
1669
|
+
readonly placeLimitOrder: "0x2468786f";
|
|
693
1670
|
/**
|
|
694
|
-
*
|
|
695
|
-
*
|
|
696
|
-
*
|
|
697
|
-
* (e.g. `lyth_*`).
|
|
1671
|
+
* `placeMarketOrder(bytes32,bytes32,uint8,uint256,uint16)`
|
|
1672
|
+
*
|
|
1673
|
+
* Args: `baseTokenId, quoteTokenId, side, quantity, maxSlippageBps`.
|
|
698
1674
|
*/
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
* a hard ethers dependency on either the chain side or the
|
|
718
|
-
* consumer side.
|
|
719
|
-
*
|
|
720
|
-
* The address derivation rule for any backend is **Law §2.6**:
|
|
721
|
-
* `keccak256(canonical_pubkey_bytes)[12..32]`, with algo-tagged domain
|
|
722
|
-
* separation. For secp256k1 (the ethers Wallet path) this collapses
|
|
723
|
-
* to the standard Ethereum derivation that `ethers.computeAddress`
|
|
724
|
-
* already implements — so wallets the user already has work as-is.
|
|
725
|
-
*
|
|
726
|
-
* **What the shim is not.** This is SDK-level compat (per
|
|
727
|
-
* `feedback_no_ethereum_wire_retrofit.md`). The chain's protocol-native
|
|
728
|
-
* signing path is ML-DSA-65 (Law §2.1); ethers cannot produce ML-DSA
|
|
729
|
-
* signatures, and the chain accepts secp256k1 only via the
|
|
730
|
-
* crypto-agile `SignedTransaction` envelope. Use
|
|
731
|
-
* `MonolythiumSignerBackend` to plug a native ML-DSA path in.
|
|
732
|
-
*/
|
|
733
|
-
|
|
734
|
-
/**
|
|
735
|
-
* Backend the `MonolythiumSigner` delegates signing to.
|
|
736
|
-
*
|
|
737
|
-
* The intent is to let consumers wire up any signing source — local
|
|
738
|
-
* keystore, OS keychain, hardware wallet, or a future ML-DSA-65
|
|
739
|
-
* adapter — without the shim forcing a particular implementation.
|
|
740
|
-
*
|
|
741
|
-
* Every method's return shape mirrors what ethers'
|
|
742
|
-
* `AbstractSigner` callers expect, so the backend can compose with
|
|
743
|
-
* any tooling built on ethers.
|
|
744
|
-
*/
|
|
745
|
-
interface MonolythiumSignerBackend {
|
|
746
|
-
/** Resolves to the 20-byte 0x-hex address (Law §2.6 derivation). */
|
|
747
|
-
getAddress(): Promise<string>;
|
|
1675
|
+
readonly placeMarketOrder: "0xb9b1fa86";
|
|
1676
|
+
/**
|
|
1677
|
+
* `placeMarketOrderEx(bytes32,bytes32,uint8,uint256,uint16,uint8)`
|
|
1678
|
+
*
|
|
1679
|
+
* Args: `baseTokenId, quoteTokenId, side, quantity, maxSlippageBps, mode`.
|
|
1680
|
+
*/
|
|
1681
|
+
readonly placeMarketOrderEx: "0xa6f092f0";
|
|
1682
|
+
/** `cancelOrder(bytes32)` */
|
|
1683
|
+
readonly cancelOrder: "0x7489ec23";
|
|
1684
|
+
};
|
|
1685
|
+
type SpotLimitOrderSide = "buy" | "sell";
|
|
1686
|
+
type SpotMarketOrderMode = "fill-or-refund" | "fill-or-rest-at-cap";
|
|
1687
|
+
type NativeMarketAddressKind = AddressKind;
|
|
1688
|
+
type NativeMarketAddressInput = string | {
|
|
1689
|
+
kind?: NativeMarketAddressKind;
|
|
1690
|
+
address: string;
|
|
1691
|
+
};
|
|
1692
|
+
interface PlaceSpotLimitOrderArgs {
|
|
748
1693
|
/**
|
|
749
|
-
*
|
|
750
|
-
*
|
|
751
|
-
* `eth_sendRawTransaction` expects.
|
|
1694
|
+
* Canonical 32-byte CLOB market id, derived as
|
|
1695
|
+
* `keccak256(0xC1 || baseTokenId || quoteTokenId)`.
|
|
752
1696
|
*/
|
|
753
|
-
|
|
1697
|
+
marketId: string;
|
|
1698
|
+
/** 32-byte base token id accepted by the CLOB precompile. */
|
|
1699
|
+
baseTokenId: string;
|
|
1700
|
+
/** 32-byte quote token id accepted by the CLOB precompile. */
|
|
1701
|
+
quoteTokenId: string;
|
|
1702
|
+
/** `buy` maps to side byte `0`; `sell` maps to side byte `1`. */
|
|
1703
|
+
side: SpotLimitOrderSide;
|
|
1704
|
+
/** Positive integer decimal string encoded as uint256. */
|
|
1705
|
+
price: string;
|
|
1706
|
+
/** Positive integer decimal string encoded as uint256 amount. */
|
|
1707
|
+
quantity: string;
|
|
1708
|
+
/** Optional uint64 block height; omitted means `0` / no explicit expiry. */
|
|
1709
|
+
expiryBlock?: string | number | bigint;
|
|
1710
|
+
}
|
|
1711
|
+
interface PlaceSpotMarketOrderArgs {
|
|
754
1712
|
/**
|
|
755
|
-
*
|
|
756
|
-
*
|
|
1713
|
+
* Canonical 32-byte CLOB market id, derived as
|
|
1714
|
+
* `keccak256(0xC1 || baseTokenId || quoteTokenId)`.
|
|
757
1715
|
*/
|
|
758
|
-
|
|
759
|
-
/**
|
|
760
|
-
|
|
1716
|
+
marketId: string;
|
|
1717
|
+
/** 32-byte base token id accepted by the CLOB precompile. */
|
|
1718
|
+
baseTokenId: string;
|
|
1719
|
+
/** 32-byte quote token id accepted by the CLOB precompile. */
|
|
1720
|
+
quoteTokenId: string;
|
|
1721
|
+
/** `buy` maps to side byte `0`; `sell` maps to side byte `1`. */
|
|
1722
|
+
side: SpotLimitOrderSide;
|
|
1723
|
+
/** Positive integer decimal string encoded as uint256 amount. */
|
|
1724
|
+
quantity: string;
|
|
1725
|
+
/** Slippage bound in basis points; must be less than 10,000. */
|
|
1726
|
+
maxSlippageBps: string | number | bigint;
|
|
761
1727
|
}
|
|
762
|
-
|
|
763
|
-
* `MonolythiumSigner` — ethers v6 `Signer` for the Monolythium chain.
|
|
764
|
-
*
|
|
765
|
-
* Construct one of three ways:
|
|
766
|
-
*
|
|
767
|
-
* 1. `MonolythiumSigner.fromEthersWallet(wallet, provider)` — the
|
|
768
|
-
* fastest path; wraps a normal `ethers.Wallet`.
|
|
769
|
-
* 2. `new MonolythiumSigner(backend, provider)` — supply any object
|
|
770
|
-
* implementing `MonolythiumSignerBackend`.
|
|
771
|
-
*
|
|
772
|
-
* The signer is fully spec-compatible with ethers v6 — it can be
|
|
773
|
-
* passed anywhere a `Signer` is accepted (e.g.
|
|
774
|
-
* `new ethers.Contract(address, abi, signer)`), and works with
|
|
775
|
-
* `Contract.deploy`, `Contract.call`, all ContractFactory paths,
|
|
776
|
-
* and `provider.broadcastTransaction(signed)`.
|
|
777
|
-
*/
|
|
778
|
-
declare class MonolythiumSigner extends AbstractSigner<Provider | null> {
|
|
779
|
-
#private;
|
|
780
|
-
constructor(backend: MonolythiumSignerBackend, provider?: Provider | null);
|
|
1728
|
+
interface PlaceSpotMarketOrderExArgs extends PlaceSpotMarketOrderArgs {
|
|
781
1729
|
/**
|
|
782
|
-
*
|
|
783
|
-
*
|
|
784
|
-
* `MonolythiumSignerBackend` for the common test / dev path.
|
|
785
|
-
*
|
|
786
|
-
* Both `new Wallet(privateKey)` and `Wallet.createRandom()` /
|
|
787
|
-
* `HDNodeWallet.fromMnemonic(...)` are accepted.
|
|
1730
|
+
* `fill-or-refund` keeps legacy market-order semantics; `fill-or-rest-at-cap`
|
|
1731
|
+
* rests the unfilled remainder at the slippage cap.
|
|
788
1732
|
*/
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
1733
|
+
mode: SpotMarketOrderMode;
|
|
1734
|
+
}
|
|
1735
|
+
interface CancelSpotOrderArgs {
|
|
1736
|
+
/** 32-byte order id returned by the CLOB precompile. */
|
|
1737
|
+
orderId: string;
|
|
1738
|
+
}
|
|
1739
|
+
interface EncodeNativeSpotLimitOrderArgs {
|
|
1740
|
+
/** 32-byte native spot market id. */
|
|
1741
|
+
marketId: string;
|
|
1742
|
+
/** Owner typed bech32m MonoAddress; optional object `kind` asserts the expected HRP. */
|
|
1743
|
+
owner: NativeMarketAddressInput;
|
|
1744
|
+
/** Per-owner order nonce encoded as uint64. */
|
|
1745
|
+
nonce: string | number | bigint;
|
|
1746
|
+
/** `buy` maps to native `OrderSide::Bid`; `sell` maps to native `OrderSide::Ask`. */
|
|
1747
|
+
side: SpotLimitOrderSide;
|
|
1748
|
+
/** Positive integer decimal string encoded as native MrcAmount/u128. */
|
|
1749
|
+
price: string;
|
|
1750
|
+
/** Positive integer decimal string encoded as native MrcAmount/u128. */
|
|
1751
|
+
quantity: string;
|
|
1752
|
+
/** uint64 expiry block encoded as `expires_at_block`. */
|
|
1753
|
+
expiresAtBlock: string | number | bigint;
|
|
1754
|
+
}
|
|
1755
|
+
interface EncodeNativeSpotCreateMarketArgs {
|
|
1756
|
+
/** Market owner typed bech32m MonoAddress; optional object `kind` asserts the expected HRP. */
|
|
1757
|
+
owner: NativeMarketAddressInput;
|
|
1758
|
+
/** Owner-local market nonce encoded as uint64. */
|
|
1759
|
+
nonce: string | number | bigint;
|
|
1760
|
+
/** 32-byte base asset id. */
|
|
1761
|
+
baseAsset: string;
|
|
1762
|
+
/** 32-byte quote asset id. */
|
|
1763
|
+
quoteAsset: string;
|
|
1764
|
+
/** Positive integer decimal string encoded as native MrcAmount/u128. */
|
|
1765
|
+
tickSize: string;
|
|
1766
|
+
/** Positive integer decimal string encoded as native MrcAmount/u128. */
|
|
1767
|
+
lotSize: string;
|
|
1768
|
+
/** Positive integer decimal string encoded as native MrcAmount/u128. */
|
|
1769
|
+
minQuantity: string;
|
|
1770
|
+
/** Nonnegative integer decimal string encoded as native MrcAmount/u128; 0 disables the floor. */
|
|
1771
|
+
minNotional: string;
|
|
1772
|
+
}
|
|
1773
|
+
interface EncodeNativeSpotCancelOrderArgs {
|
|
1774
|
+
/** 32-byte native order id. */
|
|
1775
|
+
orderId: string;
|
|
1776
|
+
/** Caller typed bech32m MonoAddress; optional object `kind` asserts the expected HRP. */
|
|
1777
|
+
caller: NativeMarketAddressInput;
|
|
1778
|
+
}
|
|
1779
|
+
interface EncodeNativeSpotSettleLimitOrderArgs {
|
|
1780
|
+
/** Resting maker order id to match. */
|
|
1781
|
+
makerOrderId: string;
|
|
1782
|
+
/** Taker limit order parameters. */
|
|
1783
|
+
takerOrder: EncodeNativeSpotLimitOrderArgs;
|
|
1784
|
+
}
|
|
1785
|
+
interface EncodeNativeSpotSettleRoutedLimitOrderArgs {
|
|
1786
|
+
/** Resting maker order ids in deterministic settlement order; mono-core accepts 1..64 ids. */
|
|
1787
|
+
makerOrderIds: readonly string[];
|
|
1788
|
+
/** Taker limit order parameters. */
|
|
1789
|
+
takerOrder: EncodeNativeSpotLimitOrderArgs;
|
|
795
1790
|
}
|
|
1791
|
+
type NativeNftAssetStandard = "mrc721" | "mrc1155";
|
|
1792
|
+
type NativeNftListingKind = "fixed-price" | {
|
|
1793
|
+
english: {
|
|
1794
|
+
/** Minimum starting bid encoded as native MrcAmount/u128. */
|
|
1795
|
+
reserve: string;
|
|
1796
|
+
/** Auction end block encoded as uint64. */
|
|
1797
|
+
endBlock: string | number | bigint;
|
|
1798
|
+
/** Minimum bid bump in basis points; must be less than 10,000. */
|
|
1799
|
+
minBidIncrementBps: string | number | bigint;
|
|
1800
|
+
};
|
|
1801
|
+
};
|
|
1802
|
+
interface EncodeNativeNftCreateListingArgs {
|
|
1803
|
+
/** Seller typed bech32m MonoAddress; optional object `kind` asserts the expected HRP. */
|
|
1804
|
+
seller: NativeMarketAddressInput;
|
|
1805
|
+
/** Seller-local listing nonce encoded as uint64. */
|
|
1806
|
+
nonce: string | number | bigint;
|
|
1807
|
+
/** Native NFT asset standard. */
|
|
1808
|
+
standard: NativeNftAssetStandard;
|
|
1809
|
+
/** 32-byte collection id. */
|
|
1810
|
+
collectionId: string;
|
|
1811
|
+
/** 32-byte token id. */
|
|
1812
|
+
tokenId: string;
|
|
1813
|
+
/** Positive integer decimal string encoded as native MrcAmount/u128. */
|
|
1814
|
+
quantity: string;
|
|
1815
|
+
/** 32-byte payment asset id. */
|
|
1816
|
+
paymentAsset: string;
|
|
1817
|
+
/** Positive integer decimal string encoded as native MrcAmount/u128. */
|
|
1818
|
+
price: string;
|
|
1819
|
+
/** Fixed-price or English-auction sale model. */
|
|
1820
|
+
kind: NativeNftListingKind;
|
|
1821
|
+
/** uint64 expiry block encoded as `expires_at_block`; 0 means never. */
|
|
1822
|
+
expiresAtBlock: string | number | bigint;
|
|
1823
|
+
}
|
|
1824
|
+
interface EncodeNativeNftBuyListingArgs {
|
|
1825
|
+
/** 32-byte native NFT listing id. */
|
|
1826
|
+
listingId: string;
|
|
1827
|
+
/** Buyer typed bech32m MonoAddress; optional object `kind` asserts the expected HRP. */
|
|
1828
|
+
buyer: NativeMarketAddressInput;
|
|
1829
|
+
/** Current block attached to the native buy call. */
|
|
1830
|
+
currentBlock: string | number | bigint;
|
|
1831
|
+
}
|
|
1832
|
+
interface EncodeNativeNftCancelListingArgs {
|
|
1833
|
+
/** 32-byte native NFT listing id. */
|
|
1834
|
+
listingId: string;
|
|
1835
|
+
/** Caller typed bech32m MonoAddress; optional object `kind` asserts the expected HRP. */
|
|
1836
|
+
caller: NativeMarketAddressInput;
|
|
1837
|
+
}
|
|
1838
|
+
interface EncodeNativeNftPlaceAuctionBidArgs {
|
|
1839
|
+
/** 32-byte native NFT auction listing id. */
|
|
1840
|
+
listingId: string;
|
|
1841
|
+
/** Bidder typed bech32m MonoAddress; optional object `kind` asserts the expected HRP. */
|
|
1842
|
+
bidder: NativeMarketAddressInput;
|
|
1843
|
+
/** Positive integer decimal string encoded as native MrcAmount/u128. */
|
|
1844
|
+
amount: string;
|
|
1845
|
+
/** Current block attached to the native auction bid call. */
|
|
1846
|
+
currentBlock: string | number | bigint;
|
|
1847
|
+
}
|
|
1848
|
+
interface EncodeNativeNftSettleAuctionArgs {
|
|
1849
|
+
/** 32-byte native NFT auction listing id. */
|
|
1850
|
+
listingId: string;
|
|
1851
|
+
/** Current block attached to the native auction settlement call. */
|
|
1852
|
+
currentBlock: string | number | bigint;
|
|
1853
|
+
}
|
|
1854
|
+
interface EncodeNativeNftSweepExpiredListingsArgs {
|
|
1855
|
+
/** Candidate 32-byte native NFT listing ids; mono-core accepts 1..64 ids. */
|
|
1856
|
+
listingIds: readonly string[];
|
|
1857
|
+
/** Current block attached to the native listing sweep call. */
|
|
1858
|
+
currentBlock: string | number | bigint;
|
|
1859
|
+
}
|
|
1860
|
+
interface NativeMarketModuleContractCall {
|
|
1861
|
+
/** Stable typed system-module address (`MARKET_NATIVE_MOD_V1`). */
|
|
1862
|
+
to: string;
|
|
1863
|
+
/** Native market router bincode payload. */
|
|
1864
|
+
input: string;
|
|
1865
|
+
/** Native market module calls must not carry native value. */
|
|
1866
|
+
valueLythoshi: "0";
|
|
1867
|
+
/** Maximum cycles delegated to the RISC-V host call. */
|
|
1868
|
+
maxCycles: string;
|
|
1869
|
+
}
|
|
1870
|
+
interface NativeMarketModuleCallEnvelope {
|
|
1871
|
+
module: "market";
|
|
1872
|
+
call: NativeMarketModuleContractCall;
|
|
1873
|
+
}
|
|
1874
|
+
interface NativeMarketForwarderInput {
|
|
1875
|
+
/** Canonical `SyscallRequest::CallContract` bytes for MRV call input. */
|
|
1876
|
+
input: string;
|
|
1877
|
+
/** Byte length of `input`, useful because the minimal forwarder artifact pins this as an immediate. */
|
|
1878
|
+
requestBytes: number;
|
|
1879
|
+
}
|
|
1880
|
+
interface NativeCallForwarderArtifact {
|
|
1881
|
+
/** Raw bincode MRV artifact bytes for a fixed-size native-call forwarder. */
|
|
1882
|
+
artifactBytes: string;
|
|
1883
|
+
/** Byte length accepted by the generated forwarder. */
|
|
1884
|
+
requestBytes: number;
|
|
1885
|
+
/** Stable runtime profile string used for capability matching. */
|
|
1886
|
+
artifactProfile: typeof NATIVE_CALL_FORWARDER_ARTIFACT_PROFILE;
|
|
1887
|
+
/** Forwarder code-section hash as `0x` hex. */
|
|
1888
|
+
codeHash: string;
|
|
1889
|
+
}
|
|
1890
|
+
interface EthSendTransactionRequest {
|
|
1891
|
+
to: string;
|
|
1892
|
+
value: "0x0";
|
|
1893
|
+
data: string;
|
|
1894
|
+
}
|
|
1895
|
+
interface MarketTransactionPlan {
|
|
1896
|
+
method: "eth_sendTransaction";
|
|
1897
|
+
params: [EthSendTransactionRequest];
|
|
1898
|
+
mempoolClass: MempoolClass;
|
|
1899
|
+
}
|
|
1900
|
+
declare class MarketActionError extends Error {
|
|
1901
|
+
constructor(message: string);
|
|
1902
|
+
}
|
|
1903
|
+
declare function clobAddressHex(): string;
|
|
1904
|
+
declare function deriveClobMarketId(baseTokenId: string, quoteTokenId: string): string;
|
|
1905
|
+
declare function deriveNativeSpotMarketId(args: Pick<EncodeNativeSpotCreateMarketArgs, "owner" | "baseAsset" | "quoteAsset" | "nonce">): string;
|
|
1906
|
+
declare function deriveNativeSpotOrderId(args: Pick<EncodeNativeSpotLimitOrderArgs, "marketId" | "owner" | "side" | "nonce">): string;
|
|
1907
|
+
declare function encodePlaceLimitOrderCalldata(args: PlaceSpotLimitOrderArgs): string;
|
|
1908
|
+
declare function encodePlaceMarketOrderCalldata(args: PlaceSpotMarketOrderArgs): string;
|
|
1909
|
+
declare function encodePlaceMarketOrderExCalldata(args: PlaceSpotMarketOrderExArgs): string;
|
|
1910
|
+
declare function encodeCancelOrderCalldata(args: CancelSpotOrderArgs): string;
|
|
1911
|
+
declare function encodeNativeSpotLimitOrderCall(args: EncodeNativeSpotLimitOrderArgs): string;
|
|
1912
|
+
declare function encodeNativeSpotCreateMarketCall(args: EncodeNativeSpotCreateMarketArgs): string;
|
|
1913
|
+
declare function encodeNativeSpotCancelOrderCall(args: EncodeNativeSpotCancelOrderArgs): string;
|
|
1914
|
+
declare function encodeNativeSpotSettleLimitOrderCall(args: EncodeNativeSpotSettleLimitOrderArgs): string;
|
|
1915
|
+
declare function encodeNativeSpotSettleRoutedLimitOrderCall(args: EncodeNativeSpotSettleRoutedLimitOrderArgs): string;
|
|
1916
|
+
declare function encodeNativeNftCreateListingCall(args: EncodeNativeNftCreateListingArgs): string;
|
|
1917
|
+
declare function encodeNativeNftBuyListingCall(args: EncodeNativeNftBuyListingArgs): string;
|
|
1918
|
+
declare function encodeNativeNftCancelListingCall(args: EncodeNativeNftCancelListingArgs): string;
|
|
1919
|
+
declare function encodeNativeNftPlaceAuctionBidCall(args: EncodeNativeNftPlaceAuctionBidArgs): string;
|
|
1920
|
+
declare function encodeNativeNftSettleAuctionCall(args: EncodeNativeNftSettleAuctionArgs): string;
|
|
1921
|
+
declare function encodeNativeNftSweepExpiredListingsCall(args: EncodeNativeNftSweepExpiredListingsArgs): string;
|
|
1922
|
+
declare function buildNativeMarketModuleCallEnvelope(input: string, maxCycles: string | number | bigint): NativeMarketModuleCallEnvelope;
|
|
1923
|
+
declare function encodeNativeMarketModuleForwarderInput(envelope: NativeMarketModuleCallEnvelope): NativeMarketForwarderInput;
|
|
1924
|
+
declare function buildNativeSpotLimitOrderForwarderInput(args: EncodeNativeSpotLimitOrderArgs, maxCycles: string | number | bigint): NativeMarketForwarderInput;
|
|
1925
|
+
declare function buildNativeSpotCreateMarketForwarderInput(args: EncodeNativeSpotCreateMarketArgs, maxCycles: string | number | bigint): NativeMarketForwarderInput;
|
|
1926
|
+
declare function buildNativeSpotCancelOrderForwarderInput(args: EncodeNativeSpotCancelOrderArgs, maxCycles: string | number | bigint): NativeMarketForwarderInput;
|
|
1927
|
+
declare function buildNativeSpotSettleLimitOrderForwarderInput(args: EncodeNativeSpotSettleLimitOrderArgs, maxCycles: string | number | bigint): NativeMarketForwarderInput;
|
|
1928
|
+
declare function buildNativeSpotSettleRoutedLimitOrderForwarderInput(args: EncodeNativeSpotSettleRoutedLimitOrderArgs, maxCycles: string | number | bigint): NativeMarketForwarderInput;
|
|
1929
|
+
declare function buildNativeNftCreateListingForwarderInput(args: EncodeNativeNftCreateListingArgs, maxCycles: string | number | bigint): NativeMarketForwarderInput;
|
|
1930
|
+
declare function buildNativeNftBuyListingForwarderInput(args: EncodeNativeNftBuyListingArgs, maxCycles: string | number | bigint): NativeMarketForwarderInput;
|
|
1931
|
+
declare function buildNativeNftCancelListingForwarderInput(args: EncodeNativeNftCancelListingArgs, maxCycles: string | number | bigint): NativeMarketForwarderInput;
|
|
1932
|
+
declare function buildNativeNftPlaceAuctionBidForwarderInput(args: EncodeNativeNftPlaceAuctionBidArgs, maxCycles: string | number | bigint): NativeMarketForwarderInput;
|
|
1933
|
+
declare function buildNativeNftSettleAuctionForwarderInput(args: EncodeNativeNftSettleAuctionArgs, maxCycles: string | number | bigint): NativeMarketForwarderInput;
|
|
1934
|
+
declare function buildNativeNftSweepExpiredListingsForwarderInput(args: EncodeNativeNftSweepExpiredListingsArgs, maxCycles: string | number | bigint): NativeMarketForwarderInput;
|
|
1935
|
+
declare function buildNativeSpotLimitOrderModuleCall(args: EncodeNativeSpotLimitOrderArgs, maxCycles: string | number | bigint): NativeMarketModuleCallEnvelope;
|
|
1936
|
+
declare function buildNativeSpotCreateMarketModuleCall(args: EncodeNativeSpotCreateMarketArgs, maxCycles: string | number | bigint): NativeMarketModuleCallEnvelope;
|
|
1937
|
+
declare function buildNativeSpotCancelOrderModuleCall(args: EncodeNativeSpotCancelOrderArgs, maxCycles: string | number | bigint): NativeMarketModuleCallEnvelope;
|
|
1938
|
+
declare function buildNativeSpotSettleLimitOrderModuleCall(args: EncodeNativeSpotSettleLimitOrderArgs, maxCycles: string | number | bigint): NativeMarketModuleCallEnvelope;
|
|
1939
|
+
declare function buildNativeSpotSettleRoutedLimitOrderModuleCall(args: EncodeNativeSpotSettleRoutedLimitOrderArgs, maxCycles: string | number | bigint): NativeMarketModuleCallEnvelope;
|
|
1940
|
+
declare function buildNativeNftCreateListingModuleCall(args: EncodeNativeNftCreateListingArgs, maxCycles: string | number | bigint): NativeMarketModuleCallEnvelope;
|
|
1941
|
+
declare function buildNativeNftBuyListingModuleCall(args: EncodeNativeNftBuyListingArgs, maxCycles: string | number | bigint): NativeMarketModuleCallEnvelope;
|
|
1942
|
+
declare function buildNativeNftCancelListingModuleCall(args: EncodeNativeNftCancelListingArgs, maxCycles: string | number | bigint): NativeMarketModuleCallEnvelope;
|
|
1943
|
+
declare function buildNativeNftPlaceAuctionBidModuleCall(args: EncodeNativeNftPlaceAuctionBidArgs, maxCycles: string | number | bigint): NativeMarketModuleCallEnvelope;
|
|
1944
|
+
declare function buildNativeNftSettleAuctionModuleCall(args: EncodeNativeNftSettleAuctionArgs, maxCycles: string | number | bigint): NativeMarketModuleCallEnvelope;
|
|
1945
|
+
declare function buildNativeNftSweepExpiredListingsModuleCall(args: EncodeNativeNftSweepExpiredListingsArgs, maxCycles: string | number | bigint): NativeMarketModuleCallEnvelope;
|
|
1946
|
+
declare function buildPlaceSpotLimitOrderPlan(args: PlaceSpotLimitOrderArgs): MarketTransactionPlan;
|
|
1947
|
+
declare function buildPlaceSpotMarketOrderPlan(args: PlaceSpotMarketOrderArgs): MarketTransactionPlan;
|
|
1948
|
+
declare function buildPlaceSpotMarketOrderExPlan(args: PlaceSpotMarketOrderExArgs): MarketTransactionPlan;
|
|
1949
|
+
declare function buildCancelSpotOrderPlan(args: CancelSpotOrderArgs): MarketTransactionPlan;
|
|
1950
|
+
declare function buildNativeCallForwarderArtifact(requestBytes: string | number | bigint): NativeCallForwarderArtifact;
|
|
796
1951
|
|
|
797
1952
|
/**
|
|
798
|
-
*
|
|
799
|
-
*
|
|
800
|
-
* The chain natively accepts EIP-1559-shape EVM transactions on the
|
|
801
|
-
* `Tx::Evm` (kind tag `0x01`) wire path — a `SignedTransaction` payload
|
|
802
|
-
* carries the legacy EIP-1559 envelope plus the secp256k1 signature.
|
|
803
|
-
* That makes the round-trip simple: ethers produces the canonical
|
|
804
|
-
* EIP-1559 RLP, the client posts it via `eth_sendRawTransaction`, the
|
|
805
|
-
* chain decodes it, and the receipt comes back through the same
|
|
806
|
-
* `eth_getTransactionReceipt` shape ethers expects.
|
|
807
|
-
*
|
|
808
|
-
* Two notes for any future maintainer:
|
|
809
|
-
*
|
|
810
|
-
* 1. **No chain-level Ethereum retrofit.** This shim is SDK-only — see
|
|
811
|
-
* `feedback_no_ethereum_wire_retrofit.md`. The chain keeps its
|
|
812
|
-
* custom envelope and native tx hash for the protocol-native path
|
|
813
|
-
* (ML-DSA-65 signing, native tx kinds beyond EVM). The shim only
|
|
814
|
-
* spans the **EIP-1559 EVM subset** of the chain's tx surface.
|
|
815
|
-
* 2. **Fields ethers does not see.** Monolythium-specific extension
|
|
816
|
-
* fields (privacy flags, native tx kinds, ML-DSA-65 signatures) are
|
|
817
|
-
* intentionally dropped by these helpers. Callers that need those
|
|
818
|
-
* surfaces use the native SDK signer trait, not the ethers shim.
|
|
819
|
-
*/
|
|
820
|
-
|
|
821
|
-
/**
|
|
822
|
-
* The EIP-1559 subset of fields ethers' `TransactionRequest` carries
|
|
823
|
-
* across the shim. We don't import ethers' type here so the shim can be
|
|
824
|
-
* compiled (and its types re-exported) even when ethers isn't installed
|
|
825
|
-
* — ethers is a peerDependency, not a hard dependency.
|
|
826
|
-
*/
|
|
827
|
-
interface EthersTxRequestSubset {
|
|
828
|
-
to?: string | null;
|
|
829
|
-
from?: string | null;
|
|
830
|
-
nonce?: number | bigint | null;
|
|
831
|
-
gasLimit?: bigint | string | null;
|
|
832
|
-
gasPrice?: bigint | string | null;
|
|
833
|
-
maxFeePerGas?: bigint | string | null;
|
|
834
|
-
maxPriorityFeePerGas?: bigint | string | null;
|
|
835
|
-
value?: bigint | string | null;
|
|
836
|
-
data?: string | null;
|
|
837
|
-
chainId?: bigint | number | null;
|
|
838
|
-
type?: number | null;
|
|
839
|
-
}
|
|
840
|
-
/**
|
|
841
|
-
* Translate ethers' `TransactionRequest` into the wire shape the
|
|
842
|
-
* `mono-core` JSON-RPC accepts for `eth_call` / `eth_estimateGas`.
|
|
843
|
-
*
|
|
844
|
-
* Returns the SDK's `CallRequest` shape (which mirrors the chain's
|
|
845
|
-
* accepted `eth_call` argument). Round-trips losslessly for the
|
|
846
|
-
* EIP-1559 EVM subset; Monolythium-specific extension fields are
|
|
847
|
-
* intentionally not surfaced here.
|
|
848
|
-
*/
|
|
849
|
-
declare function translateTxIn(req: EthersTxRequestSubset): CallRequest;
|
|
850
|
-
/**
|
|
851
|
-
* The ethers v6 wire shape for `eth_getTransactionReceipt`. We hand-roll
|
|
852
|
-
* this rather than importing ethers' internal types because the shim
|
|
853
|
-
* has to compile without ethers installed (peerDependency).
|
|
1953
|
+
* Native agent-commerce transaction-plan builders.
|
|
854
1954
|
*
|
|
855
|
-
*
|
|
856
|
-
*
|
|
857
|
-
*
|
|
1955
|
+
* These helpers encode the native Rust router bincode payloads consumed by
|
|
1956
|
+
* `AGENT_NATIVE_MOD_V01`. They do not predict record ids, escrow settlement,
|
|
1957
|
+
* reputation effects, or execution success.
|
|
858
1958
|
*/
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
1959
|
+
|
|
1960
|
+
declare const NATIVE_AGENT_MODULE_ADDRESS_BYTES: "0x4147454e545f4e41544956455f4d4f445f563031";
|
|
1961
|
+
declare const NATIVE_AGENT_MODULE_ADDRESS: string;
|
|
1962
|
+
type NativeAgentAddressKind = AddressKind;
|
|
1963
|
+
type NativeAgentAddressInput = string | {
|
|
1964
|
+
kind?: NativeAgentAddressKind;
|
|
1965
|
+
address: string;
|
|
1966
|
+
};
|
|
1967
|
+
interface NativeAgentModuleContractCall {
|
|
1968
|
+
/** Stable typed system-module address (`AGENT_NATIVE_MOD_V01`). */
|
|
1969
|
+
to: string;
|
|
1970
|
+
/** Native agent router bincode payload. */
|
|
1971
|
+
input: string;
|
|
1972
|
+
/** Native agent module calls must not carry native value. */
|
|
1973
|
+
valueLythoshi: "0";
|
|
1974
|
+
/** Maximum cycles delegated to the RISC-V host call. */
|
|
1975
|
+
maxCycles: string;
|
|
874
1976
|
}
|
|
1977
|
+
interface NativeAgentModuleCallEnvelope {
|
|
1978
|
+
module: "agent";
|
|
1979
|
+
call: NativeAgentModuleContractCall;
|
|
1980
|
+
}
|
|
1981
|
+
interface NativeAgentForwarderInput {
|
|
1982
|
+
/** Canonical `SyscallRequest::CallContract` bytes for MRV call input. */
|
|
1983
|
+
input: string;
|
|
1984
|
+
/** Byte length of `input`, useful because the minimal forwarder artifact pins this as an immediate. */
|
|
1985
|
+
requestBytes: number;
|
|
1986
|
+
}
|
|
1987
|
+
interface EncodeNativeAgentRegisterIssuerArgs {
|
|
1988
|
+
issuer: NativeAgentAddressInput;
|
|
1989
|
+
nonce: string | number | bigint;
|
|
1990
|
+
metadataHash: string;
|
|
1991
|
+
}
|
|
1992
|
+
interface EncodeNativeAgentIssueAttestationArgs {
|
|
1993
|
+
issuerId: string;
|
|
1994
|
+
issuer: NativeAgentAddressInput;
|
|
1995
|
+
subject: NativeAgentAddressInput;
|
|
1996
|
+
nonce: string | number | bigint;
|
|
1997
|
+
schemaHash: string;
|
|
1998
|
+
payloadHash: string;
|
|
1999
|
+
}
|
|
2000
|
+
interface EncodeNativeAgentRevokeAttestationArgs {
|
|
2001
|
+
attestationId: string;
|
|
2002
|
+
issuer: NativeAgentAddressInput;
|
|
2003
|
+
}
|
|
2004
|
+
interface EncodeNativeAgentGrantConsentArgs {
|
|
2005
|
+
subject: NativeAgentAddressInput;
|
|
2006
|
+
grantee: NativeAgentAddressInput;
|
|
2007
|
+
nonce: string | number | bigint;
|
|
2008
|
+
scopeHash: string;
|
|
2009
|
+
expiresAt: string | number | bigint;
|
|
2010
|
+
}
|
|
2011
|
+
interface EncodeNativeAgentRevokeConsentArgs {
|
|
2012
|
+
consentId: string;
|
|
2013
|
+
subject: NativeAgentAddressInput;
|
|
2014
|
+
}
|
|
2015
|
+
interface EncodeNativeAgentListServiceArgs {
|
|
2016
|
+
provider: NativeAgentAddressInput;
|
|
2017
|
+
nonce: string | number | bigint;
|
|
2018
|
+
categoryHash: string;
|
|
2019
|
+
metadataHash: string;
|
|
2020
|
+
}
|
|
2021
|
+
interface EncodeNativeAgentDeactivateServiceArgs {
|
|
2022
|
+
serviceId: string;
|
|
2023
|
+
provider: NativeAgentAddressInput;
|
|
2024
|
+
}
|
|
2025
|
+
interface EncodeNativeAgentSetAvailabilityArgs {
|
|
2026
|
+
provider: NativeAgentAddressInput;
|
|
2027
|
+
maxConcurrent: string | number | bigint;
|
|
2028
|
+
paused: boolean;
|
|
2029
|
+
}
|
|
2030
|
+
interface EncodeNativeAgentAvailabilitySlotArgs {
|
|
2031
|
+
provider: NativeAgentAddressInput;
|
|
2032
|
+
consumer: NativeAgentAddressInput;
|
|
2033
|
+
}
|
|
2034
|
+
interface EncodeNativeAgentRegisterArbiterArgs {
|
|
2035
|
+
arbiter: NativeAgentAddressInput;
|
|
2036
|
+
nonce: string | number | bigint;
|
|
2037
|
+
tier: string | number | bigint;
|
|
2038
|
+
metadataHash: string;
|
|
2039
|
+
}
|
|
2040
|
+
interface EncodeNativeAgentSetSpendingPolicyArgs {
|
|
2041
|
+
owner: NativeAgentAddressInput;
|
|
2042
|
+
controller: NativeAgentAddressInput;
|
|
2043
|
+
nonce: string | number | bigint;
|
|
2044
|
+
assetId: string;
|
|
2045
|
+
perActionLimit: string;
|
|
2046
|
+
windowLimit: string;
|
|
2047
|
+
windowSecs: string | number | bigint;
|
|
2048
|
+
}
|
|
2049
|
+
interface EncodeNativeAgentRecordPolicySpendArgs {
|
|
2050
|
+
policyId: string;
|
|
2051
|
+
controller: NativeAgentAddressInput;
|
|
2052
|
+
window: string | number | bigint;
|
|
2053
|
+
amount: string;
|
|
2054
|
+
}
|
|
2055
|
+
interface EncodeNativeAgentCreateEscrowArgs {
|
|
2056
|
+
buyer: NativeAgentAddressInput;
|
|
2057
|
+
provider: NativeAgentAddressInput;
|
|
2058
|
+
arbiter: NativeAgentAddressInput;
|
|
2059
|
+
nonce: string | number | bigint;
|
|
2060
|
+
assetId: string;
|
|
2061
|
+
amount: string;
|
|
2062
|
+
termsHash: string;
|
|
2063
|
+
}
|
|
2064
|
+
interface EncodeNativeAgentCounterEscrowArgs {
|
|
2065
|
+
escrowId: string;
|
|
2066
|
+
actor: NativeAgentAddressInput;
|
|
2067
|
+
termsHash: string;
|
|
2068
|
+
}
|
|
2069
|
+
interface EncodeNativeAgentEscrowActorArgs {
|
|
2070
|
+
escrowId: string;
|
|
2071
|
+
actor: NativeAgentAddressInput;
|
|
2072
|
+
}
|
|
2073
|
+
interface EncodeNativeAgentStartEscrowArgs {
|
|
2074
|
+
escrowId: string;
|
|
2075
|
+
provider: NativeAgentAddressInput;
|
|
2076
|
+
}
|
|
2077
|
+
interface EncodeNativeAgentSubmitEscrowArgs {
|
|
2078
|
+
escrowId: string;
|
|
2079
|
+
provider: NativeAgentAddressInput;
|
|
2080
|
+
payloadHash: string;
|
|
2081
|
+
}
|
|
2082
|
+
type NativeAgentEscrowResolution = "release-provider" | "refund-buyer";
|
|
2083
|
+
interface EncodeNativeAgentResolveEscrowArgs {
|
|
2084
|
+
escrowId: string;
|
|
2085
|
+
actor: NativeAgentAddressInput;
|
|
2086
|
+
resolution: NativeAgentEscrowResolution;
|
|
2087
|
+
}
|
|
2088
|
+
interface NativeAgentReputationScores {
|
|
2089
|
+
speed: string | number | bigint;
|
|
2090
|
+
quality: string | number | bigint;
|
|
2091
|
+
communication: string | number | bigint;
|
|
2092
|
+
accuracy: string | number | bigint;
|
|
2093
|
+
}
|
|
2094
|
+
interface EncodeNativeAgentRecordReputationArgs {
|
|
2095
|
+
reviewer: NativeAgentAddressInput;
|
|
2096
|
+
subject: NativeAgentAddressInput;
|
|
2097
|
+
categoryId: string | number | bigint;
|
|
2098
|
+
scores: NativeAgentReputationScores;
|
|
2099
|
+
payloadHash: string;
|
|
2100
|
+
}
|
|
2101
|
+
declare class AgentActionError extends Error {
|
|
2102
|
+
constructor(message: string);
|
|
2103
|
+
}
|
|
2104
|
+
declare function encodeNativeAgentRegisterIssuerCall(args: EncodeNativeAgentRegisterIssuerArgs): string;
|
|
2105
|
+
declare function encodeNativeAgentIssuerGetCall(issuerId: string): string;
|
|
2106
|
+
declare function encodeNativeAgentIssueAttestationCall(args: EncodeNativeAgentIssueAttestationArgs): string;
|
|
2107
|
+
declare function encodeNativeAgentRevokeAttestationCall(args: EncodeNativeAgentRevokeAttestationArgs): string;
|
|
2108
|
+
declare function encodeNativeAgentAttestationGetCall(attestationId: string): string;
|
|
2109
|
+
declare function encodeNativeAgentGrantConsentCall(args: EncodeNativeAgentGrantConsentArgs): string;
|
|
2110
|
+
declare function encodeNativeAgentRevokeConsentCall(args: EncodeNativeAgentRevokeConsentArgs): string;
|
|
2111
|
+
declare function encodeNativeAgentConsentGetCall(consentId: string): string;
|
|
2112
|
+
declare function encodeNativeAgentListServiceCall(args: EncodeNativeAgentListServiceArgs): string;
|
|
2113
|
+
declare function encodeNativeAgentDeactivateServiceCall(args: EncodeNativeAgentDeactivateServiceArgs): string;
|
|
2114
|
+
declare function encodeNativeAgentServiceGetCall(serviceId: string): string;
|
|
2115
|
+
declare function encodeNativeAgentSetAvailabilityCall(args: EncodeNativeAgentSetAvailabilityArgs): string;
|
|
2116
|
+
declare function encodeNativeAgentOpenAvailabilityCall(args: EncodeNativeAgentAvailabilitySlotArgs): string;
|
|
2117
|
+
declare function encodeNativeAgentCloseAvailabilityCall(args: EncodeNativeAgentAvailabilitySlotArgs): string;
|
|
2118
|
+
declare function encodeNativeAgentAvailabilityGetCall(provider: NativeAgentAddressInput): string;
|
|
2119
|
+
declare function encodeNativeAgentRegisterArbiterCall(args: EncodeNativeAgentRegisterArbiterArgs): string;
|
|
2120
|
+
declare function encodeNativeAgentArbiterGetCall(arbiterId: string): string;
|
|
2121
|
+
declare function encodeNativeAgentSetSpendingPolicyCall(args: EncodeNativeAgentSetSpendingPolicyArgs): string;
|
|
2122
|
+
declare function encodeNativeAgentRecordPolicySpendCall(args: EncodeNativeAgentRecordPolicySpendArgs): string;
|
|
2123
|
+
declare function encodeNativeAgentSpendingPolicyGetCall(policyId: string): string;
|
|
2124
|
+
declare function encodeNativeAgentCreateEscrowCall(args: EncodeNativeAgentCreateEscrowArgs): string;
|
|
2125
|
+
declare function encodeNativeAgentCounterEscrowCall(args: EncodeNativeAgentCounterEscrowArgs): string;
|
|
2126
|
+
declare function encodeNativeAgentAcceptEscrowCall(args: EncodeNativeAgentEscrowActorArgs): string;
|
|
2127
|
+
declare function encodeNativeAgentStartEscrowCall(args: EncodeNativeAgentStartEscrowArgs): string;
|
|
2128
|
+
declare function encodeNativeAgentSubmitEscrowCall(args: EncodeNativeAgentSubmitEscrowArgs): string;
|
|
2129
|
+
declare function encodeNativeAgentApproveEscrowCall(args: EncodeNativeAgentEscrowActorArgs): string;
|
|
2130
|
+
declare function encodeNativeAgentDisputeEscrowCall(args: EncodeNativeAgentEscrowActorArgs): string;
|
|
2131
|
+
declare function encodeNativeAgentCancelEscrowCall(args: EncodeNativeAgentEscrowActorArgs): string;
|
|
2132
|
+
declare function encodeNativeAgentResolveEscrowCall(args: EncodeNativeAgentResolveEscrowArgs): string;
|
|
2133
|
+
declare function encodeNativeAgentEscrowGetCall(escrowId: string): string;
|
|
2134
|
+
declare function encodeNativeAgentRecordReputationCall(args: EncodeNativeAgentRecordReputationArgs): string;
|
|
2135
|
+
declare function encodeNativeAgentReputationGetCall(subject: NativeAgentAddressInput, categoryId: string | number | bigint): string;
|
|
2136
|
+
declare function buildNativeAgentModuleCallEnvelope(input: string, maxCycles: string | number | bigint): NativeAgentModuleCallEnvelope;
|
|
2137
|
+
declare function encodeNativeAgentModuleForwarderInput(envelope: NativeAgentModuleCallEnvelope): NativeAgentForwarderInput;
|
|
2138
|
+
declare function buildNativeAgentSetSpendingPolicyModuleCall(args: EncodeNativeAgentSetSpendingPolicyArgs, maxCycles: string | number | bigint): NativeAgentModuleCallEnvelope;
|
|
2139
|
+
declare function buildNativeAgentSetSpendingPolicyForwarderInput(args: EncodeNativeAgentSetSpendingPolicyArgs, maxCycles: string | number | bigint): NativeAgentForwarderInput;
|
|
2140
|
+
declare function buildNativeAgentCreateEscrowModuleCall(args: EncodeNativeAgentCreateEscrowArgs, maxCycles: string | number | bigint): NativeAgentModuleCallEnvelope;
|
|
2141
|
+
declare function buildNativeAgentCreateEscrowForwarderInput(args: EncodeNativeAgentCreateEscrowArgs, maxCycles: string | number | bigint): NativeAgentForwarderInput;
|
|
2142
|
+
declare function buildNativeAgentRecordReputationModuleCall(args: EncodeNativeAgentRecordReputationArgs, maxCycles: string | number | bigint): NativeAgentModuleCallEnvelope;
|
|
2143
|
+
declare function buildNativeAgentRecordReputationForwarderInput(args: EncodeNativeAgentRecordReputationArgs, maxCycles: string | number | bigint): NativeAgentForwarderInput;
|
|
2144
|
+
|
|
875
2145
|
/**
|
|
876
|
-
*
|
|
877
|
-
* shape ethers expects. Required for `eth_getTransactionReceipt` to
|
|
878
|
-
* surface a usable `TransactionResponse` to ethers callers.
|
|
879
|
-
*
|
|
880
|
-
* The chain's receipt today is intentionally narrow — log emission,
|
|
881
|
-
* cumulative-gas aggregation, and effective-gas-price disclosure are
|
|
882
|
-
* tracked OI items. This translator fills in zero-equivalent values for
|
|
883
|
-
* those gaps; callers that need the full surface (logs, effective gas
|
|
884
|
-
* price) consume the native SDK shape directly.
|
|
885
|
-
*/
|
|
886
|
-
declare function translateReceiptOut(monoReceipt: TransactionReceipt, fromAddress: string | null, toAddress: string | null): EthersReceiptShape;
|
|
887
|
-
/**
|
|
888
|
-
* Translate `mono-core`'s `BlockHeader` into the ethers v6 wire shape
|
|
889
|
-
* for `eth_getBlockByNumber` / `eth_getBlockByHash`.
|
|
890
|
-
*
|
|
891
|
-
* The chain's block header is intentionally narrower than Ethereum's
|
|
892
|
-
* — it omits fields that don't exist in Monolythium (uncles, mix hash,
|
|
893
|
-
* difficulty, nonce, sha3Uncles). This translator emits zero-valued
|
|
894
|
-
* stand-ins so ethers' normaliser does not throw. Callers needing the
|
|
895
|
-
* authoritative shape import the native `BlockHeader` from the SDK.
|
|
896
|
-
*/
|
|
897
|
-
interface EthersBlockShape {
|
|
898
|
-
number: string;
|
|
899
|
-
hash: string;
|
|
900
|
-
parentHash: string;
|
|
901
|
-
timestamp: string;
|
|
902
|
-
gasUsed: string;
|
|
903
|
-
gasLimit: string;
|
|
904
|
-
stateRoot: string;
|
|
905
|
-
miner: string;
|
|
906
|
-
difficulty: string;
|
|
907
|
-
nonce: string;
|
|
908
|
-
baseFeePerGas: string | null;
|
|
909
|
-
extraData: string;
|
|
910
|
-
mixHash: string;
|
|
911
|
-
transactions: string[];
|
|
912
|
-
transactionsRoot: string;
|
|
913
|
-
receiptsRoot: string;
|
|
914
|
-
logsBloom: string;
|
|
915
|
-
sha3Uncles: string;
|
|
916
|
-
uncles: string[];
|
|
917
|
-
size: string;
|
|
918
|
-
}
|
|
919
|
-
/**
|
|
920
|
-
* Translate `mono-core`'s `BlockHeader` to the ethers wire shape.
|
|
921
|
-
* `transactions` defaults to an empty list — the SDK's
|
|
922
|
-
* `eth_getBlockByNumber` does not yet return tx hashes; once Stage 1+
|
|
923
|
-
* surfaces them, callers update this translator.
|
|
924
|
-
*/
|
|
925
|
-
declare function translateBlockOut(header: {
|
|
926
|
-
number: bigint;
|
|
927
|
-
hash: string;
|
|
928
|
-
parent_hash: string;
|
|
929
|
-
state_root: string;
|
|
930
|
-
timestamp: bigint;
|
|
931
|
-
gas_used: bigint;
|
|
932
|
-
gas_limit: bigint;
|
|
933
|
-
}): EthersBlockShape;
|
|
934
|
-
|
|
935
|
-
/**
|
|
936
|
-
* Official TypeScript SDK for Monolythium v4.0 / LythiumDAG-BFT.
|
|
2146
|
+
* Official TypeScript SDK for Monolythium v4.1 / LythiumDAG-BFT.
|
|
937
2147
|
*
|
|
938
2148
|
* The wire types in `./bindings/` are generated from Rust by
|
|
939
2149
|
* `cargo test --features ts-bindings`; never edit them by hand. The
|
|
940
|
-
* `RpcClient` mirrors the Rust SDK 1:1
|
|
941
|
-
*
|
|
2150
|
+
* `RpcClient` mirrors the Rust SDK 1:1 across current `lyth_*` native methods,
|
|
2151
|
+
* passive compatibility reads, and server-gated legacy/debug methods.
|
|
942
2152
|
*
|
|
943
|
-
*
|
|
944
|
-
*
|
|
945
|
-
* it alongside this SDK when you use the shim.
|
|
2153
|
+
* Optional compatibility adapters live under the explicit `./ethers`
|
|
2154
|
+
* subpath so native SDK consumers do not import that peer dependency.
|
|
946
2155
|
*/
|
|
947
|
-
declare const version = "0.
|
|
2156
|
+
declare const version = "0.2.0";
|
|
948
2157
|
|
|
949
|
-
export { ADDRESS_HRP, AddressError, AddressFlowResponse, AddressProfileResponse, type ApiAddressActivityData, type ApiAddressActivityEntry, type ApiAddressActivityKind, type ApiAddressActivityKindData, type ApiAddressActivityKindSummary, type ApiBlockData, type ApiBlockHeader, type ApiBlockTransactionsData, type ApiCapabilitiesResponse, ApiClient, type ApiClientOptions, type ApiClusterData, type ApiClusterDirectoryEntry, type ApiClusterDirectoryPage, type ApiClusterMember, type ApiClusterStatus, type ApiClustersData, type ApiEnvelope, type ApiErrorEnvelope, type ApiHealthResponse, type ApiIndexerStatus, type ApiLatestAnchor, type ApiLogEntry, type ApiOperatorData, type ApiOperatorInfo, type ApiQueryValue, type ApiRuntimeProvenanceData, type ApiServiceProbeData, type ApiTransactionData, type ApiTransactionReceipt, type ApiTransactionReceiptData, type ApiTransactionView, type ApiUpgradePlanStatus, type ApiUpgradeStatus, type ApiUpgradeStatusData, BURN_ADDR, BlockSelector, CallRequest, ChainStatsResponse, ClobMarketResponse, ClobMarketsResponse, ClobOhlcResponse, ClobOrderBookResponse, ClobTradesResponse, type EthersBlockShape, type EthersReceiptShape, type EthersTxRequestSubset, ML_DSA_65_PUBLIC_KEY_LEN, ML_DSA_65_SIGNATURE_LEN, MONOLYTHIUM_NETWORKS, MONOLYTHIUM_TESTNET_CHAIN_ID, MONOLYTHIUM_TESTNET_NETWORK_NAME, type MonolythiumNetworkConfig, MonolythiumProvider, type MonolythiumProviderOptions, MonolythiumSigner, type MonolythiumSignerBackend, NODE_REGISTRY_CAPABILITIES, NODE_REGISTRY_CAPABILITY_MASK, NODE_REGISTRY_PUBLIC_SERVICE_MASK, NODE_REGISTRY_SELECTORS, NodeRegistryError, OperatorCapabilitiesResponse, PRECOMPILE_ADDRESSES, PUBKEY_REGISTRY_ML_DSA_65_PUBLIC_KEY_LEN, PUBKEY_REGISTRY_SELECTORS, type PrecompileAddress, type PrecompileName, type PubkeyLookup, PubkeyRegistryError, type ReportServiceProbeCalldataArgs, RpcClient, RpcClientOptions, RuntimeBuildProvenance, RuntimeUpgradeStatus, SERVICE_PROBE_STATUS, SET_POLICY_CLAIM_DOMAIN_TAG, SPENDING_POLICY_SELECTORS, SdkError, SearchResponse, ServiceProbeResponse, type SpendingPolicyArgs, SpendingPolicyError, TransactionReceipt, TxFeedResponse, addressBytesToHex, addressToBech32, apiEndpointFromRpcEndpoint, bech32ToAddress, bech32ToAddressBytes, composeClaimBoundMessage, decodeHasPubkeyReturn, decodeLookupPubkeyReturn, encodeClaimPolicyByAddressCalldata, encodeDisableCalldata, encodeEnableCalldata, encodeHasPubkeyCalldata, encodeLookupPubkeyCalldata, encodeRegisterPubkeyCalldata, encodeReportServiceProbeCalldata, encodeSetPolicyCalldata, encodeSetPolicyClaimCalldata, hexToAddressBytes, isConcreteServiceProbeStatus, isSinglePublicServiceProbeMask, isValidNodeRegistryCapabilities, isValidPublicServiceProbeMask, nodeRegistryAddressHex, normalizeAddressHex, parseAddress, pubkeyRegistryAddressHex, serviceProbeStatusLabel, spendingPolicyAddressHex, translateBlockOut, translateReceiptOut, translateTxIn, version };
|
|
2158
|
+
export { ADDRESS_HRP, ADDRESS_KIND_HRPS, AddressError, AddressFlowResponse, type AddressKind, AddressProfileResponse, AgentActionError, type ApiAddressActivityData, type ApiAddressActivityEntry, type ApiAddressActivityKind, type ApiAddressActivityKindData, type ApiAddressActivityKindSummary, type ApiBlockData, type ApiBlockHeader, type ApiBlockTransactionsData, type ApiCapabilitiesResponse, ApiClient, type ApiClientOptions, type ApiClusterData, type ApiClusterDirectoryEntry, type ApiClusterDirectoryPage, type ApiClusterMember, type ApiClusterStatus, type ApiClustersData, type ApiEnvelope, type ApiErrorEnvelope, type ApiHealthResponse, type ApiIndexerStatus, type ApiLatestAnchor, type ApiLogEntry, type ApiOperatorData, type ApiOperatorInfo, type ApiQueryValue, type ApiRuntimeProvenanceData, type ApiServiceProbeData, ApiStreamsIndexResponse, type ApiTransactionData, type ApiTransactionNativeReceiptData, type ApiTransactionReceipt, type ApiTransactionReceiptData, type ApiTransactionView, type ApiUpgradePlanStatus, type ApiUpgradeStatus, type ApiUpgradeStatusData, BURN_ADDR, BlockSelector, BridgeRoutesRequest, BridgeRoutesResponse, CLOB_MARKET_ID_DOMAIN_TAG, CLOB_SELECTORS, type CancelSpotOrderArgs, ChainStatsResponse, ClobMarketResponse, ClobMarketsResponse, ClobOhlcResponse, ClobOrderBookResponse, ClobTradesResponse, DELEGATION_REVERT_TAGS, DELEGATION_SELECTORS, DelegationPrecompileError, type EncodeNativeAgentAvailabilitySlotArgs, type EncodeNativeAgentCounterEscrowArgs, type EncodeNativeAgentCreateEscrowArgs, type EncodeNativeAgentDeactivateServiceArgs, type EncodeNativeAgentEscrowActorArgs, type EncodeNativeAgentGrantConsentArgs, type EncodeNativeAgentIssueAttestationArgs, type EncodeNativeAgentListServiceArgs, type EncodeNativeAgentRecordPolicySpendArgs, type EncodeNativeAgentRecordReputationArgs, type EncodeNativeAgentRegisterArbiterArgs, type EncodeNativeAgentRegisterIssuerArgs, type EncodeNativeAgentResolveEscrowArgs, type EncodeNativeAgentRevokeAttestationArgs, type EncodeNativeAgentRevokeConsentArgs, type EncodeNativeAgentSetAvailabilityArgs, type EncodeNativeAgentSetSpendingPolicyArgs, type EncodeNativeAgentStartEscrowArgs, type EncodeNativeAgentSubmitEscrowArgs, type EncodeNativeNftBuyListingArgs, type EncodeNativeNftCancelListingArgs, type EncodeNativeNftCreateListingArgs, type EncodeNativeNftPlaceAuctionBidArgs, type EncodeNativeNftSettleAuctionArgs, type EncodeNativeNftSweepExpiredListingsArgs, type EncodeNativeSpotCancelOrderArgs, type EncodeNativeSpotCreateMarketArgs, type EncodeNativeSpotLimitOrderArgs, type EncodeNativeSpotSettleLimitOrderArgs, type EncodeNativeSpotSettleRoutedLimitOrderArgs, type EthSendTransactionRequest, type HealthSummary, LYTHOSHI_PER_LYTH, LYTH_DECIMALS, type LatencyBands, type LythFormatOptions, MAX_NATIVE_CALL_FORWARDER_REQUEST_BYTES, ML_DSA_65_PUBLIC_KEY_LEN, ML_DSA_65_SIGNATURE_LEN, MRV_DEPLOY_PAYLOAD_VERSION, MRV_FORMAT_VERSION, MRV_MAX_ABI_SYMBOLS, MRV_MAX_CODE_BYTES, MRV_MAX_DEBUG_BYTES, MRV_MAX_MEMORY_PAGES, MRV_MAX_STORAGE_NAMESPACE_BYTES, MRV_MEMORY_PAGE_BYTES, MRV_PROFILE_MONO_RV32IM_V1, MRV_STRUCTURED_FEE_FIELDS, MRV_TX_EXTENSION_KIND, MRV_TX_EXTENSION_V1, MarketActionError, type MarketTransactionPlan, type MrcAccountRequest, MrcAccountResponse, type MrcHoldersRequest, MrcHoldersResponse, MrcMetadataResponse, type MrvAbiManifest, type MrvAbiParam, type MrvAbiSymbol, type MrvAbiSymbolKind, type MrvAbiType, type MrvAddressKind, type MrvArtifactMetadata, type MrvBuildMetadata, type MrvBytesLike, type MrvCallNativeTxOptions, type MrvCallNativeTxPlan, type MrvCallPlan, type MrvCallRequest, type MrvCallResponse, type MrvCallStatus, type MrvCallSubmission, type MrvCallSubmitOptions, type MrvDecimalLike, type MrvDeployNativeTxOptions, type MrvDeployNativeTxPlan, type MrvDeployPayload, type MrvDeployPayloadNativeTxOptions, type MrvDeployPayloadPlanOptions, type MrvDeployPayloadRequestOptions, type MrvDeployPayloadSubmission, type MrvDeployPayloadSubmitOptions, type MrvDeployPlan, type MrvDeployPlanOptions, type MrvDeployRequest, type MrvDeployResponse, type MrvDeploySubmission, type MrvDeploySubmitOptions, type MrvEncryptedSubmissionResult, type MrvEventRecord, type MrvExecutionReceipt, type MrvFeeDisplayConformanceInput, type MrvFeeDisplayConformanceReport, type MrvMemoryLimits, type MrvMeterCounters, type MrvNativeFeePreview, type MrvNativeStateDelta, type MrvNativeTxFacade, type MrvRequestBuildOptions, type MrvResolvedSyscall, type MrvRevertPayload, type MrvRiscvProfile, type MrvStorageNamespace, type MrvStructuredFeeConformanceOptions, type MrvStructuredFeeConformanceReport, type MrvSyscallImport, type MrvTransactionExtension, type MrvTypedAddress, type MrvValidatedArtifactMetadata, MrvValidationError, NATIVE_AGENT_MODULE_ADDRESS, NATIVE_AGENT_MODULE_ADDRESS_BYTES, NATIVE_CALL_FORWARDER_ARTIFACT_PROFILE, NATIVE_CALL_FORWARDER_RESPONSE_CAPACITY, NATIVE_CALL_FORWARDER_RESPONSE_OFFSET, NATIVE_DEV_HOST_API_VERSION, NATIVE_DEV_IPC_PROTOCOL_VERSION, NATIVE_DEV_MANIFEST_SCHEMA_VERSION, NATIVE_LYTH_DECIMALS, NATIVE_MARKET_MODULE_ADDRESS, NATIVE_MARKET_MODULE_ADDRESS_BYTES, NODE_REGISTRY_CAPABILITIES, NODE_REGISTRY_CAPABILITY_MASK, NODE_REGISTRY_PUBLIC_SERVICE_MASK, NODE_REGISTRY_SELECTORS, type NativeAgentAddressInput, type NativeAgentAddressKind, type NativeAgentEscrowResolution, type NativeAgentForwarderInput, type NativeAgentModuleCallEnvelope, type NativeAgentModuleContractCall, type NativeAgentReputationScores, NativeAgentStateFilter, NativeAgentStateResponse, type NativeCallForwarderArtifact, NativeDecodedEvent, type NativeDevApprovalKind, type NativeDevCommandName, type NativeDevContractPassport, type NativeDevHostApprovalResultMessage, type NativeDevHostCommandMessage, type NativeDevHostContextMessage, type NativeDevIpcMessage, type NativeDevMrcAllocation, type NativeDevMrcAssetKind, type NativeDevMrcTokenPlan, type NativeDevMrvDeployPlan, type NativeDevRiskLabel, type NativeDevRiskSeverity, type NativeDevSidecarApprovalRequestMessage, type NativeDevSidecarCommandResultMessage, type NativeDevSidecarProjectEventMessage, type NativeDevSidecarReadyMessage, type NativeDevVerificationBundle, type NativeDevWalletApprovalRequest, type NativeDevkitArchive, type NativeDevkitChannel, type NativeDevkitCompatibility, type NativeDevkitManifest, type NativeDevkitSidecarManifest, type NativeDevkitSidecarStatus, type NativeDevkitStatus, NativeEventFilter, NativeEventsFilter, NativeEventsResponse, type NativeMarketAddressInput, type NativeMarketAddressKind, type NativeMarketForwarderInput, type NativeMarketModuleCallEnvelope, type NativeMarketModuleContractCall, NativeMarketOrderBookDeltasRequest, NativeMarketOrderBookDeltasResponse, NativeMarketStateFilter, NativeMarketStateResponse, type NativeNftAssetStandard, type NativeNftListingKind, NativeReceiptFee, type NativeReceiptFeeDisplay, NativeReceiptResponse, NodeRegistryError, OperatorCapabilitiesResponse, PRECOMPILE_ADDRESSES, PUBKEY_REGISTRY_ML_DSA_65_PUBLIC_KEY_LEN, PUBKEY_REGISTRY_SELECTORS, PendingRewardsResponse, type PlaceSpotLimitOrderArgs, type PlaceSpotMarketOrderArgs, type PlaceSpotMarketOrderExArgs, type PrecompileAddress, type PrecompileName, type PubkeyLookup, PubkeyRegistryError, RESERVED_ADDRESS_HRPS, RedemptionQueueResponse, type ReportServiceProbeCalldataArgs, RpcClient, RuntimeBuildProvenance, RuntimeUpgradeStatus, SERVICE_PROBE_STATUS, SET_POLICY_CLAIM_DOMAIN_TAG, SPENDING_POLICY_SELECTORS, SdkError, SearchResponse, ServiceProbeResponse, type SpendingPolicyArgs, SpendingPolicyError, type SpotLimitOrderSide, type SpotMarketOrderMode, type StudioHostState, type StudioHostStatus, TxFeedResponse, type TypedAddress, TypedNativeReceiptEvent, addressBytesToHex, addressToBech32, addressToTypedBech32, apiEndpointFromRpcEndpoint, assertMrvCallNativeSubmissionPlan, assertMrvDeployNativeSubmissionPlan, assertMrvFeeDisplayConformance, assertMrvStructuredFeeConformance, assertNativeDevMrcTokenPlan, assertNativeDevMrvDeployPlan, assertNativeDevWalletApprovalRequest, bech32ToAddress, bech32ToAddressBytes, buildCancelSpotOrderPlan, buildMrvCallNativeTxPlan, buildMrvCallPlan, buildMrvCallRequest, buildMrvDeployNativeTxPlan, buildMrvDeployPayloadNativeTxPlan, buildMrvDeployPayloadPlan, buildMrvDeployPayloadRequest, buildMrvDeployPlan, buildMrvDeployRequest, buildNativeAgentCreateEscrowForwarderInput, buildNativeAgentCreateEscrowModuleCall, buildNativeAgentModuleCallEnvelope, buildNativeAgentRecordReputationForwarderInput, buildNativeAgentRecordReputationModuleCall, buildNativeAgentSetSpendingPolicyForwarderInput, buildNativeAgentSetSpendingPolicyModuleCall, buildNativeCallForwarderArtifact, buildNativeMarketModuleCallEnvelope, buildNativeNftBuyListingForwarderInput, buildNativeNftBuyListingModuleCall, buildNativeNftCancelListingForwarderInput, buildNativeNftCancelListingModuleCall, buildNativeNftCreateListingForwarderInput, buildNativeNftCreateListingModuleCall, buildNativeNftPlaceAuctionBidForwarderInput, buildNativeNftPlaceAuctionBidModuleCall, buildNativeNftSettleAuctionForwarderInput, buildNativeNftSettleAuctionModuleCall, buildNativeNftSweepExpiredListingsForwarderInput, buildNativeNftSweepExpiredListingsModuleCall, buildNativeSpotCancelOrderForwarderInput, buildNativeSpotCancelOrderModuleCall, buildNativeSpotCreateMarketForwarderInput, buildNativeSpotCreateMarketModuleCall, buildNativeSpotLimitOrderForwarderInput, buildNativeSpotLimitOrderModuleCall, buildNativeSpotSettleLimitOrderForwarderInput, buildNativeSpotSettleLimitOrderModuleCall, buildNativeSpotSettleRoutedLimitOrderForwarderInput, buildNativeSpotSettleRoutedLimitOrderModuleCall, buildPlaceSpotLimitOrderPlan, buildPlaceSpotMarketOrderExPlan, buildPlaceSpotMarketOrderPlan, checkMrvFeeDisplayConformance, checkMrvStructuredFeeConformance, checkNativeDevkitCompatibility, clobAddressHex, compareNativeDevVersions, composeClaimBoundMessage, decodeHasPubkeyReturn, decodeLookupPubkeyReturn, delegationAddressHex, deriveClobMarketId, deriveMrvContractAddress, deriveNativeSpotMarketId, deriveNativeSpotOrderId, encodeCancelOrderCalldata, encodeClaimPolicyByAddressCalldata, encodeCompleteRedemptionCalldata, encodeDisableCalldata, encodeEnableCalldata, encodeHasPubkeyCalldata, encodeLookupPubkeyCalldata, encodeMrvDeployPayload, encodeNativeAgentAcceptEscrowCall, encodeNativeAgentApproveEscrowCall, encodeNativeAgentArbiterGetCall, encodeNativeAgentAttestationGetCall, encodeNativeAgentAvailabilityGetCall, encodeNativeAgentCancelEscrowCall, encodeNativeAgentCloseAvailabilityCall, encodeNativeAgentConsentGetCall, encodeNativeAgentCounterEscrowCall, encodeNativeAgentCreateEscrowCall, encodeNativeAgentDeactivateServiceCall, encodeNativeAgentDisputeEscrowCall, encodeNativeAgentEscrowGetCall, encodeNativeAgentGrantConsentCall, encodeNativeAgentIssueAttestationCall, encodeNativeAgentIssuerGetCall, encodeNativeAgentListServiceCall, encodeNativeAgentModuleForwarderInput, encodeNativeAgentOpenAvailabilityCall, encodeNativeAgentRecordPolicySpendCall, encodeNativeAgentRecordReputationCall, encodeNativeAgentRegisterArbiterCall, encodeNativeAgentRegisterIssuerCall, encodeNativeAgentReputationGetCall, encodeNativeAgentResolveEscrowCall, encodeNativeAgentRevokeAttestationCall, encodeNativeAgentRevokeConsentCall, encodeNativeAgentServiceGetCall, encodeNativeAgentSetAvailabilityCall, encodeNativeAgentSetSpendingPolicyCall, encodeNativeAgentSpendingPolicyGetCall, encodeNativeAgentStartEscrowCall, encodeNativeAgentSubmitEscrowCall, encodeNativeMarketModuleForwarderInput, encodeNativeNftBuyListingCall, encodeNativeNftCancelListingCall, encodeNativeNftCreateListingCall, encodeNativeNftPlaceAuctionBidCall, encodeNativeNftSettleAuctionCall, encodeNativeNftSweepExpiredListingsCall, encodeNativeSpotCancelOrderCall, encodeNativeSpotCreateMarketCall, encodeNativeSpotLimitOrderCall, encodeNativeSpotSettleLimitOrderCall, encodeNativeSpotSettleRoutedLimitOrderCall, encodePlaceLimitOrderCalldata, encodePlaceMarketOrderCalldata, encodePlaceMarketOrderExCalldata, encodeRegisterPubkeyCalldata, encodeReportServiceProbeCalldata, encodeSetPolicyCalldata, encodeSetPolicyClaimCalldata, formatLyth, formatLythoshi, formatNativeReceiptFeeDisplay, hexToAddressBytes, isConcreteServiceProbeStatus, isRedemptionPrincipalUnavailableRevert, isSinglePublicServiceProbeMask, isValidNodeRegistryCapabilities, isValidPublicServiceProbeMask, mrvAddressToBech32, mrvBech32ToAddress, mrvCodeHashHex, mrvV1TransactionExtension, nativeDevSchemaFieldNames, nativeDevUiStrings, nodeRegistryAddressHex, normalizeAddressHex, parseAddress, parseLythToLythoshi, pubkeyRegistryAddressHex, requireTypedAddress, resolveStudioHostStatus, serviceProbeStatusLabel, spendingPolicyAddressHex, submitMrvCallNativeTx, submitMrvDeployNativeTx, submitMrvDeployPayloadNativeTx, typedBech32ToAddress, validateMrvArtifactMetadata, validateMrvCallRequest, validateMrvDeployRequest, version };
|