Skip to content

@armada/sdk / core / ShieldNote

Abstract Class: ShieldNote ​

Defined in: vendor/railgun-engine/dist/note/shield-note.d.ts:3

Extended by ​

Constructors ​

Constructor ​

new ShieldNote(masterPublicKey, random, value, tokenData): ShieldNote

Defined in: vendor/railgun-engine/dist/note/shield-note.d.ts:10

Parameters ​

masterPublicKey ​

bigint

random ​

string

value ​

bigint

tokenData ​

TokenData

Returns ​

ShieldNote

Properties ​

masterPublicKey ​

readonly masterPublicKey: bigint

Defined in: vendor/railgun-engine/dist/note/shield-note.d.ts:4


random ​

readonly random: string

Defined in: vendor/railgun-engine/dist/note/shield-note.d.ts:5


value ​

readonly value: bigint

Defined in: vendor/railgun-engine/dist/note/shield-note.d.ts:6


tokenData ​

readonly tokenData: TokenData

Defined in: vendor/railgun-engine/dist/note/shield-note.d.ts:7


tokenHash ​

readonly tokenHash: string

Defined in: vendor/railgun-engine/dist/note/shield-note.d.ts:8


notePublicKey ​

readonly notePublicKey: bigint

Defined in: vendor/railgun-engine/dist/note/shield-note.d.ts:9

Methods ​

getShieldPrivateKeySignatureMessage() ​

static getShieldPrivateKeySignatureMessage(): string

Defined in: vendor/railgun-engine/dist/note/shield-note.d.ts:15

Used to generate a shieldPrivateKey by signing this message with public wallet. After shielding, the shieldPrivateKey can then be used to get the 0zk address of the receiver.

Returns ​

string


getNotePublicKey() ​

static getNotePublicKey(masterPublicKey, random): bigint

Defined in: vendor/railgun-engine/dist/note/shield-note.d.ts:16

Parameters ​

masterPublicKey ​

bigint

random ​

string

Returns ​

bigint


getShieldNoteHash() ​

static getShieldNoteHash(notePublicKey, tokenHash, valueAfterFee): bigint

Defined in: vendor/railgun-engine/dist/note/shield-note.d.ts:17

Parameters ​

notePublicKey ​

bigint

tokenHash ​

string

valueAfterFee ​

bigint

Returns ​

bigint


decryptRandom() ​

static decryptRandom(encryptedBundle, sharedKey): string

Defined in: vendor/railgun-engine/dist/note/shield-note.d.ts:18

Parameters ​

encryptedBundle ​

[string, string, string]

sharedKey ​

Uint8Array

Returns ​

string


serialize() ​

serialize(shieldPrivateKey, receiverViewingPublicKey): Promise<ShieldRequestStruct>

Defined in: vendor/railgun-engine/dist/note/shield-note.d.ts:25

Gets JSON serialized version of note

Parameters ​

shieldPrivateKey ​

Uint8Array

receiverViewingPublicKey ​

Uint8Array

Returns ​

Promise<ShieldRequestStruct>

serialized note