diff --git a/CHANGELOG.md b/CHANGELOG.md index 4d1ca2f..be84c3f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). +## [v0.38.0] (2023-10-26) +[v0.38.0]: https://github.com/CoboGlobal/cobo-js-api/compare/v0.37.0...v0.38.0 +### Added +- Add New API: MPC Wallet add Update Address Description API.https://github.com/CoboGlobal/cobo-js-api/pull/34 +### Changed +- Add New Params: Custodial Wallet New Withdraw Request and MPC Wallet Create Transaction API add remark param. https://github.com/CoboGlobal/cobo-js-api/pull/32 ## [v0.37.0] (2023-07-27) [v0.37.0]: https://github.com/CoboGlobal/cobo-js-api/compare/v0.36.0...v0.37.0 diff --git a/README.md b/README.md index af60219..92ef41c 100644 --- a/README.md +++ b/README.md @@ -50,7 +50,7 @@ add dependency in `package.json` ``` "dependencies": { ... - "cobo-custody": "https://github.com/CoboGlobal/cobo-js-api/releases/download/v0.37.0/release.tgz" + "cobo-custody": "https://github.com/CoboGlobal/cobo-js-api/releases/download/v0.38.0/release.tgz" } ``` @@ -82,8 +82,8 @@ Please refer to the [link](https://doc.custody.cobo.com/en.html#api-authenticati ```js const { Client } = require('cobo-custody'); const { LocalSigner } = require('cobo-custody'); -const {DEVELOP,PROD} = require('cobo-custody'); -const client = new Client(API_SIGNER, DEVELOP, true) +const {DEV,PROD} = require('cobo-custody'); +const client = new Client(API_SIGNER, DEV, true) ``` diff --git a/index.ts b/index.ts index 4a859b3..831ffb2 100644 --- a/index.ts +++ b/index.ts @@ -3,10 +3,10 @@ import {LocalSigner} from "./src/LocalSigner"; import {Web3Client} from "./src/Web3Client"; import {MPCClient} from "./src/MPCClient"; -import {PROD, DEVELOP} from "./src/Env"; +import {PROD, DEV} from "./src/Env"; import { ApiResponse } from "./src/Base"; -export {PROD, DEVELOP} +export {PROD, DEV} export {Client, LocalSigner, Web3Client, MPCClient}; export { diff --git a/package.json b/package.json index 8c6f017..49c99e0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cobo-custody", - "version": "0.32.0", + "version": "0.38.0", "description": "", "main": "out/index.js", "files": [ diff --git a/src/Client.ts b/src/Client.ts index b04b9dc..bba7546 100644 --- a/src/Client.ts +++ b/src/Client.ts @@ -16,7 +16,7 @@ export class Client { /*** * * @param signer api signer - * @param env DEVELOP or PROD + * @param env DEV or PROD * @param debug */ constructor(signer: Signer, env: Env, debug: boolean = false) { diff --git a/src/Env.ts b/src/Env.ts index feb920d..8d34d1e 100644 --- a/src/Env.ts +++ b/src/Env.ts @@ -8,5 +8,5 @@ export class Env { } } -export const DEVELOP = new Env("https://api.dev.cobo.com", "03596da539963fb1dd29d5859e25903eb76b9f7ed2d58516e29c9f80c201ff2c1b"); +export const DEV = new Env("https://api.dev.cobo.com", "03596da539963fb1dd29d5859e25903eb76b9f7ed2d58516e29c9f80c201ff2c1b"); export const PROD = new Env("https://api.custody.cobo.com", "02c3e5bacf436fbf4da78597e791579f022a2e85073ae36c54a361ff97f2811376"); diff --git a/src/MPCClient.ts b/src/MPCClient.ts index 7274474..f42138e 100644 --- a/src/MPCClient.ts +++ b/src/MPCClient.ts @@ -16,7 +16,7 @@ export class MPCClient { /*** * * @param signer api signer - * @param env DEVELOP or PROD + * @param env DEV or PROD * @param debug */ constructor(signer: Signer, env: Env, debug: boolean = false) { diff --git a/src/Web3Client.ts b/src/Web3Client.ts index 2f6c082..c2baeb6 100644 --- a/src/Web3Client.ts +++ b/src/Web3Client.ts @@ -16,7 +16,7 @@ export class Web3Client { /*** * * @param signer api signer - * @param env DEVELOP or PROD + * @param env DEV or PROD * @param debug */ constructor(signer: Signer, env: Env, debug: boolean = false) { diff --git a/test/Client.test.ts b/test/Client.test.ts index 9984d15..22a4212 100644 --- a/test/Client.test.ts +++ b/test/Client.test.ts @@ -1,20 +1,20 @@ import {Client, LocalSigner} from ".."; -import {DEVELOP} from "./config"; +import {DEV} from "./config"; import {PROD} from "./config"; -import {DEVELOP_TEST_DATA} from "./config"; +import {DEV_TEST_DATA} from "./config"; import {PROD_TEST_DATA} from "./config"; var apiSecret:string = 'apiSecret'; -var clientEnv:any = DEVELOP; -var testData:any = DEVELOP_TEST_DATA +var clientEnv:any = DEV; +var testData:any = DEV_TEST_DATA if(process.argv.length > 3){ const paramEnv = process.argv.filter((x) => x.startsWith('-env='))[0].split('=')[1]; const env = paramEnv ? paramEnv : 'develop'; - clientEnv = env==='prod' ? PROD: DEVELOP; + clientEnv = env==='prod' ? PROD: DEV; const paramApiSecret = process.argv.filter((x) => x.startsWith('-secretKey='))[0].split('=')[1] apiSecret = paramApiSecret ? paramApiSecret: 'apiSecret' - testData = env==='prod' ? PROD_TEST_DATA: DEVELOP_TEST_DATA; + testData = env==='prod' ? PROD_TEST_DATA: DEV_TEST_DATA; } jest.setTimeout(10000); diff --git a/test/MPCClient.test.ts b/test/MPCClient.test.ts index e956d79..ab10e53 100644 --- a/test/MPCClient.test.ts +++ b/test/MPCClient.test.ts @@ -1,15 +1,15 @@ import {LocalSigner} from "../src/LocalSigner"; import {MPCClient} from "../src/MPCClient"; -import {DEVELOP} from "./config"; +import {DEV} from "./config"; import {PROD} from "./config"; var mpcApiSecret:string = 'apiSecret'; -var clientEnv:any = DEVELOP; +var clientEnv:any = DEV; if(process.argv.length > 3){ const paramEnv = process.argv.filter((x) => x.startsWith('-env='))[0].split('=')[1]; const env = paramEnv ? paramEnv : 'develop'; - clientEnv = env==='prod' ? PROD: DEVELOP; + clientEnv = env==='prod' ? PROD: DEV; const paramApiSecret = process.argv.filter((x) => x.startsWith('-mpcSecretKey='))[0].split('=')[1] mpcApiSecret = paramApiSecret ? paramApiSecret: 'mpcApiSecret' } diff --git a/test/Web3Client.test.ts b/test/Web3Client.test.ts index 463b7a6..7905380 100644 --- a/test/Web3Client.test.ts +++ b/test/Web3Client.test.ts @@ -1,15 +1,15 @@ import {LocalSigner} from "../src/LocalSigner"; import {Web3Client} from "../src/Web3Client"; -import {DEVELOP} from "./config"; +import {DEV} from "./config"; import {PROD} from "./config"; var web3ApiSecret:string = 'apiSecret'; -var clientEnv:any = DEVELOP; +var clientEnv:any = DEV; if(process.argv.length > 3){ const paramEnv = process.argv.filter((x) => x.startsWith('-env='))[0].split('=')[1]; const env = paramEnv ? paramEnv : 'develop'; - clientEnv = env==='prod' ? PROD: DEVELOP; + clientEnv = env==='prod' ? PROD: DEV; const paramApiSecret = process.argv.filter((x) => x.startsWith('-web3SecretKey='))[0].split('=')[1] web3ApiSecret = paramApiSecret ? paramApiSecret: web3ApiSecret } diff --git a/test/config.ts b/test/config.ts index 0b3ed19..9820b10 100644 --- a/test/config.ts +++ b/test/config.ts @@ -1,9 +1,9 @@ import {Env} from "../src/Env"; export const PROD = new Env("https://api.custody.cobo.com", "02c3e5bacf436fbf4da78597e791579f022a2e85073ae36c54a361ff97f2811376"); -export const DEVELOP = new Env("https://api.dev.cobo.com", "03596da539963fb1dd29d5859e25903eb76b9f7ed2d58516e29c9f80c201ff2c1b"); +export const DEV = new Env("https://api.dev.cobo.com", "03596da539963fb1dd29d5859e25903eb76b9f7ed2d58516e29c9f80c201ff2c1b"); -export const DEVELOP_TEST_DATA : { [key: string]: any } = { +export const DEV_TEST_DATA : { [key: string]: any } = { "cobo_id":"20220314181458000331767000003732", "tx_id":"0x1c4d137bc2a2ee8f22cbdf9e90405974e72e65d922f42eb81d9f7a05d0f64fc6", "withdraw_id":"web_send_by_user_915_1647252768642",