
Today the package @onhive.io/astro-loader has been released in version 0.2.1 with a brand new accounts loader!
• • •
The new loader allows you to fetch information about a single or multiple accounts in one API call. The usage is very straightforward:
import { defineCollection } from "astro:content";
import { hiveAccountsLoader } from "@onhive.io/astro-loader";
export const collections = {
accounts: defineCollection({
type: "content_layer",
loader: hiveAccountsLoader("hive.coding") // or ["hive.coding", "mciszczon"] for multiple accounts
})
};
The returned account(s) will have the following format (TypeScript definitions taken from the code of the library):
export type Account = {
id: string;
name: string;
created: Date;
wallet: Wallet;
postCount: number;
profile: Profile;
};
export type Wallet = {
hive: {
liquid: Money implements;
frozen: Money;
};
hbd: {
liquid: Money;
frozen: Money;
};
};
export interface MoneyInterface {
currency: string;
amount: string;
precision: number;
asFloat(): number;
}
class Money implements MoneyInterface { ... }
More loaders are coming soon. Feel free to contribute to the code directly, report bugs or request features!
The library is available at npm.
In order to contribute, head over to: instytutfi/hive-astro-loader
• • •
Hive Coding:
Fueling Hive development through community effort
Thank you for your support!

Congratulations @hive.coding! You have completed the following achievement on the Hive blockchain And have been rewarded with New badge(s)
Your next target is to reach 500 upvotes.
You can view your badges on your board and compare yourself to others in the Ranking
If you no longer want to receive notifications, reply to this comment with the word
STOP