Skip to main content

Token

o1js / Modules / Token

Class: Token

Deprecated

use TokenId instead of Token.Id and TokenId.derive() instead of Token.getId()

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new Token(«destructured»)

Parameters

NameType
«destructured»Object
› parentTokenId?Field
› tokenOwnerPublicKey

Defined in

lib/account_update.ts:635

Properties

id

Readonly id: Field

Defined in

lib/account_update.ts:632


parentTokenId

Readonly parentTokenId: Field

Defined in

lib/account_update.ts:633


tokenOwner

Readonly tokenOwner: PublicKey

Defined in

lib/account_update.ts:634


Id

Static Id: Object = TokenId

Type declaration

NameType
check(x: Field) => void
defaultField
fromFields(x: Field[], aux: any[]) => Field
toAuxiliary(x?: Field) => any[]
toFields(x: Field) => Field[]
toInput(x: Field) => { fields?: Field[] ; packed?: [Field, number][] }
derive(tokenOwner: PublicKey, parentTokenId: Field) => Field
emptyValue() => Field
fromBase58(base58: string) => Field
fromJSON(x: string) => Field
sizeInFields() => number
toBase58(t: Field) => string
toJSON(x: Field) => string

Defined in

lib/account_update.ts:626

Methods

getId

Static getId(tokenOwner, parentTokenId?): Field

Parameters

NameTypeDefault value
tokenOwnerPublicKeyundefined
parentTokenIdFieldTokenId.default

Returns

Field

Defined in

lib/account_update.ts:628