Skip to content

Commit

Permalink
Adjust the Address, SignType and Owner of the bundler to the public m…
Browse files Browse the repository at this point in the history
…ethod
  • Loading branch information
outprog authored and outprog committed Oct 24, 2024
1 parent 25e9b38 commit 36bb9db
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions bundler.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ import (
)

type Bundler struct {
signType int
signer interface{}
owner string // only rsa has owner
signerAddr string
SignType int
signer interface{}
Owner string // only rsa has owner
Address string
}

func NewBundler(signer interface{}) (*Bundler, error) {
Expand All @@ -22,10 +22,10 @@ func NewBundler(signer interface{}) (*Bundler, error) {
return nil, err
}
return &Bundler{
signType: signType,
signer: signer,
owner: owner,
signerAddr: signerAddr,
SignType: signType,
signer: signer,
Owner: owner,
Address: signerAddr,
}, nil
}

Expand All @@ -35,7 +35,7 @@ func (b *Bundler) Sign(item *schema.BundleItem) error {
return err
}
var sigData []byte
switch b.signType {
switch b.SignType {
case schema.ArweaveSignType:
arSigner, ok := b.signer.(*Signer)
if !ok {
Expand Down Expand Up @@ -66,7 +66,7 @@ func (b *Bundler) Sign(item *schema.BundleItem) error {
}

func (b *Bundler) CreateAndSignItem(data []byte, target string, anchor string, tags []schema.Tag) (bItem schema.BundleItem, err error) {
item, err := utils.NewBundleItem(b.owner, b.signType, target, anchor, data, tags)
item, err := utils.NewBundleItem(b.Owner, b.SignType, target, anchor, data, tags)
if err != nil {
return
}
Expand Down

0 comments on commit 36bb9db

Please sign in to comment.