
Security News
Risky Biz Podcast: Making Reachability Analysis Work in Real-World Codebases
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
@azify/caas-sdk
Advanced tools
TypeScript SDK for Azify CaaS (Crypto as a Service) API - Vaults, Wallets, and Transactions
SDK em TypeScript para integração com a API Azify Crypto as a Service (CaaS), fornecendo acesso fácil às funcionalidades de Cofres, Carteiras e Transações.
npm install @azify/caas-sdk
import { CaasSDK } from '@azify/caas-sdk';
const sdk = new CaasSDK({
baseUrl: 'https://api.azify.com',
apiKey: 'sua-chave-api',
partnerId: 123
});
// Criar um novo cofre
const novoCofreParams = {
ownerIdentificator: 'usuario123',
ownerType: 'user',
currencies: ['BTC_TEST', 'ETH_TEST5']
};
const cofre = await sdk.vaults.create(novoCofreParams);
console.log('Cofre criado:', cofre);
// Buscar cofres por proprietário
const cofresDoUsuario = await sdk.vaults.getByOwner('usuario123');
console.log('Cofres do usuário:', cofresDoUsuario);
// Obter detalhes de um cofre específico
const detalhesCofre = await sdk.vaults.getById('uuid-do-cofre');
console.log('Detalhes do cofre:', detalhesCofre);
// Consultar saldo do cofre
const saldo = await sdk.vaults.getBalance('uuid-do-cofre', 'BTC_TEST');
console.log('Saldo do cofre em BTC_TEST:', saldo);
// Obter endereços de depósito
const enderecosDeposito = await sdk.vaults.getDepositAddresses('uuid-do-cofre', 'BTC_TEST');
console.log('Endereços de depósito:', enderecosDeposito);
// Criar um novo endereço de depósito
const novoEndereco = await sdk.wallets.createDepositAddress({
vaultUuid: 'uuid-do-cofre',
currency: 'BTC_TEST'
});
console.log('Novo endereço criado:', novoEndereco);
// Obter endereço de depósito existente
const enderecoExistente = await sdk.wallets.getDepositAddress({
vaultUuid: 'uuid-do-cofre',
currency: 'BTC_TEST'
});
console.log('Endereço de depósito:', enderecoExistente);
// Listar carteiras
const carteiras = await sdk.wallets.get({
vaultUuid: 'uuid-do-cofre',
currency: 'BTC_TEST'
});
console.log('Carteiras do cofre:', carteiras);
// Criar uma transação simples
const transacaoParams = {
currency: 'BTC_TEST',
amount: 0.001,
destinationAddress: '1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa',
vaultUuid: 'uuid-do-cofre'
};
const transacao = await sdk.transactions.create(transacaoParams);
console.log('Transação criada:', transacao);
// Criar transação com taxa customizada
const transacaoComTaxa = await sdk.transactions.create({
currency: 'ETH_TEST5',
amount: 0.1,
destinationAddress: '0x742d35Cc6B54C1234567890123456789012345',
vaultUuid: 'uuid-do-cofre',
fee: {
level: 'HIGH'
}
});
console.log('Transação com taxa alta:', transacaoComTaxa);
import { CaasSDKError } from '@azify/caas-sdk';
try {
const cofre = await sdk.vaults.create({
ownerIdentificator: 'usuario123',
ownerType: 'user',
currencies: ['BTC_TEST']
});
} catch (error) {
if (error instanceof CaasSDKError) {
console.error('Erro do SDK:', {
message: error.message,
statusCode: error.statusCode,
details: error.details
});
} else {
console.error('Erro inesperado:', error);
}
}
import { CaasSDK, CaasSDKError } from '@azify/caas-sdk';
async function exemploCompleto() {
const sdk = new CaasSDK({
baseUrl: 'https://api.azify.com',
apiKey: 'sua-chave-api',
partnerId: 123
});
try {
// 1. Criar um cofre
const cofre = await sdk.vaults.create({
ownerIdentificator: 'usuario-exemplo',
ownerType: 'user',
currencies: ['BTC_TEST', 'ETH_TEST5']
});
console.log('✅ Cofre criado com sucesso:', cofre.uuid);
// 2. Criar endereço de depósito para BTC
const enderecoBTC = await sdk.wallets.createDepositAddress({
vaultUuid: cofre.uuid,
currency: 'BTC_TEST'
});
console.log('✅ Endereço BTC criado:', enderecoBTC.address);
// 3. Verificar saldo (será 0 inicialmente)
const saldoBTC = await sdk.vaults.getBalance(cofre.uuid, 'BTC_TEST');
console.log('💰 Saldo atual:', saldoBTC);
// 4. Simular uma transação (após receber fundos)
// const transacao = await sdk.transactions.create({
// currency: 'BTC_TEST',
// amount: 0.0001,
// destinationAddress: 'endereco-destino',
// vaultUuid: cofre.uuid
// });
} catch (error) {
if (error instanceof CaasSDKError) {
console.error('❌ Erro na operação:', error.message);
} else {
console.error('❌ Erro inesperado:', error);
}
}
}
exemploCompleto();
// Configuração com timeout customizado e headers adicionais
const sdk = new CaasSDK({
baseUrl: 'https://api.azify.com',
apiKey: 'sua-chave-api',
partnerId: 123,
timeout: 30000, // 30 segundos
headers: {
'Custom-Header': 'valor-personalizado'
}
});
O SDK inclui tipos TypeScript abrangentes para todas as requisições e respostas da API, proporcionando:
MIT
FAQs
TypeScript SDK for Azify CaaS (Crypto as a Service) API - Vaults, Wallets, and Transactions
The npm package @azify/caas-sdk receives a total of 10 weekly downloads. As such, @azify/caas-sdk popularity was classified as not popular.
We found that @azify/caas-sdk demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 8 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
Security News
/Research
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.
Security News
CISA’s 2025 draft SBOM guidance adds new fields like hashes, licenses, and tool metadata to make software inventories more actionable.