0.3.0 • Published 7 months ago
@cedric42/sdk v0.3.0
@cedric42/sdk
SDK Installation
NPM
npm add @cedric42/sdk
Yarn
yarn add @cedric42/sdk
SDK Example Usage
import { Cedric } from "@cedric42/sdk";
(async () => {
const sdk = new Cedric({
startonApiKey: "",
});
const res = await sdk.data.getBalance({
address: "164 Runolfsson Via",
network: "string",
});
if (res.statusCode == 200) {
// handle response
}
})();
Available Resources and Operations
data
- getBalance - Get native balance
- getErc20Balance - Get erc20 balance
- getGasPrice - Get gas price
ipfs
- delete - Delete a pin
- getAll - Get all files
- getOne - Get a file
- getStorageUsed - Get storage used
- pinExistingFile - Pin a file already on IPFS
- update - Update a file name/metadata
- uploadFile - Upload a file
- uploadFolder - Upload a folder
- uploadJson - Upload a json
kms
- create - Create a kms
- delete - Delete a kms
- getAll - Get all kms
- getOne - Get a kms
- update - Update a kms
monitor
- create - Create a watcher
- delete - Delete a watcher
- getAll - Get all watcher
- getAllEvents - Get all events
- getOne - Get a watcher
- getOneEvent - Get a watcher event
- update - Update a watcher
network
- create - Create a network (enterprise)
- delete - Delete a network (enterprise)
- getAll - Get all networks
- getOne - Get a network
- update - Update a network (enterprise)
network.rpc
- create - Add a rpc (enterprise)
- delete - Delete a rpc (enterprise)
- getAll - Get all rpc (enterprise)
- getOne - Get a rpc (enterprise)
- update - Update a rpc (enterprise)
smartContractManagement
- call - Call smart contract
- delete - Delete a smart contract
- deployFromBytecode - Deploy from bytecode (your own contract)
- deployFromTemplate - Deploy from template
- getAll - Get all smart contract
- getFunctions - Get functions & events
- getOne - Get a smart contract
- importExisting - Import existing contract
- read - Read smart contract
- update - Update a smart contract
transactionManager
- create - Create a transaction
- getAll - Get all transactions
- getAvailableNonces - Get available nonce for a wallet
- getOne - Get a transaction
- resyncNonce - Resync nonce for a wallet
transactionManager.setting
wallet
- create - Create a wallet
- delete - Delete a wallet
- getAll - Get all wallet
- getOne - Get a wallet
- import - Import a wallet
- requestFaucet - Request faucet
- resyncNonce - Resync nonce for a wallet
- sign - Sign a message
- update - Update a wallet
webhook
- cancel - Cancel a webhook
- getAll - Get all webhooks
- getOne - Get a webhook
- getSigningSecret - Get signing secret
- regenerateSigningSecret - Regenerate signing secret
- resend - Resend a webhook
project.member
project.member.invitation
smartContract.template
Development
Maturity
This SDK is in beta, and there may be breaking changes between versions without a major version update. Therefore, we recommend pinning usage to a specific package version. This way, you can install the same version each time without breaking changes unless you are intentionally looking for the latest version.
Contributions
While we value open-source contributions to this SDK, this library is generated programmatically. Feel free to open a PR or a Github issue as a proof of concept and we'll do our best to include it in a future release!