@harmoniclabs/blockfrost-pluts
Advanced tools
Comparing version 0.1.15 to 0.1.16
@@ -50,4 +50,6 @@ import type { CanBeData, GenesisInfos, ISubmitTx, ITxRunnerProvider, IGetProtocolParameters } from "@harmoniclabs/plu-ts-offchain"; | ||
addressTotalAmount(address: AddressStr | Address): Promise<Value>; | ||
addressTxs(addr: AddressStr | Address): Promise<Hash32[]>; | ||
/** @since 0.1.0 */ | ||
addressesUtxos(address: AddressStr | Address, pagination?: PaginationOptions): Promise<UTxOWithRefScriptHash[]>; | ||
getUtxos(address: AddressStr | Address, pagination?: PaginationOptions): Promise<UTxOWithRefScriptHash[]>; | ||
/** @since 0.1.0 */ | ||
@@ -54,0 +56,0 @@ addressUtxos(address: AddressStr | Address, pagination?: PaginationOptions): Promise<UTxOWithRefScriptHash[]>; |
@@ -398,2 +398,17 @@ "use strict"; | ||
}; | ||
BlockfrostPluts.prototype.addressTxs = function (addr) { | ||
return __awaiter(this, void 0, void 0, function () { | ||
var addrStr, pastTxsObjs; | ||
return __generator(this, function (_a) { | ||
switch (_a.label) { | ||
case 0: | ||
addrStr = addr.toString(); | ||
return [4 /*yield*/, this.get(this.url + "/addresses/".concat(addrStr, "/transactions"))]; | ||
case 1: | ||
pastTxsObjs = _a.sent(); | ||
return [2 /*return*/, (pastTxsObjs.map(function (tx) { return new cardano_ledger_ts_1.Hash32(tx.tx_hash); })).reverse()]; | ||
} | ||
}); | ||
}); | ||
}; | ||
/** @since 0.1.0 */ | ||
@@ -403,2 +418,9 @@ BlockfrostPluts.prototype.addressesUtxos = function (address, pagination) { | ||
}; | ||
BlockfrostPluts.prototype.getUtxos = function (address, pagination) { | ||
return __awaiter(this, void 0, void 0, function () { | ||
return __generator(this, function (_a) { | ||
return [2 /*return*/, this.addressUtxos(address, pagination)]; | ||
}); | ||
}); | ||
}; | ||
/** @since 0.1.0 */ | ||
@@ -405,0 +427,0 @@ BlockfrostPluts.prototype.addressUtxos = function (address, pagination) { |
@@ -62,3 +62,6 @@ "use strict"; | ||
if ((0, obj_utils_1.hasOwn)(blockfrostCostModels, "PlutusV1")) { | ||
res.PlutusScriptV1 = blockfrostCostModels.PlutusV1 = mockV1CostModel(blockfrostCostModels.PlutusV1); | ||
if (raw && (0, cardano_costmodels_ts_1.isCostModelsV1)(raw.PlutusV1)) | ||
res.PlutusScriptV1 = (0, cardano_costmodels_ts_1.toCostModelV1)(raw.PlutusV1); | ||
else | ||
res.PlutusScriptV1 = blockfrostCostModels.PlutusV1 = mockV1CostModel(blockfrostCostModels.PlutusV1); | ||
} | ||
@@ -65,0 +68,0 @@ if ((0, obj_utils_1.hasOwn)(blockfrostCostModels, "PlutusV2")) { |
{ | ||
"name": "@harmoniclabs/blockfrost-pluts", | ||
"version": "0.1.15", | ||
"version": "0.1.16", | ||
"description": "@blockfrost/blockfrost-js extension based on plu-ts types", | ||
@@ -56,12 +56,12 @@ "main": "./dist/index.js", | ||
"dependencies": { | ||
"@harmoniclabs/cardano-costmodels-ts": "^1.2.0-dev1", | ||
"@harmoniclabs/crypto": "^0.2.4", | ||
"@harmoniclabs/cardano-costmodels-ts": "^1.3.0", | ||
"@harmoniclabs/crypto": "^0.2.5", | ||
"@harmoniclabs/obj-utils": "^1.0.0", | ||
"@harmoniclabs/uint8array-utils": "^1.0.0" | ||
"@harmoniclabs/uint8array-utils": "^1.0.3" | ||
}, | ||
"peerDependencies": { | ||
"@harmoniclabs/bytestring": "^1.0.0", | ||
"@harmoniclabs/cardano-ledger-ts": "^0.2.3-dev0", | ||
"@harmoniclabs/cbor": "^1.3.0", | ||
"@harmoniclabs/plu-ts-offchain": "0.1.13-dev10", | ||
"@harmoniclabs/cardano-ledger-ts": "^0.3.1", | ||
"@harmoniclabs/cbor": "^1.5.0", | ||
"@harmoniclabs/plu-ts-offchain": "0.2.0", | ||
"@harmoniclabs/plutus-data": "^1.2.4" | ||
@@ -74,2 +74,3 @@ }, | ||
"@types/node": "^18.14.6", | ||
"dotenv": "^16.4.7", | ||
"jest": "^29.4.3", | ||
@@ -76,0 +77,0 @@ "jest-environment-jsdom": "^29.4.3", |
67286
1199
9
+ Added@harmoniclabs/cardano-ledger-ts@0.3.2(transitive)
+ Added@harmoniclabs/plu-ts-offchain@0.2.0(transitive)
- Removed@harmoniclabs/cardano-ledger-ts@0.2.8(transitive)
- Removed@harmoniclabs/plu-ts-offchain@0.1.13-dev10(transitive)
Updated@harmoniclabs/crypto@^0.2.5