Appearance
Single Use Key Generation and Replace Big Int into String
Generate Single Use key
To generate a single-use Ethereum public key, you can use the generateSingleUseEthPubKey
function from the skc-trade-sdk
. Here is an example:
javascript
import { generateSingleUseEthPubKey } from "skc-trade-sdk";
const singleUseKey = generateSingleUseEthPubKey(
"0x03364d3db1a3d49a53432473d953d680be3eebdae6775b243c2087b9ae92431f1a",
"555d9159-bb35-40ea-bd8a-42dcd32649c4"
);
This function takes an Ethereum public key and a UUID as parameters to generate a single-use Ethereum public key.
Replace BigInt with String Representation
To replace a bigint
value with its string representation during JSON serialization, you can use the replacer
function from the skc-trade-sdk
. Here is an example:
javascript
import { utils } from "skc-trade-sdk";
const bigIntReplacer = utils.replacer("key", "big-int-value");
This function takes a key and a bigint
value as parameters and replaces the bigint
value with its string representation.