Socket
Socket
Sign inDemoInstall

@solana/spl-token

Package Overview
Dependencies
Maintainers
14
Versions
46
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@solana/spl-token - npm Package Compare versions

Comparing version 0.3.8 to 0.3.9

lib/cjs/actions/recoverNested.js

1

lib/cjs/actions/index.js

@@ -34,2 +34,3 @@ "use strict";

__exportStar(require("./mintToChecked.js"), exports);
__exportStar(require("./recoverNested.js"), exports);
__exportStar(require("./revoke.js"), exports);

@@ -36,0 +37,0 @@ __exportStar(require("./setAuthority.js"), exports);

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.TokenUnsupportedInstructionError = exports.TokenInvalidInstructionTypeError = exports.TokenInvalidInstructionDataError = exports.TokenInvalidInstructionKeysError = exports.TokenInvalidInstructionProgramError = exports.TokenOwnerOffCurveError = exports.TokenInvalidOwnerError = exports.TokenInvalidMintError = exports.TokenInvalidAccountSizeError = exports.TokenInvalidAccountOwnerError = exports.TokenInvalidAccountError = exports.TokenAccountNotFoundError = exports.TokenError = void 0;
exports.TokenTransferHookAccountDataNotFound = exports.TokenTransferHookInvalidSeed = exports.TokenTransferHookAccountNotFound = exports.TokenUnsupportedInstructionError = exports.TokenInvalidInstructionTypeError = exports.TokenInvalidInstructionDataError = exports.TokenInvalidInstructionKeysError = exports.TokenInvalidInstructionProgramError = exports.TokenOwnerOffCurveError = exports.TokenInvalidOwnerError = exports.TokenInvalidMintError = exports.TokenInvalidAccountSizeError = exports.TokenInvalidAccountOwnerError = exports.TokenInvalidAccountDataError = exports.TokenInvalidAccountError = exports.TokenAccountNotFoundError = exports.TokenError = void 0;
/** Base class for errors */

@@ -27,2 +27,10 @@ class TokenError extends Error {

exports.TokenInvalidAccountError = TokenInvalidAccountError;
/** Thrown if a program state account does not contain valid data */
class TokenInvalidAccountDataError extends TokenError {
constructor() {
super(...arguments);
this.name = 'TokenInvalidAccountDataError';
}
}
exports.TokenInvalidAccountDataError = TokenInvalidAccountDataError;
/** Thrown if a program state account is not owned by the expected token program */

@@ -108,2 +116,26 @@ class TokenInvalidAccountOwnerError extends TokenError {

exports.TokenUnsupportedInstructionError = TokenUnsupportedInstructionError;
/** Thrown if the transfer hook extra accounts contains an invalid account index */
class TokenTransferHookAccountNotFound extends TokenError {
constructor() {
super(...arguments);
this.name = 'TokenTransferHookAccountNotFound';
}
}
exports.TokenTransferHookAccountNotFound = TokenTransferHookAccountNotFound;
/** Thrown if the transfer hook extra accounts contains an invalid seed */
class TokenTransferHookInvalidSeed extends TokenError {
constructor() {
super(...arguments);
this.name = 'TokenTransferHookInvalidSeed';
}
}
exports.TokenTransferHookInvalidSeed = TokenTransferHookInvalidSeed;
/** Thrown if account data required by an extra account meta seed config could not be fetched */
class TokenTransferHookAccountDataNotFound extends TokenError {
constructor() {
super(...arguments);
this.name = 'TokenTransferHookAccountDataNotFound';
}
}
exports.TokenTransferHookAccountDataNotFound = TokenTransferHookAccountDataNotFound;
//# sourceMappingURL=errors.js.map

2

lib/cjs/extensions/accountType.js

@@ -9,4 +9,4 @@ "use strict";

AccountType[AccountType["Account"] = 2] = "Account";
})(AccountType = exports.AccountType || (exports.AccountType = {}));
})(AccountType || (exports.AccountType = AccountType = {}));
exports.ACCOUNT_TYPE_SIZE = 1;
//# sourceMappingURL=accountType.js.map

@@ -14,3 +14,3 @@ "use strict";

CpiGuardInstruction[CpiGuardInstruction["Disable"] = 1] = "Disable";
})(CpiGuardInstruction = exports.CpiGuardInstruction || (exports.CpiGuardInstruction = {}));
})(CpiGuardInstruction || (exports.CpiGuardInstruction = CpiGuardInstruction = {}));
/** TODO: docs */

@@ -17,0 +17,0 @@ exports.cpiGuardInstructionData = (0, buffer_layout_1.struct)([(0, buffer_layout_1.u8)('instruction'), (0, buffer_layout_1.u8)('cpiGuardInstruction')]);

@@ -14,3 +14,3 @@ "use strict";

DefaultAccountStateInstruction[DefaultAccountStateInstruction["Update"] = 1] = "Update";
})(DefaultAccountStateInstruction = exports.DefaultAccountStateInstruction || (exports.DefaultAccountStateInstruction = {}));
})(DefaultAccountStateInstruction || (exports.DefaultAccountStateInstruction = DefaultAccountStateInstruction = {}));
/** TODO: docs */

@@ -17,0 +17,0 @@ exports.defaultAccountStateInstructionData = (0, buffer_layout_1.struct)([

@@ -13,2 +13,3 @@ "use strict";

const index_js_3 = require("./memoTransfer/index.js");
const state_js_2 = require("./metadataPointer/state.js");
const mintCloseAuthority_js_1 = require("./mintCloseAuthority.js");

@@ -18,2 +19,4 @@ const nonTransferable_js_1 = require("./nonTransferable.js");

const index_js_4 = require("./transferFee/index.js");
const index_js_5 = require("./transferHook/index.js");
// Sequence from https://github.com/solana-labs/solana-program-library/blob/master/token/program-2022/src/extension/mod.rs#L903
var ExtensionType;

@@ -35,3 +38,8 @@ (function (ExtensionType) {

ExtensionType[ExtensionType["NonTransferableAccount"] = 13] = "NonTransferableAccount";
})(ExtensionType = exports.ExtensionType || (exports.ExtensionType = {}));
ExtensionType[ExtensionType["TransferHook"] = 14] = "TransferHook";
ExtensionType[ExtensionType["TransferHookAccount"] = 15] = "TransferHookAccount";
// ConfidentialTransferFee, // Not implemented yet
// ConfidentialTransferFeeAmount, // Not implemented yet
ExtensionType[ExtensionType["MetadataPointer"] = 18] = "MetadataPointer";
})(ExtensionType || (exports.ExtensionType = ExtensionType = {}));
exports.TYPE_SIZE = 2;

