@molpha/sdk 0.2.0-dev-20261008064918 → 0.2.0-dev-20261010103545
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 +26 -10
- package/dist/index.d.ts +40 -40
- package/dist/index.js +57 -98
- package/dist/index.js.map +1 -1
- package/idl/molpha.json +27 -42
- package/idl/profiles/dev/molpha.json +27 -42
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -193,30 +193,46 @@ A `programId` that differs from the client's is rejected. Because the hash diffe
|
|
|
193
193
|
|
|
194
194
|
### Round timestamp
|
|
195
195
|
|
|
196
|
-
The request body carries `authSig` and `authTimestamp` but no round timestamp. The gateway
|
|
197
|
-
round
|
|
198
|
-
(`floor(
|
|
199
|
-
|
|
196
|
+
The request body carries `authSig` and `authTimestamp` but no round timestamp. The gateway stamps the
|
|
197
|
+
round with its own clock, in unix **milliseconds**, floored to a fixed 100 ms tick
|
|
198
|
+
(`floor(nowMs / 100) * 100`), and the result carries the stamp in `payload.timestamp`. The tick is a
|
|
199
|
+
protocol constant, exported as `ROUND_TICK_MS`: it is the same on every gateway and node, it is not
|
|
200
|
+
configurable, and `GET /v1/info` does not report it. Stamping does not wait for a tick boundary, so
|
|
201
|
+
it adds no latency. Committee selection reads only the timestamp's one-second window (ten ticks), so
|
|
200
202
|
nobody can pick a committee by picking a time.
|
|
201
203
|
|
|
204
|
+
- One feed (a source, a quorum and a registry version) runs at most 10 rounds per second, whatever
|
|
205
|
+
the request rate.
|
|
206
|
+
- Requests for the same feed inside one tick share one round: the nodes run it once and every caller
|
|
207
|
+
gets the result. Each caller still spends its own unit of round quota, or its own payment.
|
|
208
|
+
- One consumer gets one round per tick per feed, so at most 10 per second. A second request by the
|
|
209
|
+
same consumer for the same source and quorum inside the tick is refused with HTTP 409; the SDK
|
|
210
|
+
retries it after one tick.
|
|
202
211
|
- The message the nodes sign is `keccak256(MOLPHA_MESSAGE_V1 || value || sourceId || u32be(registryVersion) || u8(quorum) || u64be(timestamp) || signersBitmap)`.
|
|
203
212
|
- Chain clocks, epochs and `maxAge`/staleness are in **seconds**: compare with
|
|
204
213
|
`timestampSeconds(payload.timestamp)` (floored `ts / 1000`). `timestampAgeSeconds(ts, nowSeconds)` saturates at 0.
|
|
205
|
-
-
|
|
214
|
+
- The SDK returns `payload.timestamp` exactly as the gateway gave it. Nodes enforce the grid when
|
|
215
|
+
they sign; the on-chain verifiers do not check it.
|
|
206
216
|
|
|
207
217
|
### Retries and timeouts
|
|
208
218
|
|
|
209
|
-
`requestSignedData` makes up to `maxRetries` attempts (default 6) and chooses the wait before each by why the last one failed (`retryDelayMs`). Every wait
|
|
219
|
+
`requestSignedData` makes up to `maxRetries` attempts (default 6) and chooses the wait before each by why the last one failed (`retryDelayMs`). Every wait carries jitter so clients that failed together do not retry together. The backoff step is a capped exponential: 250 ms, 500 ms, up to 5 s.
|
|
210
220
|
|
|
211
221
|
| Last attempt | Wait before the next |
|
|
212
222
|
| --- | --- |
|
|
213
|
-
| 409 (this consumer already has a round for the source in
|
|
214
|
-
| 503 or 429 (gateway at capacity, or nodes
|
|
215
|
-
| timeout, network error, other 5xx |
|
|
223
|
+
| 409 (this consumer already has a round for the source and quorum in the current tick) | one tick (`ROUND_TICK_MS`, 100 ms), plus up to 20 ms |
|
|
224
|
+
| 503 or 429 (gateway at capacity, or too few nodes accepted the round) | the later of the gateway's `Retry-After` and the backoff step, plus up to one more step |
|
|
225
|
+
| timeout, network error, other 5xx | the backoff step, half of it randomized |
|
|
216
226
|
| 400, 401, 402, 403 | none: terminal. 403 means the subscription is inactive or its round quota for the term is spent |
|
|
217
227
|
|
|
218
228
|
A 400 saying the `registryVersion` is not the current one (a cached context, or a registry roll between your read and the request) is the exception: the SDK reads the registry afresh and retries once, without spending an attempt.
|
|
219
229
|
|
|
230
|
+
The wait after a 409 is a full tick rather than the time left to the next boundary: a full tick puts the retry in a later tick whatever the offset between the client's clock and the gateway's, so the SDK never computes a boundary from the local clock. A caller polling one feed gains nothing by asking more often than once per tick: space the requests at least `ROUND_TICK_MS` apart.
|
|
231
|
+
|
|
232
|
+
A retry is a new request, and the gateway stamps it anew, so it is a **new round**: it spends another unit of round quota or needs another payment, and with a paywalled source another set of payment authorizations. Nothing ties a retry to the attempt before it; there is no idempotency key. Set `maxRetries: 1` to make a single attempt and decide about a retry yourself.
|
|
233
|
+
|
|
234
|
+
The gateway limits the total load: at capacity it answers HTTP 503 with a `Retry-After`, and a consumer over its request rate gets HTTP 429. It also answers 503 when too few nodes accept a round. The SDK treats them alike: it backs off and retries, and throws a `GatewayError` with the status when the attempts run out.
|
|
235
|
+
|
|
220
236
|
`timeoutMs` defaults to 35 s, above the gateway's own wait for a round (`roundTimeoutSeconds` in `/v1/info`, 30 s by default). A shorter timeout abandons a round the gateway is still running, and the retry then starts another. A source that cannot be fetched is reported as soon as enough nodes have failed (usually well under a second), not after the wait.
|
|
221
237
|
|
|
222
238
|
## Wallet
|
|
@@ -917,7 +933,7 @@ Current scope:
|
|
|
917
933
|
|
|
918
934
|
- Solana subscription and extend flow;
|
|
919
935
|
- deterministic source id and attestation message hashing;
|
|
920
|
-
- gateway signed-data requests (failover,
|
|
936
|
+
- gateway signed-data requests (failover, retries with backoff, per-gateway request auth, context cache);
|
|
921
937
|
- Solana attestation submission and feed/registry reads;
|
|
922
938
|
- private API encryption helpers (pre-production);
|
|
923
939
|
- caller-funded x402 payments for paywalled API sources (Base USDC, pre-production);
|
package/dist/index.d.ts
CHANGED
|
@@ -40,8 +40,6 @@ interface GatewayInfo {
|
|
|
40
40
|
gatewayAuthority: string;
|
|
41
41
|
/** Program id the gateway settles against; must match the client's when present. */
|
|
42
42
|
programId?: string;
|
|
43
|
-
/** The gateway's round timestamp grid in milliseconds (`round.tick_ms`), when advertised. */
|
|
44
|
-
tickMs?: number;
|
|
45
43
|
/** Longest the gateway waits for a round, in seconds (`node.agg_wait_seconds`), when advertised. */
|
|
46
44
|
roundTimeoutSeconds?: number;
|
|
47
45
|
/** Rounds the gateway runs at once (`limits.max_inflight_rounds`); 0 or absent: not advertised. */
|
|
@@ -165,17 +163,12 @@ interface RequestSignedDataOptions {
|
|
|
165
163
|
/** Max accepted value age in seconds. Default 60. */
|
|
166
164
|
maxAge?: number;
|
|
167
165
|
/**
|
|
168
|
-
* Max attempts.
|
|
169
|
-
*
|
|
170
|
-
* see {@link retryDelayMs}.
|
|
166
|
+
* Max attempts. The wait before each retry depends on why the last attempt failed: one round
|
|
167
|
+
* tick after a duplicate (HTTP 409), the gateway's `Retry-After` or a capped exponential backoff
|
|
168
|
+
* after a busy answer, the backoff after anything else; see {@link retryDelayMs}. Every attempt
|
|
169
|
+
* the gateway accepts spends another unit of round quota. Default {@link DEFAULT_MAX_RETRIES}.
|
|
171
170
|
*/
|
|
172
171
|
maxRetries?: number;
|
|
173
|
-
/**
|
|
174
|
-
* The gateway's tick grid in milliseconds (its `round.tick_ms`). A retry waits for the start of
|
|
175
|
-
* the next tick so it is a new round, not a duplicate of the last. Default: the gateway's
|
|
176
|
-
* advertised `tickMs` (read once, on the first retry), else 1000.
|
|
177
|
-
*/
|
|
178
|
-
tickMs?: number;
|
|
179
172
|
/**
|
|
180
173
|
* Per-request timeout in ms. Default {@link DEFAULT_ROUND_TIMEOUT_MS}, above the gateway's own
|
|
181
174
|
* wait for a round: a shorter timeout abandons rounds the gateway is still running and the retry
|
|
@@ -228,6 +221,8 @@ interface MolphaGatewayOptions {
|
|
|
228
221
|
allowUnverifiedNodeKeysForPrivateApi?: boolean;
|
|
229
222
|
/** Source of randomness in [0, 1) for retry jitter; defaults to `Math.random` (tests only). */
|
|
230
223
|
random?: () => number;
|
|
224
|
+
/** Waits `ms` before a retry; defaults to a `setTimeout` timer (tests only). */
|
|
225
|
+
sleep?: (ms: number) => Promise<void>;
|
|
231
226
|
}
|
|
232
227
|
/**
|
|
233
228
|
* The slow-changing inputs a `requestSignedData` round binds to. Fetch once with
|
|
@@ -237,8 +232,6 @@ interface RoundContext extends RegistrySelectionConfig {
|
|
|
237
232
|
/** Full registry node set: private API secrets are encrypted for every node in it. */
|
|
238
233
|
nodes: Node[];
|
|
239
234
|
}
|
|
240
|
-
/** Milliseconds from `nowMs` to the start of the next tick, plus a millisecond of margin. */
|
|
241
|
-
declare function msUntilNextTick(nowMs: number, tickMs: number): number;
|
|
242
235
|
/**
|
|
243
236
|
* Default per-request timeout: above the gateway's own wait for a round (`node.agg_wait_seconds`,
|
|
244
237
|
* 30 s by default), so the client does not abandon a round the gateway is still running and then
|
|
@@ -249,9 +242,10 @@ declare const DEFAULT_ROUND_TIMEOUT_MS = 35000;
|
|
|
249
242
|
declare const DEFAULT_MAX_RETRIES = 6;
|
|
250
243
|
/**
|
|
251
244
|
* Why an attempt failed, as far as it decides how long to wait before the next one:
|
|
252
|
-
* - `conflict`: HTTP 409, this consumer already has a round for the source in
|
|
253
|
-
*
|
|
254
|
-
*
|
|
245
|
+
* - `conflict`: HTTP 409, this consumer already has a round for the source and quorum in the
|
|
246
|
+
* current round tick;
|
|
247
|
+
* - `busy`: HTTP 503 or 429, the gateway is at capacity, or too few nodes accepted the round
|
|
248
|
+
* (unavailable, or busy), optionally with the gateway's `Retry-After`;
|
|
255
249
|
* - `error`: anything else that may be transient (timeout, network, other 5xx).
|
|
256
250
|
*/
|
|
257
251
|
type RetryCause = {
|
|
@@ -263,16 +257,17 @@ type RetryCause = {
|
|
|
263
257
|
kind: "error";
|
|
264
258
|
};
|
|
265
259
|
/**
|
|
266
|
-
* How long to wait before the next attempt, in ms.
|
|
267
|
-
*
|
|
268
|
-
*
|
|
269
|
-
*
|
|
270
|
-
*
|
|
271
|
-
*
|
|
272
|
-
* - error:
|
|
273
|
-
*
|
|
260
|
+
* How long to wait before the next attempt, in ms. Each delay carries jitter, so clients that
|
|
261
|
+
* failed together do not retry together:
|
|
262
|
+
* - conflict: one full round tick ({@link ROUND_TICK_MS}) plus up to 20 ms. The gateway stamps a
|
|
263
|
+
* round with the tick it is in, so a retry a full tick later is in a later tick whatever the
|
|
264
|
+
* offset between the two clocks: no boundary is computed from the local clock;
|
|
265
|
+
* - busy: the later of the gateway's `Retry-After` and the backoff step, plus up to one more step;
|
|
266
|
+
* - error: the backoff step, half of it randomized.
|
|
267
|
+
* The backoff step is a capped exponential (250 ms, 500 ms, ... 5 s). `failures` is the number of
|
|
268
|
+
* attempts that have failed so far (1 after the first).
|
|
274
269
|
*/
|
|
275
|
-
declare function retryDelayMs(cause: RetryCause, failures: number,
|
|
270
|
+
declare function retryDelayMs(cause: RetryCause, failures: number, random?: () => number): number;
|
|
276
271
|
|
|
277
272
|
/** Thrown for terminal gateway errors (400/401) — never retried. */
|
|
278
273
|
declare class GatewayError extends Error {
|
|
@@ -292,9 +287,8 @@ declare class MolphaGateway {
|
|
|
292
287
|
private readonly programIdBytes;
|
|
293
288
|
/** Gateway PDA per endpoint URL; resolved once per client lifetime. */
|
|
294
289
|
private readonly gatewayPdas;
|
|
295
|
-
/** Advertised timing per endpoint URL, read lazily on the first retry. */
|
|
296
|
-
private readonly advertisedInfo;
|
|
297
290
|
private readonly random;
|
|
291
|
+
private readonly sleep;
|
|
298
292
|
constructor(endpoints?: GatewayEndpointInput | GatewayEndpointInput[], getRegistrySelectionConfig?: () => Promise<RegistrySelectionConfig>, defaultSigner?: Signer,
|
|
299
293
|
/**
|
|
300
294
|
* Either a default subscription owner (base58) or gateway options. A string is the
|
|
@@ -337,10 +331,13 @@ declare class MolphaGateway {
|
|
|
337
331
|
* failover. The body is POSTed to each endpoint in order until one `completed`s.
|
|
338
332
|
*
|
|
339
333
|
* The round's `sourceId` is derived from `apiConfig`. The request carries no round timestamp:
|
|
340
|
-
* the gateway
|
|
341
|
-
*
|
|
342
|
-
* timestamp and the signers' bitmap
|
|
343
|
-
*
|
|
334
|
+
* the gateway stamps the round with its own clock floored to the round tick (`timestamp`, unix
|
|
335
|
+
* milliseconds, a multiple of {@link ROUND_TICK_MS}), and the committee follows from it. The
|
|
336
|
+
* result carries the assigned timestamp and the signers' bitmap; the timestamp is taken as the
|
|
337
|
+
* gateway gave it. Requests for the same source, quorum and registry version inside one tick
|
|
338
|
+
* share one round. One consumer gets one round per tick per source and quorum: a second request
|
|
339
|
+
* in the tick is refused (HTTP 409) and retried one tick later. A retry is stamped anew, so it
|
|
340
|
+
* is a new round that spends another unit of round quota.
|
|
344
341
|
*
|
|
345
342
|
* The request is authorized by a `RequestAuth` signature (`authSig`) over the program id, the
|
|
346
343
|
* endpoint's Gateway PDA, the source id, the quorum and `authTimestamp` (unix seconds, read
|
|
@@ -370,12 +367,6 @@ declare class MolphaGateway {
|
|
|
370
367
|
* encryption) or when nothing else can tell us the node count.
|
|
371
368
|
*/
|
|
372
369
|
private resolveContext;
|
|
373
|
-
/**
|
|
374
|
-
* The gateway's advertised tick grid, read once per endpoint and only when a retry needs it. Any
|
|
375
|
-
* failure (an old gateway without `/v1/info`, a timeout) means "not advertised", so the caller
|
|
376
|
-
* falls back to the default; a failure is not cached.
|
|
377
|
-
*/
|
|
378
|
-
private advertisedTickMs;
|
|
379
370
|
/** Gateway PDA bytes for an endpoint, cached per URL. A failed lookup is not cached. */
|
|
380
371
|
private resolveGatewayPda;
|
|
381
372
|
private lookupGatewayPda;
|
|
@@ -877,6 +868,15 @@ declare function deriveSelectionBitmap(sourceId: Uint8Array, registryVersion: nu
|
|
|
877
868
|
* EVM `block.timestamp`), epoch windows and `maxAge`/staleness are measured in SECONDS, so
|
|
878
869
|
* anything that compares the two must go through {@link timestampSeconds}.
|
|
879
870
|
*/
|
|
871
|
+
/**
|
|
872
|
+
* The round tick in milliseconds: the gateway stamps a round with its clock floored to this grid
|
|
873
|
+
* (`floor(nowMs / ROUND_TICK_MS) * ROUND_TICK_MS`) and nodes reject a round whose timestamp is off
|
|
874
|
+
* it. A feed (source, quorum, registry version) therefore runs at most ten rounds per second, and
|
|
875
|
+
* every selection window (`SELECTION_WINDOW_MS`, one second) holds exactly ten ticks. A
|
|
876
|
+
* protocol constant, the same in every gateway and node: not configuration, and not reported by
|
|
877
|
+
* `GET /v1/info`.
|
|
878
|
+
*/
|
|
879
|
+
declare const ROUND_TICK_MS = 100;
|
|
880
880
|
/** `timestamp` (unix ms) as whole unix seconds, floored. */
|
|
881
881
|
declare function timestampSeconds(timestamp: number | bigint): number;
|
|
882
882
|
/**
|
|
@@ -1467,8 +1467,8 @@ interface BulkOptions {
|
|
|
1467
1467
|
*/
|
|
1468
1468
|
concurrency?: number;
|
|
1469
1469
|
/**
|
|
1470
|
-
* Spread request starts over this many ms by a hash of the feed's source id. Feeds that are due
|
|
1471
|
-
* the same
|
|
1470
|
+
* Spread request starts over this many ms by a hash of the feed's source id. Feeds that are due at
|
|
1471
|
+
* the same moment otherwise arrive together and queue at the gateway. Default 0 (no spreading).
|
|
1472
1472
|
*/
|
|
1473
1473
|
spreadMs?: number;
|
|
1474
1474
|
/** Submit each attestation to Solana after its round. Default true. */
|
|
@@ -1592,4 +1592,4 @@ declare class MolphaSDK {
|
|
|
1592
1592
|
}>;
|
|
1593
1593
|
}
|
|
1594
1594
|
|
|
1595
|
-
export { APIConfig, AdaptiveLimiter, AggregationConfig, AggregationConfigError, AssetDomain, Attestation, type AttestationMessageFields, type BuildEvmVerifierArgsOptions, type BuildStarknetVerifierArgsOptions, type BulkFeed, type BulkOptions, type BulkResult, type CoalitionKey, DEFAULT_GATEWAY_ENDPOINT, DEFAULT_MAX_RETRIES, DEFAULT_ROUND_TIMEOUT_MS, EIP712_DOMAIN_TYPEHASH, type Eip712Domain, type EvmAttestation, type EvmAttestationPayload, type EvmSchnorrSignature, EvmSigner, type EvmVerifierArgs, type EvmVerifyResult, type FeedAccount, type GatewayEndpoint, type GatewayEndpointInput, GatewayError, type GatewayInfo, INT256_MAX, INT256_MIN, MESSAGE_PREFIX, MIN_TOLERANCE_SIGNATURES, MOLPHA_DEV_VERIFIERS_PROVISIONAL, MOLPHA_IDL, MOLPHA_PROGRAM_ADDRESS, MOLPHA_PROGRAM_ID, MOLPHA_SDK_PROFILE, MOLPHA_VERIFIER_ABI, MOLPHA_VERIFIER_ADDRESS, MOLPHA_VERIFIER_STARKNET_ADDRESSES, MOLPHA_VERIFIER_STARKNET_SEPOLIA, type MolphaEvmNetwork, MolphaGateway, type MolphaGatewayOptions, MolphaSDK, type MolphaSDKOptions, MolphaSolanaClient, type MolphaStarknetNetwork, MolphaWallet, Node, NodeKeyVerifier, NodeKeyVerifierArgs, NodesInfo, type PlanId, type PlanInfo, PlanType, REQUEST_AUTH_DOMAIN, RegistrySelectionConfig, type RegistryStateView, type RegistryView, type RequestAuthFields, type RequestSignedDataOptions, type RetryCause, type RoundContext, SELECTION_WINDOW_MS, type Secp256k1KeyInput, Signer, SourcePaymentOptions, type StarknetAttestation, type StarknetAttestationPayload, type StarknetFeltLike, type StarknetSchnorrSignature, type StarknetVerifierArgs, type StarknetVerifyResult, type SubmitAttestationArgs, type SubmitAttestationOptions, SubmitFailedError, type SubmitResult, type SubscribeResult, type SubscriptionInfo, TRANSFER_WITH_AUTHORIZATION_TYPEHASH, type TransferAuthorization, UpstreamPaymentRequiredError, UpstreamQuote, UpstreamTerms, VERIFY_CODES, type VerifyCode, type VerifyCodeName, addressToBytes, assertAggregationQuorum, attestationMessageHash, attestationMessageHashFromAttestation, base64ToBytes, bigIntFromBytesBe, bitmapBitSet, bitmapToIndices, buildEvmVerifierArgs, buildStarknetVerifierArgs, buildSubmitAttestationArgs, bytesToBase64, bytesToHex, bytesToHex0x, canonicalizeAPIConfig, canonicalizeAggregation, commitmentAddressToStarknetFelt, computeCoalitionKey, concatBytes, createEvmSignerFromPrivateKey, decodeInt256, deriveGatewayPda, deriveGatewayPdaAddress, deriveGroupBitmap, deriveSelectionBitmap, deriveSelectionSeed, deriveSourceId, deriveSourceIdString, domainSeparator, effectiveSelectionSize, eligibleSetSize, encodeEvmVerifyCalldata, encodeInt256, encodeInt256Decimal, encodeRequestAuth, encodeStarknetVerifyCalldata, ensureLength, estimateSubmitComputeUnits, evmAddressFromPrivateKey, feedPda, formatInt256Decimal, gatewayPda, getMolphaStarknetVerifierAddress, hashRequestAuth, hexToBytes,
|
|
1595
|
+
export { APIConfig, AdaptiveLimiter, AggregationConfig, AggregationConfigError, AssetDomain, Attestation, type AttestationMessageFields, type BuildEvmVerifierArgsOptions, type BuildStarknetVerifierArgsOptions, type BulkFeed, type BulkOptions, type BulkResult, type CoalitionKey, DEFAULT_GATEWAY_ENDPOINT, DEFAULT_MAX_RETRIES, DEFAULT_ROUND_TIMEOUT_MS, EIP712_DOMAIN_TYPEHASH, type Eip712Domain, type EvmAttestation, type EvmAttestationPayload, type EvmSchnorrSignature, EvmSigner, type EvmVerifierArgs, type EvmVerifyResult, type FeedAccount, type GatewayEndpoint, type GatewayEndpointInput, GatewayError, type GatewayInfo, INT256_MAX, INT256_MIN, MESSAGE_PREFIX, MIN_TOLERANCE_SIGNATURES, MOLPHA_DEV_VERIFIERS_PROVISIONAL, MOLPHA_IDL, MOLPHA_PROGRAM_ADDRESS, MOLPHA_PROGRAM_ID, MOLPHA_SDK_PROFILE, MOLPHA_VERIFIER_ABI, MOLPHA_VERIFIER_ADDRESS, MOLPHA_VERIFIER_STARKNET_ADDRESSES, MOLPHA_VERIFIER_STARKNET_SEPOLIA, type MolphaEvmNetwork, MolphaGateway, type MolphaGatewayOptions, MolphaSDK, type MolphaSDKOptions, MolphaSolanaClient, type MolphaStarknetNetwork, MolphaWallet, Node, NodeKeyVerifier, NodeKeyVerifierArgs, NodesInfo, type PlanId, type PlanInfo, PlanType, REQUEST_AUTH_DOMAIN, ROUND_TICK_MS, RegistrySelectionConfig, type RegistryStateView, type RegistryView, type RequestAuthFields, type RequestSignedDataOptions, type RetryCause, type RoundContext, SELECTION_WINDOW_MS, type Secp256k1KeyInput, Signer, SourcePaymentOptions, type StarknetAttestation, type StarknetAttestationPayload, type StarknetFeltLike, type StarknetSchnorrSignature, type StarknetVerifierArgs, type StarknetVerifyResult, type SubmitAttestationArgs, type SubmitAttestationOptions, SubmitFailedError, type SubmitResult, type SubscribeResult, type SubscriptionInfo, TRANSFER_WITH_AUTHORIZATION_TYPEHASH, type TransferAuthorization, UpstreamPaymentRequiredError, UpstreamQuote, UpstreamTerms, VERIFY_CODES, type VerifyCode, type VerifyCodeName, addressToBytes, assertAggregationQuorum, attestationMessageHash, attestationMessageHashFromAttestation, base64ToBytes, bigIntFromBytesBe, bitmapBitSet, bitmapToIndices, buildEvmVerifierArgs, buildStarknetVerifierArgs, buildSubmitAttestationArgs, bytesToBase64, bytesToHex, bytesToHex0x, canonicalizeAPIConfig, canonicalizeAggregation, commitmentAddressToStarknetFelt, computeCoalitionKey, concatBytes, createEvmSignerFromPrivateKey, decodeInt256, deriveGatewayPda, deriveGatewayPdaAddress, deriveGroupBitmap, deriveSelectionBitmap, deriveSelectionSeed, deriveSourceId, deriveSourceIdString, domainSeparator, effectiveSelectionSize, eligibleSetSize, encodeEvmVerifyCalldata, encodeInt256, encodeInt256Decimal, encodeRequestAuth, encodeStarknetVerifyCalldata, ensureLength, estimateSubmitComputeUnits, evmAddressFromPrivateKey, feedPda, formatInt256Decimal, gatewayPda, getMolphaStarknetVerifierAddress, hashRequestAuth, hexToBytes, nodePda, normalizeEndpoint, normalizeSecp256k1PublicKeyHex, parseEvmVerifyResult, parseGatewayInfo, parseStarknetVerifyResult, parseUpstreamQuote, planIdFromVariant, planPda, planVariant, probeSource, protocolConfigPda, registryPda, registryStatePda, requestMany, resolveRemainingAccounts, retryDelayMs, secp256k1PublicKeyFromCoordinates, selectedIndices, signSourcePayments, signersBitmapToDecimal, signersBitmapToStarknetUint256, signersBitmapToUint256, spreadOffsetMs, subscriptionPda, timestampAgeSeconds, timestampSeconds, toChecksumAddress, toFixedBytes, toFixedHex, transferWithAuthorizationDigest, transferWithAuthorizationHash, u256beFromBigInt, u32be, u32le, u64be, u64le, u8, utf8, validateSuppliedTerms, verifyCodeName };
|
package/dist/index.js
CHANGED
|
@@ -401,6 +401,17 @@ function deriveSelectionBitmap(sourceId, registryVersion, nodeCount, signaturesR
|
|
|
401
401
|
const size = effectiveSelectionSize(signaturesRequired, redundancy, nodeCount);
|
|
402
402
|
return deriveGroupBitmap(seed, nodeCount, size);
|
|
403
403
|
}
|
|
404
|
+
|
|
405
|
+
// src/core/timestamp.ts
|
|
406
|
+
var ROUND_TICK_MS = 100;
|
|
407
|
+
function timestampSeconds(timestamp) {
|
|
408
|
+
const ms = typeof timestamp === "bigint" ? timestamp : BigInt(timestamp);
|
|
409
|
+
if (ms < 0n) throw new RangeError("timestamp must not be negative");
|
|
410
|
+
return Number(ms / 1000n);
|
|
411
|
+
}
|
|
412
|
+
function timestampAgeSeconds(timestamp, nowSeconds) {
|
|
413
|
+
return Math.max(0, nowSeconds - timestampSeconds(timestamp));
|
|
414
|
+
}
|
|
404
415
|
var REQUEST_AUTH_DOMAIN = utf8("MOLPHA_REQAUTH_V1");
|
|
405
416
|
function encodeRequestAuth(fields) {
|
|
406
417
|
if (!Number.isInteger(fields.signaturesRequired) || fields.signaturesRequired < 1 || fields.signaturesRequired > 255) {
|
|
@@ -808,8 +819,6 @@ function parseGatewayInfo(data) {
|
|
|
808
819
|
const info = { gatewayAuthority };
|
|
809
820
|
if (programId !== void 0) info.programId = programId;
|
|
810
821
|
const positive = (v) => typeof v === "number" && Number.isFinite(v) && v > 0 ? v : void 0;
|
|
811
|
-
const tickMs = positive(record.tickMs);
|
|
812
|
-
if (tickMs !== void 0) info.tickMs = tickMs;
|
|
813
822
|
const roundTimeoutSeconds = positive(record.roundTimeoutSeconds);
|
|
814
823
|
if (roundTimeoutSeconds !== void 0) info.roundTimeoutSeconds = roundTimeoutSeconds;
|
|
815
824
|
const maxInflightRounds = positive(record.maxInflightRounds);
|
|
@@ -820,26 +829,21 @@ function parseGatewayInfo(data) {
|
|
|
820
829
|
// src/gateway/index.ts
|
|
821
830
|
var ZERO_AUTH_SIG = new Uint8Array(64);
|
|
822
831
|
var authTimestampNow = () => Math.floor(Date.now() / 1e3);
|
|
823
|
-
var
|
|
824
|
-
|
|
825
|
-
return tickMs - nowMs % tickMs + 1;
|
|
826
|
-
}
|
|
827
|
-
var sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
|
|
832
|
+
var timerSleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
|
|
833
|
+
var CONFLICT_JITTER_MS = 20;
|
|
828
834
|
var BACKOFF_BASE_MS = 250;
|
|
829
835
|
var BACKOFF_MAX_MS = 5e3;
|
|
830
836
|
var DEFAULT_ROUND_TIMEOUT_MS = 35e3;
|
|
831
837
|
var DEFAULT_MAX_RETRIES = 6;
|
|
832
|
-
function retryDelayMs(cause, failures,
|
|
833
|
-
const
|
|
838
|
+
function retryDelayMs(cause, failures, random = Math.random) {
|
|
839
|
+
const backoff = Math.min(BACKOFF_BASE_MS * 2 ** Math.max(failures - 1, 0), BACKOFF_MAX_MS);
|
|
834
840
|
switch (cause.kind) {
|
|
835
841
|
case "conflict":
|
|
836
|
-
return
|
|
842
|
+
return ROUND_TICK_MS + random() * CONFLICT_JITTER_MS;
|
|
837
843
|
case "busy":
|
|
838
|
-
return Math.max(
|
|
839
|
-
case "error":
|
|
840
|
-
|
|
841
|
-
return Math.max(nextTick, backoff / 2 + random() * (backoff / 2));
|
|
842
|
-
}
|
|
844
|
+
return Math.max(cause.retryAfterMs ?? 0, backoff) + random() * backoff;
|
|
845
|
+
case "error":
|
|
846
|
+
return backoff / 2 + random() * (backoff / 2);
|
|
843
847
|
}
|
|
844
848
|
}
|
|
845
849
|
function mergeCause(a, b) {
|
|
@@ -877,9 +881,8 @@ var MolphaGateway = class {
|
|
|
877
881
|
programIdBytes;
|
|
878
882
|
/** Gateway PDA per endpoint URL; resolved once per client lifetime. */
|
|
879
883
|
gatewayPdas = /* @__PURE__ */ new Map();
|
|
880
|
-
/** Advertised timing per endpoint URL, read lazily on the first retry. */
|
|
881
|
-
advertisedInfo = /* @__PURE__ */ new Map();
|
|
882
884
|
random;
|
|
885
|
+
sleep;
|
|
883
886
|
constructor(endpoints, getRegistrySelectionConfig = async () => {
|
|
884
887
|
throw new Error(
|
|
885
888
|
"MolphaGateway requires getRegistrySelectionConfig to request signed data \u2014 pass the current on-chain registry version, redundancy buffer and node count (e.g. () => solana.getRegistrySelectionConfig())"
|
|
@@ -901,6 +904,7 @@ var MolphaGateway = class {
|
|
|
901
904
|
this.programId = options.programId ?? MOLPHA_PROGRAM_ID;
|
|
902
905
|
this.programIdBytes = addressToBytes(this.programId);
|
|
903
906
|
this.random = options.random ?? Math.random;
|
|
907
|
+
this.sleep = options.sleep ?? timerSleep;
|
|
904
908
|
}
|
|
905
909
|
/** The configured gateway base URLs, in failover order. */
|
|
906
910
|
endpointUrls() {
|
|
@@ -976,10 +980,13 @@ var MolphaGateway = class {
|
|
|
976
980
|
* failover. The body is POSTed to each endpoint in order until one `completed`s.
|
|
977
981
|
*
|
|
978
982
|
* The round's `sourceId` is derived from `apiConfig`. The request carries no round timestamp:
|
|
979
|
-
* the gateway
|
|
980
|
-
*
|
|
981
|
-
* timestamp and the signers' bitmap
|
|
982
|
-
*
|
|
983
|
+
* the gateway stamps the round with its own clock floored to the round tick (`timestamp`, unix
|
|
984
|
+
* milliseconds, a multiple of {@link ROUND_TICK_MS}), and the committee follows from it. The
|
|
985
|
+
* result carries the assigned timestamp and the signers' bitmap; the timestamp is taken as the
|
|
986
|
+
* gateway gave it. Requests for the same source, quorum and registry version inside one tick
|
|
987
|
+
* share one round. One consumer gets one round per tick per source and quorum: a second request
|
|
988
|
+
* in the tick is refused (HTTP 409) and retried one tick later. A retry is stamped anew, so it
|
|
989
|
+
* is a new round that spends another unit of round quota.
|
|
983
990
|
*
|
|
984
991
|
* The request is authorized by a `RequestAuth` signature (`authSig`) over the program id, the
|
|
985
992
|
* endpoint's Gateway PDA, the source id, the quorum and `authTimestamp` (unix seconds, read
|
|
@@ -1066,7 +1073,6 @@ var MolphaGateway = class {
|
|
|
1066
1073
|
}
|
|
1067
1074
|
}
|
|
1068
1075
|
let lastError;
|
|
1069
|
-
let tickMs = opts.tickMs;
|
|
1070
1076
|
let groupSize = effectiveSelectionSize(signaturesRequired, redundancyBuffer, nodeCount);
|
|
1071
1077
|
let registryIndexes = Array.from({ length: nodeCount }, (_, index) => index);
|
|
1072
1078
|
let cause = { kind: "error" };
|
|
@@ -1074,8 +1080,7 @@ var MolphaGateway = class {
|
|
|
1074
1080
|
let retryNow = false;
|
|
1075
1081
|
for (let attempt = 0; attempt < maxRetries; attempt++) {
|
|
1076
1082
|
if (attempt > 0 && !retryNow) {
|
|
1077
|
-
|
|
1078
|
-
await sleep(retryDelayMs(cause, attempt, Date.now(), tickMs, this.random));
|
|
1083
|
+
await this.sleep(retryDelayMs(cause, attempt, this.random));
|
|
1079
1084
|
}
|
|
1080
1085
|
retryNow = false;
|
|
1081
1086
|
cause = { kind: "error" };
|
|
@@ -1273,27 +1278,6 @@ var MolphaGateway = class {
|
|
|
1273
1278
|
if (registry.nodeCount !== void 0) return registry;
|
|
1274
1279
|
return { ...registry, nodes: await this.getNodes() };
|
|
1275
1280
|
}
|
|
1276
|
-
/**
|
|
1277
|
-
* The gateway's advertised tick grid, read once per endpoint and only when a retry needs it. Any
|
|
1278
|
-
* failure (an old gateway without `/v1/info`, a timeout) means "not advertised", so the caller
|
|
1279
|
-
* falls back to the default; a failure is not cached.
|
|
1280
|
-
*/
|
|
1281
|
-
async advertisedTickMs(timeoutMs) {
|
|
1282
|
-
for (const endpoint of this.endpoints) {
|
|
1283
|
-
let pending = this.advertisedInfo.get(endpoint.url);
|
|
1284
|
-
if (!pending) {
|
|
1285
|
-
pending = this.fetchGatewayInfo(endpoint, Math.min(timeoutMs, 3e3)).catch(() => void 0);
|
|
1286
|
-
this.advertisedInfo.set(endpoint.url, pending);
|
|
1287
|
-
}
|
|
1288
|
-
const info = await pending;
|
|
1289
|
-
if (info === void 0) {
|
|
1290
|
-
this.advertisedInfo.delete(endpoint.url);
|
|
1291
|
-
continue;
|
|
1292
|
-
}
|
|
1293
|
-
if (info.tickMs !== void 0) return info.tickMs;
|
|
1294
|
-
}
|
|
1295
|
-
return void 0;
|
|
1296
|
-
}
|
|
1297
1281
|
/** Gateway PDA bytes for an endpoint, cached per URL. A failed lookup is not cached. */
|
|
1298
1282
|
resolveGatewayPda(endpoint, timeoutMs) {
|
|
1299
1283
|
let pending = this.gatewayPdas.get(endpoint.url);
|
|
@@ -1630,7 +1614,7 @@ var molpha_default = {
|
|
|
1630
1614
|
name: "molpha",
|
|
1631
1615
|
version: "0.1.0",
|
|
1632
1616
|
spec: "0.1.0",
|
|
1633
|
-
description: "Molpha Oracle Solana Program
|
|
1617
|
+
description: "Molpha Oracle Solana Program"
|
|
1634
1618
|
},
|
|
1635
1619
|
instructions: [
|
|
1636
1620
|
{
|
|
@@ -3089,6 +3073,16 @@ var molpha_default = {
|
|
|
3089
3073
|
writable: true,
|
|
3090
3074
|
signer: true
|
|
3091
3075
|
},
|
|
3076
|
+
{
|
|
3077
|
+
name: "program",
|
|
3078
|
+
docs: [
|
|
3079
|
+
"This program. Its account names the ProgramData account holding the upgrade authority."
|
|
3080
|
+
],
|
|
3081
|
+
address: "chivcFQgxzwkpLvW41PV431HQ4dYpaW3povQH3AdpQt"
|
|
3082
|
+
},
|
|
3083
|
+
{
|
|
3084
|
+
name: "program_data"
|
|
3085
|
+
},
|
|
3092
3086
|
{
|
|
3093
3087
|
name: "token_program",
|
|
3094
3088
|
address: "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
|
|
@@ -5736,19 +5730,6 @@ var molpha_default = {
|
|
|
5736
5730
|
84
|
|
5737
5731
|
]
|
|
5738
5732
|
},
|
|
5739
|
-
{
|
|
5740
|
-
name: "DelegateStatusChanged",
|
|
5741
|
-
discriminator: [
|
|
5742
|
-
188,
|
|
5743
|
-
202,
|
|
5744
|
-
137,
|
|
5745
|
-
41,
|
|
5746
|
-
54,
|
|
5747
|
-
213,
|
|
5748
|
-
14,
|
|
5749
|
-
92
|
|
5750
|
-
]
|
|
5751
|
-
},
|
|
5752
5733
|
{
|
|
5753
5734
|
name: "EpochClosed",
|
|
5754
5735
|
discriminator: [
|
|
@@ -6611,6 +6592,16 @@ var molpha_default = {
|
|
|
6611
6592
|
code: 6101,
|
|
6612
6593
|
name: "InvalidInitialTau",
|
|
6613
6594
|
msg: "initial_tau is below the minimum ticket threshold"
|
|
6595
|
+
},
|
|
6596
|
+
{
|
|
6597
|
+
code: 6102,
|
|
6598
|
+
name: "InvalidProgramData",
|
|
6599
|
+
msg: "program data account is not this program's"
|
|
6600
|
+
},
|
|
6601
|
+
{
|
|
6602
|
+
code: 6103,
|
|
6603
|
+
name: "NotUpgradeAuthority",
|
|
6604
|
+
msg: "initialize must be signed by the program's upgrade authority"
|
|
6614
6605
|
}
|
|
6615
6606
|
],
|
|
6616
6607
|
types: [
|
|
@@ -6693,6 +6684,9 @@ var molpha_default = {
|
|
|
6693
6684
|
},
|
|
6694
6685
|
{
|
|
6695
6686
|
name: "timestamp",
|
|
6687
|
+
docs: [
|
|
6688
|
+
"Gateway-assigned round time in unix **milliseconds**."
|
|
6689
|
+
],
|
|
6696
6690
|
type: "u64"
|
|
6697
6691
|
}
|
|
6698
6692
|
]
|
|
@@ -6908,34 +6902,6 @@ var molpha_default = {
|
|
|
6908
6902
|
]
|
|
6909
6903
|
}
|
|
6910
6904
|
},
|
|
6911
|
-
{
|
|
6912
|
-
name: "DelegateStatusChanged",
|
|
6913
|
-
type: {
|
|
6914
|
-
kind: "struct",
|
|
6915
|
-
fields: [
|
|
6916
|
-
{
|
|
6917
|
-
name: "delegate",
|
|
6918
|
-
type: "pubkey"
|
|
6919
|
-
},
|
|
6920
|
-
{
|
|
6921
|
-
name: "owner",
|
|
6922
|
-
type: "pubkey"
|
|
6923
|
-
},
|
|
6924
|
-
{
|
|
6925
|
-
name: "old_status",
|
|
6926
|
-
type: "u8"
|
|
6927
|
-
},
|
|
6928
|
-
{
|
|
6929
|
-
name: "new_status",
|
|
6930
|
-
type: "u8"
|
|
6931
|
-
},
|
|
6932
|
-
{
|
|
6933
|
-
name: "updated_at",
|
|
6934
|
-
type: "i64"
|
|
6935
|
-
}
|
|
6936
|
-
]
|
|
6937
|
-
}
|
|
6938
|
-
},
|
|
6939
6905
|
{
|
|
6940
6906
|
name: "EpochClosed",
|
|
6941
6907
|
type: {
|
|
@@ -7344,6 +7310,9 @@ var molpha_default = {
|
|
|
7344
7310
|
},
|
|
7345
7311
|
{
|
|
7346
7312
|
name: "timestamp",
|
|
7313
|
+
docs: [
|
|
7314
|
+
"Unix milliseconds. Updates are strictly ordered on it, so two rounds in one second order."
|
|
7315
|
+
],
|
|
7347
7316
|
type: "u64"
|
|
7348
7317
|
},
|
|
7349
7318
|
{
|
|
@@ -10024,16 +9993,6 @@ function attestationMessageHashFromAttestation(attestation) {
|
|
|
10024
9993
|
});
|
|
10025
9994
|
}
|
|
10026
9995
|
|
|
10027
|
-
// src/core/timestamp.ts
|
|
10028
|
-
function timestampSeconds(timestamp) {
|
|
10029
|
-
const ms = typeof timestamp === "bigint" ? timestamp : BigInt(timestamp);
|
|
10030
|
-
if (ms < 0n) throw new RangeError("timestamp must not be negative");
|
|
10031
|
-
return Number(ms / 1000n);
|
|
10032
|
-
}
|
|
10033
|
-
function timestampAgeSeconds(timestamp, nowSeconds) {
|
|
10034
|
-
return Math.max(0, nowSeconds - timestampSeconds(timestamp));
|
|
10035
|
-
}
|
|
10036
|
-
|
|
10037
9996
|
// src/core/verifyCodes.ts
|
|
10038
9997
|
var VERIFY_CODES = {
|
|
10039
9998
|
OK: 0,
|
|
@@ -10632,6 +10591,6 @@ var MolphaSDK = class {
|
|
|
10632
10591
|
}
|
|
10633
10592
|
};
|
|
10634
10593
|
|
|
10635
|
-
export { AdaptiveLimiter, AggregationConfigError, DEFAULT_GATEWAY_ENDPOINT, DEFAULT_MAX_RETRIES, DEFAULT_ROUND_TIMEOUT_MS, EIP712_DOMAIN_TYPEHASH, GatewayError, INT256_MAX, INT256_MIN, MESSAGE_PREFIX, MIN_TOLERANCE_SIGNATURES, MOLPHA_DEV_VERIFIERS_PROVISIONAL, MOLPHA_IDL, MOLPHA_PROGRAM_ADDRESS, MOLPHA_PROGRAM_ID, MOLPHA_SDK_PROFILE, MOLPHA_VERIFIER_ABI, MOLPHA_VERIFIER_ADDRESS, MOLPHA_VERIFIER_STARKNET_ADDRESSES, MOLPHA_VERIFIER_STARKNET_SEPOLIA, MolphaGateway, MolphaSDK, MolphaSolanaClient, PlanType, REQUEST_AUTH_DOMAIN, SELECTION_WINDOW_MS, SubmitFailedError, TRANSFER_WITH_AUTHORIZATION_TYPEHASH, UpstreamPaymentRequiredError, VERIFY_CODES, addressToBytes, assertAggregationQuorum, attestationMessageHash, attestationMessageHashFromAttestation, base64ToBytes, bigIntFromBytesBe, bitmapBitSet, bitmapToIndices, buildEvmVerifierArgs, buildStarknetVerifierArgs, buildSubmitAttestationArgs, bytesToBase64, bytesToHex, bytesToHex0x, canonicalizeAPIConfig, canonicalizeAggregation, commitmentAddressToStarknetFelt, computeCoalitionKey, concatBytes, createEvmSignerFromPrivateKey, decodeInt256, deriveGatewayPda, deriveGatewayPdaAddress, deriveGroupBitmap, deriveSelectionBitmap, deriveSelectionSeed, deriveSourceId, deriveSourceIdString, domainSeparator, effectiveSelectionSize, eligibleSetSize, encodeEvmVerifyCalldata, encodeInt256, encodeInt256Decimal, encodeRequestAuth, encodeStarknetVerifyCalldata, ensureLength, estimateSubmitComputeUnits, evmAddressFromPrivateKey, feedPda, formatInt256Decimal, gatewayPda, gatewaySignerFromWallet, getMolphaStarknetVerifierAddress, hashRequestAuth, hexToBytes,
|
|
10594
|
+
export { AdaptiveLimiter, AggregationConfigError, DEFAULT_GATEWAY_ENDPOINT, DEFAULT_MAX_RETRIES, DEFAULT_ROUND_TIMEOUT_MS, EIP712_DOMAIN_TYPEHASH, GatewayError, INT256_MAX, INT256_MIN, MESSAGE_PREFIX, MIN_TOLERANCE_SIGNATURES, MOLPHA_DEV_VERIFIERS_PROVISIONAL, MOLPHA_IDL, MOLPHA_PROGRAM_ADDRESS, MOLPHA_PROGRAM_ID, MOLPHA_SDK_PROFILE, MOLPHA_VERIFIER_ABI, MOLPHA_VERIFIER_ADDRESS, MOLPHA_VERIFIER_STARKNET_ADDRESSES, MOLPHA_VERIFIER_STARKNET_SEPOLIA, MolphaGateway, MolphaSDK, MolphaSolanaClient, PlanType, REQUEST_AUTH_DOMAIN, ROUND_TICK_MS, SELECTION_WINDOW_MS, SubmitFailedError, TRANSFER_WITH_AUTHORIZATION_TYPEHASH, UpstreamPaymentRequiredError, VERIFY_CODES, addressToBytes, assertAggregationQuorum, attestationMessageHash, attestationMessageHashFromAttestation, base64ToBytes, bigIntFromBytesBe, bitmapBitSet, bitmapToIndices, buildEvmVerifierArgs, buildStarknetVerifierArgs, buildSubmitAttestationArgs, bytesToBase64, bytesToHex, bytesToHex0x, canonicalizeAPIConfig, canonicalizeAggregation, commitmentAddressToStarknetFelt, computeCoalitionKey, concatBytes, createEvmSignerFromPrivateKey, decodeInt256, deriveGatewayPda, deriveGatewayPdaAddress, deriveGroupBitmap, deriveSelectionBitmap, deriveSelectionSeed, deriveSourceId, deriveSourceIdString, domainSeparator, effectiveSelectionSize, eligibleSetSize, encodeEvmVerifyCalldata, encodeInt256, encodeInt256Decimal, encodeRequestAuth, encodeStarknetVerifyCalldata, ensureLength, estimateSubmitComputeUnits, evmAddressFromPrivateKey, feedPda, formatInt256Decimal, gatewayPda, gatewaySignerFromWallet, getMolphaStarknetVerifierAddress, hashRequestAuth, hexToBytes, nodePda, normalizeEndpoint, normalizeSecp256k1PublicKeyHex, parseEvmVerifyResult, parseGatewayInfo, parseStarknetVerifyResult, parseUpstreamQuote, planIdFromVariant, planPda, planVariant, probeSource, protocolConfigPda, registryPda, registryStatePda, requestMany, resolveRemainingAccounts, retryDelayMs, secp256k1PublicKeyFromCoordinates, selectedIndices, signSourcePayments, signerFromKeypair, signersBitmapToDecimal, signersBitmapToStarknetUint256, signersBitmapToUint256, spreadOffsetMs, subscriptionPda, timestampAgeSeconds, timestampSeconds, toChecksumAddress, toFixedBytes, toFixedHex, transferWithAuthorizationDigest, transferWithAuthorizationHash, u256beFromBigInt, u32be, u32le, u64be, u64le, u8, utf8, validateSuppliedTerms, verifyCodeName };
|
|
10636
10595
|
//# sourceMappingURL=index.js.map
|
|
10637
10596
|
//# sourceMappingURL=index.js.map
|