@meshsdk/core
Advanced tools
Comparing version 1.3.0 to 1.4.0
@@ -27,2 +27,3 @@ import { csl } from '@mesh/core'; | ||
export declare const SUPPORTED_HANDLES: Record<number, string>; | ||
export declare const SUPPORTED_OGMIOS_LINKS: Record<Network, string>; | ||
export declare const SUPPORTED_WALLETS: string[]; |
@@ -1,2 +0,2 @@ | ||
import type { AccountInfo, AssetMetadata, Protocol, UTxO } from '@mesh/common/types'; | ||
import type { AccountInfo, AssetMetadata, BlockInfo, Protocol, UTxO, TransactionInfo } from '@mesh/common/types'; | ||
export interface IFetcher { | ||
@@ -10,4 +10,6 @@ fetchAccountInfo(address: string): Promise<AccountInfo>; | ||
fetchAssetMetadata(asset: string): Promise<AssetMetadata>; | ||
fetchBlockInfo(hash: string): Promise<BlockInfo>; | ||
fetchHandleAddress(handle: string): Promise<string>; | ||
fetchProtocolParameters(epoch: number): Promise<Protocol>; | ||
fetchTxInfo(hash: string): Promise<TransactionInfo>; | ||
} |
@@ -0,5 +1,7 @@ | ||
export * from './evaluator'; | ||
export * from './fetcher'; | ||
export * from './initiator'; | ||
export * from './listener'; | ||
export * from './signer'; | ||
export * from './submitter'; | ||
export * from './uploader'; |
export * from './generateNonce'; | ||
export * from './mergeSignatures'; | ||
export * from './readPlutusData'; | ||
export * from './readTransaction'; |
@@ -7,2 +7,3 @@ export * from './Account'; | ||
export * from './AssetMetadata'; | ||
export * from './BlockInfo'; | ||
export * from './Data'; | ||
@@ -19,3 +20,4 @@ export * from './DataSignature'; | ||
export * from './Relay'; | ||
export * from './TransactionInfo'; | ||
export * from './UTxO'; | ||
export * from './Wallet'; |
@@ -1,1 +0,4 @@ | ||
export declare type Network = 'testnet' | 'preview' | 'preprod' | 'mainnet'; | ||
declare const ALL_NETWORKS: readonly ["testnet", "preview", "preprod", "mainnet"]; | ||
export declare type Network = typeof ALL_NETWORKS[number]; | ||
export declare const isNetwork: (value: unknown) => value is "testnet" | "preview" | "preprod" | "mainnet"; | ||
export {}; |
import { Relay } from './Relay'; | ||
export declare type PoolParams = { | ||
VRFKeyHash: string; | ||
operator: string; | ||
vrfKeyHash: string; | ||
pledge: string; | ||
cost: string; | ||
margin: number; | ||
rewardAddress: string; | ||
relays: Relay[]; | ||
owners: string[]; | ||
rewardAddress: string; | ||
metadata?: PoolMetadata; | ||
@@ -12,0 +12,0 @@ }; |
@@ -1,5 +0,6 @@ | ||
import { IFetcher, ISubmitter } from '@mesh/common/contracts'; | ||
import type { AccountInfo, AssetMetadata, Protocol, UTxO } from '@mesh/common/types'; | ||
export declare class BlockfrostProvider implements IFetcher, ISubmitter { | ||
import { IFetcher, IListener, ISubmitter } from '@mesh/common/contracts'; | ||
import type { AccountInfo, AssetMetadata, BlockInfo, Protocol, TransactionInfo, UTxO } from '@mesh/common/types'; | ||
export declare class BlockfrostProvider implements IFetcher, IListener, ISubmitter { | ||
private readonly _axiosInstance; | ||
constructor(baseUrl: string); | ||
constructor(projectId: string, version?: number); | ||
@@ -13,4 +14,7 @@ fetchAccountInfo(address: string): Promise<AccountInfo>; | ||
fetchAssetMetadata(asset: string): Promise<AssetMetadata>; | ||
fetchBlockInfo(hash: string): Promise<BlockInfo>; | ||
fetchHandleAddress(handle: string): Promise<string>; | ||
fetchProtocolParameters(epoch?: number): Promise<Protocol>; | ||
fetchTxInfo(hash: string): Promise<TransactionInfo>; | ||
onTxConfirmed(txHash: string, callback: () => void, limit?: number): void; | ||
submitTx(tx: string): Promise<string>; | ||
@@ -17,0 +21,0 @@ private fetchPlutusScriptCBOR; |
export * from './blockfrost.provider'; | ||
export * from './infura.provider'; | ||
export * from './koios.provider'; | ||
export * from './ogmios.provider'; | ||
export * from './tango.provider'; |
@@ -1,5 +0,6 @@ | ||
import { IFetcher, ISubmitter } from '@mesh/common/contracts'; | ||
import type { AccountInfo, AssetMetadata, Protocol, UTxO } from '@mesh/common/types'; | ||
export declare class KoiosProvider implements IFetcher, ISubmitter { | ||
import { IFetcher, IListener, ISubmitter } from '@mesh/common/contracts'; | ||
import type { AccountInfo, AssetMetadata, BlockInfo, Protocol, TransactionInfo, UTxO } from '@mesh/common/types'; | ||
export declare class KoiosProvider implements IFetcher, IListener, ISubmitter { | ||
private readonly _axiosInstance; | ||
constructor(baseUrl: string); | ||
constructor(network: 'api' | 'preview' | 'preprod' | 'guild', version?: number); | ||
@@ -13,5 +14,8 @@ fetchAccountInfo(address: string): Promise<AccountInfo>; | ||
fetchAssetMetadata(asset: string): Promise<AssetMetadata>; | ||
fetchBlockInfo(hash: string): Promise<BlockInfo>; | ||
fetchHandleAddress(handle: string): Promise<string>; | ||
fetchProtocolParameters(epoch: number): Promise<Protocol>; | ||
fetchTxInfo(hash: string): Promise<TransactionInfo>; | ||
onTxConfirmed(txHash: string, callback: () => void, limit?: number): void; | ||
submitTx(tx: string): Promise<string>; | ||
} |
@@ -1,6 +0,7 @@ | ||
import { IFetcher, ISubmitter } from '@mesh/common/contracts'; | ||
import type { AccountInfo, AssetMetadata, Protocol, UTxO } from '@mesh/common/types'; | ||
export declare class TangoProvider implements IFetcher, ISubmitter { | ||
import { IEvaluator, IFetcher, IListener, ISubmitter } from '@mesh/common/contracts'; | ||
import type { AccountInfo, Action, AssetMetadata, BlockInfo, Protocol, TransactionInfo, UTxO } from '@mesh/common/types'; | ||
export declare class TangoProvider implements IEvaluator, IFetcher, IListener, ISubmitter { | ||
private readonly _axiosInstance; | ||
constructor(network: 'mainnet' | 'testnet', appId: string, appKey: string, version?: number); | ||
evaluateTx(tx: string): Promise<Omit<Action, 'data'>[]>; | ||
fetchAccountInfo(address: string): Promise<AccountInfo>; | ||
@@ -13,5 +14,8 @@ fetchAddressUTxOs(address: string, asset?: string): Promise<UTxO[]>; | ||
fetchAssetMetadata(asset: string): Promise<AssetMetadata>; | ||
fetchBlockInfo(hash: string): Promise<BlockInfo>; | ||
fetchHandleAddress(handle: string): Promise<string>; | ||
fetchProtocolParameters(epoch: number): Promise<Protocol>; | ||
fetchTxInfo(hash: string): Promise<TransactionInfo>; | ||
onTxConfirmed(txHash: string, callback: () => void, limit?: number): void; | ||
submitTx(tx: string): Promise<string>; | ||
} |
@@ -35,11 +35,80 @@ import { IInitiator } from '@mesh/common/contracts'; | ||
retirePool(poolId: string, epochNo: number): Transaction; | ||
/** | ||
* Adds an output to the transaction. | ||
* | ||
* @param recipient The recipient of the output. | ||
* @param assets The assets to send. | ||
* @returns The transaction builder. | ||
* @see {@link https://meshjs.dev/apis/transaction#sendAssets} | ||
*/ | ||
sendAssets(recipient: Recipient, assets: Asset[]): Transaction; | ||
/** | ||
* Adds a transaction output to the transaction. | ||
* | ||
* @param {Recipient} recipient The recipient of the transaction. | ||
* @param {string} lovelace The amount of lovelace to send. | ||
* @returns {Transaction} The Transaction object. | ||
* @see {@link https://meshjs.dev/apis/transaction#sendAda} | ||
*/ | ||
sendLovelace(recipient: Recipient, lovelace: string): Transaction; | ||
/** | ||
* Adds an output to the transaction. | ||
* | ||
* @param {Recipient} recipient The recipient of the output. | ||
* @param {UTxO} value The UTxO value of the output. | ||
* @returns {Transaction} The Transaction object. | ||
*/ | ||
sendValue(recipient: Recipient, value: UTxO): Transaction; | ||
/** | ||
* Sets the change address for the transaction. | ||
* | ||
* @param {string} changeAddress The change address. | ||
* @returns {Transaction} The Transaction object. | ||
*/ | ||
setChangeAddress(changeAddress: string): Transaction; | ||
/** | ||
* Sets the collateral for the transaction. | ||
* | ||
* @param {UTxO[]} collateral - Set the UTxO for collateral. | ||
* @returns {Transaction} The Transaction object. | ||
*/ | ||
setCollateral(collateral: UTxO[]): Transaction; | ||
/** | ||
* Add a JSON metadata entry to the transaction. | ||
* | ||
* @param {number} key The key to use for the metadata entry. | ||
* @param {unknown} value The value to use for the metadata entry. | ||
* @returns {Transaction} The Transaction object. | ||
* @see {@link https://meshjs.dev/apis/transaction#setMetadata} | ||
*/ | ||
setMetadata(key: number, value: unknown): Transaction; | ||
/** | ||
* Sets the required signers for the transaction. | ||
* | ||
* @param {string[]} addresses The addresses of the required signers. | ||
* @returns {Transaction} The Transaction object. | ||
*/ | ||
setRequiredSigners(addresses: string[]): Transaction; | ||
/** | ||
* Sets the start slot for the transaction. | ||
* | ||
* @param {string} slot The start slot for the transaction. | ||
* @returns {Transaction} The Transaction object. | ||
* @see {@link https://meshjs.dev/apis/transaction#setTimeLimit} | ||
*/ | ||
setTimeToStart(slot: string): Transaction; | ||
/** | ||
* Set the time to live for the transaction. | ||
* | ||
* @param {string} slot The slot number to expire the transaction at. | ||
* @returns {Transaction} The Transaction object. | ||
* @see {@link https://meshjs.dev/apis/transaction#setTimeLimit} | ||
*/ | ||
setTimeToExpire(slot: string): Transaction; | ||
/** | ||
* Sets the inputs for the transaction. | ||
* | ||
* @param {UTxO[]} inputs The inputs to set. | ||
* @returns {Transaction} The transaction. | ||
*/ | ||
setTxInputs(inputs: UTxO[]): Transaction; | ||
@@ -46,0 +115,0 @@ withdrawRewards(rewardAddress: string, lovelace: string): Transaction; |
@@ -6,3 +6,3 @@ { | ||
"author": "MeshJS", | ||
"version": "1.3.0", | ||
"version": "1.4.0", | ||
"license": "Apache-2.0", | ||
@@ -9,0 +9,0 @@ "type": "module", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
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
233476
77
4030