Skip to content

Commit

Permalink
params fix
Browse files Browse the repository at this point in the history
  • Loading branch information
micahkendall committed Apr 14, 2024
1 parent 76106b8 commit 86967a3
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion tests/params.ts → packages/translucent-core/params.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { CostModels, ExUnits, Prices, ProtocolVersion } from "@cardano-sdk/core/dist/cjs/Cardano";

interface ProtocolParameters {
export interface ProtocolParameters {
coinsPerUtxoByte: number,
maxTxSize: number,
minFeeCoefficient: number;
Expand Down
1 change: 1 addition & 0 deletions packages/translucent-core/types.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import * as C from './core'
import * as Crypto from './crypto'
export { ProtocolParameters } from "./params"

export const Value = C.Serialization.Value
export type Value = C.Serialization.Value
Expand Down
5 changes: 4 additions & 1 deletion packages/translucent-query/maestro.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import {
Transaction,
TransactionOutput,
HexBlob,
ProtocolParameters
} from '../translucent-core'
import { Provider } from './types'

Expand All @@ -25,7 +26,9 @@ export class Maestro implements Provider {
return { "api-key": this.apiKey };
}

getParameters(): Promise<typeof TxParams> {}
getParameters(): Promise<ProtocolParameters> {
throw new Error("unimplemented")
}

getUnspentOutputs(address: Address): Promise<TransactionUnspentOutput[]> {
/* todo: paginate */
Expand Down
6 changes: 3 additions & 3 deletions packages/translucent-query/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import {
PlutusData,
TransactionId,
Transaction,
ProtocolParameters
} from '../translucent-core'
import { TxParams } from '../translucent-tx/tx'

/**
* Interface for the Provider class.
Expand All @@ -17,9 +17,9 @@ export interface Provider {
/**
* Retrieves the parameters for a transaction.
*
* @returns {Promise<typeof TxParams>} - The parameters for a transaction.
* @returns {Promise<ProtocolParameters>} - The parameters for a transaction.
*/
getParameters(): Promise<typeof TxParams>
getParameters(): Promise<ProtocolParameters>

/**
* Retrieves the unspent outputs for a given address.
Expand Down

0 comments on commit 86967a3

Please sign in to comment.