@@ -63,2 +71,4 @@ exports.LENGTH_SIZE = 2;

return index_js_3.MEMO_TRANSFER_SIZE;
case ExtensionType.MetadataPointer:
return state_js_2.METADATA_POINTER_SIZE;
case ExtensionType.NonTransferable:

@@ -72,2 +82,6 @@ return nonTransferable_js_1.NON_TRANSFERABLE_SIZE;

return nonTransferable_js_1.NON_TRANSFERABLE_ACCOUNT_SIZE;
case ExtensionType.TransferHook:
return index_js_5.TRANSFER_HOOK_SIZE;
case ExtensionType.TransferHookAccount:
return index_js_5.TRANSFER_HOOK_ACCOUNT_SIZE;
default:

@@ -87,2 +101,4 @@ throw Error(`Unknown extension type: ${e}`);

case ExtensionType.PermanentDelegate:
case ExtensionType.TransferHook:
case ExtensionType.MetadataPointer:
return true;

@@ -96,2 +112,3 @@ case ExtensionType.Uninitialized:

case ExtensionType.NonTransferableAccount:
case ExtensionType.TransferHookAccount:
return false;

@@ -111,2 +128,3 @@ default:

case ExtensionType.NonTransferableAccount:
case ExtensionType.TransferHookAccount:
return true;

@@ -121,2 +139,4 @@ case ExtensionType.Uninitialized:

case ExtensionType.PermanentDelegate:
case ExtensionType.TransferHook:
case ExtensionType.MetadataPointer:
return false;

@@ -136,2 +156,4 @@ default:

return ExtensionType.NonTransferableAccount;
case ExtensionType.TransferHook:
return ExtensionType.TransferHookAccount;
case ExtensionType.TransferFeeAmount:

@@ -144,2 +166,3 @@ case ExtensionType.ConfidentialTransferAccount:

case ExtensionType.MintCloseAuthority:
case ExtensionType.MetadataPointer:
case ExtensionType.Uninitialized:

@@ -149,2 +172,3 @@ case ExtensionType.InterestBearingConfig:

case ExtensionType.NonTransferableAccount:
case ExtensionType.TransferHookAccount:
return ExtensionType.Uninitialized;

@@ -151,0 +175,0 @@ }

@@ -24,2 +24,3 @@ "use strict";

__exportStar(require("./memoTransfer/index.js"), exports);
__exportStar(require("./metadataPointer/index.js"), exports);
__exportStar(require("./mintCloseAuthority.js"), exports);

@@ -29,2 +30,3 @@ __exportStar(require("./nonTransferable.js"), exports);

__exportStar(require("./permanentDelegate.js"), exports);
__exportStar(require("./transferHook/index.js"), exports);
//# sourceMappingURL=index.js.map

@@ -14,3 +14,3 @@ "use strict";

InterestBearingMintInstruction[InterestBearingMintInstruction["UpdateRate"] = 1] = "UpdateRate";
})(InterestBearingMintInstruction = exports.InterestBearingMintInstruction || (exports.InterestBearingMintInstruction = {}));
})(InterestBearingMintInstruction || (exports.InterestBearingMintInstruction = InterestBearingMintInstruction = {}));
exports.interestBearingMintInitializeInstructionData = (0, buffer_layout_1.struct)([

@@ -17,0 +17,0 @@ (0, buffer_layout_1.u8)('instruction'),

@@ -14,3 +14,3 @@ "use strict";

MemoTransferInstruction[MemoTransferInstruction["Disable"] = 1] = "Disable";
})(MemoTransferInstruction = exports.MemoTransferInstruction || (exports.MemoTransferInstruction = {}));
})(MemoTransferInstruction || (exports.MemoTransferInstruction = MemoTransferInstruction = {}));
/** TODO: docs */

@@ -17,0 +17,0 @@ exports.memoTransferInstructionData = (0, buffer_layout_1.struct)([

@@ -19,3 +19,3 @@ "use strict";

TransferFeeInstruction[TransferFeeInstruction["SetTransferFee"] = 5] = "SetTransferFee";
})(TransferFeeInstruction = exports.TransferFeeInstruction || (exports.TransferFeeInstruction = {}));
})(TransferFeeInstruction || (exports.TransferFeeInstruction = TransferFeeInstruction = {}));
/** TODO: docs */

