1.0.1 • Published 1 year ago
@contextprotocol/greenfield v1.0.1
contextv3-storage-bnb
Create a BNB account
- Create an account and get the address.
ts-node scripts/account.ts
new account created
Public key = 0xpubkey
Private key = 0xprivkey
You will get an address.
Add test tokens tBNB : https://docs.bnbchain.org/docs/bsc-faucet/
Bridge the tokens to BNB Greenfield : https://greenfield.bnbchain.org/en/bridge?type=transfer-in
Test the account
ts-node scripts/account.ts 0xpubKey
Account exists with 0.3tBNB ibn the Greenfield testnet
- Create a Bucket
ts-node scripts/bucket.ts 0xprivKey <bucketName>
Bucket create with ID: bucketId
Integrate Storage_Greenfield
The write function after init
const storage = new StorageGreenfield({privKey, bucketId})
will write to the bucket using the hash of the data rpovided.