WC JSON-RPC for Everscale
Everscale JSON-RPC Methods
ever_sign
Signature of a random message for authentication.
Parameters:
- message - some message in base64;
- withSignatureId - bool or number
- hashData - bool
Returns:
- signature - string signature in base64;
- pubkey - public key of the wallet’s address;
Example:
ever_sendMessage
Creates message, sends it to the network, monitors its processing and returns transaction’s id.
Parameters:
- value - amount of coins attached to the message;
- bounce - should the answer message be generated in case of an error;
- destAddress - message destination address;
- destPayload - message destination payload; 4.1. abi - destination contract ABI; 4.2. method - destination contract method; 4.3. params - destination contract method params
Returns:
- txId - transaction’s id in blockchain;
Example:
ever_signMessage
Message that can then be sent to the blockchain.
Parameters:
- value - amount of coins attached to the message;
- bounce - should the answer message be generated in case of an error;
- destAddress - message destination address;
- destPayload - message destination payload; 4.1. abi - destination contract ABI; 4.2. method - destination contract method; 4.3. params - destination contract method params
Returns:
- signedExtMessage - signed external message;
- expireAt - message expiration timestamp
Example:
ever_sendExternalMessage
Sends an external message to the contract.
Parameters:
- destAddress - message destination address;
- destPayload - message destination payload; 2.1. abi - destination contract ABI; 2.2. method - destination contract method; 2.3. params - destination contract method params
Returns:
- txId - transaction’s id in blockchain;
Example:
ever_broadcastMessage
Sends an internal message from the user account without waiting for the transaction.
Parameters:
- value - amount of coins attached to the message;
- bounce - should the answer message be generated in case of an error;
- destAddress - message destination address;
- destPayload - message destination payload; 4.1. abi - destination contract ABI; 4.2. method - destination contract method; 4.3. params - destination contract method params
Returns:
- hash: string - external message hash;
- account: string - destination account address (equals to source_address);
- expireAt: number - message expiration timestamp
Example:
ever_broadcastExternalMessage
Sends an external message to the contract without waiting for the transaction.
Parameters:
- destAddress - message destination address;
- destPayload - message destination payload; 2.1. abi - destination contract ABI; 2.2. method - destination contract method; 2.3. params - destination contract method params
Returns:
- hash: string - external message hash;
- account: string - destination account address (equals to source_address);
- expireAt: number - message expiration timestamp
Example:
ever_addTokenAsset
Adds asset (TIP-3 or native tokens) to the selected account.
Parameters:
- rootContract - asset root address. Note: you can add native coin by leaving this field empty
Returns:
- newAsset: bool - returns true if the account did not have this asset before
Example:
ever_encryptData
Encrypts arbitrary data with specified algorithm for each specified recipient.
Parameters:
- recipientPublicKeys - public keys of recipients. Hex encoded;
- algorithm - encryption algorithm. Currently supports only “ChaCha20Poly1305”
- data - base64 encoded data;
Returns:
- encryptedData - encrypted data for each recipient 1.1. algorithm - encryption algorithm 1.2. sourcePublicKey - hex encoded encryptor’s public key 1.3. recipientPublicKey - hex encoded recipient public key 1.4. data - base64 encoded data 1.5. nonce - base64 encoded nonce
Example:
ever_decryptData
Decrypts encrypted data.
Parameters:
- algorithm - encryption algorithm. Currently supports only “ChaCha20Poly1305”
- recipientPublicKey - hex encoded recipient public key
- data - base64 encoded data
- nonce - base64 encoded nonce
Returns:
- data - base64 encoded decrypted data