Skip to content

Commit 31c091c

Browse files
committed
feat(sdk-coin-oas): add oas sdk skeleton
Ticket: WIN-3696
1 parent 5489013 commit 31c091c

File tree

2 files changed

+22
-8
lines changed

2 files changed

+22
-8
lines changed

modules/sdk-coin-oas/src/lib/transactionBuilder.ts

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
import { BaseCoin as CoinConfig } from '@bitgo/statics';
22
import { BuildTransactionError, TransactionType } from '@bitgo/sdk-core';
3-
import { KeyPair, Transaction, TransactionBuilder as EthLikeTransactionBuilder } from '@bitgo/abstract-eth';
4-
5-
import { TransferBuilder } from './transferBuilder';
3+
import { TransactionBuilder as AbstractTransactionBuilder, Transaction } from '@bitgo/abstract-eth';
64
import { getCommon } from './utils';
5+
import { TransferBuilder } from './transferBuilder';
76

8-
export class TransactionBuilder extends EthLikeTransactionBuilder {
9-
protected _transfer!: TransferBuilder;
7+
export class TransactionBuilder extends AbstractTransactionBuilder {
8+
protected _transfer: TransferBuilder;
109

1110
constructor(_coinConfig: Readonly<CoinConfig>) {
1211
super(_coinConfig);
@@ -25,7 +24,7 @@ export class TransactionBuilder extends EthLikeTransactionBuilder {
2524
return this._transfer;
2625
}
2726

28-
publicKey(key: string): void {
29-
this._sourceKeyPair = new KeyPair({ pub: key });
27+
protected getContractData(addresses: string[]): string {
28+
throw new Error('Method not implemented.');
3029
}
3130
}

modules/sdk-coin-oas/src/oas.ts

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
22
* @prettier
33
*/
4-
import { BaseCoin, BitGoBase, common } from '@bitgo/sdk-core';
4+
import { BaseCoin, BitGoBase, common, MPCAlgorithm } from '@bitgo/sdk-core';
55
import { BaseCoin as StaticsBaseCoin, coins } from '@bitgo/statics';
66
import {
77
AbstractEthLikeNewCoins,
@@ -23,6 +23,21 @@ export class Oas extends AbstractEthLikeNewCoins {
2323
return new TransactionBuilder(coins.get(this.getBaseChain()));
2424
}
2525

26+
/** @inheritDoc */
27+
allowsAccountConsolidations(): boolean {
28+
return true;
29+
}
30+
31+
/** @inheritDoc */
32+
supportsTss(): boolean {
33+
return true;
34+
}
35+
36+
/** @inheritDoc */
37+
getMPCAlgorithm(): MPCAlgorithm {
38+
return 'ecdsa';
39+
}
40+
2641
/**
2742
* Make a query to Berachain explorer for information such as balance, token balance, solidity calls
2843
* @param {Object} query key-value pairs of parameters to append after /api

0 commit comments

Comments
 (0)