Pirichain Smart Scenarios Documentation
  • ➰Pirichain Smart Scenario (PSce)
  • đŸ§ŋWhich Industries can use easily PSces?
  • â™Ĩī¸Full Support Interoperability!
  • ➰General Structure of Smart Scenarios
  • ➰PSce Working Principles And Limitations
  • ➰PSce Constants
  • ➰PSce Accumulator Object
  • ➰Simple Usage PSce
  • ➰Generating a new transaction though PSce
  • ➰What will i have if i execute a PCse
  • 💲Operation Costs
  • 🔐Double Protect! your client assets are in safe with addition authenticator code
  • 🛑Avoid these methods and situations in PSce
  • âžŋPSce Functions
    • 🏁sendPIRI
    • 🏁sendToken
    • 🏁pushData
    • 🏁getBalance
    • 🏁getBalanceList
    • 🏁getPureTransaction
    • 🏁getTransaction
    • 🏁listPoolTransactions
    • 🏁findData
    • 🏁findDataWithAddress
    • 🏁findDataWithValue
      • 🏁findDataUpperThanValue
      • 🏁findDataLowerThanValue
    • 🏁getRandom
    • 🌏getData
    • 🌎postData
    • 🔓generateAuthenticator
    • 🔓verifyAuthenticator
    • 🔓getMyAuthenticatorToken
    • ❓Validators
    • 🔔Examples
      • 🍁Get PSce owner wallet balance
      • 🍁sendToken Example
      • 🍁EVM based similar approach- Token Management With PSDATA
      • 🍁Connect to EXTERNAL ENVIRONMENTS!
      • 🍁Time Based Inheritor Example
      • 🍁Token Example with Ticket Operation
      • 🍁A sample about token vesting
      • 🍁Asset Management Of Share Holders using with PSce
      • 🍁Double Protect your assets using with Pirichain Authenticator Factor
      • 🍁What an easy to build up your metaverse planet in Pirichain!
      • 🍁A new approach dependency factor using with PSce
      • 🍁Advanced Operation - Withdraw All Your Asset From PCse
      • 🍁Task Diversification and Transaction Proof (TDTP)
      • 🍁A Sample of using Origin Flag Integration on Binance Smart Chain Network.
      • 🍁Deposit/Withdraw from Foreign Chain (BSC) and Add Order , Buy and Sell Token, Just a 277 Code Lines!
      • 🍁Pirichain Decentralized Exchange (DEX) Sample Full Codes
Powered by GitBook
On this page
  1. PSce Functions

pushData

pushData Method allows to store customized data pattern in blocknetwork

PrevioussendTokenNextgetBalance

Last updated 1 year ago

  const result=await Transaction.pushData(<MyObjectStringFormat:string>,<address:Base58>);

It has been syntax usage explained above. And we can make a sample below.

const myData=[
                {key:'myKey1',value:'myValue Data',enc:0},
                {key:'myKey2',value:'myValue Data2',enc:0},
                {key:'myKey3',value:'mySecretValue',enc:1},
                {key:'mySecretKey',value:'mySecretValue2',enc:2}
                ];
                
const result=await Transaction.pushData(JSON.stringify(myData),<address>);

As we see that above sample. user can store an array in Pirichain network though PCse.

key : Define a identification property,

value : Define a providing value in your model.

enc : Encryption Level

Response :

{
    "executedResult":{},
    "error":0,
    "tx":"a3449d13cc98521e2711f4f033d99f93876c507739774986e08f0574a89e7d9d",
    "sign":"3045022054d25f4efa52bcf785588c5ad49f60d06955f01476a7de41bd5c6a4893d980e1022100d214cb6a377813b392847532ebaa85bc7f7ca9d99ab12003be5471471e3b3a7d",
    "timeStamp":1705185353375
}

âžŋ
🏁
â„šī¸
â„šī¸
â„šī¸