Maple
  • Welcome to Maple
  • Maple for Lenders
    • Introduction
    • Lending
    • Defaults and Impairments
    • Margin Calls and Liquidations
    • Risk
    • Withdrawal Process
  • syrupUSDC for Lenders
    • Powered by Maple
    • Lending in syrupUSDC and syrupUSDT
    • Commitments
    • Drips Rewards
    • Withdrawals
    • Monthly Updates
    • Pendle Integration
  • SyrupUSDC Rewards Prize Draw Program Summary
  • FAQ
  • Maple for Borrowers
    • Introduction
    • Loan Management
  • Maple for Token Holders
    • Introduction to SYRUP
      • MPL to SYRUP Conversion
      • FAQs
    • SYRUP Tokenomics
      • Staking
      • Staking Smart Contract Details
    • Governance and Voting
    • Drips Rewards
    • Research and Media
      • Podcasts
      • News Articles
      • TV Segments
      • Research Reports
      • Data Dashboards
    • Additional Resources
  • Technical Resources
    • Protocol Overview
      • Background
      • Protocol Actors
      • Smart Contract Architecture
      • Glossary
      • Smart Contract Addresses
      • Fees
      • Composability
      • Proxies and Upgradeability
    • Security
      • Security
      • List of Assumptions
      • External Entry Points
      • Emergency Protocol Pause
      • Protocol Invariants
      • Test Report
    • Loans
      • Loans
      • Fixed Term Loans
      • Open Term Loans
      • Refinancing
      • Impairments
      • Defaults
    • Pools
      • Pools
      • Pool Creation
      • PoolManager
      • PoolDelegateCover
      • Accounting
        • Pool Accounting
        • Pool Exchange Rates
    • Strategies
      • Fixed Term Loan Manager
        • Overview
        • Claims
        • Advance Payment Accounting
        • Accounting Examples
      • Open Term Loan Manager
      • DeFi Strategies
    • Withdrawal Managers
      • WithdrawalManager (Cyclical)
      • WithdrawalManager (Queue)
    • Singletons
      • Globals
      • MapleTreasury
      • Oracles
      • Pool Permission Manager
    • Admin Functions
      • Governor Admin Actions
        • Operational Admin Actions
      • Pool Delegate Admin Actions
      • Timelocks
    • Operations
      • Protocol Deployment
      • Open Term Loan Deployment
      • December 2023 Deployment & Upgrade Procedure
      • Strategies Release Deployment Procedure
    • Interfaces
      • FixedTermLoan
      • FixedTermLoanFactory
      • FixedTermLoanFeeManager
      • FixedTermLoanInitializer
      • FixedTermLoanManager
      • FixedTermLoanManagerFactory
      • FixedTermLoanManagerInitializer
      • FixedTermLoanRefinancer
      • Globals
      • Liquidator
      • LiquidatorFactory
      • LiquidatorInitializer
      • OpenTermLoan
      • OpenTermLoanFactory
      • OpenTermLoanInitializer
      • OpenTermLoanManager
      • OpenTermLoanManagerFactory
      • OpenTermLoanManagerInitializer
      • OpenTermLoanRefinancer
      • Pool
      • PoolDelegateCover
      • PoolDeployer
      • PoolManager
      • PoolManagerFactory
      • PoolManagerInitializer
      • PoolPermissionManager
      • WithdrawalManager (Cyclical)
      • WithdrawalManagerFactory (Cyclical)
      • WithdrawalManagerInitializer (Cyclical)
      • WithdrawalManager (Queue)
      • WithdrawalManagerFactory (Queue)
      • WithdrawalManagerInitializer (Queue)
    • SYRUP Token
      • Architectural Overview
      • Base ERC20 Structure
      • Upgradability
      • Modules
      • Time Locks
      • Recapitalization Module
      • Emergency Module
      • Deployment and Migration Procedure
    • GraphQL API
    • SDK
      • Introduction
      • Installation
      • Protocol Actors
      • Usage Guide
  • Troubleshooting & Support
    • Intercom
  • Maple 1.0
    • Access to deprecated Maple 1.0
  • Legal
    • Borrower MLA
    • KYC
    • Interface Terms of Use
    • Privacy Policy
    • syrupUSDC and syrupUSDT - Risks
    • syrupUSDC and syrupUSDT - Defaults and Impairments
    • syrupUSDC and syrupUSDT - Available Jurisdictions
    • Interface Terms of Use [syrupUSDC and syrupUSDT]
    • Interface Terms of Use [Syrup.fi/convert/ and Syrup.fi/stake/]
    • syrupUSDC and syrupUSDT- Privacy Policy
    • SyrupUSDC Rewards Prize Draw Terms & Conditions
