@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/dist/index.cjs.js +7 -7
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +8 -8
- package/dist/index.esm.js.map +1 -1
- package/dist/legacy.js +7 -7
- package/dist/legacy.js.map +1 -1
- package/dist/native-libs.js +8 -8
- package/dist/native-libs.js.map +1 -1
- package/package.json +2 -2
- package/src/services/solana/rewards.ts +4 -4
- package/src/services/solana/transfer.ts +3 -3
package/package.json
CHANGED
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
SYSVAR_RENT_PUBKEY,
|
|
8
8
|
TransactionInstruction
|
|
9
9
|
} from '@solana/web3.js'
|
|
10
|
-
import
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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
|
|
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 =
|
|
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 =
|
|
259
|
+
const serializedInstructionData = serialize(
|
|
260
260
|
transferInstructionDataSchema,
|
|
261
261
|
instructionData
|
|
262
262
|
)
|