Skip to main content

group

Adds an asset to a group. A group is represented by an asset with the Grouping extension.

Accounts

Below is the list of accounts expected by the group instruction.

NameWritableSignerOptionalDescription
assetInitialized asset account
groupAsset account of the group
authorityAuthority of the assets

The instruction expects that both asset and group authorities match and it will fail otherwise. The signing authority must be the authority of the group or the Grouping extension delegate.

Arguments

None.

Examples

import { group } from '@nifty-oss/asset';

// Accounts:
// - asset: PublicKey
// - group: PublicKey
// - authority: KeypairSigner
await group(umi, {
asset,
group,
authority
}).sendAndConfirm(umi);