@@ -22,0 +22,0 @@ exports.initializeTransferFeeConfigInstructionData = (0, buffer_layout_1.struct)([

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getTransferFeeAmount = exports.getTransferFeeConfig = exports.TRANSFER_FEE_AMOUNT_SIZE = exports.TransferFeeAmountLayout = exports.TRANSFER_FEE_CONFIG_SIZE = exports.TransferFeeConfigLayout = exports.transferFeeLayout = exports.ONE_IN_BASIS_POINTS = exports.MAX_FEE_BASIS_POINTS = void 0;
exports.getTransferFeeAmount = exports.getTransferFeeConfig = exports.TRANSFER_FEE_AMOUNT_SIZE = exports.TransferFeeAmountLayout = exports.calculateEpochFee = exports.getEpochFee = exports.TRANSFER_FEE_CONFIG_SIZE = exports.TransferFeeConfigLayout = exports.calculateFee = exports.transferFeeLayout = exports.ONE_IN_BASIS_POINTS = exports.MAX_FEE_BASIS_POINTS = void 0;
const buffer_layout_1 = require("@solana/buffer-layout");

@@ -8,3 +8,3 @@ const buffer_layout_utils_1 = require("@solana/buffer-layout-utils");

exports.MAX_FEE_BASIS_POINTS = 10000;
exports.ONE_IN_BASIS_POINTS = exports.MAX_FEE_BASIS_POINTS;
exports.ONE_IN_BASIS_POINTS = BigInt(exports.MAX_FEE_BASIS_POINTS);
/** Buffer layout for de/serializing a transfer fee */

@@ -15,2 +15,16 @@ function transferFeeLayout(property) {

exports.transferFeeLayout = transferFeeLayout;
/** Calculate the transfer fee */
function calculateFee(transferFee, preFeeAmount) {
const transferFeeBasisPoints = transferFee.transferFeeBasisPoints;
if (transferFeeBasisPoints === 0 || preFeeAmount === BigInt(0)) {
return BigInt(0);
}
else {
const numerator = preFeeAmount * BigInt(transferFeeBasisPoints);
const rawFee = (numerator + exports.ONE_IN_BASIS_POINTS - BigInt(1)) / exports.ONE_IN_BASIS_POINTS;
const fee = rawFee > transferFee.maximumFee ? transferFee.maximumFee : rawFee;
return BigInt(fee);
}
}
exports.calculateFee = calculateFee;
/** Buffer layout for de/serializing a transfer fee config extension */

@@ -25,2 +39,18 @@ exports.TransferFeeConfigLayout = (0, buffer_layout_1.struct)([

exports.TRANSFER_FEE_CONFIG_SIZE = exports.TransferFeeConfigLayout.span;
/** Get the fee for given epoch */
function getEpochFee(transferFeeConfig, epoch) {
if (epoch >= transferFeeConfig.newerTransferFee.epoch) {
return transferFeeConfig.newerTransferFee;
}
else {
return transferFeeConfig.olderTransferFee;
}
}
exports.getEpochFee = getEpochFee;
/** Calculate the fee for the given epoch and input amount */
function calculateEpochFee(transferFeeConfig, epoch, preFeeAmount) {
const transferFee = getEpochFee(transferFeeConfig, epoch);
return calculateFee(transferFee, preFeeAmount);
}
exports.calculateEpochFee = calculateEpochFee;
/** Buffer layout for de/serializing */

@@ -27,0 +57,0 @@ exports.TransferFeeAmountLayout = (0, buffer_layout_1.struct)([(0, buffer_layout_utils_1.u64)('withheldAmount')]);

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.createAssociatedTokenAccountIdempotentInstruction = exports.createAssociatedTokenAccountInstruction = void 0;
exports.createRecoverNestedInstruction = exports.createAssociatedTokenAccountIdempotentInstruction = exports.createAssociatedTokenAccountInstruction = void 0;
const web3_js_1 = require("@solana/web3.js");

@@ -53,2 +53,33 @@ const constants_js_1 = require("../constants.js");

}
/**
* Construct a RecoverNested instruction
*
* @param nestedAssociatedToken Nested associated token account (must be owned by `ownerAssociatedToken`)
* @param nestedMint Token mint for the nested associated token account
* @param destinationAssociatedToken Wallet's associated token account
* @param ownerAssociatedToken Owner associated token account address (must be owned by `owner`)
* @param ownerMint Token mint for the owner associated token account
* @param owner Wallet address for the owner associated token account
* @param programId SPL Token program account
* @param associatedTokenProgramId SPL Associated Token program account
*
* @return Instruction to add to a transaction
*/
function createRecoverNestedInstruction(nestedAssociatedToken, nestedMint, destinationAssociatedToken, ownerAssociatedToken, ownerMint, owner, programId = constants_js_1.TOKEN_PROGRAM_ID, associatedTokenProgramId = constants_js_1.ASSOCIATED_TOKEN_PROGRAM_ID) {
const keys = [
{ pubkey: nestedAssociatedToken, isSigner: false, isWritable: true },
{ pubkey: nestedMint, isSigner: false, isWritable: false },
{ pubkey: destinationAssociatedToken, isSigner: false, isWritable: true },
{ pubkey: ownerAssociatedToken, isSigner: false, isWritable: true },
{ pubkey: ownerMint, isSigner: false, isWritable: false },
{ pubkey: owner, isSigner: true, isWritable: true },
{ pubkey: programId, isSigner: false, isWritable: false },
];
return new web3_js_1.TransactionInstruction({
keys,
programId: associatedTokenProgramId,
data: Buffer.from([2]),
});
}
exports.createRecoverNestedInstruction = createRecoverNestedInstruction;
//# sourceMappingURL=associatedTokenAccount.js.map

@@ -18,3 +18,12 @@ "use strict";

AuthorityType[AuthorityType["CloseAccount"] = 3] = "CloseAccount";
})(AuthorityType = exports.AuthorityType || (exports.AuthorityType = {}));
AuthorityType[AuthorityType["TransferFeeConfig"] = 4] = "TransferFeeConfig";
AuthorityType[AuthorityType["WithheldWithdraw"] = 5] = "WithheldWithdraw";
AuthorityType[AuthorityType["CloseMint"] = 6] = "CloseMint";
AuthorityType[AuthorityType["InterestRate"] = 7] = "InterestRate";
AuthorityType[AuthorityType["PermanentDelegate"] = 8] = "PermanentDelegate";
AuthorityType[AuthorityType["ConfidentialTransferMint"] = 9] = "ConfidentialTransferMint";
AuthorityType[AuthorityType["TransferHookProgramId"] = 10] = "TransferHookProgramId";
AuthorityType[AuthorityType["ConfidentialTransferFeeConfig"] = 11] = "ConfidentialTransferFeeConfig";
AuthorityType[AuthorityType["MetadataPointer"] = 12] = "MetadataPointer";
})(AuthorityType || (exports.AuthorityType = AuthorityType = {}));
/** TODO: docs */

@@ -21,0 +30,0 @@ exports.setAuthorityInstructionData = (0, buffer_layout_1.struct)([

@@ -43,3 +43,7 @@ "use strict";

TokenInstruction[TokenInstruction["InitializePermanentDelegate"] = 35] = "InitializePermanentDelegate";
})(TokenInstruction = exports.TokenInstruction || (exports.TokenInstruction = {}));
TokenInstruction[TokenInstruction["TransferHookExtension"] = 36] = "TransferHookExtension";
// ConfidentialTransferFeeExtension = 37,
// WithdrawalExcessLamports = 38,
TokenInstruction[TokenInstruction["MetadataPointerExtension"] = 39] = "MetadataPointerExtension";
})(TokenInstruction || (exports.TokenInstruction = TokenInstruction = {}));
//# sourceMappingURL=types.js.map

