# Fanzeal BAM

Fanzeal BAM (Fanzeal Blockchain Asset Management) consists of several toolkits that work around the Fanzeal Blockchain SDK (FzSDK). These toolkits include the fzap plugins for integration into the fzap platform to refine and enhance on-chain data.

# Feature

Here are some key hurdles we're currently facing in our development process:

  • Fanzeal BAM serves as the AdminUI of FzSDK.
  • It enhances various aspects of blockchain data, including adding metadata, internationalization (i18n), and more.
  • As a middle layer, it improves performance by optimizing the interaction between clients and blockchain data.
  • Provide a high-level TypeScript SDK for communicating with the Rell blockchain

# Installation

You may configure the settings to install plugin.

@Module({
  imports: [
    BamModule.ForRoot({
      dataSourceName: dataSourceSupport.MONGO_DB,
      nodeUrlPool: process.env.public_blockchain_node_url_pool ?? '',
      blockchainRid: process.env.public_blockchain_rid ?? '',
      adminWalletSecretKey: process.env.admin_wallet_private_key ?? '',
    })
  ]
})

Additionally, you can supply custom metadata using a TypeBox schema.

    FanzealBAMModule.enableOffchainMetadata([
      {
        targetResource: BAMType.PERK,
        jsonSchema: Type.Object({
          isRedeemable: Type.Optional(Type.Boolean()),
          status: Type.Optional(
            Type.Boolean({ title: 'Active', default: true }),
          ),
        }),
      },
      {
        targetResource: BAMType.BADGE,
        jsonSchema: Type.Object({
          category: Type.Optional(
            Type.String({
              enum: ['SQUAD', 'QUIZ', 'COLLECTION', 'MEMBERSHIP'],
              title: 'Category',
            }),
          ),
          rarity: Type.Optional(
            Type.String({
              enum: ['Bronze', 'Silver', 'Gold'],
              title: 'Rarity',
            }),
          ),
          tags: Type.Optional(Type.Array(Type.String(), { title: 'Tags' })),
        }),
      },
      {
        targetResource: BAMType.CARD,
        jsonSchema: Type.Object({
          status: Type.Optional(
            Type.Boolean({ title: 'Active', default: true }),
          ),
        }),
      },
      {
        targetResource: BAMType.RAFFLE,
        jsonSchema: Type.Object({
          status: Type.Optional(
            Type.String({
              enum: ['ACTIVE', 'INACTIVE', 'FINALIZE'],
              title: 'Status',
            }),
          ),
        }),
      },
      {
        targetResource: BAMType.PACK,
        jsonSchema: Type.Object({
          image: Type.String(),
          name: Type.String(),
          description: Type.Optional(Type.String()),
          status: Type.Optional(
            Type.Boolean({ title: 'Active', default: true }),
          ),
        }),
      },
    ]),