-
Notifications
You must be signed in to change notification settings - Fork 0
Dev #1
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
Open
renzocabarios
wants to merge
15
commits into
main
Choose a base branch
from
dev
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Dev #1
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
e27325c
Add gitignore
renzocabarios bce885b
Add add-tags
renzocabarios 4e2f596
Add generate-wallets
renzocabarios 0a07425
Add get-balance
renzocabarios c983da1
Add get-info
renzocabarios 7d1c80f
Add get-last-transaction
renzocabarios f66f14c
Add hello-world
renzocabarios 2918f6b
Add jwk-to-address
renzocabarios 0c1327b
Add query-by-tags
renzocabarios d278fe6
Add upload-chunk
renzocabarios 142e374
Add fake wallet
renzocabarios 20c0979
Configuration
renzocabarios f09f3ba
Update packages
renzocabarios 05327f6
Add upload html
renzocabarios 848a1f4
🎉 added starter template for next.js + ardrive turbo-sdk
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| node_modules |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| import Arweave from "arweave"; | ||
|
|
||
| const start = async () => { | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We need to use Turbo-SDK pala. Kasi yun yung partner natin haha. |
||
| const ARWEAVE_INSTANCE = Arweave.init({ | ||
| host: "arweave.net", | ||
| port: 443, | ||
| protocol: "https", | ||
| }); | ||
|
|
||
| // TODO: Add/Airdrop me Arweave please | ||
| const generated = await ARWEAVE_INSTANCE.wallets.generate(); | ||
|
|
||
| const tx = await ARWEAVE_INSTANCE.createTransaction( | ||
| { | ||
| data: "Hello world!", | ||
| }, | ||
| generated | ||
| ); | ||
|
|
||
| tx.addTag("Content-Type", "application/json"); | ||
| tx.addTag("whatever", "whatever"); | ||
|
|
||
| await ARWEAVE_INSTANCE.transactions.sign(tx, generated); | ||
| ARWEAVE_INSTANCE.transactions.post(tx).then(console.log).catch(console.log); | ||
| console.log(`https://arweave.net/${tx.id}`); | ||
| }; | ||
|
|
||
| start(); | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| import Arweave from "arweave"; | ||
|
|
||
| const start = async () => { | ||
| const ARWEAVE_INSTANCE = Arweave.init({ | ||
| host: "arweave.net", | ||
| port: 443, | ||
| protocol: "https", | ||
| }); | ||
| const generated = await ARWEAVE_INSTANCE.wallets.generate(); | ||
| console.log(generated); | ||
| }; | ||
| start(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| import Arweave from "arweave"; | ||
|
|
||
| const start = async () => { | ||
| const ARWEAVE_INSTANCE = Arweave.init({ | ||
| host: "arweave.net", | ||
| port: 443, | ||
| protocol: "https", | ||
| }); | ||
| const generated = await ARWEAVE_INSTANCE.wallets.generate(); | ||
| const address = await ARWEAVE_INSTANCE.wallets.jwkToAddress(generated); | ||
| const balance = await ARWEAVE_INSTANCE.wallets.getBalance(address); | ||
| console.log(`${address}: ${balance} winston`); | ||
| console.log(`${address}: ${ARWEAVE_INSTANCE.ar.winstonToAr(balance)} AR`); | ||
| }; | ||
|
|
||
| start(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| import Arweave from "arweave"; | ||
|
|
||
| const start = async () => { | ||
| const ARWEAVE_INSTANCE = Arweave.init({ | ||
| host: "arweave.net", | ||
| port: 443, | ||
| protocol: "https", | ||
| }); | ||
| const info = await ARWEAVE_INSTANCE.network.getInfo(); | ||
| console.log(info); | ||
| }; | ||
|
|
||
| start(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| import Arweave from "arweave"; | ||
|
|
||
| const start = async () => { | ||
| const ARWEAVE_INSTANCE = Arweave.init({ | ||
| host: "arweave.net", | ||
| port: 443, | ||
| protocol: "https", | ||
| }); | ||
| const generated = await ARWEAVE_INSTANCE.wallets.generate(); | ||
| const address = await ARWEAVE_INSTANCE.wallets.jwkToAddress(generated); | ||
| const tx = await ARWEAVE_INSTANCE.wallets.getLastTransactionID(address); | ||
| console.log(tx); | ||
| }; | ||
|
|
||
| start(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| import Arweave from "arweave"; | ||
|
|
||
| const start = async () => { | ||
| const ARWEAVE_INSTANCE = Arweave.init({ | ||
| host: "arweave.net", | ||
| port: 443, | ||
| protocol: "https", | ||
| }); | ||
|
|
||
| // TODO: Add/Airdrop me Arweave please | ||
| const generated = await ARWEAVE_INSTANCE.wallets.generate(); | ||
|
|
||
| const tx = await ARWEAVE_INSTANCE.createTransaction( | ||
| { | ||
| data: "Hello world!", | ||
| }, | ||
| generated | ||
| ); | ||
|
|
||
| await ARWEAVE_INSTANCE.transactions.sign(tx, generated); | ||
| ARWEAVE_INSTANCE.transactions.post(tx).then(console.log).catch(console.log); | ||
| console.log(`https://arweave.net/${tx.id}`); | ||
| }; | ||
|
|
||
| start(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| import Arweave from "arweave"; | ||
|
|
||
| const start = async () => { | ||
| const ARWEAVE_INSTANCE = Arweave.init({ | ||
| host: "arweave.net", | ||
| port: 443, | ||
| protocol: "https", | ||
| }); | ||
| const generated = await ARWEAVE_INSTANCE.wallets.generate(); | ||
| const address = await ARWEAVE_INSTANCE.wallets.jwkToAddress(generated); | ||
| console.log(address); | ||
| }; | ||
|
|
||
| start(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| { | ||
| "extends": "next/core-web-vitals" | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. | ||
|
|
||
| # dependencies | ||
| /node_modules | ||
| /.pnp | ||
| .pnp.js | ||
| .yarn/install-state.gz | ||
|
|
||
| # testing | ||
| /coverage | ||
|
|
||
| # next.js | ||
| /.next/ | ||
| /out/ | ||
|
|
||
| # production | ||
| /build | ||
|
|
||
| # misc | ||
| .DS_Store | ||
| *.pem | ||
|
|
||
| # debug | ||
| npm-debug.log* | ||
| yarn-debug.log* | ||
| yarn-error.log* | ||
|
|
||
| # local env files | ||
| .env*.local | ||
|
|
||
| # vercel | ||
| .vercel | ||
|
|
||
| # typescript | ||
| *.tsbuildinfo | ||
| next-env.d.ts |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app). | ||
|
|
||
| ## Getting Started | ||
|
|
||
| First, run the development server: | ||
|
|
||
| ```bash | ||
| npm run dev | ||
| # or | ||
| yarn dev | ||
| # or | ||
| pnpm dev | ||
| # or | ||
| bun dev | ||
| ``` | ||
|
|
||
| Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. | ||
|
|
||
| You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file. | ||
|
|
||
| This project uses [`next/font`](https://nextjs.org/docs/basic-features/font-optimization) to automatically optimize and load Inter, a custom Google Font. | ||
|
|
||
| ## Learn More | ||
|
|
||
| To learn more about Next.js, take a look at the following resources: | ||
|
|
||
| - [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API. | ||
| - [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial. | ||
|
|
||
| You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome! | ||
|
|
||
| ## Deploy on Vercel | ||
|
|
||
| The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js. | ||
|
|
||
| Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| /** @type {import('next').NextConfig} */ | ||
| const nextConfig = { | ||
| output: "export", | ||
| }; | ||
|
|
||
| export default nextConfig; |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add proper docs to all helpers