@@ -26,3 +26,3 @@ "use strict";

AccountState[AccountState["Frozen"] = 2] = "Frozen";
})(AccountState = exports.AccountState || (exports.AccountState = {}));
})(AccountState || (exports.AccountState = AccountState = {}));
/** Buffer layout for de/serializing a token account */

@@ -29,0 +29,0 @@ exports.AccountLayout = (0, buffer_layout_1.struct)([

@@ -18,2 +18,3 @@ export * from './amountToUiAmount.js';

export * from './mintToChecked.js';
export * from './recoverNested.js';
export * from './revoke.js';

@@ -20,0 +21,0 @@ export * from './setAuthority.js';

@@ -21,2 +21,9 @@ /** Base class for errors */

}
/** Thrown if a program state account does not contain valid data */
export class TokenInvalidAccountDataError extends TokenError {
constructor() {
super(...arguments);
this.name = 'TokenInvalidAccountDataError';
}
}
/** Thrown if a program state account is not owned by the expected token program */

@@ -92,2 +99,23 @@ export class TokenInvalidAccountOwnerError extends TokenError {

}
/** Thrown if the transfer hook extra accounts contains an invalid account index */
export class TokenTransferHookAccountNotFound extends TokenError {
constructor() {
super(...arguments);
this.name = 'TokenTransferHookAccountNotFound';
}
}
/** Thrown if the transfer hook extra accounts contains an invalid seed */
export class TokenTransferHookInvalidSeed extends TokenError {
constructor() {
super(...arguments);
this.name = 'TokenTransferHookInvalidSeed';
}
}
/** Thrown if account data required by an extra account meta seed config could not be fetched */
export class TokenTransferHookAccountDataNotFound extends TokenError {
constructor() {
super(...arguments);
this.name = 'TokenTransferHookAccountDataNotFound';
}
}
//# sourceMappingURL=errors.js.map

@@ -10,2 +10,3 @@ import { ACCOUNT_SIZE } from '../state/account.js';

import { MEMO_TRANSFER_SIZE } from './memoTransfer/index.js';
import { METADATA_POINTER_SIZE } from './metadataPointer/state.js';
import { MINT_CLOSE_AUTHORITY_SIZE } from './mintCloseAuthority.js';

@@ -15,2 +16,4 @@ import { NON_TRANSFERABLE_SIZE, NON_TRANSFERABLE_ACCOUNT_SIZE } from './nonTransferable.js';

import { TRANSFER_FEE_AMOUNT_SIZE, TRANSFER_FEE_CONFIG_SIZE } from './transferFee/index.js';
import { TRANSFER_HOOK_ACCOUNT_SIZE, TRANSFER_HOOK_SIZE } from './transferHook/index.js';
// Sequence from https://github.com/solana-labs/solana-program-library/blob/master/token/program-2022/src/extension/mod.rs#L903
export var ExtensionType;

@@ -32,2 +35,7 @@ (function (ExtensionType) {

ExtensionType[ExtensionType["NonTransferableAccount"] = 13] = "NonTransferableAccount";
ExtensionType[ExtensionType["TransferHook"] = 14] = "TransferHook";
ExtensionType[ExtensionType["TransferHookAccount"] = 15] = "TransferHookAccount";
// ConfidentialTransferFee, // Not implemented yet
// ConfidentialTransferFeeAmount, // Not implemented yet
ExtensionType[ExtensionType["MetadataPointer"] = 18] = "MetadataPointer";
})(ExtensionType || (ExtensionType = {}));

@@ -60,2 +68,4 @@ export const TYPE_SIZE = 2;

return MEMO_TRANSFER_SIZE;
case ExtensionType.MetadataPointer:
return METADATA_POINTER_SIZE;
case ExtensionType.NonTransferable:

@@ -69,2 +79,6 @@ return NON_TRANSFERABLE_SIZE;

return NON_TRANSFERABLE_ACCOUNT_SIZE;
case ExtensionType.TransferHook:
return TRANSFER_HOOK_SIZE;
case ExtensionType.TransferHookAccount:
return TRANSFER_HOOK_ACCOUNT_SIZE;
default:

@@ -83,2 +97,4 @@ throw Error(`Unknown extension type: ${e}`);

case ExtensionType.PermanentDelegate:
case ExtensionType.TransferHook:
case ExtensionType.MetadataPointer:
return true;

@@ -92,2 +108,3 @@ case ExtensionType.Uninitialized:

case ExtensionType.NonTransferableAccount:
case ExtensionType.TransferHookAccount:
return false;

@@ -106,2 +123,3 @@ default:

case ExtensionType.NonTransferableAccount:
case ExtensionType.TransferHookAccount:
return true;

@@ -116,2 +134,4 @@ case ExtensionType.Uninitialized:

case ExtensionType.PermanentDelegate:
case ExtensionType.TransferHook:
case ExtensionType.MetadataPointer:
return false;

@@ -130,2 +150,4 @@ default:

return ExtensionType.NonTransferableAccount;
case ExtensionType.TransferHook:
return ExtensionType.TransferHookAccount;
case ExtensionType.TransferFeeAmount:

@@ -138,2 +160,3 @@ case ExtensionType.ConfidentialTransferAccount:

case ExtensionType.MintCloseAuthority:
case ExtensionType.MetadataPointer:
case ExtensionType.Uninitialized:

@@ -143,2 +166,3 @@ case ExtensionType.InterestBearingConfig:

case ExtensionType.NonTransferableAccount:
case ExtensionType.TransferHookAccount:
return ExtensionType.Uninitialized;

@@ -145,0 +169,0 @@ }

@@ -8,2 +8,3 @@ export * from './accountType.js';

export * from './memoTransfer/index.js';
export * from './metadataPointer/index.js';
export * from './mintCloseAuthority.js';

