Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
make payment method more prominent down the line
added receiver for soul name minting refactor soul linker
- Loading branch information
Showing
14 changed files
with
106 additions
and
70 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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,8 @@ | ||
import Masa from "../masa"; | ||
import { createLink } from "./create-link"; | ||
import { PaymentMethod } from "../contracts"; | ||
import { establishLinkFromPassport } from "./establish-link"; | ||
import { BigNumber, Contract } from "ethers"; | ||
import { verifyLink } from "./verify-link"; | ||
import { listLinks } from "./list-links"; | ||
import { breakLink } from "./break-link"; | ||
import { queryLinkFromPassport } from "./query-link"; | ||
import { MasaBase } from "../helpers/masa-base"; | ||
|
||
export * from "./break-link"; | ||
export * from "./create-link"; | ||
export * from "./establish-link"; | ||
export * from "./verify-link"; | ||
export * from "./list-links"; | ||
|
||
export class MasaSoulLinker extends MasaBase { | ||
constructor(masa: Masa, private contract: Contract) { | ||
super(masa); | ||
} | ||
|
||
create = (tokenId: BigNumber, readerIdentityId: BigNumber) => | ||
createLink(this.masa, this.contract, tokenId, readerIdentityId); | ||
establish = (passport: string, paymentMethod: PaymentMethod = "eth") => | ||
establishLinkFromPassport( | ||
this.masa, | ||
this.contract, | ||
passport, | ||
paymentMethod | ||
); | ||
verify = (tokenId: BigNumber, readerIdentityId?: BigNumber) => | ||
verifyLink(this.masa, this.contract, tokenId, readerIdentityId); | ||
list = (tokenId: BigNumber) => listLinks(this.masa, this.contract, tokenId); | ||
break = (tokenId: BigNumber, readerIdentityId: BigNumber) => | ||
breakLink(this.masa, this.contract, tokenId, readerIdentityId); | ||
query = (passport: string, paymentMethod: PaymentMethod = "eth") => | ||
queryLinkFromPassport(this.masa, this.contract, passport, paymentMethod); | ||
} | ||
export * from "./parse-passport"; | ||
export * from "./query-link"; | ||
export * from "./soul-linker"; | ||
export * from "./verify-link"; |
File renamed without changes.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import Masa from "../masa"; | ||
import { createLink } from "./create-link"; | ||
import { PaymentMethod } from "../contracts"; | ||
import { establishLinkFromPassport } from "./establish-link"; | ||
import { BigNumber, Contract } from "ethers"; | ||
import { verifyLink } from "./verify-link"; | ||
import { listLinks } from "./list-links"; | ||
import { breakLink } from "./break-link"; | ||
import { queryLinkFromPassport } from "./query-link"; | ||
import { MasaBase } from "../helpers/masa-base"; | ||
|
||
export class MasaSoulLinker extends MasaBase { | ||
constructor(masa: Masa, private contract: Contract) { | ||
super(masa); | ||
} | ||
|
||
create = (tokenId: BigNumber, readerIdentityId: BigNumber) => | ||
createLink(this.masa, this.contract, tokenId, readerIdentityId); | ||
establish = (paymentMethod: PaymentMethod = "eth", passport: string) => | ||
establishLinkFromPassport( | ||
this.masa, | ||
paymentMethod, | ||
this.contract, | ||
passport | ||
); | ||
verify = (tokenId: BigNumber, readerIdentityId?: BigNumber) => | ||
verifyLink(this.masa, this.contract, tokenId, readerIdentityId); | ||
list = (tokenId: BigNumber) => listLinks(this.masa, this.contract, tokenId); | ||
break = (tokenId: BigNumber, readerIdentityId: BigNumber) => | ||
breakLink(this.masa, this.contract, tokenId, readerIdentityId); | ||
query = (paymentMethod: PaymentMethod, passport: string) => | ||
queryLinkFromPassport(this.masa, paymentMethod, this.contract, passport); | ||
} |
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