@wuwei-labs/srsly
Version:
[](https://www.npmjs.com/package/ts-sdk-example)
46 lines • 2.7 kB
TypeScript
/**
* This code was AUTOGENERATED using the codama library.
* Please DO NOT EDIT THIS FILE, instead use visitors
* to add features, then rerun codama to update it.
*
* @see https://github.com/codama-idl/codama
*/
import { fetchEncodedAccount, fetchEncodedAccounts, type Account, type Address, type Codec, type Decoder, type EncodedAccount, type Encoder, type FetchAccountConfig, type FetchAccountsConfig, type MaybeAccount, type MaybeEncodedAccount, type ReadonlyUint8Array } from '@solana/kit';
export declare const RENTAL_STATE_DISCRIMINATOR: Uint8Array<ArrayBuffer>;
export declare function getRentalStateDiscriminatorBytes(): ReadonlyUint8Array;
export type RentalState = {
discriminator: ReadonlyUint8Array;
version: number;
borrower: Address;
thread: Address;
contract: Address;
ownerTokenAccount: Address;
rate: number;
startTime: bigint;
endTime: bigint;
cancelled: boolean;
bump: number;
};
export type RentalStateArgs = {
version: number;
borrower: Address;
thread: Address;
contract: Address;
ownerTokenAccount: Address;
rate: number;
startTime: number | bigint;
endTime: number | bigint;
cancelled: boolean;
bump: number;
};
export declare function getRentalStateEncoder(): Encoder<RentalStateArgs>;
export declare function getRentalStateDecoder(): Decoder<RentalState>;
export declare function getRentalStateCodec(): Codec<RentalStateArgs, RentalState>;
export declare function decodeRentalState<TAddress extends string = string>(encodedAccount: EncodedAccount<TAddress>): Account<RentalState, TAddress>;
export declare function decodeRentalState<TAddress extends string = string>(encodedAccount: MaybeEncodedAccount<TAddress>): MaybeAccount<RentalState, TAddress>;
export declare function fetchRentalState<TAddress extends string = string>(rpc: Parameters<typeof fetchEncodedAccount>[0], address: Address<TAddress>, config?: FetchAccountConfig): Promise<Account<RentalState, TAddress>>;
export declare function fetchMaybeRentalState<TAddress extends string = string>(rpc: Parameters<typeof fetchEncodedAccount>[0], address: Address<TAddress>, config?: FetchAccountConfig): Promise<MaybeAccount<RentalState, TAddress>>;
export declare function fetchAllRentalState(rpc: Parameters<typeof fetchEncodedAccounts>[0], addresses: Array<Address>, config?: FetchAccountsConfig): Promise<Account<RentalState>[]>;
export declare function fetchAllMaybeRentalState(rpc: Parameters<typeof fetchEncodedAccounts>[0], addresses: Array<Address>, config?: FetchAccountsConfig): Promise<MaybeAccount<RentalState>[]>;
export declare function getRentalStateSize(): number;
//# sourceMappingURL=rentalState.d.ts.map