
Security News
Node.js Drops Bug Bounty Rewards After Funding Dries Up
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.
@frakters/ilo-client
Advanced tools
Library to interact with FRAKT solana program.
npm install frakt-client
import { getArts } from 'frakt-client';
import {
Connection,
PublicKey,
} from '@solana/web3.js';
const fraktProgramPubKey = new PublicKey("6zcw5qXiCjScAxYLhxhuPgAo69PSoDijpnWTDGmDVDbv")
const connection = new Connection("https://api.devnet.solana.com", "processed")
const arts = await getArts(fraktProgramPubKey, { connection })
console.log(arts)
See example/tests/getArts.js for a full example.
[
{
metadata: {
artAccountPubkey: '5GVy2aWvbgtyhc5RXjQJWRSut2H2ntY9spo3hNNGrheX',
isInitialized: true,
id: 4,
first_owner_pubkey: 'DYEfeSZz6fyVyGVefXiKisu94TzQnT2UG8Rc1ZZ2wAWb',
minted_token_pubkey: '11111111111111111111111111111111',
is_minted: false,
created_at: 1622842277
},
attributes: {
shape: 0,
color: 0,
art_hash: 0,
circles_amount: 0,
fractial_iterations: 0,
min_rad_low_limit: 0,
min_rad_high_limit: 0,
max_rad_low_limit: 0,
max_rad_high_limit: 0,
shape_rarity: 0,
color_rarity: 0,
image_url: ''
}
},
{
metadata: {
artAccountPubkey: 'DHEbQmgGyHbUWuen9knm72DpMvbexuWTgXa3bwsbtY8w',
isInitialized: true,
id: 1,
first_owner_pubkey: 'DYEfeSZz6fyVyGVefXiKisu94TzQnT2UG8Rc1ZZ2wAWb',
minted_token_pubkey: 'G7dAEvrX14WnAm79a4ziiSKuoJ3wdCxBwVFn6zd4FyNo',
is_minted: true,
created_at: 1622841755
},
attributes: {
shape: 1,
color: 2,
art_hash: 2,
circles_amount: 7,
fractial_iterations: 14,
min_rad_low_limit: 3,
min_rad_high_limit: 8,
max_rad_low_limit: 102,
max_rad_high_limit: 305,
shape_rarity: 2,
color_rarity: 70,
image_url: 'https://i.ibb.co/hMwzcpF/frakt-ex.jpg'
}
},
]
import { getAllUserTokens } from 'frakt-client';
import {
Connection,
PublicKey,
} from '@solana/web3.js';
const userPubKey = new PublicKey("DYEfeSZz6fyVyGVefXiKisu94TzQnT2UG8Rc1ZZ2wAWb")
const connection = new Connection("https://api.devnet.solana.com", "processed")
const tokens = await getAllUserTokens(userPubKey, { connection })
console.log(tokens)
See example/tests/getArts.js for a full example.
[
{
tokenAccountPubkey: 'HwBG6T84nXx696reiTXj221Sd9KqfiwJsZDk5AgS4S2w',
mint: 'nmPRdEQrmp6soRimLvogW92RG6Aj2vi494RAVN768CA',
owner: 'DYEfeSZz6fyVyGVefXiKisu94TzQnT2UG8Rc1ZZ2wAWb',
amount: 1,
delegateOption: false,
delegate: '11111111111111111111111111111111',
state: true,
isNativeOption: false,
isNative: 0,
delegatedAmount: 0,
closeAuthorityOption: false,
closeAuthority: '11111111111111111111111111111111'
},
{
tokenAccountPubkey: '2HimvoswsC91aYcP1odXmUxXnE4GrYNS8exfrNXFTx2E',
mint: 'Ht1yx8tz48vbesYFAtLMPNFCaVo2pKsQXYkfo7pZxhDi',
owner: 'DYEfeSZz6fyVyGVefXiKisu94TzQnT2UG8Rc1ZZ2wAWb',
amount: 1,
delegateOption: false,
delegate: '11111111111111111111111111111111',
state: true,
isNativeOption: false,
isNative: 0,
delegatedAmount: 0,
closeAuthorityOption: false,
closeAuthority: '11111111111111111111111111111111'
},
{
tokenAccountPubkey: 'AfKsnT3b6DERcfJbREAuV7JH8JWjA3dQpTDto4rE7Ndd',
mint: '5sAdZkmEvxBh7nM7q5asjzmWDeRqDJcLneiF3fNMHcUi',
owner: 'DYEfeSZz6fyVyGVefXiKisu94TzQnT2UG8Rc1ZZ2wAWb',
amount: 1,
delegateOption: false,
delegate: '11111111111111111111111111111111',
state: true,
isNativeOption: false,
isNative: 0,
delegatedAmount: 0,
closeAuthorityOption: false,
closeAuthority: '11111111111111111111111111111111'
}
]
import { getArts, getAllUserTokens, getArtTokensFromTokens } from '../index';
import {
Connection,
PublicKey,
} from '@solana/web3.js';
const userPubKey = new PublicKey("DYEfeSZz6fyVyGVefXiKisu94TzQnT2UG8Rc1ZZ2wAWb")
const fraktProgramPubKey = new PublicKey("6zcw5qXiCjScAxYLhxhuPgAo69PSoDijpnWTDGmDVDbv")
const connection = new Connection("https://api.devnet.solana.com", "processed")
const tokens = await getAllUserTokens(userPubKey, { connection })
const arts = await getArts(fraktProgramPubKey, { connection })
const userArts = getArtTokensFromTokens(arts, tokens)
console.log(userArts)
See example/tests/getArts.js for a full example.
[
{
metadata: {
artAccountPubkey: '5GVy2aWvbgtyhc5RXjQJWRSut2H2ntY9spo3hNNGrheX',
isInitialized: true,
id: 4,
first_owner_pubkey: 'DYEfeSZz6fyVyGVefXiKisu94TzQnT2UG8Rc1ZZ2wAWb',
minted_token_pubkey: '11111111111111111111111111111111',
is_minted: false,
created_at: 1622842277
},
attributes: {
shape: 0,
color: 0,
art_hash: 0,
circles_amount: 0,
fractial_iterations: 0,
min_rad_low_limit: 0,
min_rad_high_limit: 0,
max_rad_low_limit: 0,
max_rad_high_limit: 0,
shape_rarity: 0,
color_rarity: 0,
image_url: ''
}
},
{
metadata: {
artAccountPubkey: 'DHEbQmgGyHbUWuen9knm72DpMvbexuWTgXa3bwsbtY8w',
isInitialized: true,
id: 1,
first_owner_pubkey: 'DYEfeSZz6fyVyGVefXiKisu94TzQnT2UG8Rc1ZZ2wAWb',
minted_token_pubkey: 'G7dAEvrX14WnAm79a4ziiSKuoJ3wdCxBwVFn6zd4FyNo',
is_minted: true,
created_at: 1622841755
},
attributes: {
shape: 1,
color: 2,
art_hash: 2,
circles_amount: 7,
fractial_iterations: 14,
min_rad_low_limit: 3,
min_rad_high_limit: 8,
max_rad_low_limit: 102,
max_rad_high_limit: 305,
shape_rarity: 2,
color_rarity: 70,
image_url: 'https://i.ibb.co/hMwzcpF/frakt-ex.jpg'
}
},
]
import { getCounter, } from '../index';
import {
Connection,
PublicKey,
} from '@solana/web3.js';
const fraktProgramPubKey = new PublicKey("6zcw5qXiCjScAxYLhxhuPgAo69PSoDijpnWTDGmDVDbv")
const connection = new Connection("https://api.devnet.solana.com", "processed")
const counter = await getCounter(fraktProgramPubKey, {connection})
console.log(counter)
See example/tests/getArts.js for a full example.
{
counterAccountPubkey: 'Cfbth2vrShsUBwjZZFC1xoPGcDdoFMikCyXxQD5yzEyj',
isInitialized: true,
count: 10
}
Here is the examples of signing write transaction from local keypair, that is feasible only on server. For examples on how to sign write transaction in browser using sollet browser extention visit frakt-library-browser-example for a full example.
import { buyArt } from 'frakt-client';
import {
Connection,
PublicKey,
} from '@solana/web3.js';
const fraktProgramPubKey = new PublicKey("6zcw5qXiCjScAxYLhxhuPgAo69PSoDijpnWTDGmDVDbv")
const adminPubKey = new PublicKey("DQfi54Fspjfi6VyMH1iSDyYAcui2hUF1QRbQ1GM7N1uo")
const aliceKeypair = readKeypairFromPath(<PATH_TO_YOUR_KEYPAIR>)
const connection = new Connection("https://api.devnet.solana.com", "processed")
void await buyArt(aliceKeypair.publicKey, fraktProgramPubKey, adminPubKey,
async (txn) => void connection.sendTransaction(txn, [aliceKeypair]), { connection })
See example/tests/getArts.js for a full example.
import { mintArt } from 'frakt-client';
import {
Connection,
PublicKey,
} from '@solana/web3.js';
const fraktProgramPubKey = new PublicKey("6zcw5qXiCjScAxYLhxhuPgAo69PSoDijpnWTDGmDVDbv")
const adminKeypair = readKeypairFromPath(__dirname + "/keys/admin.json")
const userPubKey = new PublicKey("DYEfeSZz6fyVyGVefXiKisu94TzQnT2UG8Rc1ZZ2wAWb")
const artPubKey = new PublicKey("Hsx9yQkqiL5A6vTf2QRjcVBDCzNKTssgiagBVbWXmtd7")
const connection = new Connection("https://api.devnet.solana.com", "processed")
void await mintArt({
shape: 1,
color: 2,
art_hash: 2, // Hash of figure+color combination in ranges
circles_amount: 7,
fractial_iterations: 14,
min_rad_low_limit: 3,
min_rad_high_limit: 8,
max_rad_low_limit: 102,
max_rad_high_limit: 305,
shape_rarity: 2,
color_rarity: 70,
image_url: "", // wip anyway
}, adminKeypair.publicKey, userPubKey, artPubKey, fraktProgramPubKey,
async (txn) => void connection.sendTransaction(txn, [adminKeypair]),
{ connection })
See example/tests/getArts.js for a full example.
Derives tokenPublicKey from userAddress and mintAddress, which can be user in various situations
getTokenAddressFromMintAndUser(userPublicKey: String, mintAddress: String): PublicKeyReturns KeyPair from the file path
readKeypairFromPath(path: string): KeypairFAQs
Client library for interacting with ilo solana program
We found that @frakters/ilo-client demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.

Research
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.