File tree Expand file tree Collapse file tree 3 files changed +8
-3
lines changed Expand file tree Collapse file tree 3 files changed +8
-3
lines changed Original file line number Diff line number Diff line change 9
9
10
10
import { BitGoAPI } from '@bitgo/sdk-api' ;
11
11
import { MessageStandardType } from "@bitgo/sdk-core" ;
12
- import { MIDNIGHT_TNC_HASH } from "@bitgo/account-lib/dist/src/utils" ;
13
12
import { Hteth } from "@bitgo/sdk-coin-eth" ;
13
+ import { MIDNIGHT_TNC_HASH } from "@bitgo/account-lib" ;
14
14
require ( 'dotenv' ) . config ( { path : '../../.env' } ) ;
15
15
16
16
const bitgo = new BitGoAPI ( {
Original file line number Diff line number Diff line change 5
5
*/
6
6
import { BitGo } from 'bitgo' ;
7
7
import { MessageStandardType } from '@bitgo/sdk-core' ;
8
+ import { MIDNIGHT_TNC_HASH } from "@bitgo/account-lib" ;
8
9
9
10
const bitgo = new BitGo ( { env : 'test' } ) ;
10
11
@@ -18,9 +19,12 @@ async function signMessage(): Promise<void> {
18
19
await bitgo . authenticateWithAccessToken ( { accessToken } ) ;
19
20
const walletInstance = await basecoin . wallets ( ) . get ( { id : walletId } ) ;
20
21
22
+ const adaTestnetDestinationAddress = 'addr_test1vz7xs7ceu4xx9n5xn57lfe86vrwddqpp77vjwq5ptlkh49cqy3wur' ;
23
+ const testnetMessageRaw = `STAR 12345678 to ${ adaTestnetDestinationAddress } ${ MIDNIGHT_TNC_HASH } ` ;
24
+
21
25
const messageTxn = await walletInstance . signMessage ( {
22
26
message : {
23
- messageRaw : 'Hello BitGo!' ,
27
+ messageRaw : testnetMessageRaw ,
24
28
messageStandardType : MessageStandardType . EIP191 ,
25
29
} ,
26
30
walletPassphrase,
Original file line number Diff line number Diff line change @@ -203,7 +203,8 @@ export { Soneium };
203
203
import * as Vet from '@bitgo/sdk-coin-vet' ;
204
204
export { Vet } ;
205
205
206
- import { validateAgainstMessageTemplates } from './utils' ;
206
+ import { validateAgainstMessageTemplates , MIDNIGHT_TNC_HASH } from './utils' ;
207
+ export { MIDNIGHT_TNC_HASH } ;
207
208
208
209
const coinBuilderMap = {
209
210
trx : Trx . WrappedBuilder ,
You can’t perform that action at this time.
0 commit comments