@subwallet/extension-base 1.1.28-beta.1 → 1.1.30-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.
Files changed (292) hide show
  1. package/background/KoniTypes.d.ts +70 -93
  2. package/background/KoniTypes.js +14 -16
  3. package/background/errors/TransactionError.js +4 -9
  4. package/cjs/background/KoniTypes.js +17 -17
  5. package/cjs/background/errors/TransactionError.js +4 -9
  6. package/cjs/constants/index.js +3 -9
  7. package/cjs/koni/api/nft/config.js +23 -33
  8. package/cjs/koni/api/nft/index.js +0 -14
  9. package/cjs/koni/api/nft/nft.js +22 -1
  10. package/cjs/koni/api/staking/bonding/amplitude.js +15 -17
  11. package/cjs/koni/api/staking/bonding/astar.js +10 -11
  12. package/cjs/koni/api/staking/bonding/index.js +1 -4
  13. package/cjs/koni/api/staking/bonding/paraChain.js +23 -25
  14. package/cjs/koni/api/staking/bonding/relayChain.js +45 -48
  15. package/cjs/koni/api/staking/bonding/utils.js +86 -104
  16. package/cjs/koni/api/staking/index.js +5 -6
  17. package/cjs/koni/api/staking/paraChain.js +5 -6
  18. package/cjs/koni/api/staking/relayChain.js +2 -3
  19. package/cjs/koni/background/cron.js +0 -2
  20. package/cjs/koni/background/handlers/Extension.js +88 -326
  21. package/cjs/koni/background/handlers/State.js +3 -51
  22. package/cjs/koni/background/handlers/index.js +2 -4
  23. package/cjs/koni/background/subscription.js +18 -88
  24. package/cjs/packageInfo.js +1 -1
  25. package/cjs/services/campaign-service/index.js +6 -9
  26. package/cjs/services/chain-service/constants.js +16 -2
  27. package/cjs/services/chain-service/utils.js +1 -7
  28. package/cjs/services/event-service/index.js +0 -4
  29. package/cjs/services/keyring-service/index.js +2 -14
  30. package/cjs/services/migration-service/scripts/MigrateLedgerAccount.js +1 -1
  31. package/cjs/services/migration-service/scripts/MigrateTransactionHistory.js +1 -1
  32. package/cjs/services/migration-service/scripts/index.js +0 -4
  33. package/cjs/services/notification-service/NotificationService.js +1 -1
  34. package/cjs/services/storage-service/DatabaseService.js +0 -47
  35. package/cjs/services/storage-service/databases/index.js +0 -4
  36. package/cjs/services/storage-service/db-stores/NominatorMetadata.js +3 -3
  37. package/cjs/services/transaction-service/event-parser/index.js +0 -58
  38. package/cjs/services/transaction-service/helpers/index.js +1 -3
  39. package/cjs/services/transaction-service/index.js +74 -180
  40. package/cjs/services/transaction-service/utils.js +0 -1
  41. package/cjs/types/index.js +0 -44
  42. package/cjs/utils/fetchStaticData.js +1 -2
  43. package/cjs/utils/index.js +1 -89
  44. package/constants/index.d.ts +0 -2
  45. package/constants/index.js +0 -2
  46. package/koni/api/nft/config.js +23 -33
  47. package/koni/api/nft/index.js +1 -15
  48. package/koni/api/nft/nft.js +23 -2
  49. package/koni/api/staking/bonding/amplitude.js +9 -11
  50. package/koni/api/staking/bonding/astar.js +8 -9
  51. package/koni/api/staking/bonding/index.d.ts +1 -1
  52. package/koni/api/staking/bonding/index.js +1 -5
  53. package/koni/api/staking/bonding/paraChain.js +10 -12
  54. package/koni/api/staking/bonding/relayChain.d.ts +2 -2
  55. package/koni/api/staking/bonding/relayChain.js +30 -33
  56. package/koni/api/staking/bonding/utils.d.ts +38 -15
  57. package/koni/api/staking/bonding/utils.js +69 -85
  58. package/koni/api/staking/index.js +1 -2
  59. package/koni/api/staking/paraChain.js +6 -7
  60. package/koni/api/staking/relayChain.js +3 -4
  61. package/koni/background/cron.js +0 -2
  62. package/koni/background/handlers/Extension.d.ts +1 -14
  63. package/koni/background/handlers/Extension.js +50 -286
  64. package/koni/background/handlers/State.d.ts +2 -18
  65. package/koni/background/handlers/State.js +3 -50
  66. package/koni/background/handlers/index.js +2 -4
  67. package/koni/background/subscription.d.ts +1 -5
  68. package/koni/background/subscription.js +20 -90
  69. package/package.json +8 -311
  70. package/packageInfo.js +1 -1
  71. package/services/campaign-service/index.js +6 -9
  72. package/services/chain-service/constants.d.ts +11 -0
  73. package/services/chain-service/constants.js +14 -1
  74. package/services/chain-service/utils.d.ts +0 -1
  75. package/services/chain-service/utils.js +1 -5
  76. package/services/event-service/index.d.ts +0 -1
  77. package/services/event-service/index.js +0 -4
  78. package/services/event-service/types.d.ts +0 -8
  79. package/services/keyring-service/index.d.ts +1 -2
  80. package/services/keyring-service/index.js +2 -14
  81. package/services/migration-service/scripts/MigrateLedgerAccount.js +1 -1
  82. package/services/migration-service/scripts/MigrateTransactionHistory.js +1 -1
  83. package/services/migration-service/scripts/index.js +0 -4
  84. package/services/notification-service/NotificationService.js +1 -1
  85. package/services/storage-service/DatabaseService.d.ts +1 -17
  86. package/services/storage-service/DatabaseService.js +0 -47
  87. package/services/storage-service/databases/index.d.ts +1 -3
  88. package/services/storage-service/databases/index.js +0 -4
  89. package/services/storage-service/db-stores/NominatorMetadata.js +3 -3
  90. package/services/subscan-service/index.d.ts +2 -2
  91. package/services/transaction-service/event-parser/index.d.ts +1 -3
  92. package/services/transaction-service/event-parser/index.js +1 -57
  93. package/services/transaction-service/helpers/index.js +1 -3
  94. package/services/transaction-service/index.d.ts +15 -4
  95. package/services/transaction-service/index.js +72 -178
  96. package/services/transaction-service/types.d.ts +0 -2
  97. package/services/transaction-service/utils.js +0 -1
  98. package/types/index.d.ts +0 -5
  99. package/types/index.js +1 -5
  100. package/utils/fetchStaticData.js +1 -2
  101. package/utils/index.d.ts +0 -5
  102. package/utils/index.js +1 -53
  103. package/cjs/koni/api/dotsama/balance.js +0 -464
  104. package/cjs/koni/api/nft/ordinal_nft/constants.js +0 -21
  105. package/cjs/koni/api/nft/ordinal_nft/index.js +0 -121
  106. package/cjs/koni/api/nft/ordinal_nft/utils.js +0 -41
  107. package/cjs/koni/api/yield/helper/utils.js +0 -46
  108. package/cjs/services/earning-service/constants/chains.js +0 -29
  109. package/cjs/services/earning-service/constants/index.js +0 -27
  110. package/cjs/services/earning-service/constants/step.js +0 -18
  111. package/cjs/services/earning-service/handlers/base.js +0 -202
  112. package/cjs/services/earning-service/handlers/index.js +0 -60
  113. package/cjs/services/earning-service/handlers/lending/base.js +0 -20
  114. package/cjs/services/earning-service/handlers/lending/index.js +0 -13
  115. package/cjs/services/earning-service/handlers/lending/interlay.js +0 -168
  116. package/cjs/services/earning-service/handlers/liquid-staking/acala.js +0 -196
  117. package/cjs/services/earning-service/handlers/liquid-staking/base.js +0 -39
  118. package/cjs/services/earning-service/handlers/liquid-staking/bifrost.js +0 -257
  119. package/cjs/services/earning-service/handlers/liquid-staking/index.js +0 -34
  120. package/cjs/services/earning-service/handlers/liquid-staking/parallel.js +0 -180
  121. package/cjs/services/earning-service/handlers/liquid-staking/stella-swap.js +0 -373
  122. package/cjs/services/earning-service/handlers/native-staking/amplitude.js +0 -359
  123. package/cjs/services/earning-service/handlers/native-staking/astar.js +0 -426
  124. package/cjs/services/earning-service/handlers/native-staking/base-para.js +0 -137
  125. package/cjs/services/earning-service/handlers/native-staking/base.js +0 -109
  126. package/cjs/services/earning-service/handlers/native-staking/index.js +0 -34
  127. package/cjs/services/earning-service/handlers/native-staking/para-chain.js +0 -361
  128. package/cjs/services/earning-service/handlers/native-staking/relay-chain.js +0 -512
  129. package/cjs/services/earning-service/handlers/nomination-pool/index.js +0 -501
  130. package/cjs/services/earning-service/handlers/special.js +0 -387
  131. package/cjs/services/earning-service/service.js +0 -327
  132. package/cjs/services/earning-service/utils/index.js +0 -111
  133. package/cjs/services/migration-service/scripts/DeleteEarningData.js +0 -21
  134. package/cjs/services/migration-service/scripts/EnableEarningChains.js +0 -21
  135. package/cjs/services/migration-service/scripts/MigrateEthProvider.js +0 -17
  136. package/cjs/services/migration-service/scripts/MigratePioneerProvider.js +0 -17
  137. package/cjs/services/migration-service/scripts/MigrateProvider.js +0 -29
  138. package/cjs/services/mint-campaign-service/campaigns/UnlockDotCampaign.js +0 -149
  139. package/cjs/services/mint-campaign-service/campaigns/index.js +0 -13
  140. package/cjs/services/mint-campaign-service/constants.js +0 -11
  141. package/cjs/services/mint-campaign-service/index.js +0 -18
  142. package/cjs/services/storage-service/db-stores/YieldPoolStore.js +0 -36
  143. package/cjs/services/storage-service/db-stores/YieldPositionStore.js +0 -65
  144. package/cjs/services/storage-service/index.js +0 -241
  145. package/cjs/types/campaigns/index.js +0 -16
  146. package/cjs/types/campaigns/unlock-dot.js +0 -1
  147. package/cjs/types/ordinal.js +0 -1
  148. package/cjs/types/transaction.js +0 -1
  149. package/cjs/types/yield/actions/index.js +0 -27
  150. package/cjs/types/yield/actions/join/index.js +0 -38
  151. package/cjs/types/yield/actions/join/step.js +0 -37
  152. package/cjs/types/yield/actions/join/submit.js +0 -1
  153. package/cjs/types/yield/actions/join/validate.js +0 -16
  154. package/cjs/types/yield/actions/others.js +0 -1
  155. package/cjs/types/yield/index.js +0 -27
  156. package/cjs/types/yield/info/account/index.js +0 -49
  157. package/cjs/types/yield/info/account/info.js +0 -1
  158. package/cjs/types/yield/info/account/reward.js +0 -1
  159. package/cjs/types/yield/info/account/target.js +0 -32
  160. package/cjs/types/yield/info/account/unstake.js +0 -27
  161. package/cjs/types/yield/info/base.js +0 -34
  162. package/cjs/types/yield/info/chain/index.js +0 -27
  163. package/cjs/types/yield/info/chain/info.js +0 -1
  164. package/cjs/types/yield/info/chain/target.js +0 -1
  165. package/cjs/types/yield/info/index.js +0 -49
  166. package/cjs/types/yield/info/pallet.js +0 -15
  167. package/cjs/types.js +0 -1
  168. package/cjs/utils/address.js +0 -34
  169. package/cjs/utils/keyring.js +0 -57
  170. package/cjs/utils/object.js +0 -12
  171. package/koni/api/nft/ordinal_nft/constants.d.ts +0 -9
  172. package/koni/api/nft/ordinal_nft/constants.js +0 -12
  173. package/koni/api/nft/ordinal_nft/index.d.ts +0 -8
  174. package/koni/api/nft/ordinal_nft/index.js +0 -114
  175. package/koni/api/nft/ordinal_nft/utils.d.ts +0 -2
  176. package/koni/api/nft/ordinal_nft/utils.js +0 -33
  177. package/koni/api/yield/helper/utils.d.ts +0 -10
  178. package/koni/api/yield/helper/utils.js +0 -32
  179. package/services/earning-service/constants/abis/compound_finance_v2_abi.json +0 -1235
  180. package/services/earning-service/constants/abis/st_liquid_token_abi.json +0 -1355
  181. package/services/earning-service/constants/chains.d.ts +0 -14
  182. package/services/earning-service/constants/chains.js +0 -21
  183. package/services/earning-service/constants/index.d.ts +0 -2
  184. package/services/earning-service/constants/index.js +0 -5
  185. package/services/earning-service/constants/step.d.ts +0 -3
  186. package/services/earning-service/constants/step.js +0 -10
  187. package/services/earning-service/handlers/base.d.ts +0 -105
  188. package/services/earning-service/handlers/base.js +0 -195
  189. package/services/earning-service/handlers/index.d.ts +0 -5
  190. package/services/earning-service/handlers/index.js +0 -8
  191. package/services/earning-service/handlers/lending/base.d.ts +0 -6
  192. package/services/earning-service/handlers/lending/base.js +0 -12
  193. package/services/earning-service/handlers/lending/index.d.ts +0 -1
  194. package/services/earning-service/handlers/lending/index.js +0 -4
  195. package/services/earning-service/handlers/lending/interlay.d.ts +0 -22
  196. package/services/earning-service/handlers/lending/interlay.js +0 -160
  197. package/services/earning-service/handlers/liquid-staking/acala.d.ts +0 -27
  198. package/services/earning-service/handlers/liquid-staking/acala.js +0 -188
  199. package/services/earning-service/handlers/liquid-staking/base.d.ts +0 -8
  200. package/services/earning-service/handlers/liquid-staking/base.js +0 -31
  201. package/services/earning-service/handlers/liquid-staking/bifrost.d.ts +0 -44
  202. package/services/earning-service/handlers/liquid-staking/bifrost.js +0 -246
  203. package/services/earning-service/handlers/liquid-staking/index.d.ts +0 -4
  204. package/services/earning-service/handlers/liquid-staking/index.js +0 -7
  205. package/services/earning-service/handlers/liquid-staking/parallel.d.ts +0 -27
  206. package/services/earning-service/handlers/liquid-staking/parallel.js +0 -172
  207. package/services/earning-service/handlers/liquid-staking/stella-swap.d.ts +0 -36
  208. package/services/earning-service/handlers/liquid-staking/stella-swap.js +0 -363
  209. package/services/earning-service/handlers/native-staking/amplitude.d.ts +0 -22
  210. package/services/earning-service/handlers/native-staking/amplitude.js +0 -350
  211. package/services/earning-service/handlers/native-staking/astar.d.ts +0 -18
  212. package/services/earning-service/handlers/native-staking/astar.js +0 -416
  213. package/services/earning-service/handlers/native-staking/base-para.d.ts +0 -11
  214. package/services/earning-service/handlers/native-staking/base-para.js +0 -129
  215. package/services/earning-service/handlers/native-staking/base.d.ts +0 -19
  216. package/services/earning-service/handlers/native-staking/base.js +0 -101
  217. package/services/earning-service/handlers/native-staking/index.d.ts +0 -4
  218. package/services/earning-service/handlers/native-staking/index.js +0 -7
  219. package/services/earning-service/handlers/native-staking/para-chain.d.ts +0 -15
  220. package/services/earning-service/handlers/native-staking/para-chain.js +0 -353
  221. package/services/earning-service/handlers/native-staking/relay-chain.d.ts +0 -21
  222. package/services/earning-service/handlers/native-staking/relay-chain.js +0 -503
  223. package/services/earning-service/handlers/nomination-pool/index.d.ts +0 -33
  224. package/services/earning-service/handlers/nomination-pool/index.js +0 -492
  225. package/services/earning-service/handlers/special.d.ts +0 -56
  226. package/services/earning-service/handlers/special.js +0 -379
  227. package/services/earning-service/service.d.ts +0 -36
  228. package/services/earning-service/service.js +0 -320
  229. package/services/earning-service/utils/index.d.ts +0 -14
  230. package/services/earning-service/utils/index.js +0 -100
  231. package/services/migration-service/scripts/DeleteEarningData.d.ts +0 -4
  232. package/services/migration-service/scripts/DeleteEarningData.js +0 -13
  233. package/services/migration-service/scripts/EnableEarningChains.d.ts +0 -4
  234. package/services/migration-service/scripts/EnableEarningChains.js +0 -13
  235. package/services/mint-campaign-service/campaigns/UnlockDotCampaign.d.ts +0 -13
  236. package/services/mint-campaign-service/campaigns/UnlockDotCampaign.js +0 -139
  237. package/services/mint-campaign-service/campaigns/index.d.ts +0 -1
  238. package/services/mint-campaign-service/campaigns/index.js +0 -4
  239. package/services/mint-campaign-service/constants.d.ts +0 -1
  240. package/services/mint-campaign-service/constants.js +0 -4
  241. package/services/mint-campaign-service/index.d.ts +0 -7
  242. package/services/mint-campaign-service/index.js +0 -11
  243. package/services/storage-service/db-stores/YieldPoolStore.d.ts +0 -10
  244. package/services/storage-service/db-stores/YieldPoolStore.js +0 -28
  245. package/services/storage-service/db-stores/YieldPositionStore.d.ts +0 -9
  246. package/services/storage-service/db-stores/YieldPositionStore.js +0 -57
  247. package/types/campaigns/index.d.ts +0 -1
  248. package/types/campaigns/index.js +0 -4
  249. package/types/campaigns/unlock-dot.d.ts +0 -71
  250. package/types/campaigns/unlock-dot.js +0 -1
  251. package/types/ordinal.d.ts +0 -69
  252. package/types/ordinal.js +0 -1
  253. package/types/transaction.d.ts +0 -3
  254. package/types/transaction.js +0 -1
  255. package/types/yield/actions/index.d.ts +0 -2
  256. package/types/yield/actions/index.js +0 -5
  257. package/types/yield/actions/join/index.d.ts +0 -3
  258. package/types/yield/actions/join/index.js +0 -6
  259. package/types/yield/actions/join/step.d.ts +0 -75
  260. package/types/yield/actions/join/step.js +0 -34
  261. package/types/yield/actions/join/submit.d.ts +0 -53
  262. package/types/yield/actions/join/submit.js +0 -1
  263. package/types/yield/actions/join/validate.d.ts +0 -18
  264. package/types/yield/actions/join/validate.js +0 -10
  265. package/types/yield/actions/others.d.ts +0 -60
  266. package/types/yield/actions/others.js +0 -1
  267. package/types/yield/index.d.ts +0 -2
  268. package/types/yield/index.js +0 -5
  269. package/types/yield/info/account/index.d.ts +0 -4
  270. package/types/yield/info/account/index.js +0 -7
  271. package/types/yield/info/account/info.d.ts +0 -112
  272. package/types/yield/info/account/info.js +0 -1
  273. package/types/yield/info/account/reward.d.ts +0 -41
  274. package/types/yield/info/account/reward.js +0 -1
  275. package/types/yield/info/account/target.d.ts +0 -43
  276. package/types/yield/info/account/target.js +0 -27
  277. package/types/yield/info/account/unstake.d.ts +0 -31
  278. package/types/yield/info/account/unstake.js +0 -22
  279. package/types/yield/info/base.d.ts +0 -28
  280. package/types/yield/info/base.js +0 -28
  281. package/types/yield/info/chain/index.d.ts +0 -2
  282. package/types/yield/info/chain/index.js +0 -5
  283. package/types/yield/info/chain/info.d.ts +0 -190
  284. package/types/yield/info/chain/info.js +0 -1
  285. package/types/yield/info/chain/target.d.ts +0 -33
  286. package/types/yield/info/chain/target.js +0 -1
  287. package/types/yield/info/index.d.ts +0 -4
  288. package/types/yield/info/index.js +0 -7
  289. package/types/yield/info/pallet.d.ts +0 -143
  290. package/types/yield/info/pallet.js +0 -9
  291. package/utils/object.d.ts +0 -1
  292. package/utils/object.js +0 -6