@@ -13,2 +14,3 @@ export * from './nonTransferable.js';

export * from './permanentDelegate.js';
export * from './transferHook/index.js';
//# sourceMappingURL=index.js.map

@@ -5,3 +5,3 @@ import { struct, u16 } from '@solana/buffer-layout';

export const MAX_FEE_BASIS_POINTS = 10000;
export const ONE_IN_BASIS_POINTS = MAX_FEE_BASIS_POINTS;
export const ONE_IN_BASIS_POINTS = BigInt(MAX_FEE_BASIS_POINTS);
/** Buffer layout for de/serializing a transfer fee */

@@ -11,2 +11,15 @@ export function transferFeeLayout(property) {

}
/** Calculate the transfer fee */
export function calculateFee(transferFee, preFeeAmount) {
const transferFeeBasisPoints = transferFee.transferFeeBasisPoints;
if (transferFeeBasisPoints === 0 || preFeeAmount === BigInt(0)) {
return BigInt(0);
}
else {
const numerator = preFeeAmount * BigInt(transferFeeBasisPoints);
const rawFee = (numerator + ONE_IN_BASIS_POINTS - BigInt(1)) / ONE_IN_BASIS_POINTS;
const fee = rawFee > transferFee.maximumFee ? transferFee.maximumFee : rawFee;
return BigInt(fee);
}
}
/** Buffer layout for de/serializing a transfer fee config extension */

@@ -21,2 +34,16 @@ export const TransferFeeConfigLayout = struct([

export const TRANSFER_FEE_CONFIG_SIZE = TransferFeeConfigLayout.span;
/** Get the fee for given epoch */
export function getEpochFee(transferFeeConfig, epoch) {
if (epoch >= transferFeeConfig.newerTransferFee.epoch) {
return transferFeeConfig.newerTransferFee;
}
else {
return transferFeeConfig.olderTransferFee;
}
}
/** Calculate the fee for the given epoch and input amount */
export function calculateEpochFee(transferFeeConfig, epoch, preFeeAmount) {
const transferFee = getEpochFee(transferFeeConfig, epoch);
return calculateFee(transferFee, preFeeAmount);
}
/** Buffer layout for de/serializing */

@@ -23,0 +50,0 @@ export const TransferFeeAmountLayout = struct([u64('withheldAmount')]);

@@ -48,2 +48,32 @@ import { SystemProgram, TransactionInstruction } from '@solana/web3.js';

}
/**
* Construct a RecoverNested instruction
*
* @param nestedAssociatedToken Nested associated token account (must be owned by `ownerAssociatedToken`)
* @param nestedMint Token mint for the nested associated token account
* @param destinationAssociatedToken Wallet's associated token account
* @param ownerAssociatedToken Owner associated token account address (must be owned by `owner`)
* @param ownerMint Token mint for the owner associated token account
* @param owner Wallet address for the owner associated token account
* @param programId SPL Token program account
* @param associatedTokenProgramId SPL Associated Token program account
*
* @return Instruction to add to a transaction
*/
export function createRecoverNestedInstruction(nestedAssociatedToken, nestedMint, destinationAssociatedToken, ownerAssociatedToken, ownerMint, owner, programId = TOKEN_PROGRAM_ID, associatedTokenProgramId = ASSOCIATED_TOKEN_PROGRAM_ID) {
const keys = [
{ pubkey: nestedAssociatedToken, isSigner: false, isWritable: true },
{ pubkey: nestedMint, isSigner: false, isWritable: false },
{ pubkey: destinationAssociatedToken, isSigner: false, isWritable: true },
{ pubkey: ownerAssociatedToken, isSigner: false, isWritable: true },
{ pubkey: ownerMint, isSigner: false, isWritable: false },
{ pubkey: owner, isSigner: true, isWritable: true },
{ pubkey: programId, isSigner: false, isWritable: false },
];
return new TransactionInstruction({
keys,
programId: associatedTokenProgramId,
data: Buffer.from([2]),
});
}
//# sourceMappingURL=associatedTokenAccount.js.map

@@ -15,2 +15,11 @@ import { struct, u8 } from '@solana/buffer-layout';

AuthorityType[AuthorityType["CloseAccount"] = 3] = "CloseAccount";
AuthorityType[AuthorityType["TransferFeeConfig"] = 4] = "TransferFeeConfig";
AuthorityType[AuthorityType["WithheldWithdraw"] = 5] = "WithheldWithdraw";
AuthorityType[AuthorityType["CloseMint"] = 6] = "CloseMint";
AuthorityType[AuthorityType["InterestRate"] = 7] = "InterestRate";
AuthorityType[AuthorityType["PermanentDelegate"] = 8] = "PermanentDelegate";
AuthorityType[AuthorityType["ConfidentialTransferMint"] = 9] = "ConfidentialTransferMint";
AuthorityType[AuthorityType["TransferHookProgramId"] = 10] = "TransferHookProgramId";
AuthorityType[AuthorityType["ConfidentialTransferFeeConfig"] = 11] = "ConfidentialTransferFeeConfig";
AuthorityType[AuthorityType["MetadataPointer"] = 12] = "MetadataPointer";
})(AuthorityType || (AuthorityType = {}));

@@ -17,0 +26,0 @@ /** TODO: docs */

@@ -40,3 +40,7 @@ /** Instructions defined by the program */

TokenInstruction[TokenInstruction["InitializePermanentDelegate"] = 35] = "InitializePermanentDelegate";
TokenInstruction[TokenInstruction["TransferHookExtension"] = 36] = "TransferHookExtension";
// ConfidentialTransferFeeExtension = 37,
// WithdrawalExcessLamports = 38,
TokenInstruction[TokenInstruction["MetadataPointerExtension"] = 39] = "MetadataPointerExtension";
})(TokenInstruction || (TokenInstruction = {}));
//# sourceMappingURL=types.js.map

@@ -18,2 +18,3 @@ export * from './amountToUiAmount.js';

export * from './mintToChecked.js';
export * from './recoverNested.js';
export * from './revoke.js';

@@ -20,0 +21,0 @@ export * from './setAuthority.js';

