Zebec Network
  • 💰Zebec Network
  • ➡️ZBC to ZBCN Migration Guide
  • 🗞️Zebec Network white Paper
  • 📈ZBCN Tokemonics
  • 🥳Getting Started
    • How to get started?
    • Benefits of Using Zebec Protocol
    • Deposit
    • Start Streaming
    • Withdraw Funds
  • 👾Safe
    • Create Safe
    • Deposit in Safe
    • Sending a Transaction
    • Zapps
    • Signing a Transaction
  • ZEBEC SOLANA
    • 🖥️Zebec Solana Sdk
      • 🖱️Streaming
        • Initialize Zebec Stream
        • Create Fee Vault
        • Update Fee Vault
        • Collect Fees
        • Deposit
        • Withdraw Deposited Token
        • Start Streaming
        • Pause Stream
        • Resume Stream
        • Cancel Stream
        • Withdraw Streamed Token
  • ZEBEC SILVER CARD
    • 💳Silver Card Sdk
      • 🔧Installation
      • 👨‍🚀Quick Start
      • ✉️Fetch Quote
      • ⚖️Configuration Parameters
      • 📦Recipient Fields
      • 🔁Responses
      • 🔢Environment Variables
      • 🌎Supported Countries
  • Zebec Bridge
    • Bridge Sdk
      • Creating clients
      • Initialize Proxy Account
      • Initialize Token Account
      • Deposit
        • Token Transfer
        • Deposit to Zebec
      • Withdraw Deposited
        • Withdraw From Zebec
        • Token Transfer
      • Init Stream
      • Pause/Resume Stream
      • Cancel Stream
      • Update Stream
  • Zebec Near
    • Zebec Near Sdk
      • Normal Stream
        • Initialize Near Stream
        • Initialize Token Stream
        • Pause/Resume Stream
        • Withdraw Stream
        • Update Stream
        • Cancel Stream
        • Claim Stream
        • View methods
      • Multisig Factory
        • Create Multisig Account
      • Multisig Stream
        • Initialize Near Stream
        • Initialize Token Stream
        • Pause/Resume Stream
        • Withdraw Stream
        • Update Stream
        • Cancel Stream
        • Claim Stream
        • View methods
  • ZEBEC EVM
    • Zebec Evm Sdk
      • Zebec Stream Client
        • Creating Clients
        • Whitelisting Tokens
        • Deposit into Zebec Wallet
        • Withdraw from Zebec Wallet
        • Initiating a Stream
        • Pause/Resume/Cancel Stream
        • Updating a Stream
        • Withdraw Streamed Tokens
        • Getting Stream Details
        • Whitelisted Tokens on BSC and Nautilus
      • Zebec Bulk Client
        • Bulk Instant Transfer
      • Zebec Multisig Stream
        • NFT
    • Zapps Compatible
Powered by GitBook
On this page
  1. ZEBEC EVM
  2. Zebec Evm Sdk
  3. Zebec Multisig Stream

NFT

You have the capability to oversee and control your BEP-721 and BEP-1155 standard non-fungible tokens (NFTs) through a Zebec safe.

Usage

Initializing the ZebecMultisigStream

To use the ZebecMultisigStream class, you need to initialize an instance of it by providing a signer or provider and, optionally, the contract address. Here's how you can do that:

import { ZebecMultisigStream } from 'zebec-multisig-stream';

// Your Ethereum provider or signer
const providerOrSigner = ...;

// Optionally, specify the contract address (default is CORE_CONTRACT_ADDRESS)
const contractAddress = ...;

const zebecStream = new ZebecMultisigStream(providerOrSigner, contractAddress);

Depositing ERC-721 Tokens

The depositERC721 method allows you to deposit an ERC-721 token into a safe address. It takes the tokenId, tokenAddress, and safeAddress as parameters and returns a transaction response.

const tokenId = 123; // The ERC-721 token ID
const tokenAddress = '0x...'; // The ERC-721 token contract address
const safeAddress = '0x...'; // The destination safe address

const transactionResponse = await zebecStream.depositERC721(tokenId, tokenAddress, safeAddress);
console.log(transactionResponse);

Depositing ERC-1155 Tokens

The depositERC1155 method allows you to deposit ERC-1155 tokens into a safe address. It takes the tokenId, tokenAddress, safeAddress, and amount as parameters and returns a transaction Response.

const tokenId = 123; // The ERC-1155 token ID
const tokenAddress = '0x...'; // The ERC-1155 token contract address
const safeAddress = '0x...'; // The destination safe address
const amount = 5; // The amount of tokens to deposit

const transactionResponse = await zebecStream.depositERC1155(tokenId, tokenAddress, safeAddress, amount);
console.log(transactionResponse);

Transferring ERC-721 Tokens

The transferERC721 method generates transaction data to transfer an ERC-721 token from a safe address to a recipient address. It takes the tokenId, tokenAddress, to, and safeAddress as parameters.

const tokenId = 123; // The ERC-721 token ID
const tokenAddress = '0x...'; // The ERC-721 token contract address
const to = '0x...'; // The recipient address
const safeAddress = '0x...'; // The source safe address

// The Safe SDK can utilize this transactionData to initiate and execute multi-signature transactions.
const transactionData = zebecStream.transferERC721(tokenId, tokenAddress, to, safeAddress);
console.log(transactionData); 

Transferring ERC-1155 Tokens

The transferERC1155 method generates transaction data to transfer ERC-1155 tokens from a safe address to a recipient address. It takes the tokenAddress, tokenIds, amounts, to, and safeAddress as parameters.

const tokenAddress = '0x...'; // The ERC-1155 token contract address
const tokenIds = [123, 456]; // An array of ERC-1155 token IDs
const amounts = [5, 10]; // An array of corresponding token amounts
const to = '0x...'; // The recipient address
const safeAddress = '0x...'; // The source safe address

// The Safe SDK can utilize this transactionData to initiate and execute multi-signature transactions.
const transactionData = zebecStream.transferERC1155(tokenAddress, tokenIds, amounts, to, safeAddress);
console.log(transactionData); 
PreviousZebec Multisig StreamNextZapps Compatible

Last updated 1 year ago