@audius/sdk 1.0.3 → 1.0.5

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.esm.js CHANGED
@@ -24,7 +24,7 @@ import { idl } from '@audius/anchor-audius-data';
24
24
  import anchor, { ProgramError, BN as BN$1 } from '@project-serum/anchor';
25
25
  import solanaWeb3, { PublicKey, SYSVAR_RENT_PUBKEY, SYSVAR_INSTRUCTIONS_PUBKEY, SystemProgram, Secp256k1Program, TransactionInstruction, Keypair, Transaction as Transaction$1, Connection, LAMPORTS_PER_SOL } from '@solana/web3.js';
26
26
  import splToken, { ASSOCIATED_TOKEN_PROGRAM_ID, Token, TOKEN_PROGRAM_ID } from '@solana/spl-token';
27
- import borsh from 'borsh';
27
+ import { serialize, deserialize } from 'borsh';
28
28
  import BN from 'bn.js';
29
29
  import keccak256 from 'keccak256';
30
30
  import secp256k1 from 'secp256k1';
@@ -33462,9 +33462,9 @@ var formatProviders = function formatProviders(providers) {
33462
33462
  };
33463
33463
 
33464
33464
  var name = "@audius/sdk";
33465
- var version = "1.0.3";
33465
+ var version = "1.0.5";
33466
33466
  var audius = {
33467
- releaseSHA: "99bba7c240d878fe34ca2aefdf0a31c8a2b8c0cb"
33467
+ releaseSHA: "cddbf59599ed672ba3047f94f910c983b2c45a1d"
33468
33468
  };
33469
33469
  var description = "";
33470
33470
  var main = "dist/index.cjs.js";
@@ -33981,7 +33981,7 @@ function _getAccountNonce() {
33981
33981
  accInfo = _context2.sent;
33982
33982
 
33983
33983
  if (accInfo.value) {
33984
- nonceAccount = borsh.deserialize(NonceAccountSchema, NonceAccount, accInfo.value.data);
33984
+ nonceAccount = deserialize(NonceAccountSchema, NonceAccount, accInfo.value.data);
33985
33985
  nonce = nonceAccount.nonce;
33986
33986
  }
33987
33987
 
@@ -34103,7 +34103,7 @@ function _transferWAudioBalance() {
34103
34103
  amount: amount,
34104
34104
  nonce: nonce
34105
34105
  });
34106
- serializedInstructionData = borsh.serialize(transferInstructionDataSchema, instructionData);
34106
+ serializedInstructionData = serialize(transferInstructionDataSchema, instructionData);
34107
34107
  _SolanaUtils$signByte = SolanaUtils.signBytes(Buffer.from(serializedInstructionData), senderEthPrivateKey), signature = _SolanaUtils$signByte.signature, recoveryId = _SolanaUtils$signByte.recoveryId;
34108
34108
  secpTransactionInstruction = Secp256k1Program.createInstructionWithPublicKey({
34109
34109
  publicKey: Buffer.from(ethPubkey),
@@ -34207,7 +34207,7 @@ var createUserBankFrom = /*#__PURE__*/function () {
34207
34207
  instructionData = new CreateTokenAccountInstructionData({
34208
34208
  ethAddress: ethAddressArr
34209
34209
  });
34210
- serializedInstructionData = borsh.serialize(createTokenAccountInstructionSchema, instructionData); // 0th index in the Rust instruction enum
34210
+ serializedInstructionData = serialize(createTokenAccountInstructionSchema, instructionData); // 0th index in the Rust instruction enum
34211
34211
 
34212
34212
  serializedInstructionEnum = Uint8Array.of.apply(Uint8Array, [0].concat(_toConsumableArray(serializedInstructionData))); // Create the account we aim to generate
34213
34213
 
@@ -34335,7 +34335,7 @@ function _getTokenAccountInfo() {
34335
34335
  // NOTE: Our version of spl-token omits the second argument
34336
34336
  // in the type definitions even though it's actually available,
34337
34337
  // so we suppress error until we can upgrade.
34338
- // @ts-ignore
34338
+ // @ts-expect-error
34339
34339
 
34340
34340
  _context2.next = 4;
34341
34341
  return token.getAccountInfo(tokenAccountAddressKey, 'processed');
@@ -35528,7 +35528,7 @@ var evaluateAttestations = /*#__PURE__*/function () {
35528
35528
  id: transferId,
35529
35529
  ethRecipient: SolanaUtils.ethAddressToArray(recipientEthAddress)
35530
35530
  });
35531
- serializedInstructionData = borsh.serialize(validateAttestationsInstructionSchema, instructionData);
35531
+ serializedInstructionData = serialize(validateAttestationsInstructionSchema, instructionData);
35532
35532
  serializedInstructionEnum = Buffer.from(Uint8Array.of.apply(Uint8Array, [EVALUATE_INSTRUCTION_ENUM_VALUE].concat(_toConsumableArray(serializedInstructionData))));
35533
35533
  transferInstruction = new TransactionInstruction({
35534
35534
  keys: accounts,
@@ -35623,7 +35623,7 @@ var generateSubmitAttestationInstruction = /*#__PURE__*/function () {
35623
35623
  instructionData = new SubmitAttestationInstructionData({
35624
35624
  transferId: transferId
35625
35625
  });
35626
- serializedInstructionData = borsh.serialize(submitAttestationInstructionSchema, instructionData);
35626
+ serializedInstructionData = serialize(submitAttestationInstructionSchema, instructionData);
35627
35627
  serializedInstructionEnum = Buffer.from(Uint8Array.of.apply(Uint8Array, [SUBMIT_INSTRUCTION_ENUM_VALUE].concat(_toConsumableArray(serializedInstructionData))));
35628
35628
  return _context2.abrupt("return", new TransactionInstruction({
35629
35629
  keys: verifyInstructionAccounts,
@@ -35795,7 +35795,7 @@ var generateCreateSenderInstruction = /*#__PURE__*/function () {
35795
35795
  ethAddress: SolanaUtils.ethAddressToArray(senderEthAddress),
35796
35796
  operator: SolanaUtils.ethAddressToArray(operatorEthAddress)
35797
35797
  });
35798
- serializedInstructionData = borsh.serialize(createSenderPublicInstructionSchema, createSenderPublicInstructionData);
35798
+ serializedInstructionData = serialize(createSenderPublicInstructionSchema, createSenderPublicInstructionData);
35799
35799
  serializedInstructionEnum = Buffer.from(Uint8Array.of.apply(Uint8Array, [CREATE_SENDER_PUBLIC_ENUM_VALUE].concat(_toConsumableArray(serializedInstructionData))));
35800
35800
  return _context4.abrupt("return", new TransactionInstruction({
35801
35801
  keys: createSenderInstructionAccounts,