Skip to content

Commit

Permalink
Merge branch 'master' into PDEEXP-1958-Implement-Telegram-OAuth-for-M…
Browse files Browse the repository at this point in the history
…andrake
  • Loading branch information
sherzod-bakhodirov authored Dec 11, 2024
2 parents 241dfde + dff274b commit a936d5a
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 3 deletions.
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
# (Wed Dec 11 2024)

#### 🐛 Bug Fix

- `@magic-ext/kadena@0.9.1`
- fix: add accounts param to spirekey send tx [#844](https://github.com/magiclabs/magic-js/pull/844) ([@hcote](https://github.com/hcote))

#### Authors: 1

- Hunter Cote ([@hcote](https://github.com/hcote))

---

# (Sat Dec 07 2024)

#### 🚀 Enhancement
Expand Down
13 changes: 13 additions & 0 deletions packages/@magic-ext/kadena/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
# v0.9.1 (Wed Dec 11 2024)

#### 🐛 Bug Fix

- fix: add accounts param to spirekey send tx [#844](https://github.com/magiclabs/magic-js/pull/844) ([@hcote](https://github.com/hcote))
- fix: add accounts param to spirekey send tx ([@hcote](https://github.com/hcote))

#### Authors: 1

- Hunter Cote ([@hcote](https://github.com/hcote))

---

# v0.9.0 (Sat Dec 07 2024)

#### 🚀 Enhancement
Expand Down
2 changes: 1 addition & 1 deletion packages/@magic-ext/kadena/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@magic-ext/kadena",
"version": "0.9.0",
"version": "0.9.1",
"description": "Magic Kadena Extension",
"author": "Magic <team@magic.link> (https://magic.link/)",
"license": "MIT",
Expand Down
10 changes: 8 additions & 2 deletions packages/@magic-ext/kadena/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import {
SpireKeyAccount,
SignatureWithPublicKey,
SignedTransactions,
OptimalTransactionsAccount,
} from './types';

export class KadenaExtension extends Extension.Internal<'kadena'> {
Expand All @@ -31,9 +32,14 @@ export class KadenaExtension extends Extension.Internal<'kadena'> {
return this.request(this.utils.createJsonRpcRequestPayload(KadenaPayloadMethod.KadenaSignTransaction, [{ hash }]));
}

public async signTransactionWithSpireKey(transaction: UnsignedCommand): Promise<SignedTransactions> {
public async signTransactionWithSpireKey(
transaction: UnsignedCommand,
accounts?: OptimalTransactionsAccount[]
): Promise<SignedTransactions> {
const signedTransaction = await this.request(
this.utils.createJsonRpcRequestPayload(KadenaPayloadMethod.KadenaSignTransactionWithSpireKey, [{ transaction }]),
this.utils.createJsonRpcRequestPayload(KadenaPayloadMethod.KadenaSignTransactionWithSpireKey, [
{ transaction, accounts: accounts || undefined },
])
);
return signedTransaction;
}
Expand Down
2 changes: 2 additions & 0 deletions packages/@magic-ext/kadena/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,8 @@ type Account = {

export type SpireKeyAccount = Account;

export type OptimalTransactionsAccount = Pick<Account, 'chainIds' | 'accountName' | 'networkId' | 'requestedFungibles'>;

export type ChainId =
| '0'
| '1'
Expand Down

0 comments on commit a936d5a

Please sign in to comment.