@cardano-sdk/cardano-graphql-db-sync
Advanced tools
Comparing version 0.1.8 to 0.2.0
@@ -5,5 +5,5 @@ "use strict"; | ||
const buffer_1 = require("buffer"); | ||
const core_1 = require("@cardano-sdk/core"); | ||
const CardanoGraphqlToCore_1 = require("./CardanoGraphqlToCore"); | ||
const graphql_request_1 = require("graphql-request"); | ||
const core_1 = require("@cardano-sdk/core"); | ||
const cardanoGraphqlDbSyncProvider = (uri) => { | ||
@@ -10,0 +10,0 @@ const client = new graphql_request_1.GraphQLClient(uri); |
import { Block } from '@cardano-graphql/client-ts'; | ||
import { Cardano, ProtocolParametersRequiredByWallet } from '@cardano-sdk/core'; | ||
declare type GraphqlTransaction = { | ||
hash: Cardano.Hash16; | ||
hash: Cardano.TransactionId; | ||
inputs: { | ||
txHash: Cardano.Hash16; | ||
txHash: string; | ||
sourceTxIndex: number; | ||
address: Cardano.Address; | ||
address: string; | ||
}[]; | ||
outputs: { | ||
address: Cardano.Address; | ||
address: string; | ||
value: string; | ||
@@ -38,12 +38,12 @@ tokens: { | ||
export declare type CardanoGraphqlTxIn = { | ||
txHash: Cardano.Hash16; | ||
txHash: string; | ||
sourceTxIndex: number; | ||
address: Cardano.Address; | ||
address: string; | ||
}; | ||
export declare type TransactionsResponse = { | ||
transactions: { | ||
hash: Cardano.Hash16; | ||
hash: string; | ||
inputs: CardanoGraphqlTxIn[]; | ||
outputs: { | ||
address: Cardano.Address; | ||
address: string; | ||
value: string; | ||
@@ -67,5 +67,3 @@ tokens: { | ||
value: { | ||
assets: { | ||
[k: string]: bigint; | ||
}; | ||
assets: Cardano.TokenMap; | ||
coins: bigint; | ||
@@ -72,0 +70,0 @@ }; |
@@ -6,10 +6,10 @@ "use strict"; | ||
const txIn = ({ sourceTxIndex, txHash, address }) => ({ | ||
address, | ||
address: core_1.Cardano.Address(address), | ||
index: sourceTxIndex, | ||
txId: txHash | ||
txId: core_1.Cardano.TransactionId(txHash) | ||
}); | ||
const txOut = ({ address, tokens, value }) => { | ||
const assets = {}; | ||
const assets = new Map(); | ||
for (const token of tokens) | ||
assets[token.asset.assetId] = BigInt(token.quantity); | ||
assets.set(core_1.Cardano.AssetId(token.asset.assetId), BigInt(token.quantity)); | ||
return { address, value: { assets, coins: BigInt(value) } }; | ||
@@ -16,0 +16,0 @@ }; |
{ | ||
"name": "@cardano-sdk/cardano-graphql-db-sync", | ||
"version": "0.1.8", | ||
"version": "0.2.0", | ||
"description": "Cardano Graphql (cardano-db-sync) integration", | ||
@@ -5,0 +5,0 @@ "engines": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
32872
378