@solana/spl-token
Advanced tools
Comparing version 0.0.10 to 0.0.11
@@ -34,4 +34,5 @@ 'use strict'; | ||
return web3_js.sendAndConfirmTransaction(connection, transaction, signers, { | ||
skipPreflight: true, | ||
commitment: 'recent' | ||
skipPreflight: false, | ||
commitment: 'recent', | ||
preflightCommitment: 'recent' | ||
}); | ||
@@ -385,4 +386,4 @@ } | ||
async getAccountInfo(account) { | ||
const info = await this.connection.getAccountInfo(account); | ||
async getAccountInfo(account, commitment) { | ||
const info = await this.connection.getAccountInfo(account, commitment); | ||
@@ -1597,2 +1598,4 @@ if (info === null) { | ||
exports.AccountLayout = AccountLayout; | ||
exports.MintLayout = MintLayout; | ||
exports.NATIVE_MINT = NATIVE_MINT; | ||
@@ -1599,0 +1602,0 @@ exports.Token = Token; |
declare module '@solana/spl-token' { | ||
import { Buffer } from 'buffer'; | ||
import { PublicKey, TransactionInstruction, TransactionSignature, Connection, Account } from "@solana/web3.js"; | ||
import {Buffer} from 'buffer'; | ||
import {Layout} from 'buffer-layout'; | ||
import { | ||
PublicKey, | ||
TransactionInstruction, | ||
TransactionSignature, | ||
Connection, | ||
Account, | ||
} from '@solana/web3.js'; | ||
import BN from 'bn.js'; | ||
@@ -12,43 +19,45 @@ | ||
export type AuthorityType = | ||
| 'MintTokens' | ||
| 'FreezeAccount' | ||
| 'AccountOwner' | ||
| 'CloseAccount'; | ||
| 'MintTokens' | ||
| 'FreezeAccount' | ||
| 'AccountOwner' | ||
| 'CloseAccount'; | ||
export const NATIVE_MINT: PublicKey; | ||
export const MintLayout: Layout; | ||
export type MintInfo = { | ||
mintAuthority: null | PublicKey, | ||
supply: u64, | ||
decimals: number, | ||
isInitialized: boolean, | ||
freezeAuthority: null | PublicKey, | ||
mintAuthority: null | PublicKey; | ||
supply: u64; | ||
decimals: number; | ||
isInitialized: boolean; | ||
freezeAuthority: null | PublicKey; | ||
}; | ||
export const AccountLayout: Layout; | ||
export type AccountInfo = { | ||
mint: PublicKey, | ||
owner: PublicKey, | ||
amount: u64, | ||
delegate: null | PublicKey, | ||
delegatedAmount: u64, | ||
isInitialized: boolean, | ||
isFrozen: boolean, | ||
isNative: boolean, | ||
rentExemptReserve: null | u64, | ||
closeAuthority: null | PublicKey, | ||
mint: PublicKey; | ||
owner: PublicKey; | ||
amount: u64; | ||
delegate: null | PublicKey; | ||
delegatedAmount: u64; | ||
isInitialized: boolean; | ||
isFrozen: boolean; | ||
isNative: boolean; | ||
rentExemptReserve: null | u64; | ||
closeAuthority: null | PublicKey; | ||
}; | ||
export type MultisigInfo = { | ||
m: number, | ||
n: number, | ||
initialized: boolean, | ||
signer1: PublicKey, | ||
signer2: PublicKey, | ||
signer3: PublicKey, | ||
signer4: PublicKey, | ||
signer5: PublicKey, | ||
signer6: PublicKey, | ||
signer7: PublicKey, | ||
signer8: PublicKey, | ||
signer9: PublicKey, | ||
signer10: PublicKey, | ||
signer11: PublicKey, | ||
m: number; | ||
n: number; | ||
initialized: boolean; | ||
signer1: PublicKey; | ||
signer2: PublicKey; | ||
signer3: PublicKey; | ||
signer4: PublicKey; | ||
signer5: PublicKey; | ||
signer6: PublicKey; | ||
signer7: PublicKey; | ||
signer8: PublicKey; | ||
signer9: PublicKey; | ||
signer10: PublicKey; | ||
signer11: PublicKey; | ||
}; | ||
@@ -73,7 +82,7 @@ export class Token { | ||
static createWrappedNativeAccount( | ||
connection: Connection, | ||
programId: PublicKey, | ||
owner: PublicKey, | ||
payer: Account, | ||
amount: number, | ||
connection: Connection, | ||
programId: PublicKey, | ||
owner: PublicKey, | ||
payer: Account, | ||
amount: number, | ||
): Promise<PublicKey>; | ||
@@ -80,0 +89,0 @@ createMultisig(m: number, signers: Array<PublicKey>): Promise<PublicKey>; |
@@ -24,4 +24,5 @@ import _defineProperty from '@babel/runtime/helpers/defineProperty'; | ||
return sendAndConfirmTransaction$1(connection, transaction, signers, { | ||
skipPreflight: true, | ||
commitment: 'recent' | ||
skipPreflight: false, | ||
commitment: 'recent', | ||
preflightCommitment: 'recent' | ||
}); | ||
@@ -375,4 +376,4 @@ } | ||
async getAccountInfo(account) { | ||
const info = await this.connection.getAccountInfo(account); | ||
async getAccountInfo(account, commitment) { | ||
const info = await this.connection.getAccountInfo(account, commitment); | ||
@@ -1587,3 +1588,3 @@ if (info === null) { | ||
export { NATIVE_MINT, Token, u64 }; | ||
export { AccountLayout, MintLayout, NATIVE_MINT, Token, u64 }; | ||
//# sourceMappingURL=index.esm.js.map |
@@ -9,3 +9,2 @@ /** | ||
declare module '@solana/spl-token' { | ||
// === client/token.js === | ||
declare export class u64 extends BN { | ||
@@ -21,2 +20,3 @@ toBuffer(): Buffer; | ||
declare export var NATIVE_MINT: PublicKey; | ||
declare export var MintLayout: Layout; | ||
declare export type MintInfo = {| | ||
@@ -29,2 +29,3 @@ mintAuthority: null | PublicKey, | ||
|}; | ||
declare export var AccountLayout: Layout; | ||
declare export type AccountInfo = {| | ||
@@ -31,0 +32,0 @@ mint: PublicKey, |
{ | ||
"name": "@solana/spl-token", | ||
"version": "0.0.10", | ||
"version": "0.0.11", | ||
"description": "SPL Token JavaScript API", | ||
@@ -25,3 +25,3 @@ "license": "MIT", | ||
], | ||
"testnetDefaultChannel": "v1.3.9", | ||
"testnetDefaultChannel": "v1.3.14", | ||
"scripts": { | ||
@@ -31,3 +31,3 @@ "build": "rollup -c", | ||
"lint": "npm run pretty && eslint .", | ||
"lint:fix": "npm run lint -- --fix", | ||
"lint:fix": "npm run pretty:fix && eslint . --fix", | ||
"flow": "flow", | ||
@@ -45,11 +45,12 @@ "flow:watch": "watch 'flow' . --wait=1 --ignoreDirectoryPattern=/doc/", | ||
"localnet:logs": "solana-localnet logs -f", | ||
"pretty": "prettier --write '{,cli*/**/}*.js'" | ||
"pretty": "prettier --check '{,cli*/**/}*.[jt]s'", | ||
"pretty:fix": "prettier --write '{,cli*/**/}*.[jt]s'" | ||
}, | ||
"dependencies": { | ||
"@babel/runtime": "^7.10.5", | ||
"@solana/web3.js": "^0.75.0", | ||
"@solana/web3.js": "^0.78.0", | ||
"bn.js": "^5.0.0", | ||
"buffer-layout": "^1.2.0", | ||
"dotenv": "8.2.0", | ||
"mkdirp-promise": "^5.0.1" | ||
"mkdirp": "1.0.4" | ||
}, | ||
@@ -65,7 +66,7 @@ "devDependencies": { | ||
"@rollup/plugin-babel": "^5.1.0", | ||
"@rollup/plugin-commonjs": "^14.0.0", | ||
"@rollup/plugin-commonjs": "^15.1.0", | ||
"babel-eslint": "^10.1.0", | ||
"eslint": "^7.4.0", | ||
"eslint-plugin-import": "^2.22.0", | ||
"flow-bin": "0.131.0", | ||
"flow-bin": "0.135.0", | ||
"flow-typed": "^3.2.0", | ||
@@ -76,3 +77,2 @@ "mz": "^2.7.0", | ||
"rollup-plugin-copy": "^3.3.0", | ||
"semver": "^7.0.0", | ||
"watch": "^1.0.2" | ||
@@ -79,0 +79,0 @@ }, |
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
306581
19
3193
+ Addedmkdirp@1.0.4
+ Added@solana/web3.js@0.78.4(transitive)
+ Addedmkdirp@1.0.4(transitive)
- Removedmkdirp-promise@^5.0.1
- Removed@solana/web3.js@0.75.2(transitive)
- Removedmkdirp@3.0.1(transitive)
- Removedmkdirp-promise@5.0.1(transitive)
Updated@solana/web3.js@^0.78.0