|
| 1 | +import { BaseCoin, BitGoBase } from '@bitgo/sdk-core'; |
| 2 | +import { BaseCoin as StaticsBaseCoin } from '@bitgo/statics'; |
| 3 | +import { CosmosCoin, CosmosKeyPair, GasAmountDetails } from '@bitgo/abstract-cosmos'; |
| 4 | +import { TransactionBuilderFactory } from './lib'; |
| 5 | + |
| 6 | +export class Fetch extends CosmosCoin { |
| 7 | + protected readonly _staticsCoin: Readonly<StaticsBaseCoin>; |
| 8 | + |
| 9 | + protected constructor(bitgo: BitGoBase, staticsCoin?: Readonly<StaticsBaseCoin>) { |
| 10 | + super(bitgo, staticsCoin); |
| 11 | + |
| 12 | + if (!staticsCoin) { |
| 13 | + throw new Error('missing required constructor parameter staticsCoin'); |
| 14 | + } |
| 15 | + |
| 16 | + this._staticsCoin = staticsCoin; |
| 17 | + } |
| 18 | + |
| 19 | + static createInstance(bitgo: BitGoBase, staticsCoin?: Readonly<StaticsBaseCoin>): BaseCoin { |
| 20 | + return new Fetch(bitgo, staticsCoin); |
| 21 | + } |
| 22 | + |
| 23 | + /** @inheritDoc **/ |
| 24 | + getBaseFactor(): number { |
| 25 | + return Math.pow(10, this._staticsCoin.decimalPlaces); |
| 26 | + } |
| 27 | + |
| 28 | + /** @inheritDoc **/ |
| 29 | + getBuilder(): TransactionBuilderFactory { |
| 30 | + throw new Error('Method not implemented.'); |
| 31 | + } |
| 32 | + |
| 33 | + /** @inheritDoc **/ |
| 34 | + isValidAddress(address: string): boolean { |
| 35 | + throw new Error('Method not implemented.'); |
| 36 | + } |
| 37 | + |
| 38 | + /** @inheritDoc **/ |
| 39 | + getDenomination(): string { |
| 40 | + throw new Error('Method not implemented'); |
| 41 | + } |
| 42 | + |
| 43 | + /** @inheritDoc **/ |
| 44 | + getGasAmountDetails(): GasAmountDetails { |
| 45 | + throw new Error('Method not implemented'); |
| 46 | + } |
| 47 | + |
| 48 | + /** @inheritDoc **/ |
| 49 | + getKeyPair(publicKey: string): CosmosKeyPair { |
| 50 | + throw new Error('Method not implemented'); |
| 51 | + } |
| 52 | + |
| 53 | + /** @inheritDoc **/ |
| 54 | + protected getPublicNodeUrl(): string { |
| 55 | + throw new Error('Method not implemented'); |
| 56 | + } |
| 57 | + |
| 58 | + /** @inheritDoc **/ |
| 59 | + getAddressFromPublicKey(pubKey: string): string { |
| 60 | + throw new Error('Method not implemented'); |
| 61 | + } |
| 62 | +} |
0 commit comments