@neynar/nodejs-sdk
Version:
SDK to interact with Neynar APIs (https://docs.neynar.com/reference/quickstart)
855 lines (854 loc) • 42.3 kB
TypeScript
/**
* Neynar API
* The Neynar API allows you to interact with the Farcaster protocol among other things. See the [Neynar docs](https://docs.neynar.com/reference) for more details.
*
* The version of the OpenAPI document: 3.34.0
* Contact: team@neynar.com
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import type { Configuration } from '../configuration';
import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios';
import { type RequestArgs, BaseAPI } from '../base';
import type { BalanceResponse } from '../models';
import type { DeployFungibleResponse } from '../models';
import type { MintNft200Response } from '../models';
import type { MintNftRequest } from '../models';
import type { RegisterUserOnChainReqBody } from '../models';
import type { RegisterUserOnChainResponse } from '../models';
import type { RelevantFungibleOwnersResponse } from '../models';
import type { SimulateNftMintResponse } from '../models';
import type { TransactionSendFungiblesReqBody } from '../models';
import type { TransactionSendFungiblesResponse } from '../models';
/**
* OnchainApi - axios parameter creator
* @export
*/
export declare const OnchainApiAxiosParamCreator: (configuration?: Configuration) => {
/**
* Creates a new token. This is an allowlisted API, reach out if you want access.
* @summary Deploy fungible
* @param {string} owner Ethereum address of the one who is creating the token
* @param {string} symbol Symbol/Ticker for the token
* @param {string} name Name of the token
* @param {File | null} [metadataMedia] Media file associated with the token. Supported formats are image/jpeg, image/gif and image/png
* @param {string} [metadataDescription] Description of the token
* @param {DeployFungibleMetadataNsfwEnum} [metadataNsfw] Indicates if the token is NSFW (Not Safe For Work).
* @param {string} [metadataWebsiteLink] Website link related to the token
* @param {string} [metadataTwitter] Twitter profile link
* @param {string} [metadataDiscord] Discord server link
* @param {string} [metadataTelegram] Telegram link
* @param {DeployFungibleNetworkEnum} [network] Network/Chain name
* @param {DeployFungibleFactoryEnum} [factory] Factory name - wow -> [wow.xyz](https://wow.xyz) - clanker -> [clanker.world](https://www.clanker.world)
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @returns {Promise<DeployFungibleResponse>} A promise that resolves to a `DeployFungibleResponse` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/deploy-fungible)
*
*/
deployFungible: (owner: string, symbol: string, name: string, metadataMedia?: File | null, metadataDescription?: string, metadataNsfw?: DeployFungibleMetadataNsfwEnum, metadataWebsiteLink?: string, metadataTwitter?: string, metadataDiscord?: string, metadataTelegram?: string, network?: DeployFungibleNetworkEnum, factory?: DeployFungibleFactoryEnum, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
/**
* Fetch a list of relevant owners for a on chain asset. If a viewer is provided, only relevant holders will be shown. This usually shows on a fungible asset page as \"X, Y, Z and N others you know own this asset\".
* @summary Relevant owners
* @param {string} contractAddress Contract address of the fungible asset
* @param {FetchRelevantFungibleOwnersNetworkEnum} network Network of the fungible asset.
* @param {number} [viewerFid] If you provide a viewer_fid, the response will include token holders from the user\'s network, respecting their mutes and blocks and including viewer_context; if not provided, the response will show top token holders across the network—both sets can be combined to generate a longer list if desired.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @returns {Promise<RelevantFungibleOwnersResponse>} A promise that resolves to a `RelevantFungibleOwnersResponse` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-relevant-fungible-owners)
*
*/
fetchRelevantFungibleOwners: (contractAddress: string, network: FetchRelevantFungibleOwnersNetworkEnum, viewerFid?: number, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
/**
* Fetches the token balances of a user given their FID
* @summary Token balance
* @param {number} fid FID of the user to fetch
* @param {Array<FetchUserBalanceNetworksEnum>} networks Comma separated list of networks to fetch balances for
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @returns {Promise<BalanceResponse>} A promise that resolves to a `BalanceResponse` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-user-balance)
*
*/
fetchUserBalance: (fid: number, networks: Array<FetchUserBalanceNetworksEnum>, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
/**
* Mints an NFT to one or more recipients on a specified network and contract, using a configured server wallet. Contact us to set up your wallet configuration if you don\'t have one.
* @summary Mint NFT(s)
* @param {string} xWalletId Wallet ID to use for transactions
* @param {MintNftRequest} mintNftRequest
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @returns {Promise<MintNft200Response>} A promise that resolves to a `MintNft200Response` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/mint-nft)
*
*/
mintNft: (xWalletId: string, mintNftRequest: MintNftRequest, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
/**
* Register a new farcaster account onchain. Optionally you can pass in signers to register a new account and create multiple signers in a single transaction
* @summary Register Farcaster account onchain
* @param {RegisterUserOnChainReqBody} registerUserOnChainReqBody
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @returns {Promise<RegisterUserOnChainResponse>} A promise that resolves to a `RegisterUserOnChainResponse` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/register-account-onchain)
*
*/
registerAccountOnchain: (registerUserOnChainReqBody: RegisterUserOnChainReqBody, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
/**
* Send fungibles in bulk to several farcaster users. A funded wallet is to required use this API. React out to us on the Neynar channel on farcaster to get your wallet address.
* @summary Send fungibles
* @param {string} xWalletId Wallet ID to use for transactions
* @param {TransactionSendFungiblesReqBody} transactionSendFungiblesReqBody
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @returns {Promise<TransactionSendFungiblesResponse>} A promise that resolves to a `TransactionSendFungiblesResponse` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/send-fungibles-to-users)
*
*/
sendFungiblesToUsers: (xWalletId: string, transactionSendFungiblesReqBody: TransactionSendFungiblesReqBody, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
/**
* Simulates mint calldata for the given recipients, contract, and network. Useful for previewing calldata and ABI before minting.
* @summary Simulate NFT mint calldata
* @param {string} recipients JSON array of recipients (same structure as POST).
* @param {string} nftContractAddress Ethereum address
* @param {SimulateNftMintNetworkEnum} network Network to mint on.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @returns {Promise<SimulateNftMintResponse>} A promise that resolves to a `SimulateNftMintResponse` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/simulate-nft-mint)
*
*/
simulateNftMint: (recipients: string, nftContractAddress: string, network: SimulateNftMintNetworkEnum, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
};
/**
* OnchainApi - functional programming interface
* @export
*/
export declare const OnchainApiFp: (configuration?: Configuration) => {
/**
* Creates a new token. This is an allowlisted API, reach out if you want access.
* @summary Deploy fungible
* @param {string} owner Ethereum address of the one who is creating the token
* @param {string} symbol Symbol/Ticker for the token
* @param {string} name Name of the token
* @param {File | null} [metadataMedia] Media file associated with the token. Supported formats are image/jpeg, image/gif and image/png
* @param {string} [metadataDescription] Description of the token
* @param {DeployFungibleMetadataNsfwEnum} [metadataNsfw] Indicates if the token is NSFW (Not Safe For Work).
* @param {string} [metadataWebsiteLink] Website link related to the token
* @param {string} [metadataTwitter] Twitter profile link
* @param {string} [metadataDiscord] Discord server link
* @param {string} [metadataTelegram] Telegram link
* @param {DeployFungibleNetworkEnum} [network] Network/Chain name
* @param {DeployFungibleFactoryEnum} [factory] Factory name - wow -> [wow.xyz](https://wow.xyz) - clanker -> [clanker.world](https://www.clanker.world)
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @returns {Promise<DeployFungibleResponse>} A promise that resolves to a `DeployFungibleResponse` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/deploy-fungible)
*
*/
deployFungible(owner: string, symbol: string, name: string, metadataMedia?: File | null, metadataDescription?: string, metadataNsfw?: DeployFungibleMetadataNsfwEnum, metadataWebsiteLink?: string, metadataTwitter?: string, metadataDiscord?: string, metadataTelegram?: string, network?: DeployFungibleNetworkEnum, factory?: DeployFungibleFactoryEnum, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<DeployFungibleResponse>>;
/**
* Fetch a list of relevant owners for a on chain asset. If a viewer is provided, only relevant holders will be shown. This usually shows on a fungible asset page as \"X, Y, Z and N others you know own this asset\".
* @summary Relevant owners
* @param {string} contractAddress Contract address of the fungible asset
* @param {FetchRelevantFungibleOwnersNetworkEnum} network Network of the fungible asset.
* @param {number} [viewerFid] If you provide a viewer_fid, the response will include token holders from the user\'s network, respecting their mutes and blocks and including viewer_context; if not provided, the response will show top token holders across the network—both sets can be combined to generate a longer list if desired.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @returns {Promise<RelevantFungibleOwnersResponse>} A promise that resolves to a `RelevantFungibleOwnersResponse` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-relevant-fungible-owners)
*
*/
fetchRelevantFungibleOwners(contractAddress: string, network: FetchRelevantFungibleOwnersNetworkEnum, viewerFid?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<RelevantFungibleOwnersResponse>>;
/**
* Fetches the token balances of a user given their FID
* @summary Token balance
* @param {number} fid FID of the user to fetch
* @param {Array<FetchUserBalanceNetworksEnum>} networks Comma separated list of networks to fetch balances for
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @returns {Promise<BalanceResponse>} A promise that resolves to a `BalanceResponse` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-user-balance)
*
*/
fetchUserBalance(fid: number, networks: Array<FetchUserBalanceNetworksEnum>, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<BalanceResponse>>;
/**
* Mints an NFT to one or more recipients on a specified network and contract, using a configured server wallet. Contact us to set up your wallet configuration if you don\'t have one.
* @summary Mint NFT(s)
* @param {string} xWalletId Wallet ID to use for transactions
* @param {MintNftRequest} mintNftRequest
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @returns {Promise<MintNft200Response>} A promise that resolves to a `MintNft200Response` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/mint-nft)
*
*/
mintNft(xWalletId: string, mintNftRequest: MintNftRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<MintNft200Response>>;
/**
* Register a new farcaster account onchain. Optionally you can pass in signers to register a new account and create multiple signers in a single transaction
* @summary Register Farcaster account onchain
* @param {RegisterUserOnChainReqBody} registerUserOnChainReqBody
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @returns {Promise<RegisterUserOnChainResponse>} A promise that resolves to a `RegisterUserOnChainResponse` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/register-account-onchain)
*
*/
registerAccountOnchain(registerUserOnChainReqBody: RegisterUserOnChainReqBody, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<RegisterUserOnChainResponse>>;
/**
* Send fungibles in bulk to several farcaster users. A funded wallet is to required use this API. React out to us on the Neynar channel on farcaster to get your wallet address.
* @summary Send fungibles
* @param {string} xWalletId Wallet ID to use for transactions
* @param {TransactionSendFungiblesReqBody} transactionSendFungiblesReqBody
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @returns {Promise<TransactionSendFungiblesResponse>} A promise that resolves to a `TransactionSendFungiblesResponse` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/send-fungibles-to-users)
*
*/
sendFungiblesToUsers(xWalletId: string, transactionSendFungiblesReqBody: TransactionSendFungiblesReqBody, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<TransactionSendFungiblesResponse>>;
/**
* Simulates mint calldata for the given recipients, contract, and network. Useful for previewing calldata and ABI before minting.
* @summary Simulate NFT mint calldata
* @param {string} recipients JSON array of recipients (same structure as POST).
* @param {string} nftContractAddress Ethereum address
* @param {SimulateNftMintNetworkEnum} network Network to mint on.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @returns {Promise<SimulateNftMintResponse>} A promise that resolves to a `SimulateNftMintResponse` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/simulate-nft-mint)
*
*/
simulateNftMint(recipients: string, nftContractAddress: string, network: SimulateNftMintNetworkEnum, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<SimulateNftMintResponse>>;
};
/**
* OnchainApi - factory interface
* @export
*/
export declare const OnchainApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
/**
* Creates a new token. This is an allowlisted API, reach out if you want access.
* @summary Deploy fungible
* @param {OnchainApiDeployFungibleRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @returns {Promise<DeployFungibleResponse>} A promise that resolves to a `DeployFungibleResponse` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/deploy-fungible)
*
*/
deployFungible(requestParameters: OnchainApiDeployFungibleRequest, options?: RawAxiosRequestConfig): AxiosPromise<DeployFungibleResponse>;
/**
* Fetch a list of relevant owners for a on chain asset. If a viewer is provided, only relevant holders will be shown. This usually shows on a fungible asset page as \"X, Y, Z and N others you know own this asset\".
* @summary Relevant owners
* @param {OnchainApiFetchRelevantFungibleOwnersRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @returns {Promise<RelevantFungibleOwnersResponse>} A promise that resolves to a `RelevantFungibleOwnersResponse` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-relevant-fungible-owners)
*
*/
fetchRelevantFungibleOwners(requestParameters: OnchainApiFetchRelevantFungibleOwnersRequest, options?: RawAxiosRequestConfig): AxiosPromise<RelevantFungibleOwnersResponse>;
/**
* Fetches the token balances of a user given their FID
* @summary Token balance
* @param {OnchainApiFetchUserBalanceRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @returns {Promise<BalanceResponse>} A promise that resolves to a `BalanceResponse` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-user-balance)
*
*/
fetchUserBalance(requestParameters: OnchainApiFetchUserBalanceRequest, options?: RawAxiosRequestConfig): AxiosPromise<BalanceResponse>;
/**
* Mints an NFT to one or more recipients on a specified network and contract, using a configured server wallet. Contact us to set up your wallet configuration if you don\'t have one.
* @summary Mint NFT(s)
* @param {OnchainApiMintNftRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @returns {Promise<MintNft200Response>} A promise that resolves to a `MintNft200Response` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/mint-nft)
*
*/
mintNft(requestParameters: OnchainApiMintNftRequest, options?: RawAxiosRequestConfig): AxiosPromise<MintNft200Response>;
/**
* Register a new farcaster account onchain. Optionally you can pass in signers to register a new account and create multiple signers in a single transaction
* @summary Register Farcaster account onchain
* @param {OnchainApiRegisterAccountOnchainRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @returns {Promise<RegisterUserOnChainResponse>} A promise that resolves to a `RegisterUserOnChainResponse` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/register-account-onchain)
*
*/
registerAccountOnchain(requestParameters: OnchainApiRegisterAccountOnchainRequest, options?: RawAxiosRequestConfig): AxiosPromise<RegisterUserOnChainResponse>;
/**
* Send fungibles in bulk to several farcaster users. A funded wallet is to required use this API. React out to us on the Neynar channel on farcaster to get your wallet address.
* @summary Send fungibles
* @param {OnchainApiSendFungiblesToUsersRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @returns {Promise<TransactionSendFungiblesResponse>} A promise that resolves to a `TransactionSendFungiblesResponse` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/send-fungibles-to-users)
*
*/
sendFungiblesToUsers(requestParameters: OnchainApiSendFungiblesToUsersRequest, options?: RawAxiosRequestConfig): AxiosPromise<TransactionSendFungiblesResponse>;
/**
* Simulates mint calldata for the given recipients, contract, and network. Useful for previewing calldata and ABI before minting.
* @summary Simulate NFT mint calldata
* @param {OnchainApiSimulateNftMintRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @returns {Promise<SimulateNftMintResponse>} A promise that resolves to a `SimulateNftMintResponse` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/simulate-nft-mint)
*
*/
simulateNftMint(requestParameters: OnchainApiSimulateNftMintRequest, options?: RawAxiosRequestConfig): AxiosPromise<SimulateNftMintResponse>;
};
/**
* OnchainApi - interface
* @export
* @interface OnchainApi
*/
export interface OnchainApiInterface {
/**
* Creates a new token. This is an allowlisted API, reach out if you want access.
* @summary Deploy fungible
* @param {OnchainApiDeployFungibleRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof OnchainApiInterface
* @returns {Promise<DeployFungibleResponse>} A promise that resolves to a `DeployFungibleResponse` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/deploy-fungible)
*
*/
deployFungible(requestParameters: OnchainApiDeployFungibleRequest, options?: RawAxiosRequestConfig): AxiosPromise<DeployFungibleResponse>;
/**
* Fetch a list of relevant owners for a on chain asset. If a viewer is provided, only relevant holders will be shown. This usually shows on a fungible asset page as \"X, Y, Z and N others you know own this asset\".
* @summary Relevant owners
* @param {OnchainApiFetchRelevantFungibleOwnersRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof OnchainApiInterface
* @returns {Promise<RelevantFungibleOwnersResponse>} A promise that resolves to a `RelevantFungibleOwnersResponse` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-relevant-fungible-owners)
*
*/
fetchRelevantFungibleOwners(requestParameters: OnchainApiFetchRelevantFungibleOwnersRequest, options?: RawAxiosRequestConfig): AxiosPromise<RelevantFungibleOwnersResponse>;
/**
* Fetches the token balances of a user given their FID
* @summary Token balance
* @param {OnchainApiFetchUserBalanceRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof OnchainApiInterface
* @returns {Promise<BalanceResponse>} A promise that resolves to a `BalanceResponse` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-user-balance)
*
*/
fetchUserBalance(requestParameters: OnchainApiFetchUserBalanceRequest, options?: RawAxiosRequestConfig): AxiosPromise<BalanceResponse>;
/**
* Mints an NFT to one or more recipients on a specified network and contract, using a configured server wallet. Contact us to set up your wallet configuration if you don\'t have one.
* @summary Mint NFT(s)
* @param {OnchainApiMintNftRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof OnchainApiInterface
* @returns {Promise<MintNft200Response>} A promise that resolves to a `MintNft200Response` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/mint-nft)
*
*/
mintNft(requestParameters: OnchainApiMintNftRequest, options?: RawAxiosRequestConfig): AxiosPromise<MintNft200Response>;
/**
* Register a new farcaster account onchain. Optionally you can pass in signers to register a new account and create multiple signers in a single transaction
* @summary Register Farcaster account onchain
* @param {OnchainApiRegisterAccountOnchainRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof OnchainApiInterface
* @returns {Promise<RegisterUserOnChainResponse>} A promise that resolves to a `RegisterUserOnChainResponse` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/register-account-onchain)
*
*/
registerAccountOnchain(requestParameters: OnchainApiRegisterAccountOnchainRequest, options?: RawAxiosRequestConfig): AxiosPromise<RegisterUserOnChainResponse>;
/**
* Send fungibles in bulk to several farcaster users. A funded wallet is to required use this API. React out to us on the Neynar channel on farcaster to get your wallet address.
* @summary Send fungibles
* @param {OnchainApiSendFungiblesToUsersRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof OnchainApiInterface
* @returns {Promise<TransactionSendFungiblesResponse>} A promise that resolves to a `TransactionSendFungiblesResponse` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/send-fungibles-to-users)
*
*/
sendFungiblesToUsers(requestParameters: OnchainApiSendFungiblesToUsersRequest, options?: RawAxiosRequestConfig): AxiosPromise<TransactionSendFungiblesResponse>;
/**
* Simulates mint calldata for the given recipients, contract, and network. Useful for previewing calldata and ABI before minting.
* @summary Simulate NFT mint calldata
* @param {OnchainApiSimulateNftMintRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof OnchainApiInterface
* @returns {Promise<SimulateNftMintResponse>} A promise that resolves to a `SimulateNftMintResponse` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/simulate-nft-mint)
*
*/
simulateNftMint(requestParameters: OnchainApiSimulateNftMintRequest, options?: RawAxiosRequestConfig): AxiosPromise<SimulateNftMintResponse>;
}
/**
* Request parameters for deployFungible operation in OnchainApi.
* @export
* @interface OnchainApiDeployFungibleRequest
*/
export interface OnchainApiDeployFungibleRequest {
/**
* Ethereum address of the one who is creating the token
*
*
*
* @type {string}
* @memberof OnchainApiDeployFungible
*/
readonly owner: string;
/**
* Symbol/Ticker for the token
*
*
*
* @type {string}
* @memberof OnchainApiDeployFungible
*/
readonly symbol: string;
/**
* Name of the token
*
*
*
* @type {string}
* @memberof OnchainApiDeployFungible
*/
readonly name: string;
/**
* Media file associated with the token. Supported formats are image/jpeg, image/gif and image/png
*
*
*
* @type {File}
* @memberof OnchainApiDeployFungible
*/
readonly metadataMedia?: File | null;
/**
* Description of the token
*
*
*
* @type {string}
* @memberof OnchainApiDeployFungible
*/
readonly metadataDescription?: string;
/**
* Indicates if the token is NSFW (Not Safe For Work).
*
*
*
* @type {string}
* @memberof OnchainApiDeployFungible
*/
readonly metadataNsfw?: DeployFungibleMetadataNsfwEnum;
/**
* Website link related to the token
*
*
*
* @type {string}
* @memberof OnchainApiDeployFungible
*/
readonly metadataWebsiteLink?: string;
/**
* Twitter profile link
*
*
*
* @type {string}
* @memberof OnchainApiDeployFungible
*/
readonly metadataTwitter?: string;
/**
* Discord server link
*
*
*
* @type {string}
* @memberof OnchainApiDeployFungible
*/
readonly metadataDiscord?: string;
/**
* Telegram link
*
*
*
* @type {string}
* @memberof OnchainApiDeployFungible
*/
readonly metadataTelegram?: string;
/**
* Network/Chain name
*
*
*
* @type {string}
* @memberof OnchainApiDeployFungible
*/
readonly network?: DeployFungibleNetworkEnum;
/**
* Factory name - wow -> [wow.xyz](https://wow.xyz) - clanker -> [clanker.world](https://www.clanker.world)
*
*
*
* @type {string}
* @memberof OnchainApiDeployFungible
*/
readonly factory?: DeployFungibleFactoryEnum;
}
/**
* Request parameters for fetchRelevantFungibleOwners operation in OnchainApi.
* @export
* @interface OnchainApiFetchRelevantFungibleOwnersRequest
*/
export interface OnchainApiFetchRelevantFungibleOwnersRequest {
/**
* Contract address of the fungible asset
*
*
*
* @type {string}
* @memberof OnchainApiFetchRelevantFungibleOwners
*/
readonly contractAddress: string;
/**
* Network of the fungible asset.
*
*
*
* @type {'ethereum' | 'optimism' | 'base' | 'arbitrum' | 'solana'}
* @memberof OnchainApiFetchRelevantFungibleOwners
*/
readonly network: FetchRelevantFungibleOwnersNetworkEnum;
/**
* If you provide a viewer_fid, the response will include token holders from the user\'s network, respecting their mutes and blocks and including viewer_context; if not provided, the response will show top token holders across the network—both sets can be combined to generate a longer list if desired.
*
*
*
* @type {number}
* @memberof OnchainApiFetchRelevantFungibleOwners
*/
readonly viewerFid?: number;
}
/**
* Request parameters for fetchUserBalance operation in OnchainApi.
* @export
* @interface OnchainApiFetchUserBalanceRequest
*/
export interface OnchainApiFetchUserBalanceRequest {
/**
* FID of the user to fetch
*
*
*
* @type {number}
* @memberof OnchainApiFetchUserBalance
*/
readonly fid: number;
/**
* Comma separated list of networks to fetch balances for
*
*
*
* @type {Array<'ethereum' | 'optimism' | 'base' | 'arbitrum'>}
* @memberof OnchainApiFetchUserBalance
*/
readonly networks: Array<FetchUserBalanceNetworksEnum>;
}
/**
* Request parameters for mintNft operation in OnchainApi.
* @export
* @interface OnchainApiMintNftRequest
*/
export interface OnchainApiMintNftRequest {
/**
* Wallet ID to use for transactions
*
*
* @globalHeader
* @type {string}
* @memberof OnchainApiMintNft
*/
readonly xWalletId: string;
/**
*
*
*
*
* @type {MintNftRequest}
* @memberof OnchainApiMintNft
*/
readonly mintNftRequest: MintNftRequest;
}
/**
* Request parameters for registerAccountOnchain operation in OnchainApi.
* @export
* @interface OnchainApiRegisterAccountOnchainRequest
*/
export interface OnchainApiRegisterAccountOnchainRequest {
/**
*
*
*
*
* @type {RegisterUserOnChainReqBody}
* @memberof OnchainApiRegisterAccountOnchain
*/
readonly registerUserOnChainReqBody: RegisterUserOnChainReqBody;
}
/**
* Request parameters for sendFungiblesToUsers operation in OnchainApi.
* @export
* @interface OnchainApiSendFungiblesToUsersRequest
*/
export interface OnchainApiSendFungiblesToUsersRequest {
/**
* Wallet ID to use for transactions
*
*
* @globalHeader
* @type {string}
* @memberof OnchainApiSendFungiblesToUsers
*/
readonly xWalletId: string;
/**
*
*
*
*
* @type {TransactionSendFungiblesReqBody}
* @memberof OnchainApiSendFungiblesToUsers
*/
readonly transactionSendFungiblesReqBody: TransactionSendFungiblesReqBody;
}
/**
* Request parameters for simulateNftMint operation in OnchainApi.
* @export
* @interface OnchainApiSimulateNftMintRequest
*/
export interface OnchainApiSimulateNftMintRequest {
/**
* JSON array of recipients (same structure as POST).
*
*
*
* @type {string}
* @memberof OnchainApiSimulateNftMint
*/
readonly recipients: string;
/**
* Ethereum address
*
*
*
* @type {string}
* @memberof OnchainApiSimulateNftMint
*/
readonly nftContractAddress: string;
/**
* Network to mint on.
*
*
*
* @type {'base' | 'optimism' | 'base-sepolia'}
* @memberof OnchainApiSimulateNftMint
*/
readonly network: SimulateNftMintNetworkEnum;
}
/**
* OnchainApi - object-oriented interface
* @export
* @class OnchainApi
* @extends {BaseAPI}
*/
export declare class OnchainApi extends BaseAPI implements OnchainApiInterface {
/**
* Creates a new token. This is an allowlisted API, reach out if you want access.
* @summary Deploy fungible
* @param {OnchainApiDeployFungibleRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof OnchainApi
* @returns {Promise<DeployFungibleResponse>} A promise that resolves to a `DeployFungibleResponse` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/deploy-fungible)
*
*/
deployFungible(requestParameters: OnchainApiDeployFungibleRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<DeployFungibleResponse, any>>;
/**
* Fetch a list of relevant owners for a on chain asset. If a viewer is provided, only relevant holders will be shown. This usually shows on a fungible asset page as \"X, Y, Z and N others you know own this asset\".
* @summary Relevant owners
* @param {OnchainApiFetchRelevantFungibleOwnersRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof OnchainApi
* @returns {Promise<RelevantFungibleOwnersResponse>} A promise that resolves to a `RelevantFungibleOwnersResponse` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-relevant-fungible-owners)
*
*/
fetchRelevantFungibleOwners(requestParameters: OnchainApiFetchRelevantFungibleOwnersRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<RelevantFungibleOwnersResponse, any>>;
/**
* Fetches the token balances of a user given their FID
* @summary Token balance
* @param {OnchainApiFetchUserBalanceRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof OnchainApi
* @returns {Promise<BalanceResponse>} A promise that resolves to a `BalanceResponse` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-user-balance)
*
*/
fetchUserBalance(requestParameters: OnchainApiFetchUserBalanceRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<BalanceResponse, any>>;
/**
* Mints an NFT to one or more recipients on a specified network and contract, using a configured server wallet. Contact us to set up your wallet configuration if you don\'t have one.
* @summary Mint NFT(s)
* @param {OnchainApiMintNftRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof OnchainApi
* @returns {Promise<MintNft200Response>} A promise that resolves to a `MintNft200Response` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/mint-nft)
*
*/
mintNft(requestParameters: OnchainApiMintNftRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<MintNft200Response, any>>;
/**
* Register a new farcaster account onchain. Optionally you can pass in signers to register a new account and create multiple signers in a single transaction
* @summary Register Farcaster account onchain
* @param {OnchainApiRegisterAccountOnchainRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof OnchainApi
* @returns {Promise<RegisterUserOnChainResponse>} A promise that resolves to a `RegisterUserOnChainResponse` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/register-account-onchain)
*
*/
registerAccountOnchain(requestParameters: OnchainApiRegisterAccountOnchainRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<RegisterUserOnChainResponse, any>>;
/**
* Send fungibles in bulk to several farcaster users. A funded wallet is to required use this API. React out to us on the Neynar channel on farcaster to get your wallet address.
* @summary Send fungibles
* @param {OnchainApiSendFungiblesToUsersRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof OnchainApi
* @returns {Promise<TransactionSendFungiblesResponse>} A promise that resolves to a `TransactionSendFungiblesResponse` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/send-fungibles-to-users)
*
*/
sendFungiblesToUsers(requestParameters: OnchainApiSendFungiblesToUsersRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<TransactionSendFungiblesResponse, any>>;
/**
* Simulates mint calldata for the given recipients, contract, and network. Useful for previewing calldata and ABI before minting.
* @summary Simulate NFT mint calldata
* @param {OnchainApiSimulateNftMintRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof OnchainApi
* @returns {Promise<SimulateNftMintResponse>} A promise that resolves to a `SimulateNftMintResponse` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/simulate-nft-mint)
*
*/
simulateNftMint(requestParameters: OnchainApiSimulateNftMintRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<SimulateNftMintResponse, any>>;
}
/**
* @export
*/
export declare const DeployFungibleMetadataNsfwEnum: {
readonly True: "true";
readonly False: "false";
};
export type DeployFungibleMetadataNsfwEnum = typeof DeployFungibleMetadataNsfwEnum[keyof typeof DeployFungibleMetadataNsfwEnum];
/**
* @export
*/
export declare const DeployFungibleNetworkEnum: {
readonly Base: "base";
};
export type DeployFungibleNetworkEnum = typeof DeployFungibleNetworkEnum[keyof typeof DeployFungibleNetworkEnum];
/**
* @export
*/
export declare const DeployFungibleFactoryEnum: {
readonly Wow: "wow";
readonly Clanker: "clanker";
};
export type DeployFungibleFactoryEnum = typeof DeployFungibleFactoryEnum[keyof typeof DeployFungibleFactoryEnum];
/**
* @export
*/
export declare const FetchRelevantFungibleOwnersNetworkEnum: {
readonly Ethereum: "ethereum";
readonly Optimism: "optimism";
readonly Base: "base";
readonly Arbitrum: "arbitrum";
readonly Solana: "solana";
};
export type FetchRelevantFungibleOwnersNetworkEnum = typeof FetchRelevantFungibleOwnersNetworkEnum[keyof typeof FetchRelevantFungibleOwnersNetworkEnum];
/**
* @export
*/
export declare const FetchUserBalanceNetworksEnum: {
readonly Ethereum: "ethereum";
readonly Optimism: "optimism";
readonly Base: "base";
readonly Arbitrum: "arbitrum";
};
export type FetchUserBalanceNetworksEnum = typeof FetchUserBalanceNetworksEnum[keyof typeof FetchUserBalanceNetworksEnum];
/**
* @export
*/
export declare const SimulateNftMintNetworkEnum: {
readonly Base: "base";
readonly Optimism: "optimism";
readonly BaseSepolia: "base-sepolia";
};
export type SimulateNftMintNetworkEnum = typeof SimulateNftMintNetworkEnum[keyof typeof SimulateNftMintNetworkEnum];