@solana/spl-token
Advanced tools
Comparing version 0.2.0-alpha.1 to 0.2.0-alpha.2
@@ -15,3 +15,3 @@ "use strict"; | ||
const constants_1 = require("../constants"); | ||
const instructions_1 = require("../instructions"); | ||
const index_1 = require("../instructions/index"); | ||
const internal_1 = require("./internal"); | ||
@@ -36,3 +36,3 @@ /** | ||
const [ownerPublicKey, signers] = (0, internal_1.getSigners)(owner, multiSigners); | ||
const transaction = new web3_js_1.Transaction().add((0, instructions_1.createApproveInstruction)(account, delegate, ownerPublicKey, amount, multiSigners, programId)); | ||
const transaction = new web3_js_1.Transaction().add((0, index_1.createApproveInstruction)(account, delegate, ownerPublicKey, amount, multiSigners, programId)); | ||
return yield (0, web3_js_1.sendAndConfirmTransaction)(connection, transaction, [payer, ...signers], confirmOptions); | ||
@@ -39,0 +39,0 @@ }); |
@@ -15,3 +15,3 @@ "use strict"; | ||
const constants_1 = require("../constants"); | ||
const instructions_1 = require("../instructions"); | ||
const index_1 = require("../instructions/index"); | ||
const internal_1 = require("./internal"); | ||
@@ -38,3 +38,3 @@ /** | ||
const [ownerPublicKey, signers] = (0, internal_1.getSigners)(owner, multiSigners); | ||
const transaction = new web3_js_1.Transaction().add((0, instructions_1.createApproveCheckedInstruction)(account, mint, delegate, ownerPublicKey, amount, decimals, multiSigners, programId)); | ||
const transaction = new web3_js_1.Transaction().add((0, index_1.createApproveCheckedInstruction)(account, mint, delegate, ownerPublicKey, amount, decimals, multiSigners, programId)); | ||
return yield (0, web3_js_1.sendAndConfirmTransaction)(connection, transaction, [payer, ...signers], confirmOptions); | ||
@@ -41,0 +41,0 @@ }); |
@@ -15,3 +15,3 @@ "use strict"; | ||
const constants_1 = require("../constants"); | ||
const instructions_1 = require("../instructions"); | ||
const index_1 = require("../instructions/index"); | ||
const internal_1 = require("./internal"); | ||
@@ -36,3 +36,3 @@ /** | ||
const [ownerPublicKey, signers] = (0, internal_1.getSigners)(owner, multiSigners); | ||
const transaction = new web3_js_1.Transaction().add((0, instructions_1.createBurnInstruction)(account, mint, ownerPublicKey, amount, multiSigners, programId)); | ||
const transaction = new web3_js_1.Transaction().add((0, index_1.createBurnInstruction)(account, mint, ownerPublicKey, amount, multiSigners, programId)); | ||
return yield (0, web3_js_1.sendAndConfirmTransaction)(connection, transaction, [payer, ...signers], confirmOptions); | ||
@@ -39,0 +39,0 @@ }); |
@@ -15,3 +15,3 @@ "use strict"; | ||
const constants_1 = require("../constants"); | ||
const instructions_1 = require("../instructions"); | ||
const index_1 = require("../instructions/index"); | ||
const internal_1 = require("./internal"); | ||
@@ -37,3 +37,3 @@ /** | ||
const [ownerPublicKey, signers] = (0, internal_1.getSigners)(owner, multiSigners); | ||
const transaction = new web3_js_1.Transaction().add((0, instructions_1.createBurnCheckedInstruction)(account, mint, ownerPublicKey, amount, decimals, multiSigners, programId)); | ||
const transaction = new web3_js_1.Transaction().add((0, index_1.createBurnCheckedInstruction)(account, mint, ownerPublicKey, amount, decimals, multiSigners, programId)); | ||
return yield (0, web3_js_1.sendAndConfirmTransaction)(connection, transaction, [payer, ...signers], confirmOptions); | ||
@@ -40,0 +40,0 @@ }); |
@@ -15,3 +15,3 @@ "use strict"; | ||
const constants_1 = require("../constants"); | ||
const instructions_1 = require("../instructions"); | ||
const index_1 = require("../instructions/index"); | ||
const internal_1 = require("./internal"); | ||
@@ -35,3 +35,3 @@ /** | ||
const [authorityPublicKey, signers] = (0, internal_1.getSigners)(authority, multiSigners); | ||
const transaction = new web3_js_1.Transaction().add((0, instructions_1.createCloseAccountInstruction)(account, destination, authorityPublicKey, multiSigners, programId)); | ||
const transaction = new web3_js_1.Transaction().add((0, index_1.createCloseAccountInstruction)(account, destination, authorityPublicKey, multiSigners, programId)); | ||
return yield (0, web3_js_1.sendAndConfirmTransaction)(connection, transaction, [payer, ...signers], confirmOptions); | ||
@@ -38,0 +38,0 @@ }); |
@@ -15,4 +15,4 @@ "use strict"; | ||
const constants_1 = require("../constants"); | ||
const instructions_1 = require("../instructions"); | ||
const state_1 = require("../state"); | ||
const index_1 = require("../instructions/index"); | ||
const index_2 = require("../state/index"); | ||
const createAssociatedTokenAccount_1 = require("./createAssociatedTokenAccount"); | ||
@@ -38,10 +38,10 @@ /** | ||
// Otherwise, create the account with the provided keypair and return its public key | ||
const lamports = yield (0, state_1.getMinimumBalanceForRentExemptAccount)(connection); | ||
const lamports = yield (0, index_2.getMinimumBalanceForRentExemptAccount)(connection); | ||
const transaction = new web3_js_1.Transaction().add(web3_js_1.SystemProgram.createAccount({ | ||
fromPubkey: payer.publicKey, | ||
newAccountPubkey: keypair.publicKey, | ||
space: state_1.ACCOUNT_SIZE, | ||
space: index_2.ACCOUNT_SIZE, | ||
lamports, | ||
programId, | ||
}), (0, instructions_1.createInitializeAccountInstruction)(keypair.publicKey, mint, owner, programId)); | ||
}), (0, index_1.createInitializeAccountInstruction)(keypair.publicKey, mint, owner, programId)); | ||
yield (0, web3_js_1.sendAndConfirmTransaction)(connection, transaction, [payer, keypair], confirmOptions); | ||
@@ -48,0 +48,0 @@ return keypair.publicKey; |
@@ -15,4 +15,4 @@ "use strict"; | ||
const constants_1 = require("../constants"); | ||
const instructions_1 = require("../instructions"); | ||
const state_1 = require("../state"); | ||
const index_1 = require("../instructions/index"); | ||
const index_2 = require("../state/index"); | ||
/** | ||
@@ -33,4 +33,4 @@ * Create and initialize a new associated token account | ||
return __awaiter(this, void 0, void 0, function* () { | ||
const associatedToken = yield (0, state_1.getAssociatedTokenAddress)(mint, owner, false, programId, associatedTokenProgramId); | ||
const transaction = new web3_js_1.Transaction().add((0, instructions_1.createAssociatedTokenAccountInstruction)(payer.publicKey, associatedToken, owner, mint, programId, associatedTokenProgramId)); | ||
const associatedToken = yield (0, index_2.getAssociatedTokenAddress)(mint, owner, false, programId, associatedTokenProgramId); | ||
const transaction = new web3_js_1.Transaction().add((0, index_1.createAssociatedTokenAccountInstruction)(payer.publicKey, associatedToken, owner, mint, programId, associatedTokenProgramId)); | ||
yield (0, web3_js_1.sendAndConfirmTransaction)(connection, transaction, [payer], confirmOptions); | ||
@@ -37,0 +37,0 @@ return associatedToken; |
@@ -15,4 +15,4 @@ "use strict"; | ||
const constants_1 = require("../constants"); | ||
const instructions_1 = require("../instructions"); | ||
const state_1 = require("../state"); | ||
const index_1 = require("../instructions/index"); | ||
const index_2 = require("../state/index"); | ||
/** | ||
@@ -34,10 +34,10 @@ * Create and initialize a new mint | ||
return __awaiter(this, void 0, void 0, function* () { | ||
const lamports = yield (0, state_1.getMinimumBalanceForRentExemptMint)(connection); | ||
const lamports = yield (0, index_2.getMinimumBalanceForRentExemptMint)(connection); | ||
const transaction = new web3_js_1.Transaction().add(web3_js_1.SystemProgram.createAccount({ | ||
fromPubkey: payer.publicKey, | ||
newAccountPubkey: keypair.publicKey, | ||
space: state_1.MINT_SIZE, | ||
space: index_2.MINT_SIZE, | ||
lamports, | ||
programId, | ||
}), (0, instructions_1.createInitializeMintInstruction)(keypair.publicKey, decimals, mintAuthority, freezeAuthority, programId)); | ||
}), (0, index_1.createInitializeMintInstruction)(keypair.publicKey, decimals, mintAuthority, freezeAuthority, programId)); | ||
yield (0, web3_js_1.sendAndConfirmTransaction)(connection, transaction, [payer, keypair], confirmOptions); | ||
@@ -44,0 +44,0 @@ return keypair.publicKey; |
@@ -15,4 +15,4 @@ "use strict"; | ||
const constants_1 = require("../constants"); | ||
const instructions_1 = require("../instructions"); | ||
const state_1 = require("../state"); | ||
const index_1 = require("../instructions/index"); | ||
const index_2 = require("../state/index"); | ||
/** | ||
@@ -33,10 +33,10 @@ * Create and initialize a new multisig | ||
return __awaiter(this, void 0, void 0, function* () { | ||
const lamports = yield (0, state_1.getMinimumBalanceForRentExemptMultisig)(connection); | ||
const lamports = yield (0, index_2.getMinimumBalanceForRentExemptMultisig)(connection); | ||
const transaction = new web3_js_1.Transaction().add(web3_js_1.SystemProgram.createAccount({ | ||
fromPubkey: payer.publicKey, | ||
newAccountPubkey: keypair.publicKey, | ||
space: state_1.MULTISIG_SIZE, | ||
space: index_2.MULTISIG_SIZE, | ||
lamports, | ||
programId, | ||
}), (0, instructions_1.createInitializeMultisigInstruction)(keypair.publicKey, signers, m, programId)); | ||
}), (0, index_1.createInitializeMultisigInstruction)(keypair.publicKey, signers, m, programId)); | ||
yield (0, web3_js_1.sendAndConfirmTransaction)(connection, transaction, [payer, keypair], confirmOptions); | ||
@@ -43,0 +43,0 @@ return keypair.publicKey; |
@@ -15,4 +15,4 @@ "use strict"; | ||
const constants_1 = require("../constants"); | ||
const instructions_1 = require("../instructions"); | ||
const state_1 = require("../state"); | ||
const index_1 = require("../instructions/index"); | ||
const index_2 = require("../state/index"); | ||
const createAccount_1 = require("./createAccount"); | ||
@@ -39,8 +39,8 @@ /** | ||
if (!keypair) { | ||
const associatedToken = yield (0, state_1.getAssociatedTokenAddress)(constants_1.NATIVE_MINT, owner, false, programId, constants_1.ASSOCIATED_TOKEN_PROGRAM_ID); | ||
const transaction = new web3_js_1.Transaction().add((0, instructions_1.createAssociatedTokenAccountInstruction)(payer.publicKey, associatedToken, owner, constants_1.NATIVE_MINT, programId, constants_1.ASSOCIATED_TOKEN_PROGRAM_ID), web3_js_1.SystemProgram.transfer({ | ||
const associatedToken = yield (0, index_2.getAssociatedTokenAddress)(constants_1.NATIVE_MINT, owner, false, programId, constants_1.ASSOCIATED_TOKEN_PROGRAM_ID); | ||
const transaction = new web3_js_1.Transaction().add((0, index_1.createAssociatedTokenAccountInstruction)(payer.publicKey, associatedToken, owner, constants_1.NATIVE_MINT, programId, constants_1.ASSOCIATED_TOKEN_PROGRAM_ID), web3_js_1.SystemProgram.transfer({ | ||
fromPubkey: payer.publicKey, | ||
toPubkey: associatedToken, | ||
lamports: amount, | ||
}), (0, instructions_1.createSyncNativeInstruction)(associatedToken, programId)); | ||
}), (0, index_1.createSyncNativeInstruction)(associatedToken, programId)); | ||
yield (0, web3_js_1.sendAndConfirmTransaction)(connection, transaction, [payer], confirmOptions); | ||
@@ -50,7 +50,7 @@ return associatedToken; | ||
// Otherwise, create the account with the provided keypair and return its public key | ||
const lamports = yield (0, state_1.getMinimumBalanceForRentExemptAccount)(connection); | ||
const lamports = yield (0, index_2.getMinimumBalanceForRentExemptAccount)(connection); | ||
const transaction = new web3_js_1.Transaction().add(web3_js_1.SystemProgram.createAccount({ | ||
fromPubkey: payer.publicKey, | ||
newAccountPubkey: keypair.publicKey, | ||
space: state_1.ACCOUNT_SIZE, | ||
space: index_2.ACCOUNT_SIZE, | ||
lamports, | ||
@@ -62,3 +62,3 @@ programId, | ||
lamports: amount, | ||
}), (0, instructions_1.createInitializeAccountInstruction)(keypair.publicKey, constants_1.NATIVE_MINT, owner, programId)); | ||
}), (0, index_1.createInitializeAccountInstruction)(keypair.publicKey, constants_1.NATIVE_MINT, owner, programId)); | ||
yield (0, web3_js_1.sendAndConfirmTransaction)(connection, transaction, [payer, keypair], confirmOptions); | ||
@@ -65,0 +65,0 @@ return keypair.publicKey; |
@@ -15,3 +15,3 @@ "use strict"; | ||
const constants_1 = require("../constants"); | ||
const instructions_1 = require("../instructions"); | ||
const index_1 = require("../instructions/index"); | ||
const internal_1 = require("./internal"); | ||
@@ -35,3 +35,3 @@ /** | ||
const [authorityPublicKey, signers] = (0, internal_1.getSigners)(authority, multiSigners); | ||
const transaction = new web3_js_1.Transaction().add((0, instructions_1.createFreezeAccountInstruction)(account, mint, authorityPublicKey, multiSigners, programId)); | ||
const transaction = new web3_js_1.Transaction().add((0, index_1.createFreezeAccountInstruction)(account, mint, authorityPublicKey, multiSigners, programId)); | ||
return yield (0, web3_js_1.sendAndConfirmTransaction)(connection, transaction, [payer, ...signers], confirmOptions); | ||
@@ -38,0 +38,0 @@ }); |
@@ -16,4 +16,4 @@ "use strict"; | ||
const errors_1 = require("../errors"); | ||
const instructions_1 = require("../instructions"); | ||
const state_1 = require("../state"); | ||
const index_1 = require("../instructions/index"); | ||
const index_2 = require("../state/index"); | ||
/** | ||
@@ -36,3 +36,3 @@ * Retrieve the associated token account, or create it if it doesn't exist | ||
return __awaiter(this, void 0, void 0, function* () { | ||
const associatedToken = yield (0, state_1.getAssociatedTokenAddress)(mint, owner, allowOwnerOffCurve, programId, associatedTokenProgramId); | ||
const associatedToken = yield (0, index_2.getAssociatedTokenAddress)(mint, owner, allowOwnerOffCurve, programId, associatedTokenProgramId); | ||
// This is the optimal logic, considering TX fee, client-side computation, RPC roundtrips and guaranteed idempotent. | ||
@@ -42,3 +42,3 @@ // Sadly we can't do this atomically. | ||
try { | ||
account = yield (0, state_1.getAccount)(connection, associatedToken, commitment, programId); | ||
account = yield (0, index_2.getAccount)(connection, associatedToken, commitment, programId); | ||
} | ||
@@ -52,3 +52,3 @@ catch (error) { | ||
try { | ||
const transaction = new web3_js_1.Transaction().add((0, instructions_1.createAssociatedTokenAccountInstruction)(payer.publicKey, associatedToken, owner, mint, programId, associatedTokenProgramId)); | ||
const transaction = new web3_js_1.Transaction().add((0, index_1.createAssociatedTokenAccountInstruction)(payer.publicKey, associatedToken, owner, mint, programId, associatedTokenProgramId)); | ||
yield (0, web3_js_1.sendAndConfirmTransaction)(connection, transaction, [payer], confirmOptions); | ||
@@ -61,3 +61,3 @@ } | ||
// Now this should always succeed | ||
account = yield (0, state_1.getAccount)(connection, associatedToken, commitment, programId); | ||
account = yield (0, index_2.getAccount)(connection, associatedToken, commitment, programId); | ||
} | ||
@@ -64,0 +64,0 @@ else { |
@@ -15,3 +15,3 @@ "use strict"; | ||
const constants_1 = require("../constants"); | ||
const instructions_1 = require("../instructions"); | ||
const index_1 = require("../instructions/index"); | ||
const internal_1 = require("./internal"); | ||
@@ -36,3 +36,3 @@ /** | ||
const [authorityPublicKey, signers] = (0, internal_1.getSigners)(authority, multiSigners); | ||
const transaction = new web3_js_1.Transaction().add((0, instructions_1.createMintToInstruction)(mint, destination, authorityPublicKey, amount, multiSigners, programId)); | ||
const transaction = new web3_js_1.Transaction().add((0, index_1.createMintToInstruction)(mint, destination, authorityPublicKey, amount, multiSigners, programId)); | ||
return yield (0, web3_js_1.sendAndConfirmTransaction)(connection, transaction, [payer, ...signers], confirmOptions); | ||
@@ -39,0 +39,0 @@ }); |
@@ -15,3 +15,3 @@ "use strict"; | ||
const constants_1 = require("../constants"); | ||
const instructions_1 = require("../instructions"); | ||
const index_1 = require("../instructions/index"); | ||
const internal_1 = require("./internal"); | ||
@@ -37,3 +37,3 @@ /** | ||
const [authorityPublicKey, signers] = (0, internal_1.getSigners)(authority, multiSigners); | ||
const transaction = new web3_js_1.Transaction().add((0, instructions_1.createMintToCheckedInstruction)(mint, destination, authorityPublicKey, amount, decimals, multiSigners, programId)); | ||
const transaction = new web3_js_1.Transaction().add((0, index_1.createMintToCheckedInstruction)(mint, destination, authorityPublicKey, amount, decimals, multiSigners, programId)); | ||
return yield (0, web3_js_1.sendAndConfirmTransaction)(connection, transaction, [payer, ...signers], confirmOptions); | ||
@@ -40,0 +40,0 @@ }); |
@@ -15,3 +15,3 @@ "use strict"; | ||
const constants_1 = require("../constants"); | ||
const instructions_1 = require("../instructions"); | ||
const index_1 = require("../instructions/index"); | ||
const internal_1 = require("./internal"); | ||
@@ -34,3 +34,3 @@ /** | ||
const [ownerPublicKey, signers] = (0, internal_1.getSigners)(owner, multiSigners); | ||
const transaction = new web3_js_1.Transaction().add((0, instructions_1.createRevokeInstruction)(account, ownerPublicKey, multiSigners, programId)); | ||
const transaction = new web3_js_1.Transaction().add((0, index_1.createRevokeInstruction)(account, ownerPublicKey, multiSigners, programId)); | ||
return yield (0, web3_js_1.sendAndConfirmTransaction)(connection, transaction, [payer, ...signers], confirmOptions); | ||
@@ -37,0 +37,0 @@ }); |
@@ -15,3 +15,3 @@ "use strict"; | ||
const constants_1 = require("../constants"); | ||
const instructions_1 = require("../instructions"); | ||
const index_1 = require("../instructions/index"); | ||
const internal_1 = require("./internal"); | ||
@@ -36,3 +36,3 @@ /** | ||
const [currentAuthorityPublicKey, signers] = (0, internal_1.getSigners)(currentAuthority, multiSigners); | ||
const transaction = new web3_js_1.Transaction().add((0, instructions_1.createSetAuthorityInstruction)(account, currentAuthorityPublicKey, authorityType, newAuthority, multiSigners, programId)); | ||
const transaction = new web3_js_1.Transaction().add((0, index_1.createSetAuthorityInstruction)(account, currentAuthorityPublicKey, authorityType, newAuthority, multiSigners, programId)); | ||
return yield (0, web3_js_1.sendAndConfirmTransaction)(connection, transaction, [payer, ...signers], confirmOptions); | ||
@@ -39,0 +39,0 @@ }); |
@@ -15,3 +15,3 @@ "use strict"; | ||
const constants_1 = require("../constants"); | ||
const instructions_1 = require("../instructions"); | ||
const index_1 = require("../instructions/index"); | ||
/** | ||
@@ -30,3 +30,3 @@ * Sync the balance of a native SPL token account to the underlying system account's lamports | ||
return __awaiter(this, void 0, void 0, function* () { | ||
const transaction = new web3_js_1.Transaction().add((0, instructions_1.createSyncNativeInstruction)(account, programId)); | ||
const transaction = new web3_js_1.Transaction().add((0, index_1.createSyncNativeInstruction)(account, programId)); | ||
return yield (0, web3_js_1.sendAndConfirmTransaction)(connection, transaction, [payer], confirmOptions); | ||
@@ -33,0 +33,0 @@ }); |
@@ -15,3 +15,3 @@ "use strict"; | ||
const constants_1 = require("../constants"); | ||
const instructions_1 = require("../instructions"); | ||
const index_1 = require("../instructions/index"); | ||
const internal_1 = require("./internal"); | ||
@@ -35,3 +35,3 @@ /** | ||
const [authorityPublicKey, signers] = (0, internal_1.getSigners)(authority, multiSigners); | ||
const transaction = new web3_js_1.Transaction().add((0, instructions_1.createThawAccountInstruction)(account, mint, authorityPublicKey, multiSigners, programId)); | ||
const transaction = new web3_js_1.Transaction().add((0, index_1.createThawAccountInstruction)(account, mint, authorityPublicKey, multiSigners, programId)); | ||
return yield (0, web3_js_1.sendAndConfirmTransaction)(connection, transaction, [payer, ...signers], confirmOptions); | ||
@@ -38,0 +38,0 @@ }); |
@@ -15,3 +15,3 @@ "use strict"; | ||
const constants_1 = require("../constants"); | ||
const instructions_1 = require("../instructions"); | ||
const index_1 = require("../instructions/index"); | ||
const internal_1 = require("./internal"); | ||
@@ -36,3 +36,3 @@ /** | ||
const [ownerPublicKey, signers] = (0, internal_1.getSigners)(owner, multiSigners); | ||
const transaction = new web3_js_1.Transaction().add((0, instructions_1.createTransferInstruction)(source, destination, ownerPublicKey, amount, multiSigners, programId)); | ||
const transaction = new web3_js_1.Transaction().add((0, index_1.createTransferInstruction)(source, destination, ownerPublicKey, amount, multiSigners, programId)); | ||
return yield (0, web3_js_1.sendAndConfirmTransaction)(connection, transaction, [payer, ...signers], confirmOptions); | ||
@@ -39,0 +39,0 @@ }); |
@@ -15,3 +15,3 @@ "use strict"; | ||
const constants_1 = require("../constants"); | ||
const instructions_1 = require("../instructions"); | ||
const index_1 = require("../instructions/index"); | ||
const internal_1 = require("./internal"); | ||
@@ -38,3 +38,3 @@ /** | ||
const [ownerPublicKey, signers] = (0, internal_1.getSigners)(owner, multiSigners); | ||
const transaction = new web3_js_1.Transaction().add((0, instructions_1.createTransferCheckedInstruction)(source, mint, destination, ownerPublicKey, amount, decimals, multiSigners, programId)); | ||
const transaction = new web3_js_1.Transaction().add((0, index_1.createTransferCheckedInstruction)(source, mint, destination, ownerPublicKey, amount, decimals, multiSigners, programId)); | ||
return yield (0, web3_js_1.sendAndConfirmTransaction)(connection, transaction, [payer, ...signers], confirmOptions); | ||
@@ -41,0 +41,0 @@ }); |
@@ -13,7 +13,7 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
__exportStar(require("./instructions"), exports); | ||
__exportStar(require("./state"), exports); | ||
__exportStar(require("./actions"), exports); | ||
__exportStar(require("./instructions/index"), exports); | ||
__exportStar(require("./state/index"), exports); | ||
__exportStar(require("./actions/index"), exports); | ||
__exportStar(require("./constants"), exports); | ||
__exportStar(require("./errors"), exports); | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@solana/spl-token", | ||
"version": "0.2.0-alpha.1", | ||
"version": "0.2.0-alpha.2", | ||
"author": "Solana Maintainers <maintainers@solana.foundation>", | ||
@@ -22,6 +22,6 @@ "repository": "https://github.com/solana-labs/solana-program-library", | ||
"main": "lib/cjs/index.js", | ||
"module": "lib/esm/index.js", | ||
"types": "lib/esm/index.d.ts", | ||
"module": "lib/esm/index.mjs", | ||
"types": "lib/types/index.d.ts", | ||
"exports": { | ||
"import": "./lib/esm/index.js", | ||
"import": "./lib/esm/index.mjs", | ||
"require": "./lib/cjs/index.js" | ||
@@ -31,3 +31,3 @@ }, | ||
"clean": "shx rm -rf lib", | ||
"build": "yarn clean && tsc -p tsconfig.json && tsc -p tsconfig-cjs.json", | ||
"build": "yarn clean && tsc -p tsconfig.json; tsc-esm -p tsconfig.json && tsc -p tsconfig.cjs.json", | ||
"postbuild": "echo '{\"type\":\"commonjs\"}' > lib/cjs/package.json && echo '{\"type\":\"module\"}' > lib/esm/package.json", | ||
@@ -45,28 +45,29 @@ "deploy": "yarn docs && gh-pages --dist docs --dotfiles", | ||
"@solana/buffer-layout": "^4.0.0", | ||
"@solana/buffer-layout-utils": "^0.1.1", | ||
"@solana/web3.js": "^1.20.0" | ||
"@solana/buffer-layout-utils": "^0.2.0", | ||
"@solana/web3.js": "^1.32.0" | ||
}, | ||
"devDependencies": { | ||
"@types/chai-as-promised": "^7.1.4", | ||
"@types/eslint": "^8.2.1", | ||
"@types/eslint": "^8.4.0", | ||
"@types/eslint-plugin-prettier": "^3.1.0", | ||
"@types/mocha": "^9.0.0", | ||
"@types/node": "^16.11.13", | ||
"@types/prettier": "^2.4.2", | ||
"@typescript-eslint/eslint-plugin": "^5.8.1", | ||
"@typescript-eslint/parser": "^5.8.1", | ||
"@types/mocha": "^9.1.0", | ||
"@types/node": "^16.11.21", | ||
"@types/prettier": "^2.4.3", | ||
"@typescript-eslint/eslint-plugin": "^5.10.0", | ||
"@typescript-eslint/parser": "^5.10.0", | ||
"chai": "^4.3.4", | ||
"chai-as-promised": "^7.1.1", | ||
"eslint": "^8.5.0", | ||
"eslint": "^8.7.0", | ||
"eslint-config-prettier": "^8.3.0", | ||
"eslint-plugin-prettier": "^4.0.0", | ||
"gh-pages": "^3.2.3", | ||
"mocha": "^9.1.3", | ||
"mocha": "^9.1.4", | ||
"prettier": "^2.5.1", | ||
"shx": "^0.3.3", | ||
"shx": "^0.3.4", | ||
"ts-node": "^10.4.0", | ||
"tslib": "^2.3.1", | ||
"typedoc": "^0.22.10", | ||
"typescript": "^4.4.4" | ||
"typedoc": "^0.22.11", | ||
"typescript": "^4.5.5", | ||
"typescript-esm": "^2.0.0" | ||
} | ||
} |
@@ -11,3 +11,3 @@ import { | ||
import { TOKEN_PROGRAM_ID } from '../constants'; | ||
import { createApproveInstruction } from '../instructions'; | ||
import { createApproveInstruction } from '../instructions/index'; | ||
import { getSigners } from './internal'; | ||
@@ -14,0 +14,0 @@ |
@@ -11,3 +11,3 @@ import { | ||
import { TOKEN_PROGRAM_ID } from '../constants'; | ||
import { createApproveCheckedInstruction } from '../instructions'; | ||
import { createApproveCheckedInstruction } from '../instructions/index'; | ||
import { getSigners } from './internal'; | ||
@@ -14,0 +14,0 @@ |
@@ -11,3 +11,3 @@ import { | ||
import { TOKEN_PROGRAM_ID } from '../constants'; | ||
import { createBurnInstruction } from '../instructions'; | ||
import { createBurnInstruction } from '../instructions/index'; | ||
import { getSigners } from './internal'; | ||
@@ -14,0 +14,0 @@ |
@@ -11,3 +11,3 @@ import { | ||
import { TOKEN_PROGRAM_ID } from '../constants'; | ||
import { createBurnCheckedInstruction } from '../instructions'; | ||
import { createBurnCheckedInstruction } from '../instructions/index'; | ||
import { getSigners } from './internal'; | ||
@@ -14,0 +14,0 @@ |
@@ -11,3 +11,3 @@ import { | ||
import { TOKEN_PROGRAM_ID } from '../constants'; | ||
import { createCloseAccountInstruction } from '../instructions'; | ||
import { createCloseAccountInstruction } from '../instructions/index'; | ||
import { getSigners } from './internal'; | ||
@@ -14,0 +14,0 @@ |
@@ -12,4 +12,4 @@ import { | ||
import { TOKEN_PROGRAM_ID } from '../constants'; | ||
import { createInitializeAccountInstruction } from '../instructions'; | ||
import { ACCOUNT_SIZE, getMinimumBalanceForRentExemptAccount } from '../state'; | ||
import { createInitializeAccountInstruction } from '../instructions/index'; | ||
import { ACCOUNT_SIZE, getMinimumBalanceForRentExemptAccount } from '../state/index'; | ||
import { createAssociatedTokenAccount } from './createAssociatedTokenAccount'; | ||
@@ -16,0 +16,0 @@ |
import { ConfirmOptions, Connection, PublicKey, sendAndConfirmTransaction, Signer, Transaction } from '@solana/web3.js'; | ||
import { ASSOCIATED_TOKEN_PROGRAM_ID, TOKEN_PROGRAM_ID } from '../constants'; | ||
import { createAssociatedTokenAccountInstruction } from '../instructions'; | ||
import { getAssociatedTokenAddress } from '../state'; | ||
import { createAssociatedTokenAccountInstruction } from '../instructions/index'; | ||
import { getAssociatedTokenAddress } from '../state/index'; | ||
@@ -6,0 +6,0 @@ /** |
@@ -12,4 +12,4 @@ import { | ||
import { TOKEN_PROGRAM_ID } from '../constants'; | ||
import { createInitializeMintInstruction } from '../instructions'; | ||
import { getMinimumBalanceForRentExemptMint, MINT_SIZE } from '../state'; | ||
import { createInitializeMintInstruction } from '../instructions/index'; | ||
import { getMinimumBalanceForRentExemptMint, MINT_SIZE } from '../state/index'; | ||
@@ -16,0 +16,0 @@ /** |
@@ -12,4 +12,4 @@ import { | ||
import { TOKEN_PROGRAM_ID } from '../constants'; | ||
import { createInitializeMultisigInstruction } from '../instructions'; | ||
import { getMinimumBalanceForRentExemptMultisig, MULTISIG_SIZE } from '../state'; | ||
import { createInitializeMultisigInstruction } from '../instructions/index'; | ||
import { getMinimumBalanceForRentExemptMultisig, MULTISIG_SIZE } from '../state/index'; | ||
@@ -16,0 +16,0 @@ /** |
@@ -16,4 +16,4 @@ import { | ||
createSyncNativeInstruction, | ||
} from '../instructions'; | ||
import { ACCOUNT_SIZE, getAssociatedTokenAddress, getMinimumBalanceForRentExemptAccount } from '../state'; | ||
} from '../instructions/index'; | ||
import { ACCOUNT_SIZE, getAssociatedTokenAddress, getMinimumBalanceForRentExemptAccount } from '../state/index'; | ||
import { createAccount } from './createAccount'; | ||
@@ -20,0 +20,0 @@ |
@@ -11,3 +11,3 @@ import { | ||
import { TOKEN_PROGRAM_ID } from '../constants'; | ||
import { createFreezeAccountInstruction } from '../instructions'; | ||
import { createFreezeAccountInstruction } from '../instructions/index'; | ||
import { getSigners } from './internal'; | ||
@@ -14,0 +14,0 @@ |
@@ -17,4 +17,4 @@ import { | ||
} from '../errors'; | ||
import { createAssociatedTokenAccountInstruction } from '../instructions'; | ||
import { Account, getAccount, getAssociatedTokenAddress } from '../state'; | ||
import { createAssociatedTokenAccountInstruction } from '../instructions/index'; | ||
import { Account, getAccount, getAssociatedTokenAddress } from '../state/index'; | ||
@@ -21,0 +21,0 @@ /** |
@@ -11,3 +11,3 @@ import { | ||
import { TOKEN_PROGRAM_ID } from '../constants'; | ||
import { createMintToInstruction } from '../instructions'; | ||
import { createMintToInstruction } from '../instructions/index'; | ||
import { getSigners } from './internal'; | ||
@@ -14,0 +14,0 @@ |
@@ -11,3 +11,3 @@ import { | ||
import { TOKEN_PROGRAM_ID } from '../constants'; | ||
import { createMintToCheckedInstruction } from '../instructions'; | ||
import { createMintToCheckedInstruction } from '../instructions/index'; | ||
import { getSigners } from './internal'; | ||
@@ -14,0 +14,0 @@ |
@@ -11,3 +11,3 @@ import { | ||
import { TOKEN_PROGRAM_ID } from '../constants'; | ||
import { createRevokeInstruction } from '../instructions'; | ||
import { createRevokeInstruction } from '../instructions/index'; | ||
import { getSigners } from './internal'; | ||
@@ -14,0 +14,0 @@ |
@@ -11,3 +11,3 @@ import { | ||
import { TOKEN_PROGRAM_ID } from '../constants'; | ||
import { AuthorityType, createSetAuthorityInstruction } from '../instructions'; | ||
import { AuthorityType, createSetAuthorityInstruction } from '../instructions/index'; | ||
import { getSigners } from './internal'; | ||
@@ -14,0 +14,0 @@ |
@@ -11,3 +11,3 @@ import { | ||
import { TOKEN_PROGRAM_ID } from '../constants'; | ||
import { createSyncNativeInstruction } from '../instructions'; | ||
import { createSyncNativeInstruction } from '../instructions/index'; | ||
@@ -14,0 +14,0 @@ /** |
@@ -11,3 +11,3 @@ import { | ||
import { TOKEN_PROGRAM_ID } from '../constants'; | ||
import { createThawAccountInstruction } from '../instructions'; | ||
import { createThawAccountInstruction } from '../instructions/index'; | ||
import { getSigners } from './internal'; | ||
@@ -14,0 +14,0 @@ |
@@ -11,3 +11,3 @@ import { | ||
import { TOKEN_PROGRAM_ID } from '../constants'; | ||
import { createTransferInstruction } from '../instructions'; | ||
import { createTransferInstruction } from '../instructions/index'; | ||
import { getSigners } from './internal'; | ||
@@ -14,0 +14,0 @@ |
@@ -11,3 +11,3 @@ import { | ||
import { TOKEN_PROGRAM_ID } from '../constants'; | ||
import { createTransferCheckedInstruction } from '../instructions'; | ||
import { createTransferCheckedInstruction } from '../instructions/index'; | ||
import { getSigners } from './internal'; | ||
@@ -14,0 +14,0 @@ |
@@ -1,5 +0,5 @@ | ||
export * from './instructions'; | ||
export * from './state'; | ||
export * from './actions'; | ||
export * from './instructions/index'; | ||
export * from './state/index'; | ||
export * from './actions/index'; | ||
export * from './constants'; | ||
export * from './errors'; |
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
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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
634372
22
335
11501
+ Added@solana/buffer-layout-utils@0.2.0(transitive)
- Removed@solana/buffer-layout-utils@0.1.1(transitive)
Updated@solana/web3.js@^1.32.0