Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
cmd committed Jan 30, 2024
1 parent 4d0d014 commit c69c8d5
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 27 deletions.
25 changes: 0 additions & 25 deletions src/client/api/importer.ts

This file was deleted.

23 changes: 21 additions & 2 deletions src/client/class/signer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import {
} from '@cmdcode/signer'

import deposit_api from '../api/depositor.js'
import import_api from '../api/importer.js'
import member_api from '../api/member.js'
import proposal_api from '../api/proposal.js'
import request_api from '../api/request.js'
Expand Down Expand Up @@ -45,7 +44,27 @@ export class EscrowSigner {
return EscrowSigner.create(config, seed, xpub)
}

static import = import_api
static import (
config : Partial<SignerConfig>,
xpub ?: string
) {
return {
from_phrase : (
phrase : string,
salt ?: string | undefined
) => {
const seed = Seed.import.from_char(phrase, salt)
return EscrowSigner.create(config, seed, xpub)
},
from_words : (
words : string | string[],
password ?: string | undefined
) => {
const seed = Seed.import.from_words(words, password)
return EscrowSigner.create(config, seed, xpub)
}
}
}

static load (
config : Partial<SignerConfig>,
Expand Down

0 comments on commit c69c8d5

Please sign in to comment.