Skip to content

Commit

Permalink
feat(WRW): add PSBT support for backup key recovery
Browse files Browse the repository at this point in the history
PSBT transaction support for UTXO coins is added.
Legacy format for keyternal KRS and OVC unsigned sweep cases.
PSBT format for other cases.

Ticket: BG-79840
  • Loading branch information
saravanan7mani committed Aug 7, 2023
1 parent 4a87f31 commit 5f7b47c
Show file tree
Hide file tree
Showing 6 changed files with 38,655 additions and 1,198 deletions.
50 changes: 25 additions & 25 deletions electron/main/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,38 +5,38 @@ process.env.PUBLIC = app.isPackaged
: join(process.env.DIST_ELECTRON, '../public');

/* eslint-disable @typescript-eslint/unbound-method */
import { AbstractUtxoCoin } from '@bitgo/abstract-utxo';
import { BitGoAPI } from '@bitgo/sdk-api';
import { Ada, Tada } from '@bitgo/sdk-coin-ada';
import { AbstractUtxoCoin } from '@bitgo-beta/abstract-utxo';
import { BitGoAPI } from '@bitgo-beta/sdk-api';
import { Ada, Tada } from '@bitgo-beta/sdk-coin-ada';
import { Atom, Tatom } from '@bitgo-beta/sdk-coin-atom';
import { Osmo, Tosmo } from '@bitgo/sdk-coin-osmo';
import { AvaxC, TavaxC } from '@bitgo/sdk-coin-avaxc';
import { Bch } from '@bitgo/sdk-coin-bch';
import { Bcha } from '@bitgo/sdk-coin-bcha';
import { Bsv } from '@bitgo/sdk-coin-bsv';
import { Btc, Tbtc } from '@bitgo/sdk-coin-btc';
import { Btg } from '@bitgo/sdk-coin-btg';
import { Dash } from '@bitgo/sdk-coin-dash';
import { Doge, Tdoge } from '@bitgo/sdk-coin-doge';
import { Dot, Tdot } from '@bitgo/sdk-coin-dot';
import { Eos, Teos } from '@bitgo/sdk-coin-eos';
import { Erc20Token, Eth, Gteth } from '@bitgo/sdk-coin-eth';
import { Ethw } from '@bitgo/sdk-coin-ethw';
import { Ltc } from '@bitgo/sdk-coin-ltc';
import { Near, TNear } from '@bitgo/sdk-coin-near';
import { Polygon, Tpolygon } from '@bitgo/sdk-coin-polygon';
import { Trx, Ttrx } from '@bitgo/sdk-coin-trx';
import { Txlm, Xlm } from '@bitgo/sdk-coin-xlm';
import { Txrp, Xrp } from '@bitgo/sdk-coin-xrp';
import { Sol, Tsol } from '@bitgo/sdk-coin-sol';
import { Zec } from '@bitgo/sdk-coin-zec';
import { Osmo, Tosmo } from '@bitgo-beta/sdk-coin-osmo';
import { AvaxC, TavaxC } from '@bitgo-beta/sdk-coin-avaxc';
import { Bch } from '@bitgo-beta/sdk-coin-bch';
import { Bcha } from '@bitgo-beta/sdk-coin-bcha';
import { Bsv } from '@bitgo-beta/sdk-coin-bsv';
import { Btc, Tbtc } from '@bitgo-beta/sdk-coin-btc';
import { Btg } from '@bitgo-beta/sdk-coin-btg';
import { Dash } from '@bitgo-beta/sdk-coin-dash';
import { Doge, Tdoge } from '@bitgo-beta/sdk-coin-doge';
import { Dot, Tdot } from '@bitgo-beta/sdk-coin-dot';
import { Eos, Teos } from '@bitgo-beta/sdk-coin-eos';
import { Erc20Token, Eth, Gteth } from '@bitgo-beta/sdk-coin-eth';
import { Ethw } from '@bitgo-beta/sdk-coin-ethw';
import { Ltc } from '@bitgo-beta/sdk-coin-ltc';
import { Near, TNear } from '@bitgo-beta/sdk-coin-near';
import { Polygon, Tpolygon } from '@bitgo-beta/sdk-coin-polygon';
import { Trx, Ttrx } from '@bitgo-beta/sdk-coin-trx';
import { Txlm, Xlm } from '@bitgo-beta/sdk-coin-xlm';
import { Txrp, Xrp } from '@bitgo-beta/sdk-coin-xrp';
import { Sol, Tsol } from '@bitgo-beta/sdk-coin-sol';
import { Zec } from '@bitgo-beta/sdk-coin-zec';
import * as ecc from 'tiny-secp256k1';
import BIP32Factory from 'bip32';
import { app, BrowserWindow, dialog, ipcMain, shell } from 'electron';
import fs from 'node:fs/promises';
import { release } from 'os';
import { join } from 'path';
import { BaseCoin } from '@bitgo/sdk-core';
import { BaseCoin } from '@bitgo-beta/sdk-core';
import assert from 'assert';

const bip32 = BIP32Factory(ecc);
Expand Down
2 changes: 1 addition & 1 deletion electron/preload/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import type {
FormattedOfflineVaultTxInfo,
RecoverFromWrongChainOptions,
RecoverParams,
} from '@bitgo/abstract-utxo';
} from '@bitgo-beta/abstract-utxo';
import type { Chain, Hardfork } from '@ethereumjs/common';
import { contextBridge, ipcRenderer } from 'electron';
import type { ObjectEncodingOptions } from 'node:fs';
Expand Down
Loading

0 comments on commit 5f7b47c

Please sign in to comment.