JasperVault
JasperVault WebsiteLaunch APP
  • Welcome
    • Official Website
    • What is Jasper Vault?
      • Fees Structure
      • Platform Statistics
    • Referrals
    • Brand Logo & Guidelines
    • Fractal Jasper NFT
  • Degen Options
    • Overview
    • Advantage
    • For Traders
      • User Guide
      • Rewards
      • Leaderboard
      • FAQ
    • For Liquidity Provider
      • Fees Structure
    • Smart Contracts
  • development
    • Github
    • Release-Notes
    • Architecture
      • Option Orders Issuance and Exercise
        • EVM Scenario
        • BTC Scenario
      • Option Offering and Buying Flow
      • Trade Settlement
      • Oracle - Pyth
    • Building Blocks
      • Account Abstraction (EVM)
      • Program Derived Addresses (Solana)
      • Jasper Chain (BTC)
    • Deployed Smart Contracts
      • Arbitrum
      • BASE
      • Bitlayer
      • Sei EVM
    • Interfaces & ABI
    • JasperVault SDK
      • Overview
      • Vault Management
      • Option Trading
    • Order Process and Signature Steps
  • SUPPORT
    • Tutorials
      • 💹 Jasper Vault Explained: How to Profit with Options
      • ↕️ Degen Options: A Step-by-Step Guide
      • 🌐 0DTE Options: A Step-by-Step Guide
      • 📚 BitStone: A Step-by-Step Guide
      • 🖥️ Jasper Pro (Leverage): A Step-by-Step Guide to Buying Options
      • ↖️↗️ Long Straddle Guide: Combo Trading on Jasper Pro (Leverage)
      • ✍️ Jasper Pro (Limit) — Introduction & Use Cases
      • 🔄 Moonlight Box Guide: DApp Trading Tool
      • 🟣 Power Stone Guide: BitStone Trading Tool
      • 🔴 Reality Stone Guide: BitStone Trading Tool
    • Tutorials (CN) 教程
      • 💹 Jasper Vault 期權如何盈利
      • ↕️ Degen Options 分步交易指南
      • 🌐 0DTE Options 分步交易指南
      • 📚 BitStone 分步交易指南
      • 🖥️ Jasper Pro (槓桿版) 买入期权分步指南
      • ↖️↗️ Straddle 策略教學 – Jasper Pro(槓桿版)
      • ✍️ Jasper Pro(限價版)— 功能簡介與應用策略
      • ⏪月光寶盒指南:DApp 交易工具
      • 🟣 力量宝石指南:BitStone 交易工具
      • 🔴 现实宝石指南:BitStone 交易工具
    • Video Guide
      • 📚 Jasper Vault DEGEN Options: Step-by-Step DApp Video Tutorial
      • ⏪ How to Use Moonlight Box - DApp Video Tutorial
  • Community
    • Social Media & Communities
  • About Us
    • Terms of Service
    • Vision & Mission
    • Roadmap
  • Security
    • Audit Reports
Powered by GitBook
On this page
  1. development
  2. JasperVault SDK

Vault Management

With Vault Management SDK, developers can use a library to manipulate and control Jasper vaults. They can perform actions such as initializing a vault, transferring an asset, or checking the vault's balance.

Function List

  • To initialize a new Jasper vault:

Method
Parameter Type
Error Message
  • To transfer the asset between the wallet and the vault:

    • Input two addresses (either wallet or vault), asset choices and an amount of asset to transfer.

    • If from == user's wallet address: Issue the asset from user's wallet to the vault

    • If to == user's wallet address: Redeem the asset from the vault to the user's wallet

Method
Parameter Type
Error Message
  • To get vault address under the specific wallet

    • Input a wallet address to get a vault address under the wallet as a return

Method
Parameter Type
Error Message
  • To get salt number under the specific vault

    • Input a vault address to get a salt number (ERC-4337 type)

    Method
    Parameter Type
    Error Message
  • To get address under the specific wallet and salt number

    • Input the wallet address and salt to get the address

    Method
    Parameter Type
    Error Message
  • To create a new account for vault

    • Input a wallet address and salt to create a new account

    Method
    Parameter Type
    Error Message
  • To manage option writer setting

    • Input a vault address and details to edit option writer settings

    Method
    Parameter Type
    Error Message
PreviousOverviewNextOption Trading

Last updated 10 months ago

initNewVault(type: number)
number: number;
'Error creating vault'
transfer(from: Address, to: Address, asset: Address[], amount: BigNumber[])
Address: string;
Address[]: string[];
BigNumber[]: bignumber[];
'Error transfering vault'
getWalletToVault(wallet: Address)
Address: string;
'Error initializing extensions'
getVaultToSalt(vault: Address)
Address: string;
'Error getting vault to salt'
getAddress(wallet: Address, salt: number)
Address: string;
number: number;
'Error getting address'
createAccount(wallet: Address, salt: number)
Address: string;
number: number;
'Error creating account'
setOptionWriterSettings(vault_addr: Address, settings: IOptionFacet.ManagedOptionsSettingsStruct)
Address: string;
IOptionFacet.ManagedOptionsSettingsStruct:
(
bool isOpen;
IOptionFacet.OrderType orderType;
address writer;
address lockAsset;
address underlyingAsset;
IOptionFacet.UnderlyingAssetType lockAssetType;
uint256 underlyingNftID;
IOptionFacet.LiquidateMode liquidateMode;
address strikeAsset;
uint256 maximum;
PremiumOracleType  premiumOracleType;
address[] premiumAssets;
uint64[]   productTypes;    // 1h=3600 2h=7200
uint256[]  premiumFloorUSDs;// 10u 15u
uint256[]  premiumRates; // 1.1 ether 0.9 ether
) 
'Error setOptionWriterSettings'