Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@solana/keys

Package Overview
Dependencies
Maintainers
13
Versions
1504
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@solana/keys - npm Package Compare versions

Comparing version 2.0.0-experimental.a1e77c4 to 2.0.0-experimental.a3f93f3

2

dist/index.node.js

@@ -26,1 +26,3 @@ import bs58 from 'bs58';

export { assertIsBase58EncodedAddress };
//# sourceMappingURL=out.js.map
//# sourceMappingURL=index.node.js.map

2

package.json
{
"name": "@solana/keys",
"version": "2.0.0-experimental.a1e77c4",
"version": "2.0.0-experimental.a3f93f3",
"description": "Helpers for generating and transforming key material",

@@ -5,0 +5,0 @@ "exports": {

@@ -0,1 +1,15 @@

[![npm][npm-image]][npm-url]
[![npm-downloads][npm-downloads-image]][npm-url]
[![semantic-release][semantic-release-image]][semantic-release-url]
<br />
[![code-style-prettier][code-style-prettier-image]][code-style-prettier-url]
[code-style-prettier-image]: https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square
[code-style-prettier-url]: https://github.com/prettier/prettier
[npm-downloads-image]: https://img.shields.io/npm/dm/@solana/keys/experimental.svg?style=flat
[npm-image]: https://img.shields.io/npm/v/@solana/keys/experimental.svg?style=flat
[npm-url]: https://www.npmjs.com/package/@solana/keys/v/experimental
[semantic-release-image]: https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg
[semantic-release-url]: https://github.com/semantic-release/semantic-release
# @solana/keys

@@ -26,14 +40,14 @@

function handleSubmit() {
// We know only that what the user typed conforms to the `string` type.
const address: string = accountAddressInput.value;
try {
// If this type assertion function doesn't throw, then
// Typescript will upcast `address` to `Base58EncodedAddress`.
assertIsBase58EncodedAddress(address);
// At this point, `address` is a `Base58EncodedAddress` that can be used with the RPC.
const balanceInLamports = await rpc.getBalance(address);
} catch (e) {
// `address` turned out not to be a base58-encoded address
}
// We know only that what the user typed conforms to the `string` type.
const address: string = accountAddressInput.value;
try {
// If this type assertion function doesn't throw, then
// Typescript will upcast `address` to `Base58EncodedAddress`.
assertIsBase58EncodedAddress(address);
// At this point, `address` is a `Base58EncodedAddress` that can be used with the RPC.
const balanceInLamports = await rpc.getBalance(address);
} catch (e) {
// `address` turned out not to be a base58-encoded address
}
}
```

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc