Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(sdk-core): add tss coins method to BaseCoin class #4648

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 1 addition & 9 deletions modules/sdk-coin-ada/src/ada.ts
Original file line number Diff line number Diff line change
Expand Up @@ -275,15 +275,7 @@ export class Ada extends BaseCoin {
return body;
}

/**
* Creates funds sweep recovery transaction(s) without BitGo
*
* @param {MPCSweepRecoveryOptions} params parameters needed to combine the signatures
* and transactions to create broadcastable transactions
*
* @returns {MPCTxs} array of the serialized transaction hex strings and indices
* of the addresses being swept
*/
/** inherited doc */
async createBroadcastableSweepTransaction(params: MPCSweepRecoveryOptions): Promise<MPCTxs> {
const req = params.signatureShares;
const broadcastableTransactions: MPCTx[] = [];
Expand Down
10 changes: 1 addition & 9 deletions modules/sdk-coin-dot/src/dot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -563,15 +563,7 @@ export class Dot extends BaseCoin {
return { transactions: consolidationTransactions, lastScanIndex };
}

/**
* Creates funds sweep recovery transaction(s) without BitGo
*
* @param {MPCSweepRecoveryOptions} params parameters needed to combine the signatures
* and transactions to create broadcastable transactions
*
* @returns {MPCTx[]} array of the serialized transaction hex strings and indices
* of the addresses being swept
*/
/** inherited doc */
async createBroadcastableSweepTransaction(params: MPCSweepRecoveryOptions): Promise<MPCTxs> {
const req = params.signatureShares;
const broadcastableTransactions: MPCTx[] = [];
Expand Down
10 changes: 1 addition & 9 deletions modules/sdk-coin-sol/src/sol.ts
Original file line number Diff line number Diff line change
Expand Up @@ -653,15 +653,7 @@ export class Sol extends BaseCoin {
return [];
}

/**
* Creates funds sweep recovery transaction(s) without BitGo
*
* @param {SweepRecoveryOptions} params parameters needed to combine the signatures
* and transactions to create broadcastable transactions
*
* @returns {MPCTxs} array of the serialized transaction hex strings and indices
* of the addresses being swept
*/
/** inherited doc */
async createBroadcastableSweepTransaction(params: MPCSweepRecoveryOptions): Promise<MPCTxs> {
if (!params.signatureShares) {
('Missing transaction(s)');
Expand Down
14 changes: 14 additions & 0 deletions modules/sdk-core/src/bitgo/baseCoin/baseCoin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ import {
} from './iBaseCoin';
import { IInscriptionBuilder } from '../inscriptionBuilder';
import { Hash } from 'crypto';
import { MPCSweepRecoveryOptions, MPCTxs } from '../utils';

export abstract class BaseCoin implements IBaseCoin {
protected readonly bitgo: BitGoBase;
Expand Down Expand Up @@ -537,4 +538,17 @@ export abstract class BaseCoin implements IBaseCoin {
broadcastTransaction(params: BaseBroadcastTransactionOptions): Promise<BaseBroadcastTransactionResult> {
throw new NotImplementedError('broadcastTransaction is not supported for this coin');
}

/**
* Creates funds sweep recovery transaction(s) without BitGo
*
* @param {MPCSweepRecoveryOptions} params parameters needed to combine the signatures
* and transactions to create broadcastable transactions
*
* @returns {MPCTxs} array of the serialized transaction hex strings and indices
* of the addresses being swept
*/
async createBroadcastableSweepTransaction(params: MPCSweepRecoveryOptions): Promise<MPCTxs> {
throw new NotImplementedError('createBroadcastableSweepTransaction is not supported for this coin');
}
}
Loading