@tradeport/sui-trading-sdk 0.2.0 → 0.2.2

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/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @tradeport/sui-trading-sdk
2
2
 
3
+ ## 0.2.2
4
+
5
+ ### Patch Changes
6
+
7
+ - dbda4c0: Removed bulk transfer fee
8
+
9
+ ## 0.2.1
10
+
11
+ ### Patch Changes
12
+
13
+ - 376afa8: Added user for migrateNftsFromUnsharedKiosks
14
+
3
15
  ## 0.2.0
4
16
 
5
17
  ### Minor Changes
package/dist/index.d.mts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { Transaction } from '@mysten/sui/transactions';
2
- import { KioskTransaction } from '@mysten/kiosk';
3
2
  import { GraphQLClient } from 'graphql-request';
3
+ import { KioskTransaction } from '@mysten/kiosk';
4
4
 
5
5
  type AcceptCollectionBid = {
6
6
  bidId: string;
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { Transaction } from '@mysten/sui/transactions';
2
- import { KioskTransaction } from '@mysten/kiosk';
3
2
  import { GraphQLClient } from 'graphql-request';
3
+ import { KioskTransaction } from '@mysten/kiosk';
4
4
 
5
5
  type AcceptCollectionBid = {
6
6
  bidId: string;
package/dist/index.js CHANGED
@@ -5981,44 +5981,6 @@ var removeNftBids = async ({ bidIds }, context) => {
5981
5981
  // src/methods/transferNfts/transferNfts.ts
5982
5982
  var import_transactions21 = require("@mysten/sui/transactions");
5983
5983
 
5984
- // src/graphql/queries/fetchCryptoToUsdRate.ts
5985
- var import_graphql_request21 = require("graphql-request");
5986
- var fetchCryptoToUsdRate = import_graphql_request21.gql`
5987
- query fetchCryptoToUsdRate($crypto: String!) {
5988
- crypto_rates(where: { crypto: { _eq: $crypto }, fiat: { _eq: "USD" } }) {
5989
- crypto
5990
- fiat
5991
- id
5992
- rate
5993
- timestamp
5994
- }
5995
- }
5996
- `;
5997
-
5998
- // src/helpers/getSuiToUsdRate.ts
5999
- var getSuiToUsdRate = async () => {
6000
- try {
6001
- const res = await gqlChainRequest({
6002
- chain: "sui",
6003
- query: fetchCryptoToUsdRate,
6004
- variables: { crypto: "sui" }
6005
- });
6006
- return res?.crypto_rates?.[0]?.rate;
6007
- } catch (e) {
6008
- }
6009
- };
6010
-
6011
- // src/helpers/addOneDollarFee.ts
6012
- var addOneDollarFee = async (tx) => {
6013
- const rate = await getSuiToUsdRate();
6014
- const companyFee = BigInt(Math.ceil(1e9 / rate));
6015
- const [microTxFee] = tx.splitCoins(tx.gas, [tx.pure.u64(Number(companyFee))]);
6016
- tx.transferObjects(
6017
- [tx.object(microTxFee)],
6018
- tx.pure.address(addLeadingZerosAfter0x(TRADEPORT_BENEFICIARY_ADDRESS))
6019
- );
6020
- };
6021
-
6022
5984
  // src/helpers/rpc/getAcountBalance.ts
6023
5985
  var getAccountBalance = async ({ suiClient, owner }) => {
6024
5986
  try {
@@ -6104,9 +6066,6 @@ var transferNfts = async ({ nftIds, recipientAddress, walletAddress }, context)
6104
6066
  recipientAddress
6105
6067
  });
6106
6068
  }
6107
- if (res?.nfts?.length > 1) {
6108
- await addOneDollarFee(tx);
6109
- }
6110
6069
  return import_transactions21.Transaction.from(tx);
6111
6070
  };
6112
6071
 
@@ -6260,7 +6219,7 @@ async function withdrawProfitsFromKiosks({ walletAddress }, context) {
6260
6219
  // src/SuiTradingClient.ts
6261
6220
  var SuiTradingClient = class {
6262
6221
  constructor({ apiUser, apiKey, suiNodeUrl, graphQLClient }) {
6263
- this.allowedApiUsersForUnsharedKiosksMigration = ["tradeport.xyz"];
6222
+ this.allowedApiUsersForUnsharedKiosksMigration = ["tradeport.xyz", "mercato.xyz"];
6264
6223
  this.apiUser = apiUser;
6265
6224
  this.apiKey = apiKey;
6266
6225
  this.suiClient = createSuiClient_default(suiNodeUrl || (0, import_client2.getFullnodeUrl)("mainnet"));