@cardano-ogmios/client
Advanced tools
Comparing version 6.0.0 to 6.0.1
@@ -93,5 +93,10 @@ "use strict"; | ||
return new Promise((resolve, reject) => { | ||
function onUnexpectedClose(code, reason) { | ||
reject(new JSONRPCError(-32000, 'Connection closed', { code, reason })); | ||
} | ||
socket.once('close', onUnexpectedClose); | ||
send(socket) | ||
.then(resolve) | ||
.catch(error => reject(JSONRPCError.tryFrom(error) || error)); | ||
.catch(error => reject(JSONRPCError.tryFrom(error) || error)) | ||
.finally(() => socket.removeListener('close', onUnexpectedClose)); | ||
}); | ||
@@ -98,0 +103,0 @@ }; |
import { InteractionContext } from '../Connection'; | ||
import { epoch, eraStart, eraSummaries, ledgerTip, liveStakeDistribution, networkBlockHeight, networkStartTime, networkTip, projectedRewards, proposedProtocolParameters, protocolParameters, rewardAccountSummaries, rewardsProvenance, stakePools, utxo } from './query'; | ||
import { Ogmios, AcquireLedgerStateSuccess, AnyStakeCredential, GenesisAlonzo, GenesisByron, GenesisShelley, Lovelace, Origin, Point, UtxoByAddresses, UtxoByOutputReferences } from '@cardano-ogmios/schema'; | ||
import { Ogmios, AcquireLedgerStateSuccess, AnyStakeCredential, GenesisAlonzo, GenesisByron, GenesisShelley, Origin, Point, UtxoByAddresses, UtxoByOutputReferences, ValueAdaOnly } from '@cardano-ogmios/schema'; | ||
export interface LedgerStateQueryClient { | ||
@@ -21,3 +21,3 @@ context: InteractionContext; | ||
projectedRewards(filter: { | ||
stake?: Lovelace[]; | ||
stake?: ValueAdaOnly[]; | ||
scripts?: AnyStakeCredential[]; | ||
@@ -24,0 +24,0 @@ keys?: AnyStakeCredential[]; |
import { InteractionContext } from '../../Connection'; | ||
import { AnyStakeCredential, Lovelace, ProjectedRewards } from '@cardano-ogmios/schema'; | ||
import { AnyStakeCredential, ProjectedRewards, ValueAdaOnly } from '@cardano-ogmios/schema'; | ||
export declare function projectedRewards(context: InteractionContext, params?: { | ||
stake?: Lovelace[]; | ||
stake?: ValueAdaOnly[]; | ||
scripts?: AnyStakeCredential[]; | ||
@@ -6,0 +6,0 @@ keys?: AnyStakeCredential[]; |
@@ -63,3 +63,12 @@ "use strict"; | ||
parse(raw) { | ||
return this.sanitize(this.$.parse(raw)); | ||
try { | ||
return this.sanitize(this.$.parse(raw)); | ||
} | ||
catch (e) { | ||
if (e.name === 'SyntaxError' && typeof e.message === 'string' && e.message.includes('forbidden constructor')) { | ||
const escaped = raw.replace(/"constructor"/g, '"constr"'); | ||
return this.sanitize(this.$.parse(escaped)); | ||
} | ||
throw e; | ||
} | ||
}, | ||
@@ -66,0 +75,0 @@ stringify(...args) { |
{ | ||
"name": "@cardano-ogmios/client", | ||
"version": "6.0.0", | ||
"version": "6.0.1", | ||
"description": "TypeScript client library for Cardano Ogmios", | ||
@@ -50,3 +50,3 @@ "engines": { | ||
"dependencies": { | ||
"@cardano-ogmios/schema": "6.0.0", | ||
"@cardano-ogmios/schema": "6.0.1", | ||
"@cardanosolutions/json-bigint": "^1.0.1", | ||
@@ -53,0 +53,0 @@ "@types/json-bigint": "^1.0.1", |
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
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
Deprecated
MaintenanceThe maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
185394
1899
0
0
+ Added@cardano-ogmios/schema@6.0.1(transitive)
- Removed@cardano-ogmios/schema@6.0.0(transitive)
Updated@cardano-ogmios/schema@6.0.1