SPV Wallet API

Ownership

This page content has to be created or updated by the following person:

XiaoMing ?

Important This API is only to be used by developers who plan to write their own wallet application, which is not a common use case.

Anything to migrate from there? https://walletservice.readthedocs.io/en/latest/api_guide.html

This is just an example. Feel free to add/remove sections for each API, but use the api shortcodes to keep the documentation style consistent.

C++ version of the API.

CreateMultiSignMasterWallet()

CreateMultiSignMasterWallet()

Creates a multi-signature wallet. With the wallet you can this and that. In case or error, the returned value may be non significant. And sometimes it will also do that.
Parameters
Parameter Description
masterWallet One of masterWallet which is participated in Multi-Sign
privKey masterWallet privKey
Returns
Returns a cool structure.
Function call
 
import RNElastosMainchain from 'react-native-elastos-wallet-core';

RNElastosMainchain.CreateMultiSignMasterWallet(
    masterWallet, 
    privKey, 
    payPassword, 
    coSigners, 
    requiredSignCount, 
    (err, res) => {
        console.log(res); //expect "success"
    }
);
Example response
{
    "result":{
        "vsize":346,
        "locktime":0,
        "txid":"62637968e72b06e4fa1de91542a3b71bd2462ba1d29e9c14c2ecfd042d1937ab",
        "confirmations":6756,
        "type":8,
        "version":0,
    }
}

AnotherApi()

AnotherApi()

Does something else.
Parameters
Parameter Description
masterWallet One of masterWallet which is participated in Multi-Sign
privKey masterWallet privKey
Returns
Returns a cool structure.
Function call
 
import RNElastosMainchain from 'react-native-elastos-wallet-core';

RNElastosMainchain.CreateMultiSignMasterWallet(
    masterWallet, 
    privKey, 
    payPassword, 
    coSigners, 
    requiredSignCount, 
    (err, res) => {
        console.log(res); //expect "success"
    }
);
Example response
{
    "result":{
        "vsize":346,
        "locktime":0,
        "txid":"62637968e72b06e4fa1de91542a3b71bd2462ba1d29e9c14c2ecfd042d1937ab",
        "confirmations":6756,
        "type":8,
        "version":0,
    }
}