@@ -13,2 +13,6 @@ /** Base class for errors */

}
/** Thrown if a program state account does not contain valid data */
export declare class TokenInvalidAccountDataError extends TokenError {
name: string;
}
/** Thrown if a program state account is not owned by the expected token program */

@@ -54,2 +58,14 @@ export declare class TokenInvalidAccountOwnerError extends TokenError {

}
/** Thrown if the transfer hook extra accounts contains an invalid account index */
export declare class TokenTransferHookAccountNotFound extends TokenError {
name: string;
}
/** Thrown if the transfer hook extra accounts contains an invalid seed */
export declare class TokenTransferHookInvalidSeed extends TokenError {
name: string;
}
/** Thrown if account data required by an extra account meta seed config could not be fetched */
export declare class TokenTransferHookAccountDataNotFound extends TokenError {
name: string;
}
//# sourceMappingURL=errors.d.ts.map

@@ -17,3 +17,6 @@ /// <reference types="node" />

PermanentDelegate = 12,
NonTransferableAccount = 13
NonTransferableAccount = 13,
TransferHook = 14,
TransferHookAccount = 15,
MetadataPointer = 18
}

@@ -20,0 +23,0 @@ export declare const TYPE_SIZE = 2;

@@ -8,2 +8,3 @@ export * from './accountType.js';

export * from './memoTransfer/index.js';
export * from './metadataPointer/index.js';
export * from './mintCloseAuthority.js';

@@ -13,2 +14,3 @@ export * from './nonTransferable.js';

export * from './permanentDelegate.js';
export * from './transferHook/index.js';
//# sourceMappingURL=index.d.ts.map

@@ -34,5 +34,11 @@ import type { Layout } from '@solana/buffer-layout';

export declare function transferFeeLayout(property?: string): Layout<TransferFee>;
/** Calculate the transfer fee */
export declare function calculateFee(transferFee: TransferFee, preFeeAmount: bigint): bigint;
/** Buffer layout for de/serializing a transfer fee config extension */
export declare const TransferFeeConfigLayout: import("@solana/buffer-layout").Structure<TransferFeeConfig>;
export declare const TRANSFER_FEE_CONFIG_SIZE: number;
/** Get the fee for given epoch */
export declare function getEpochFee(transferFeeConfig: TransferFeeConfig, epoch: bigint): TransferFee;
/** Calculate the fee for the given epoch and input amount */
export declare function calculateEpochFee(transferFeeConfig: TransferFeeConfig, epoch: bigint, preFeeAmount: bigint): bigint;
/** Transfer fee amount data for accounts. */

@@ -39,0 +45,0 @@ export interface TransferFeeAmount {

@@ -29,2 +29,17 @@ import type { PublicKey } from '@solana/web3.js';

export declare function createAssociatedTokenAccountIdempotentInstruction(payer: PublicKey, associatedToken: PublicKey, owner: PublicKey, mint: PublicKey, programId?: PublicKey, associatedTokenProgramId?: PublicKey): TransactionInstruction;
/**
* Construct a RecoverNested instruction
*
* @param nestedAssociatedToken Nested associated token account (must be owned by `ownerAssociatedToken`)
* @param nestedMint Token mint for the nested associated token account
* @param destinationAssociatedToken Wallet's associated token account
* @param ownerAssociatedToken Owner associated token account address (must be owned by `owner`)
* @param ownerMint Token mint for the owner associated token account
* @param owner Wallet address for the owner associated token account
* @param programId SPL Token program account
* @param associatedTokenProgramId SPL Associated Token program account
*
* @return Instruction to add to a transaction
*/
export declare function createRecoverNestedInstruction(nestedAssociatedToken: PublicKey, nestedMint: PublicKey, destinationAssociatedToken: PublicKey, ownerAssociatedToken: PublicKey, ownerMint: PublicKey, owner: PublicKey, programId?: PublicKey, associatedTokenProgramId?: PublicKey): TransactionInstruction;
//# sourceMappingURL=associatedTokenAccount.d.ts.map

@@ -9,3 +9,12 @@ import type { AccountMeta, Signer } from '@solana/web3.js';

AccountOwner = 2,
CloseAccount = 3
CloseAccount = 3,
TransferFeeConfig = 4,
WithheldWithdraw = 5,
CloseMint = 6,
InterestRate = 7,
PermanentDelegate = 8,
ConfidentialTransferMint = 9,
TransferHookProgramId = 10,
ConfidentialTransferFeeConfig = 11,
MetadataPointer = 12
}

@@ -12,0 +21,0 @@ /** TODO: docs */

@@ -38,4 +38,6 @@ /** Instructions defined by the program */

CpiGuardExtension = 34,
InitializePermanentDelegate = 35
InitializePermanentDelegate = 35,
TransferHookExtension = 36,
MetadataPointerExtension = 39
}
//# sourceMappingURL=types.d.ts.map
{
"name": "@solana/spl-token",
"description": "SPL Token Program JS API",
"version": "0.3.8",
"version": "0.3.9",
"author": "Solana Labs Maintainers <maintainers@solanalabs.com>",

@@ -44,9 +44,9 @@ "repository": "https://github.com/solana-labs/solana-program-library",

"test:unit": "mocha test/unit",
"test:e2e-built": "start-server-and-test 'solana-test-validator --bpf-program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA ../../target/deploy/spl_token.so --reset --quiet' http://localhost:8899/health 'mocha test/e2e'",
"test:e2e-2022": "TEST_PROGRAM_ID=TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb start-server-and-test 'solana-test-validator --bpf-program ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL ../../target/deploy/spl_associated_token_account.so --bpf-program TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb ../../target/deploy/spl_token_2022.so --reset --quiet' http://localhost:8899/health 'mocha test/e2e*'",
"test:e2e-native": "start-server-and-test 'solana-test-validator --reset --quiet' http://localhost:8899/health 'mocha test/e2e'",
"test:e2e-built": "start-server-and-test 'solana-test-validator --bpf-program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA ../../target/deploy/spl_token.so --reset --quiet' http://127.0.0.1:8899/health 'mocha test/e2e'",
"test:e2e-2022": "TEST_PROGRAM_ID=TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb start-server-and-test 'solana-test-validator --bpf-program ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL ../../target/deploy/spl_associated_token_account.so --bpf-program TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb ../../target/deploy/spl_token_2022.so --bpf-program TokenHookExampLe8smaVNrxTBezWTRbEwxwb1Zykrb ../../target/deploy/spl_transfer_hook_example.so --reset --quiet' http://127.0.0.1:8899/health 'mocha test/e2e*'",
"test:e2e-native": "start-server-and-test 'solana-test-validator --reset --quiet' http://127.0.0.1:8899/health 'mocha test/e2e'",
"test:build-programs": "cargo build-sbf --manifest-path ../program/Cargo.toml && cargo build-sbf --manifest-path ../program-2022/Cargo.toml && cargo build-sbf --manifest-path ../../associated-token-account/program/Cargo.toml",
"deploy": "npm run deploy:docs",
"docs": "shx rm -rf docs && typedoc && shx cp .nojekyll docs/",
"deploy:docs": "npm run docs && gh-pages --dist token/js --dotfiles"
"deploy:docs": "npm run docs && gh-pages --dest token/js --dist docs --dotfiles"
},

