Skip to content

Commit

Permalink
chore: bump sdk versions (#1580)
Browse files Browse the repository at this point in the history
  • Loading branch information
mirceahasegan authored and rhyslbw committed Dec 6, 2024
1 parent 23cbc16 commit 0f850ea
Show file tree
Hide file tree
Showing 11 changed files with 222 additions and 187 deletions.
18 changes: 9 additions & 9 deletions apps/browser-extension-wallet/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,15 @@
},
"dependencies": {
"@ant-design/icons": "^4.7.0",
"@cardano-sdk/cardano-services-client": "0.22.3",
"@cardano-sdk/core": "0.41.4",
"@cardano-sdk/dapp-connector": "0.12.44",
"@cardano-sdk/input-selection": "0.13.28",
"@cardano-sdk/tx-construction": "0.21.13",
"@cardano-sdk/cardano-services-client": "0.23.2",
"@cardano-sdk/core": "0.42.1",
"@cardano-sdk/dapp-connector": "0.12.47",
"@cardano-sdk/input-selection": "0.13.31",
"@cardano-sdk/tx-construction": "0.23.0",
"@cardano-sdk/util": "0.15.5",
"@cardano-sdk/util-rxjs": "0.7.41",
"@cardano-sdk/wallet": "0.44.22",
"@cardano-sdk/web-extension": "0.34.21",
"@cardano-sdk/util-rxjs": "0.8.0",
"@cardano-sdk/wallet": "0.46.0",
"@cardano-sdk/web-extension": "0.34.24",
"@emurgo/cip14-js": "~3.0.1",
"@input-output-hk/lace-ui-toolkit": "1.21.0",
"@lace/cardano": "0.1.0",
Expand Down Expand Up @@ -99,7 +99,7 @@
"zustand": "3.5.14"
},
"devDependencies": {
"@cardano-sdk/hardware-ledger": "0.12.13",
"@cardano-sdk/hardware-ledger": "0.12.16",
"@emurgo/cardano-message-signing-asmjs": "1.0.1",
"@openpgp/web-stream-tools": "0.0.11-patch-0",
"@pdfme/common": "^4.0.2",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { BlockchainProviderSlice, SliceCreator } from '../types';
import { Wallet } from '@lace/cardano';
import { consumeRemoteApi } from '@cardano-sdk/web-extension';
import { runtime } from 'webextension-polyfill';
import { DRepProvider } from '@cardano-sdk/core';

export interface IBlockchainProvider {
stakePoolProvider: Wallet.StakePoolProvider;
Expand All @@ -11,6 +12,7 @@ export interface IBlockchainProvider {
utxoProvider: Wallet.UtxoProvider;
chainHistoryProvider: Wallet.ChainHistoryProvider;
rewardsProvider: Wallet.RewardsProvider;
drepProvider?: DRepProvider;
}

export type BlockchainProviderFactory = () => IBlockchainProvider;
Expand All @@ -23,7 +25,8 @@ export const IBlockchainProvider = {
networkInfoProvider: providers?.networkInfoProvider,
utxoProvider: providers?.utxoProvider,
rewardsProvider: providers?.rewardsProvider,
chainHistoryProvider: providers?.chainHistoryProvider
chainHistoryProvider: providers?.chainHistoryProvider,
drepProvider: providers?.drepProvider
}),
fromWalletProviders: (providers: Wallet.WalletProvidersDependencies): IBlockchainProvider => ({
txSubmitProvider: providers?.txSubmitProvider,
Expand All @@ -32,7 +35,8 @@ export const IBlockchainProvider = {
networkInfoProvider: providers?.networkInfoProvider,
utxoProvider: providers?.utxoProvider,
rewardsProvider: providers?.rewardsProvider,
chainHistoryProvider: providers?.chainHistoryProvider
chainHistoryProvider: providers?.chainHistoryProvider,
drepProvider: providers?.drepProvider
})
};

Expand Down
20 changes: 10 additions & 10 deletions packages/cardano/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,16 +40,16 @@
"watch": "yarn build --watch"
},
"dependencies": {
"@cardano-sdk/cardano-services-client": "0.22.3",
"@cardano-sdk/core": "0.41.4",
"@cardano-sdk/crypto": "0.1.31",
"@cardano-sdk/hardware-ledger": "0.12.13",
"@cardano-sdk/hardware-trezor": "0.6.12",
"@cardano-sdk/key-management": "0.24.10",
"@cardano-sdk/tx-construction": "0.21.13",
"@cardano-sdk/cardano-services-client": "0.23.2",
"@cardano-sdk/core": "0.42.1",
"@cardano-sdk/crypto": "0.1.32",
"@cardano-sdk/hardware-ledger": "0.12.16",
"@cardano-sdk/hardware-trezor": "0.6.15",
"@cardano-sdk/key-management": "0.24.13",
"@cardano-sdk/tx-construction": "0.23.0",
"@cardano-sdk/util": "0.15.5",
"@cardano-sdk/wallet": "0.44.22",
"@cardano-sdk/web-extension": "0.34.21",
"@cardano-sdk/wallet": "0.46.0",
"@cardano-sdk/web-extension": "0.34.24",
"@lace/common": "0.1.0",
"@ledgerhq/devices": "^8.2.1",
"@stablelib/chacha20poly1305": "1.0.1",
Expand All @@ -73,7 +73,7 @@
},
"devDependencies": {
"@blockfrost/blockfrost-js": "^5.5.0",
"@cardano-sdk/util-dev": "0.23.13",
"@cardano-sdk/util-dev": "0.24.1",
"@emurgo/cardano-message-signing-browser": "1.0.1",
"@types/webextension-polyfill": "0.10.0",
"axios": "^1.7.4",
Expand Down
4 changes: 3 additions & 1 deletion packages/cardano/src/wallet/lib/cardano-wallet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ import {
StakePoolProvider,
TxSubmitProvider,
util as coreUtil,
UtxoProvider
UtxoProvider,
DRepProvider
} from '@cardano-sdk/core';
import { ObservableWallet, BaseWalletDependencies, storage, restoreKeyAgent } from '@cardano-sdk/wallet';
import * as KeyManagement from '@cardano-sdk/key-management';
Expand Down Expand Up @@ -64,6 +65,7 @@ export interface WalletProvidersDependencies {
rewardsProvider: RewardsProvider;
chainHistoryProvider: ChainHistoryProvider;
wsProvider?: WsProvider;
drepProvider: DRepProvider;
}

export interface CreatePersonalWallet {
Expand Down
15 changes: 12 additions & 3 deletions packages/cardano/src/wallet/lib/providers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ import {
BlockfrostClientConfig,
RateLimiter,
BlockfrostClient,
BlockfrostAssetProvider
BlockfrostAssetProvider,
BlockfrostDRepProvider
} from '@cardano-sdk/cardano-services-client';
import { RemoteApiProperties, RemoteApiPropertyType } from '@cardano-sdk/web-extension';

Expand Down Expand Up @@ -107,6 +108,7 @@ export const createProviders = ({
const rewardsProvider = rewardsHttpProvider(httpProviderConfig);
const stakePoolProvider = stakePoolHttpProvider(httpProviderConfig);
const txSubmitProvider = createTxSubmitProvider(httpProviderConfig, customSubmitTxUrl);
const drepProvider = new BlockfrostDRepProvider(blockfrostClient, logger);

if (useWebSocket) {
const url = new URL(baseUrl);
Expand All @@ -128,7 +130,8 @@ export const createProviders = ({
utxoProvider: wsProvider.utxoProvider,
chainHistoryProvider: wsProvider.chainHistoryProvider,
rewardsProvider,
wsProvider
wsProvider,
drepProvider
};
}

Expand All @@ -139,7 +142,8 @@ export const createProviders = ({
stakePoolProvider,
utxoProvider: utxoHttpProvider(httpProviderConfig),
chainHistoryProvider,
rewardsProvider
rewardsProvider,
drepProvider
};
};

Expand Down Expand Up @@ -182,5 +186,10 @@ export const walletProvidersProperties: RemoteApiProperties<WalletProvidersDepen
transactionsByHashes: RemoteApiPropertyType.MethodReturningPromise,
blocksByHashes: RemoteApiPropertyType.MethodReturningPromise,
healthCheck: RemoteApiPropertyType.MethodReturningPromise
},
drepProvider: {
getDRepInfo: RemoteApiPropertyType.MethodReturningPromise,
getDRepsInfo: RemoteApiPropertyType.MethodReturningPromise,
healthCheck: RemoteApiPropertyType.MethodReturningPromise
}
};
15 changes: 15 additions & 0 deletions packages/cardano/src/wallet/test/mocks/DRepProviderStub.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { DRepProvider, DRepInfo, Cardano } from '@cardano-sdk/core';

const mockDRepInfo: DRepInfo = {
id: Cardano.DRepID('drep1vpzcgfrlgdh4fft0p0ju70czkxxkuknw0jjztl3x7aqgm9q3hqyaz'),
amount: BigInt(0),
active: true,
activeEpoch: Cardano.EpochNo(1),
hasScript: false
};

export const dRepProviderStub = (): DRepProvider => ({
getDRepInfo: jest.fn().mockResolvedValue(mockDRepInfo),
getDRepsInfo: jest.fn().mockResolvedValue([mockDRepInfo]),
healthCheck: jest.fn().mockResolvedValue({ ok: true })
});
3 changes: 3 additions & 0 deletions packages/cardano/src/wallet/test/mocks/mock-wallet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import { TxSubmitProviderFake } from '@wallet/test/mocks/TxSubmitProviderFake';
import { utxoProviderStub } from './UtxoProviderStub';
import { chainHistoryProviderStub } from './ChainHistoryProviderStub';
import { rewardsHistoryProviderStub } from './RewardsProviderStub';
import { dRepProviderStub } from './DRepProviderStub';
import { of } from 'rxjs';

const logger = console;
Expand Down Expand Up @@ -43,6 +44,7 @@ export const mockWallet = async (customKeyAgent?: KeyManagement.InMemoryKeyAgent
const utxoProvider = utxoProviderStub();
const chainHistoryProvider = chainHistoryProviderStub();
const rewardsProvider = rewardsHistoryProviderStub();
const drepProvider = dRepProviderStub();
const asyncKeyAgent = KeyManagement.util.createAsyncKeyAgent(keyAgent);
const wallet = createPersonalWallet(
{ name },
Expand All @@ -55,6 +57,7 @@ export const mockWallet = async (customKeyAgent?: KeyManagement.InMemoryKeyAgent
rewardsProvider,
chainHistoryProvider,
utxoProvider,
drepProvider,
logger,
witnesser: KeyManagement.util.createBip32Ed25519Witnesser(asyncKeyAgent),
bip32Account: new KeyManagement.Bip32Account(keyAgent)
Expand Down
4 changes: 2 additions & 2 deletions packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@
},
"dependencies": {
"@ant-design/icons": "^4.7.0",
"@cardano-sdk/wallet": "0.44.22",
"@cardano-sdk/web-extension": "0.34.21",
"@cardano-sdk/wallet": "0.46.0",
"@cardano-sdk/web-extension": "0.34.24",
"@input-output-hk/lace-ui-toolkit": "1.19.0",
"@lace/cardano": "0.1.0",
"@lace/common": "0.1.0",
Expand Down
8 changes: 4 additions & 4 deletions packages/nami/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,11 @@
"dependencies": {
"@biglup/is-cid": "^1.0.3",
"@cardano-foundation/ledgerjs-hw-app-cardano": "^6.0.0",
"@cardano-sdk/core": "0.41.4",
"@cardano-sdk/crypto": "0.1.31",
"@cardano-sdk/tx-construction": "0.21.13",
"@cardano-sdk/core": "0.42.1",
"@cardano-sdk/crypto": "0.1.32",
"@cardano-sdk/tx-construction": "0.23.0",
"@cardano-sdk/util": "0.15.5",
"@cardano-sdk/web-extension": "0.34.21",
"@cardano-sdk/web-extension": "0.34.24",
"@chakra-ui/css-reset": "1.0.0",
"@chakra-ui/icons": "1.0.13",
"@chakra-ui/react": "1.6.4",
Expand Down
18 changes: 9 additions & 9 deletions packages/staking/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,12 @@
},
"devDependencies": {
"@babel/core": "^7.21.0",
"@cardano-sdk/core": "0.41.4",
"@cardano-sdk/input-selection": "0.13.28",
"@cardano-sdk/tx-construction": "0.21.13",
"@cardano-sdk/core": "0.42.1",
"@cardano-sdk/input-selection": "0.13.31",
"@cardano-sdk/tx-construction": "0.23.0",
"@cardano-sdk/util": "0.15.5",
"@cardano-sdk/wallet": "0.44.22",
"@cardano-sdk/web-extension": "0.34.21",
"@cardano-sdk/wallet": "0.46.0",
"@cardano-sdk/web-extension": "0.34.24",
"@storybook/addon-actions": "^7.6.7",
"@storybook/addon-essentials": "^7.6.7",
"@storybook/addon-interactions": "^7.6.7",
Expand Down Expand Up @@ -126,11 +126,11 @@
"wait-on": "^7.0.1"
},
"peerDependencies": {
"@cardano-sdk/input-selection": "0.13.28",
"@cardano-sdk/tx-construction": "0.21.13",
"@cardano-sdk/input-selection": "0.13.31",
"@cardano-sdk/tx-construction": "0.23.0",
"@cardano-sdk/util": "0.15.5",
"@cardano-sdk/wallet": "0.44.22",
"@cardano-sdk/web-extension": "0.34.21",
"@cardano-sdk/wallet": "0.46.0",
"@cardano-sdk/web-extension": "0.34.24",
"@lace/cardano": "^0.1.0",
"@lace/common": "^0.1.0",
"@lace/core": "0.1.0",
Expand Down
Loading

0 comments on commit 0f850ea

Please sign in to comment.