@meshsdk/core 1.6.0-alpha.2 → 1.6.0-alpha.21
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/.turbo/turbo-build$colon$mesh.log +19 -0
- package/.turbo/turbo-build.log +19 -0
- package/README.md +3 -30
- package/dist/index.d.mts +129 -0
- package/dist/index.d.ts +129 -0
- package/dist/index.js +149 -0
- package/dist/index.mjs +91 -0
- package/package.json +28 -71
- package/src/core.ts +3 -0
- package/src/index.ts +6 -0
- package/src/utils/deserializer.ts +23 -0
- package/src/utils/index.ts +3 -0
- package/src/utils/resolver.ts +126 -0
- package/src/utils/serializer.ts +70 -0
- package/tsconfig.json +5 -0
- package/dist/common/decorators.d.ts +0 -19
- package/dist/common/utils/builder.d.ts +0 -18
- package/dist/common/utils/converter.d.ts +0 -27
- package/dist/common/utils/deserializer.d.ts +0 -19
- package/dist/common/utils/index.d.ts +0 -5
- package/dist/core/CIP14.d.ts +0 -2
- package/dist/core/CIP1852.d.ts +0 -4
- package/dist/core/CIP1853.d.ts +0 -1
- package/dist/core/CIP1855.d.ts +0 -1
- package/dist/core/CIP25.d.ts +0 -19
- package/dist/core/CIP27.d.ts +0 -4
- package/dist/core/CPS0009.d.ts +0 -2
- package/dist/core/CSL.d.ts +0 -147
- package/dist/core/index.d.ts +0 -10
- package/dist/core.cjs +0 -18
- package/dist/core.js +0 -21828
- package/dist/serializer/index.d.ts +0 -1
- package/dist/serializer/signatures.d.ts +0 -3
- package/dist/transaction/meshTxBuilder/meshTxBuilder.spec.d.ts +0 -1
- package/dist/transaction/transaction.service.spec.d.ts +0 -1
- package/dist/wallet/app.service.spec.d.ts +0 -1
- package/dist/wallet/browser.service.spec.d.ts +0 -1
- package/dist/wallet/embedded.service.spec.d.ts +0 -1
- package/dist/wallet/mina.service.d.ts +0 -11
- package/dist/wallet/mina.service.spec.d.ts +0 -1
package/package.json
CHANGED
|
@@ -1,81 +1,38 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@meshsdk/core",
|
|
3
|
-
"
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
"
|
|
7
|
-
"
|
|
8
|
-
"type": "module",
|
|
9
|
-
"repository": {
|
|
10
|
-
"type": "git",
|
|
11
|
-
"url": "git+https://github.com/MeshJS/mesh.git"
|
|
12
|
-
},
|
|
13
|
-
"bugs": {
|
|
14
|
-
"url": "https://github.com/MeshJS/mesh/issues"
|
|
15
|
-
},
|
|
16
|
-
"keywords": [
|
|
17
|
-
"blockchain",
|
|
18
|
-
"cardano",
|
|
19
|
-
"plutus"
|
|
20
|
-
],
|
|
21
|
-
"main": "dist/core.cjs",
|
|
22
|
-
"module": "dist/core.js",
|
|
23
|
-
"typings": "dist/index.d.ts",
|
|
24
|
-
"files": [
|
|
25
|
-
"dist"
|
|
26
|
-
],
|
|
27
|
-
"engines": {
|
|
28
|
-
"node": ">=16"
|
|
29
|
-
},
|
|
30
|
-
"scripts": {
|
|
31
|
-
"lint": "eslint --ext .ts .",
|
|
32
|
-
"test": "vitest --run",
|
|
33
|
-
"test:watch": "vitest",
|
|
34
|
-
"test:coverage": "vitest run --coverage",
|
|
35
|
-
"build": "vite build && yarn docs",
|
|
36
|
-
"prepare": "yarn lint && yarn test && yarn build",
|
|
37
|
-
"dev": "vite build --watch",
|
|
38
|
-
"docs": "typedoc src/index.ts --json ../docs/src/data/api.json",
|
|
39
|
-
"docs2": "typedoc src/index.ts --out ../docs/tmp"
|
|
40
|
-
},
|
|
41
|
-
"husky": {
|
|
42
|
-
"hooks": {
|
|
43
|
-
"pre-commit": "yarn lint"
|
|
44
|
-
}
|
|
45
|
-
},
|
|
46
|
-
"browser": {
|
|
47
|
-
"@emurgo/cardano-message-signing-nodejs": "@emurgo/cardano-message-signing-browser",
|
|
48
|
-
"@sidan-lab/sidan-csl-rs-nodejs": "@sidan-lab/sidan-csl-rs-browser"
|
|
49
|
-
},
|
|
3
|
+
"version": "1.6.0-alpha.21",
|
|
4
|
+
"description": "",
|
|
5
|
+
"main": "./dist/index.js",
|
|
6
|
+
"module": "./dist/index.mjs",
|
|
7
|
+
"types": "./dist/index.d.ts",
|
|
50
8
|
"exports": {
|
|
51
9
|
".": {
|
|
52
|
-
"import": "./dist/
|
|
53
|
-
"require": "./dist/
|
|
54
|
-
"types": "./dist/index.d.ts"
|
|
10
|
+
"import": "./dist/index.mjs",
|
|
11
|
+
"require": "./dist/index.js"
|
|
55
12
|
}
|
|
56
13
|
},
|
|
14
|
+
"scripts": {
|
|
15
|
+
"build:mesh": "tsup src/index.ts --format esm,cjs --dts",
|
|
16
|
+
"dev": "tsup src/index.ts --format esm,cjs --watch --dts",
|
|
17
|
+
"lint": "eslint",
|
|
18
|
+
"clean": "rm -rf .turbo && rm -rf dist && rm -rf node_modules",
|
|
19
|
+
"format": "prettier --check . --ignore-path ../../.gitignore"
|
|
20
|
+
},
|
|
57
21
|
"devDependencies": {
|
|
58
|
-
"@
|
|
59
|
-
"@typescript-
|
|
60
|
-
"
|
|
61
|
-
"
|
|
62
|
-
"
|
|
63
|
-
"tslib": "2.4.0",
|
|
64
|
-
"typedoc": "^0.25.8",
|
|
65
|
-
"vite": "3.1.4",
|
|
66
|
-
"vite-plugin-eslint": "1.8.1",
|
|
67
|
-
"vite-plugin-wasm": "2.1.0",
|
|
68
|
-
"vitest": "0.22.1"
|
|
22
|
+
"@meshsdk/eslint-config": "workspace:*",
|
|
23
|
+
"@meshsdk/typescript-config": "workspace:*",
|
|
24
|
+
"eslint": "^8.57.0",
|
|
25
|
+
"tsup": "^8.0.2",
|
|
26
|
+
"typescript": "^5.3.3"
|
|
69
27
|
},
|
|
70
28
|
"dependencies": {
|
|
71
|
-
"@
|
|
72
|
-
"@
|
|
73
|
-
"@
|
|
74
|
-
"@meshsdk/
|
|
75
|
-
"
|
|
76
|
-
"
|
|
77
|
-
"
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
}
|
|
29
|
+
"@meshsdk/common": "workspace:*",
|
|
30
|
+
"@meshsdk/core-csl": "workspace:*",
|
|
31
|
+
"@meshsdk/core-cst": "workspace:*",
|
|
32
|
+
"@meshsdk/provider": "workspace:*",
|
|
33
|
+
"@meshsdk/react": "workspace:*",
|
|
34
|
+
"@meshsdk/transaction": "workspace:*",
|
|
35
|
+
"@meshsdk/wallet": "workspace:*"
|
|
36
|
+
},
|
|
37
|
+
"prettier": "@meshsdk/prettier-config"
|
|
81
38
|
}
|
package/src/core.ts
ADDED
package/src/index.ts
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { DeserializedAddress } from "@meshsdk/common";
|
|
2
|
+
|
|
3
|
+
import { core } from "../core";
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Deserialize bech32 address into payment and staking parts, with visibility of whether they are script or key hash
|
|
7
|
+
* @param bech32 The bech32 address
|
|
8
|
+
* @returns The deserialized address object:
|
|
9
|
+
*
|
|
10
|
+
* ```ts
|
|
11
|
+
* const { pubKeyHash, scriptHash, stakeCredentialHash, stakeScriptCredentialHash } = deserializeAddress(bech32Address);
|
|
12
|
+
* ```
|
|
13
|
+
*/
|
|
14
|
+
export const deserializeAddress = (bech32: string): DeserializedAddress =>
|
|
15
|
+
core.deserializeBech32Address(bech32);
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Deserialize a datum from a CBOR string to JSON object
|
|
19
|
+
* @param datumCbor The CBOR string
|
|
20
|
+
* @returns The deserialized JSON object
|
|
21
|
+
*/
|
|
22
|
+
export const deserializeDatum = <T = any>(datumCbor: string): T =>
|
|
23
|
+
core.parseDatumCbor(datumCbor);
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Data,
|
|
3
|
+
LanguageVersion,
|
|
4
|
+
NativeScript,
|
|
5
|
+
PlutusScript,
|
|
6
|
+
} from "@meshsdk/common";
|
|
7
|
+
import {
|
|
8
|
+
deserializeNativeScript,
|
|
9
|
+
deserializePlutusScript,
|
|
10
|
+
} from "@meshsdk/core-csl";
|
|
11
|
+
|
|
12
|
+
import { core } from "../core";
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Resolve the private key from mnemonic words
|
|
16
|
+
*
|
|
17
|
+
* Update pending to support resolving a tree of private key
|
|
18
|
+
*
|
|
19
|
+
* @param words The mnemonic words
|
|
20
|
+
* @returns The private key
|
|
21
|
+
*/
|
|
22
|
+
export const resolvePrivateKey = (words: string[]) =>
|
|
23
|
+
core.resolvePrivateKey(words);
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Resolve the transaction hash from transaction hex
|
|
27
|
+
* @param txHex The transaction hex
|
|
28
|
+
* @returns The transaction hash
|
|
29
|
+
*/
|
|
30
|
+
export const resolveTxHash = (txHex: string) => core.calculateTxHash(txHex);
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Hash Cardano data
|
|
34
|
+
* @param data Cardano data in Mesh Data type
|
|
35
|
+
* @returns Cardano data hash
|
|
36
|
+
*/
|
|
37
|
+
export const resolveDataHash = (data: Data) => core.resolveDataHash(data);
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Hash Cardano native script
|
|
41
|
+
* @param script Cardano native script in Mesh NativeScript type
|
|
42
|
+
* @returns Cardano native script hash
|
|
43
|
+
*/
|
|
44
|
+
export const resolveNativeScriptHash = (script: NativeScript) =>
|
|
45
|
+
core.resolveNativeScriptHash(script);
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Converting script cbor hex to script hash
|
|
49
|
+
* @param scriptCode The script cbor hex
|
|
50
|
+
* @param version The language version of the plutus script, without providing indicates it is a native script
|
|
51
|
+
* @returns The script hash
|
|
52
|
+
*/
|
|
53
|
+
export const resolveScriptHash = (
|
|
54
|
+
scriptCode: string,
|
|
55
|
+
version?: LanguageVersion,
|
|
56
|
+
): string => {
|
|
57
|
+
if (!version) {
|
|
58
|
+
return deserializeNativeScript(scriptCode).hash().to_hex();
|
|
59
|
+
}
|
|
60
|
+
return deserializePlutusScript(scriptCode, version).hash().to_hex();
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Resolve the pool id from hash
|
|
65
|
+
* @param hash The pool hash
|
|
66
|
+
* @returns The pool id
|
|
67
|
+
*/
|
|
68
|
+
export const resolvePoolId = (hash: string) => core.resolvePoolId(hash);
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* Resolve the Ed25519 key hash from bech32 address
|
|
72
|
+
* @param bech32 The bech32 address
|
|
73
|
+
* @returns The Ed25519 key hash
|
|
74
|
+
*/
|
|
75
|
+
export const resolveRewardAddress = (bech32: string) =>
|
|
76
|
+
core.resolveRewardAddress(bech32);
|
|
77
|
+
|
|
78
|
+
// ------------------- Deprecated zone ---------------------
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* Deprecated - use `serializePlutusScript` instead
|
|
82
|
+
*/
|
|
83
|
+
export const resolvePlutusScriptAddress = (
|
|
84
|
+
script: PlutusScript,
|
|
85
|
+
networkId?: number,
|
|
86
|
+
) => core.resolvePlutusScriptAddress(script, networkId);
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* Deprecated - use `serializeNativeScript` instead
|
|
90
|
+
*/
|
|
91
|
+
export const resolveNativeScriptAddress = (
|
|
92
|
+
script: NativeScript,
|
|
93
|
+
networkId?: number,
|
|
94
|
+
) => core.resolveNativeScriptAddress(script, networkId);
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* Deprecated - use `serializeNativeScript` instead
|
|
98
|
+
*/
|
|
99
|
+
export const resolveNativeScriptHex = (script: NativeScript) =>
|
|
100
|
+
core.toNativeScript(script).to_hex();
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* Deprecated - use `deserializeAddress` instead
|
|
104
|
+
*/
|
|
105
|
+
export const resolvePaymentKeyHash = (bech32: string) =>
|
|
106
|
+
core.deserializeBech32Address(bech32).pubKeyHash;
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* Deprecated - use `deserializeAddress` instead
|
|
110
|
+
*/
|
|
111
|
+
export const resolvePlutusScriptHash = (bech32: string) =>
|
|
112
|
+
core.deserializeBech32Address(bech32).scriptHash;
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* Deprecated - use `deserializeAddress` instead
|
|
116
|
+
*/
|
|
117
|
+
export const resolveStakeKeyHash = (bech32: string) =>
|
|
118
|
+
core.deserializeBech32Address(bech32).stakeCredentialHash;
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* Deprecated - this is more used with the low level process inside Mesh
|
|
122
|
+
*
|
|
123
|
+
* If you need this, please import @meshsdk/core-csl or @meshsdk/core-cst instead
|
|
124
|
+
*/
|
|
125
|
+
export const resolveScriptRef = (script: NativeScript | PlutusScript) =>
|
|
126
|
+
core.resolveScriptRef(script);
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import {
|
|
2
|
+
DeserializedAddress,
|
|
3
|
+
NativeScript,
|
|
4
|
+
PlutusScript,
|
|
5
|
+
PubKeyAddress,
|
|
6
|
+
ScriptAddress,
|
|
7
|
+
} from "@meshsdk/common";
|
|
8
|
+
|
|
9
|
+
import { core } from "../core";
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Serialize Native script into bech32 address
|
|
13
|
+
* @param script The native script object
|
|
14
|
+
* @param networkId 0 (testnet) or 1 (mainnet). Default to be 0 (testnet).
|
|
15
|
+
* @returns Bech32 address
|
|
16
|
+
*/
|
|
17
|
+
export const serializeNativeScript = (
|
|
18
|
+
script: NativeScript,
|
|
19
|
+
stakeCredentialHash?: string,
|
|
20
|
+
networkId = 0,
|
|
21
|
+
isScriptStakeCredential = false,
|
|
22
|
+
) => {
|
|
23
|
+
const serializer = new core.CSLSerializer();
|
|
24
|
+
const { scriptCbor, scriptHash } =
|
|
25
|
+
serializer.deserializer.script.deserializeNativeScript(script);
|
|
26
|
+
const deserializedAddress: Partial<DeserializedAddress> = {
|
|
27
|
+
scriptHash: scriptHash,
|
|
28
|
+
};
|
|
29
|
+
if (isScriptStakeCredential) {
|
|
30
|
+
deserializedAddress.stakeScriptCredentialHash = stakeCredentialHash;
|
|
31
|
+
} else {
|
|
32
|
+
deserializedAddress.stakeCredentialHash = stakeCredentialHash;
|
|
33
|
+
}
|
|
34
|
+
const address = serializer.serializeAddress(deserializedAddress, networkId);
|
|
35
|
+
return { address, scriptCbor };
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Serialize Native script into bech32 address
|
|
40
|
+
* @param script The native script object
|
|
41
|
+
* @param networkId 0 (testnet) or 1 (mainnet). Default to be 0 (testnet).
|
|
42
|
+
* @returns Bech32 address
|
|
43
|
+
*/
|
|
44
|
+
export const serializePlutusScript = (
|
|
45
|
+
script: PlutusScript,
|
|
46
|
+
stakeCredentialHash?: string,
|
|
47
|
+
networkId = 0,
|
|
48
|
+
isScriptStakeCredential = false,
|
|
49
|
+
) => {
|
|
50
|
+
const scriptHash = core
|
|
51
|
+
.deserializePlutusScript(script.code, script.version)
|
|
52
|
+
.hash()
|
|
53
|
+
.to_hex();
|
|
54
|
+
const address = core.scriptHashToBech32(
|
|
55
|
+
scriptHash,
|
|
56
|
+
stakeCredentialHash,
|
|
57
|
+
networkId,
|
|
58
|
+
isScriptStakeCredential,
|
|
59
|
+
);
|
|
60
|
+
return { address };
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Serialize address in Cardano data JSON format into bech32 address
|
|
65
|
+
* @param address The Cardano address in data JSON format
|
|
66
|
+
* @returns Bech32 address
|
|
67
|
+
*/
|
|
68
|
+
export const serializeAddressObj = (address: PubKeyAddress | ScriptAddress) => {
|
|
69
|
+
return core.serializeAddressObj(address);
|
|
70
|
+
};
|
package/tsconfig.json
ADDED
|
@@ -1,19 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
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;
|
|
@@ -1,27 +0,0 @@
|
|
|
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;
|
|
@@ -1,19 +0,0 @@
|
|
|
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;
|
package/dist/core/CIP14.d.ts
DELETED
package/dist/core/CIP1852.d.ts
DELETED
package/dist/core/CIP1853.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const deriveStakePoolColdKey: (rootKey: string, coldIndex: number) => import("@sidan-lab/sidan-csl-rs-nodejs").PrivateKey;
|
package/dist/core/CIP1855.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const deriveForgingPolicyKey: (rootKey: string, policyIndex: number) => import("@sidan-lab/sidan-csl-rs-nodejs").PrivateKey;
|
package/dist/core/CIP25.d.ts
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
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
|
-
};
|
package/dist/core/CIP27.d.ts
DELETED
package/dist/core/CPS0009.d.ts
DELETED
package/dist/core/CSL.d.ts
DELETED
|
@@ -1,147 +0,0 @@
|
|
|
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>;
|