-
Notifications
You must be signed in to change notification settings - Fork 495
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3760 from NotEternal/tsIgnoreGetBalance
TypeScript @ts-ignore: getBalance
- Loading branch information
Showing
9 changed files
with
60 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
export interface ICoin { | ||
ticker: string | ||
name: string | ||
precision: number | ||
networks: { [key: string]: string } | ||
} | ||
|
||
export interface ILibAdapter { | ||
accountFromMnemonic(mnemonic: string, netName: string): { | ||
privateKey: string | ||
publicKey: string | ||
address: string | ||
} | ||
createTx?({ netName, account, amount, to }): Promise<string> // not sure what the <string> | ||
} | ||
|
||
export interface IConnector { | ||
getApiUrl(netwType: string): string | ||
getTxUrl(netType: string, txId: string): string | ||
fetchBalance(networkType: string, address: string): Promise<number> | ||
|
||
fetchUnspents?(netType: string, addr: string): Promise<JSON> | ||
fetchTx?(txid: string): Promise<void> // this method is empty now | ||
fetchRawTx?(txid: string): Promise<void> // this method is empty now | ||
publishRawTx?(netType: string, rawTx: string): Promise<JSON> | ||
publishTx?(networkType: string, rawTx: string): Promise<JSON> | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters