Skip to content

Commit

Permalink
Bump to version 2.0.1 (#69)
Browse files Browse the repository at this point in the history
* ENDPOINT=ws://localhost:9948 yarn update-metadata

* yarn generate:defs

* yarn generate:meta

* manually inport types from @polkadot/types/lookup

* manually add into types

* yarn build

* yarn bump patch
  • Loading branch information
mclyk authored Oct 17, 2023
1 parent 13be98e commit 50c4688
Show file tree
Hide file tree
Showing 15 changed files with 583 additions and 788 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "2.0.0",
"version": "2.0.1",
"private": true,
"repository": "[email protected]:parallel-finance/parallel-js.git",
"author": "Parallel Finance Team",
Expand Down
4 changes: 2 additions & 2 deletions packages/api/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@parallel-finance/api",
"version": "2.0.0",
"version": "2.0.1",
"description": "Parallel Finance JS API",
"main": "index.js",
"author": "Parallel Team",
Expand All @@ -16,7 +16,7 @@
"homepage": "https://github.com/parallel-finance/parallel-js",
"dependencies": {
"@open-web3/orml-api-derive": "^2.0.1",
"@parallel-finance/types": "^2.0.0",
"@parallel-finance/types": "^2.0.1",
"@polkadot/api": "^10.3.2"
},
"devDependencies": {
Expand Down
4 changes: 2 additions & 2 deletions packages/bulk-transfer/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@parallel-finance/bulk-transfer",
"version": "2.0.0",
"version": "2.0.1",
"description": "API library for bulk transfer",
"main": "index.js",
"author": "Parallel Team",
Expand All @@ -16,7 +16,7 @@
"homepage": "https://github.com/parallel-finance/parallel-js",
"dependencies": {
"@open-web3/orml-api-derive": "^2.0.1",
"@parallel-finance/types": "^2.0.0"
"@parallel-finance/types": "^2.0.1"
},
"devDependencies": {
"@babel/runtime": "^7.21.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/type-definitions/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@parallel-finance/type-definitions",
"version": "2.0.0",
"version": "2.0.1",
"description": "Polkadot.js type definitions for Parallel Finance",
"main": "index.js",
"license": "Apache-2.0",
Expand Down
4 changes: 2 additions & 2 deletions packages/types/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@parallel-finance/types",
"version": "2.0.0",
"version": "2.0.1",
"description": "Polkadot.js type definitions for Parallel Finance",
"main": "index.js",
"license": "Apache-2.0",
Expand All @@ -16,7 +16,7 @@
"dependencies": {
"@babel/runtime": "^7.21.0",
"@open-web3/orml-types": "^2.0.1",
"@parallel-finance/type-definitions": "^2.0.0",
"@parallel-finance/type-definitions": "^2.0.1",
"@polkadot/types": "^10.3.2"
},
"devDependencies": {
Expand Down
24 changes: 0 additions & 24 deletions packages/types/src/interfaces/augment-api-consts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -552,30 +552,6 @@ declare module '@polkadot/api-base/types/consts' {
**/
[key: string]: Codec;
};
stableSwap: {
/**
* Optimal Amplification Coefficient
**/
amplificationCoefficient: u8 & AugmentedConst<ApiType>;
lockAccountId: AccountId32 & AugmentedConst<ApiType>;
lpFee: Permill & AugmentedConst<ApiType>;
minimumLiquidity: u128 & AugmentedConst<ApiType>;
numTokens: u8 & AugmentedConst<ApiType>;
palletId: FrameSupportPalletId & AugmentedConst<ApiType>;
/**
* Precision
**/
precision: u128 & AugmentedConst<ApiType>;
/**
* How much the protocol is taking out of each trade.
**/
protocolFee: Permill & AugmentedConst<ApiType>;
protocolFeeReceiver: AccountId32 & AugmentedConst<ApiType>;
/**
* Generic const
**/
[key: string]: Codec;
};
streaming: {
/**
* The max count of streams that has been cancelled or completed for an account
Expand Down
50 changes: 0 additions & 50 deletions packages/types/src/interfaces/augment-api-errors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1465,56 +1465,6 @@ declare module '@polkadot/api-base/types/errors' {
**/
[key: string]: AugmentedError<ApiType>;
};
stableSwap: {
/**
* Conversion failure to u128
**/
ConversionToU128Failed: AugmentedError<ApiType>;
/**
* Identical assets
**/
IdenticalAssets: AugmentedError<ApiType>;
/**
* Insufficient amount in
**/
InsufficientAmountIn: AugmentedError<ApiType>;
/**
* Insufficient amount out
**/
InsufficientAmountOut: AugmentedError<ApiType>;
/**
* Insufficient liquidity
**/
InsufficientLiquidity: AugmentedError<ApiType>;
/**
* Insufficient supply out.
**/
InsufficientSupplyOut: AugmentedError<ApiType>;
/**
* Invariant Error
**/
InvalidInvariant: AugmentedError<ApiType>;
/**
* LP token has already been minted
**/
LpTokenAlreadyExists: AugmentedError<ApiType>;
/**
* Not an ideal price ratio
**/
NotAnIdealPrice: AugmentedError<ApiType>;
/**
* Pool does not exist
**/
PoolAlreadyExists: AugmentedError<ApiType>;
/**
* Pool does not exist
**/
PoolDoesNotExist: AugmentedError<ApiType>;
/**
* Generic error
**/
[key: string]: AugmentedError<ApiType>;
};
streaming: {
/**
* Stream cannot be cancelled
Expand Down
34 changes: 8 additions & 26 deletions packages/types/src/interfaces/augment-api-events.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import type { ApiTypes, AugmentedEvent } from '@polkadot/api-base/types';
import type { Bytes, Null, Option, Result, U256, U8aFixed, Vec, bool, u128, u16, u32, u64, u8 } from '@polkadot/types-codec';
import type { ITuple } from '@polkadot/types-codec/types';
import type { AccountId32, H160, H256, Permill } from '@polkadot/types/interfaces/runtime';
import { PalletTraitsXcmAssetType, FrameSupportTokensMiscBalanceStatus, PalletBridgeBridgeType, PalletCrowdloansBonusConfig, XcmV3Response, XcmV3MultiLocation, XcmV3TraitsError, PalletCrowdloansChildStorageKind, PalletCrowdloansVaultPhase, PalletCrowdloansContributionStrategy, XcmV3TraitsOutcome, PalletDemocracyVoteThreshold, PalletDemocracyVoteAccountVote, XcmV3Xcm, SpWeightsWeightV2Weight, EvmCoreErrorExitReason, EthereumLog, SpRuntimeDispatchError, PalletTraitsUmpRewardDestination, PalletLiquidStakingStakingLedger, PalletLoansMarket, PalletMultisigTimepoint, XcmV2Xcm, XcmVersionedMultiAssets, XcmVersionedMultiLocation, XcmV2Response, VanillaRuntimeProxyType, FrameSupportDispatchDispatchInfo, OrmlVestingVestingSchedule, PalletTraitsUmpXcmWeightFeeMisc, XcmV3MultiassetMultiAssets, XcmV3MultiAsset } from '@polkadot/types/lookup';
import { PalletTraitsXcmAssetType, FrameSupportTokensMiscBalanceStatus, PalletBridgeBridgeType, PalletCrowdloansBonusConfig, XcmV3Response, XcmV3MultiLocation, XcmV3TraitsError, PalletCrowdloansChildStorageKind, PalletCrowdloansVaultPhase, PalletCrowdloansContributionStrategy, XcmV3TraitsOutcome, PalletDemocracyVoteThreshold, PalletDemocracyVoteAccountVote, XcmV3Xcm, SpWeightsWeightV2Weight, EvmCoreErrorExitReason, EthereumLog, SpRuntimeDispatchError, PalletTraitsUmpRewardDestination, PalletLiquidStakingStakingLedger, PalletLoansMarket, PalletMultisigTimepoint, XcmV2Xcm, XcmVersionedMultiAssets, XcmVersionedMultiLocation, XcmV2Response, KerriaRuntimeProxyType, FrameSupportDispatchDispatchInfo, OrmlVestingVestingSchedule, PalletTraitsUmpXcmWeightFeeMisc, XcmV3MultiassetMultiAssets, XcmV3MultiAsset } from '@polkadot/types/lookup';

export type __AugmentedEvent<ApiType extends ApiTypes> = AugmentedEvent<ApiType>;

Expand Down Expand Up @@ -871,6 +871,10 @@ declare module '@polkadot/api-base/types/events' {
* Sent staking.nominate call to relaychain
**/
Nominating: AugmentedEvent<ApiType, [u16, Vec<AccountId32>]>;
/**
* Not the ideal staking ledger
**/
NonIdealStakingLedger: AugmentedEvent<ApiType, [u16]>;
/**
* Notification received
* [multi_location, query_id, res]
Expand Down Expand Up @@ -1373,20 +1377,20 @@ declare module '@polkadot/api-base/types/events' {
/**
* A proxy was added.
**/
ProxyAdded: AugmentedEvent<ApiType, [delegator: AccountId32, delegatee: AccountId32, proxyType: VanillaRuntimeProxyType, delay: u32], { delegator: AccountId32, delegatee: AccountId32, proxyType: VanillaRuntimeProxyType, delay: u32 }>;
ProxyAdded: AugmentedEvent<ApiType, [delegator: AccountId32, delegatee: AccountId32, proxyType: KerriaRuntimeProxyType, delay: u32], { delegator: AccountId32, delegatee: AccountId32, proxyType: KerriaRuntimeProxyType, delay: u32 }>;
/**
* A proxy was executed correctly, with the given.
**/
ProxyExecuted: AugmentedEvent<ApiType, [result: Result<Null, SpRuntimeDispatchError>], { result: Result<Null, SpRuntimeDispatchError> }>;
/**
* A proxy was removed.
**/
ProxyRemoved: AugmentedEvent<ApiType, [delegator: AccountId32, delegatee: AccountId32, proxyType: VanillaRuntimeProxyType, delay: u32], { delegator: AccountId32, delegatee: AccountId32, proxyType: VanillaRuntimeProxyType, delay: u32 }>;
ProxyRemoved: AugmentedEvent<ApiType, [delegator: AccountId32, delegatee: AccountId32, proxyType: KerriaRuntimeProxyType, delay: u32], { delegator: AccountId32, delegatee: AccountId32, proxyType: KerriaRuntimeProxyType, delay: u32 }>;
/**
* A pure account has been created by new proxy with given
* disambiguation index and proxy type.
**/
PureCreated: AugmentedEvent<ApiType, [pure: AccountId32, who: AccountId32, proxyType: VanillaRuntimeProxyType, disambiguationIndex: u16], { pure: AccountId32, who: AccountId32, proxyType: VanillaRuntimeProxyType, disambiguationIndex: u16 }>;
PureCreated: AugmentedEvent<ApiType, [pure: AccountId32, who: AccountId32, proxyType: KerriaRuntimeProxyType, disambiguationIndex: u16], { pure: AccountId32, who: AccountId32, proxyType: KerriaRuntimeProxyType, disambiguationIndex: u16 }>;
/**
* Generic event
**/
Expand Down Expand Up @@ -1433,28 +1437,6 @@ declare module '@polkadot/api-base/types/events' {
**/
[key: string]: AugmentedEvent<ApiType>;
};
stableSwap: {
/**
* Delta Calculated
**/
DeltaCalculated: AugmentedEvent<ApiType, [u32, u32, u128]>;
/**
* Add liquidity into pool
* [sender, base_currency_id, quote_currency_id, base_amount_added, quote_amount_added, lp_token_id, new_base_amount, new_quote_amount]
**/
LiquidityAdded: AugmentedEvent<ApiType, [AccountId32, u32, u32, u128, u128, u32, u128, u128]>;
/**
* Remove liquidity from pool
* [sender, base_currency_id, quote_currency_id, liquidity, base_amount_removed, quote_amount_removed, lp_token_id, new_base_amount, new_quote_amount]
**/
LiquidityRemoved: AugmentedEvent<ApiType, [AccountId32, u32, u32, u128, u128, u128, u32, u128, u128]>;
PoolCreated: AugmentedEvent<ApiType, [AccountId32, u32, u32, u32]>;
Traded: AugmentedEvent<ApiType, [AccountId32, u32, u32, u128, u128, u32, u128, u128]>;
/**
* Generic event
**/
[key: string]: AugmentedEvent<ApiType>;
};
streaming: {
/**
* Set minimum deposit for creating a stream
Expand Down
16 changes: 3 additions & 13 deletions packages/types/src/interfaces/augment-api-query.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import type { BTreeMap, Bytes, Option, U256, U8aFixed, Vec, bool, u128, u16, u32
import type { AnyNumber, ITuple } from '@polkadot/types-codec/types';
import type { AccountId32, Call, H160, H256, Permill } from '@polkadot/types/interfaces/runtime';
import type { Observable } from '@polkadot/types/types';
import { PalletTraitsPool, PalletTraitsXcmAssetType, PalletAssetsAssetAccount, PalletAssetsApproval, PalletStableswapPool, PalletAssetsAssetDetails, PalletAssetsAssetMetadata, SpConsensusAuraSr25519AppSr25519Public, PalletBalancesAccountData, PalletBalancesBalanceLock, PalletBalancesReserveData, PalletBridgeBridgeToken, PalletBridgeMaterializeCall, PalletBridgeProposal, PalletCollatorSelectionCandidateInfo, PalletCrowdloansBonusConfig, PalletCrowdloansReleases, PalletCrowdloansVault, PalletCrowdloansXcmRequest, FrameSupportPreimagesBounded, PalletDemocracyVoteThreshold, PalletDemocracyReferendumInfo, PalletDemocracyVoteVoting, CumulusPalletDmpQueueConfigData, CumulusPalletDmpQueuePageIndexData, EthereumBlock, EthereumReceiptReceiptV3, FpRpcTransactionStatus, EthereumTransactionTransactionV2, PalletFarmingPoolInfo, PalletFarmingUserPosition, PalletCollectiveVotes, PalletIdentityRegistration, PalletIdentityRegistrarInfo, PalletLiquidStakingMatchingLedger, PalletLiquidStakingStakingLedger, PalletLiquidStakingVersions, PalletLiquidStakingUnlockChunk, PolkadotPrimitivesV2PersistedValidationData, PalletLiquidStakingXcmRequest, PalletLoansBorrowSnapshot, PalletLoansDeposits, PalletLoansEarnedSnapshot, PalletLoansMarket, PalletLoansRewardMarketState, PalletLoansVersions, PalletMultisigMultisig, OrmlOracleModuleTimestampedValue, PolkadotPrimitivesV2AbridgedHostConfiguration, PolkadotCorePrimitivesOutboundHrmpMessage, SpTrieStorageProof, CumulusPalletParachainSystemRelayStateSnapshotMessagingStateSnapshot, SpWeightsWeightV2Weight, PolkadotPrimitivesV2UpgradeRestriction, PalletXcmVersionMigrationStage, PalletXcmQueryStatus, XcmVersionedMultiLocation, PalletPreimageRequestStatus, PalletProxyAnnouncement, PalletProxyProxyDefinition, PalletSchedulerScheduled, SpCoreCryptoKeyTypeId, VanillaRuntimeOpaqueSessionKeys, PalletStreamingStreamKind, PalletStreamingStream, FrameSystemAccountInfo, FrameSupportDispatchPerDispatchClassWeight, SpRuntimeDigest, FrameSystemEventRecord, FrameSystemPhase, FrameSystemLastRuntimeUpgradeInfo, PalletTransactionPaymentReleases, PalletTreasuryProposal, OrmlVestingVestingSchedule, PalletTraitsUmpXcmCall, PalletTraitsUmpXcmWeightFeeMisc, CumulusPalletXcmpQueueInboundChannelDetails, CumulusPalletXcmpQueueOutboundChannelDetails, CumulusPalletXcmpQueueQueueConfigData,PalletXcmRemoteLockedFungibleRecord, XcmVersionedAssetId } from '@polkadot/types/lookup';
import { PalletTraitsPool, PalletTraitsXcmAssetType, PalletAssetsAssetAccount, PalletAssetsApproval, PalletAssetsAssetDetails, PalletAssetsAssetMetadata, SpConsensusAuraSr25519AppSr25519Public, PalletBalancesAccountData, PalletBalancesBalanceLock, KerriaRuntimeOpaqueSessionKeys, PalletBalancesReserveData, PalletBridgeBridgeToken, PalletBridgeMaterializeCall, PalletBridgeProposal, PalletCollatorSelectionCandidateInfo, PalletCrowdloansBonusConfig, PalletCrowdloansReleases, PalletCrowdloansVault, PalletCrowdloansXcmRequest, FrameSupportPreimagesBounded, PalletDemocracyVoteThreshold, PalletDemocracyReferendumInfo, PalletDemocracyVoteVoting, CumulusPalletDmpQueueConfigData, CumulusPalletDmpQueuePageIndexData, EthereumBlock, EthereumReceiptReceiptV3, FpRpcTransactionStatus, EthereumTransactionTransactionV2, PalletFarmingPoolInfo, PalletFarmingUserPosition, PalletCollectiveVotes, PalletIdentityRegistration, PalletIdentityRegistrarInfo, PalletLiquidStakingMatchingLedger, PalletLiquidStakingStakingLedger, PalletLiquidStakingVersions, PalletLiquidStakingUnlockChunk, PolkadotPrimitivesV2PersistedValidationData, PalletLiquidStakingXcmRequest, PalletLoansBorrowSnapshot, PalletLoansDeposits, PalletLoansEarnedSnapshot, PalletLoansMarket, PalletLoansRewardMarketState, PalletLoansVersions, PalletMultisigMultisig, OrmlOracleModuleTimestampedValue, PolkadotPrimitivesV2AbridgedHostConfiguration, PolkadotCorePrimitivesOutboundHrmpMessage, SpTrieStorageProof, CumulusPalletParachainSystemRelayStateSnapshotMessagingStateSnapshot, SpWeightsWeightV2Weight, PolkadotPrimitivesV2UpgradeRestriction, PalletXcmVersionMigrationStage, PalletXcmQueryStatus, XcmVersionedMultiLocation, PalletPreimageRequestStatus, PalletProxyAnnouncement, PalletProxyProxyDefinition, PalletSchedulerScheduled, SpCoreCryptoKeyTypeId, KerriaRuntimeProxyType, PalletStreamingStreamKind, PalletStreamingStream, FrameSystemAccountInfo, FrameSupportDispatchPerDispatchClassWeight, SpRuntimeDigest, FrameSystemEventRecord, FrameSystemPhase, FrameSystemLastRuntimeUpgradeInfo, PalletTransactionPaymentReleases, PalletTreasuryProposal, OrmlVestingVestingSchedule, PalletTraitsUmpXcmCall, PalletTraitsUmpXcmWeightFeeMisc, CumulusPalletXcmpQueueInboundChannelDetails, CumulusPalletXcmpQueueOutboundChannelDetails, CumulusPalletXcmpQueueQueueConfigData,PalletXcmRemoteLockedFungibleRecord, XcmVersionedAssetId } from '@polkadot/types/lookup';

export type __AugmentedQuery<ApiType extends ApiTypes> = AugmentedQuery<ApiType, () => unknown>;
export type __QueryableStorageEntry<ApiType extends ApiTypes> = QueryableStorageEntry<ApiType>;
Expand Down Expand Up @@ -1019,7 +1019,7 @@ declare module '@polkadot/api-base/types/storage' {
/**
* The next session keys for a validator.
**/
nextKeys: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<Option<VanillaRuntimeOpaqueSessionKeys>>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
nextKeys: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<Option<KerriaRuntimeOpaqueSessionKeys>>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
/**
* True if the underlying economic identities or weighting behind the validators
* has changed in the queued validator set.
Expand All @@ -1029,7 +1029,7 @@ declare module '@polkadot/api-base/types/storage' {
* The queued keys for the next session. When the next session begins, these keys
* will be used to determine the validator's session keys.
**/
queuedKeys: AugmentedQuery<ApiType, () => Observable<Vec<ITuple<[AccountId32, VanillaRuntimeOpaqueSessionKeys]>>>, []> & QueryableStorageEntry<ApiType, []>;
queuedKeys: AugmentedQuery<ApiType, () => Observable<Vec<ITuple<[AccountId32, KerriaRuntimeOpaqueSessionKeys]>>>, []> & QueryableStorageEntry<ApiType, []>;
/**
* The current set of validators.
**/
Expand All @@ -1039,16 +1039,6 @@ declare module '@polkadot/api-base/types/storage' {
**/
[key: string]: QueryableStorageEntry<ApiType>;
};
stableSwap: {
/**
* A bag of liquidity composed by two different assets
**/
pools: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array) => Observable<Option<PalletStableswapPool>>, [u32, u32]> & QueryableStorageEntry<ApiType, [u32, u32]>;
/**
* Generic query
**/
[key: string]: QueryableStorageEntry<ApiType>;
};
streaming: {
/**
* Minimum deposit for each asset
Expand Down
Loading

0 comments on commit 50c4688

Please sign in to comment.