meshjs 0.0.1 → 1.2.0-beta.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (69) hide show
  1. package/README.md +32 -0
  2. package/dist/common/constants.d.ts +27 -0
  3. package/dist/common/contracts/fetcher.d.ts +8 -0
  4. package/dist/common/contracts/index.d.ts +5 -0
  5. package/dist/common/contracts/initiator.d.ts +8 -0
  6. package/dist/common/contracts/signer.d.ts +7 -0
  7. package/dist/common/contracts/submitter.d.ts +3 -0
  8. package/dist/common/contracts/uploader.d.ts +3 -0
  9. package/dist/common/decorators.d.ts +19 -0
  10. package/dist/common/helpers/index.d.ts +1 -0
  11. package/dist/common/helpers/mergeSignatures.d.ts +3 -0
  12. package/dist/common/types/Account.d.ts +5 -0
  13. package/dist/common/types/AccountInfo.d.ts +7 -0
  14. package/dist/common/types/Action.d.ts +12 -0
  15. package/dist/common/types/Asset.d.ts +6 -0
  16. package/dist/common/types/AssetExtended.d.ts +8 -0
  17. package/dist/common/types/AssetMetadata.d.ts +24 -0
  18. package/dist/common/types/Data.d.ts +4 -0
  19. package/dist/common/types/DataSignature.d.ts +4 -0
  20. package/dist/common/types/Era.d.ts +1 -0
  21. package/dist/common/types/Mint.d.ts +10 -0
  22. package/dist/common/types/NativeScript.d.ts +14 -0
  23. package/dist/common/types/Network.d.ts +1 -0
  24. package/dist/common/types/PlutusScript.d.ts +6 -0
  25. package/dist/common/types/PoolParams.d.ts +16 -0
  26. package/dist/common/types/Protocol.d.ts +22 -0
  27. package/dist/common/types/Recipient.d.ts +11 -0
  28. package/dist/common/types/Relay.d.ts +13 -0
  29. package/dist/common/types/UTxO.d.ts +14 -0
  30. package/dist/common/types/Wallet.d.ts +5 -0
  31. package/dist/common/types/index.d.ts +19 -0
  32. package/dist/common/utils/builder.d.ts +17 -0
  33. package/dist/common/utils/converter.d.ts +26 -0
  34. package/dist/common/utils/deserializer.d.ts +17 -0
  35. package/dist/common/utils/index.d.ts +5 -0
  36. package/dist/common/utils/parser.d.ts +1 -0
  37. package/dist/common/utils/resolver.d.ts +17 -0
  38. package/dist/core/CIP14.d.ts +2 -0
  39. package/dist/core/CIP1852.d.ts +4 -0
  40. package/dist/core/CIP1853.d.ts +1 -0
  41. package/dist/core/CIP1855.d.ts +1 -0
  42. package/dist/core/CIP2.d.ts +3 -0
  43. package/dist/core/CIP25.d.ts +19 -0
  44. package/dist/core/CIP8.d.ts +13 -0
  45. package/dist/core/CSL.d.ts +144 -0
  46. package/dist/core/index.d.ts +8 -0
  47. package/dist/index.d.ts +8 -0
  48. package/dist/meshjs.cjs +1 -0
  49. package/dist/meshjs.js +2188 -0
  50. package/dist/providers/blockfrost.provider.d.ts +14 -0
  51. package/dist/providers/index.d.ts +4 -0
  52. package/dist/providers/infura.provider.d.ts +12 -0
  53. package/dist/providers/koios.provider.d.ts +12 -0
  54. package/dist/providers/tango.provider.d.ts +12 -0
  55. package/dist/scripts/forge.script.d.ts +8 -0
  56. package/dist/scripts/index.d.ts +1 -0
  57. package/dist/transaction/index.d.ts +1 -0
  58. package/dist/transaction/transaction.service.d.ts +61 -0
  59. package/dist/transaction/transaction.service.spec.d.ts +1 -0
  60. package/dist/wallet/app.service.d.ts +34 -0
  61. package/dist/wallet/app.service.spec.d.ts +1 -0
  62. package/dist/wallet/browser.service.d.ts +58 -0
  63. package/dist/wallet/browser.service.spec.d.ts +1 -0
  64. package/dist/wallet/embedded.service.d.ts +20 -0
  65. package/dist/wallet/embedded.service.spec.d.ts +1 -0
  66. package/dist/wallet/index.d.ts +4 -0
  67. package/dist/wallet/mina.service.d.ts +11 -0
  68. package/dist/wallet/mina.service.spec.d.ts +1 -0
  69. package/package.json +72 -7
