Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@cardano-sdk/cardano-graphql-db-sync

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cardano-sdk/cardano-graphql-db-sync - npm Package Compare versions

Comparing version 0.1.8 to 0.2.0

2

dist/cardanoGraphqlDbSyncProvider.js

@@ -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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc