From 24c2cee9142e0eaf9fa48dd176daf266d0d7689f Mon Sep 17 00:00:00 2001 From: caixiao-QA <‘caixiao@cobo.com’> Date: Tue, 24 Oct 2023 14:13:28 +0800 Subject: [PATCH 1/5] update version readme and changelog --- CHANGELOG.md | 4 ++++ README.md | 2 +- package.json | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4d1ca2f..ae26758 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,10 @@ 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-25) +[v0.38.0]: https://github.com/CoboGlobal/cobo-js-api/compare/v0.37.0...v0.38.0 +### 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..51f9ec6 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" } ``` 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": [ From 0dc2f2e1becff20e4a7bdac89007ea87fd26c2a0 Mon Sep 17 00:00:00 2001 From: caixiao-QA <‘caixiao@cobo.com’> Date: Wed, 25 Oct 2023 09:47:58 +0800 Subject: [PATCH 2/5] update release date --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ae26758..4e3b395 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,7 +3,7 @@ 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-25) +## [v0.38.0] (2023-10-26) [v0.38.0]: https://github.com/CoboGlobal/cobo-js-api/compare/v0.37.0...v0.38.0 ### 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 From bf8ba53196cc83cfc29a2a8caf9163714dc89fde Mon Sep 17 00:00:00 2001 From: caixiao-QA <‘caixiao@cobo.com’> Date: Thu, 26 Oct 2023 16:25:29 +0800 Subject: [PATCH 3/5] update DEV_ENV name --- README.md | 4 ++-- index.ts | 4 ++-- src/Env.ts | 2 +- src/MPCClient.ts | 2 +- src/Web3Client.ts | 2 +- test/Client.test.ts | 12 ++++++------ test/MPCClient.test.ts | 6 +++--- test/Web3Client.test.ts | 6 +++--- test/config.ts | 4 ++-- 9 files changed, 21 insertions(+), 21 deletions(-) diff --git a/README.md b/README.md index 51f9ec6..92ef41c 100644 --- a/README.md +++ b/README.md @@ -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/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 4a80ff3..1a29efa 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 c794356..42f2295 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", From 34fad969b09cd62dede4fe12b10be3f58792a218 Mon Sep 17 00:00:00 2001 From: caixiao-QA <‘caixiao@cobo.com’> Date: Thu, 26 Oct 2023 16:26:33 +0800 Subject: [PATCH 4/5] update DEV_ENV name --- src/Client.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) { From 94f2a78cdb8f067f66b4da68136c662e654986b1 Mon Sep 17 00:00:00 2001 From: caixiao-QA <‘caixiao@cobo.com’> Date: Thu, 26 Oct 2023 19:31:45 +0800 Subject: [PATCH 5/5] update changlog --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4e3b395..be84c3f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,8 @@ 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