ault-sdk-ts 0.5.0 → 0.7.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/dist/core/gas-limits-fetcher.d.ts +14 -0
- package/dist/core/manifest-resolver.d.ts +2 -1
- package/dist/index.cjs +316 -75
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +302 -75
- package/dist/index.js.map +1 -1
- package/dist/rest/dex-types.generated.d.ts +73 -34
- package/dist/rest/dex.d.ts +2 -0
- package/dist/rest/dex.generated.d.ts +295 -69
- package/dist/rest/pagination.d.ts +45 -0
- package/package.json +1 -1
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { type FetchFn, type FetchWithRetryOptions } from "./http";
|
|
2
|
+
import { GAS_CONSTANTS } from "./network";
|
|
3
|
+
type GasKey = keyof typeof GAS_CONSTANTS;
|
|
4
|
+
export type FeeFreeGasOverrides = Partial<Record<GasKey, number>>;
|
|
5
|
+
/**
|
|
6
|
+
* Fetches the chain's fee-free gas limits from
|
|
7
|
+
* `{restUrl}/ault/accountx/v1/fee_free_gas_limits` and maps them onto
|
|
8
|
+
* GAS_CONSTANTS keys, so the SDK tracks each chain's live limits instead of the
|
|
9
|
+
* embedded baseline. Returns the overrides on success, or `null` on any failure
|
|
10
|
+
* (network, non-2xx, parse, schema) — the caller keeps its embedded/last-good
|
|
11
|
+
* values in that case. A `0` base (e.g. MsgModifyOrders) is skipped, not zeroed.
|
|
12
|
+
*/
|
|
13
|
+
export declare function fetchFeeFreeGasLimits(restUrl: string, fetchFn?: FetchFn, fetchOptions?: FetchWithRetryOptions): Promise<FeeFreeGasOverrides | null>;
|
|
14
|
+
export {};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { GAS_CONSTANTS, type NetworkConfig } from "./network";
|
|
2
2
|
import type { FetchFn, FetchWithRetryOptions } from "./http";
|
|
3
|
+
import { type FeeFreeGasOverrides } from "./gas-limits-fetcher";
|
|
3
4
|
import { type Manifest, type ManifestGas } from "./manifest-types";
|
|
4
5
|
/**
|
|
5
6
|
* Sparse field-level merge of two manifests. The right operand wins on every
|
|
@@ -54,7 +55,7 @@ export declare const NON_OVERRIDABLE_GAS_KEYS: readonly ["EIP712_FEE_AMOUNT", "E
|
|
|
54
55
|
* every field has a baseline value, so any key the manifest omits keeps the
|
|
55
56
|
* embedded one.
|
|
56
57
|
*/
|
|
57
|
-
export declare function applyGasOverrides(gas: ManifestGas | undefined): typeof GAS_CONSTANTS;
|
|
58
|
+
export declare function applyGasOverrides(gas: ManifestGas | undefined, chainOverrides?: FeeFreeGasOverrides): typeof GAS_CONSTANTS;
|
|
58
59
|
export interface ManifestResolverOptions {
|
|
59
60
|
network: NetworkConfig;
|
|
60
61
|
fetchFn?: FetchFn;
|