@audius/sdk 3.0.8-beta.12 → 3.0.8-beta.13

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/legacy.js CHANGED
@@ -35544,7 +35544,7 @@ function _allRequests() {
35544
35544
  return _allRequests.apply(this, arguments);
35545
35545
  }
35546
35546
 
35547
- var randomKeyPair = solanaWeb3.Keypair.generate();
35547
+ solanaWeb3.Keypair.generate();
35548
35548
 
35549
35549
  var MIN_GAS_PRICE = Math.pow(10, 9); // 1 GWei, ETH minimum allowed gas price
35550
35550
 
@@ -35988,9 +35988,9 @@ var EthWeb3Manager = /*#__PURE__*/function () {
35988
35988
  }();
35989
35989
 
35990
35990
  var name = "@audius/sdk";
35991
- var version = "3.0.8-beta.12";
35991
+ var version = "3.0.8-beta.13";
35992
35992
  var audius = {
35993
- releaseSHA: "1119e8535700beff7e3bef81d78df65bb3e33b0e"
35993
+ releaseSHA: "473c515045520b748c27a58060a426eba8a3fc19"
35994
35994
  };
35995
35995
  var description = "Audius SDK";
35996
35996
  var keywords = [
@@ -36059,8 +36059,8 @@ var dependencies = {
36059
36059
  "@noble/secp256k1": "1.7.0",
36060
36060
  "@project-serum/anchor": "0.24.1",
36061
36061
  "@scure/base": "1.1.1",
36062
- "@solana/spl-token": "0.1.8",
36063
- "@solana/web3.js": "1.37.1",
36062
+ "@solana/spl-token": "0.3.8",
36063
+ "@solana/web3.js": "1.78.4",
36064
36064
  "abi-decoder": "2.4.0",
36065
36065
  ajv: "6.12.2",
36066
36066
  assert: "2.0.0",
@@ -52927,26 +52927,20 @@ function getTokenAccountInfo(_x2) {
52927
52927
 
52928
52928
  function _getTokenAccountInfo() {
52929
52929
  _getTokenAccountInfo = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2(_ref2) {
52930
- var tokenAccountAddressKey, mintKey, solanaTokenProgramKey, connection, token, info;
52930
+ var tokenAccountAddressKey, connection, info;
52931
52931
  return regeneratorRuntime.wrap(function _callee2$(_context2) {
52932
52932
  while (1) {
52933
52933
  switch (_context2.prev = _context2.next) {
52934
52934
  case 0:
52935
- tokenAccountAddressKey = _ref2.tokenAccountAddressKey, mintKey = _ref2.mintKey, solanaTokenProgramKey = _ref2.solanaTokenProgramKey, connection = _ref2.connection;
52936
- token = new splToken.Token(connection, mintKey, solanaTokenProgramKey, randomKeyPair); // Fetch token info with 'processed commitment to get any recently changed amounts.
52937
- // NOTE: Our version of spl-token omits the second argument
52938
- // in the type definitions even though it's actually available,
52939
- // so we suppress error until we can upgrade.
52940
- // @ts-expect-error
52941
-
52942
- _context2.next = 4;
52943
- return token.getAccountInfo(tokenAccountAddressKey, 'processed');
52935
+ tokenAccountAddressKey = _ref2.tokenAccountAddressKey, connection = _ref2.connection;
52936
+ _context2.next = 3;
52937
+ return splToken.getAccount(connection, tokenAccountAddressKey, 'processed');
52944
52938
 
52945
- case 4:
52939
+ case 3:
52946
52940
  info = _context2.sent;
52947
52941
  return _context2.abrupt("return", info);
52948
52942
 
52949
- case 6:
52943
+ case 5:
52950
52944
  case "end":
52951
52945
  return _context2.stop();
52952
52946
  }
@@ -54782,7 +54776,7 @@ var SolanaWeb3Manager = /*#__PURE__*/function () {
54782
54776
  case 3:
54783
54777
  userbank = _context2.sent;
54784
54778
  _context2.next = 6;
54785
- return this.getTokenAccountInfo(userbank.toString(), mint);
54779
+ return this.getTokenAccountInfo(userbank.toString());
54786
54780
 
54787
54781
  case 6:
54788
54782
  tokenAccount = _context2.sent;
@@ -55073,38 +55067,33 @@ var SolanaWeb3Manager = /*#__PURE__*/function () {
55073
55067
  key: "getTokenAccountInfo",
55074
55068
  value: function () {
55075
55069
  var _getTokenAccountInfo2 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee8(solanaAddress) {
55076
- var mint,
55077
- res,
55078
- _args8 = arguments;
55070
+ var res;
55079
55071
  return regeneratorRuntime.wrap(function _callee8$(_context8) {
55080
55072
  while (1) {
55081
55073
  switch (_context8.prev = _context8.next) {
55082
55074
  case 0:
55083
- mint = _args8.length > 1 && _args8[1] !== undefined ? _args8[1] : DEFAULT_MINT;
55084
- _context8.prev = 1;
55085
- _context8.next = 4;
55075
+ _context8.prev = 0;
55076
+ _context8.next = 3;
55086
55077
  return getTokenAccountInfo({
55087
55078
  tokenAccountAddressKey: new solanaWeb3.PublicKey(solanaAddress),
55088
- mintKey: this.mints[mint],
55089
- solanaTokenProgramKey: this.solanaTokenKey,
55090
55079
  connection: this.connection
55091
55080
  });
55092
55081
 
55093
- case 4:
55082
+ case 3:
55094
55083
  res = _context8.sent;
55095
55084
  return _context8.abrupt("return", res);
55096
55085
 
55097
- case 8:
55098
- _context8.prev = 8;
55099
- _context8.t0 = _context8["catch"](1);
55086
+ case 7:
55087
+ _context8.prev = 7;
55088
+ _context8.t0 = _context8["catch"](0);
55100
55089
  return _context8.abrupt("return", null);
55101
55090
 
55102
- case 11:
55091
+ case 10:
55103
55092
  case "end":
55104
55093
  return _context8.stop();
55105
55094
  }
55106
55095
  }
55107
- }, _callee8, this, [[1, 8]]);
55096
+ }, _callee8, this, [[0, 7]]);
55108
55097
  }));
55109
55098
 
55110
55099
  function getTokenAccountInfo$1(_x5) {
@@ -55159,7 +55148,7 @@ var SolanaWeb3Manager = /*#__PURE__*/function () {
55159
55148
  case 13:
55160
55149
  // Multiply by 10^10 to maintain same decimals as eth $AUDIO
55161
55150
  decimals = AUDIO_DECMIALS - WAUDIO_DECMIALS;
55162
- return _context9.abrupt("return", tokenAccount.amount.mul(Utils.toBN('1'.padEnd(decimals + 1, '0'))));
55151
+ return _context9.abrupt("return", tokenAccount.amount * BigInt('1'.padEnd(decimals + 1, '0')));
55163
55152
 
55164
55153
  case 17:
55165
55154
  _context9.prev = 17;