-
Notifications
You must be signed in to change notification settings - Fork 79
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
40312f4
commit b1e58a8
Showing
21 changed files
with
162 additions
and
44 deletions.
There are no files selected for viewing
This file contains 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,22 @@ | ||
import VeraxSdk from "../../src/VeraxSdk"; | ||
|
||
export default class AttestationExamples { | ||
private veraxSdk: VeraxSdk; | ||
constructor(_veraxSdk: VeraxSdk) { | ||
this.veraxSdk = _veraxSdk; | ||
} | ||
async run(methodName: string = "") { | ||
if (methodName.toLowerCase() == "findOneById".toLowerCase() || methodName == "") | ||
console.log( | ||
await this.veraxSdk.attestation.findOneById( | ||
"0x00000000000000000000000000000000000000000000000000000000000007b5", | ||
), | ||
); | ||
if (methodName.toLowerCase() == "findBy".toLowerCase() || methodName == "") | ||
console.log( | ||
await this.veraxSdk.attestation.findBy( | ||
`{schemaId: "0xd1664d97bd195df77e3d5fe78c1737ab3adaa38bbe52a680d1aa30fa51f186ba"}`, | ||
), | ||
); | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains 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 @@ | ||
import VeraxSdk from "../../src/VeraxSdk"; | ||
import AttestationExamples from "./attestationExamples"; | ||
|
||
const veraxSdk = new VeraxSdk(VeraxSdk.DEFAULT_LINEA_TESTNET); | ||
|
||
await new AttestationExamples(veraxSdk).run(process.argv[2]); |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains 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 @@ | ||
import VeraxSdk from "../../src/VeraxSdk"; | ||
import ModuleExamples from "./moduleExamples"; | ||
|
||
const veraxSdk = new VeraxSdk(VeraxSdk.DEFAULT_LINEA_TESTNET); | ||
|
||
await new ModuleExamples(veraxSdk).run(process.argv[2]); |
This file contains 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,17 @@ | ||
import VeraxSdk from "../../src/VeraxSdk"; | ||
|
||
export default class ModuleExamples { | ||
private veraxSdk: VeraxSdk; | ||
constructor(_veraxSdk: VeraxSdk) { | ||
this.veraxSdk = _veraxSdk; | ||
} | ||
async run(methodName: string = "") { | ||
if (methodName.toLowerCase() == "findOneById".toLowerCase() || methodName == "") | ||
console.log(await this.veraxSdk.module.findOneById("0xf75be6f9418710fd516fa82afb3aad07e11a0f1b")); | ||
|
||
if (methodName.toLowerCase() == "findBy".toLowerCase() || methodName == "") | ||
console.log(await this.veraxSdk.module.findBy(`{name: "SchemaCheckerModule"}`)); | ||
|
||
if (methodName.toLowerCase() == "register" || methodName == "") console.log(await this.veraxSdk.module.register()); | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains 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 @@ | ||
import VeraxSdk from "../../src/VeraxSdk"; | ||
import PortalExamples from "./portalExamples"; | ||
|
||
const veraxSdk = new VeraxSdk(VeraxSdk.DEFAULT_LINEA_TESTNET); | ||
|
||
await new PortalExamples(veraxSdk).run(process.argv[2]); |
This file contains 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,34 @@ | ||
import VeraxSdk from "../../src/VeraxSdk"; | ||
|
||
export default class PortalExamples { | ||
private veraxSdk: VeraxSdk; | ||
constructor(_veraxSdk: VeraxSdk) { | ||
this.veraxSdk = _veraxSdk; | ||
} | ||
async run(methodName: string = "") { | ||
if (methodName.toLowerCase() == "findOneById".toLowerCase() || methodName == "") | ||
console.log(await this.veraxSdk.portal.findOneById("0x1495341ab1019798dd08976f4a3e5ab0e095510b")); | ||
|
||
if (methodName.toLowerCase() == "findBy".toLowerCase() || methodName == "") | ||
console.log(await this.veraxSdk.portal.findBy(`{ownerName: "Clique"}`)); | ||
|
||
if (methodName.toLowerCase() == "attest" || methodName == "") console.log(await this.veraxSdk.portal.attest()); | ||
|
||
if (methodName.toLowerCase() == "bulkAttest".toLowerCase() || methodName == "") | ||
console.log(await this.veraxSdk.portal.bulkAttest()); | ||
|
||
if (methodName.toLowerCase() == "replace" || methodName == "") console.log(await this.veraxSdk.portal.replace()); | ||
|
||
if (methodName.toLowerCase() == "revoke" || methodName == "") console.log(await this.veraxSdk.portal.revoke()); | ||
|
||
if (methodName.toLowerCase() == "bulkRevoke".toLowerCase() || methodName == "") | ||
console.log(await this.veraxSdk.portal.bulkRevoke()); | ||
|
||
if (methodName.toLowerCase() == "massImport".toLowerCase() || methodName == "") | ||
console.log(await this.veraxSdk.portal.massImport()); | ||
|
||
if (methodName.toLowerCase() == "register" || methodName == "") console.log(await this.veraxSdk.portal.register()); | ||
|
||
if (methodName.toLowerCase() == "clone" || methodName == "") console.log(await this.veraxSdk.portal.clone()); | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains 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 @@ | ||
import VeraxSdk from "../../src/VeraxSdk"; | ||
import PortalExamples from "./schemaExamples"; | ||
|
||
const veraxSdk = new VeraxSdk(VeraxSdk.DEFAULT_LINEA_TESTNET); | ||
|
||
await new PortalExamples(veraxSdk).run(process.argv[2]); |
This file contains 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,19 @@ | ||
import VeraxSdk from "../../src/VeraxSdk"; | ||
|
||
export default class SchemaExamples { | ||
private veraxSdk: VeraxSdk; | ||
constructor(_veraxSdk: VeraxSdk) { | ||
this.veraxSdk = _veraxSdk; | ||
} | ||
async run(methodName: string = "") { | ||
if (methodName.toLowerCase() == "findOneById".toLowerCase() || methodName == "") | ||
console.log( | ||
await this.veraxSdk.schema.findOneById("0x01f031da36192c34057c764239eb77bb6ec8ebfb808f72a7bb172f37a5bec31f"), | ||
); | ||
|
||
if (methodName.toLowerCase() == "findBy".toLowerCase() || methodName == "") | ||
console.log(await this.veraxSdk.schema.findBy(`{name: "Relationship"}`)); | ||
|
||
if (methodName.toLowerCase() == "create" || methodName == "") console.log(await this.veraxSdk.schema.create()); | ||
} | ||
} |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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