@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
Returns
ShieldNote
Properties
masterPublicKey
readonlymasterPublicKey:bigint
Defined in: vendor/railgun-engine/dist/note/shield-note.d.ts:4
random
readonlyrandom:string
Defined in: vendor/railgun-engine/dist/note/shield-note.d.ts:5
value
readonlyvalue:bigint
Defined in: vendor/railgun-engine/dist/note/shield-note.d.ts:6
tokenData
readonlytokenData:TokenData
Defined in: vendor/railgun-engine/dist/note/shield-note.d.ts:7
tokenHash
readonlytokenHash:string
Defined in: vendor/railgun-engine/dist/note/shield-note.d.ts:8
notePublicKey
readonlynotePublicKey:bigint
Defined in: vendor/railgun-engine/dist/note/shield-note.d.ts:9
Methods
getShieldPrivateKeySignatureMessage()
staticgetShieldPrivateKeySignatureMessage():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()
staticgetNotePublicKey(masterPublicKey,random):bigint
Defined in: vendor/railgun-engine/dist/note/shield-note.d.ts:16
Parameters
masterPublicKey
bigint
random
string
Returns
bigint
getShieldNoteHash()
staticgetShieldNoteHash(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()
staticdecryptRandom(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