KrypCore Web3
PlatformSupportSDK
  • 👋Welcome to Krypcore Web3
  • Introduction
    • Overview
    • Product Architecture
    • Supported Networks
  • Product Overview
    • Key Concepts
    • Unified SDK / APIs
      • Benefits of a Unified Model
      • KrypCore Web3 SDK
      • KrypCore Web3 APIs
    • Infrastructure
      • Blockchain Endpoints
        • Adding network to Metamask
      • Storage Endpoints
      • DID Service Endpoints
    • Core Services
      • Wallets
        • Choosing the right wallet for your Dapp
        • Custodial Wallet
        • Self Managed Wallet
        • MPC Wallet
        • Developer Wallet
        • Smart Contract Wallet
      • Smart Contracts
        • Deploy from Templates
          • Templates Explained
            • ERC 20
            • ERC 721
            • ERC 1155
            • ERC20DAO Token
            • TokenERC20
        • Deploy your own contract
        • Deploy Contract
        • Load Contract
      • NFT
        • Creating a collection
        • Minting NFTs
      • FT
        • Creating an ERC-20 token
      • DIDs
      • Storage
    • Add on Services
      • Datalake
      • Gasless
        • Integration Steps
        • Considerations and Best Practices
  • API Reference
    • KCW3 APIs Explained
    • Infrastructure APIs
      • Ethereum JSON RPC APIs
        • eth_accounts
        • eth_blockNumber
        • eth_call
        • eth_chainId
        • eth_estimateGas
        • eth_feeHistory
        • eth_gasPrice
        • eth_getBalance
        • eth_getBlockByHash
        • eth_getBlockByNumber
        • eth_getBlockReceipts
        • eth_getBlockTransactionCountByHash
        • eth_getBlockTransactionCountByNumber
        • eth_getCode
        • eth_getFilterChanges
        • eth_getFilterLogs
        • eth_getLogs
        • eth_getProof
        • eth_getStorageAt
        • eth_getTransactionByBlockHashAndIndex
        • eth_getTransactionByBlockNumberAndIndex
        • eth_getTransactionByHash
        • eth_getTransactionCount
        • eth_getTransactionReceipt
        • eth_getUncleCountByBlockHash
        • eth_getUncleCountByBlockNumber
        • eth_hashrate
        • eth_maxPriorityFeePerGas
        • eth_mining
        • eth_newBlockFilter
        • eth_newFilter
        • eth_newPendingTransactionFilter
        • eth_signTransaction
        • eth_syncing
        • eth_uninstallFilter
        • eth_unsubscribe
        • eth_sendRawTransaction
        • net_listening
        • net_peerCount
        • net_version
        • txpool_content
        • txpool_inspect
        • txpool_status
        • web3_clientVersion
        • web3_sha3
      • IPFS HTTP Client APIs
        • How to
        • HTTP API methods
          • add
          • block_get
          • block_stat
          • cat
          • dag_get
          • dag_import
          • dag_put
          • dag_resolve
          • get
          • pin_add
          • pin_ls
          • pin_rm
          • pin_update
          • version
          • block_put
    • Core Service APIs
      • Wallet Manager APIs
        • Self Managed Wallet
          • Setup SM Wallet
          • Create Wallet
          • Get Wallet balance
          • Sign Message
          • Verifies Signature off chain
          • Deploy Contract
          • Submit Transaction
          • Estimating Gas Price
          • Call Contract Method
          • Sign and Submit Gasless Transaction
        • Developer Wallet
          • Generate Keys
          • Deploy Contract
          • Call Contract
          • Get Balance
          • Sign And Submit Gasless Txn
          • Create And Execute Txn
          • Sign EIP712 Txn
          • Verify Signature OffChain
          • Sign Message
          • Sign TxHash
          • Estimate Gas
        • Smart Contract Wallet APIs
          • Create Wallet
          • Get All SC Wallet Details
          • GenerateUserOp
          • SubmitUserOp
      • DID Manager APIs
        • Create issuer Profile
        • Create Subject Profile
        • Create Verifiable Credentials
        • Create Verifiable Presentation
        • List Issuer Profile
        • List Subject Profile
        • List Verifiable Credential
        • List Verifiable Credential Templates
        • Verify Verifiable Credential
        • Revoke Verifiable Credential
        • Delete Issuer Profile
        • Resolve DID
      • NFT Studio APIs
        • Create NFT Collection
        • Get all NFT Collections details created by a user
        • Get a NFT collection details created by a user
        • Mint NFT
        • Get all Minted NFT details in a smart contract
      • FT Manager APIs
        • Create ERC20Token
        • Get all Fungible Token details created by user
        • Get a Fungible Token details created by user
        • Mint ERC20 Token
        • Approve ERC20Token
        • Transfer ERC20 Token
        • Burn ERC20Token
        • Get Total Supply
        • Get Balance of an user address
      • Storage Manager APIs
        • Upload file to IPFS Storage
        • Get File Details
        • Download Files from IPFS
        • Update Pin status
      • Gasless API
        • Get Transaction Payload
        • Send Transaction
        • Create Gas Request
        • Add Whitelisted Contract Linked to DApp
        • List All Whitelisted Contracts
        • List All Protocol Configs
        • List All Funded Transactions
        • Update Configured Gas Limit
        • Deactivate Whitelisted Contract
        • Get Protocol Config using userId and ChainId
        • Sign And Submit Gasless Txn Using (Dev wallet)
        • Sign And Submit Gasless Txn Using (kms wallet)
    • Add On APIs
      • Gasless Transactions APIs
      • Datalake APIs
  • SDK Reference
    • Getting Started
    • SDK Architecture
    • Wrapper Packages
    • Power Methods
      • Wallet Suite
      • Utils Suite
    • Core Service Methods
      • Custodial Wallet Kit
      • DID Kit
      • NFT Kit
      • FT Kit
      • Storage Kit
  • faq
    • Platform FAQs
    • API FAQs
    • SDK FAQs
  • Releases
    • Latest Updates
    • Release Notes v1.0.0 Beta
    • Release Notes v1.0.0
