feat: adds a wip SDK structure#130
Conversation
| } | ||
|
|
||
| export class AuctionHouse { | ||
| private settings: AuctionHouseSettings; |
There was a problem hiding this comment.
I'd call those args or config. It's not exactly settings that are stored in a file or something.
|
|
||
| constructor(private connection: Connection) { } | ||
|
|
||
| get AuctionHouse() { |
There was a problem hiding this comment.
Why does this have to live on the client instead of just being returned?
i.e. if I'm done with it the GC cannot collect it now because it's still referenced.
Incurring that memory overhead only makes sense if creating it is expensive (which I don't think it is given you're just calling a constructor).
|
|
||
| } | ||
|
|
||
| async execute_sale() { |
|
Thought about this a bit more and we should consider making the main import * as msdk from '@metaplex-foundation/sdk'
const house = msdk.getAuctionHouse()
await house.doSomething()If we include snippets like these in the docs then people will get it I think and advanced users can still do |
No description provided.