@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/dist/index.cjs.js +9 -10
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +10 -10
- package/dist/index.esm.js.map +1 -1
- package/dist/legacy.js +9 -10
- package/dist/legacy.js.map +1 -1
- package/dist/native-libs.js +10 -10
- 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/tokenAccount.ts +1 -1
- package/src/services/solana/transfer.ts +3 -3
- package/src/services/solana/userBank.ts +2 -2
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
|
|
28
|
+
import { 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.5";
|
|
518
518
|
var audius = {
|
|
519
|
-
releaseSHA: "
|
|
519
|
+
releaseSHA: "cddbf59599ed672ba3047f94f910c983b2c45a1d"
|
|
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),
|
|
@@ -31580,7 +31580,7 @@ var createUserBankFrom = /*#__PURE__*/function () {
|
|
|
31580
31580
|
instructionData = new CreateTokenAccountInstructionData({
|
|
31581
31581
|
ethAddress: ethAddressArr
|
|
31582
31582
|
});
|
|
31583
|
-
serializedInstructionData =
|
|
31583
|
+
serializedInstructionData = serialize(createTokenAccountInstructionSchema, instructionData); // 0th index in the Rust instruction enum
|
|
31584
31584
|
|
|
31585
31585
|
serializedInstructionEnum = Uint8Array.of.apply(Uint8Array, [0].concat(_toConsumableArray(serializedInstructionData))); // Create the account we aim to generate
|
|
31586
31586
|
|
|
@@ -31708,7 +31708,7 @@ function _getTokenAccountInfo() {
|
|
|
31708
31708
|
// NOTE: Our version of spl-token omits the second argument
|
|
31709
31709
|
// in the type definitions even though it's actually available,
|
|
31710
31710
|
// so we suppress error until we can upgrade.
|
|
31711
|
-
// @ts-
|
|
31711
|
+
// @ts-expect-error
|
|
31712
31712
|
|
|
31713
31713
|
_context2.next = 4;
|
|
31714
31714
|
return token.getAccountInfo(tokenAccountAddressKey, 'processed');
|
|
@@ -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,
|