///
///
import { Connection, PublicKey, Commitment } from '@solana/web3.js';
import { MetadataObject } from './types';
import { TransactionReceipt } from './mirage';
/** Get metadatata account for mint */
export declare const getMetadata: (mint: PublicKey) => PublicKey;
/** Get associated token for mint */
export declare const getAtaForMint: (mint: PublicKey, address: PublicKey) => [PublicKey, number];
export declare const isPdaAddressInitialize: (connection: Connection, pdaAddress: PublicKey) => Promise;
export declare enum AccountState {
Uninitialized = 0,
Initialized = 1,
Frozen = 2
}
export declare function getAccountInfo(connection: Connection, address: PublicKey, commitment?: Commitment, programId?: PublicKey): Promise<{
address: PublicKey;
mint: any;
owner: any;
amount: any;
delegate: any;
delegatedAmount: any;
isInitialized: boolean;
isFrozen: boolean;
isNative: boolean;
rentExemptReserve: any;
closeAuthority: any;
}>;
/**
* Uploads an NFT's image or video or file to decentralized storage.
* @param image
* @param metadataJson
* @param isAnimation
* @param nftStorageKey API key provided by `https://nft.storage`. See documentation at:
*/
export declare function uploadNFTFileToStorage(image: File | null, metadataJson: MetadataObject, isAnimation?: boolean, nftStorageKey?: string): Promise;
/**
* Processes creator shares and adds the auctionhouse as one of the authorities on the
* mint. It then provides the `authorityAddress` and gives it a royalty percentage equal to
* the `authorityRoyaltyPercentage` of the cumulative total shares of all the `creators`.
*
* e.g.
* @param creators Array of creators
* @param authorityAddress Address of the auctionhouse authority
* @param authorityRoyaltyPercentage Percentage of royalties to be added to the marketplace
* @example
* ```ts
* const auctionHouseAuthority = new PublicKey("3MtckfRX4VRJ1yUmPHpKZstAQ8S3WfhRnNJLT8LqTZEr")
const authorityRoyaltyPercentage = 5
processCreatorShares([
{
address: "Betkx8CfRUwQAqZZRqKt13zo4t9awNFeriD2bMAq2xfJ",
share: 43
},
{
address: "Dn4D8vVvpKzCALq1X5jasPrwvs5kXnSJtfbji4iZaq6R",
share: 1232
}
], auctionHouseAuthority, authorityRoyaltyPercentage);
* ```
Yields:
```ts
[
{
address: 'Betkx8CfRUwQAqZZRqKt13zo4t9awNFeriD2bMAq2xfJ',
share: 3
},
{
address: 'Dn4D8vVvpKzCALq1X5jasPrwvs5kXnSJtfbji4iZaq6R',
share: 92
},
{
address: '3MtckfRX4VRJ1yUmPHpKZstAQ8S3WfhRnNJLT8LqTZEr',
share: 5
}
]
```
*/
export declare function processCreatorShares(creators: {
address: string;
share: number;
}[], authorityAddress: PublicKey, authorityRoyaltyPercentage?: number): {
address: string;
share: number;
}[];
export declare function getNftOwner(mint: string | PublicKey, connection: Connection): Promise;
/**
* Get Token Transactions
* @param mint
* @param auctionHouse
* @param connection
*/
export declare function getTokenTransactions(mint: string | PublicKey, auctionHouse: PublicKey, connection: Connection): Promise<(TransactionReceipt | undefined)[]>;
//# sourceMappingURL=utils.d.ts.map