opensea-js
Version:
TypeScript SDK for the OpenSea marketplace helps developers build new experiences using NFTs and our marketplace data
32 lines (31 loc) • 1.23 kB
TypeScript
import { BigNumberish } from "ethers";
import { SDKContext } from "./context";
/**
* Token wrapping and unwrapping operations
*/
export declare class TokensManager {
private context;
constructor(context: SDKContext);
/**
* Wrap native asset into wrapped native asset (e.g. ETH into WETH, POL into WPOL).
* Wrapped native assets are needed for making offers.
* @param options
* @param options.amountInEth Amount of native asset to wrap
* @param options.accountAddress Address of the user's wallet containing the native asset
*/
wrapEth({ amountInEth, accountAddress, }: {
amountInEth: BigNumberish;
accountAddress: string;
}): Promise<void>;
/**
* Unwrap wrapped native asset into native asset (e.g. WETH into ETH, WPOL into POL).
* Emits the `UnwrapWeth` event when the transaction is prompted.
* @param options
* @param options.amountInEth How much wrapped native asset to unwrap
* @param options.accountAddress Address of the user's wallet containing the wrapped native asset
*/
unwrapWeth({ amountInEth, accountAddress, }: {
amountInEth: BigNumberish;
accountAddress: string;
}): Promise<void>;
}