@towns-protocol/sdk
Version:
For more details, visit the following resources:
26 lines • 1.47 kB
TypeScript
import { BlockchainTransaction_TokenTransfer, UserPayload_UserMembership } from '@towns-protocol/proto';
import { ObservableRecord } from '../../observable/observableRecord';
export interface UserStreamModel {
streamId: string;
streamMemberships: Record<string, UserPayload_UserMembership | undefined>;
tipsSent: Record<string, bigint | undefined>;
tipsReceived: Record<string, bigint | undefined>;
tipsSentCount: Record<string, bigint | undefined>;
tipsReceivedCount: Record<string, bigint | undefined>;
tokenTransfers: BlockchainTransaction_TokenTransfer[];
}
export declare class UserStreamsView extends ObservableRecord<string, UserStreamModel> {
constructor();
setMembership(userStreamId: string, streamId: string, membership: UserPayload_UserMembership): void;
setTips(userStreamId: string, tips: {
tipsSent: Record<string, bigint>;
tipsReceived: Record<string, bigint>;
tipsSentCount: Record<string, bigint>;
tipsReceivedCount: Record<string, bigint>;
}): void;
prependTokenTransfer(userStreamId: string, tokenTransfer: BlockchainTransaction_TokenTransfer): void;
appendTokenTransfer(userStreamId: string, tokenTransfer: BlockchainTransaction_TokenTransfer): void;
appendTipSent(userStreamId: string, currency: string, amount: bigint): void;
appendTipReceived(userStreamId: string, currency: string, amount: bigint): void;
}
//# sourceMappingURL=userStreamsView.d.ts.map