@@ -4,10 +4,9 @@ import { AuthUrls, Resolver } from '@subwallet/extension-base/background/handler
4
4
  import { AccountAuthType, AccountJson, AddressJson, AuthorizeRequest, ConfirmationRequestBase, RequestAccountList, RequestAccountSubscribe, RequestAccountUnsubscribe, RequestAuthorizeCancel, RequestAuthorizeReject, RequestAuthorizeSubscribe, RequestAuthorizeTab, RequestCurrentAccountAddress, ResponseAuthorizeList, ResponseJsonGetAccountInfo, SeedLengths } from '@subwallet/extension-base/background/types';
5
5
  import { _CHAIN_VALIDATION_ERROR } from '@subwallet/extension-base/services/chain-service/handler/types';
6
6
  import { _ChainState, _EvmApi, _NetworkUpsertParams, _SubstrateApi, _ValidateCustomAssetRequest, _ValidateCustomAssetResponse, EnableChainParams, EnableMultiChainParams } from '@subwallet/extension-base/services/chain-service/types';
7
- import { CrowdloanContributionsResponse } from '@subwallet/extension-base/services/subscan-service/types';
8
7
  import { SWTransactionResponse, SWTransactionResult } from '@subwallet/extension-base/services/transaction-service/types';
9
8
  import { WalletConnectNotSupportRequest, WalletConnectSessionRequest } from '@subwallet/extension-base/services/wallet-connect-service/types';
