@meshsdk/core 1.6.0-alpha.2 → 1.6.0-alpha.20
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/README.md +3 -30
- 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/README.md
CHANGED
|
@@ -1,32 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
# mesh-core
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Exports all the functionalities including wallets, transactions, and providers
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
## Guides and documentations
|
|
8
|
-
|
|
9
|
-
- [Starter Templates](https://meshjs.dev/starter-templates)
|
|
10
|
-
- [Guides](https://meshjs.dev/guides)
|
|
11
|
-
- [Install Mesh into existing project](https://meshjs.dev/migration-manual-installation)
|
|
12
|
-
- [App Wallet (Building transactions on applications)](https://meshjs.dev/apis/appwallet)
|
|
13
|
-
- [Browser Wallet (CIP30 wallets intergration)](https://meshjs.dev/apis/browserwallet)
|
|
14
|
-
- [Transaction - Building, minting, burning, smart contracts, stake pool and more](https://meshjs.dev/apis/transaction)
|
|
15
|
-
- [React Components](https://meshjs.dev/react)
|
|
16
|
-
- [Service Providers](https://meshjs.dev/providers)
|
|
17
|
-
- [Resolvers](https://meshjs.dev/apis/resolvers)
|
|
18
|
-
|
|
19
|
-
## Why use Mesh
|
|
20
|
-
- Start a new project with one of out [Starter Templates](https://meshjs.dev/starter-templates) with CLI command
|
|
21
|
-
- Always up to date - Vasil-ready, developed promptly as the network updates so your app always works
|
|
22
|
-
- Simple to use - Check out our [guides](https://meshjs.dev/guides) - you'll get started in less than 10 mins!
|
|
23
|
-
- Adopts best practices - implements various CIPs and package is well build (no hacking and tweaking needed to get it to work)
|
|
24
|
-
- Thoroughly tested - Mesh is used by both developers and learners, and is being built by developers with solid software engineering backgrounds
|
|
25
|
-
- Integrates with Cardano projects - Koios, Blockfrost, ADA Handle (and more), you can pick and choose freely what you want to use for your app
|
|
26
|
-
- Well documented - we focus on documentation so you can use it with ease, and our [Playground](https://meshjs.dev/) is built so you can see how it works
|
|
27
|
-
|
|
28
|
-
## How can you contribute?
|
|
29
|
-
|
|
30
|
-
- [Support us](https://meshjs.dev/about/support-us)
|
|
31
|
-
- Build something - try Mesh by implementing your Web 3.0 project (recommended [starter guide](https://meshjs.dev/guides/nextjs))
|
|
32
|
-
- Inform others - Tell others about Mesh, and star the [Github repo](https://github.com/MeshJS/mesh) :star:
|
|
5
|
+
[meshjs.dev](https://meshjs.dev/)
|
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.20",
|
|
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": "*",
|
|
23
|
+
"@meshsdk/typescript-config": "*",
|
|
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": "*",
|
|
30
|
+
"@meshsdk/core-csl": "*",
|
|
31
|
+
"@meshsdk/core-cst": "*",
|
|
32
|
+
"@meshsdk/provider": "*",
|
|
33
|
+
"@meshsdk/react": "*",
|
|
34
|
+
"@meshsdk/transaction": "*",
|
|
35
|
+
"@meshsdk/wallet": "*"
|
|
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