1
1
import { expect } from "chai" ;
2
- import { Address , AleoNetworkClient , CREDITS_PROGRAM_KEYS , Field , FunctionKeyPair , PrivateKey , ViewKey , Signature , RecordCiphertext , RecordPlaintext , PrivateKeyCiphertext , EncryptionToolkit , Transition , VerifyingKey } from "../src/node.js" ;
2
+ import { Address , AleoNetworkClient , CREDITS_PROGRAM_KEYS , Field , FunctionKeyPair , PrivateKey , ViewKey , Signature , RecordCiphertext , RecordPlaintext , PrivateKeyCiphertext , EncryptionToolkit , Transition , VerifyingKey , AleoKeyProvider } from "../src/node.js" ;
3
3
import {
4
4
seed ,
5
5
message ,
@@ -22,7 +22,6 @@ import {
22
22
} from "./data/records.js" ;
23
23
import { TRANSFER_PUBLIC_VERIFYING_KEY } from "./data/verifying-key.js" ;
24
24
25
-
26
25
describe ( 'WASM Objects' , ( ) => {
27
26
describe ( 'Address' , ( ) => {
28
27
it ( 'can be constructed from a private key' , ( ) => {
@@ -487,8 +486,9 @@ describe('WASM Objects', () => {
487
486
} ) ;
488
487
} ) ;
489
488
describe ( 'VerifyingKey' , ( ) => {
490
- it ( 'can get the number of constraints' , ( ) => {
491
- const transferPublicVerifier = VerifyingKey . fromString ( TRANSFER_PUBLIC_VERIFYING_KEY ) ;
489
+ it ( 'can get the number of constraints' , async ( ) => {
490
+ const keyProvider = new AleoKeyProvider ( ) ;
491
+ const [ transferPublicProver , transferPublicVerifier ] = < FunctionKeyPair > await keyProvider . fetchCreditsKeys ( CREDITS_PROGRAM_KEYS . transfer_public ) ;
492
492
const numConstraints = transferPublicVerifier . numConstraints ( ) ;
493
493
expect ( numConstraints ) . to . equal ( 12326 ) ;
494
494
} ) ;
0 commit comments