@meshsdk/core 1.5.16 → 1.6.0-alpha.2

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 (75) hide show
  1. package/dist/common/utils/builder.d.ts +2 -2
  2. package/dist/common/utils/converter.d.ts +1 -1
  3. package/dist/common/utils/deserializer.d.ts +1 -1
  4. package/dist/core/CIP1852.d.ts +2 -2
  5. package/dist/core/CIP1853.d.ts +1 -1
  6. package/dist/core/CIP1855.d.ts +1 -1
  7. package/dist/core/{CPS-009.d.ts → CPS0009.d.ts} +1 -1
  8. package/dist/core/CSL.d.ts +2 -2
  9. package/dist/core/index.d.ts +1 -0
  10. package/dist/core.cjs +18 -8
  11. package/dist/core.js +19529 -2824
  12. package/dist/serializer/index.d.ts +1 -0
  13. package/dist/wallet/mina.service.d.ts +1 -1
  14. package/package.json +3 -4
  15. package/dist/common/constants.d.ts +0 -58
  16. package/dist/common/contracts/evaluator.d.ts +0 -4
  17. package/dist/common/contracts/fetcher.d.ts +0 -22
  18. package/dist/common/contracts/index.d.ts +0 -7
  19. package/dist/common/contracts/initiator.d.ts +0 -8
  20. package/dist/common/contracts/listener.d.ts +0 -3
  21. package/dist/common/contracts/signer.d.ts +0 -8
  22. package/dist/common/contracts/submitter.d.ts +0 -3
  23. package/dist/common/contracts/uploader.d.ts +0 -3
  24. package/dist/common/helpers/generateNonce.d.ts +0 -1
  25. package/dist/common/helpers/index.d.ts +0 -4
  26. package/dist/common/helpers/readPlutusData.d.ts +0 -2
  27. package/dist/common/helpers/readTransaction.d.ts +0 -2
  28. package/dist/common/types/Account.d.ts +0 -5
  29. package/dist/common/types/AccountInfo.d.ts +0 -7
  30. package/dist/common/types/Action.d.ts +0 -12
  31. package/dist/common/types/Asset.d.ts +0 -6
  32. package/dist/common/types/AssetExtended.d.ts +0 -8
  33. package/dist/common/types/AssetMetadata.d.ts +0 -24
  34. package/dist/common/types/BlockInfo.d.ts +0 -17
  35. package/dist/common/types/Data.d.ts +0 -4
  36. package/dist/common/types/DataSignature.d.ts +0 -4
  37. package/dist/common/types/Era.d.ts +0 -1
  38. package/dist/common/types/Mint.d.ts +0 -10
  39. package/dist/common/types/NativeScript.d.ts +0 -14
  40. package/dist/common/types/Network.d.ts +0 -4
  41. package/dist/common/types/PlutusScript.d.ts +0 -6
  42. package/dist/common/types/PoolParams.d.ts +0 -16
  43. package/dist/common/types/Protocol.d.ts +0 -22
  44. package/dist/common/types/Recipient.d.ts +0 -11
  45. package/dist/common/types/Relay.d.ts +0 -13
  46. package/dist/common/types/Token.d.ts +0 -2
  47. package/dist/common/types/TransactionInfo.d.ts +0 -11
  48. package/dist/common/types/UTxO.d.ts +0 -15
  49. package/dist/common/types/Wallet.d.ts +0 -5
  50. package/dist/common/types/index.d.ts +0 -22
  51. package/dist/common/utils/parser.d.ts +0 -5
  52. package/dist/common/utils/resolver.d.ts +0 -17
  53. package/dist/core/CIP2.d.ts +0 -4
  54. package/dist/core/CIP8.d.ts +0 -15
  55. package/dist/index.d.ts +0 -11
  56. package/dist/providers/blockfrost.provider.d.ts +0 -46
  57. package/dist/providers/index.d.ts +0 -6
  58. package/dist/providers/infura.provider.d.ts +0 -12
  59. package/dist/providers/koios.provider.d.ts +0 -27
  60. package/dist/providers/maestro.provider.d.ts +0 -35
  61. package/dist/providers/ogmios.provider.d.ts +0 -12
  62. package/dist/providers/tango.provider.d.ts +0 -25
  63. package/dist/scripts/forge.script.d.ts +0 -8
  64. package/dist/scripts/index.d.ts +0 -1
  65. package/dist/transaction/index.d.ts +0 -2
  66. package/dist/transaction/meshTxBuilder/index.d.ts +0 -2
  67. package/dist/transaction/meshTxBuilder/meshTxBuilder.service.d.ts +0 -47
  68. package/dist/transaction/meshTxBuilder/meshTxBuilderCore.d.ts +0 -320
  69. package/dist/transaction/meshTxBuilder/type.d.ts +0 -128
  70. package/dist/transaction/transaction.service.d.ts +0 -150
  71. package/dist/wallet/app.service.d.ts +0 -36
  72. package/dist/wallet/browser.service.d.ts +0 -75
  73. package/dist/wallet/embedded.service.d.ts +0 -20
  74. package/dist/wallet/index.d.ts +0 -3
  75. /package/dist/{common/helpers/mergeSignatures.d.ts → serializer/signatures.d.ts} +0 -0
