@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/native-libs.js
CHANGED
|
@@ -25,7 +25,7 @@ import { Transaction } from 'ethereumjs-tx';
|
|
|
25
25
|
import splToken, { ASSOCIATED_TOKEN_PROGRAM_ID, Token, TOKEN_PROGRAM_ID } from '@solana/spl-token';
|
|
26
26
|
import anchor, { BN as BN$1 } from '@project-serum/anchor';
|
|
27
27
|
import { idl } from '@audius/anchor-audius-data';
|
|
28
|
-
import borsh from 'borsh';
|
|
28
|
+
import borsh, { serialize, deserialize } from 'borsh';
|
|
29
29
|
import BN from 'bn.js';
|
|
30
30
|
import keccak256 from 'keccak256';
|
|
31
31
|
import secp256k1 from 'secp256k1';
|
|
@@ -514,9 +514,9 @@ if (typeof window !== 'undefined' && window && window.Web3) {
|
|
|
514
514
|
var LibsWeb3 = Web3;
|
|
515
515
|
|
|
516
516
|
var name = "@audius/sdk";
|
|
517
|
-
var version = "1.0.
|
|
517
|
+
var version = "1.0.4";
|
|
518
518
|
var audius = {
|
|
519
|
-
releaseSHA: "
|
|
519
|
+
releaseSHA: "e6ca21697f2d23e30606d4f341f62fcacce560a6"
|
|
520
520
|
};
|
|
521
521
|
var description = "";
|
|
522
522
|
var main = "dist/index.cjs.js";
|
|
@@ -31354,7 +31354,7 @@ function _getAccountNonce() {
|
|
|
31354
31354
|
accInfo = _context2.sent;
|
|
31355
31355
|
|
|
31356
31356
|
if (accInfo.value) {
|
|
31357
|
-
nonceAccount =
|
|
31357
|
+
nonceAccount = deserialize(NonceAccountSchema, NonceAccount, accInfo.value.data);
|
|
31358
31358
|
nonce = nonceAccount.nonce;
|
|
31359
31359
|
}
|
|
31360
31360
|
|
|
@@ -31476,7 +31476,7 @@ function _transferWAudioBalance() {
|
|
|
31476
31476
|
amount: amount,
|
|
31477
31477
|
nonce: nonce
|
|
31478
31478
|
});
|
|
31479
|
-
serializedInstructionData =
|
|
31479
|
+
serializedInstructionData = serialize(transferInstructionDataSchema, instructionData);
|
|
31480
31480
|
_SolanaUtils$signByte = SolanaUtils.signBytes(Buffer.from(serializedInstructionData), senderEthPrivateKey), signature = _SolanaUtils$signByte.signature, recoveryId = _SolanaUtils$signByte.recoveryId;
|
|
31481
31481
|
secpTransactionInstruction = Secp256k1Program.createInstructionWithPublicKey({
|
|
31482
31482
|
publicKey: Buffer.from(ethPubkey),
|
|
@@ -32901,7 +32901,7 @@ var evaluateAttestations = /*#__PURE__*/function () {
|
|
|
32901
32901
|
id: transferId,
|
|
32902
32902
|
ethRecipient: SolanaUtils.ethAddressToArray(recipientEthAddress)
|
|
32903
32903
|
});
|
|
32904
|
-
serializedInstructionData =
|
|
32904
|
+
serializedInstructionData = serialize(validateAttestationsInstructionSchema, instructionData);
|
|
32905
32905
|
serializedInstructionEnum = Buffer.from(Uint8Array.of.apply(Uint8Array, [EVALUATE_INSTRUCTION_ENUM_VALUE].concat(_toConsumableArray(serializedInstructionData))));
|
|
32906
32906
|
transferInstruction = new TransactionInstruction({
|
|
32907
32907
|
keys: accounts,
|
|
@@ -32996,7 +32996,7 @@ var generateSubmitAttestationInstruction = /*#__PURE__*/function () {
|
|
|
32996
32996
|
instructionData = new SubmitAttestationInstructionData({
|
|
32997
32997
|
transferId: transferId
|
|
32998
32998
|
});
|
|
32999
|
-
serializedInstructionData =
|
|
32999
|
+
serializedInstructionData = serialize(submitAttestationInstructionSchema, instructionData);
|
|
33000
33000
|
serializedInstructionEnum = Buffer.from(Uint8Array.of.apply(Uint8Array, [SUBMIT_INSTRUCTION_ENUM_VALUE].concat(_toConsumableArray(serializedInstructionData))));
|
|
33001
33001
|
return _context2.abrupt("return", new TransactionInstruction({
|
|
33002
33002
|
keys: verifyInstructionAccounts,
|
|
@@ -33168,7 +33168,7 @@ var generateCreateSenderInstruction = /*#__PURE__*/function () {
|
|
|
33168
33168
|
ethAddress: SolanaUtils.ethAddressToArray(senderEthAddress),
|
|
33169
33169
|
operator: SolanaUtils.ethAddressToArray(operatorEthAddress)
|
|
33170
33170
|
});
|
|
33171
|
-
serializedInstructionData =
|
|
33171
|
+
serializedInstructionData = serialize(createSenderPublicInstructionSchema, createSenderPublicInstructionData);
|
|
33172
33172
|
serializedInstructionEnum = Buffer.from(Uint8Array.of.apply(Uint8Array, [CREATE_SENDER_PUBLIC_ENUM_VALUE].concat(_toConsumableArray(serializedInstructionData))));
|
|
33173
33173
|
return _context4.abrupt("return", new TransactionInstruction({
|
|
33174
33174
|
keys: createSenderInstructionAccounts,
|