-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add WalletProvider.transactionDetails, add address to TxIn
- Loading branch information
1 parent
1d86393
commit 889a39b
Showing
17 changed files
with
458 additions
and
68 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import { Responses } from '@blockfrost/blockfrost-js'; | ||
import { Cardano } from '@cardano-sdk/core'; | ||
import { BlockfrostToOgmios } from './BlockfrostToOgmios'; | ||
|
||
export const BlockfrostToCore = { | ||
addressUtxoContent: (address: string, blockfrost: Responses['address_utxo_content']): Cardano.Utxo[] => | ||
blockfrost.map((utxo) => [ | ||
{ ...BlockfrostToOgmios.txIn(BlockfrostToOgmios.inputFromUtxo(address, utxo)), address }, | ||
BlockfrostToOgmios.txOut(BlockfrostToOgmios.outputFromUtxo(address, utxo)) | ||
]), | ||
transaction: (tx: Responses['tx_content_utxo']) => ({ | ||
inputs: tx.inputs.map((input) => ({ | ||
...BlockfrostToOgmios.txIn(input), | ||
address: input.address | ||
})), | ||
outputs: tx.outputs.map(BlockfrostToOgmios.txOut), | ||
hash: tx.hash | ||
}) | ||
}; |
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
Oops, something went wrong.