Powered by GitBook
On this page

Was this helpful?

  1. API Reference
  2. Core Service APIs
  3. Wallet Manager APIs
  4. Self Managed Wallet

Setup SM Wallet

PreviousSelf Managed WalletNextCreate Wallet

Last updated 11 months ago

Was this helpful?

Prerequisite

Docker Compose

Step 1: Cloning the Repository

Clone the repository to your local system using the following command:

git clone https://github.com/krypc-code/kc-wallet-kms.git

Step 2: Setting Up the Environment

After cloning the repository, navigate to the test folder:

cd test

Launch the HashiCorp Vault service using Docker Compose:

sudo docker-compose -f docker-compose-vault.yaml up -d

Vault Initialization Steps:

  1. Access the Vault UI:

    • Start the Vault server.

    • Open a web browser and navigate to .

  2. Set Keyshare and Key Threshold:

    • In the Vault UI, locate the settings for key sharing.

    • Set the number of key shares (e.g., 5) and the key threshold (e.g., 3).

    • These values determine the number of key parts required to unseal the vault.

  3. Generate Key Pairs:

    • Click on the "Initialize" button in the Vault UI.

    • This action triggers the generation of a set of key and root token pairs.

  4. Download and Save Keys:

    • After initialization, download the generated keys.

    • Save the downloaded keys securely on your local machine.

  5. Provide Unseal Keys:

    • Open the downloaded key file and find the keys_base64 values.

    • Depending on the threshold set earlier, gather the required number of keys_base64 values.

    • These keys will be used to unseal the vault.

  6. Unseal the Vault:

    • In the Vault UI, locate the "Unseal" section.

    • Paste the collected keys_base64 values into the designated fields, based on the threshold.

    • Click "Continue" to unseal the vault.

  7. Provide Root Token:

    • In the Vault UI, find the field to input the root token.

    • Enter the root token obtained during the initialization process.

  8. Sign In to Vault:

    • Click on the "Sign In" or "Log In" button in the Vault UI.

    • If the root token is valid, you will gain access to the Vault.

  9. Create New Engine:

    • Create a new secret engine by selecting KV on the options screen.

  10. Secret As Path:

    • Create a new path with the value "secret" in the path parameter.

  11. Vault Initialization Complete:

    • At this point, your Vault is initialized and accessible.

Make sure to keep the downloaded keys and root token secure.

Once the Vault service is running and initialized successfully, update the environment variables in the config.yaml file as follows:

"VAULT_URL": "http://127.0.0.1:8200",
"VAULT_TOKEN": "hvs.xxxxxxxxxxxxxxxxx",
"AUTH_TOKEN": "abd3789a-xxxx-xxxx-xxxx-ed65a2c2e7f6",
"SUBSCRIPTION_ID": "XXXXXXXXXX",
"PROXY_URL": "https://api.krypcore.com/api/v0",
"ENDPOINT": "https://polygon-mumbai-dev-node.krypcore.com/api/v0/rpc?apiKey=1ddc4575-xxxx-xxxx-xxxx-9d8a7a4086aa&token=abd3789a-xxxx-xxxx-xxxx-ed65a2c2e7f6",
"WALLET_INSTANCE_ID": "XXX_XX_XX_2023721",
"SCHEDULER_DURATION": "10"

you can retrieve the actual values of the

auth token, subscription ID from krypcore dashboard.

vault_token is the root token of the vault.

Proxy_url: "https://api.krypcore.com/api/v0" is production url which is need to be used.

endpoint url from manage dapps in mydapps.

wallet_instance_id from mydapps.

Step 3: Running the Service

Once you've configured the environment variables, come to parent directory

cd ...

Run the self-managed wallet service using the following command:

sudo run main.go

That's it! You should now have the Self-Managed Wallet service running on your local environment.

http://127.0.0.1:8200