Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: at_file_share demo #169

Merged
merged 6 commits into from
Jan 30, 2024
Merged

feat: at_file_share demo #169

merged 6 commits into from
Jan 30, 2024

Conversation

murali-shris
Copy link
Member

@murali-shris murali-shris commented Jan 25, 2024

- What I did

  • created a demo package to test file send and receive through StorJ
    - How I did it
  • file_sender.dart
    • read a file from local path
    • call at_client encryption service,
    • upload encrypted file to StorJ
    • send notification to receiver
  • file_receiver.dart
    • listen to notification
    • get file url and other details from notification
    • down encrypted file from Storj
    • decrypt encrypted file using at_client encryption service
    • store decrypted file to local path
      - How to verify it
  • Start local virtual environment
  • follow instructions in README.md

}

Future<String> _getStorjUrl(String atSign, String fileName) async {
var buzzKey = Platform.environment['ATBUZZKEY'];
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cpswan How can we get the key and nonce url to access getToken API

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The nonce is retrieved from a getNonce service, and the key is a pre-shared key created for that service instance.

@murali-shris murali-shris requested a review from gkc January 30, 2024 13:50
@murali-shris murali-shris marked this pull request as ready for review January 30, 2024 13:50
#TODO

Prerequisite:
1. Storj account and s3 access/secret keys
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s3 ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it is access grant with uplink tool. I have made the changes

Prerequisite:
1. Storj account and s3 access/secret keys
1. Login/signup to https://www.storj.io/
2. Create new project e.g zetta_demo
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove all references to zetta - suggest change everywhere from zetta to acme

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

print(argParser.usage);
}

void main(List<String> arguments) async {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you change the sender and receiver to use the CLIBase class instead, please? See https://github.com/atsign-foundation/at_demos/blob/trunk/at_rpc_demo/bin/arithmetic_client.dart for example

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Gary. done

..atKeysFilePath = results['atKeysFilePath'];

if (results['env'] == 'dev') {
atOnboardingPreference.rootDomain = 'vip.ve.atsign.zone';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you are using CLIBase, it includes an option to set the root domain so this will be unnecessary

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@murali-shris murali-shris requested a review from gkc January 30, 2024 14:48
@gkc gkc merged commit 9b925a9 into trunk Jan 30, 2024
2 checks passed
@murali-shris murali-shris deleted the at_file_share branch January 30, 2024 15:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants