@meshsdk/core 1.6.0-alpha.14 → 1.6.0-alpha.16

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 (93) hide show
  1. package/dist/common/constants.d.ts +58 -0
  2. package/dist/common/contracts/evaluator.d.ts +4 -0
  3. package/dist/common/contracts/fetcher.d.ts +22 -0
  4. package/dist/common/contracts/index.d.ts +7 -0
  5. package/dist/common/contracts/initiator.d.ts +8 -0
  6. package/dist/common/contracts/listener.d.ts +3 -0
  7. package/dist/common/contracts/signer.d.ts +8 -0
  8. package/dist/common/contracts/submitter.d.ts +3 -0
  9. package/dist/common/contracts/uploader.d.ts +3 -0
  10. package/dist/common/data/index.d.ts +2 -0
  11. package/dist/common/data/mesh.d.ts +8 -0
  12. package/dist/common/data/plutus.d.ts +72 -0
  13. package/dist/common/data/plutus.spec.d.ts +1 -0
  14. package/dist/common/decorators.d.ts +19 -0
  15. package/dist/common/helpers/generateNonce.d.ts +1 -0
  16. package/dist/common/helpers/index.d.ts +2 -0
  17. package/dist/common/helpers/readPlutusData.d.ts +2 -0
  18. package/dist/common/index.d.ts +1 -0
  19. package/dist/common/utils/builder.d.ts +18 -0
  20. package/dist/common/utils/converter.d.ts +27 -0
  21. package/dist/common/utils/deserializer.d.ts +19 -0
  22. package/dist/common/utils/index.d.ts +5 -0
  23. package/dist/common/utils/parser.d.ts +5 -0
  24. package/dist/common/utils/resolver.d.ts +17 -0
  25. package/dist/core/CIP14.d.ts +2 -0
  26. package/dist/core/CIP1852.d.ts +4 -0
  27. package/dist/core/CIP1853.d.ts +1 -0
  28. package/dist/core/CIP1855.d.ts +1 -0
  29. package/dist/core/CIP2.d.ts +4 -0
  30. package/dist/core/CIP25.d.ts +19 -0
  31. package/dist/core/CIP27.d.ts +4 -0
  32. package/dist/core/CIP8.d.ts +15 -0
  33. package/dist/core/CPS0009.d.ts +2 -0
  34. package/dist/core/CSL.d.ts +147 -0
  35. package/dist/core/index.d.ts +10 -0
  36. package/dist/core.cjs +12 -12
  37. package/dist/core.js +2899 -3730
  38. package/dist/index.d.ts +13 -0
  39. package/dist/providers/blockfrost.provider.d.ts +46 -0
  40. package/dist/providers/index.d.ts +6 -0
  41. package/dist/providers/infura.provider.d.ts +12 -0
  42. package/dist/providers/koios.provider.d.ts +27 -0
  43. package/dist/providers/maestro.provider.d.ts +35 -0
  44. package/dist/providers/ogmios.provider.d.ts +12 -0
  45. package/dist/providers/tango.provider.d.ts +25 -0
  46. package/dist/providers/yaci.provider.d.ts +32 -0
  47. package/dist/scripts/forge.script.d.ts +8 -0
  48. package/dist/scripts/index.d.ts +1 -0
  49. package/dist/serializer/index.d.ts +2 -0
  50. package/dist/serializer/serializer.d.ts +42 -0
  51. package/dist/serializer/signatures.d.ts +3 -0
  52. package/dist/transaction/index.d.ts +2 -0
  53. package/dist/transaction/meshTxBuilder/index.d.ts +2 -0
  54. package/dist/transaction/meshTxBuilder/meshTxBuilder.service.d.ts +47 -0
  55. package/dist/transaction/meshTxBuilder/meshTxBuilder.spec.d.ts +1 -0
  56. package/dist/transaction/meshTxBuilder/meshTxBuilderCore.d.ts +292 -0
  57. package/dist/transaction/meshTxBuilder/type.d.ts +128 -0
  58. package/dist/transaction/transaction.service.d.ts +150 -0
  59. package/dist/transaction/transaction.service.spec.d.ts +1 -0
  60. package/dist/types/Account.d.ts +5 -0
  61. package/dist/types/AccountInfo.d.ts +7 -0
  62. package/dist/types/Action.d.ts +12 -0
  63. package/dist/types/Asset.d.ts +7 -0
  64. package/dist/types/AssetExtended.d.ts +8 -0
  65. package/dist/types/AssetMetadata.d.ts +24 -0
  66. package/dist/types/BlockInfo.d.ts +17 -0
  67. package/dist/types/Data.d.ts +4 -0
  68. package/dist/types/DataSignature.d.ts +4 -0
  69. package/dist/types/Era.d.ts +1 -0
  70. package/dist/types/Mint.d.ts +10 -0
  71. package/dist/types/NativeScript.d.ts +14 -0
  72. package/dist/types/Network.d.ts +4 -0
  73. package/dist/types/PlutusScript.d.ts +5 -0
  74. package/dist/types/PoolParams.d.ts +16 -0
  75. package/dist/types/Protocol.d.ts +22 -0
  76. package/dist/types/Recipient.d.ts +11 -0
  77. package/dist/types/Relay.d.ts +13 -0
  78. package/dist/types/Token.d.ts +2 -0
  79. package/dist/types/TransactionInfo.d.ts +11 -0
  80. package/dist/types/UTxO.d.ts +15 -0
  81. package/dist/types/Wallet.d.ts +5 -0
  82. package/dist/types/index.d.ts +22 -0
  83. package/dist/wallet/app.service.d.ts +43 -0
  84. package/dist/wallet/app.service.spec.d.ts +1 -0
  85. package/dist/wallet/browser.service.d.ts +205 -0
  86. package/dist/wallet/browser.service.spec.d.ts +1 -0
  87. package/dist/wallet/embedded.service.d.ts +20 -0
  88. package/dist/wallet/embedded.service.spec.d.ts +1 -0
  89. package/dist/wallet/index.d.ts +4 -0
  90. package/dist/wallet/mesh.service.d.ts +188 -0
  91. package/dist/wallet/mina.service.d.ts +11 -0
  92. package/dist/wallet/mina.service.spec.d.ts +1 -0
  93. package/package.json +1 -1
