@indigo-labs/indigo-sdk 0.2.6 → 0.2.7
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/index.js +6 -1
- package/dist/index.mjs +6 -1
- package/package.json +2 -2
- package/src/utils/lucid-utils.ts +5 -1
package/dist/index.js
CHANGED
|
@@ -283,7 +283,12 @@ function getInlineDatumOrThrow(utxo) {
|
|
|
283
283
|
}
|
|
284
284
|
async function addrDetails(lucid) {
|
|
285
285
|
const addr = await lucid.wallet().address();
|
|
286
|
-
|
|
286
|
+
let stakeCredential = void 0;
|
|
287
|
+
try {
|
|
288
|
+
stakeCredential = (0, import_lucid2.stakeCredentialOf)(addr);
|
|
289
|
+
} catch (_) {
|
|
290
|
+
}
|
|
291
|
+
return [(0, import_lucid2.paymentCredentialOf)(addr), stakeCredential];
|
|
287
292
|
}
|
|
288
293
|
function createScriptAddress(network, scriptHash, stakeCredential) {
|
|
289
294
|
return (0, import_lucid2.credentialToAddress)(
|
package/dist/index.mjs
CHANGED
|
@@ -47,7 +47,12 @@ function getInlineDatumOrThrow(utxo) {
|
|
|
47
47
|
}
|
|
48
48
|
async function addrDetails(lucid) {
|
|
49
49
|
const addr = await lucid.wallet().address();
|
|
50
|
-
|
|
50
|
+
let stakeCredential = void 0;
|
|
51
|
+
try {
|
|
52
|
+
stakeCredential = stakeCredentialOf(addr);
|
|
53
|
+
} catch (_) {
|
|
54
|
+
}
|
|
55
|
+
return [paymentCredentialOf(addr), stakeCredential];
|
|
51
56
|
}
|
|
52
57
|
function createScriptAddress(network, scriptHash, stakeCredential) {
|
|
53
58
|
return credentialToAddress(
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@indigo-labs/indigo-sdk",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.7",
|
|
4
4
|
"description": "Indigo SDK for interacting with Indigo endpoints via lucid-evolution",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"author": "3rd Eye Labs",
|
|
41
41
|
"license": "MIT",
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@3rd-eye-labs/cardano-offchain-common": "^1.1.
|
|
43
|
+
"@3rd-eye-labs/cardano-offchain-common": "^1.1.8",
|
|
44
44
|
"@evolution-sdk/evolution": "^0.2.5",
|
|
45
45
|
"@harmoniclabs/crypto": "^0.3.0",
|
|
46
46
|
"@lucid-evolution/lucid": "^0.4.29",
|
package/src/utils/lucid-utils.ts
CHANGED
|
@@ -39,7 +39,11 @@ export async function addrDetails(
|
|
|
39
39
|
lucid: LucidEvolution,
|
|
40
40
|
): Promise<[Credential, Credential | undefined]> {
|
|
41
41
|
const addr = await lucid.wallet().address();
|
|
42
|
-
|
|
42
|
+
let stakeCredential = undefined;
|
|
43
|
+
try {
|
|
44
|
+
stakeCredential = stakeCredentialOf(addr);
|
|
45
|
+
} catch (_) {}
|
|
46
|
+
return [paymentCredentialOf(addr), stakeCredential];
|
|
43
47
|
}
|
|
44
48
|
|
|
45
49
|
export function createScriptAddress(
|