Skip to content

@armada/sdk / core / ShieldNoteERC20

Class: ShieldNoteERC20 ​

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

Extends ​

Constructors ​

Constructor ​

new ShieldNoteERC20(masterPublicKey, random, value, tokenAddress): ShieldNoteERC20

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

Parameters ​

masterPublicKey ​

bigint

random ​

string

value ​

bigint

tokenAddress ​

string

Returns ​

ShieldNoteERC20

Overrides ​

ShieldNote.constructor

Properties ​

masterPublicKey ​

readonly masterPublicKey: bigint

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

Inherited from ​

ShieldNote.masterPublicKey


random ​

readonly random: string

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

Inherited from ​

ShieldNote.random


value ​

readonly value: bigint

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

Inherited from ​

ShieldNote.value


tokenData ​

readonly tokenData: TokenData

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

Inherited from ​

ShieldNote.tokenData


tokenHash ​

readonly tokenHash: string

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

Inherited from ​

ShieldNote.tokenHash


notePublicKey ​

readonly notePublicKey: bigint

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

Inherited from ​

ShieldNote.notePublicKey

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

Inherited from ​

ShieldNote.getShieldPrivateKeySignatureMessage


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

Inherited from ​

ShieldNote.getNotePublicKey


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

Inherited from ​

ShieldNote.getShieldNoteHash


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

Inherited from ​

ShieldNote.decryptRandom


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

Inherited from ​

ShieldNote.serialize