-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
44 lines (32 loc) · 1.73 KB
/
index.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<?php
require 'vendor/autoload.php';
require 'Config.php';
$config = new Config();
$mc = $config->instance();
$config = new Config();
$mc = $config->instance();
// Multichain Basic commands
$multiBasic = new \CodeArchitect\Framework\Operations\MultichainBasic(mc: $mc);
// Multichain Streams
$multiStream = new \CodeArchitect\Framework\Operations\MultichainStreams(mc: $mc);
// Multichain Permission
$multiPermission = new \CodeArchitect\Framework\Operations\MultichainPermissionsManagement(mc: $mc);
header('Content-Type: application/json');
// check if the connection is active or not
//print_r($multiBasic->isActive());
// List of all the streams
//print_r($multiStream->getListOfStreams());
//dd($multiPermission->getListOfSpecificAddressPermissions("17oExeajBCrYqP4v7gAjpspzk4eeun9dbTgiDV"));
//dd($multiPermission->grantGlobalPermission("1FJLQU46LYz4Lg1nyPciXJE4VCwRT7mDYX1yFY", 'send,receive'));
//dd($multiPermission->getListOfSpecificPermissions('send,receive'));
//dd($multiPermission->verifyPermission("1FJLQU46LYz4Lg1nyPciXJE4VCwRT7mDYX1yFY", 'send'));
//dd($multiStream->publishInStream("chainStream", "XCV12345", ['text' => 'hello world']));
//dd($multiStream->multiPublishingOffChain("chainStream", [
// ['key' => 'key1', 'data' => ['json' => ['name' => 'John', 'age' => 30]]],
// ['keys' => ['key2', 'key3'], 'data' => ['json' => ['name' => 'Iogan', 'age' => 20]]]
// ]
//));
//dd($multiStream->listAllStreamItems("chainStream"));
//dd($multiStream->listStreamItemsBasedOnItems("chainStream", "Transaction125"));
//dd($multiStream->listStreamKeys("chainStream", ["Transaction125", "Transaction126"], true));
//dd($multiStream->listStreamBasedOnBlock("chainStream", ['starttime' => 1577836800, 'endtime' => 1609459199]));