@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/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 borsh, { 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.
|
|
33465
|
+
var version = "1.0.4";
|
|
33466
33466
|
var audius = {
|
|
33467
|
-
releaseSHA: "
|
|
33467
|
+
releaseSHA: "e6ca21697f2d23e30606d4f341f62fcacce560a6"
|
|
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 =
|
|
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 =
|
|
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),
|
|
@@ -35528,7 +35528,7 @@ var evaluateAttestations = /*#__PURE__*/function () {
|
|
|
35528
35528
|
id: transferId,
|
|
35529
35529
|
ethRecipient: SolanaUtils.ethAddressToArray(recipientEthAddress)
|
|
35530
35530
|
});
|
|
35531
|
-
serializedInstructionData =
|
|
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 =
|
|
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 =
|
|
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,
|