-
Notifications
You must be signed in to change notification settings - Fork 0
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
fd502fc
commit 5c02e87
Showing
8 changed files
with
2,840 additions
and
2,810 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 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
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,40 +1,7 @@ | ||
import { Checksum256 } from '@wharfkit/antelope'; | ||
|
||
export class Account { | ||
constructor( | ||
public name: string, | ||
public permission: string, | ||
public publicKey: string, | ||
) {} | ||
} | ||
|
||
export class Chain { | ||
id: Checksum256; | ||
url: string; | ||
coinType: number; | ||
|
||
constructor({ | ||
id, | ||
url, | ||
coinType, | ||
}: { | ||
id: string; | ||
url: string; | ||
coinType: string; | ||
}) { | ||
this.id = Checksum256.from(id); | ||
this.url = url; | ||
this.coinType = parseInt(coinType, 10); | ||
} | ||
|
||
static from(json: string): Chain { | ||
console.log(json); | ||
const parsed = JSON.parse(json); | ||
console.log(parsed); | ||
return new Chain({ | ||
id: parsed.id, | ||
url: parsed.url, | ||
coinType: parsed.coinType, | ||
}); | ||
} | ||
} |
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
Oops, something went wrong.