flipmeme-sdk 1.3.44 → 1.3.45
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +8 -1
- package/dist/index.d.ts +8 -1
- package/dist/index.js +2 -8
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -8
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { AnchorProvider } from '@coral-xyz/anchor';
|
|
2
2
|
import { SendTransactionOptions } from '@solana/wallet-adapter-base';
|
|
3
3
|
import BN from 'bn.js';
|
|
4
|
+
import * as _solana_web3_js from '@solana/web3.js';
|
|
4
5
|
import { PublicKey, Transaction, VersionedTransaction, Connection, TransactionSignature, Keypair } from '@solana/web3.js';
|
|
5
6
|
import { Signer, ethers, BigNumber } from 'ethers';
|
|
6
7
|
import Decimal from 'decimal.js';
|
|
@@ -416,7 +417,13 @@ declare class FlipmemeSDK {
|
|
|
416
417
|
buy(params: BuyParams | EthBuyParams): Promise<ConfirmResult>;
|
|
417
418
|
flipSell(params: SellParams | EthSellParams): Promise<ConfirmResult>;
|
|
418
419
|
profileSell(data: ProfileSellParams | EthProfileSellParams): Promise<ConfirmResult>;
|
|
419
|
-
buyCredit(params: TransferParams): Promise<
|
|
420
|
+
buyCredit(params: TransferParams): Promise<{
|
|
421
|
+
signature: string;
|
|
422
|
+
latestBlockhash: Readonly<{
|
|
423
|
+
blockhash: _solana_web3_js.Blockhash;
|
|
424
|
+
lastValidBlockHeight: number;
|
|
425
|
+
}>;
|
|
426
|
+
}>;
|
|
420
427
|
getTotalPrice(type: PurcahseType, collectionId: string, amount: number): Promise<string>;
|
|
421
428
|
/**
|
|
422
429
|
* create lookup table account with lookuptable addresses and return lookup table account
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { AnchorProvider } from '@coral-xyz/anchor';
|
|
2
2
|
import { SendTransactionOptions } from '@solana/wallet-adapter-base';
|
|
3
3
|
import BN from 'bn.js';
|
|
4
|
+
import * as _solana_web3_js from '@solana/web3.js';
|
|
4
5
|
import { PublicKey, Transaction, VersionedTransaction, Connection, TransactionSignature, Keypair } from '@solana/web3.js';
|
|
5
6
|
import { Signer, ethers, BigNumber } from 'ethers';
|
|
6
7
|
import Decimal from 'decimal.js';
|
|
@@ -416,7 +417,13 @@ declare class FlipmemeSDK {
|
|
|
416
417
|
buy(params: BuyParams | EthBuyParams): Promise<ConfirmResult>;
|
|
417
418
|
flipSell(params: SellParams | EthSellParams): Promise<ConfirmResult>;
|
|
418
419
|
profileSell(data: ProfileSellParams | EthProfileSellParams): Promise<ConfirmResult>;
|
|
419
|
-
buyCredit(params: TransferParams): Promise<
|
|
420
|
+
buyCredit(params: TransferParams): Promise<{
|
|
421
|
+
signature: string;
|
|
422
|
+
latestBlockhash: Readonly<{
|
|
423
|
+
blockhash: _solana_web3_js.Blockhash;
|
|
424
|
+
lastValidBlockHeight: number;
|
|
425
|
+
}>;
|
|
426
|
+
}>;
|
|
420
427
|
getTotalPrice(type: PurcahseType, collectionId: string, amount: number): Promise<string>;
|
|
421
428
|
/**
|
|
422
429
|
* create lookup table account with lookuptable addresses and return lookup table account
|
package/dist/index.js
CHANGED
|
@@ -32600,20 +32600,14 @@ var SolanaConnector = class {
|
|
|
32600
32600
|
}
|
|
32601
32601
|
const latestBlockhash = yield this.config.provider.connection.getLatestBlockhash();
|
|
32602
32602
|
const blockHash = latestBlockhash.blockhash;
|
|
32603
|
-
const transaction = new import_web34.Transaction(
|
|
32604
|
-
feePayer: this.config.wallet,
|
|
32605
|
-
recentBlockhash: blockHash
|
|
32606
|
-
}).add(
|
|
32603
|
+
const transaction = new import_web34.Transaction().add(
|
|
32607
32604
|
import_web34.SystemProgram.transfer({
|
|
32608
32605
|
fromPubkey: params.userPubkey,
|
|
32609
32606
|
toPubkey: this.configAddresses.ADMIN_FOR_CREDIT_BUY,
|
|
32610
32607
|
lamports: new import_decimal3.default(params.amount).mul(10 ** 9).floor().toNumber()
|
|
32611
32608
|
})
|
|
32612
32609
|
);
|
|
32613
|
-
return yield this.
|
|
32614
|
-
transaction,
|
|
32615
|
-
this.config.provider.connection
|
|
32616
|
-
);
|
|
32610
|
+
return yield this.sendTxn(transaction, null);
|
|
32617
32611
|
});
|
|
32618
32612
|
}
|
|
32619
32613
|
claimReferralReward(params) {
|