@@ -0,0 +1 @@
1
+ export * from './signatures';
@@ -1,4 +1,4 @@
1
- import type { UTxO } from '@mesh/common/types';
1
+ import type { UTxO } from '@mesh/types';
2
2
  export declare class MinaWallet {
3
3
  static getAxiosInstance(): import("axios").AxiosInstance;
4
4
  static getAppId(): string;
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "Rapidly build Web3 apps on the Cardano Blockchain.",
4
4
  "homepage": "https://meshjs.dev",
5
5
  "author": "MeshJS",
6
- "version": "1.5.16",
6
+ "version": "1.6.0-alpha.2",
7
7
  "license": "Apache-2.0",
8
8
  "type": "module",
9
9
  "repository": {
@@ -45,7 +45,7 @@
45
45
  },
46
46
  "browser": {
47
47
  "@emurgo/cardano-message-signing-nodejs": "@emurgo/cardano-message-signing-browser",
48
- "@emurgo/cardano-serialization-lib-nodejs": "@emurgo/cardano-serialization-lib-browser"
48
+ "@sidan-lab/sidan-csl-rs-nodejs": "@sidan-lab/sidan-csl-rs-browser"
49
49
  },
50
50
  "exports": {
51
51
  ".": {
@@ -70,9 +70,8 @@
70
70
  "dependencies": {
71
71
  "@emurgo/cardano-message-signing-browser": "1.0.1",
72
72
  "@emurgo/cardano-message-signing-nodejs": "1.0.1",
73
- "@emurgo/cardano-serialization-lib-browser": "11.5.0",
74
- "@emurgo/cardano-serialization-lib-nodejs": "11.5.0",
75
73
  "@emurgo/cip14-js": "3.0.1",
74
+ "@meshsdk/mesh-csl": "^0.0.5",
76
75
  "axios": "1.6.3",
77
76
  "bip39": "3.0.4",
78
77
  "json-bigint": "^1.0.0",
@@ -1,58 +0,0 @@
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[];
@@ -1,4 +0,0 @@
1
- import { Action } from '@mesh/common/types';
2
- export interface IEvaluator {
3
- evaluateTx(tx: string): Promise<Omit<Action, 'data'>[]>;
4
- }
@@ -1,22 +0,0 @@
1
- import type { AccountInfo, Asset, AssetMetadata, BlockInfo, Protocol, TransactionInfo, UTxO } from '@mesh/common/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
- }
@@ -1,7 +0,0 @@
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';
@@ -1,8 +0,0 @@
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 {};
@@ -1,3 +0,0 @@
1
- export interface IListener {
2
- onTxConfirmed(txHash: string, callback: () => void, limit?: number): void;
3
- }
@@ -1,8 +0,0 @@
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
- signTxs(unsignedTxs: string[], partialSign: boolean): SometimesPromise<string[]>;
6
- }
7
- declare type SometimesPromise<T> = Promise<T> | T;
8
- export {};
@@ -1,3 +0,0 @@
1
- export interface ISubmitter {
2
- submitTx(tx: string): Promise<string>;
3
- }
@@ -1,3 +0,0 @@
1
- export interface IUploader {
2
- uploadContent(content: FormData, recursive: boolean): Promise<string>;
3
- }
@@ -1 +0,0 @@
1
- export declare const generateNonce: (label?: string, length?: number) => string;
@@ -1,4 +0,0 @@
1
- export * from './generateNonce';
2
- export * from './mergeSignatures';
3
- export * from './readPlutusData';
4
- export * from './readTransaction';
@@ -1,2 +0,0 @@
1
- import type { Data } from '@mesh/common/types';
2
- export declare const readPlutusData: (plutusData: string) => Data;
@@ -1,2 +0,0 @@
1
- import { csl } from '@mesh/core';
2
- export declare const readTransaction: (tx: string) => csl.TransactionJSON;
@@ -1,5 +0,0 @@
1
- export declare type Account = {
2
- baseAddress: string;
3
- enterpriseAddress: string;
4
- rewardAddress: string;
5
- };
@@ -1,7 +0,0 @@
1
- export declare type AccountInfo = {
2
- active: boolean;
3
- poolId?: string;
4
- balance: string;
5
- rewards: string;
6
- withdrawals: string;
7
- };
@@ -1,12 +0,0 @@
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
- };
@@ -1,6 +0,0 @@
1
- export declare type Asset = {
2
- unit: Unit;
3
- quantity: Quantity;
4
- };
5
- export declare type Unit = string;
6
- export declare type Quantity = string;
@@ -1,8 +0,0 @@
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
- };
@@ -1,24 +0,0 @@
1
- import type { MetadataStandard, Files, RoyaltiesStandard } from '@mesh/core';
2
- export declare type AssetMetadata = FungibleAssetMetadata | NonFungibleAssetMetadata | RoyaltiesStandard;
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 {};
@@ -1,17 +0,0 @@
1
- export declare type BlockInfo = {
2
- time: number;
3
- hash: string;
4
- slot: string;
5
- epoch: number;
6
- epochSlot: string;
7
- slotLeader: string;
8
- size: number;
9
- txCount: number;
10
- output: string;
11
- fees: string;
12
- previousBlock: string;
13
- nextBlock: string;
14
- confirmations: number;
15
- operationalCertificate: string;
16
- VRFKey: string;
17
- };
@@ -1,4 +0,0 @@
1
- export declare type Data = string | number | bigint | Array<Data> | Map<Data, Data> | {
2
- alternative: number;
3
- fields: Array<Data>;
4
- };
@@ -1,4 +0,0 @@
1
- export declare type DataSignature = {
2
- signature: string;
3
- key: string;
4
- };
@@ -1 +0,0 @@
1
- export declare type Era = 'ALONZO' | 'BABBAGE';
@@ -1,10 +0,0 @@
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' | '777' | `${number}`;
10
- };
@@ -1,14 +0,0 @@
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
- };
@@ -1,4 +0,0 @@
1
- declare const ALL_NETWORKS: readonly ["testnet", "preview", "preprod", "mainnet"];
2
- export declare type Network = typeof ALL_NETWORKS[number];
3
- export declare const isNetwork: (value: unknown) => value is "testnet" | "preview" | "preprod" | "mainnet";
4
- export {};
@@ -1,6 +0,0 @@
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;
@@ -1,16 +0,0 @@
1
- import { Relay } from './Relay';
2
- export declare type PoolParams = {
3
- VRFKeyHash: string;
4
- operator: string;
5
- pledge: string;
6
- cost: string;
7
- margin: number;
8
- relays: Relay[];
9
- owners: string[];
10
- rewardAddress: string;
11
- metadata?: PoolMetadata;
12
- };
13
- export declare type PoolMetadata = {
14
- URL: string;
15
- hash: string;
16
- };
@@ -1,22 +0,0 @@
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
- };
@@ -1,11 +0,0 @@
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
- };
@@ -1,13 +0,0 @@
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
- };
@@ -1,2 +0,0 @@
1
- import { SUPPORTED_TOKENS } from '@mesh/common/constants';
2
- export declare type Token = keyof typeof SUPPORTED_TOKENS;
@@ -1,11 +0,0 @@
1
- export declare type TransactionInfo = {
2
- index: number;
3
- block: string;
4
- hash: string;
5
- slot: string;
6
- fees: string;
7
- size: number;
8
- deposit: string;
9
- invalidBefore: string;
10
- invalidAfter: string;
11
- };
@@ -1,15 +0,0 @@
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
- scriptHash?: string;
14
- };
15
- };
@@ -1,5 +0,0 @@
1
- export declare type Wallet = {
2
- name: string;
3
- icon: string;
4
- version: string;
5
- };
@@ -1,22 +0,0 @@
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 './BlockInfo';
8
- export * from './Data';
9
- export * from './DataSignature';
10
- export * from './Era';
11
- export * from './Mint';
12
- export * from './NativeScript';
13
- export * from './Network';
14
- export * from './PlutusScript';
15
- export * from './PoolParams';
16
- export * from './Protocol';
17
- export * from './Recipient';
18
- export * from './Relay';
19
- export * from './Token';
20
- export * from './TransactionInfo';
21
- export * from './UTxO';
22
- export * from './Wallet';
@@ -1,5 +0,0 @@
1
- export declare const parseAssetUnit: (unit: string) => {
2
- policyId: string;
3
- assetName: string;
4
- };
5
- export declare const parseHttpError: (error: unknown) => string;
@@ -1,17 +0,0 @@
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;
@@ -1,4 +0,0 @@
1
- import type { Protocol, Quantity, Unit, UTxO } from '@mesh/common/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[];
@@ -1,15 +0,0 @@
1
- import type { DataSignature } from '@mesh/common/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
- };
package/dist/index.d.ts DELETED
@@ -1,11 +0,0 @@
1
- export * from './common/contracts';
2
- export * from './common/types';
3
- export { generateNonce, readPlutusData, readTransaction, } from './common/helpers';
4
- export * from './common/utils/resolver';
5
- export * from './common/utils/parser';
6
- export * from './core/CIP2';
7
- export { checkSignature } from './core/CIP8';
8
- export * from './providers';
9
- export * from './scripts';
10
- export * from './transaction';
11
- export * from './wallet';
@@ -1,46 +0,0 @@
1
- import { IFetcher, IListener, ISubmitter } from '@mesh/common/contracts';
2
- import type { AccountInfo, Asset, AssetMetadata, BlockInfo, Protocol, TransactionInfo, UTxO } from '@mesh/common/types';
3
- /**
4
- * [Blockfrost](https://blockfrost.io/) provides restful APIs which allows your app to access information stored on the blockchain.
5
- *
6
- * Get started:
7
- * ```ts
8
- * const blockfrostProvider = new BlockfrostProvider('<BLOCKFROST_API_KEY>');
9
- * ```
10
- */
11
- export declare class BlockfrostProvider implements IFetcher, IListener, ISubmitter {
12
- private readonly _axiosInstance;
13
- /**
14
- * If you are using a privately hosted Blockfrost instance, you can set the URL in the parameter.
15
- * @param baseUrl The base URL of the instance.
16
- */
17
- constructor(baseUrl: string);
18
- /**
19
- * If you are using [Blockfrost](https://blockfrost.io/) hosted instance, you can set the project ID in the parameter.
20
- * @param projectId The project ID of the instance.
21
- * @param version The version of the API. Default is 0.
22
- */
23
- constructor(projectId: string, version?: number);
24
- fetchAccountInfo(address: string): Promise<AccountInfo>;
25
- private resolveScriptRef;
26
- private toUTxO;
27
- fetchAddressUTxOs(address: string, asset?: string): Promise<UTxO[]>;
28
- fetchAssetAddresses(asset: string): Promise<{
29
- address: string;
30
- quantity: string;
31
- }[]>;
32
- fetchAssetMetadata(asset: string): Promise<AssetMetadata>;
33
- fetchBlockInfo(hash: string): Promise<BlockInfo>;
34
- fetchCollectionAssets(policyId: string, cursor?: number): Promise<{
35
- assets: Asset[];
36
- next: string | number | null;
37
- }>;
38
- fetchHandleAddress(handle: string): Promise<string>;
39
- fetchProtocolParameters(epoch?: number): Promise<Protocol>;
40
- fetchTxInfo(hash: string): Promise<TransactionInfo>;
41
- fetchUTxOs(hash: string): Promise<UTxO[]>;
42
- onTxConfirmed(txHash: string, callback: () => void, limit?: number): void;
43
- submitTx(tx: string): Promise<string>;
44
- private fetchPlutusScriptCBOR;
45
- private fetchNativeScriptJSON;
46
- }
@@ -1,6 +0,0 @@
1
- export * from './blockfrost.provider';
2
- export * from './infura.provider';
3
- export * from './koios.provider';
4
- export * from './ogmios.provider';
5
- export * from './tango.provider';
6
- export * from './maestro.provider';
@@ -1,12 +0,0 @@
1
- import { IUploader } from '@mesh/common/contracts';
2
- export declare class InfuraProvider implements IUploader {
3
- private _axiosInstance;
4
- constructor(projectId: string, projectSecret: string, options: Partial<CreateInfuraProviderOptions>);
5
- uploadContent(content: FormData, recursive?: boolean): Promise<string>;
6
- }
7
- declare type CreateInfuraProviderOptions = {
8
- host: string;
9
- port: number;
10
- version: number;
11
- };
12
- export {};
@@ -1,27 +0,0 @@
1
- import { IFetcher, IListener, ISubmitter } from '@mesh/common/contracts';
2
- import type { AccountInfo, Asset, AssetMetadata, BlockInfo, Protocol, TransactionInfo, UTxO } from '@mesh/common/types';
3
- export declare class KoiosProvider implements IFetcher, IListener, ISubmitter {
4
- private readonly _axiosInstance;
5
- constructor(baseUrl: string);
6
- constructor(network: 'api' | 'preview' | 'preprod' | 'guild', token: string, version?: number);
7
- fetchAccountInfo(address: string): Promise<AccountInfo>;
8
- fetchAddressUTxOs(address: string, asset?: string): Promise<UTxO[]>;
9
- fetchAssetAddresses(asset: string): Promise<{
10
- address: string;
11
- quantity: string;
12
- }[]>;
13
- fetchAssetMetadata(asset: string): Promise<AssetMetadata>;
14
- fetchBlockInfo(hash: string): Promise<BlockInfo>;
15
- fetchCollectionAssets(policyId: string, cursor?: number): Promise<{
16
- assets: Asset[];
17
- next: string | number | null;
18
- }>;
19
- fetchHandleAddress(handle: string): Promise<string>;
20
- fetchProtocolParameters(epoch: number): Promise<Protocol>;
21
- fetchTxInfo(hash: string): Promise<TransactionInfo>;
22
- fetchUTxOs(hash: string): Promise<UTxO[]>;
23
- onTxConfirmed(txHash: string, callback: () => void, limit?: number): void;
24
- submitTx(tx: string): Promise<string>;
25
- private toUTxO;
26
- private resolveScriptRef;
27
- }