Skip to content

Commit

Permalink
fix: export Arconnect and ArweaveSigner from env specific signers
Browse files Browse the repository at this point in the history
  • Loading branch information
dtfiedler committed Apr 16, 2024
1 parent 51e2db9 commit b94ffdc
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 8 deletions.
6 changes: 0 additions & 6 deletions src/common/signer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
import { ArconnectSigner, ArweaveSigner } from 'arbundles';
import { randomBytes } from 'crypto';

import {
Expand All @@ -28,11 +27,6 @@ import {
} from '../types.js';
import { toB64Url } from '../utils/base64.js';

/**
* Utility exports to avoid clients having to install arbundles
*/
export { ArconnectSigner, ArweaveSigner };

/**
* Abstract class for signing TurboDataItems.
*/
Expand Down
15 changes: 14 additions & 1 deletion src/node/signer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,12 @@
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
import { serializeTags, streamSigner } from 'arbundles';
import {
ArconnectSigner,
ArweaveSigner,
serializeTags,
streamSigner,
} from 'arbundles';
import { Readable } from 'node:stream';

import { TurboDataItemAbstractSigner } from '../common/signer.js';
Expand All @@ -25,6 +30,14 @@ import {
} from '../types.js';
import { fromB64Url } from '../utils/base64.js';

/**
* Utility exports to avoid clients having to install arbundles
*/
export { ArconnectSigner, ArweaveSigner };

/**
* Node implementation of TurboDataItemSigner.
*/
export class TurboNodeArweaveSigner extends TurboDataItemAbstractSigner {
constructor(p: TurboDataItemSignerParams) {
super(p);
Expand Down
10 changes: 9 additions & 1 deletion src/web/signer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
import { ArconnectSigner, createData } from 'arbundles';
import { ArconnectSigner, ArweaveSigner, createData } from 'arbundles';

import { TurboDataItemAbstractSigner } from '../common/signer.js';
import {
Expand All @@ -25,6 +25,14 @@ import {
} from '../types.js';
import { readableStreamToBuffer } from '../utils/readableStream.js';

/**
* Utility exports to avoid clients having to install arbundles
*/
export { ArconnectSigner, ArweaveSigner };

/**
* Web implementation of TurboDataItemSigner.
*/
export class TurboWebArweaveSigner extends TurboDataItemAbstractSigner {
constructor(p: TurboDataItemSignerParams) {
super(p);
Expand Down

0 comments on commit b94ffdc

Please sign in to comment.