Created
April 10, 2023 00:32
-
-
Save brandonbryant12/2a4277fed50cd6ead3e1454be81c187d to your computer and use it in GitHub Desktop.
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
/* eslint-disable class-methods-use-this */ | |
type UserProfile = { | |
name: string; | |
avatarUrl: string; | |
balance: number; | |
}; | |
abstract class AbstractWallet { | |
// Returns a promise that resolves an array of strings, each string is an origin | |
async getOrdinals(): Promise<string[]> { | |
throw new Error('Not implemented'); | |
} | |
// Returns a promise as a string - transactionId | |
async sendOrdinal(origin: string, lockingScript: string): Promise<string> { | |
throw new Error('Not implemented'); | |
} | |
// Returns a promise as a string - raw transaction hex | |
async createPsbtBid(ordinalOrigin: string, satoshis: number): Promise<string> { | |
throw new Error('Not implemented'); | |
} | |
// Returns a promise as a string - transactionId | |
async acceptPsbtBid(psbtHex: string): Promise<string> { | |
throw new Error('Not implemented'); | |
} | |
// Returns a promise as a string - raw transaction hex | |
async createPsbtListing(origin: string): Promise<string> { | |
throw new Error('Not implemented'); | |
} | |
// Returns a promise as a string - transactionId | |
async acceptPsbtListing(psbtHex: string): Promise<string> { | |
throw new Error('Not implemented'); | |
} | |
// Returns a promise as a boolean | |
async isOwner(origin: string): Promise<boolean> { | |
throw new Error('Not implemented'); | |
} | |
// Returns a promise as a number - satoshis in wallet | |
async getBalance(): Promise<number> { | |
throw new Error('Not implemented'); | |
} | |
async getProfile(): Promise<UserProfile> { | |
throw new Error('Not implemented'); | |
} | |
} | |
export default AbstractWallet; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment