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
| import { registerHooks } from 'node:module' | |
| import fs from 'node:fs' | |
| const urls = [] | |
| registerHooks({ | |
| load(url, context, nextLoad) { | |
| if (!url.startsWith('file://')) { | |
| return nextLoad(url, context) | |
| } | |
| urls.push(url) |
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
| package main | |
| import ( | |
| "fmt" | |
| "testing" | |
| "github.com/storacha/go-ucanto/testing/helpers/printer" | |
| "github.com/storacha/go-ucanto/transport/headercar/message" | |
| ) |
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
| package main | |
| import ( | |
| "fmt" | |
| "github.com/libp2p/go-libp2p/core/crypto" | |
| "github.com/libp2p/go-libp2p/core/peer" | |
| ed25519 "github.com/storacha/go-ucanto/principal/ed25519/verifier" | |
| ) |
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
| import { GetObjectCommand, ListObjectsV2Command, S3Client } from '@aws-sdk/client-s3' | |
| import Ora from 'ora' | |
| import * as dagJSON from '@ipld/dag-json' | |
| const spinner = Ora() | |
| const client = new S3Client({ region: 'us-west-2' }) | |
| const bucket = 'ipfs-advertisement' | |
| let oldest | |
| let cursor |
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
| package main | |
| import ( | |
| "encoding/base64" | |
| "fmt" | |
| "os" | |
| "strconv" | |
| "time" | |
| ipnimd "github.com/ipni/go-libipni/metadata" |
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
| # prod | |
| export STORACHA_SERVICE_DID=did:web:up.storacha.network | |
| export STORACHA_SERVICE_URL=https://up.storacha.network | |
| export STORACHA_STORE_NAME=storacha-cli-prod | |
| export STORACHA_RECEIPTS_URL=https://up.storacha.network/receipt/ | |
| # staging | |
| export STORACHA_SERVICE_DID=did:web:staging.up.storacha.network | |
| export STORACHA_SERVICE_URL=https://staging.up.storacha.network | |
| export STORACHA_STORE_NAME=storacha-cli-staging |
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
| package main | |
| import ( | |
| "fmt" | |
| "github.com/filecoin-project/go-state-types/abi" | |
| "github.com/storacha/piri/pkg/pdp/proof" | |
| ) | |
| func main() { |
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
| import createCharm from 'charm' | |
| const charm = createCharm() | |
| charm.pipe(process.stdout) | |
| charm.reset() | |
| for (var i = 0; i < 256; i++) { | |
| charm.background(i).write(i+'\n') | |
| } |
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
| package main | |
| import ( | |
| "fmt" | |
| "strconv" | |
| "time" | |
| "github.com/multiformats/go-multibase" | |
| "github.com/multiformats/go-multicodec" | |
| "github.com/multiformats/go-multihash" |
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
| package main | |
| import ( | |
| "fmt" | |
| "io" | |
| "net/http" | |
| ) | |
| func main() { | |
| fmt.Println(ResolveDIDKey()) |
NewerOlder