1.0.1 • Published 1 year ago

@contextprotocol/greenfield v1.0.1

Weekly downloads
-
License
-
Repository
-
Last release
1 year ago

contextv3-storage-bnb

Create a BNB account

  1. 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.

  1. Add test tokens tBNB : https://docs.bnbchain.org/docs/bsc-faucet/

  2. Bridge the tokens to BNB Greenfield : https://greenfield.bnbchain.org/en/bridge?type=transfer-in

  3. Test the account

ts-node scripts/account.ts 0xpubKey
Account exists with 0.3tBNB ibn the Greenfield testnet
  1. 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.