@penumbra-zone/getters
Advanced tools
Comparing version 3.0.2 to 4.0.0
@@ -0,4 +1,7 @@ | ||
import { Amount } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/num/v1/num_pb'; | ||
import { AssetId } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/asset/v1/asset_pb'; | ||
import { SpendableNoteRecord } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/view/v1/view_pb'; | ||
export declare const getAmountFromRecord: Getter<SpendableNoteRecord, Amount, false>; | ||
export declare const getAssetIdFromRecord: Getter<SpendableNoteRecord, AssetId, false>; | ||
@@ -5,0 +8,0 @@ |
@@ -1,3 +0,3 @@ | ||
import { c as e } from "./create-getter-Bi5Cvcfi.js"; | ||
const r = e( | ||
import { c as m } from "./create-getter-Bi5Cvcfi.js"; | ||
const g = m( | ||
(s) => { | ||
@@ -7,5 +7,11 @@ var t, a; | ||
} | ||
), l = m( | ||
(s) => { | ||
var t, a; | ||
return (a = (t = s == null ? void 0 : s.note) == null ? void 0 : t.value) == null ? void 0 : a.amount; | ||
} | ||
); | ||
export { | ||
r as getAssetIdFromRecord | ||
l as getAmountFromRecord, | ||
g as getAssetIdFromRecord | ||
}; |
{ | ||
"name": "@penumbra-zone/getters", | ||
"version": "3.0.2", | ||
"version": "4.0.0", | ||
"license": "(MIT OR Apache-2.0)", | ||
"description": "Convenience getters for the deeply nested optionals of Penumbra's protobuf types", | ||
"type": "module", | ||
"files": [ | ||
"dist" | ||
], | ||
"exports": { | ||
"./src/*": "./dist/*.js" | ||
"./*": "./dist/*.js" | ||
}, | ||
"publishConfig": { | ||
"files": [ | ||
"dist" | ||
] | ||
}, | ||
"dependencies": { | ||
"@penumbra-zone/bech32m": "3.1.0" | ||
"@penumbra-zone/bech32m": "3.1.1" | ||
}, | ||
"devDependencies": { | ||
"@buf/penumbra-zone_penumbra.bufbuild_es": "1.9.0-20240501193854-ea3cc743390d.1", | ||
"@buf/penumbra-zone_penumbra.bufbuild_es": "1.9.0-20240520205529-36b404d2dbac.1", | ||
"@bufbuild/protobuf": "^1.9.0" | ||
}, | ||
"peerDependencies": { | ||
"@buf/penumbra-zone_penumbra.bufbuild_es": "1.9.0-20240501193854-ea3cc743390d.1", | ||
"@buf/penumbra-zone_penumbra.bufbuild_es": "1.9.0-20240520205529-36b404d2dbac.1", | ||
"@bufbuild/protobuf": "^1.9.0" | ||
@@ -29,5 +27,5 @@ }, | ||
"clean": "rm -rfv dist", | ||
"lint": "eslint \"**/*.ts*\"", | ||
"lint": "eslint src", | ||
"test": "vitest run" | ||
} | ||
} |
# Getters | ||
**To use this package, you need to [enable the Buf Schema Registry](https://buf.build/docs/bsr/generated-sdks/npm)** | ||
```sh | ||
echo "@buf:registry=https://buf.build/gen/npm/v1/" >> .npmrc | ||
``` | ||
Getters were designed to solve a common pain point when working with deserialized Protobuf messages: accessing deeply nested, often optional properties. | ||
@@ -4,0 +10,0 @@ |
Sorry, the diff of this file is too big to display
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 2 instances in 1 package
109
1
80178
45
1391
1
+ Added@penumbra-zone/bech32m@3.1.1(transitive)
- Removed@penumbra-zone/bech32m@3.1.0(transitive)
Updated@penumbra-zone/bech32m@3.1.1