@@ -62,3 +62,3 @@ "peerDependencies": {

"devDependencies": {
"@solana/spl-memo": "^0.2.2",
"@solana/spl-memo": "workspace:*",
"@solana/web3.js": "^1.47.4",

@@ -70,14 +70,13 @@ "@types/chai-as-promised": "^7.1.4",

"@types/node-fetch": "^2.6.2",
"@types/prettier": "^2.7.0",
"@typescript-eslint/eslint-plugin": "^5.34.0",
"@typescript-eslint/parser": "^5.34.0",
"@typescript-eslint/eslint-plugin": "^6.11.0",
"@typescript-eslint/parser": "^6.0.0",
"chai": "^4.3.6",
"chai-as-promised": "^7.1.1",
"eslint": "^8.20.0",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-prettier": "^4.2.1",
"eslint-config-prettier": "^9.0.0",
"eslint-plugin-prettier": "^5.0.0",
"eslint-plugin-require-extensions": "^0.1.1",
"gh-pages": "^5.0.0",
"gh-pages": "^6.0.0",
"mocha": "^10.1.0",
"prettier": "^2.7.1",
"prettier": "^3.1.0",
"process": "^0.11.10",

@@ -88,5 +87,5 @@ "shx": "^0.3.4",

"ts-node": "^10.9.1",
"typedoc": "^0.24.7",
"typedoc": "^0.25.0",
"typescript": "^5.0.4"
}
}

@@ -18,2 +18,3 @@ export * from './amountToUiAmount.js';

export * from './mintToChecked.js';
export * from './recoverNested.js';
export * from './revoke.js';

@@ -20,0 +21,0 @@ export * from './setAuthority.js';

@@ -18,2 +18,7 @@ /** Base class for errors */

/** Thrown if a program state account does not contain valid data */
export class TokenInvalidAccountDataError extends TokenError {
name = 'TokenInvalidAccountDataError';
}
/** Thrown if a program state account is not owned by the expected token program */

@@ -68,1 +73,16 @@ export class TokenInvalidAccountOwnerError extends TokenError {

}
/** Thrown if the transfer hook extra accounts contains an invalid account index */
export class TokenTransferHookAccountNotFound extends TokenError {
name = 'TokenTransferHookAccountNotFound';
}
/** Thrown if the transfer hook extra accounts contains an invalid seed */
export class TokenTransferHookInvalidSeed extends TokenError {
name = 'TokenTransferHookInvalidSeed';
}
/** Thrown if account data required by an extra account meta seed config could not be fetched */
export class TokenTransferHookAccountDataNotFound extends TokenError {
name = 'TokenTransferHookAccountDataNotFound';
}

@@ -11,2 +11,3 @@ import { ACCOUNT_SIZE } from '../state/account.js';

import { MEMO_TRANSFER_SIZE } from './memoTransfer/index.js';
import { METADATA_POINTER_SIZE } from './metadataPointer/state.js';
import { MINT_CLOSE_AUTHORITY_SIZE } from './mintCloseAuthority.js';

@@ -16,3 +17,5 @@ import { NON_TRANSFERABLE_SIZE, NON_TRANSFERABLE_ACCOUNT_SIZE } from './nonTransferable.js';

import { TRANSFER_FEE_AMOUNT_SIZE, TRANSFER_FEE_CONFIG_SIZE } from './transferFee/index.js';
import { TRANSFER_HOOK_ACCOUNT_SIZE, TRANSFER_HOOK_SIZE } from './transferHook/index.js';
// Sequence from https://github.com/solana-labs/solana-program-library/blob/master/token/program-2022/src/extension/mod.rs#L903
export enum ExtensionType {

@@ -33,2 +36,7 @@ Uninitialized,

NonTransferableAccount,
TransferHook,
TransferHookAccount,
// ConfidentialTransferFee, // Not implemented yet
// ConfidentialTransferFeeAmount, // Not implemented yet
MetadataPointer = 18, // Remove number once above extensions implemented
}

@@ -63,2 +71,4 @@

return MEMO_TRANSFER_SIZE;
case ExtensionType.MetadataPointer:
return METADATA_POINTER_SIZE;
case ExtensionType.NonTransferable:

@@ -72,2 +82,6 @@ return NON_TRANSFERABLE_SIZE;

return NON_TRANSFERABLE_ACCOUNT_SIZE;
case ExtensionType.TransferHook:
return TRANSFER_HOOK_SIZE;
case ExtensionType.TransferHookAccount:
return TRANSFER_HOOK_ACCOUNT_SIZE;
default:

@@ -87,2 +101,4 @@ throw Error(`Unknown extension type: ${e}`);

case ExtensionType.PermanentDelegate:
case ExtensionType.TransferHook:
case ExtensionType.MetadataPointer:
return true;

@@ -96,2 +112,3 @@ case ExtensionType.Uninitialized:

case ExtensionType.NonTransferableAccount:
case ExtensionType.TransferHookAccount:
return false;