Powered by GitBook
On this page
  • Introduction
  • Exports
  • Addresses
  • TypeChain
  • Types
  1. Technical Resources
  2. SDK

Introduction

Introduction

maple-js is a powerful and user-friendly JavaScript SDK designed for seamless interaction with Maple Protocol's smart contracts on the Ethereum blockchain. This SDK provides developers with essential tools to easily integrate with the Maple Protocol ecosystem, streamlining the process of connecting to the blockchain, managing accounts, submitting transactions, and handling events generated by smart contracts.

By utilizing the JavaScript SDK for Maple Protocol, developers can efficiently build robust and secure dApps that unlock the full potential of Maple Protocol's smart contracts, encouraging innovation and promoting the adoption of decentralized finance solutions.

Whether you're developing backend services, frontend applications, or a combination of both, the Maple SDK offers the tools necessary for a smooth user experience.

Exports

Addresses

Export
Purpose

addresses

Contains the contract addresses for the Maple Protocol on different networks (mainnet & Sepolia testnet)

TypeChain

maple-js exports are provided via TypeChain - convenient and error-resistant way for developers to call smart contract functions, ensuring a smoother integration with Maple Protocol's ecosystem.

TypeChain exports are automatically generated TypeScript bindings for Ethereum smart contracts. These bindings make it easier for developers to interact with smart contracts by providing type-safe methods for contract functions. This means that developers can leverage TypeScript's type-checking and autocomplete features, reducing the likelihood of errors and improving the overall development experience.

Export
Purpose

bPool

Manages Balancer liquidity pool functionality

erc20

Standard ERC20 token contract functionality

fixedTermLoanManager

Manages fixed-term loan creation and management functionality

loanManager

Manages loan creation and management functionality

loanV5

Implements loan v5 functionality

mapleGlobalsV2

Manages global settings and configurations for Maple Protocol (version 2)

mapleGlobalsV2V2

Manages global settings and configurations for Maple Protocol (version 2.2)

mapleToken

Implements the Maple Protocol token functionality

openTermLoan

Implements open-term loans functionality

openTermLoanManager

Manages open-term loan creation and management functionality

poolManager

Manages pool creation and management functionality

poolManagerV2

Manages pool creation and management functionality (version 2)

poolV2

Manages liquidity pools in the Maple Protocol ecosystem (version 2)

withdrawalManager

Manages withdrawal functionality in the Maple Protocol ecosystem

xmpl

Implements the XMPL token functionality

Depending on the smart contract package structure, the SDK export might include different properties, such as core, factory, initializer, deployer, which can be accessible through the export. For example, the openTermLoan export includes the following properties:

const openTermLoan = {
  core: MapleLoan__factory,
  factory: MapleLoanFactory__factory,
  initializer: MapleLoanInitializer__factory,
};

Types

Export
Purpose

ContractTypes

Enumerates different contract types in the Maple Protocol ecosystem

MapleAddressMapping

Mapping of contract addresses to their respective types in the Maple Protocol ecosystem

PreviousSDKNextInstallation

Last updated 7 months ago