10
- import { BalanceJson, BuyServiceInfo, BuyTokenInfo, EarningRewardJson, EarningStatus, HandleYieldStepParams, NominationPoolInfo, OptimalYieldPath, OptimalYieldPathParams, RequestGetYieldPoolTargets, RequestStakeCancelWithdrawal, RequestStakeClaimReward, RequestUnlockDotCheckCanMint, RequestUnlockDotSubscribeMintedData, RequestYieldLeave, RequestYieldStepSubmit, RequestYieldWithdrawal, SubmitYieldStepData, UnlockDotTransactionNft, UnstakingStatus, ValidateYieldProcessParams, YieldPoolInfo, YieldPoolTarget, YieldPositionInfo, YieldValidationStatus } from '@subwallet/extension-base/types';
9
+ import { BalanceJson, BuyServiceInfo, BuyTokenInfo } from '@subwallet/extension-base/types';
11
10
  import { InjectedAccount, InjectedAccountWithMeta, MetadataDefBase } from '@subwallet/extension-inject/types';
12
11
  import { KeyringPair$Json, KeyringPair$Meta } from '@subwallet/keyring/types';
13
12
  import { KeyringOptions } from '@subwallet/ui-keyring/options/types';
@@ -91,8 +90,7 @@ export interface RejectResolver {
91
90
  }
92
91
  export declare enum StakingType {
93
92
  NOMINATED = "nominated",
94
- POOLED = "pooled",
95
- LIQUID_STAKING = "liquid_staking"
93
+ POOLED = "pooled"
96
94
  }
