@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.
- package/dist/common/utils/builder.d.ts +2 -2
- package/dist/common/utils/converter.d.ts +1 -1
- package/dist/common/utils/deserializer.d.ts +1 -1
- package/dist/core/CIP1852.d.ts +2 -2
- package/dist/core/CIP1853.d.ts +1 -1
- package/dist/core/CIP1855.d.ts +1 -1
- package/dist/core/{CPS-009.d.ts → CPS0009.d.ts} +1 -1
- package/dist/core/CSL.d.ts +2 -2
- package/dist/core/index.d.ts +1 -0
- package/dist/core.cjs +18 -8
- package/dist/core.js +19529 -2824
- package/dist/serializer/index.d.ts +1 -0
- package/dist/wallet/mina.service.d.ts +1 -1
- package/package.json +3 -4
- package/dist/common/constants.d.ts +0 -58
- package/dist/common/contracts/evaluator.d.ts +0 -4
- package/dist/common/contracts/fetcher.d.ts +0 -22
- package/dist/common/contracts/index.d.ts +0 -7
- package/dist/common/contracts/initiator.d.ts +0 -8
- package/dist/common/contracts/listener.d.ts +0 -3
- package/dist/common/contracts/signer.d.ts +0 -8
- package/dist/common/contracts/submitter.d.ts +0 -3
- package/dist/common/contracts/uploader.d.ts +0 -3
- package/dist/common/helpers/generateNonce.d.ts +0 -1
- package/dist/common/helpers/index.d.ts +0 -4
- package/dist/common/helpers/readPlutusData.d.ts +0 -2
- package/dist/common/helpers/readTransaction.d.ts +0 -2
- package/dist/common/types/Account.d.ts +0 -5
- package/dist/common/types/AccountInfo.d.ts +0 -7
- package/dist/common/types/Action.d.ts +0 -12
- package/dist/common/types/Asset.d.ts +0 -6
- package/dist/common/types/AssetExtended.d.ts +0 -8
- package/dist/common/types/AssetMetadata.d.ts +0 -24
- package/dist/common/types/BlockInfo.d.ts +0 -17
- package/dist/common/types/Data.d.ts +0 -4
- package/dist/common/types/DataSignature.d.ts +0 -4
- package/dist/common/types/Era.d.ts +0 -1
- package/dist/common/types/Mint.d.ts +0 -10
- package/dist/common/types/NativeScript.d.ts +0 -14
- package/dist/common/types/Network.d.ts +0 -4
- package/dist/common/types/PlutusScript.d.ts +0 -6
- package/dist/common/types/PoolParams.d.ts +0 -16
- package/dist/common/types/Protocol.d.ts +0 -22
- package/dist/common/types/Recipient.d.ts +0 -11
- package/dist/common/types/Relay.d.ts +0 -13
- package/dist/common/types/Token.d.ts +0 -2
- package/dist/common/types/TransactionInfo.d.ts +0 -11
- package/dist/common/types/UTxO.d.ts +0 -15
- package/dist/common/types/Wallet.d.ts +0 -5
- package/dist/common/types/index.d.ts +0 -22
- package/dist/common/utils/parser.d.ts +0 -5
- package/dist/common/utils/resolver.d.ts +0 -17
- package/dist/core/CIP2.d.ts +0 -4
- package/dist/core/CIP8.d.ts +0 -15
- package/dist/index.d.ts +0 -11
- package/dist/providers/blockfrost.provider.d.ts +0 -46
- package/dist/providers/index.d.ts +0 -6
- package/dist/providers/infura.provider.d.ts +0 -12
- package/dist/providers/koios.provider.d.ts +0 -27
- package/dist/providers/maestro.provider.d.ts +0 -35
- package/dist/providers/ogmios.provider.d.ts +0 -12
- package/dist/providers/tango.provider.d.ts +0 -25
- package/dist/scripts/forge.script.d.ts +0 -8
- package/dist/scripts/index.d.ts +0 -1
- package/dist/transaction/index.d.ts +0 -2
- package/dist/transaction/meshTxBuilder/index.d.ts +0 -2
- package/dist/transaction/meshTxBuilder/meshTxBuilder.service.d.ts +0 -47
- package/dist/transaction/meshTxBuilder/meshTxBuilderCore.d.ts +0 -320
- package/dist/transaction/meshTxBuilder/type.d.ts +0 -128
- package/dist/transaction/transaction.service.d.ts +0 -150
- package/dist/wallet/app.service.d.ts +0 -36
- package/dist/wallet/browser.service.d.ts +0 -75
- package/dist/wallet/embedded.service.d.ts +0 -20
- package/dist/wallet/index.d.ts +0 -3
- /package/dist/{common/helpers/mergeSignatures.d.ts → serializer/signatures.d.ts} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './signatures';
|
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.
|
|
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
|
-
"@
|
|
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,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,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,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 +0,0 @@
|
|
|
1
|
-
export declare const generateNonce: (label?: string, length?: number) => string;
|
|
@@ -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,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 +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,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,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,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,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;
|
package/dist/core/CIP2.d.ts
DELETED
|
@@ -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[];
|
package/dist/core/CIP8.d.ts
DELETED
|
@@ -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,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
|
-
}
|