Skip to content
This repository has been archived by the owner on Jun 3, 2022. It is now read-only.

Commit

Permalink
add vout.script.hex for transaction.vin.ts (#437)
Browse files Browse the repository at this point in the history
  • Loading branch information
fuxingloh authored Oct 4, 2021
1 parent c2ac70c commit 4a7956c
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 4 deletions.
8 changes: 6 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions packages/whale-api-client/src/api/transactions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,9 @@ export interface TransactionVin {
n: number
value: string
tokenId?: number
script: {
hex: string
}
}
script?: {
hex: string
Expand Down
7 changes: 5 additions & 2 deletions src/module.indexer/model/transaction.vin.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Injectable } from '@nestjs/common'
import { Indexer, defid, RawBlock } from '@src/module.indexer/model/_abstract'
import { defid, Indexer, RawBlock } from '@src/module.indexer/model/_abstract'
import { TransactionVin, TransactionVinMapper } from '@src/module.model/transaction.vin'
import { TransactionVout } from '@src/module.model/transaction.vout'
import { HexEncoder } from '@src/module.model/_hex.encoder'
Expand Down Expand Up @@ -49,7 +49,10 @@ export class TransactionVinIndexer extends Indexer {
txid: vout.txid,
n: vout.n,
value: vout.value,
tokenId: vout.tokenId
tokenId: vout.tokenId,
script: {
hex: vout.script.hex
}
} : undefined,
script: vin.scriptSig !== undefined ? {
hex: vin.scriptSig.hex
Expand Down
3 changes: 3 additions & 0 deletions src/module.model/transaction.vin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@ export interface TransactionVin extends Model {
n: number
value: string
tokenId?: number
script: {
hex: string
}
}

script?: {
Expand Down

0 comments on commit 4a7956c

Please sign in to comment.