@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/index.cjs.js
CHANGED
|
@@ -75,7 +75,6 @@ var AudiusData__namespace = /*#__PURE__*/_interopNamespace(AudiusData);
|
|
|
75
75
|
var anchor__default = /*#__PURE__*/_interopDefaultLegacy(anchor);
|
|
76
76
|
var solanaWeb3__default = /*#__PURE__*/_interopDefaultLegacy(solanaWeb3);
|
|
77
77
|
var splToken__default = /*#__PURE__*/_interopDefaultLegacy(splToken);
|
|
78
|
-
var borsh__default = /*#__PURE__*/_interopDefaultLegacy(borsh);
|
|
79
78
|
var BN__default = /*#__PURE__*/_interopDefaultLegacy(BN);
|
|
80
79
|
var keccak256__default = /*#__PURE__*/_interopDefaultLegacy(keccak256);
|
|
81
80
|
var secp256k1__default = /*#__PURE__*/_interopDefaultLegacy(secp256k1);
|
|
@@ -33508,9 +33507,9 @@ var formatProviders = function formatProviders(providers) {
|
|
|
33508
33507
|
};
|
|
33509
33508
|
|
|
33510
33509
|
var name = "@audius/sdk";
|
|
33511
|
-
var version = "1.0.
|
|
33510
|
+
var version = "1.0.5";
|
|
33512
33511
|
var audius = {
|
|
33513
|
-
releaseSHA: "
|
|
33512
|
+
releaseSHA: "cddbf59599ed672ba3047f94f910c983b2c45a1d"
|
|
33514
33513
|
};
|
|
33515
33514
|
var description = "";
|
|
33516
33515
|
var main = "dist/index.cjs.js";
|
|
@@ -34027,7 +34026,7 @@ function _getAccountNonce() {
|
|
|
34027
34026
|
accInfo = _context2.sent;
|
|
34028
34027
|
|
|
34029
34028
|
if (accInfo.value) {
|
|
34030
|
-
nonceAccount =
|
|
34029
|
+
nonceAccount = borsh.deserialize(NonceAccountSchema, NonceAccount, accInfo.value.data);
|
|
34031
34030
|
nonce = nonceAccount.nonce;
|
|
34032
34031
|
}
|
|
34033
34032
|
|
|
@@ -34149,7 +34148,7 @@ function _transferWAudioBalance() {
|
|
|
34149
34148
|
amount: amount,
|
|
34150
34149
|
nonce: nonce
|
|
34151
34150
|
});
|
|
34152
|
-
serializedInstructionData =
|
|
34151
|
+
serializedInstructionData = borsh.serialize(transferInstructionDataSchema, instructionData);
|
|
34153
34152
|
_SolanaUtils$signByte = SolanaUtils.signBytes(Buffer.from(serializedInstructionData), senderEthPrivateKey), signature = _SolanaUtils$signByte.signature, recoveryId = _SolanaUtils$signByte.recoveryId;
|
|
34154
34153
|
secpTransactionInstruction = solanaWeb3.Secp256k1Program.createInstructionWithPublicKey({
|
|
34155
34154
|
publicKey: Buffer.from(ethPubkey),
|
|
@@ -34253,7 +34252,7 @@ var createUserBankFrom = /*#__PURE__*/function () {
|
|
|
34253
34252
|
instructionData = new CreateTokenAccountInstructionData({
|
|
34254
34253
|
ethAddress: ethAddressArr
|
|
34255
34254
|
});
|
|
34256
|
-
serializedInstructionData =
|
|
34255
|
+
serializedInstructionData = borsh.serialize(createTokenAccountInstructionSchema, instructionData); // 0th index in the Rust instruction enum
|
|
34257
34256
|
|
|
34258
34257
|
serializedInstructionEnum = Uint8Array.of.apply(Uint8Array, [0].concat(_toConsumableArray(serializedInstructionData))); // Create the account we aim to generate
|
|
34259
34258
|
|
|
@@ -34381,7 +34380,7 @@ function _getTokenAccountInfo() {
|
|
|
34381
34380
|
// NOTE: Our version of spl-token omits the second argument
|
|
34382
34381
|
// in the type definitions even though it's actually available,
|
|
34383
34382
|
// so we suppress error until we can upgrade.
|
|
34384
|
-
// @ts-
|
|
34383
|
+
// @ts-expect-error
|
|
34385
34384
|
|
|
34386
34385
|
_context2.next = 4;
|
|
34387
34386
|
return token.getAccountInfo(tokenAccountAddressKey, 'processed');
|
|
@@ -35574,7 +35573,7 @@ var evaluateAttestations = /*#__PURE__*/function () {
|
|
|
35574
35573
|
id: transferId,
|
|
35575
35574
|
ethRecipient: SolanaUtils.ethAddressToArray(recipientEthAddress)
|
|
35576
35575
|
});
|
|
35577
|
-
serializedInstructionData =
|
|
35576
|
+
serializedInstructionData = borsh.serialize(validateAttestationsInstructionSchema, instructionData);
|
|
35578
35577
|
serializedInstructionEnum = Buffer.from(Uint8Array.of.apply(Uint8Array, [EVALUATE_INSTRUCTION_ENUM_VALUE].concat(_toConsumableArray(serializedInstructionData))));
|
|
35579
35578
|
transferInstruction = new solanaWeb3.TransactionInstruction({
|
|
35580
35579
|
keys: accounts,
|
|
@@ -35669,7 +35668,7 @@ var generateSubmitAttestationInstruction = /*#__PURE__*/function () {
|
|
|
35669
35668
|
instructionData = new SubmitAttestationInstructionData({
|
|
35670
35669
|
transferId: transferId
|
|
35671
35670
|
});
|
|
35672
|
-
serializedInstructionData =
|
|
35671
|
+
serializedInstructionData = borsh.serialize(submitAttestationInstructionSchema, instructionData);
|
|
35673
35672
|
serializedInstructionEnum = Buffer.from(Uint8Array.of.apply(Uint8Array, [SUBMIT_INSTRUCTION_ENUM_VALUE].concat(_toConsumableArray(serializedInstructionData))));
|
|
35674
35673
|
return _context2.abrupt("return", new solanaWeb3.TransactionInstruction({
|
|
35675
35674
|
keys: verifyInstructionAccounts,
|
|
@@ -35841,7 +35840,7 @@ var generateCreateSenderInstruction = /*#__PURE__*/function () {
|
|
|
35841
35840
|
ethAddress: SolanaUtils.ethAddressToArray(senderEthAddress),
|
|
35842
35841
|
operator: SolanaUtils.ethAddressToArray(operatorEthAddress)
|
|
35843
35842
|
});
|
|
35844
|
-
serializedInstructionData =
|
|
35843
|
+
serializedInstructionData = borsh.serialize(createSenderPublicInstructionSchema, createSenderPublicInstructionData);
|
|
35845
35844
|
serializedInstructionEnum = Buffer.from(Uint8Array.of.apply(Uint8Array, [CREATE_SENDER_PUBLIC_ENUM_VALUE].concat(_toConsumableArray(serializedInstructionData))));
|
|
35846
35845
|
return _context4.abrupt("return", new solanaWeb3.TransactionInstruction({
|
|
35847
35846
|
keys: createSenderInstructionAccounts,
|