@@ -111,2 +128,3 @@ default:

case ExtensionType.NonTransferableAccount:
case ExtensionType.TransferHookAccount:
return true;

@@ -121,2 +139,4 @@ case ExtensionType.Uninitialized:

case ExtensionType.PermanentDelegate:
case ExtensionType.TransferHook:
case ExtensionType.MetadataPointer:
return false;

@@ -136,2 +156,4 @@ default:

return ExtensionType.NonTransferableAccount;
case ExtensionType.TransferHook:
return ExtensionType.TransferHookAccount;
case ExtensionType.TransferFeeAmount:

@@ -144,2 +166,3 @@ case ExtensionType.ConfidentialTransferAccount:

case ExtensionType.MintCloseAuthority:
case ExtensionType.MetadataPointer:
case ExtensionType.Uninitialized:

@@ -149,2 +172,3 @@ case ExtensionType.InterestBearingConfig:

case ExtensionType.NonTransferableAccount:
case ExtensionType.TransferHookAccount:
return ExtensionType.Uninitialized;

@@ -151,0 +175,0 @@ }

@@ -8,2 +8,3 @@ export * from './accountType.js';

export * from './memoTransfer/index.js';
export * from './metadataPointer/index.js';
export * from './mintCloseAuthority.js';

@@ -13,1 +14,2 @@ export * from './nonTransferable.js';

export * from './permanentDelegate.js';
export * from './transferHook/index.js';

@@ -9,4 +9,4 @@ import type { Layout } from '@solana/buffer-layout';

export const MAX_FEE_BASIS_POINTS = 10_000;
export const ONE_IN_BASIS_POINTS: bigint = MAX_FEE_BASIS_POINTS as unknown as bigint;
export const MAX_FEE_BASIS_POINTS = 10000;
export const ONE_IN_BASIS_POINTS = BigInt(MAX_FEE_BASIS_POINTS);

@@ -45,2 +45,15 @@ /** TransferFeeConfig as stored by the program */

/** Calculate the transfer fee */
export function calculateFee(transferFee: TransferFee, preFeeAmount: bigint): bigint {
const transferFeeBasisPoints = transferFee.transferFeeBasisPoints;
if (transferFeeBasisPoints === 0 || preFeeAmount === BigInt(0)) {
return BigInt(0);
} else {
const numerator = preFeeAmount * BigInt(transferFeeBasisPoints);
const rawFee = (numerator + ONE_IN_BASIS_POINTS - BigInt(1)) / ONE_IN_BASIS_POINTS;
const fee = rawFee > transferFee.maximumFee ? transferFee.maximumFee : rawFee;
return BigInt(fee);
}
}
/** Buffer layout for de/serializing a transfer fee config extension */

@@ -57,2 +70,17 @@ export const TransferFeeConfigLayout = struct<TransferFeeConfig>([

/** Get the fee for given epoch */
export function getEpochFee(transferFeeConfig: TransferFeeConfig, epoch: bigint): TransferFee {
if (epoch >= transferFeeConfig.newerTransferFee.epoch) {
return transferFeeConfig.newerTransferFee;
} else {
return transferFeeConfig.olderTransferFee;
}
}
/** Calculate the fee for the given epoch and input amount */
export function calculateEpochFee(transferFeeConfig: TransferFeeConfig, epoch: bigint, preFeeAmount: bigint): bigint {
const transferFee = getEpochFee(transferFeeConfig, epoch);
return calculateFee(transferFee, preFeeAmount);
}
/** Transfer fee amount data for accounts. */

@@ -59,0 +87,0 @@ export interface TransferFeeAmount {

@@ -91,1 +91,42 @@ import type { PublicKey } from '@solana/web3.js';

}
/**
* Construct a RecoverNested instruction
*
* @param nestedAssociatedToken Nested associated token account (must be owned by `ownerAssociatedToken`)
* @param nestedMint Token mint for the nested associated token account
* @param destinationAssociatedToken Wallet's associated token account
* @param ownerAssociatedToken Owner associated token account address (must be owned by `owner`)
* @param ownerMint Token mint for the owner associated token account
* @param owner Wallet address for the owner associated token account
* @param programId SPL Token program account
* @param associatedTokenProgramId SPL Associated Token program account
*
* @return Instruction to add to a transaction
*/
export function createRecoverNestedInstruction(
nestedAssociatedToken: PublicKey,
nestedMint: PublicKey,
destinationAssociatedToken: PublicKey,
ownerAssociatedToken: PublicKey,
ownerMint: PublicKey,
owner: PublicKey,
programId = TOKEN_PROGRAM_ID,
associatedTokenProgramId = ASSOCIATED_TOKEN_PROGRAM_ID
): TransactionInstruction {
const keys = [
{ pubkey: nestedAssociatedToken, isSigner: false, isWritable: true },
{ pubkey: nestedMint, isSigner: false, isWritable: false },
{ pubkey: destinationAssociatedToken, isSigner: false, isWritable: true },
{ pubkey: ownerAssociatedToken, isSigner: false, isWritable: true },
{ pubkey: ownerMint, isSigner: false, isWritable: false },
{ pubkey: owner, isSigner: true, isWritable: true },
{ pubkey: programId, isSigner: false, isWritable: false },
];
return new TransactionInstruction({
keys,
programId: associatedTokenProgramId,
data: Buffer.from([2]),
});
}

@@ -21,2 +21,11 @@ import { struct, u8 } from '@solana/buffer-layout';

CloseAccount = 3,
TransferFeeConfig = 4,
WithheldWithdraw = 5,
CloseMint = 6,
InterestRate = 7,
PermanentDelegate = 8,
ConfidentialTransferMint = 9,
TransferHookProgramId = 10,
ConfidentialTransferFeeConfig = 11,
MetadataPointer = 12,
}

@@ -23,0 +32,0 @@

@@ -39,2 +39,6 @@ /** Instructions defined by the program */

InitializePermanentDelegate = 35,
TransferHookExtension = 36,
// ConfidentialTransferFeeExtension = 37,
// WithdrawalExcessLamports = 38,
MetadataPointerExtension = 39,
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc