@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/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@audius/sdk",
3
- "version": "1.0.3",
3
+ "version": "1.0.5",
4
4
  "audius": {
5
- "releaseSHA": "99bba7c240d878fe34ca2aefdf0a31c8a2b8c0cb"
5
+ "releaseSHA": "cddbf59599ed672ba3047f94f910c983b2c45a1d"
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
  )
@@ -61,7 +61,7 @@ export async function getTokenAccountInfo({
61
61
  // NOTE: Our version of spl-token omits the second argument
62
62
  // in the type definitions even though it's actually available,
63
63
  // so we suppress error until we can upgrade.
64
- // @ts-ignore
64
+ // @ts-expect-error
65
65
  const info = await token.getAccountInfo(tokenAccountAddressKey, 'processed')
66
66
  return info
67
67
  }
@@ -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
  )
@@ -4,7 +4,7 @@ import {
4
4
  SYSVAR_RENT_PUBKEY,
5
5
  TransactionInstruction
6
6
  } from '@solana/web3.js'
7
- import borsh from 'borsh'
7
+ import { serialize } from 'borsh'
8
8
  import bs58 from 'bs58'
9
9
  import { SolanaUtils } from './SolanaUtils'
10
10
  import type { TransactionHandler } from './transactionHandler'
@@ -79,7 +79,7 @@ export const createUserBankFrom = async ({
79
79
  const instructionData = new CreateTokenAccountInstructionData({
80
80
  ethAddress: ethAddressArr
81
81
  })
82
- const serializedInstructionData = borsh.serialize(
82
+ const serializedInstructionData = serialize(
83
83
  createTokenAccountInstructionSchema,
84
84
  instructionData
85
85
  )