97
95
  export interface StakingRewardItem {
98
96
  state: APIItemState;
@@ -365,21 +363,6 @@ export declare enum ExtrinsicType {
365
363
  STAKING_COMPOUNDING = "staking.compounding",
366
364
  STAKING_CANCEL_COMPOUNDING = "staking.cancel_compounding",
367
365
  STAKING_CANCEL_UNSTAKE = "staking.cancel_unstake",
368
- JOIN_YIELD_POOL = "earn.join_pool",
369
- MINT_VDOT = "earn.mint_vdot",
370
- MINT_LDOT = "earn.mint_ldot",
371
- MINT_SDOT = "earn.mint_sdot",
372
- MINT_QDOT = "earn.mint_qdot",
373
- MINT_STDOT = "earn.mint_stdot",
374
- REDEEM_QDOT = "earn.redeem_qdot",
375
- REDEEM_VDOT = "earn.redeem_vdot",
376
- REDEEM_LDOT = "earn.redeem_ldot",
377
- REDEEM_SDOT = "earn.redeem_sdot",
378
- REDEEM_STDOT = "earn.redeem_stdot",
379
- UNSTAKE_QDOT = "earn.unstake_qdot",
380
- UNSTAKE_VDOT = "earn.unstake_vdot",
381
- UNSTAKE_LDOT = "earn.unstake_ldot",
382
- UNSTAKE_SDOT = "earn.unstake_sdot",
383
366
  EVM_EXECUTE = "evm.execute",
384
367
  UNKNOWN = "unknown"
385
368
  }
@@ -388,34 +371,18 @@ export interface ExtrinsicDataTypeMap {
388
371
  [ExtrinsicType.TRANSFER_TOKEN]: RequestTransfer;
389
372
  [ExtrinsicType.TRANSFER_XCM]: RequestCrossChainTransfer;
390
373
  [ExtrinsicType.SEND_NFT]: NftTransactionRequest;
374
+ [ExtrinsicType.CROWDLOAN]: any;
391
375
  [ExtrinsicType.STAKING_JOIN_POOL]: RequestStakePoolingBonding;
392
- [ExtrinsicType.STAKING_LEAVE_POOL]: RequestYieldLeave;
376
+ [ExtrinsicType.STAKING_LEAVE_POOL]: RequestStakePoolingUnbonding;
393
377
  [ExtrinsicType.STAKING_BOND]: RequestStakePoolingBonding;
394
378
  [ExtrinsicType.STAKING_UNBOND]: RequestUnbondingSubmit;
395
379
  [ExtrinsicType.STAKING_CLAIM_REWARD]: RequestStakeClaimReward;
396
- [ExtrinsicType.STAKING_WITHDRAW]: RequestYieldWithdrawal;
380
+ [ExtrinsicType.STAKING_WITHDRAW]: RequestStakeWithdrawal;
397
381
  [ExtrinsicType.STAKING_COMPOUNDING]: RequestTuringStakeCompound;
398
382
  [ExtrinsicType.STAKING_CANCEL_COMPOUNDING]: RequestTuringCancelStakeCompound;
399
383
  [ExtrinsicType.STAKING_CANCEL_UNSTAKE]: RequestStakeCancelWithdrawal;
400
384
  [ExtrinsicType.STAKING_POOL_WITHDRAW]: any;
401
- [ExtrinsicType.JOIN_YIELD_POOL]: RequestYieldStepSubmit;
402
- [ExtrinsicType.MINT_VDOT]: RequestYieldStepSubmit;
403
- [ExtrinsicType.MINT_LDOT]: RequestYieldStepSubmit;
404
- [ExtrinsicType.MINT_SDOT]: RequestYieldStepSubmit;
405
- [ExtrinsicType.MINT_QDOT]: RequestYieldStepSubmit;
406
- [ExtrinsicType.MINT_STDOT]: RequestYieldStepSubmit;
407
- [ExtrinsicType.MINT_STDOT]: RequestYieldStepSubmit;
408
- [ExtrinsicType.REDEEM_VDOT]: RequestYieldFastWithdrawal;
409
- [ExtrinsicType.REDEEM_QDOT]: RequestYieldFastWithdrawal;
410
- [ExtrinsicType.REDEEM_LDOT]: RequestYieldFastWithdrawal;
411
- [ExtrinsicType.REDEEM_SDOT]: RequestYieldFastWithdrawal;
412
- [ExtrinsicType.REDEEM_STDOT]: RequestYieldFastWithdrawal;
413
- [ExtrinsicType.UNSTAKE_QDOT]: RequestYieldFastWithdrawal;
414
- [ExtrinsicType.UNSTAKE_VDOT]: RequestYieldFastWithdrawal;
415
- [ExtrinsicType.UNSTAKE_LDOT]: RequestYieldFastWithdrawal;
416
- [ExtrinsicType.UNSTAKE_SDOT]: RequestYieldFastWithdrawal;
417
385
  [ExtrinsicType.EVM_EXECUTE]: TransactionConfig;
418
- [ExtrinsicType.CROWDLOAN]: any;
419
386
  [ExtrinsicType.UNKNOWN]: any;
420
387
  }
421
388
  export declare enum ExtrinsicStatus {
@@ -450,9 +417,6 @@ export interface BasicTokenInfo {
450
417
  export interface AmountData extends BasicTokenInfo {
451
418
  value: string;
452
419
  }
453
- export interface AmountDataWithId extends AmountData {
454
- id: string;
455
- }
456
420
  export interface XCMTransactionAdditionalInfo {
457
421
  destinationChain: string;
458
422
  originalChain: string;
@@ -461,16 +425,7 @@ export interface XCMTransactionAdditionalInfo {
461
425
  export interface NFTTransactionAdditionalInfo {
462
426
  collectionName: string;
463
427
  }
464
- export declare type TransactionAdditionalInfo = {
465
- [ExtrinsicType.TRANSFER_XCM]: XCMTransactionAdditionalInfo;
466
- [ExtrinsicType.SEND_NFT]: NFTTransactionAdditionalInfo;
467
- [ExtrinsicType.MINT_VDOT]: Pick<SubmitYieldStepData, 'derivativeTokenSlug' | 'exchangeRate' | 'slug'>;
468
- [ExtrinsicType.MINT_QDOT]: Pick<SubmitYieldStepData, 'derivativeTokenSlug' | 'exchangeRate' | 'slug'>;
469
- [ExtrinsicType.MINT_SDOT]: Pick<SubmitYieldStepData, 'derivativeTokenSlug' | 'exchangeRate' | 'slug'>;
470
- [ExtrinsicType.MINT_LDOT]: Pick<SubmitYieldStepData, 'derivativeTokenSlug' | 'exchangeRate' | 'slug'>;
471
- [ExtrinsicType.MINT_STDOT]: Pick<SubmitYieldStepData, 'derivativeTokenSlug' | 'exchangeRate' | 'slug'>;
472
- [ExtrinsicType.STAKING_UNBOND]: Pick<SubmitYieldStepData, 'inputTokenSlug' | 'exchangeRate'>;
473
- };
428
+ export declare type TransactionAdditionalInfo<T extends ExtrinsicType> = T extends ExtrinsicType.TRANSFER_XCM ? XCMTransactionAdditionalInfo : T extends ExtrinsicType.SEND_NFT ? NFTTransactionAdditionalInfo : undefined;
474
429
  export interface TransactionHistoryItem<ET extends ExtrinsicType = ExtrinsicType.TRANSFER_BALANCE> {
475
430
  origin?: 'app' | 'migration' | 'subsquid' | 'subscan';
476
431
  callhash?: string;
@@ -496,7 +451,7 @@ export interface TransactionHistoryItem<ET extends ExtrinsicType = ExtrinsicType
496
451
  tip?: AmountData;
497
452
  fee?: AmountData;
498
453
  explorerUrl?: string;
499
- additionalInfo?: any;
454
+ additionalInfo?: TransactionAdditionalInfo<ET>;
500
455
  startBlock?: number;
501
456
  nonce?: number;
502
457
  }
@@ -531,7 +486,8 @@ export declare enum StakingTxErrorType {
531
486
  EXIST_UNSTAKING_REQUEST = "EXIST_UNSTAKING_REQUEST",
532
487
  INVALID_ACTIVE_STAKE = "INVALID_ACTIVE_STAKE",
533
488
  EXCEED_MAX_UNSTAKING = "EXCEED_MAX_UNSTAKING",
534
- INACTIVE_NOMINATION_POOL = "INACTIVE_NOMINATION_POOL"
489
+ INACTIVE_NOMINATION_POOL = "INACTIVE_NOMINATION_POOL",
490
+ CAN_NOT_GET_METADATA = "CAN_NOT_GET_METADATA"
535
491
  }
536
492
  export declare enum TransferTxErrorType {
537
493
  NOT_ENOUGH_VALUE = "NOT_ENOUGH_VALUE",
@@ -540,7 +496,7 @@ export declare enum TransferTxErrorType {
540
496
  TRANSFER_ERROR = "TRANSFER_ERROR",
541
497
  RECEIVER_NOT_ENOUGH_EXISTENTIAL_DEPOSIT = "RECEIVER_NOT_ENOUGH_EXISTENTIAL_DEPOSIT"
542
498
  }
543
- export declare type TransactionErrorType = BasicTxErrorType | TransferTxErrorType | StakingTxErrorType | YieldValidationStatus;
499
+ export declare type TransactionErrorType = BasicTxErrorType | TransferTxErrorType | StakingTxErrorType;
544
500
  export declare enum BasicTxWarningCode {
545
501
  NOT_ENOUGH_EXISTENTIAL_DEPOSIT = "notEnoughExistentialDeposit"
546
502
  }
@@ -775,11 +731,6 @@ export declare type RequestBalance = null;
775
731
  export declare type RequestSubscribeBalance = null;
776
732
  export declare type RequestSubscribeBalancesVisibility = null;
777
733
  export declare type RequestCrowdloan = null;
778
- export declare type RequestCrowdloanContributions = {
779
- relayChain: string;
780
- address: string;
781
- page?: number;
782
- };
783
734
  export declare type RequestSubscribeCrowdloan = null;
784
735
  export declare type RequestSubscribeNft = null;
785
736
  export declare type RequestSubscribeStaking = null;
@@ -1167,7 +1118,6 @@ export interface RequestCheckCrossChainTransfer extends BaseRequestSign {
1167
1118
  transferAll?: boolean;
1168
1119
  value: string;
1169
1120
  tokenSlug: string;
1170
- showExtraWarning?: boolean;
1171
1121
  }
1172
1122
  export declare type RequestCrossChainTransfer = InternalRequestSign<RequestCheckCrossChainTransfer>;
1173
1123
  export interface ChainStakingMetadata {
@@ -1191,7 +1141,29 @@ export interface NominationInfo {
1191
1141
  activeStake: string;
1192
1142
  hasUnstaking?: boolean;
1193
1143
  validatorMinStake?: string;
1194
- status: EarningStatus;
1144
+ status: StakingStatus;
1145
+ }
1146
+ export interface PalletNominationPoolsBondedPoolInner {
1147
+ points: number;
1148
+ state: 'Open' | 'Destroying' | 'Locked';
1149
+ memberCounter: number;
1150
+ roles: {
1151
+ depositor: string;
1152
+ root: string;
1153
+ nominator: string;
1154
+ bouncer: string;
1155
+ };
1156
+ }
1157
+ export interface NominationPoolInfo extends Pick<PalletNominationPoolsBondedPoolInner, 'roles' | 'memberCounter' | 'state'> {
1158
+ id: number;
1159
+ address: string;
1160
+ name?: string;
1161
+ bondedAmount: string;
1162
+ isProfitable: boolean;
1163
+ }
1164
+ export declare enum UnstakingStatus {
1165
+ CLAIMABLE = "CLAIMABLE",
1166
+ UNLOCKING = "UNLOCKING"
1195
1167
  }
1196
1168
  export interface UnstakingInfo {
1197
1169
  chain: string;
@@ -1200,10 +1172,17 @@ export interface UnstakingInfo {
1200
1172
  waitingTime: number;
1201
1173
  validatorAddress?: string;
1202
1174
  }
1175
+ export declare enum StakingStatus {
1176
+ EARNING_REWARD = "EARNING_REWARD",
1177
+ PARTIALLY_EARNING = "PARTIALLY_EARNING",
1178
+ NOT_EARNING = "NOT_EARNING",
1179
+ WAITING = "WAITING",
1180
+ NOT_STAKING = "NOT_STAKING"
1181
+ }
1203
1182
  export interface NominatorMetadata {
1204
1183
  chain: string;
1205
1184
  type: StakingType;
1206
- status: EarningStatus;
1185
+ status: StakingStatus;
1207
1186
  address: string;
1208
1187
  activeStake: string;
1209
1188
  nominations: NominationInfo[];
@@ -1241,13 +1220,29 @@ export interface UnbondingSubmitParams extends BaseRequestSign {
1241
1220
  chain: string;
1242
1221
  nominatorMetadata: NominatorMetadata;
1243
1222
  validatorAddress?: string;
1244
- isLiquidStaking?: boolean;
1245
- derivativeTokenInfo?: _ChainAsset;
1246
- exchangeRate?: number;
1247
- inputTokenInfo?: _ChainAsset;
1248
- isFastUnbond: boolean;
1249
1223
  }
1250
1224
  export declare type RequestUnbondingSubmit = InternalRequestSign<UnbondingSubmitParams>;
1225
+ export interface StakeWithdrawalParams extends BaseRequestSign {
1226
+ nominatorMetadata: NominatorMetadata;
1227
+ unstakingInfo: UnstakingInfo;
1228
+ chain: string;
1229
+ validatorAddress?: string;
1230
+ }
1231
+ export declare type RequestStakeWithdrawal = InternalRequestSign<StakeWithdrawalParams>;
1232
+ export interface StakeClaimRewardParams extends BaseRequestSign {
1233
+ address: string;
1234
+ chain: string;
1235
+ stakingType: StakingType;
1236
+ unclaimedReward?: string;
1237
+ bondReward?: boolean;
1238
+ }
1239
+ export declare type RequestStakeClaimReward = InternalRequestSign<StakeClaimRewardParams>;
1240
+ export interface StakeCancelWithdrawalParams extends BaseRequestSign {
1241
+ address: string;
1242
+ chain: string;
1243
+ selectedUnstaking: UnstakingInfo;
1244
+ }
1245
+ export declare type RequestStakeCancelWithdrawal = InternalRequestSign<StakeCancelWithdrawalParams>;
1251
1246
  export interface StakePoolingBondingParams extends BaseRequestSign {
1252
1247
  nominatorMetadata?: NominatorMetadata;
1253
1248
  chain: string;
@@ -1310,6 +1305,12 @@ export declare type RequestTransferExternal = InternalRequestSign<RequestCheckTr
1310
1305
  export declare type RequestCrossChainTransferExternal = InternalRequestSign<RequestCheckCrossChainTransfer>;
1311
1306
  export declare type RequestNftTransferExternalSubstrate = InternalRequestSign<SubstrateNftSubmitTransaction>;
1312
1307
  export declare type RequestNftTransferExternalEvm = InternalRequestSign<EvmNftSubmitTransaction>;
1308
+ export declare type RequestStakeExternal = InternalRequestSign<BondingSubmitParams>;
1309
+ export declare type RequestUnStakeExternal = InternalRequestSign<UnbondingSubmitParams>;
1310
+ export declare type RequestWithdrawStakeExternal = InternalRequestSign<StakeWithdrawalParams>;
1311
+ export declare type RequestClaimRewardExternal = InternalRequestSign<StakeClaimRewardParams>;
1312
+ export declare type RequestCreateCompoundStakeExternal = InternalRequestSign<TuringStakeCompoundParams>;
1313
+ export declare type RequestCancelCompoundStakeExternal = InternalRequestSign<TuringCancelStakeCompoundParams>;
1313
1314
  export declare enum ChainEditStandard {
1314
1315
  EVM = "EVM",
1315
1316
  SUBSTRATE = "SUBSTRATE",
@@ -1535,12 +1536,6 @@ export interface ResolveAddressToDomainRequest {
1535
1536
  chain: string;
1536
1537
  address: string;
1537
1538
  }
1538
- export interface RequestYieldFastWithdrawal extends BaseRequestSign {
1539
- address: string;
1540
- yieldPoolInfo: YieldPoolInfo;
1541
- yieldPositionInfo: YieldPositionInfo;
1542
- amount: string;
1543
- }
1544
1539
  export declare type CampaignAction = 'open_view' | 'open_url' | null;
1545
1540
  export interface CampaignButton {
1546
1541
  id: number;
@@ -1604,6 +1599,7 @@ export interface KoniRequestSignatures {
1604
1599
  'pri(staking.submitTuringCompound)': [RequestTuringStakeCompound, SWTransactionResponse];
1605
1600
  'pri(staking.submitClaimReward)': [RequestStakeClaimReward, SWTransactionResponse];
1606
1601
  'pri(staking.submitCancelWithdrawal)': [RequestStakeCancelWithdrawal, SWTransactionResponse];
1602
+ 'pri(unbonding.submitWithdrawal)': [RequestStakeWithdrawal, SWTransactionResponse];
1607
1603
  'pri(unbonding.submitTransaction)': [RequestUnbondingSubmit, SWTransactionResponse];
1608
1604
  'pri(bonding.submitBondingTransaction)': [RequestBondingSubmit, SWTransactionResponse];
1609
1605
  'pri(bonding.subscribeChainStakingMetadata)': [null, ChainStakingMetadata[], ChainStakingMetadata[]];
@@ -1651,7 +1647,6 @@ export interface KoniRequestSignatures {
1651
1647
  'pri(balance.getBalance)': [RequestBalance, BalanceJson];
1652
1648
  'pri(balance.getSubscription)': [RequestSubscribeBalance, BalanceJson, BalanceJson];
1653
1649
  'pri(crowdloan.getCrowdloan)': [RequestCrowdloan, CrowdloanJson];
1654
- 'pri(crowdloan.getCrowdloanContributions)': [RequestCrowdloanContributions, CrowdloanContributionsResponse];
1655
1650
  'pri(crowdloan.getSubscription)': [RequestSubscribeCrowdloan, CrowdloanJson, CrowdloanJson];
1656
1651
  'pri(phishing.pass)': [RequestPassPhishingPage, boolean];
1657
1652
  'pri(mantaPay.enable)': [MantaPayEnableParams, MantaPayEnableResponse];
@@ -1711,22 +1706,6 @@ export interface KoniRequestSignatures {
1711
1706
  'pri(settings.saveLanguage)': [RequestChangeLanguage, boolean];
1712
1707
  'pri(settings.saveShowZeroBalance)': [RequestChangeShowZeroBalance, boolean];
1713
1708
  'pri(settings.saveShowBalance)': [RequestChangeShowBalance, boolean];
1714
- 'pri(yield.subscribePoolInfo)': [null, YieldPoolInfo[], YieldPoolInfo[]];
1715
- 'pri(yield.subscribeYieldPosition)': [null, YieldPositionInfo[], YieldPositionInfo[]];
1716
- 'pri(yield.subscribeYieldReward)': [null, EarningRewardJson, EarningRewardJson];
1717
- 'pri(yield.getTargets)': [RequestGetYieldPoolTargets, YieldPoolTarget[]];
1718
- 'pri(yield.getNativeStakingValidators)': [YieldPoolInfo, ValidatorInfo[]];
1719
- 'pri(yield.getStakingNominationPools)': [YieldPoolInfo, NominationPoolInfo[]];
1720
- 'pri(yield.join.getOptimalPath)': [OptimalYieldPathParams, OptimalYieldPath];
1721
- 'pri(yield.join.handleStep)': [HandleYieldStepParams, SWTransactionResponse];
1722
- 'pri(yield.join.validateProcess)': [ValidateYieldProcessParams, TransactionError[]];
1723
- 'pri(yield.leave.submit)': [RequestYieldLeave, SWTransactionResponse];
1724
- 'pri(yield.submitRedeem)': [RequestYieldFastWithdrawal, SWTransactionResponse];
1725
- 'pri(yield.staking.submitUnstaking)': [RequestUnbondingSubmit, SWTransactionResponse];
1726
- 'pri(yield.nominationPool.submitUnstaking)': [RequestStakePoolingUnbonding, SWTransactionResponse];
1727
- 'pri(yield.withdraw.submit)': [RequestYieldWithdrawal, SWTransactionResponse];
1728
- 'pri(yield.cancelWithdrawal.submit)': [RequestStakeCancelWithdrawal, SWTransactionResponse];
1729
- 'pri(yield.claimReward.submit)': [RequestStakeClaimReward, SWTransactionResponse];
1730
1709
  'pri(transaction.history.getSubscription)': [null, TransactionHistoryItem[], TransactionHistoryItem[]];
1731
1710
  'pri(transaction.history.subscribe)': [RequestSubscribeHistory, ResponseSubscribeHistory, TransactionHistoryItem[]];
1732
1711
  'pri(transfer.checkReferenceCount)': [RequestTransferCheckReferenceCount, boolean];
@@ -1735,7 +1714,7 @@ export interface KoniRequestSignatures {
1735
1714
  'pri(transfer.getMaxTransferable)': [RequestMaxTransferable, AmountData];
1736
1715
  'pri(subscription.cancel)': [string, boolean];
1737
1716
  'pri(freeBalance.get)': [RequestFreeBalance, AmountData];
1738
- 'pri(freeBalance.subscribe)': [RequestFreeBalance, AmountDataWithId, AmountDataWithId];
1717
+ 'pri(freeBalance.subscribe)': [RequestFreeBalance, AmountData, AmountData];
1739
1718
  'pri(accounts.checkTransfer)': [RequestCheckTransfer, ValidateTransactionResponse];
1740
1719
  'pri(accounts.transfer)': [RequestTransfer, SWTransactionResponse];
1741
1720
  'pri(accounts.checkCrossChainTransfer)': [RequestCheckCrossChainTransfer, ValidateTransactionResponse];
@@ -1800,8 +1779,6 @@ export interface KoniRequestSignatures {
1800
1779
  'pri(walletConnect.notSupport.approve)': [RequestApproveWalletConnectNotSupport, boolean];
1801
1780
  'pri(walletConnect.notSupport.reject)': [RequestRejectWalletConnectNotSupport, boolean];
1802
1781
  'pri(metadata.find)': [RequestFindRawMetadata, ResponseFindRawMetadata];
1803
- 'pri(campaign.unlockDot.canMint)': [RequestUnlockDotCheckCanMint, boolean];
1804
- 'pri(campaign.unlockDot.subscribe)': [RequestUnlockDotSubscribeMintedData, UnlockDotTransactionNft, UnlockDotTransactionNft];
1805
1782
  'pri(campaign.banner.subscribe)': [null, CampaignBanner[], CampaignBanner[]];
1806
1783
  'pri(campaign.banner.complete)': [RequestCampaignBannerComplete, boolean];
1807
1784
  'pri(buyService.tokens.subscribe)': [null, Record<string, BuyTokenInfo>, Record<string, BuyTokenInfo>];
@@ -17,7 +17,6 @@ export let StakingType;
17
17
  (function (StakingType) {
18
18
  StakingType["NOMINATED"] = "nominated";
19
19
  StakingType["POOLED"] = "pooled";
20
- StakingType["LIQUID_STAKING"] = "liquid_staking";
21
20
  })(StakingType || (StakingType = {}));
22
21
  export let APIItemState;
23
22
  (function (APIItemState) {
@@ -75,21 +74,6 @@ export let ExtrinsicType;
75
74
  ExtrinsicType["STAKING_COMPOUNDING"] = "staking.compounding";
76
75
  ExtrinsicType["STAKING_CANCEL_COMPOUNDING"] = "staking.cancel_compounding";
77
76
  ExtrinsicType["STAKING_CANCEL_UNSTAKE"] = "staking.cancel_unstake";
78
- ExtrinsicType["JOIN_YIELD_POOL"] = "earn.join_pool";
79
- ExtrinsicType["MINT_VDOT"] = "earn.mint_vdot";
80
- ExtrinsicType["MINT_LDOT"] = "earn.mint_ldot";
81
- ExtrinsicType["MINT_SDOT"] = "earn.mint_sdot";
82
- ExtrinsicType["MINT_QDOT"] = "earn.mint_qdot";
83
- ExtrinsicType["MINT_STDOT"] = "earn.mint_stdot";
84
- ExtrinsicType["REDEEM_QDOT"] = "earn.redeem_qdot";
85
- ExtrinsicType["REDEEM_VDOT"] = "earn.redeem_vdot";
86
- ExtrinsicType["REDEEM_LDOT"] = "earn.redeem_ldot";
87
- ExtrinsicType["REDEEM_SDOT"] = "earn.redeem_sdot";
88
- ExtrinsicType["REDEEM_STDOT"] = "earn.redeem_stdot";
89
- ExtrinsicType["UNSTAKE_QDOT"] = "earn.unstake_qdot";
90
- ExtrinsicType["UNSTAKE_VDOT"] = "earn.unstake_vdot";
91
- ExtrinsicType["UNSTAKE_LDOT"] = "earn.unstake_ldot";
92
- ExtrinsicType["UNSTAKE_SDOT"] = "earn.unstake_sdot";
93
77
  ExtrinsicType["EVM_EXECUTE"] = "evm.execute";
94
78
  ExtrinsicType["UNKNOWN"] = "unknown";
95
79
  })(ExtrinsicType || (ExtrinsicType = {}));
@@ -126,6 +110,7 @@ export let StakingTxErrorType;
126
110
  StakingTxErrorType["INVALID_ACTIVE_STAKE"] = "INVALID_ACTIVE_STAKE";
127
111
  StakingTxErrorType["EXCEED_MAX_UNSTAKING"] = "EXCEED_MAX_UNSTAKING";
128
112
  StakingTxErrorType["INACTIVE_NOMINATION_POOL"] = "INACTIVE_NOMINATION_POOL";
113
+ StakingTxErrorType["CAN_NOT_GET_METADATA"] = "CAN_NOT_GET_METADATA";
129
114
  })(StakingTxErrorType || (StakingTxErrorType = {}));
130
115
  export let TransferTxErrorType;
131
116
  (function (TransferTxErrorType) {
@@ -215,6 +200,19 @@ export let EvmProviderErrorType;
215
200
  EvmProviderErrorType["INVALID_PARAMS"] = "INVALID_PARAMS";
216
201
  EvmProviderErrorType["INTERNAL_ERROR"] = "INTERNAL_ERROR";
217
202
  })(EvmProviderErrorType || (EvmProviderErrorType = {}));
203
+ export let UnstakingStatus;
204
+ (function (UnstakingStatus) {
205
+ UnstakingStatus["CLAIMABLE"] = "CLAIMABLE";
206
+ UnstakingStatus["UNLOCKING"] = "UNLOCKING";
207
+ })(UnstakingStatus || (UnstakingStatus = {}));
208
+ export let StakingStatus;
209
+ (function (StakingStatus) {
210
+ StakingStatus["EARNING_REWARD"] = "EARNING_REWARD";
211
+ StakingStatus["PARTIALLY_EARNING"] = "PARTIALLY_EARNING";
212
+ StakingStatus["NOT_EARNING"] = "NOT_EARNING";
213
+ StakingStatus["WAITING"] = "WAITING";
214
+ StakingStatus["NOT_STAKING"] = "NOT_STAKING";
215
+ })(StakingStatus || (StakingStatus = {}));
218
216
  export let ChainEditStandard;
219
217
 
220
218
  // ChainService
@@ -3,7 +3,6 @@
3
3
 
4
4
  import { SWError } from '@subwallet/extension-base/background/errors/SWError';
5
5
  import { BasicTxErrorType, StakingTxErrorType, TransferTxErrorType } from '@subwallet/extension-base/background/KoniTypes';
6
- import { YieldValidationStatus } from '@subwallet/extension-base/types';
7
6
  import { detectTranslate } from '@subwallet/extension-base/utils';
8
7
  import { t } from 'i18next';
9
8
 
@@ -84,16 +83,12 @@ const defaultErrorMap = {
84
83
  message: detectTranslate('Invalid. Inactive nomination pool'),
85
84
  code: undefined
86
85
  },
87
- [TransferTxErrorType.RECEIVER_NOT_ENOUGH_EXISTENTIAL_DEPOSIT]: {
88
- message: detectTranslate('Receiver is not enough existential deposit'),
86
+ [StakingTxErrorType.CAN_NOT_GET_METADATA]: {
87
+ message: detectTranslate('Unable to fetch staking data. Re-enable current network and try again'),
89
88
  code: undefined
90
89
  },
91
- [YieldValidationStatus.NOT_ENOUGH_FEE]: {
92
- message: detectTranslate('Insufficient balance'),
93
- code: undefined
94
- },
95
- [YieldValidationStatus.NOT_ENOUGH_MIN_JOIN_POOL]: {
96
- message: detectTranslate('Not enough min earning amount'),
90
+ [TransferTxErrorType.RECEIVER_NOT_ENOUGH_EXISTENTIAL_DEPOSIT]: {
91
+ message: detectTranslate('Receiver is not enough existential deposit'),
97
92
  code: undefined
98
93
  }
99
94
  };
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.WalletUnlockType = exports.TransferTxErrorType = exports.TransactionDirection = exports.ThemeNames = exports.StakingType = exports.StakingTxErrorType = exports.RuntimeEnvironment = exports.RMRK_VER = exports.ProviderErrorType = exports.NotificationType = exports.NETWORK_STATUS = exports.NETWORK_ERROR = exports.MobileOS = exports.MantaPayEnableMessage = exports.ExtrinsicType = exports.ExtrinsicStatus = exports.ExternalRequestPromiseStatus = exports.EvmProviderErrorType = exports.CrowdloanParaState = exports.ContractType = exports.ChainType = exports.ChainEditStandard = exports.CampaignDataType = exports.BasicTxWarningCode = exports.BasicTxErrorType = exports.BalanceErrorType = exports.AccountExternalErrorCode = exports.APIItemState = void 0;
6
+ exports.WalletUnlockType = exports.UnstakingStatus = exports.TransferTxErrorType = exports.TransactionDirection = exports.ThemeNames = exports.StakingType = exports.StakingTxErrorType = exports.StakingStatus = exports.RuntimeEnvironment = exports.RMRK_VER = exports.ProviderErrorType = exports.NotificationType = exports.NETWORK_STATUS = exports.NETWORK_ERROR = exports.MobileOS = exports.MantaPayEnableMessage = exports.ExtrinsicType = exports.ExtrinsicStatus = exports.ExternalRequestPromiseStatus = exports.EvmProviderErrorType = exports.CrowdloanParaState = exports.ContractType = exports.ChainType = exports.ChainEditStandard = exports.CampaignDataType = exports.BasicTxWarningCode = exports.BasicTxErrorType = exports.BalanceErrorType = exports.AccountExternalErrorCode = exports.APIItemState = void 0;
7
7
  // Copyright 2019-2022 @polkadot/extension-koni authors & contributors
8
8
  // SPDX-License-Identifier: Apache-2.0
9
9
  let RuntimeEnvironment;
@@ -23,7 +23,6 @@ exports.StakingType = StakingType;
23
23
  (function (StakingType) {
24
24
  StakingType["NOMINATED"] = "nominated";
25
25
  StakingType["POOLED"] = "pooled";
26
- StakingType["LIQUID_STAKING"] = "liquid_staking";
27
26
  })(StakingType || (exports.StakingType = StakingType = {}));
28
27
  let APIItemState;
29
28
  exports.APIItemState = APIItemState;
@@ -89,21 +88,6 @@ exports.ExtrinsicType = ExtrinsicType;
89
88
  ExtrinsicType["STAKING_COMPOUNDING"] = "staking.compounding";
90
89
  ExtrinsicType["STAKING_CANCEL_COMPOUNDING"] = "staking.cancel_compounding";
91
90
  ExtrinsicType["STAKING_CANCEL_UNSTAKE"] = "staking.cancel_unstake";
92
- ExtrinsicType["JOIN_YIELD_POOL"] = "earn.join_pool";
93
- ExtrinsicType["MINT_VDOT"] = "earn.mint_vdot";
94
- ExtrinsicType["MINT_LDOT"] = "earn.mint_ldot";
95
- ExtrinsicType["MINT_SDOT"] = "earn.mint_sdot";
96
- ExtrinsicType["MINT_QDOT"] = "earn.mint_qdot";
97
- ExtrinsicType["MINT_STDOT"] = "earn.mint_stdot";
98
- ExtrinsicType["REDEEM_QDOT"] = "earn.redeem_qdot";
99
- ExtrinsicType["REDEEM_VDOT"] = "earn.redeem_vdot";
100
- ExtrinsicType["REDEEM_LDOT"] = "earn.redeem_ldot";
101
- ExtrinsicType["REDEEM_SDOT"] = "earn.redeem_sdot";
102
- ExtrinsicType["REDEEM_STDOT"] = "earn.redeem_stdot";
103
- ExtrinsicType["UNSTAKE_QDOT"] = "earn.unstake_qdot";
104
- ExtrinsicType["UNSTAKE_VDOT"] = "earn.unstake_vdot";
105
- ExtrinsicType["UNSTAKE_LDOT"] = "earn.unstake_ldot";
106
- ExtrinsicType["UNSTAKE_SDOT"] = "earn.unstake_sdot";
107
91
  ExtrinsicType["EVM_EXECUTE"] = "evm.execute";
108
92
  ExtrinsicType["UNKNOWN"] = "unknown";
109
93
  })(ExtrinsicType || (exports.ExtrinsicType = ExtrinsicType = {}));
@@ -143,6 +127,7 @@ exports.StakingTxErrorType = StakingTxErrorType;
143
127
  StakingTxErrorType["INVALID_ACTIVE_STAKE"] = "INVALID_ACTIVE_STAKE";
144
128
  StakingTxErrorType["EXCEED_MAX_UNSTAKING"] = "EXCEED_MAX_UNSTAKING";
145
129
  StakingTxErrorType["INACTIVE_NOMINATION_POOL"] = "INACTIVE_NOMINATION_POOL";
130
+ StakingTxErrorType["CAN_NOT_GET_METADATA"] = "CAN_NOT_GET_METADATA";
146
131
  })(StakingTxErrorType || (exports.StakingTxErrorType = StakingTxErrorType = {}));
147
132
  let TransferTxErrorType;
148
133
  exports.TransferTxErrorType = TransferTxErrorType;
@@ -232,6 +217,21 @@ exports.EvmProviderErrorType = EvmProviderErrorType;
232
217
  EvmProviderErrorType["INVALID_PARAMS"] = "INVALID_PARAMS";
233
218
  EvmProviderErrorType["INTERNAL_ERROR"] = "INTERNAL_ERROR";
234
219
  })(EvmProviderErrorType || (exports.EvmProviderErrorType = EvmProviderErrorType = {}));
220
+ let UnstakingStatus;
221
+ exports.UnstakingStatus = UnstakingStatus;
222
+ (function (UnstakingStatus) {
223
+ UnstakingStatus["CLAIMABLE"] = "CLAIMABLE";
224
+ UnstakingStatus["UNLOCKING"] = "UNLOCKING";
225
+ })(UnstakingStatus || (exports.UnstakingStatus = UnstakingStatus = {}));
226
+ let StakingStatus;
227
+ exports.StakingStatus = StakingStatus;
228
+ (function (StakingStatus) {
229
+ StakingStatus["EARNING_REWARD"] = "EARNING_REWARD";
230
+ StakingStatus["PARTIALLY_EARNING"] = "PARTIALLY_EARNING";
231
+ StakingStatus["NOT_EARNING"] = "NOT_EARNING";
232
+ StakingStatus["WAITING"] = "WAITING";
233
+ StakingStatus["NOT_STAKING"] = "NOT_STAKING";
234
+ })(StakingStatus || (exports.StakingStatus = StakingStatus = {}));
235
235
  let ChainEditStandard; // ChainService
236
236
  // for custom network
237
237
  exports.ChainEditStandard = ChainEditStandard;
@@ -6,7 +6,6 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.TransactionError = void 0;
7
7
  var _SWError = require("@subwallet/extension-base/background/errors/SWError");
8
8
  var _KoniTypes = require("@subwallet/extension-base/background/KoniTypes");
9
- var _types = require("@subwallet/extension-base/types");
10
9
  var _utils = require("@subwallet/extension-base/utils");
11
10
  var _i18next = require("i18next");
12
11
  // Copyright 2019-2022 @subwallet/extension-koni authors & contributors
@@ -89,16 +88,12 @@ const defaultErrorMap = {
89
88
  message: (0, _utils.detectTranslate)('Invalid. Inactive nomination pool'),
90
89
  code: undefined
91
90
  },
92
- [_KoniTypes.TransferTxErrorType.RECEIVER_NOT_ENOUGH_EXISTENTIAL_DEPOSIT]: {
93
- message: (0, _utils.detectTranslate)('Receiver is not enough existential deposit'),
91
+ [_KoniTypes.StakingTxErrorType.CAN_NOT_GET_METADATA]: {
92
+ message: (0, _utils.detectTranslate)('Unable to fetch staking data. Re-enable current network and try again'),
94
93
  code: undefined
95
94
  },
96
- [_types.YieldValidationStatus.NOT_ENOUGH_FEE]: {
97
- message: (0, _utils.detectTranslate)('Insufficient balance'),
98
- code: undefined
99
- },
100
- [_types.YieldValidationStatus.NOT_ENOUGH_MIN_JOIN_POOL]: {
101
- message: (0, _utils.detectTranslate)('Not enough min earning amount'),
95
+ [_KoniTypes.TransferTxErrorType.RECEIVER_NOT_ENOUGH_EXISTENTIAL_DEPOSIT]: {
96
+ message: (0, _utils.detectTranslate)('Receiver is not enough existential deposit'),
102
97
  code: undefined
103
98
  }
104
99
  };
@@ -27,11 +27,9 @@ var _exportNames = {
27
27
  IGNORE_QR_SIGNER: true,
28
28
  XCM_MIN_AMOUNT_RATIO: true,
29
29
  GAS_PRICE_RATIO: true,
30
- NETWORK_MULTI_GAS_FEE: true,
31
- ORDINAL_COLLECTION: true,
32
- ORDINAL_METHODS: true
30
+ NETWORK_MULTI_GAS_FEE: true
33
31
  };
34
- exports.XCM_MIN_AMOUNT_RATIO = exports.SUB_TOKEN_REFRESH_BALANCE_INTERVAL = exports.ORDINAL_METHODS = exports.ORDINAL_COLLECTION = exports.NETWORK_MULTI_GAS_FEE = exports.MANTA_PAY_BALANCE_INTERVAL = exports.IGNORE_QR_SIGNER = exports.IGNORE_GET_SUBSTRATE_FEATURES_LIST = exports.GAS_PRICE_RATIO = exports.CRON_SYNC_MANTA_PAY = exports.CRON_REFRESH_STAKING_REWARD_INTERVAL = exports.CRON_REFRESH_STAKING_REWARD_FAST_INTERVAL = exports.CRON_REFRESH_PRICE_INTERVAL = exports.CRON_REFRESH_NFT_INTERVAL = exports.CRON_REFRESH_HISTORY_INTERVAL = exports.CRON_REFRESH_CHAIN_STAKING_METADATA = exports.CRON_REFRESH_CHAIN_NOMINATOR_METADATA = exports.CRON_RECOVER_HISTORY_INTERVAL = exports.CRON_GET_API_MAP_STATUS = exports.CRON_AUTO_RECOVER_WEB3_INTERVAL = exports.CRON_AUTO_RECOVER_DOTSAMA_INTERVAL = exports.ASTAR_REFRESH_BALANCE_INTERVAL = exports.ALL_NETWORK_KEY = exports.ALL_GENESIS_HASH = exports.ALL_ACCOUNT_KEY = exports.ACALA_REFRESH_CROWDLOAN_INTERVAL = void 0;
32
+ exports.XCM_MIN_AMOUNT_RATIO = exports.SUB_TOKEN_REFRESH_BALANCE_INTERVAL = exports.NETWORK_MULTI_GAS_FEE = exports.MANTA_PAY_BALANCE_INTERVAL = exports.IGNORE_QR_SIGNER = exports.IGNORE_GET_SUBSTRATE_FEATURES_LIST = exports.GAS_PRICE_RATIO = exports.CRON_SYNC_MANTA_PAY = exports.CRON_REFRESH_STAKING_REWARD_INTERVAL = exports.CRON_REFRESH_STAKING_REWARD_FAST_INTERVAL = exports.CRON_REFRESH_PRICE_INTERVAL = exports.CRON_REFRESH_NFT_INTERVAL = exports.CRON_REFRESH_HISTORY_INTERVAL = exports.CRON_REFRESH_CHAIN_STAKING_METADATA = exports.CRON_REFRESH_CHAIN_NOMINATOR_METADATA = exports.CRON_RECOVER_HISTORY_INTERVAL = exports.CRON_GET_API_MAP_STATUS = exports.CRON_AUTO_RECOVER_WEB3_INTERVAL = exports.CRON_AUTO_RECOVER_DOTSAMA_INTERVAL = exports.ASTAR_REFRESH_BALANCE_INTERVAL = exports.ALL_NETWORK_KEY = exports.ALL_GENESIS_HASH = exports.ALL_ACCOUNT_KEY = exports.ACALA_REFRESH_CROWDLOAN_INTERVAL = void 0;
35
33
  var _staking = require("./staking");
36
34
  Object.keys(_staking).forEach(function (key) {
37
35
  if (key === "default" || key === "__esModule") return;
@@ -106,8 +104,4 @@ exports.XCM_MIN_AMOUNT_RATIO = XCM_MIN_AMOUNT_RATIO;
106
104
  const GAS_PRICE_RATIO = 1.05;
107
105
  exports.GAS_PRICE_RATIO = GAS_PRICE_RATIO;
108
106
  const NETWORK_MULTI_GAS_FEE = ['astarEvm'];
109
- exports.NETWORK_MULTI_GAS_FEE = NETWORK_MULTI_GAS_FEE;
110
- const ORDINAL_COLLECTION = '__Ordinal__';
111
- exports.ORDINAL_COLLECTION = ORDINAL_COLLECTION;
112
- const ORDINAL_METHODS = ['drc-20', 'pol-20'];
113
- exports.ORDINAL_METHODS = ORDINAL_METHODS;
107
+ exports.NETWORK_MULTI_GAS_FEE = NETWORK_MULTI_GAS_FEE;
@@ -33,12 +33,8 @@ exports.BIT_COUNTRY_IPFS_SERVER = BIT_COUNTRY_IPFS_SERVER;
33
33
  const BIT_COUNTRY_LAND_ESTATE_METADATA_API = 'https://pioneer-api.bit.country/metadata/landTokenUriPioneer';
34
34
  exports.BIT_COUNTRY_LAND_ESTATE_METADATA_API = BIT_COUNTRY_LAND_ESTATE_METADATA_API;
35
35
  const BIT_COUNTRY_THUMBNAIL_RESOLVER = 'https://res.cloudinary.com/ddftctzph/image/upload/c_scale,q_100,w_250/production-ipfs/asset/';
36
-
37
- // XOrigin
38
36
  exports.BIT_COUNTRY_THUMBNAIL_RESOLVER = BIT_COUNTRY_THUMBNAIL_RESOLVER;
39
37
  const CF_IPFS_GATEWAY = 'https://cf-ipfs.com/ipfs/';
40
-
41
- // XOrigin
42
38
  exports.CF_IPFS_GATEWAY = CF_IPFS_GATEWAY;
43
39
  const PINATA_IPFS_GATEWAY = 'https://gateway.pinata.cloud/ipfs/';
44
40
  exports.PINATA_IPFS_GATEWAY = PINATA_IPFS_GATEWAY;
@@ -51,22 +47,14 @@ const VARA_SCAN_ENDPOINT = 'https://nft-explorer.vara-network.io/graphql';
51
47
  // GATEWAY
52
48
  exports.VARA_SCAN_ENDPOINT = VARA_SCAN_ENDPOINT;
53
49
  const UNIQUE_IPFS_GATEWAY = 'https://ipfs.unique.network/ipfs/';
54
-
55
- // XOrigin
56
50
  exports.UNIQUE_IPFS_GATEWAY = UNIQUE_IPFS_GATEWAY;
57
51
  const NFT_STORAGE_GATEWAY = 'https://nftstorage.link/ipfs/';
58
52
  exports.NFT_STORAGE_GATEWAY = NFT_STORAGE_GATEWAY;
59
53
  const IPFS_W3S_LINK = 'https://w3s.link/ipfs/';
60
-
61
- // XOrigin
62
54
  exports.IPFS_W3S_LINK = IPFS_W3S_LINK;
63
55
  const GATEWAY_IPFS_IO = 'https://gateway.ipfs.io/ipfs/';
64
-
65
- // XOrigin
66
56
  exports.GATEWAY_IPFS_IO = GATEWAY_IPFS_IO;
67
57
  const IPFS_IO = 'https://ipfs.io/ipfs/';
68
-
69
- // XOrigin
70
58
  exports.IPFS_IO = IPFS_IO;
71
59
  const DWEB_LINK = 'https://dweb.link/ipfs/';
72
60
  exports.DWEB_LINK = DWEB_LINK;
@@ -134,8 +122,26 @@ exports.SUPPORTED_TRANSFER_SUBSTRATE_CHAIN_NAME = SUPPORTED_TRANSFER_SUBSTRATE_C
134
122
  SUPPORTED_TRANSFER_SUBSTRATE_CHAIN_NAME["pioneer"] = "pioneer";
135
123
  })(SUPPORTED_TRANSFER_SUBSTRATE_CHAIN_NAME || (exports.SUPPORTED_TRANSFER_SUBSTRATE_CHAIN_NAME = SUPPORTED_TRANSFER_SUBSTRATE_CHAIN_NAME = {}));
136
124
  const RANDOM_IPFS_GATEWAY_SETTING = [{
125
+ provider: CF_IPFS_GATEWAY,
126
+ weight: 4
127
+ }, {
137
128
  provider: CLOUDFLARE_PINATA_SERVER,
138
129
  weight: 10
130
+ }, {
131
+ provider: PINATA_IPFS_GATEWAY,
132
+ weight: 1 // Rate limit too low
133
+ }, {
134
+ provider: DWEB_LINK,
135
+ weight: 5
136
+ }, {
137
+ provider: GATEWAY_IPFS_IO,
138
+ weight: 5
139
+ }, {
140
+ provider: IPFS_IO,
141
+ weight: 5
142
+ }, {
143
+ provider: NFT_STORAGE_GATEWAY,
144
+ weight: 50
139
145
  }];
140
146
  if (isFirefox) {
141
147
  RANDOM_IPFS_GATEWAY_SETTING.push({
@@ -143,34 +149,18 @@ if (isFirefox) {
143
149
  weight: 5000
144
150
  });
145
151
  }
146
- if (!_utils.RuntimeInfo.protocol || !_utils.RuntimeInfo.protocol.startsWith('http') || _utils.RuntimeInfo.protocol.startsWith('https')) {
152
+ if (!_utils.RuntimeInfo.protocol || _utils.RuntimeInfo.protocol && !_utils.RuntimeInfo.protocol.startsWith('http')) {
147
153
  RANDOM_IPFS_GATEWAY_SETTING.push({
148
154
  provider: IPFS_FLEEK,
149
155
  weight: 4
150
- }, {
156
+ });
157
+ RANDOM_IPFS_GATEWAY_SETTING.push({
151
158
  provider: IPFS_GATEWAY_4EVERLAND,
152
159
  weight: 2
153
- }, {
160
+ });
161
+ RANDOM_IPFS_GATEWAY_SETTING.push({
154
162
  provider: IPFS_W3S_LINK,
155
163
  weight: 1
156
- }, {
157
- provider: CF_IPFS_GATEWAY,
158
- weight: 4
159
- }, {
160
- provider: PINATA_IPFS_GATEWAY,
161
- weight: 1 // Rate limit too low
162
- }, {
163
- provider: NFT_STORAGE_GATEWAY,
164
- weight: 50
165
- }, {
166
- provider: GATEWAY_IPFS_IO,
167
- weight: 5
168
- }, {
169
- provider: DWEB_LINK,
170
- weight: 5
171
- }, {
172
- provider: IPFS_IO,
173
- weight: 5
174
164
  });
175
165
  }
176
166
  const RANDOM_IPFS_GATEWAY_TOTAL_WEIGHT = RANDOM_IPFS_GATEWAY_SETTING.reduce((value, item) => value + item.weight, 0);