0.1.24 • Published 2 years ago
onescription v0.1.24
All-in-One inscription tool
A multi-chain inscription tool that can function as a standalone inscription bot or seamlessly integrate into web applications. The tool also boasts concurrent request handling, secure wallet generation, and a range of other valuable features.
Features
Utility
- inscription bot
- can be integrated into web application
Supported chains
- Evm-compatible chains
- Cosmos Hub
Highly customizable
- configurable gas options, with automatic estimation as the default.
- selectively executed according to customized logic, such as writing execution logic based on block height or unix timestamp. INJS demo
- configurable transaction type, including contract call or token transfer.
Concurrent requests
- correct way to handle concurrent requests on nodejs, based on async-mutext / semaphore.
- wait for each request until the user-defined status is reached.
Wallet
- connect an existing signer from private key / mnemonic / secret csv file.
- create a new wallet and export it to secret file (CSV format).
- may be a better practice to encrypt the generated secret file using age encryption.
Installation
yarn add onescription@latest
Examples
To use as an inscription bot
Evm:
BNB chain
const configuration: EvmConfig = {
os: "evm",
chainId: 56,
isSelfTransaction: true,
};
const inscriber = Inscriber.from(configuration);
// or
//inscriber.connectSignerFromPrivateKey("YOUR PRIVATE");
inscriber.connectSignerFromMnemonic("YOUR MNEMONIC");
const strategy: Strategy = {
maxConcurrentRequests: 5,
statusToWait: "requested",
};
const onescription = new Onescription(inscriber, strategy);
const inscription = `data:,{"p":"bsc-20","op":"mint","tick":"bnbs","amt":"1000"}`;
// or
// const inscription: Inscription = { p: "bsc-20", op: "mint", tick: "bnbs", amt: "1000" };
for (;;) {
await onescription.inscribe(inscription);
}
Cosmos:
Injective
const configuration: CosmosConfig = {
os: "cosmos",
prefix: "inj",
isSelfTransaction: true,
};
const inscriber = Inscriber.from(configuration);
inscriber.connectSignerFromMnemonic("YOUR MNEMONIC");
const strategy: Strategy = {
maxConcurrentRequests: 2,
statusToWait: "submitted",
// The $INJS introduction is available in this link
// https://docs.injs.ink/mint-injs
predicate: async (provider: ChainInfoProvider) => {
const blockHeight = await provider.getBlockHeight();
console.log("current block height:", blockHeight);
const rounds = [
[55051600, 55053100],
[55094800, 55096300],
[55138000, 55139500],
[55181200, 55182700],
[55224400, 55225900],
[55267600, 55269100],
[55310800, 55312300],
[55354000, 55355500],
];
return (
undefined !==
rounds.find(([start, end]) => start <= blockHeight && blockHeight <= end)
);
},
};
const onescription = new Onescription(inscriber, strategy);
const inscription = { p: "injrc-20", op: "mint", tick: "INJS", amt: "1000" };
for (;;) {
await onescription.inscribe(inscription);
}
To use in web application
const configuration: EvmConfig = {
os: "evm",
chainId: 56,
isSelfTransaction: true,
};
const inscriber = Inscriber.from(configuration);
const signer = new ethers.providers.Web3Provider(window.ethereum).getSigner();
inscriber.connectSigner(signer);
const inp: Inscription = { p: "bsc-20", op: "mint", tick: "bnbs", amt: "1000" };
await inscriber.inscribe(inp);
0.1.24
2 years ago
0.1.23
2 years ago
0.1.22
2 years ago
0.1.21
2 years ago
0.1.20
2 years ago
0.1.19
2 years ago
0.1.18
2 years ago
0.1.17
2 years ago
0.1.16
2 years ago
0.1.15
2 years ago
0.1.14
2 years ago
0.1.13
2 years ago
0.1.12
2 years ago
0.1.11
2 years ago
0.1.10
2 years ago
0.1.9
2 years ago
0.1.8
2 years ago
0.1.7
2 years ago
0.1.6
2 years ago
0.1.5
2 years ago
0.1.4
2 years ago
0.1.3
2 years ago
0.1.2
2 years ago
0.1.1
2 years ago
0.1.0
2 years ago
0.0.9
2 years ago
0.0.8
2 years ago
0.0.7
2 years ago
0.0.6
2 years ago
0.0.5
2 years ago
0.0.4
2 years ago
0.0.3
2 years ago
0.0.2
2 years ago
0.0.1
2 years ago