11import type * as ever from 'everscale-inpage-provider' ;
2- import { AbiVersion , Address } from 'everscale-inpage-provider' ;
2+ import { AbiVersion , Address , SignatureContext } from 'everscale-inpage-provider' ;
33import type * as nt from 'nekoton-wasm' ;
44
55import { Keystore , Signer } from '../keystore' ;
@@ -82,9 +82,9 @@ export type PrepareMessageParams = {
8282 */
8383 timeout : number ;
8484 /**
85- * Signature id for the current network
85+ * Signature context for the current network
8686 */
87- signatureId ?: number ;
87+ signatureContext : SignatureContext ;
8888} ;
8989
9090/**
@@ -96,8 +96,7 @@ export class AccountsStorageContext {
9696 private readonly connectionController : ConnectionController ,
9797 private readonly nekoton : typeof nt ,
9898 private readonly keystore ?: Keystore ,
99- ) {
100- }
99+ ) { }
101100
102101 public async getSigner ( publicKey : string ) : Promise < Signer > {
103102 if ( this . keystore == null ) {
@@ -137,8 +136,8 @@ export class AccountsStorageContext {
137136 }
138137
139138 public packIntoCell ( args : { structure : nt . AbiParam [ ] ; data : nt . TokensObject ; abiVersion ?: AbiVersion } ) : {
140- boc : string ,
141- hash : string ,
139+ boc : string ;
140+ hash : string ;
142141 } {
143142 return this . nekoton . packIntoCell ( args . structure , args . data , args . abiVersion ) ;
144143 }
@@ -183,7 +182,7 @@ export class AccountsStorageContext {
183182 method : string ;
184183 params : nt . TokensObject ;
185184 stateInit ?: string ;
186- signatureId ?: number ;
185+ signatureContext ?: SignatureContext ;
187186 } ) : Promise < nt . SignedMessage > {
188187 const unsignedMessage = this . nekoton . createExternalMessage (
189188 this . clock ,
@@ -197,7 +196,7 @@ export class AccountsStorageContext {
197196 ) ;
198197
199198 try {
200- const signature = await args . signer . sign ( unsignedMessage . hash , args . signatureId ) ;
199+ const signature = await args . signer . sign ( unsignedMessage . hash , args . signatureContext ) ;
201200 return unsignedMessage . sign ( signature ) ;
202201 } finally {
203202 unsignedMessage . free ( ) ;
0 commit comments