package/README.md ADDED
@@ -0,0 +1,32 @@
1
+ ![Mesh Logo](https://mesh.martify.io/logo-mesh/mesh.png)
2
+
3
+ Mesh is an open-source library to make building dApps accessible. Whether you're a beginner developer, startup, web3 market leader, or a large enterprise, Mesh makes web3 development easy with reliable, scalable, and well-engineered APIs & developer tools.
4
+
5
+ Explore the features on [Mesh Playground](https://mesh.martify.io/).
6
+
7
+ ## Guides and documentations
8
+
9
+ - [Start a Web3 app on Next.js](https://mesh.martify.io/guides/nextjs)
10
+ - [Minting on Node.js](https://mesh.martify.io/guides/mintingonnodejs)
11
+ - [App Wallet - Wallet for building transactions in your applications](https://mesh.martify.io/apis/appwallet)
12
+ - [Browser Wallet - CIP30 wallets intergration](https://mesh.martify.io/apis/browserwallet)
13
+ - [Transaction - Building, minting, burning, smart contracts and more](https://mesh.martify.io/apis/transaction)
14
+ - [Resolvers - Helpful functions that you need while building dApps](https://mesh.martify.io/apis/resolvers)
15
+
16
+ ## Why use Mesh
17
+ - Always up to date - Vasil ready, developed closely as the network updates so your app will always works
18
+ - Simple to use - Check out our [guides](https://mesh.martify.io/guides), you will get started in less than 10 mins
19
+ - Everything you need to build Web3 apps - [React components](https://mesh.martify.io/react) like wallet connection buttons, and useful React hooks - Mesh provides everything you need to build web3 apps
20
+ - Adopts best practices - implemented various CIPs and package is well build (no hacking and tweaking needed to get it to work)
21
+ - Thoroughly tested - Mesh is used by developers and learners, built by developers with solid software engineering background
22
+ - Integrates with Cardano projects - Koios, Blockfrost, ADA Handle (and more), you pick what you want to use for your app
23
+ - Well documented - We focus on documentation so you can use it, our [Playground](https://mesh.martify.io/) is built so you can see how it works
24
+
25
+ [Find out more](https://mesh.martify.io/about)
26
+
27
+ ## How can you contribute?
28
+
29
+ - [You can support Mesh!](https://mesh.martify.io/about/support-us)
30
+ - Build something - try Mesh by implementing your Web 3.0 project (recommended [starter guide](https://mesh.martify.io/guides/nextjs))
31
+ - Inform others - Tell others about Mesh, and star the [Github repo](https://github.com/MartifyLabs/mesh) :star:
32
+ - Write ups - documentations and guides
@@ -0,0 +1,27 @@
1
+ import { csl } from '@mesh/core';
2
+ import type { Costmdls } from '@mesh/core';
3
+ import type { Budget, Era, Network, Protocol } from './types';
4
+ export declare const DEFAULT_REDEEMER_BUDGET: Budget;
5
+ export declare const DEFAULT_PROTOCOL_PARAMETERS: Protocol;
6
+ export declare const HARDENED_KEY_START = 2147483648;
7
+ export declare const LANGUAGE_VERSIONS: {
8
+ V1: csl.Language;
9
+ V2: csl.Language;
10
+ };
11
+ export declare const POLICY_ID_LENGTH = 56;
12
+ export declare const REDEEMER_TAGS: {
13
+ CERT: csl.RedeemerTag;
14
+ MINT: csl.RedeemerTag;
15
+ REWARD: csl.RedeemerTag;
16
+ SPEND: csl.RedeemerTag;
17
+ };
18
+ export declare const SUPPORTED_CLOCKS: Record<Network, [
19
+ epoch: string,
20
+ slot: string,
21
+ systemStart: string,
22
+ epochLength: string
23
+ ]>;
24
+ export declare const SUPPORTED_COST_MODELS: Record<Era, Costmdls>;
25
+ export declare const SUPPORTED_LANGUAGE_VIEWS: Record<Era, Partial<Record<keyof typeof LANGUAGE_VERSIONS, string>>>;
26
+ export declare const SUPPORTED_HANDLES: Record<number, string>;
27
+ export declare const SUPPORTED_WALLETS: string[];
@@ -0,0 +1,8 @@
1
+ import type { AccountInfo, AssetMetadata, Protocol, UTxO } from '@mesh/common/types';
2
+ export interface IFetcher {
3
+ fetchAccountInfo(address: string): Promise<AccountInfo>;
4
+ fetchAddressUTxOs(address: string, asset?: string): Promise<UTxO[]>;
5
+ fetchAssetMetadata(asset: string): Promise<AssetMetadata>;
6
+ fetchHandleAddress(handle: string): Promise<string>;
7
+ fetchProtocolParameters(epoch: number): Promise<Protocol>;
8
+ }
@@ -0,0 +1,5 @@
1
+ export * from './fetcher';
2
+ export * from './initiator';
3
+ export * from './signer';
4
+ export * from './submitter';
5
+ export * from './uploader';
@@ -0,0 +1,8 @@
1
+ import type { Address, TransactionUnspentOutput } from '@mesh/core';
2
+ export interface IInitiator {
3
+ getUsedAddress(): SometimesPromise<Address>;
4
+ getUsedCollateral(limit?: number): SometimesPromise<TransactionUnspentOutput[]>;
5
+ getUsedUTxOs(): SometimesPromise<TransactionUnspentOutput[]>;
6
+ }
7
+ declare type SometimesPromise<T> = Promise<T> | T;
8
+ export {};
@@ -0,0 +1,7 @@
1
+ import { DataSignature } from '@mesh/common/types';
2
+ export interface ISigner {
3
+ signData(address: string, payload: string): SometimesPromise<DataSignature>;
4
+ signTx(unsignedTx: string, partialSign: boolean): SometimesPromise<string>;
5
+ }
6
+ declare type SometimesPromise<T> = Promise<T> | T;
7
+ export {};
@@ -0,0 +1,3 @@
1
+ export interface ISubmitter {
2
+ submitTx(tx: string): Promise<string>;
3
+ }
@@ -0,0 +1,3 @@
1
+ export interface IUploader {
2
+ uploadContent(content: FormData, recursive: boolean): Promise<string>;
3
+ }
@@ -0,0 +1,19 @@
1
+ /// <reference types="chai" />
2
+ /// <reference types="chai-subset" />
3
+ export declare const Trackable: <T extends new (...args: any[]) => Object>(constructor: T) => {
4
+ new (...args: any[]): {
5
+ __visits: never[];
6
+ constructor: Function;
7
+ toString(): string;
8
+ toLocaleString(): string;
9
+ valueOf(): Object;
10
+ hasOwnProperty(v: PropertyKey): boolean;
11
+ isPrototypeOf(v: Object): boolean;
12
+ propertyIsEnumerable(v: PropertyKey): boolean;
13
+ should: Chai.Assertion;
14
+ };
15
+ } & T;
16
+ export declare const Checkpoint: () => (_target: Object, propertyKey: string | symbol, descriptor: PropertyDescriptor) => void;
17
+ export interface TrackableObject {
18
+ __visits: unknown[];
19
+ }
@@ -0,0 +1 @@
1
+ export * from './mergeSignatures';
@@ -0,0 +1,3 @@
1
+ import { csl } from '@mesh/core';
2
+ import type { TransactionWitnessSet, Vkeywitnesses } from '@mesh/core';
3
+ export declare const mergeSignatures: (txWitnessSet: TransactionWitnessSet, newSignatures: Vkeywitnesses) => csl.Vkeywitnesses;
@@ -0,0 +1,5 @@
1
+ export declare type Account = {
2
+ baseAddress: string;
3
+ enterpriseAddress: string;
4
+ rewardAddress: string;
5
+ };
@@ -0,0 +1,7 @@
1
+ export declare type AccountInfo = {
2
+ active: boolean;
3
+ poolId?: string;
4
+ balance: string;
5
+ rewards: string;
6
+ withdrawals: string;
7
+ };
@@ -0,0 +1,12 @@
1
+ import { REDEEMER_TAGS } from '@mesh/common/constants';
2
+ import { Data } from './Data';
3
+ export declare type Action = {
4
+ data: Data;
5
+ index: number;
6
+ budget: Budget;
7
+ tag: keyof typeof REDEEMER_TAGS;
8
+ };
9
+ export declare type Budget = {
10
+ mem: number;
11
+ steps: number;
12
+ };
@@ -0,0 +1,6 @@
1
+ export declare type Asset = {
2
+ unit: Unit;
3
+ quantity: Quantity;
4
+ };
5
+ export declare type Unit = string;
6
+ export declare type Quantity = string;
@@ -0,0 +1,8 @@
1
+ import { Quantity, Unit } from './Asset';
2
+ export declare type AssetExtended = {
3
+ unit: Unit;
4
+ policyId: string;
5
+ assetName: string;
6
+ fingerprint: string;
7
+ quantity: Quantity;
8
+ };
@@ -0,0 +1,24 @@
1
+ import type { MetadataStandard, Files } from '@mesh/core';
2
+ export declare type AssetMetadata = FungibleAssetMetadata | NonFungibleAssetMetadata;
3
+ export declare type FungibleAssetMetadata = MetadataStandard & {
4
+ ticker: string;
5
+ decimals: number;
6
+ version: `${number}.${number}`;
7
+ };
8
+ export declare type NonFungibleAssetMetadata = AudioAssetMetadata | ImageAssetMetadata | SmartAssetMetadata | VideoAssetMetadata;
9
+ declare type AudioAssetMetadata = MetadataStandard & Files;
10
+ export declare type ImageAssetMetadata = MetadataStandard & Files & {
11
+ artists?: [
12
+ {
13
+ name: string;
14
+ twitter?: `https://twitter.com/${string}`;
15
+ }
16
+ ];
17
+ attributes?: {
18
+ [key: string]: string;
19
+ };
20
+ traits?: string[];
21
+ };
22
+ declare type SmartAssetMetadata = MetadataStandard & Files;
23
+ declare type VideoAssetMetadata = MetadataStandard & Files;
24
+ export {};
@@ -0,0 +1,4 @@
1
+ export declare type Data = string | number | Array<Data> | Map<Data, Data> | {
2
+ alternative: number;
3
+ fields: Array<Data>;
4
+ };
@@ -0,0 +1,4 @@
1
+ export declare type DataSignature = {
2
+ signature: string;
3
+ key: string;
4
+ };
@@ -0,0 +1 @@
1
+ export declare type Era = 'ALONZO' | 'BABBAGE';
@@ -0,0 +1,10 @@
1
+ import { Quantity } from './Asset';
2
+ import { AssetMetadata } from './AssetMetadata';
3
+ import { Recipient } from './Recipient';
4
+ export declare type Mint = {
5
+ assetName: string;
6
+ assetQuantity: Quantity;
7
+ metadata: AssetMetadata;
8
+ recipient: Recipient;
9
+ label: '20' | '721';
10
+ };
@@ -0,0 +1,14 @@
1
+ export declare type NativeScript = {
2
+ type: 'after' | 'before';
3
+ slot: string;
4
+ } | {
5
+ type: 'all' | 'any';
6
+ scripts: NativeScript[];
7
+ } | {
8
+ type: 'atLeast';
9
+ required: number;
10
+ scripts: NativeScript[];
11
+ } | {
12
+ type: 'sig';
13
+ keyHash: string;
14
+ };
@@ -0,0 +1 @@
1
+ export declare type Network = 'testnet' | 'preview' | 'preprod' | 'mainnet';
@@ -0,0 +1,6 @@
1
+ import { LANGUAGE_VERSIONS } from '../constants';
2
+ export declare type PlutusScript = {
3
+ version: LanguageVersion;
4
+ code: string;
5
+ };
6
+ export declare type LanguageVersion = keyof typeof LANGUAGE_VERSIONS;
@@ -0,0 +1,16 @@
1
+ import { Relay } from './Relay';
2
+ export declare type PoolParams = {
3
+ operator: string;
4
+ vrfKeyHash: string;
5
+ pledge: string;
6
+ cost: string;
7
+ margin: number;
8
+ rewardAddress: string;
9
+ relays: Relay[];
10
+ owners: string[];
11
+ metadata?: PoolMetadata;
12
+ };
13
+ export declare type PoolMetadata = {
14
+ URL: string;
15
+ hash: string;
16
+ };
@@ -0,0 +1,22 @@
1
+ export declare type Protocol = {
2
+ epoch: number;
3
+ minFeeA: number;
4
+ minFeeB: number;
5
+ maxBlockSize: number;
6
+ maxTxSize: number;
7
+ maxBlockHeaderSize: number;
8
+ keyDeposit: string;
9
+ poolDeposit: string;
10
+ decentralisation: number;
11
+ minPoolCost: string;
12
+ priceMem: number;
13
+ priceStep: number;
14
+ maxTxExMem: string;
15
+ maxTxExSteps: string;
16
+ maxBlockExMem: string;
17
+ maxBlockExSteps: string;
18
+ maxValSize: string;
19
+ collateralPercent: number;
20
+ maxCollateralInputs: number;
21
+ coinsPerUTxOSize: string;
22
+ };
@@ -0,0 +1,11 @@
1
+ import { Data } from './Data';
2
+ import { NativeScript } from './NativeScript';
3
+ import { PlutusScript } from './PlutusScript';
4
+ export declare type Recipient = string | {
5
+ address: string;
6
+ datum?: {
7
+ value: Data;
8
+ inline?: boolean;
9
+ };
10
+ script?: PlutusScript | NativeScript;
11
+ };
@@ -0,0 +1,13 @@
1
+ export declare type Relay = {
2
+ type: 'SingleHostAddr';
3
+ IPV4?: string;
4
+ IPV6?: string;
5
+ port?: number;
6
+ } | {
7
+ type: 'SingleHostName';
8
+ domainName: string;
9
+ port?: number;
10
+ } | {
11
+ type: 'MultiHostName';
12
+ domainName: string;
13
+ };
@@ -0,0 +1,14 @@
1
+ import { Asset } from './Asset';
2
+ export declare type UTxO = {
3
+ input: {
4
+ outputIndex: number;
5
+ txHash: string;
6
+ };
7
+ output: {
8
+ address: string;
9
+ amount: Asset[];
10
+ dataHash?: string;
11
+ plutusData?: string;
12
+ scriptRef?: string;
13
+ };
14
+ };
@@ -0,0 +1,5 @@
1
+ export declare type Wallet = {
2
+ name: string;
3
+ icon: string;
4
+ version: string;
5
+ };
@@ -0,0 +1,19 @@
1
+ export * from './Account';
2
+ export * from './AccountInfo';
3
+ export * from './Action';
4
+ export * from './Asset';
5
+ export * from './AssetExtended';
6
+ export * from './AssetMetadata';
7
+ export * from './Data';
8
+ export * from './DataSignature';
9
+ export * from './Era';
10
+ export * from './Mint';
11
+ export * from './NativeScript';
12
+ export * from './Network';
13
+ export * from './PlutusScript';
14
+ export * from './PoolParams';
15
+ export * from './Protocol';
16
+ export * from './Recipient';
17
+ export * from './Relay';
18
+ export * from './UTxO';
19
+ export * from './Wallet';
@@ -0,0 +1,17 @@
1
+ import { csl } from '@mesh/core';
2
+ import type { BaseAddress, Bip32PrivateKey, DataCost, DatumSource, Ed25519KeyHash, EnterpriseAddress, PlutusScriptSource, RewardAddress, TransactionBuilder, TransactionOutputBuilder, TxInputsBuilder } from '@mesh/core';
3
+ import type { Data, PlutusScript, Recipient, UTxO } from '@mesh/common/types';
4
+ export declare const buildBaseAddress: (networkId: number, paymentKeyHash: Ed25519KeyHash, stakeKeyHash: Ed25519KeyHash) => BaseAddress;
5
+ export declare const buildBip32PrivateKey: (entropy: string, password?: string) => Bip32PrivateKey;
6
+ export declare const buildDataCost: (coinsPerByte: string) => DataCost;
7
+ export declare const buildDatumSource: (datum: Data | UTxO) => DatumSource;
8
+ export declare const buildEnterpriseAddress: (networkId: number, paymentKeyHash: Ed25519KeyHash) => EnterpriseAddress;
9
+ export declare const buildGeneralTxMetadata: (metadata: Record<string, unknown>) => csl.GeneralTransactionMetadata;
10
+ export declare const buildRewardAddress: (networkId: number, stakeKeyHash: Ed25519KeyHash) => RewardAddress;
11
+ export declare const buildPlutusScriptSource: (script: PlutusScript | UTxO) => PlutusScriptSource;
12
+ export declare const buildScriptPubkey: (keyHash: Ed25519KeyHash) => csl.NativeScript;
13
+ export declare const buildTimelockExpiry: (slot: string) => csl.NativeScript;
14
+ export declare const buildTimelockStart: (slot: string) => csl.NativeScript;
15
+ export declare const buildTxBuilder: (parameters?: import("@mesh/common/types").Protocol) => TransactionBuilder;
16
+ export declare const buildTxInputsBuilder: (utxos: unknown[]) => TxInputsBuilder;
17
+ export declare const buildTxOutputBuilder: (recipient: Recipient) => TransactionOutputBuilder;
@@ -0,0 +1,26 @@
1
+ import { csl } from '@mesh/core';
2
+ import type { ScriptRef, TransactionUnspentOutput, Value } from '@mesh/core';
3
+ import type { Action, Asset, Data, NativeScript, PlutusScript, PoolParams, Relay, UTxO } from '@mesh/common/types';
4
+ export declare const toAddress: (bech32: string) => csl.Address;
5
+ export declare const toBaseAddress: (bech32: string) => csl.BaseAddress | undefined;
6
+ export declare const toEnterpriseAddress: (bech32: string) => csl.EnterpriseAddress | undefined;
7
+ export declare const toRewardAddress: (bech32: string) => csl.RewardAddress | undefined;
8
+ export declare const fromBytes: (bytes: Uint8Array) => string;
9
+ export declare const toBytes: (hex: string) => Uint8Array;
10
+ export declare const fromLovelace: (lovelace: number) => number;
11
+ export declare const toLovelace: (ada: number) => number;
12
+ export declare const fromNativeScript: (script: csl.NativeScript) => NativeScript;
13
+ export declare const toNativeScript: (script: NativeScript) => csl.NativeScript;
14
+ export declare const toPlutusData: (data: Data) => csl.PlutusData;
15
+ export declare const toPoolParams: (params: PoolParams) => never;
16
+ export declare const toRedeemer: (action: Action) => csl.Redeemer;
17
+ export declare const toRelay: (relay: Relay) => csl.Relay;
18
+ export declare const fromScriptRef: (scriptRef: ScriptRef) => NativeScript | PlutusScript;
19
+ export declare const toScriptRef: (script: PlutusScript | NativeScript) => csl.ScriptRef;
20
+ export declare const fromTxUnspentOutput: (txUnspentOutput: TransactionUnspentOutput) => UTxO;
21
+ export declare const toTxUnspentOutput: (utxo: UTxO) => csl.TransactionUnspentOutput;
22
+ export declare const toUnitInterval: (float: string) => csl.UnitInterval;
23
+ export declare const fromUTF8: (utf8: string) => string;
24
+ export declare const toUTF8: (hex: string) => string;
25
+ export declare const fromValue: (value: Value) => Asset[];
26
+ export declare const toValue: (assets: Asset[]) => csl.Value;
@@ -0,0 +1,17 @@
1
+ import { csl } from '@mesh/core';
2
+ import type { LanguageVersion } from '@mesh/common/types';
3
+ export declare const deserializeAddress: (address: string) => csl.Address;
4
+ export declare const deserializeBip32PrivateKey: (bip32PrivateKey: string) => csl.Bip32PrivateKey;
5
+ export declare const deserializeDataHash: (dataHash: string) => csl.DataHash;
6
+ export declare const deserializeEd25519KeyHash: (ed25519KeyHash: string) => csl.Ed25519KeyHash;
7
+ export declare const deserializeNativeScript: (nativeScript: string) => csl.NativeScript;
8
+ export declare const deserializePlutusData: (plutusData: string) => csl.PlutusData;
9
+ export declare const deserializePlutusScript: (plutusScript: string, version: LanguageVersion) => csl.PlutusScript;
10
+ export declare const deserializeScriptRef: (scriptRef: string) => csl.ScriptRef;
11
+ export declare const deserializeScriptHash: (scriptHash: string) => csl.ScriptHash;
12
+ export declare const deserializeTx: (tx: string) => csl.Transaction;
13
+ export declare const deserializeTxBody: (txBody: string) => csl.TransactionBody;
14
+ export declare const deserializeTxHash: (txHash: string) => csl.TransactionHash;
15
+ export declare const deserializeTxUnspentOutput: (txUnspentOutput: string) => csl.TransactionUnspentOutput;
16
+ export declare const deserializeTxWitnessSet: (txWitnessSet: string) => csl.TransactionWitnessSet;
17
+ export declare const deserializeValue: (value: string) => csl.Value;
@@ -0,0 +1,5 @@
1
+ export * from './builder';
2
+ export * from './converter';
3
+ export * from './deserializer';
4
+ export * from './parser';
5
+ export * from './resolver';
@@ -0,0 +1 @@
1
+ export declare const parseHttpError: (error: unknown) => string;
@@ -0,0 +1,17 @@
1
+ import type { Data, Era, LanguageVersion, NativeScript, Network, PlutusScript } from '@mesh/common/types';
2
+ export declare const resolveDataHash: (data: Data) => string;
3
+ export declare const resolveEpochNo: (network: Network, milliseconds?: number) => number;
4
+ export declare const resolveFingerprint: (policyId: string, assetName: string) => string;
5
+ export declare const resolveLanguageView: (era: Era, version: LanguageVersion) => string | undefined;
6
+ export declare const resolveNativeScriptHash: (script: NativeScript) => string;
7
+ export declare const resolvePaymentKeyHash: (bech32: string) => string;
8
+ export declare const resolvePlutusScriptAddress: (script: PlutusScript, networkId?: number) => string;
9
+ export declare const resolvePlutusScriptHash: (bech32: string) => string;
10
+ export declare const resolvePoolId: (hash: string) => string;
11
+ export declare const resolvePrivateKey: (words: string[]) => string;
12
+ export declare const resolveScriptRef: (script: PlutusScript | NativeScript) => string;
13
+ export declare const resolveSlotNo: (network: Network, milliseconds?: number) => string;
14
+ export declare const resolveRewardAddress: (bech32: string) => string;
15
+ export declare const resolveStakeKeyHash: (bech32: string) => string;
16
+ export declare const resolveTxFees: (txSize: number, minFeeA?: number, minFeeB?: number) => string;
17
+ export declare const resolveTxHash: (txHex: string) => string;
@@ -0,0 +1,2 @@
1
+ import CIP14 from '@emurgo/cip14-js';
2
+ export declare const AssetFingerprint: typeof CIP14;
@@ -0,0 +1,4 @@
1
+ export declare const deriveAccountKeys: (rootKey: string, accountIndex: number) => {
2
+ paymentKey: import("@emurgo/cardano-serialization-lib-nodejs").PrivateKey;
3
+ stakeKey: import("@emurgo/cardano-serialization-lib-nodejs").PrivateKey;
4
+ };
@@ -0,0 +1 @@
1
+ export declare const deriveStakePoolColdKey: (rootKey: string, coldIndex: number) => import("@emurgo/cardano-serialization-lib-nodejs").PrivateKey;
@@ -0,0 +1 @@
1
+ export declare const deriveForgingPolicyKey: (rootKey: string, policyIndex: number) => import("@emurgo/cardano-serialization-lib-nodejs").PrivateKey;
@@ -0,0 +1,3 @@
1
+ import type { Quantity, Unit, UTxO } from '@mesh/common/types';
2
+ export declare const largestFirst: (lovelace: Quantity, initialUTxOSet: UTxO[], includeTxFees?: boolean, { maxTxSize, minFeeA, minFeeB }?: import("@mesh/common/types").Protocol) => UTxO[];
3
+ export declare const largestFirstMultiAsset: (requestedOutputSet: Map<Unit, Quantity>, initialUTxOSet: UTxO[], includeTxFees?: boolean, parameters?: import("@mesh/common/types").Protocol) => UTxO[];
@@ -0,0 +1,19 @@
1
+ export declare type MetadataStandard = {
2
+ name: string;
3
+ image: `${string}://${string}`;
4
+ mediaType?: `image/${string}`;
5
+ description?: string | string[];
6
+ instagram?: `https://instagram.com/${string}`;
7
+ twitter?: `https://twitter.com/${string}`;
8
+ discord?: `https://discord.gg/${string}`;
9
+ website?: `https://${string}`;
10
+ };
11
+ export declare type Files = {
12
+ files?: [
13
+ {
14
+ name: string;
15
+ src: `${string}://${string}`;
16
+ mediaType: `${string}/${string}`;
17
+ }
18
+ ];
19
+ };
@@ -0,0 +1,13 @@
1
+ import type { Address, PrivateKey } from './CSL';
2
+ export declare const signMessage: (message: Message, signer: Signer) => {
3
+ coseKey: string;
4
+ coseSign1: string;
5
+ };
6
+ export declare type Message = {
7
+ payload: string;
8
+ externalAAD?: string;
9
+ };
10
+ export declare type Signer = {
11
+ address: Address;
12
+ key: PrivateKey;
13
+ };