-
Notifications
You must be signed in to change notification settings - Fork 0
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 #15 from CityOfZion/CU-86a0dn0k3
CU-86a0dn0k3 - Ethereum Support Implementation
- Loading branch information
Showing
54 changed files
with
2,269 additions
and
790 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,13 +1,17 @@ | ||
import { BlockchainService, CalculableFee, Claimable, NeoNameService } from './interfaces' | ||
import { BlockchainService, BSCalculableFee, BSClaimable, BSWithNameService, BSWithNft } from './interfaces' | ||
|
||
export function hasNNS(service: BlockchainService): service is NeoNameService & BlockchainService { | ||
export function hasNameService(service: BlockchainService): service is BSWithNameService & BlockchainService { | ||
return 'getNNSRecord' in service && 'getOwnerOfNNS' in service && 'validateNNSFormat' in service | ||
} | ||
|
||
export function isClaimable(service: BlockchainService): service is Claimable & BlockchainService { | ||
return 'claim' in service && 'tokenClaim' in service && 'getUnclaimed' in service.dataService | ||
export function isClaimable(service: BlockchainService): service is BSClaimable & BlockchainService { | ||
return 'claim' in service && 'claimToken' in service && 'getUnclaimed' in service.blockchainDataService | ||
} | ||
|
||
export function isCalculableFee(service: BlockchainService): service is CalculableFee & BlockchainService { | ||
export function isCalculableFee(service: BlockchainService): service is BSCalculableFee & BlockchainService { | ||
return 'calculateTransferFee' in service | ||
} | ||
|
||
export function hasNft(service: BlockchainService): service is BSWithNft & BlockchainService { | ||
return 'nftDataService' in service | ||
} |
Oops, something went wrong.