Skip to content

Commit

Permalink
fix(blockchain-link): add stakingAccounts property to AccountInfo int…
Browse files Browse the repository at this point in the history
…erface
  • Loading branch information
dev-pvl committed Nov 15, 2024
1 parent 7cb913a commit e7afb45
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 2 additions & 0 deletions packages/blockchain-link-types/src/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import type {
ContractInfo,
StakingPool,
} from './blockbook-api';
import type { SolanaStakingAccount } from './solana';

/* Common types used in both params and responses */

Expand Down Expand Up @@ -197,6 +198,7 @@ export interface AccountInfo {
availableBalance: string;
empty: boolean;
tokens?: TokenInfo[]; // ethereum and blockfrost tokens
stakingAccounts?: SolanaStakingAccount[]; // solana staking accounts
addresses?: AccountAddresses; // bitcoin and blockfrost addresses
history: {
total: number; // total transactions (unknown in ripple)
Expand Down
12 changes: 11 additions & 1 deletion packages/blockchain-link-types/src/solana.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
import type { ParsedTransactionWithMeta } from '@solana/web3.js';
import type {
ParsedTransactionWithMeta,
AccountInfo,
ParsedAccountData,
PublicKey,
} from '@solana/web3.js';

export type SolanaValidParsedTxWithMeta = ParsedTransactionWithMeta & {
meta: Required<NonNullable<ParsedTransactionWithMeta['meta']>>;
Expand All @@ -12,6 +17,11 @@ export type SolanaTokenAccountInfo = {
decimals: number | undefined;
};

export type SolanaStakingAccount = {
account: AccountInfo<ParsedAccountData>;
pubkey: PublicKey;
};

export type {
ParsedInstruction,
ParsedTransactionWithMeta,
Expand Down

0 comments on commit e7afb45

Please sign in to comment.