Skip to content

Commit

Permalink
Merge pull request #36 from haofengjiang/bug_fix_notice_fix
Browse files Browse the repository at this point in the history
mpc add address description update and get
  • Loading branch information
CoboZhu authored Oct 25, 2023
2 parents c3ec7df + d86c5c6 commit 703b82a
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
17 changes: 17 additions & 0 deletions MPCClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,23 @@ function generateAddresses(string $chainCode, int $count)
return $this->request("POST", "/v1/custody/mpc/generate_addresses/", $params);
}

/***
* update address description
* string $coin
* string $address
* string $description
* @return mixed|string
*/
function updateAddressDescription(string $coin, string $address, string $description)
{
$params = [
"coin" => $coin,
"address" => $address,
"description" => $description,
];
return $this->request("POST", "/v1/custody/mpc/update_address_description/", $params);
}

/***
* list addresses
* string $chainCode
Expand Down
10 changes: 10 additions & 0 deletions MPCClientTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,16 @@ public function testGenerateAddresses()
$this->assertTrue($res->success);
}

public function testUpdateAddressDescription()
{
$coin = "GETH";
$address = "0x3ede1e59a3f3a66de4260df7ba3029b515337e5c";
$description = "test1";
$res = $this->mpcClient->updateAddressDescription($coin, $address, $description);

$this->assertTrue($res->success);
}

public function testGetListAddresses()
{
$chainCode = "GETH";
Expand Down

0 comments on commit 703b82a

Please sign in to comment.