Skip to content

Commit

Permalink
Upgrade to SDK version 1.8.0.
Browse files Browse the repository at this point in the history
 - TON SDK binaries updated.
 - Crypto module tests updated.
 - PHPv8 support verified.

fixes #2, fixes #5

TODO: update Debot tests
  • Loading branch information
andy-a-o committed Feb 15, 2021
1 parent 3cc5fd3 commit 70a6a0f
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 14 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
fail-fast: false
matrix:
operating-system: [ubuntu-latest, windows-latest, macos-latest]
php-versions: ['7.4']
php-versions: ['7.4', '8.0']

name: PHP ${{ matrix.php-versions }} Test on ${{ matrix.operating-system }}

Expand All @@ -35,18 +35,18 @@ jobs:
- name: Download PHP Installer
run: |
php -r "copy('https://raw.githubusercontent.com/radianceteam/ton-client-php-ext/master/installer.php', 'installer.php');"
php -r "if (hash_file('sha384', 'installer.php') === 'e2478dda0e179de7a7485fa360719685f11d6a2baf7931a315e6f06ded3771024732fca77677143eb086548cd2ebd36d') { echo 'Installer verified'; } else { echo 'Installer corrupt'; } echo PHP_EOL;"
php -r "if (hash_file('sha384', 'installer.php') === 'd1cacd76f088ee9f487a5c256afd8b739ba082ce677989d9c7f3f59f4c2f415bca14d6d88c72f15c49bbba418ad8fa7f') { echo 'Installer verified'; } else { echo 'Installer corrupt'; } echo PHP_EOL;"
- name: Install PHP Extension (Windows)
if: matrix.operating-system == 'windows-latest'
run: php installer.php -v 1.7.0
run: php installer.php -v 1.8.0

- name: Install PHP Extension (Ubuntu/Mac)
if: matrix.operating-system != 'windows-latest'
run: sudo php installer.php -v 1.7.0
run: sudo php installer.php -v 1.8.0

- name: Test PHP Extension
run: php installer.php -v 1.7.0 -T
run: php installer.php -v 1.8.0 -T

- name: Check PHP Extensions
run: php -m
Expand Down
4 changes: 2 additions & 2 deletions api.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "1.7.0",
"version": "1.8.0",
"modules": [
{
"name": "client",
Expand Down Expand Up @@ -9047,4 +9047,4 @@
]
}
]
}
}
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"require": {
"php": ">=7.4",
"ext-json": "*",
"ext-ton_client": ">=1.7.0",
"ext-ton_client": ">=1.8.0",
"psr/log": "^1.1"
},
"scripts": {
Expand Down
4 changes: 2 additions & 2 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion tests/TON/Client/ClientModuleTests.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public function testVersion()
$result = $this->_client->version();
$this->assertNotNull($result);
$this->assertMatchesRegularExpression('/^\d+\.\d+\.\d+$/', $result->getVersion());
$this->assertEquals('1.7.0', $result->getVersion());
$this->assertEquals('1.8.0', $result->getVersion());
}

public function testGetApiReference()
Expand Down
6 changes: 3 additions & 3 deletions tests/TON/Crypto/CryptoModuleTests.php
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,7 @@ public function testHdkeyPublicFromXprv()
->setXprv("xprv9s21ZrQH143K25JhKqEwvJW7QAiVvkmi4WRenBZanA6kxHKtKAQQKwZG65kCyW5jWJ8NY9e3GkRoistUjjcpHNsGBUv94istDPXvqGNuWpC"));

$this->assertEquals(
"02a8eb63085f73c33fa31b4d1134259406347284f8dab6fc68f4bf8c96f6c39b75",
"7b70008d0c40992283d488b1046739cf827afeabf647a5f07c4ad1e7e45a6f89",
$result->getPublic());
}

Expand All @@ -494,7 +494,7 @@ public function testHdkeyPublicFromXprv_child()
->setXprv("xprv9uZwtSeoKf1swgAkVVCEUmC2at6t7MCJoHnBbn1MWJZyxQ4cySkVXPyNh7zjf9VjsP4vEHDDD2a6R35cHubg4WpzXRzniYiy8aJh1gNnBKv"));

$this->assertEquals(
"027a598c7572dbb4fbb9663a0c805576babf7faa173a4288a48a52f6f427e12be1",
"b45e1297a5e767341a6eaaac9e20f8ccd7556a0106298316f1272e461b6fbe98",
$result->getPublic());
}

Expand All @@ -505,7 +505,7 @@ public function testHdkeyPublicFromXprv_path()
->setXprv("xprvA1KNMo63UcGjmDF1bX39Cw2BXGUwrwMjeD5qvQ3tA3qS3mZQkGtpf4DHq8FDLKAvAjXsYGLHDP2dVzLu9ycta8PXLuSYib2T3vzLf3brVgZ"));

$this->assertEquals(
"02a87d9764eedaacee45b0f777b5a242939b05fa06873bf511ca9a59cb46a5f526",
"302a832bad9e5c9906422a82c28b39ae465dcd60178480f7309e183ee34b5e83",
$result->getPublic());
}

Expand Down

0 comments on commit 70a6a0f

Please sign in to comment.