@audius/sdk 1.0.3 → 1.0.4

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/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@audius/sdk",
3
- "version": "1.0.3",
3
+ "version": "1.0.4",
4
4
  "audius": {
5
- "releaseSHA": "99bba7c240d878fe34ca2aefdf0a31c8a2b8c0cb"
5
+ "releaseSHA": "e6ca21697f2d23e30606d4f341f62fcacce560a6"
6
6
  },
7
7
  "description": "",
8
8
  "main": "dist/index.cjs.js",
@@ -7,7 +7,7 @@ import {
7
7
  SYSVAR_RENT_PUBKEY,
8
8
  TransactionInstruction
9
9
  } from '@solana/web3.js'
10
- import borsh from 'borsh'
10
+ import { serialize } from 'borsh'
11
11
  import { getBankAccountAddress } from './userBank'
12
12
  import BN from 'bn.js'
13
13
  import { SolanaUtils } from './SolanaUtils'
@@ -463,7 +463,7 @@ export const evaluateAttestations = async ({
463
463
  id: transferId,
464
464
  ethRecipient: SolanaUtils.ethAddressToArray(recipientEthAddress)
465
465
  })
466
- const serializedInstructionData = borsh.serialize(
466
+ const serializedInstructionData = serialize(
467
467
  validateAttestationsInstructionSchema,
468
468
  instructionData
469
469
  )
@@ -573,7 +573,7 @@ const generateSubmitAttestationInstruction = async ({
573
573
  ]
574
574
 
575
575
  const instructionData = new SubmitAttestationInstructionData({ transferId })
576
- const serializedInstructionData = borsh.serialize(
576
+ const serializedInstructionData = serialize(
577
577
  submitAttestationInstructionSchema,
578
578
  instructionData
579
579
  )
@@ -752,7 +752,7 @@ const generateCreateSenderInstruction = async ({
752
752
  ethAddress: SolanaUtils.ethAddressToArray(senderEthAddress),
753
753
  operator: SolanaUtils.ethAddressToArray(operatorEthAddress)
754
754
  })
755
- const serializedInstructionData = borsh.serialize(
755
+ const serializedInstructionData = serialize(
756
756
  createSenderPublicInstructionSchema,
757
757
  createSenderPublicInstructionData
758
758
  )
@@ -9,7 +9,7 @@ import {
9
9
  } from '@solana/web3.js'
10
10
  import type BN from 'bn.js'
11
11
  import type { TransactionHandler } from './transactionHandler'
12
- import borsh from 'borsh'
12
+ import { deserialize, serialize } from 'borsh'
13
13
  import { SolanaUtils } from './SolanaUtils'
14
14
  import secp256k1 from 'secp256k1'
15
15
  import { ClaimableProgramError } from './errors'
@@ -97,7 +97,7 @@ async function getAccountNonce({
97
97
  'confirmed'
98
98
  )
99
99
  if (accInfo.value) {
100
- const nonceAccount = borsh.deserialize(
100
+ const nonceAccount = deserialize(
101
101
  NonceAccountSchema,
102
102
  NonceAccount,
103
103
  accInfo.value.data
@@ -256,7 +256,7 @@ export async function transferWAudioBalance({
256
256
  nonce
257
257
  })
258
258
 
259
- const serializedInstructionData = borsh.serialize(
259
+ const serializedInstructionData = serialize(
260
260
  transferInstructionDataSchema,
261
261
  instructionData
262
262
  )