Skip to content

Commit

Permalink
feat(sui): create broadcastable MPC transaction
Browse files Browse the repository at this point in the history
Ticket: WIN-3293

feat(sui): non-bitgo recovery for hot wallets

WIN-3274

feat(sui): non-bitgo recovery for hot wallets

WIN-3274
  • Loading branch information
bhavidhingra committed Aug 21, 2024
1 parent adf2ff0 commit 7510a7b
Show file tree
Hide file tree
Showing 7 changed files with 4,222 additions and 8,055 deletions.
8 changes: 6 additions & 2 deletions electron/main/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -423,14 +423,18 @@ async function createWindow() {
case 'dot':
case 'tdot':
case 'sol':
case 'tsol': {
case 'tsol':
case 'sui':
case 'tsui': {
const coinInstance = sdk.coin(coin) as
| Ada
| Tada
| Dot
| Tdot
| Sol
| Tsol;
| Tsol
| Sui
| Tsui;
return coinInstance.createBroadcastableSweepTransaction(parameters);
}
default:
Expand Down
2 changes: 2 additions & 0 deletions electron/preload/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import {
createAdaBroadcastableSweepTransactionParameters,
createDotBroadcastableSweepTransactionParameters,
createSolBroadcastableSweepTransactionParameters,
createSuiBroadcastableSweepTransactionParameters,
DotRecoverConsolidationRecoveryBatch,
DotRecoveryConsolidationRecoveryOptions,
SolRecoverConsolidationRecoveryBatch,
Expand All @@ -50,6 +51,7 @@ type Commands = {
| createAdaBroadcastableSweepTransactionParameters
| createDotBroadcastableSweepTransactionParameters
| createSolBroadcastableSweepTransactionParameters
| createSuiBroadcastableSweepTransactionParameters
): Promise<Error | BroadcastableSweepTransaction>;
unlock(otp: string);
sweepV1(coin: string, parameters: V1SweepParams): ReturnType<typeof v1Sweep>;
Expand Down
5 changes: 5 additions & 0 deletions electron/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ export type createDotBroadcastableSweepTransactionParameters =
export type createSolBroadcastableSweepTransactionParameters =
| Parameters<Sol['createBroadcastableSweepTransaction']>[0]
| Parameters<Tsol['createBroadcastableSweepTransaction']>[0];
export type createSuiBroadcastableSweepTransactionParameters =
| Parameters<Sui['createBroadcastableSweepTransaction']>[0]
| Parameters<Tsui['createBroadcastableSweepTransaction']>[0];

export type BroadcastableSweepTransaction = Awaited<
ReturnType<
Expand All @@ -27,6 +30,8 @@ export type BroadcastableSweepTransaction = Awaited<
| Tdot['createBroadcastableSweepTransaction']
| Sol['createBroadcastableSweepTransaction']
| Tsol['createBroadcastableSweepTransaction']
| Sui['createBroadcastableSweepTransaction']
| Tsui['createBroadcastableSweepTransaction']
>
>;

Expand Down
Loading

0 comments on commit 7510a7b

Please sign in to comment.