@@ -0,0 +1,58 @@
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_OGMIOS_LINKS: Record<Network, string>;
28
+ export declare const SUPPORTED_TOKENS: {
29
+ LQ: string;
30
+ MIN: string;
31
+ NTX: string;
32
+ iBTC: string;
33
+ iETH: string;
34
+ iUSD: string;
35
+ MILK: string;
36
+ AGIX: string;
37
+ MELD: string;
38
+ INDY: string;
39
+ CLAY: string;
40
+ MCOS: string;
41
+ DING: string;
42
+ GERO: string;
43
+ NMKR: string;
44
+ PAVIA: string;
45
+ HOSKY: string;
46
+ YUMMI: string;
47
+ C3: string;
48
+ GIMBAL: string;
49
+ SUNDAE: string;
50
+ GREENS: string;
51
+ GENS: string;
52
+ SOCIETY: string;
53
+ DJED: string;
54
+ SHEN: string;
55
+ WMT: string;
56
+ COPI: string;
57
+ };
58
+ export declare const SUPPORTED_WALLETS: string[];
@@ -0,0 +1,4 @@
1
+ import { Action } from '@mesh/types';
2
+ export interface IEvaluator {
3
+ evaluateTx(tx: string): Promise<Omit<Action, 'data'>[]>;
4
+ }
@@ -0,0 +1,22 @@
1
+ import type { AccountInfo, Asset, AssetMetadata, BlockInfo, Protocol, TransactionInfo, UTxO } from '@mesh/types';
2
+ /**
3
+ * Fetcher interface defines end points to query blockchain data.
4
+ */
5
+ export interface IFetcher {
6
+ fetchAccountInfo(address: string): Promise<AccountInfo>;
7
+ fetchAddressUTxOs(address: string, asset?: string): Promise<UTxO[]>;
8
+ fetchAssetAddresses(asset: string): Promise<{
9
+ address: string;
10
+ quantity: string;
11
+ }[]>;
12
+ fetchAssetMetadata(asset: string): Promise<AssetMetadata>;
13
+ fetchBlockInfo(hash: string): Promise<BlockInfo>;
14
+ fetchCollectionAssets(policyId: string, cursor?: number | string): Promise<{
15
+ assets: Asset[];
16
+ next: string | number | null;
17
+ }>;
18
+ fetchHandleAddress(handle: string): Promise<string>;
19
+ fetchProtocolParameters(epoch: number): Promise<Protocol>;
20
+ fetchTxInfo(hash: string): Promise<TransactionInfo>;
21
+ fetchUTxOs(hash: string): Promise<UTxO[]>;
22
+ }
@@ -0,0 +1,7 @@
1
+ export * from './evaluator';
2
+ export * from './fetcher';
3
+ export * from './initiator';
4
+ export * from './listener';
5
+ export * from './signer';
6
+ export * from './submitter';
7
+ 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,3 @@
1
+ export interface IListener {
2
+ onTxConfirmed(txHash: string, callback: () => void, limit?: number): void;
3
+ }
@@ -0,0 +1,8 @@
1
+ import { DataSignature } from '@mesh/types';
2
+ export interface ISigner {
3
+ signData(address: string, payload: string): SometimesPromise<DataSignature>;
4
+ signTx(unsignedTx: string, partialSign: boolean): SometimesPromise<string>;
5
+ signTxs(unsignedTxs: string[], partialSign: boolean): SometimesPromise<string[]>;
6
+ }
7
+ declare type SometimesPromise<T> = Promise<T> | T;
8
+ 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,2 @@
1
+ export * from './mesh';
2
+ export * from './plutus';
@@ -0,0 +1,8 @@
1
+ import { Data } from '@mesh/types';
2
+ export declare const mConStr: <T extends Data[]>(alternative: number, fields: T) => Data;
3
+ export declare const mConStr0: <T extends Data[]>(fields: T) => Data;
4
+ export declare const mConStr1: <T extends Data[]>(fields: T) => Data;
5
+ export declare const mConStr2: <T extends Data[]>(fields: T) => Data;
6
+ export declare const mMaybeStakingHash: (stakeCredential: string) => Data;
7
+ export declare const mPubKeyAddress: (bytes: string, stakeCredential?: string) => Data;
8
+ export declare const mScriptAddress: (bytes: string, stakeCredential?: string) => Data;
@@ -0,0 +1,72 @@
1
+ import { Asset } from '@mesh/types';
2
+ export declare type ConStr<N = any, T = any> = {
3
+ constructor: N;
4
+ fields: T;
5
+ };
6
+ export declare type ConStr0<T = any> = ConStr<0, T>;
7
+ export declare type ConStr1<T = any> = ConStr<1, T>;
8
+ export declare type ConStr2<T = any> = ConStr<2, T>;
9
+ export declare type Bool = ConStr0<[]> | ConStr1<[]>;
10
+ export declare type BuiltinByteString = {
11
+ bytes: string;
12
+ };
13
+ export declare type Integer = {
14
+ int: number;
15
+ };
16
+ export declare type List = {
17
+ list: PlutusData[];
18
+ };
19
+ export declare type ValidatorHash = BuiltinByteString;
20
+ export declare type PaymentPubKeyHash = BuiltinByteString;
21
+ export declare type PubKeyHash = PaymentPubKeyHash;
22
+ export declare type POSIXTime = Integer;
23
+ export declare type CurrencySymbol = BuiltinByteString;
24
+ export declare type TokenName = BuiltinByteString;
25
+ export declare type MaybeStakingHash = ConStr1<[]> | ConStr0<[ConStr0<[ConStr0<[BuiltinByteString]>]>]>;
26
+ export declare type PubKeyAddress = ConStr0<[ConStr0<[PubKeyHash]>, MaybeStakingHash]>;
27
+ export declare type ScriptAddress = ConStr0<[
28
+ ConStr1<[ValidatorHash]>,
29
+ MaybeStakingHash
30
+ ]>;
31
+ export declare type AssetClass = ConStr0<[CurrencySymbol, TokenName]>;
32
+ export declare type TxOutRef = ConStr0<[ConStr0<[BuiltinByteString]>, Integer]>;
33
+ export declare type AssocMapItem<K, V> = {
34
+ k: K;
35
+ v: V;
36
+ };
37
+ export declare type DictItem<K, V> = {
38
+ k: K;
39
+ v: V;
40
+ };
41
+ export declare type AssocMap<K, V> = {
42
+ map: AssocMapItem<K, V>[];
43
+ };
44
+ export declare type Dict<K, V> = {
45
+ map: DictItem<K, V>[];
46
+ };
47
+ export declare type Tuple<K, V> = ConStr0<[K, V]>;
48
+ export declare type Value = AssocMap<CurrencySymbol, AssocMap<TokenName, Integer>>;
49
+ export declare type PlutusData = BuiltinByteString | Integer | MaybeStakingHash | PubKeyAddress | ScriptAddress | AssetClass | PaymentPubKeyHash | PubKeyHash | POSIXTime | TxOutRef;
50
+ export declare const conStr: <N, T>(constructor: N, fields: T) => ConStr<N, T>;
51
+ export declare const conStr0: <T>(fields: T) => ConStr0<T>;
52
+ export declare const conStr1: <T>(fields: T) => ConStr1<T>;
53
+ export declare const conStr2: <T>(fields: T) => ConStr2<T>;
54
+ export declare const bool: (b: boolean) => Bool;
55
+ export declare const builtinByteString: (bytes: string) => BuiltinByteString;
56
+ export declare const integer: (int: number) => Integer;
57
+ export declare const list: (pList: PlutusData[]) => List;
58
+ export declare const currencySymbol: (bytes: string) => CurrencySymbol;
59
+ export declare const tokenName: (bytes: string) => TokenName;
60
+ export declare const maybeStakingHash: (stakeCredential: string) => MaybeStakingHash;
61
+ export declare const pubKeyAddress: (bytes: string, stakeCredential?: string) => PubKeyAddress;
62
+ export declare const scriptAddress: (bytes: string, stakeCredential?: string) => ScriptAddress;
63
+ export declare const assetClass: (policyId: string, assetName: string) => AssetClass;
64
+ export declare const txOutRef: (txHash: string, index: number) => TxOutRef;
65
+ export declare const paymentPubKeyHash: (bytes: string) => PaymentPubKeyHash;
66
+ export declare const pubKeyHash: (bytes: string) => PubKeyHash;
67
+ export declare const posixTime: (int: number) => POSIXTime;
68
+ export declare const assocMap: <K, V>(itemsMap: [K, V][]) => AssocMap<K, V>;
69
+ export declare const dict: <K, V>(itemsMap: [K, V][]) => AssocMap<K, V>;
70
+ export declare const tuple: <K, V>(key: K, value: V) => Tuple<K, V>;
71
+ export declare const value: (assets: Asset[]) => Value;
72
+ export declare const parsePlutusValueToAssets: (plutusValue: Value) => Asset[];
@@ -0,0 +1 @@
1
+ export {};
@@ -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 declare const generateNonce: (label?: string, length?: number) => string;
@@ -0,0 +1,2 @@
1
+ export * from './generateNonce';
2
+ export * from './readPlutusData';
@@ -0,0 +1,2 @@
1
+ import type { Data } from '@mesh/types';
2
+ export declare const readPlutusData: (plutusData: string) => Data;
@@ -0,0 +1 @@
1
+ export * from './data';
@@ -0,0 +1,18 @@
1
+ import { csl } from '@mesh/core';
2
+ import type { BaseAddress, Bip32PrivateKey, DataCost, DatumSource, Ed25519KeyHash, EnterpriseAddress, MintWitness, PlutusScriptSource, RewardAddress, TransactionBuilder, TransactionOutputBuilder, TxInputsBuilder } from '@mesh/core';
3
+ import type { Action, Data, PlutusScript, Recipient, UTxO } from '@mesh/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 buildMintWitness: (script: string | PlutusScript | UTxO, redeemer?: Partial<Action>) => MintWitness;
11
+ export declare const buildRewardAddress: (networkId: number, stakeKeyHash: Ed25519KeyHash) => RewardAddress;
12
+ export declare const buildPlutusScriptSource: (script: PlutusScript | UTxO) => PlutusScriptSource;
13
+ export declare const buildScriptPubkey: (keyHash: Ed25519KeyHash) => csl.NativeScript;
14
+ export declare const buildTimelockExpiry: (slot: string) => csl.NativeScript;
15
+ export declare const buildTimelockStart: (slot: string) => csl.NativeScript;
16
+ export declare const buildTxBuilder: (parameters?: import("@mesh/types").Protocol) => TransactionBuilder;
17
+ export declare const buildTxInputsBuilder: (utxos: unknown[]) => TxInputsBuilder;
18
+ export declare const buildTxOutputBuilder: (recipient: Recipient) => TransactionOutputBuilder;
@@ -0,0 +1,27 @@
1
+ import { csl } from '@mesh/core';
2
+ import type { PlutusData, ScriptRef, TransactionUnspentOutput, Value } from '@mesh/core';
3
+ import type { Action, Asset, Data, NativeScript, PlutusScript, PoolParams, Relay, UTxO } from '@mesh/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 fromPlutusData: (plutusData: PlutusData) => Data;
15
+ export declare const toPlutusData: (data: Data) => csl.PlutusData;
16
+ export declare const toPoolParams: (params: PoolParams) => never;
17
+ export declare const toRedeemer: (action: Action) => csl.Redeemer;
18
+ export declare const toRelay: (relay: Relay) => csl.Relay;
19
+ export declare const fromScriptRef: (scriptRef: ScriptRef) => NativeScript | PlutusScript;
20
+ export declare const toScriptRef: (script: PlutusScript | NativeScript) => csl.ScriptRef;
21
+ export declare const fromTxUnspentOutput: (txUnspentOutput: TransactionUnspentOutput) => UTxO;
22
+ export declare const toTxUnspentOutput: (utxo: UTxO) => csl.TransactionUnspentOutput;
23
+ export declare const toUnitInterval: (float: string) => csl.UnitInterval;
24
+ export declare const fromUTF8: (utf8: string) => string;
25
+ export declare const toUTF8: (hex: string) => string;
26
+ export declare const fromValue: (value: Value) => Asset[];
27
+ export declare const toValue: (assets: Asset[]) => csl.Value;
@@ -0,0 +1,19 @@
1
+ import { csl } from '@mesh/core';
2
+ import type { LanguageVersion } from '@mesh/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 deserializeEd25519Signature: (ed25519Signature: string) => csl.Ed25519Signature;
8
+ export declare const deserializeNativeScript: (nativeScript: string) => csl.NativeScript;
9
+ export declare const deserializePublicKey: (publicKey: string) => csl.PublicKey;
10
+ export declare const deserializePlutusData: (plutusData: string) => csl.PlutusData;
11
+ export declare const deserializePlutusScript: (plutusScript: string, version: LanguageVersion) => csl.PlutusScript;
12
+ export declare const deserializeScriptRef: (scriptRef: string) => csl.ScriptRef;
13
+ export declare const deserializeScriptHash: (scriptHash: string) => csl.ScriptHash;
14
+ export declare const deserializeTx: (tx: string) => csl.Transaction;
15
+ export declare const deserializeTxBody: (txBody: string) => csl.TransactionBody;
16
+ export declare const deserializeTxHash: (txHash: string) => csl.TransactionHash;
17
+ export declare const deserializeTxUnspentOutput: (txUnspentOutput: string) => csl.TransactionUnspentOutput;
18
+ export declare const deserializeTxWitnessSet: (txWitnessSet: string) => csl.TransactionWitnessSet;
19
+ 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,5 @@
1
+ export declare const parseAssetUnit: (unit: string) => {
2
+ policyId: string;
3
+ assetName: string;
4
+ };
5
+ export declare const parseHttpError: (error: unknown) => string;
@@ -0,0 +1,17 @@
1
+ import type { Data, Era, LanguageVersion, NativeScript, Network, PlutusScript } from '@mesh/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("@sidan-lab/sidan-csl-rs-nodejs").PrivateKey;
3
+ stakeKey: import("@sidan-lab/sidan-csl-rs-nodejs").PrivateKey;
4
+ };
@@ -0,0 +1 @@
1
+ export declare const deriveStakePoolColdKey: (rootKey: string, coldIndex: number) => import("@sidan-lab/sidan-csl-rs-nodejs").PrivateKey;
@@ -0,0 +1 @@
1
+ export declare const deriveForgingPolicyKey: (rootKey: string, policyIndex: number) => import("@sidan-lab/sidan-csl-rs-nodejs").PrivateKey;
@@ -0,0 +1,4 @@
1
+ import type { Protocol, Quantity, Unit, UTxO } from '@mesh/types';
2
+ export declare const keepRelevant: (requestedOutputSet: Map<Unit, Quantity>, initialUTxOSet: UTxO[], minimumLovelaceRequired?: string) => UTxO[];
3
+ export declare const largestFirst: (lovelace: Quantity, initialUTxOSet: UTxO[], includeTxFees?: boolean, { maxTxSize, minFeeA, minFeeB }?: Protocol) => UTxO[];
4
+ export declare const largestFirstMultiAsset: (requestedOutputSet: Map<Unit, Quantity>, initialUTxOSet: UTxO[], includeTxFees?: boolean, parameters?: 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,4 @@
1
+ export declare type RoyaltiesStandard = {
2
+ rate: string;
3
+ address: string;
4
+ };
@@ -0,0 +1,15 @@
1
+ import type { DataSignature } from '@mesh/types';
2
+ import type { Address, PrivateKey } from '@mesh/core';
3
+ export declare const signMessage: (message: Message, signer: Signer) => {
4
+ coseKey: string;
5
+ coseSign1: string;
6
+ };
7
+ export declare const checkSignature: (message: string, signer: string, { key, signature }: DataSignature) => boolean;
8
+ export declare type Message = {
9
+ payload: string;
10
+ externalAAD?: string;
11
+ };
12
+ export declare type Signer = {
13
+ address: Address;
14
+ key: PrivateKey;
15
+ };
@@ -0,0 +1,2 @@
1
+ import type { Quantity, UTxO, Unit } from '@mesh/types';
2
+ export declare const selectUtxos: (inputs: UTxO[], requiredAssets: Map<Unit, Quantity>, threshold: Quantity) => UTxO[];
@@ -0,0 +1,147 @@
1
+ import { csl } from '@meshsdk/mesh-csl';
2
+ export { csl, applyParamsToScript } from '@meshsdk/mesh-csl';
3
+ export declare type Address = InstanceType<typeof csl.Address>;
4
+ export declare type AssetName = InstanceType<typeof csl.AssetName>;
5
+ export declare type AssetNames = InstanceType<typeof csl.AssetNames>;
6
+ export declare type Assets = InstanceType<typeof csl.Assets>;
7
+ export declare type AuxiliaryData = InstanceType<typeof csl.AuxiliaryData>;
8
+ export declare type AuxiliaryDataHash = InstanceType<typeof csl.AuxiliaryDataHash>;
9
+ export declare type AuxiliaryDataSet = InstanceType<typeof csl.AuxiliaryDataSet>;
10
+ export declare type BaseAddress = InstanceType<typeof csl.BaseAddress>;
11
+ export declare type BigInt = InstanceType<typeof csl.BigInt>;
12
+ export declare type BigNum = InstanceType<typeof csl.BigNum>;
13
+ export declare type Bip32PrivateKey = InstanceType<typeof csl.Bip32PrivateKey>;
14
+ export declare type Bip32PublicKey = InstanceType<typeof csl.Bip32PublicKey>;
15
+ export declare type Block = InstanceType<typeof csl.Block>;
16
+ export declare type BlockHash = InstanceType<typeof csl.BlockHash>;
17
+ export declare type BootstrapWitness = InstanceType<typeof csl.BootstrapWitness>;
18
+ export declare type BootstrapWitnesses = InstanceType<typeof csl.BootstrapWitnesses>;
19
+ export declare type ByronAddress = InstanceType<typeof csl.ByronAddress>;
20
+ export declare type Certificate = InstanceType<typeof csl.Certificate>;
21
+ export declare type Certificates = InstanceType<typeof csl.Certificates>;
22
+ export declare type ConstrPlutusData = InstanceType<typeof csl.ConstrPlutusData>;
23
+ export declare type CostModel = InstanceType<typeof csl.CostModel>;
24
+ export declare type Costmdls = InstanceType<typeof csl.Costmdls>;
25
+ export declare type DNSRecordAorAAAA = InstanceType<typeof csl.DNSRecordAorAAAA>;
26
+ export declare type DNSRecordSRV = InstanceType<typeof csl.DNSRecordSRV>;
27
+ export declare type DataCost = InstanceType<typeof csl.DataCost>;
28
+ export declare type DataHash = InstanceType<typeof csl.DataHash>;
29
+ export declare type DatumSource = InstanceType<typeof csl.DatumSource>;
30
+ export declare type Ed25519KeyHash = InstanceType<typeof csl.Ed25519KeyHash>;
31
+ export declare type Ed25519KeyHashes = InstanceType<typeof csl.Ed25519KeyHashes>;
32
+ export declare type Ed25519Signature = InstanceType<typeof csl.Ed25519Signature>;
33
+ export declare type EnterpriseAddress = InstanceType<typeof csl.EnterpriseAddress>;
34
+ export declare type ExUnitPrices = InstanceType<typeof csl.ExUnitPrices>;
35
+ export declare type ExUnits = InstanceType<typeof csl.ExUnits>;
36
+ export declare type GeneralTransactionMetadata = InstanceType<typeof csl.GeneralTransactionMetadata>;
37
+ export declare type GenesisDelegateHash = InstanceType<typeof csl.GenesisDelegateHash>;
38
+ export declare type GenesisHash = InstanceType<typeof csl.GenesisHash>;
39
+ export declare type GenesisHashes = InstanceType<typeof csl.GenesisHashes>;
40
+ export declare type GenesisKeyDelegation = InstanceType<typeof csl.GenesisKeyDelegation>;
41
+ export declare type Header = InstanceType<typeof csl.Header>;
42
+ export declare type HeaderBody = InstanceType<typeof csl.HeaderBody>;
43
+ export declare type Int = InstanceType<typeof csl.Int>;
44
+ export declare type Ipv4 = InstanceType<typeof csl.Ipv4>;
45
+ export declare type Ipv6 = InstanceType<typeof csl.Ipv6>;
46
+ export declare type KESSignature = InstanceType<typeof csl.KESSignature>;
47
+ export declare type KESVKey = InstanceType<typeof csl.KESVKey>;
48
+ export declare type Language = InstanceType<typeof csl.Language>;
49
+ export declare type Languages = InstanceType<typeof csl.Languages>;
50
+ export declare type LegacyDaedalusPrivateKey = InstanceType<typeof csl.LegacyDaedalusPrivateKey>;
51
+ export declare type LinearFee = InstanceType<typeof csl.LinearFee>;
52
+ export declare type MIRToStakeCredentials = InstanceType<typeof csl.MIRToStakeCredentials>;
53
+ export declare type MetadataList = InstanceType<typeof csl.MetadataList>;
54
+ export declare type MetadataMap = InstanceType<typeof csl.MetadataMap>;
55
+ export declare type Mint = InstanceType<typeof csl.Mint>;
56
+ export declare type MintAssets = InstanceType<typeof csl.MintAssets>;
57
+ export declare type MintBuilder = InstanceType<typeof csl.MintBuilder>;
58
+ export declare type MintWitness = InstanceType<typeof csl.MintWitness>;
59
+ export declare type MintsAssets = InstanceType<typeof csl.MintsAssets>;
60
+ export declare type MoveInstantaneousReward = InstanceType<typeof csl.MoveInstantaneousReward>;
61
+ export declare type MoveInstantaneousRewardsCert = InstanceType<typeof csl.MoveInstantaneousRewardsCert>;
62
+ export declare type MultiAsset = InstanceType<typeof csl.MultiAsset>;
63
+ export declare type MultiHostName = InstanceType<typeof csl.MultiHostName>;
64
+ export declare type NativeScript = InstanceType<typeof csl.NativeScript>;
65
+ export declare type NativeScripts = InstanceType<typeof csl.NativeScripts>;
66
+ export declare type NetworkId = InstanceType<typeof csl.NetworkId>;
67
+ export declare type NetworkInfo = InstanceType<typeof csl.NetworkInfo>;
68
+ export declare type Nonce = InstanceType<typeof csl.Nonce>;
69
+ export declare type OperationalCert = InstanceType<typeof csl.OperationalCert>;
70
+ export declare type PlutusData = InstanceType<typeof csl.PlutusData>;
71
+ export declare type PlutusList = InstanceType<typeof csl.PlutusList>;
72
+ export declare type PlutusMap = InstanceType<typeof csl.PlutusMap>;
73
+ export declare type PlutusScript = InstanceType<typeof csl.PlutusScript>;
74
+ export declare type PlutusScripts = InstanceType<typeof csl.PlutusScripts>;
75
+ export declare type PlutusScriptSource = InstanceType<typeof csl.PlutusScriptSource>;
76
+ export declare type PlutusWitness = InstanceType<typeof csl.PlutusWitness>;
77
+ export declare type PlutusWitnesses = InstanceType<typeof csl.PlutusWitnesses>;
78
+ export declare type Pointer = InstanceType<typeof csl.Pointer>;
79
+ export declare type PointerAddress = InstanceType<typeof csl.PointerAddress>;
80
+ export declare type PoolMetadata = InstanceType<typeof csl.PoolMetadata>;
81
+ export declare type PoolMetadataHash = InstanceType<typeof csl.PoolMetadataHash>;
82
+ export declare type PoolParams = InstanceType<typeof csl.PoolParams>;
83
+ export declare type PoolRegistration = InstanceType<typeof csl.PoolRegistration>;
84
+ export declare type PoolRetirement = InstanceType<typeof csl.PoolRetirement>;
85
+ export declare type PrivateKey = InstanceType<typeof csl.PrivateKey>;
86
+ export declare type ProposedProtocolParameterUpdates = InstanceType<typeof csl.ProposedProtocolParameterUpdates>;
87
+ export declare type ProtocolParamUpdate = InstanceType<typeof csl.ProtocolParamUpdate>;
88
+ export declare type ProtocolVersion = InstanceType<typeof csl.ProtocolVersion>;
89
+ export declare type PublicKey = InstanceType<typeof csl.PublicKey>;
90
+ export declare type PublicKeys = InstanceType<typeof csl.PublicKeys>;
91
+ export declare type Redeemer = InstanceType<typeof csl.Redeemer>;
92
+ export declare type RedeemerTag = InstanceType<typeof csl.RedeemerTag>;
93
+ export declare type Redeemers = InstanceType<typeof csl.Redeemers>;
94
+ export declare type Relay = InstanceType<typeof csl.Relay>;
95
+ export declare type Relays = InstanceType<typeof csl.Relays>;
96
+ export declare type RewardAddress = InstanceType<typeof csl.RewardAddress>;
97
+ export declare type RewardAddresses = InstanceType<typeof csl.RewardAddresses>;
98
+ export declare type ScriptAll = InstanceType<typeof csl.ScriptAll>;
99
+ export declare type ScriptAny = InstanceType<typeof csl.ScriptAny>;
100
+ export declare type ScriptDataHash = InstanceType<typeof csl.ScriptDataHash>;
101
+ export declare type ScriptHash = InstanceType<typeof csl.ScriptHash>;
102
+ export declare type ScriptHashes = InstanceType<typeof csl.ScriptHashes>;
103
+ export declare type ScriptNOfK = InstanceType<typeof csl.ScriptNOfK>;
104
+ export declare type ScriptPubkey = InstanceType<typeof csl.ScriptPubkey>;
105
+ export declare type ScriptRef = InstanceType<typeof csl.ScriptRef>;
106
+ export declare type SingleHostAddr = InstanceType<typeof csl.SingleHostAddr>;
107
+ export declare type SingleHostName = InstanceType<typeof csl.SingleHostName>;
108
+ export declare type StakeCredential = InstanceType<typeof csl.StakeCredential>;
109
+ export declare type StakeCredentials = InstanceType<typeof csl.StakeCredentials>;
110
+ export declare type StakeDelegation = InstanceType<typeof csl.StakeDelegation>;
111
+ export declare type StakeRegistration = InstanceType<typeof csl.StakeRegistration>;
112
+ export declare type Strings = InstanceType<typeof csl.Strings>;
113
+ export declare type TimelockExpiry = InstanceType<typeof csl.TimelockExpiry>;
114
+ export declare type TimelockStart = InstanceType<typeof csl.TimelockStart>;
115
+ export declare type Transaction = InstanceType<typeof csl.Transaction>;
116
+ export declare type TransactionBodies = InstanceType<typeof csl.TransactionBodies>;
117
+ export declare type TransactionBody = InstanceType<typeof csl.TransactionBody>;
118
+ export declare type TransactionBuilder = InstanceType<typeof csl.TransactionBuilder>;
119
+ export declare type TransactionBuilderConfig = InstanceType<typeof csl.TransactionBuilderConfig>;
120
+ export declare type TransactionBuilderConfigBuilder = InstanceType<typeof csl.TransactionBuilderConfigBuilder>;
121
+ export declare type TransactionHash = InstanceType<typeof csl.TransactionHash>;
122
+ export declare type TransactionInput = InstanceType<typeof csl.TransactionInput>;
123
+ export declare type TransactionInputs = InstanceType<typeof csl.TransactionInputs>;
124
+ export declare type TransactionMetadatum = InstanceType<typeof csl.TransactionMetadatum>;
125
+ export declare type TransactionMetadatumLabels = InstanceType<typeof csl.TransactionMetadatumLabels>;
126
+ export declare type TransactionOutput = InstanceType<typeof csl.TransactionOutput>;
127
+ export declare type TransactionOutputAmountBuilder = InstanceType<typeof csl.TransactionOutputAmountBuilder>;
128
+ export declare type TransactionOutputBuilder = InstanceType<typeof csl.TransactionOutputBuilder>;
129
+ export declare type TransactionOutputs = InstanceType<typeof csl.TransactionOutputs>;
130
+ export declare type TransactionUnspentOutput = InstanceType<typeof csl.TransactionUnspentOutput>;
131
+ export declare type TransactionUnspentOutputs = InstanceType<typeof csl.TransactionUnspentOutputs>;
132
+ export declare type TransactionWitnessSet = InstanceType<typeof csl.TransactionWitnessSet>;
133
+ export declare type TransactionWitnessSets = InstanceType<typeof csl.TransactionWitnessSets>;
134
+ export declare type TxBuilderConstants = InstanceType<typeof csl.TxBuilderConstants>;
135
+ export declare type TxInputsBuilder = InstanceType<typeof csl.TxInputsBuilder>;
136
+ export declare type URL = InstanceType<typeof csl.URL>;
137
+ export declare type UnitInterval = InstanceType<typeof csl.UnitInterval>;
138
+ export declare type Update = InstanceType<typeof csl.Update>;
139
+ export declare type VRFCert = InstanceType<typeof csl.VRFCert>;
140
+ export declare type VRFKeyHash = InstanceType<typeof csl.VRFKeyHash>;
141
+ export declare type VRFVKey = InstanceType<typeof csl.VRFVKey>;
142
+ export declare type Value = InstanceType<typeof csl.Value>;
143
+ export declare type Vkey = InstanceType<typeof csl.Vkey>;
144
+ export declare type Vkeys = InstanceType<typeof csl.Vkeys>;
145
+ export declare type Vkeywitness = InstanceType<typeof csl.Vkeywitness>;
146
+ export declare type Vkeywitnesses = InstanceType<typeof csl.Vkeywitnesses>;
147
+ export declare type Withdrawals = InstanceType<typeof csl.Withdrawals>;
@@ -0,0 +1,10 @@
1
+ export * from './CIP2';
2
+ export * from './CIP8';
3
+ export * from './CIP14';
4
+ export * from './CIP25';
5
+ export * from './CIP27';
6
+ export * from './CIP1852';
7
+ export * from './CIP1853';
8
+ export * from './CIP1855';
9
+ export * from './CPS0009';
10
+ export * from './CSL';