@dedot/chaintypes 0.123.0 → 0.132.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/aleph/index.d.ts +2 -0
- package/aleph/view-functions.d.ts +5 -0
- package/astar/consts.d.ts +0 -9
- package/astar/index.d.ts +3 -1
- package/astar/query.d.ts +0 -15
- package/astar/view-functions.d.ts +5 -0
- package/basilisk/index.d.ts +2 -0
- package/basilisk/view-functions.d.ts +5 -0
- package/hydration/consts.d.ts +29 -0
- package/hydration/errors.d.ts +172 -10
- package/hydration/events.d.ts +105 -0
- package/hydration/index.d.ts +3 -1
- package/hydration/json-rpc.d.ts +1 -0
- package/hydration/query.d.ts +50 -0
- package/hydration/tx.d.ts +408 -0
- package/hydration/types.d.ts +695 -12
- package/hydration/view-functions.d.ts +5 -0
- package/kusama/consts.d.ts +27 -7
- package/kusama/errors.d.ts +51 -4
- package/kusama/events.d.ts +212 -4
- package/kusama/index.d.ts +3 -1
- package/kusama/query.d.ts +44 -19
- package/kusama/runtime.d.ts +22 -0
- package/kusama/tx.d.ts +377 -25
- package/kusama/types.d.ts +638 -80
- package/kusama/view-functions.d.ts +5 -0
- package/kusama-asset-hub/index.d.ts +2 -0
- package/kusama-asset-hub/view-functions.d.ts +5 -0
- package/kusama-people/index.d.ts +2 -0
- package/kusama-people/view-functions.d.ts +5 -0
- package/moonbeam/index.d.ts +3 -1
- package/moonbeam/view-functions.d.ts +5 -0
- package/package.json +3 -3
- package/paseo/index.d.ts +2 -0
- package/paseo/view-functions.d.ts +5 -0
- package/paseo-asset-hub/index.d.ts +2 -0
- package/paseo-asset-hub/view-functions.d.ts +5 -0
- package/paseo-hydration/index.d.ts +2 -0
- package/paseo-hydration/view-functions.d.ts +5 -0
- package/paseo-people/index.d.ts +2 -0
- package/paseo-people/view-functions.d.ts +5 -0
- package/polkadot/consts.d.ts +23 -5
- package/polkadot/errors.d.ts +51 -4
- package/polkadot/events.d.ts +207 -4
- package/polkadot/index.d.ts +3 -1
- package/polkadot/query.d.ts +44 -19
- package/polkadot/runtime.d.ts +22 -0
- package/polkadot/tx.d.ts +376 -24
- package/polkadot/types.d.ts +630 -78
- package/polkadot/view-functions.d.ts +5 -0
- package/polkadot-asset-hub/index.d.ts +2 -0
- package/polkadot-asset-hub/view-functions.d.ts +5 -0
- package/polkadot-people/index.d.ts +2 -0
- package/polkadot-people/view-functions.d.ts +5 -0
- package/substrate/index.d.ts +2 -0
- package/substrate/runtime.d.ts +11 -11
- package/substrate/types.d.ts +8 -1
- package/substrate/view-functions.d.ts +5 -0
- package/vara/index.d.ts +2 -0
- package/vara/view-functions.d.ts +5 -0
- package/westend/consts.d.ts +28 -9
- package/westend/errors.d.ts +23 -37
- package/westend/events.d.ts +25 -49
- package/westend/index.d.ts +3 -1
- package/westend/query.d.ts +42 -70
- package/westend/runtime.d.ts +7 -0
- package/westend/tx.d.ts +89 -124
- package/westend/types.d.ts +239 -339
- package/westend/view-functions.d.ts +84 -0
- package/westend-asset-hub/consts.d.ts +41 -14
- package/westend-asset-hub/errors.d.ts +14 -96
- package/westend-asset-hub/events.d.ts +29 -81
- package/westend-asset-hub/index.d.ts +3 -1
- package/westend-asset-hub/query.d.ts +63 -125
- package/westend-asset-hub/runtime.d.ts +47 -1
- package/westend-asset-hub/tx.d.ts +105 -549
- package/westend-asset-hub/types.d.ts +569 -1040
- package/westend-asset-hub/view-functions.d.ts +82 -0
- package/westend-people/index.d.ts +2 -0
- package/westend-people/view-functions.d.ts +5 -0
package/aleph/index.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ import { ChainJsonRpcApis } from './json-rpc.js';
|
|
|
7
7
|
import { ChainErrors } from './errors.js';
|
|
8
8
|
import { ChainEvents } from './events.js';
|
|
9
9
|
import { RuntimeApis } from './runtime.js';
|
|
10
|
+
import { ChainViewFunctions } from './view-functions.js';
|
|
10
11
|
import { ChainTx } from './tx.js';
|
|
11
12
|
|
|
12
13
|
export * from './types.js';
|
|
@@ -18,6 +19,7 @@ export interface VersionedAlephApi<Rv extends RpcVersion> extends GenericSubstra
|
|
|
18
19
|
errors: ChainErrors<Rv>;
|
|
19
20
|
events: ChainEvents<Rv>;
|
|
20
21
|
call: RuntimeApis<Rv>;
|
|
22
|
+
view: ChainViewFunctions<Rv>;
|
|
21
23
|
tx: ChainTx<Rv>;
|
|
22
24
|
}
|
|
23
25
|
|
package/astar/consts.d.ts
CHANGED
|
@@ -1187,13 +1187,4 @@ export interface ChainConsts<Rv extends RpcVersion> extends GenericChainConsts<R
|
|
|
1187
1187
|
**/
|
|
1188
1188
|
[name: string]: any;
|
|
1189
1189
|
};
|
|
1190
|
-
/**
|
|
1191
|
-
* Pallet `DemocracyMBM`'s constants
|
|
1192
|
-
**/
|
|
1193
|
-
democracyMBM: {
|
|
1194
|
-
/**
|
|
1195
|
-
* Generic pallet constant
|
|
1196
|
-
**/
|
|
1197
|
-
[name: string]: any;
|
|
1198
|
-
};
|
|
1199
1190
|
}
|
package/astar/index.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ import { ChainJsonRpcApis } from './json-rpc.js';
|
|
|
7
7
|
import { ChainErrors } from './errors.js';
|
|
8
8
|
import { ChainEvents } from './events.js';
|
|
9
9
|
import { RuntimeApis } from './runtime.js';
|
|
10
|
+
import { ChainViewFunctions } from './view-functions.js';
|
|
10
11
|
import { ChainTx } from './tx.js';
|
|
11
12
|
|
|
12
13
|
export * from './types.js';
|
|
@@ -18,12 +19,13 @@ export interface VersionedAstarApi<Rv extends RpcVersion> extends GenericSubstra
|
|
|
18
19
|
errors: ChainErrors<Rv>;
|
|
19
20
|
events: ChainEvents<Rv>;
|
|
20
21
|
call: RuntimeApis<Rv>;
|
|
22
|
+
view: ChainViewFunctions<Rv>;
|
|
21
23
|
tx: ChainTx<Rv>;
|
|
22
24
|
}
|
|
23
25
|
|
|
24
26
|
/**
|
|
25
27
|
* @name: AstarApi
|
|
26
|
-
* @specVersion:
|
|
28
|
+
* @specVersion: 1601
|
|
27
29
|
**/
|
|
28
30
|
export interface AstarApi {
|
|
29
31
|
legacy: VersionedAstarApi<RpcLegacy>;
|
package/astar/query.d.ts
CHANGED
|
@@ -2502,21 +2502,6 @@ export interface ChainStorage<Rv extends RpcVersion> extends GenericChainStorage
|
|
|
2502
2502
|
**/
|
|
2503
2503
|
historic: GenericStorageQuery<Rv, (arg: BytesLike) => [] | undefined, Bytes>;
|
|
2504
2504
|
|
|
2505
|
-
/**
|
|
2506
|
-
* Generic pallet storage query
|
|
2507
|
-
**/
|
|
2508
|
-
[storage: string]: GenericStorageQuery<Rv>;
|
|
2509
|
-
};
|
|
2510
|
-
/**
|
|
2511
|
-
* Pallet `DemocracyMBM`'s storage queries
|
|
2512
|
-
**/
|
|
2513
|
-
democracyMBM: {
|
|
2514
|
-
/**
|
|
2515
|
-
*
|
|
2516
|
-
* @param {Callback<number> =} callback
|
|
2517
|
-
**/
|
|
2518
|
-
migrationBlockNumber: GenericStorageQuery<Rv, () => number>;
|
|
2519
|
-
|
|
2520
2505
|
/**
|
|
2521
2506
|
* Generic pallet storage query
|
|
2522
2507
|
**/
|
package/basilisk/index.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ import { ChainJsonRpcApis } from './json-rpc.js';
|
|
|
7
7
|
import { ChainErrors } from './errors.js';
|
|
8
8
|
import { ChainEvents } from './events.js';
|
|
9
9
|
import { RuntimeApis } from './runtime.js';
|
|
10
|
+
import { ChainViewFunctions } from './view-functions.js';
|
|
10
11
|
import { ChainTx } from './tx.js';
|
|
11
12
|
|
|
12
13
|
export * from './types.js';
|
|
@@ -18,6 +19,7 @@ export interface VersionedBasiliskApi<Rv extends RpcVersion> extends GenericSubs
|
|
|
18
19
|
errors: ChainErrors<Rv>;
|
|
19
20
|
events: ChainEvents<Rv>;
|
|
20
21
|
call: RuntimeApis<Rv>;
|
|
22
|
+
view: ChainViewFunctions<Rv>;
|
|
21
23
|
tx: ChainTx<Rv>;
|
|
22
24
|
}
|
|
23
25
|
|
package/hydration/consts.d.ts
CHANGED
|
@@ -1343,6 +1343,35 @@ export interface ChainConsts<Rv extends RpcVersion> extends GenericChainConsts<R
|
|
|
1343
1343
|
**/
|
|
1344
1344
|
profitReceiver: AccountId32;
|
|
1345
1345
|
|
|
1346
|
+
/**
|
|
1347
|
+
* Asset ID of Hollar
|
|
1348
|
+
**/
|
|
1349
|
+
hollarId: number;
|
|
1350
|
+
|
|
1351
|
+
/**
|
|
1352
|
+
* Generic pallet constant
|
|
1353
|
+
**/
|
|
1354
|
+
[name: string]: any;
|
|
1355
|
+
};
|
|
1356
|
+
/**
|
|
1357
|
+
* Pallet `HSM`'s constants
|
|
1358
|
+
**/
|
|
1359
|
+
hsm: {
|
|
1360
|
+
/**
|
|
1361
|
+
* Asset ID of Hollar
|
|
1362
|
+
**/
|
|
1363
|
+
hollarId: number;
|
|
1364
|
+
|
|
1365
|
+
/**
|
|
1366
|
+
* Pallet ID to determine HSM account
|
|
1367
|
+
**/
|
|
1368
|
+
palletId: FrameSupportPalletId;
|
|
1369
|
+
|
|
1370
|
+
/**
|
|
1371
|
+
* The gas limit for the execution of EVM calls
|
|
1372
|
+
**/
|
|
1373
|
+
gasLimit: bigint;
|
|
1374
|
+
|
|
1346
1375
|
/**
|
|
1347
1376
|
* Generic pallet constant
|
|
1348
1377
|
**/
|
package/hydration/errors.d.ts
CHANGED
|
@@ -1700,11 +1700,6 @@ export interface ChainErrors<Rv extends RpcVersion> extends GenericChainErrors<R
|
|
|
1700
1700
|
**/
|
|
1701
1701
|
LiquidityMiningIsNotStopped: GenericPalletError<Rv>;
|
|
1702
1702
|
|
|
1703
|
-
/**
|
|
1704
|
-
* LP shares amount is not valid.
|
|
1705
|
-
**/
|
|
1706
|
-
InvalidDepositAmount: GenericPalletError<Rv>;
|
|
1707
|
-
|
|
1708
1703
|
/**
|
|
1709
1704
|
* Account is not allowed to perform action.
|
|
1710
1705
|
**/
|
|
@@ -2239,6 +2234,11 @@ export interface ChainErrors<Rv extends RpcVersion> extends GenericChainErrors<R
|
|
|
2239
2234
|
**/
|
|
2240
2235
|
IncorrectAssetDecimals: GenericPalletError<Rv>;
|
|
2241
2236
|
|
|
2237
|
+
/**
|
|
2238
|
+
* Pool does not have pegs configured.
|
|
2239
|
+
**/
|
|
2240
|
+
NoPegSource: GenericPalletError<Rv>;
|
|
2241
|
+
|
|
2242
2242
|
/**
|
|
2243
2243
|
* Generic pallet error
|
|
2244
2244
|
**/
|
|
@@ -2700,6 +2700,173 @@ export interface ChainErrors<Rv extends RpcVersion> extends GenericChainErrors<R
|
|
|
2700
2700
|
**/
|
|
2701
2701
|
NotProfitable: GenericPalletError<Rv>;
|
|
2702
2702
|
|
|
2703
|
+
/**
|
|
2704
|
+
* Flash minter contract address not set. It is required for Hollar liquidations.
|
|
2705
|
+
**/
|
|
2706
|
+
FlashMinterNotSet: GenericPalletError<Rv>;
|
|
2707
|
+
|
|
2708
|
+
/**
|
|
2709
|
+
* Invalid liquidation data provided
|
|
2710
|
+
**/
|
|
2711
|
+
InvalidLiquidationData: GenericPalletError<Rv>;
|
|
2712
|
+
|
|
2713
|
+
/**
|
|
2714
|
+
* Generic pallet error
|
|
2715
|
+
**/
|
|
2716
|
+
[error: string]: GenericPalletError<Rv>;
|
|
2717
|
+
};
|
|
2718
|
+
/**
|
|
2719
|
+
* Pallet `HSM`'s errors
|
|
2720
|
+
**/
|
|
2721
|
+
hsm: {
|
|
2722
|
+
/**
|
|
2723
|
+
* Asset is not approved as collateral
|
|
2724
|
+
*
|
|
2725
|
+
* The operation attempted to use an asset that is not registered as an approved collateral.
|
|
2726
|
+
**/
|
|
2727
|
+
AssetNotApproved: GenericPalletError<Rv>;
|
|
2728
|
+
|
|
2729
|
+
/**
|
|
2730
|
+
* Asset is already approved as collateral
|
|
2731
|
+
*
|
|
2732
|
+
* Attempted to add an asset that is already registered as a collateral.
|
|
2733
|
+
**/
|
|
2734
|
+
AssetAlreadyApproved: GenericPalletError<Rv>;
|
|
2735
|
+
|
|
2736
|
+
/**
|
|
2737
|
+
* Another asset from the same pool is already approved
|
|
2738
|
+
*
|
|
2739
|
+
* Only one asset from each StableSwap pool can be used as collateral.
|
|
2740
|
+
**/
|
|
2741
|
+
PoolAlreadyHasCollateral: GenericPalletError<Rv>;
|
|
2742
|
+
|
|
2743
|
+
/**
|
|
2744
|
+
* Invalid asset pair, must be Hollar and approved collateral
|
|
2745
|
+
*
|
|
2746
|
+
* The asset pair for buy/sell operations must include Hollar as one side and an approved collateral as the other.
|
|
2747
|
+
**/
|
|
2748
|
+
InvalidAssetPair: GenericPalletError<Rv>;
|
|
2749
|
+
|
|
2750
|
+
/**
|
|
2751
|
+
* Max buy price exceeded
|
|
2752
|
+
*
|
|
2753
|
+
* The calculated buy price exceeds the maximum allowed buy price for the collateral.
|
|
2754
|
+
**/
|
|
2755
|
+
MaxBuyPriceExceeded: GenericPalletError<Rv>;
|
|
2756
|
+
|
|
2757
|
+
/**
|
|
2758
|
+
* Max buy back amount in single block exceeded
|
|
2759
|
+
*
|
|
2760
|
+
* The amount of Hollar being sold to HSM exceeds the maximum allowed in a single block for this collateral.
|
|
2761
|
+
**/
|
|
2762
|
+
MaxBuyBackExceeded: GenericPalletError<Rv>;
|
|
2763
|
+
|
|
2764
|
+
/**
|
|
2765
|
+
* Max holding amount for collateral exceeded
|
|
2766
|
+
*
|
|
2767
|
+
* The operation would cause the HSM to hold more of the collateral than the configured maximum.
|
|
2768
|
+
**/
|
|
2769
|
+
MaxHoldingExceeded: GenericPalletError<Rv>;
|
|
2770
|
+
|
|
2771
|
+
/**
|
|
2772
|
+
* Slippage limit exceeded
|
|
2773
|
+
*
|
|
2774
|
+
* The calculated amount is worse than the provided slippage limit.
|
|
2775
|
+
**/
|
|
2776
|
+
SlippageLimitExceeded: GenericPalletError<Rv>;
|
|
2777
|
+
|
|
2778
|
+
/**
|
|
2779
|
+
* Invalid EVM contract interaction
|
|
2780
|
+
*
|
|
2781
|
+
* The call to the EVM contract (GHO Hollar token) failed.
|
|
2782
|
+
**/
|
|
2783
|
+
InvalidEVMInteraction: GenericPalletError<Rv>;
|
|
2784
|
+
|
|
2785
|
+
/**
|
|
2786
|
+
* Decimal retrieval failed
|
|
2787
|
+
*
|
|
2788
|
+
* Failed to retrieve the decimal information for an asset.
|
|
2789
|
+
**/
|
|
2790
|
+
DecimalRetrievalFailed: GenericPalletError<Rv>;
|
|
2791
|
+
|
|
2792
|
+
/**
|
|
2793
|
+
* No arbitrage opportunity
|
|
2794
|
+
*
|
|
2795
|
+
* There is no profitable arbitrage opportunity for the specified collateral.
|
|
2796
|
+
**/
|
|
2797
|
+
NoArbitrageOpportunity: GenericPalletError<Rv>;
|
|
2798
|
+
|
|
2799
|
+
/**
|
|
2800
|
+
* Offchain lock error
|
|
2801
|
+
*
|
|
2802
|
+
* Failed to acquire the lock for offchain workers, likely because another operation is in progress.
|
|
2803
|
+
**/
|
|
2804
|
+
OffchainLockError: GenericPalletError<Rv>;
|
|
2805
|
+
|
|
2806
|
+
/**
|
|
2807
|
+
* Asset not in the pool
|
|
2808
|
+
*
|
|
2809
|
+
* The specified asset was not found in the pool.
|
|
2810
|
+
**/
|
|
2811
|
+
AssetNotFound: GenericPalletError<Rv>;
|
|
2812
|
+
|
|
2813
|
+
/**
|
|
2814
|
+
* Provided pool state is invalid
|
|
2815
|
+
*
|
|
2816
|
+
* The retrieved pool state has inconsistent or invalid data.
|
|
2817
|
+
**/
|
|
2818
|
+
InvalidPoolState: GenericPalletError<Rv>;
|
|
2819
|
+
|
|
2820
|
+
/**
|
|
2821
|
+
* Collateral is not empty
|
|
2822
|
+
*
|
|
2823
|
+
* Cannot remove a collateral asset that still has a non-zero balance in the HSM account.
|
|
2824
|
+
**/
|
|
2825
|
+
CollateralNotEmpty: GenericPalletError<Rv>;
|
|
2826
|
+
|
|
2827
|
+
/**
|
|
2828
|
+
* Asset not in the pool
|
|
2829
|
+
*
|
|
2830
|
+
* The collateral asset is not present in the specified pool.
|
|
2831
|
+
**/
|
|
2832
|
+
AssetNotInPool: GenericPalletError<Rv>;
|
|
2833
|
+
|
|
2834
|
+
/**
|
|
2835
|
+
* Hollar is not in the pool
|
|
2836
|
+
*
|
|
2837
|
+
* The Hollar asset is not present in the specified pool.
|
|
2838
|
+
**/
|
|
2839
|
+
HollarNotInPool: GenericPalletError<Rv>;
|
|
2840
|
+
|
|
2841
|
+
/**
|
|
2842
|
+
* Insufficient collateral balance
|
|
2843
|
+
*
|
|
2844
|
+
* The HSM does not have enough of the collateral asset to complete the operation.
|
|
2845
|
+
**/
|
|
2846
|
+
InsufficientCollateralBalance: GenericPalletError<Rv>;
|
|
2847
|
+
|
|
2848
|
+
/**
|
|
2849
|
+
* GHO Contract address not found
|
|
2850
|
+
*
|
|
2851
|
+
* The EVM address for the GHO (Hollar) token contract was not found.
|
|
2852
|
+
**/
|
|
2853
|
+
HollarContractAddressNotFound: GenericPalletError<Rv>;
|
|
2854
|
+
|
|
2855
|
+
/**
|
|
2856
|
+
* HSM contains maximum number of allowed collateral assets.
|
|
2857
|
+
**/
|
|
2858
|
+
MaxNumberOfCollateralsReached: GenericPalletError<Rv>;
|
|
2859
|
+
|
|
2860
|
+
/**
|
|
2861
|
+
* Flash minter address not set
|
|
2862
|
+
**/
|
|
2863
|
+
FlashMinterNotSet: GenericPalletError<Rv>;
|
|
2864
|
+
|
|
2865
|
+
/**
|
|
2866
|
+
* Provided arbitrage data is invalid
|
|
2867
|
+
**/
|
|
2868
|
+
InvalidArbitrageData: GenericPalletError<Rv>;
|
|
2869
|
+
|
|
2703
2870
|
/**
|
|
2704
2871
|
* Generic pallet error
|
|
2705
2872
|
**/
|
|
@@ -3043,11 +3210,6 @@ export interface ChainErrors<Rv extends RpcVersion> extends GenericChainErrors<R
|
|
|
3043
3210
|
**/
|
|
3044
3211
|
LiquidityMiningIsNotStopped: GenericPalletError<Rv>;
|
|
3045
3212
|
|
|
3046
|
-
/**
|
|
3047
|
-
* LP shares amount is not valid.
|
|
3048
|
-
**/
|
|
3049
|
-
InvalidDepositAmount: GenericPalletError<Rv>;
|
|
3050
|
-
|
|
3051
3213
|
/**
|
|
3052
3214
|
* Account is not allowed to perform action.
|
|
3053
3215
|
**/
|
package/hydration/events.d.ts
CHANGED
|
@@ -13,6 +13,7 @@ import type {
|
|
|
13
13
|
Permill,
|
|
14
14
|
Perquintill,
|
|
15
15
|
H160,
|
|
16
|
+
Perbill,
|
|
16
17
|
} from 'dedot/codecs';
|
|
17
18
|
import type {
|
|
18
19
|
FrameSupportTokensMiscBalanceStatus,
|
|
@@ -37,6 +38,7 @@ import type {
|
|
|
37
38
|
PalletStableswapPoolPegInfo,
|
|
38
39
|
HydradxTraitsStableswapAssetAmount,
|
|
39
40
|
PalletStableswapTradability,
|
|
41
|
+
PalletStableswapPegSource,
|
|
40
42
|
PalletLbpPool,
|
|
41
43
|
PalletReferralsAssetAmount,
|
|
42
44
|
PalletReferralsLevel,
|
|
@@ -2614,6 +2616,26 @@ export interface ChainEvents<Rv extends RpcVersion> extends GenericChainEvents<R
|
|
|
2614
2616
|
**/
|
|
2615
2617
|
PoolDestroyed: GenericPalletEvent<Rv, 'Stableswap', 'PoolDestroyed', { poolId: number }>;
|
|
2616
2618
|
|
|
2619
|
+
/**
|
|
2620
|
+
* Pool peg source has been updated.
|
|
2621
|
+
**/
|
|
2622
|
+
PoolPegSourceUpdated: GenericPalletEvent<
|
|
2623
|
+
Rv,
|
|
2624
|
+
'Stableswap',
|
|
2625
|
+
'PoolPegSourceUpdated',
|
|
2626
|
+
{ poolId: number; assetId: number; pegSource: PalletStableswapPegSource }
|
|
2627
|
+
>;
|
|
2628
|
+
|
|
2629
|
+
/**
|
|
2630
|
+
* Pool max peg update has been updated.
|
|
2631
|
+
**/
|
|
2632
|
+
PoolMaxPegUpdateUpdated: GenericPalletEvent<
|
|
2633
|
+
Rv,
|
|
2634
|
+
'Stableswap',
|
|
2635
|
+
'PoolMaxPegUpdateUpdated',
|
|
2636
|
+
{ poolId: number; maxPegUpdate: Permill }
|
|
2637
|
+
>;
|
|
2638
|
+
|
|
2617
2639
|
/**
|
|
2618
2640
|
* Generic pallet event
|
|
2619
2641
|
**/
|
|
@@ -2918,6 +2940,89 @@ export interface ChainEvents<Rv extends RpcVersion> extends GenericChainEvents<R
|
|
|
2918
2940
|
**/
|
|
2919
2941
|
[prop: string]: GenericPalletEvent<Rv>;
|
|
2920
2942
|
};
|
|
2943
|
+
/**
|
|
2944
|
+
* Pallet `HSM`'s events
|
|
2945
|
+
**/
|
|
2946
|
+
hsm: {
|
|
2947
|
+
/**
|
|
2948
|
+
* A new collateral asset was added
|
|
2949
|
+
*
|
|
2950
|
+
* Parameters:
|
|
2951
|
+
* - `asset_id`: The ID of the asset added as collateral
|
|
2952
|
+
* - `pool_id`: The StableSwap pool ID where this asset belongs
|
|
2953
|
+
* - `purchase_fee`: Fee applied when buying Hollar with this asset
|
|
2954
|
+
* - `max_buy_price_coefficient`: Maximum buy price coefficient for HSM to buy back Hollar
|
|
2955
|
+
* - `buy_back_fee`: Fee applied when buying back Hollar
|
|
2956
|
+
* - `buyback_rate`: Parameter that controls how quickly HSM can buy Hollar with this asset
|
|
2957
|
+
**/
|
|
2958
|
+
CollateralAdded: GenericPalletEvent<
|
|
2959
|
+
Rv,
|
|
2960
|
+
'HSM',
|
|
2961
|
+
'CollateralAdded',
|
|
2962
|
+
{
|
|
2963
|
+
assetId: number;
|
|
2964
|
+
poolId: number;
|
|
2965
|
+
purchaseFee: Permill;
|
|
2966
|
+
maxBuyPriceCoefficient: FixedU128;
|
|
2967
|
+
buyBackFee: Permill;
|
|
2968
|
+
buybackRate: Perbill;
|
|
2969
|
+
}
|
|
2970
|
+
>;
|
|
2971
|
+
|
|
2972
|
+
/**
|
|
2973
|
+
* A collateral asset was removed
|
|
2974
|
+
*
|
|
2975
|
+
* Parameters:
|
|
2976
|
+
* - `asset_id`: The ID of the asset removed from collaterals
|
|
2977
|
+
* - `amount`: The amount of the asset that was returned (should be zero)
|
|
2978
|
+
**/
|
|
2979
|
+
CollateralRemoved: GenericPalletEvent<Rv, 'HSM', 'CollateralRemoved', { assetId: number; amount: bigint }>;
|
|
2980
|
+
|
|
2981
|
+
/**
|
|
2982
|
+
* A collateral asset was updated
|
|
2983
|
+
*
|
|
2984
|
+
* Parameters:
|
|
2985
|
+
* - `asset_id`: The ID of the updated collateral asset
|
|
2986
|
+
* - `purchase_fee`: New purchase fee if updated (None if not changed)
|
|
2987
|
+
* - `max_buy_price_coefficient`: New max buy price coefficient if updated (None if not changed)
|
|
2988
|
+
* - `buy_back_fee`: New buy back fee if updated (None if not changed)
|
|
2989
|
+
* - `buyback_rate`: New buyback rate if updated (None if not changed)
|
|
2990
|
+
**/
|
|
2991
|
+
CollateralUpdated: GenericPalletEvent<
|
|
2992
|
+
Rv,
|
|
2993
|
+
'HSM',
|
|
2994
|
+
'CollateralUpdated',
|
|
2995
|
+
{
|
|
2996
|
+
assetId: number;
|
|
2997
|
+
purchaseFee?: Permill | undefined;
|
|
2998
|
+
maxBuyPriceCoefficient?: FixedU128 | undefined;
|
|
2999
|
+
buyBackFee?: Permill | undefined;
|
|
3000
|
+
buybackRate?: Perbill | undefined;
|
|
3001
|
+
}
|
|
3002
|
+
>;
|
|
3003
|
+
|
|
3004
|
+
/**
|
|
3005
|
+
* Arbitrage executed successfully
|
|
3006
|
+
*
|
|
3007
|
+
* Parameters:
|
|
3008
|
+
* - `asset_id`: The collateral asset used in the arbitrage
|
|
3009
|
+
* - `hollar_amount`: Amount of Hollar that was included in the arbitrage operation
|
|
3010
|
+
**/
|
|
3011
|
+
ArbitrageExecuted: GenericPalletEvent<Rv, 'HSM', 'ArbitrageExecuted', { assetId: number; hollarAmount: bigint }>;
|
|
3012
|
+
|
|
3013
|
+
/**
|
|
3014
|
+
* Flash minter address set
|
|
3015
|
+
*
|
|
3016
|
+
* Parameters:
|
|
3017
|
+
* - `flash_minter`: The EVM address of the flash minter contract
|
|
3018
|
+
**/
|
|
3019
|
+
FlashMinterSet: GenericPalletEvent<Rv, 'HSM', 'FlashMinterSet', { flashMinter: H160 }>;
|
|
3020
|
+
|
|
3021
|
+
/**
|
|
3022
|
+
* Generic pallet event
|
|
3023
|
+
**/
|
|
3024
|
+
[prop: string]: GenericPalletEvent<Rv>;
|
|
3025
|
+
};
|
|
2921
3026
|
/**
|
|
2922
3027
|
* Pallet `Tokens`'s events
|
|
2923
3028
|
**/
|
package/hydration/index.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ import { ChainJsonRpcApis } from './json-rpc.js';
|
|
|
7
7
|
import { ChainErrors } from './errors.js';
|
|
8
8
|
import { ChainEvents } from './events.js';
|
|
9
9
|
import { RuntimeApis } from './runtime.js';
|
|
10
|
+
import { ChainViewFunctions } from './view-functions.js';
|
|
10
11
|
import { ChainTx } from './tx.js';
|
|
11
12
|
|
|
12
13
|
export * from './types.js';
|
|
@@ -18,12 +19,13 @@ export interface VersionedHydrationApi<Rv extends RpcVersion> extends GenericSub
|
|
|
18
19
|
errors: ChainErrors<Rv>;
|
|
19
20
|
events: ChainEvents<Rv>;
|
|
20
21
|
call: RuntimeApis<Rv>;
|
|
22
|
+
view: ChainViewFunctions<Rv>;
|
|
21
23
|
tx: ChainTx<Rv>;
|
|
22
24
|
}
|
|
23
25
|
|
|
24
26
|
/**
|
|
25
27
|
* @name: HydrationApi
|
|
26
|
-
* @specVersion:
|
|
28
|
+
* @specVersion: 324
|
|
27
29
|
**/
|
|
28
30
|
export interface HydrationApi {
|
|
29
31
|
legacy: VersionedHydrationApi<RpcLegacy>;
|
package/hydration/json-rpc.d.ts
CHANGED
package/hydration/query.d.ts
CHANGED
|
@@ -78,9 +78,11 @@ import type {
|
|
|
78
78
|
PalletStableswapPoolInfo,
|
|
79
79
|
PalletStableswapPoolPegInfo,
|
|
80
80
|
PalletStableswapTradability,
|
|
81
|
+
PalletStableswapPoolSnapshot,
|
|
81
82
|
PalletLbpPool,
|
|
82
83
|
PalletReferralsLevel,
|
|
83
84
|
PalletReferralsFeeDistribution,
|
|
85
|
+
PalletHsmCollateralInfo,
|
|
84
86
|
OrmlTokensBalanceLock,
|
|
85
87
|
OrmlTokensAccountData,
|
|
86
88
|
OrmlTokensReserveData,
|
|
@@ -1798,6 +1800,14 @@ export interface ChainStorage<Rv extends RpcVersion> extends GenericChainStorage
|
|
|
1798
1800
|
**/
|
|
1799
1801
|
assetTradability: GenericStorageQuery<Rv, (arg: [number, number]) => PalletStableswapTradability, [number, number]>;
|
|
1800
1802
|
|
|
1803
|
+
/**
|
|
1804
|
+
* Temporary pool state storage. Used to save a state of pool in a single block.
|
|
1805
|
+
*
|
|
1806
|
+
* @param {number} arg
|
|
1807
|
+
* @param {Callback<PalletStableswapPoolSnapshot | undefined> =} callback
|
|
1808
|
+
**/
|
|
1809
|
+
poolSnapshots: GenericStorageQuery<Rv, (arg: number) => PalletStableswapPoolSnapshot | undefined, number>;
|
|
1810
|
+
|
|
1801
1811
|
/**
|
|
1802
1812
|
* Generic pallet storage query
|
|
1803
1813
|
**/
|
|
@@ -2007,6 +2017,46 @@ export interface ChainStorage<Rv extends RpcVersion> extends GenericChainStorage
|
|
|
2007
2017
|
**/
|
|
2008
2018
|
[storage: string]: GenericStorageQuery<Rv>;
|
|
2009
2019
|
};
|
|
2020
|
+
/**
|
|
2021
|
+
* Pallet `HSM`'s storage queries
|
|
2022
|
+
**/
|
|
2023
|
+
hsm: {
|
|
2024
|
+
/**
|
|
2025
|
+
* List of approved assets that Hollar can be purchased with
|
|
2026
|
+
*
|
|
2027
|
+
* This storage maps asset IDs to their collateral configuration information.
|
|
2028
|
+
* Only assets in this map can be used to mint or redeem Hollar through HSM.
|
|
2029
|
+
* Each collateral has specific parameters controlling its usage in the HSM mechanism.
|
|
2030
|
+
*
|
|
2031
|
+
* @param {number} arg
|
|
2032
|
+
* @param {Callback<PalletHsmCollateralInfo | undefined> =} callback
|
|
2033
|
+
**/
|
|
2034
|
+
collaterals: GenericStorageQuery<Rv, (arg: number) => PalletHsmCollateralInfo | undefined, number>;
|
|
2035
|
+
|
|
2036
|
+
/**
|
|
2037
|
+
* Amount of Hollar bought with an asset in a single block
|
|
2038
|
+
*
|
|
2039
|
+
* This storage tracks how much Hollar has been bought back by HSM for each collateral
|
|
2040
|
+
* asset within the current block. This is used to enforce rate limiting on Hollar redemptions.
|
|
2041
|
+
* Values are reset to zero at the end of each block in on_finalize.
|
|
2042
|
+
*
|
|
2043
|
+
* @param {number} arg
|
|
2044
|
+
* @param {Callback<bigint> =} callback
|
|
2045
|
+
**/
|
|
2046
|
+
hollarAmountReceived: GenericStorageQuery<Rv, (arg: number) => bigint, number>;
|
|
2047
|
+
|
|
2048
|
+
/**
|
|
2049
|
+
* Address of the flash loan receiver.
|
|
2050
|
+
*
|
|
2051
|
+
* @param {Callback<H160 | undefined> =} callback
|
|
2052
|
+
**/
|
|
2053
|
+
flashMinter: GenericStorageQuery<Rv, () => H160 | undefined>;
|
|
2054
|
+
|
|
2055
|
+
/**
|
|
2056
|
+
* Generic pallet storage query
|
|
2057
|
+
**/
|
|
2058
|
+
[storage: string]: GenericStorageQuery<Rv>;
|
|
2059
|
+
};
|
|
2010
2060
|
/**
|
|
2011
2061
|
* Pallet `Tokens`'s storage queries
|
|
2012
2062
|
**/
|