Back to Home
web2.blackbox.payload

Payload Encrypt / Decrypt

Encrypt a plaintext message, then decrypt it — all on one page. After encryption the results are auto-populated into the decrypt section.

Session required

Create a session first.

Encrypt Payload

The web2 wrapper automatically sets chainId = -1 and uses your session's signer.

const result = await web2.blackbox.payload.encryptPayload({
session, secretId: 42n, plaintext: 'Hello',
blackboxUrl, readClient,
});

Decrypt Payload

Provide the secret ID, CIFER envelope, and encrypted message to decrypt. These are auto-filled after encryption, or you can paste values manually.

const result = await web2.blackbox.payload.decryptPayload({
session, secretId: 42n,
encryptedMessage: '...', cifer: '...',
blackboxUrl, readClient,
});
// result.decryptedMessage → original plaintext

Console Output

Waiting for action...