aptos-example-generator
v1.0.4
Published
Aptos code generator based on ABI and source
Downloads
13
Readme
Aptos example generator
The library is used to generate example code to run/execute aptos module functions.
Installation
Requirements
Install with yarn
yarn add aptos-example-generator
Usage/Examples
Generate bash script
import { generateBashScript } from 'aptos-example-generator'
const bashScript = bashScriptGenerator({
moduleAddress: '0x1',
moduleName: 'coin',
functionABI: {
name: 'transfer',
visibility: 'public',
is_entry: true,
is_view: false,
generic_type_params: [''],
params: ['&signer', 'address', 'u64'],
return: [],
},
data: {
typeArgs: ['0x1::aptos_coin::AptosCoin'],
functionArgs: ['0x2a7d84720902c2610c55398f435c872da2cce343a4d147862ca77a4dddd52567', '1'],
},
})